Statistics
| Branch: | Revision:

root / scripts / tracetool @ f53ec699

# Date Author Comment
781e9545 05/03/2013 02:58 pm Eiichi Tsukata

trace: Add ftrace tracing backend

This patch adds a ftrace tracing backend which sends trace event to
ftrace marker file. You can effectively compare qemu trace data and
kernel(especially, kvm.ko when using KVM) trace data.
The ftrace backend is restricted to Linux only....

93fba161 03/28/2013 03:19 pm Lluís Vilanova

trace: [tracetool] Explicitly identify public backends

Public backends are those printed by "--list-backends" and thus considered valid
by the configure script.

Signed-off-by: Lluís Vilanova <>
Signed-off-by: Stefan Hajnoczi <>

45be2f5d 03/28/2013 03:19 pm Lluís Vilanova

trace: Provide a generic tracing event descriptor

Uses tracetool to generate a backend-independent tracing event description
(struct TraceEvent).

The values for such structure are generated with the non-public "events"
backend ("events-c" frontend).

The generation of the defines to check if an event is statically enabled is also...

60481e21 03/28/2013 03:19 pm Lluís Vilanova

trace: [simple] Port to generic event information and new control interface

The backend is forced to dump event numbers using 64 bits, as TraceEventID is
an enum.

Signed-off-by: Lluís Vilanova <>
Signed-off-by: Stefan Hajnoczi <>

c6f18b91 03/28/2013 03:19 pm Lluís Vilanova

trace: [stderr] Port to generic event information and new control interface

Signed-off-by: Lluís Vilanova <>
Signed-off-by: Stefan Hajnoczi <>

eac236ea 12/23/2012 10:28 pm Lluís Vilanova

build: Use separate makefile for "trace/"

Reviewed-by: Paolo Bonzini <>
Signed-off-by: Lluís Vilanova <>
--
Changes in v2:

  • Do not depend on "qemu-timer-common.o".
  • Use "$(obj)" in rules to refer to the build sub-directory....
81dee729 11/16/2012 02:12 pm Daniel P. Berrange

Avoid all systemtap reserved words

Over time various systemtap reserved words have been blacklisted
in the trace backend generator. The list is not complete though,
so there is continued risk of problems in the future. Preempt
such problems by specifying the full list of systemtap keywords...

d8f8a860 09/23/2012 09:11 am Alon Levy

dtrace backend: add function to reserved words

Signed-off-by: Alon Levy <>
Signed-off-by: Stefan Hajnoczi <>

964d0a7b 08/14/2012 03:19 pm Stefan Weil

trace/simple: Fix compiler warning for 32 bit hosts

gcc complains when a 32 bit pointer is casted to a 64 bit integer.

Cc: Stefan Hajnoczi <>
Signed-off-by: Stefan Weil <>
Signed-off-by: Stefan Hajnoczi <>

62bab732 07/19/2012 01:34 pm Harsh Prateek Bora

Simpletrace v2: Support multiple arguments, strings.

Existing simpletrace backend allows to trace at max 6 args and does not
support strings. This newer tracelog format gets rid of fixed size records
and therefore allows to trace variable number of args including strings....

45d6c787 05/01/2012 10:15 pm Stefan Hajnoczi

tracetool: use Python 2.4-compatible import() arguments

In Python 2.5 keyword arguments were added to import(). Avoid using
them to achieve Python 2.4 compatibility.

Signed-off-by: Stefan Hajnoczi <>
Reviewed-by: Lluís Vilanova <>

b3ef0ade 05/01/2012 10:15 pm Stefan Hajnoczi

tracetool: avoid str.rpartition() Python 2.5 function

The str.rpartition() function is related to str.split() and is used for
splitting strings. It was introduced in Python 2.5 and therefore cannot
be used in tracetool as Python 2.4 compatibility is required....

9943e0ec 05/01/2012 10:15 pm Stefan Hajnoczi

tracetool: avoid pkgutil.iter_modules() Python 2.7 function

The pkgutil.iter_modules() function provides a way to enumerate child
modules. Unfortunately it's missing in Python <2.7 so we must implement
similar behavior ourselves.

Signed-off-by: Stefan Hajnoczi <>...

9008d85a 04/18/2012 04:03 pm Lluís Vilanova

tracetool: Add support for the 'stderr' backend

Signed-off-by: Lluís Vilanova <>
Signed-off-by: Stefan Hajnoczi <>

dd03a39e 04/18/2012 04:03 pm Lluís Vilanova

tracetool: Add support for the 'simple' backend

Signed-off-by: Lluís Vilanova <>
Signed-off-by: Stefan Hajnoczi <>

fbc54b94 04/18/2012 04:03 pm Lluís Vilanova

tracetool: Add support for the 'ust' backend

Signed-off-by: Lluís Vilanova <>
Signed-off-by: Stefan Hajnoczi <>

52ef093a 04/18/2012 04:03 pm Lluís Vilanova

tracetool: Add support for the 'dtrace' backend

Signed-off-by: Lluís Vilanova <>
Signed-off-by: Stefan Hajnoczi <>

256a721d 04/18/2012 04:03 pm Stefan Hajnoczi

tracetool: handle DTrace keywords 'in', 'next', 'self'

Language keywords cannot be used as argument names. The DTrace backend
appends an underscore to the argument name in order to make the argument
name legal.

This patch adds 'in', 'next', and 'self' keywords to dtrace.py....

650ab98d 04/18/2012 04:02 pm Lluís Vilanova

tracetool: Rewrite infrastructure as python modules

The tracetool script is written in shell and has hit several portability
problems due to shell quirks or external tools across host platforms.
Additionally the amount of string processing and lack of real data...

5de7f9c8 04/18/2012 04:02 pm Lluís Vilanova

tracetool: Add module for the 'c' format

Signed-off-by: Lluís Vilanova <>
Signed-off-by: Stefan Hajnoczi <>

c419e62a 04/18/2012 04:02 pm Lluís Vilanova

tracetool: Add module for the 'h' format

Signed-off-by: Lluís Vilanova <>
Signed-off-by: Stefan Hajnoczi <>

fa6b8733 04/05/2012 03:54 pm Kevin Wolf

tracetool: Forbid argument name 'next'

It has happened more than once that patches that look perfectly sane
and work with simpletrace broke systemtap because they use 'next' as an
argument name for a tracing function. However, 'next' is a keyword for
systemtap, so we shouldn't use it....

aba8e41e 04/02/2012 05:44 pm Anthony Liguori

Merge remote-tracking branch 'stefanha/tracing' into staging

  • stefanha/tracing:
    tracetool: dtrace: handle in and next reserved words
    tracetool: dtrace disabled-events fix
    Makefile.target: code stp dependency on trace-events
bb55b712 03/31/2012 03:03 pm Stefan Weil

Fix conversion from lower to upper case with Turkish locale

Some locale settings let make fail or create wrong results
because tr '[:lower:]' '[:upper:]' which is used to convert
from lower to upper case depends on the locale.

With locale tr_TR.UTF-8, lower case 'i' is not converted to 'I'....

60be795f 03/30/2012 01:55 pm Lee Essen

tracetool: dtrace disabled-events fix

If there are "disabled" entries in the trace-events file then
linetod_nop() is called if the backend is dtrace, it's currently
not present. Also equivalent fix for stap.

Signed-off-by: Lee Essen <>...

703e01e6 03/30/2012 01:55 pm Alon Levy

tracetool: dtrace: handle in and next reserved words

Signed-off-by: Alon Levy <>
Signed-off-by: Stefan Hajnoczi <>

b7d66a76 03/12/2012 12:12 pm Lluís Vilanova

trace: Provide a per-event status define for conditional compilation

Adds a 'TRACE_${NAME}_ENABLED' preprocessor define for each tracing event in
"trace.h".

This lets the user conditionally compile code with a relatively high execution
cost that is only necessary when producing the tracing information for an event...

bcec4332 03/12/2012 12:12 pm Stefan Hajnoczi

tracetool: Omit useless QEMU_*_ENABLED() check

SystemTap provides a "semaphore" that can optionally be tested before
executing a trace event. The purpose of this mechanism is to skip
expensive tracing code when the trace event is disabled.

For example, some applications may have trace events that format or...

913540a3 09/17/2011 06:14 pm Stefan Hajnoczi

trace: allow PRI*64 at beginning and ending of format string

The tracetool parser only picks up PRI*64 and other format string macros
when enclosed between double quoted strings. Lift this restriction by
extracting everything after the closing ')' as the format string:...

49926043 09/01/2011 12:34 pm Lluís

trace: generalize the "property" concept in the trace-events file

This adds/modifies the following functions:

  • get_name: Get only the event name
  • has_property: Return whether an event has a property (keyword before the event
    name)

Signed-off-by: Lluís Vilanova <>

dd215f64 09/01/2011 12:34 pm Lluís

trace: always use the "nop" backend on events with the "disable" keyword

Any event with the keyword/property "disable" generates an empty trace event
using the "nop" backend, regardless of the current backend.

Signed-off-by: Lluís Vilanova <>

03727e6a 09/01/2011 12:34 pm Lluís

trace: [simple] disable all trace points by default

Note that this refers to the backend-specific state (whether the output must be
generated), not the event "disabled" property (which always uses the "nop"
backend).

Signed-off-by: Lluís Vilanova <>

9a82b6a5 09/01/2011 12:34 pm Lluís

trace: [stderr] add support for dynamically enabling/disabling events

Uses the generic interface provided in "trace/control.h" in order to provide
a programmatic interface as well as command line and monitor controls.

Signed-off-by: Fabien Chouteau <>...

edb47ec4 09/01/2011 12:34 pm Lluís

trace: move backend-specific code into the trace/ directory

Signed-off-by: Lluís Vilanova <>

1a96dd47 04/26/2011 03:14 pm Paolo Bonzini

tracetool: allow ) in trace output string

Be greedy in matching the trailing "\)*" pattern. Otherwise, all the
text in the trace string up to the last closed parenthesis is taken as
part of the prototype.

Signed-off-by: Paolo Bonzini <>...

fa2d480a 04/26/2011 03:14 pm Lluís

trace: [ust] fix generation of 'trace.c' on events without args

Signed-off-by: Lluís Vilanova <>
Signed-off-by: Stefan Hajnoczi <>

e323c93e 03/06/2011 09:38 pm Jes Sorensen

tracetool: Add optional argument to specify dtrace probe names

Optional feature allowing a user to generate the probe list to match
the name of the binary, in case they wish to install qemu under a
different name than qemu-{system,user},<arch>

Signed-off-by: Jes Sorensen <>...

320fba2a 01/30/2011 12:52 am Fabien Chouteau

New trace-event backend: stderr

This backend sends trace events to standard error output during the emulation.

Also add a "--list-backends" option to tracetool, so configure script can
display the list of available backends.

Signed-off-by: Fabien Chouteau <>...

4c3b5a48 01/20/2011 10:54 pm Blue Swirl

Add scripts directory

Move build and user scripts into scripts directory.

Signed-off-by: Blue Swirl <>