Skip to content
Snippets Groups Projects
user avatar
Stefan Hajnoczi authored
This patch introduces the trace-events file where trace events can be
declared like so:

qemu_malloc(size_t size) "size %zu"
qemu_free(void *ptr) "ptr %p"

These trace event declarations are processed by a new tool called
tracetool to generate code for the trace events.  Trace event
declarations are independent of the backend tracing system (LTTng User
Space Tracing, ftrace markers, DTrace).

The default "nop" backend generates empty trace event functions.
Therefore trace events are disabled by default.

The trace-events file serves two purposes:

1. Adding trace events is easy.  It is not necessary to understand the
   details of a backend tracing system.  The trace-events file is a
   single location where trace events can be declared without code
   duplication.

2. QEMU is not tightly coupled to one particular backend tracing system.
   In order to support tracing across QEMU host platforms and to
   anticipate new backend tracing systems that are currently maturing,
   it is important to be flexible and not tied to one system.

This commit includes fixes from Prerna Saxena
<prerna@linux.vnet.ibm.com> and Blue Swirl <blauwirbel@gmail.com>.

Signed-off-by: default avatarStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
94a420b1
History
Name Last commit Last update
QMP
audio
block
bsd-user
darwin-user
default-configs
docs
fpu
fsdev
gdb-xml
hw
linux-user
net
pc-bios
roms
slirp
sysconfigs/target
target-alpha
target-arm
target-cris
target-i386
target-m68k
target-microblaze
target-mips
target-ppc
target-s390x
target-sh4
target-sparc
tcg
tests
ui
.gitignore
.gitmodules
CODING_STYLE
COPYING
COPYING.LIB
Changelog
LICENSE
MAINTAINERS
Makefile
Makefile.dis
Makefile.hw
Makefile.objs
Makefile.target
Makefile.user
README
TODO
VERSION
a.out.h
acl.c
acl.h
aes.c
aes.h
aio.c
alpha-dis.c
alpha.ld
arch_init.c
arch_init.h
arm-dis.c
arm-semi.c
arm.ld
async.c
balloon.c
balloon.h
block-migration.c
block-migration.h
block.c
block.h
block_int.h
blockdev.c
blockdev.h
bswap.h
bt-host.c
bt-host.h
bt-vhci.c
buffered_file.c
buffered_file.h
cache-utils.c
cache-utils.h
check-qdict.c
check-qfloat.c
check-qint.c
check-qjson.c
check-qlist.c
check-qstring.c
cmd.c
cmd.h
config.h
configure
console.c
console.h
cpu-all.h
cpu-common.h
cpu-defs.h
cpu-exec.c
cpus.c
cpus.h
create_config
cris-dis.c
cursor.c
cursor_hidden.xpm
cursor_left_ptr.xpm
cutils.c
def-helper.h
device_tree.c
device_tree.h
dis-asm.h
disas.c
disas.h
dma-helpers.c
dma.h
dyngen-exec.h
elf.h
envlist.c
envlist.h
exec-all.h
exec.c
feature_to_c.sh
gdbstub.c
gdbstub.h
gen-icount.h
host-utils.c
host-utils.h
hpet.h
hppa-dis.c
hppa.ld
hxtool
i386-dis.c
i386.ld
ia64-dis.c
ia64.ld
input.c
ioport-user.c
ioport.c
ioport.h
iov.c
iov.h
json-lexer.c
json-lexer.h
json-parser.c
json-parser.h
json-streamer.c
json-streamer.h
kvm-all.c
kvm-stub.c
kvm.h
libfdt_env.h
linux-aio.c
m68k-dis.c
m68k-semi.c
m68k.ld
microblaze-dis.c
migration-exec.c
migration-fd.c
migration-tcp.c
migration-unix.c
migration.c
migration.h
mips-dis.c
mips.ld
module.c
module.h
monitor.c
monitor.h
nbd.c
nbd.h
net-checksum.c
net.c
net.h
notify.c
notify.h
os-posix.c
os-win32.c
osdep.c
osdep.h
path.c
pci-ids.txt
poison.h
posix-aio-compat.c
ppc-dis.c
ppc.ld
ppc64.ld
qbool.c
qbool.h
qdict-test-data.txt
qdict.c
qdict.h
qemu-aio.h
qemu-barrier.h
qemu-binfmt-conf.sh
qemu-char.c
qemu-char.h
qemu-common.h
qemu-config.c
qemu-config.h
qemu-doc.texi
qemu-error.c
qemu-error.h
qemu-img-cmds.hx
qemu-img.c
Read the documentation in qemu-doc.html.

Fabrice Bellard.