trace: Add ftrace tracing backend
This patch adds a ftrace tracing backend which sends trace event toftrace marker file. You can effectively compare qemu trace data andkernel(especially, kvm.ko when using KVM) trace data.The ftrace backend is restricted to Linux only....
trace: [tracetool] Explicitly identify public backends
Public backends are those printed by "--list-backends" and thus considered validby the configure script.
Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu>Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
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...
trace: [simple] Port to generic event information and new control interface
The backend is forced to dump event numbers using 64 bits, as TraceEventID isan enum.
trace: [stderr] Port to generic event information and new control interface
build: Use separate makefile for "trace/"
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu>--Changes in v2:
Avoid all systemtap reserved words
Over time various systemtap reserved words have been blacklistedin the trace backend generator. The list is not complete though,so there is continued risk of problems in the future. Preemptsuch problems by specifying the full list of systemtap keywords...
dtrace backend: add function to reserved words
Signed-off-by: Alon Levy <alevy@redhat.com>Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
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 <stefanha@linux.vnet.ibm.com>Signed-off-by: Stefan Weil <sw@weilnetz.de>Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Simpletrace v2: Support multiple arguments, strings.
Existing simpletrace backend allows to trace at max 6 args and does notsupport strings. This newer tracelog format gets rid of fixed size recordsand therefore allows to trace variable number of args including strings....
tracetool: use Python 2.4-compatible import() arguments
In Python 2.5 keyword arguments were added to import(). Avoid usingthem to achieve Python 2.4 compatibility.
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>Reviewed-by: Lluís Vilanova <vilanova@ac.upc.edu>
tracetool: avoid str.rpartition() Python 2.5 function
The str.rpartition() function is related to str.split() and is used forsplitting strings. It was introduced in Python 2.5 and therefore cannotbe used in tracetool as Python 2.4 compatibility is required....
tracetool: avoid pkgutil.iter_modules() Python 2.7 function
The pkgutil.iter_modules() function provides a way to enumerate childmodules. Unfortunately it's missing in Python <2.7 so we must implementsimilar behavior ourselves.
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>...
tracetool: Add support for the 'stderr' backend
Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu>Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
tracetool: Add support for the 'simple' backend
tracetool: Add support for the 'ust' backend
tracetool: Add support for the 'dtrace' backend
tracetool: handle DTrace keywords 'in', 'next', 'self'
Language keywords cannot be used as argument names. The DTrace backendappends an underscore to the argument name in order to make the argumentname legal.
This patch adds 'in', 'next', and 'self' keywords to dtrace.py....
tracetool: Rewrite infrastructure as python modules
The tracetool script is written in shell and has hit several portabilityproblems due to shell quirks or external tools across host platforms.Additionally the amount of string processing and lack of real data...
tracetool: Add module for the 'c' format
tracetool: Add module for the 'h' format
tracetool: Forbid argument name 'next'
It has happened more than once that patches that look perfectly saneand work with simpletrace broke systemtap because they use 'next' as anargument name for a tracing function. However, 'next' is a keyword forsystemtap, so we shouldn't use it....
Merge remote-tracking branch 'stefanha/tracing' into staging
Fix conversion from lower to upper case with Turkish locale
Some locale settings let make fail or create wrong resultsbecause tr '[:lower:]' '[:upper:]' which is used to convertfrom lower to upper case depends on the locale.
With locale tr_TR.UTF-8, lower case 'i' is not converted to 'I'....
tracetool: dtrace disabled-events fix
If there are "disabled" entries in the trace-events file thenlinetod_nop() is called if the backend is dtrace, it's currentlynot present. Also equivalent fix for stap.
Signed-off-by: Lee Essen <lee.essen@nowonline.co.uk>...
tracetool: dtrace: handle in and next reserved words
Signed-off-by: Alon Levy <alevy@redhat.com>Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
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 executioncost that is only necessary when producing the tracing information for an event...
tracetool: Omit useless QEMU_*_ENABLED() check
SystemTap provides a "semaphore" that can optionally be tested beforeexecuting a trace event. The purpose of this mechanism is to skipexpensive tracing code when the trace event is disabled.
For example, some applications may have trace events that format or...
trace: allow PRI*64 at beginning and ending of format string
The tracetool parser only picks up PRI*64 and other format string macroswhen enclosed between double quoted strings. Lift this restriction byextracting everything after the closing ')' as the format string:...
trace: generalize the "property" concept in the trace-events file
This adds/modifies the following functions:
Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu>
trace: always use the "nop" backend on events with the "disable" keyword
Any event with the keyword/property "disable" generates an empty trace eventusing the "nop" backend, regardless of the current backend.
trace: [simple] disable all trace points by default
Note that this refers to the backend-specific state (whether the output must begenerated), not the event "disabled" property (which always uses the "nop" backend).
trace: [stderr] add support for dynamically enabling/disabling events
Uses the generic interface provided in "trace/control.h" in order to providea programmatic interface as well as command line and monitor controls.
Signed-off-by: Fabien Chouteau <chouteau@adacore.com>...
trace: move backend-specific code into the trace/ directory
tracetool: allow ) in trace output string
Be greedy in matching the trailing "\)*" pattern. Otherwise, all thetext in the trace string up to the last closed parenthesis is taken aspart of the prototype.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>...
trace: [ust] fix generation of 'trace.c' on events without args
tracetool: Add optional argument to specify dtrace probe names
Optional feature allowing a user to generate the probe list to matchthe name of the binary, in case they wish to install qemu under adifferent name than qemu-{system,user},<arch>
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>...
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 candisplay the list of available backends.
Add scripts directory
Move build and user scripts into scripts directory.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>