XXX: Must be applied on top of the "backdoor" patch series and the patch "trace: Provide a per-event status define for conditional compilation", but is independent otherwise.
Adds the "instrument" event property. When specified, this event property lets the user provide her own implementation for that specific tracing event. Still, in case the user only wants to wrap around the tracing event, the original tracing implementation is accessible through function 'trace_<eventname>_backend', instead of the original 'trace_<eventname>' (which now the user has to provide). The user-provided tracing functions are expected to be in the static library "libtrace-instrument.a", identified by the "--with-trace-instrument" configuration parameter and compiled by each of QEMU's target/frontend pairs. See the documentation added in the second patch for more information. Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- Lluís Vilanova (4): trace: [tracetool] Add 'get_api_name' to construct the name of tracing routines trace-instrument: Add documentation trace-instrument: Add support for user-provided code on a per-event basis trace-instrument: Add a per-vCPU opaque pointer for the instrumentation backend Makefile.objs | 23 +++++++ Makefile.target | 2 - configure | 38 ++++++++++++ cpu-defs.h | 6 +- docs/instrumentation.txt | 142 ++++++++++++++++++++++++++++++++++++++++++++++ docs/tracing.txt | 9 +++ scripts/simpletrace.py | 2 - scripts/tracetool | 57 +++++++++++++++--- 8 files changed, 261 insertions(+), 18 deletions(-) create mode 100644 docs/instrumentation.txt