On Tue, Jun 28, 2011 at 06:52:55PM +0200, Lluís wrote: > This patch defines the "disable" trace event state to always use the "nop" > backend. > > As a side-effect, all events are now enabled (without "disable") by default, > as > all backends (except "stderr") have programmatic support for dynamically > (de)activating each trace event. > > In order to make this true, the "simple" backend now has a "-trace > events=<file>" argument to let the user select which events must be enabled > from > the very beginning. > > NOTES: > * Parsing of -trace arguments is not done in the OS-specific frontends. > > Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> > --- > > Changes in v5: > > * Fix a variable name typo in configure. > * Rebase on qemu.git/master (c24a9c6ef946ec1b5b280061d4f7b579aaac6707). > > Changes in v4: > > * Fix a couple of minor errors. > > Changes in v3: > > * Rebase on qemu.git/master (642cfd4d31241c0fc65c520cb1e703659af66236). > * Remove already-merged patches. > * Remove code styling patches. > * Generalize programmatic interface for trace event state control. > > Changes in v2: > > * Documentation fixes. > * Seggregate whitespace/indentation changes. > * Minor code beautifications. > * Make all -trace suboptions explicit. > * Fix minor comments from Stefan. > * Minor trace-events format fixes. > * Integrate changes from Fabien. > * Rebase on qemu.git/master (c8f930c0eeb696d638f4d4bf654e955fa44ff40f). > > Lluís Vilanova (10): > trace: move backend-specific code into the trace/ directory > trace: avoid conditional code compilation during option parsing > trace: generalize the "property" concept in the trace-events file > trace-state: separate trace event control and query routines from the > simple backend > trace-state: always compile support for controlling and querying trace > event states > trace-state: add "-trace events" argument to control initial state > trace-state: always use the "nop" backend on events with the "disable" > keyword > trace-state: [simple] disable all trace points by default > trace-state: [stderr] add support for dynamically enabling/disabling > events > trace: enable all events > > > .gitignore | 2 > Makefile | 1 > Makefile.objs | 5 > configure | 7 + > docs/tracing.txt | 64 +++--- > hmp-commands.hx | 9 + > monitor.c | 19 +- > qemu-config.c | 7 - > qemu-options.hx | 26 ++ > scripts/tracetool | 116 +++++------ > simpletrace.c | 355 --------------------------------- > simpletrace.h | 48 ---- > trace-events | 569 > ++++++++++++++++++++++++++--------------------------- > trace/control.c | 66 ++++++ > trace/control.h | 16 + > trace/simple.c | 332 +++++++++++++++++++++++++++++++ > trace/simple.h | 46 ++++ > trace/stderr.h | 11 + > vl.c | 21 +- > 19 files changed, 914 insertions(+), 806 deletions(-) > delete mode 100644 simpletrace.c > delete mode 100644 simpletrace.h > create mode 100644 trace/control.c > create mode 100644 trace/control.h > create mode 100644 trace/simple.c > create mode 100644 trace/simple.h > create mode 100644 trace/stderr.h
Nice! Now both stderr and simple are unified in terms of user interface. -trace events=<file> can be used to set the enabled trace events on startup. I did leave some comments, mainly #ifdef reduction. But let's merge the next version. Stefan