series: Generic event state description
PATCH v7 1/9 series: Generic event state description
--- covers/generic-events | 57 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 covers/generic-events
covers/generic-events new file +57 -0
@@ -0,0 +1,57 @@ +From: %(sender)s +Subject: [%(prefix)sPATCH%(version)s%(number)s] trace: Generic event state description + +Provides a generic event state description structure (TraceEvent) and a more +detailed event control and query interface. + +This is achieved by creating a new "non-public" tracing backend (i.e., not +selectable by the user at configure time) that will generate the appropriate +event description information. + +Signed-off-by: Lluís Vilanova <[email protected]> +--- + +Changes in v7: + +* Rebase on a8a826a from master. +* Moved compilation & code generation for "trace/" into a separate makefile. +* Renamed targets and moved rules according to the new makefile structure. + +Changes in v6: + +* Fixed typos in the documentation of the 'TraceEvent' struct. + +Changes in v5: + +* Rebase on dbaf26b3 from master. +* Always initialize temporary 'ev' in 'trace_backend_init_events'. +* Make common sanity checks in 'trace_event_set_state_dynamic' and delay + backend-specific code to 'trace_event_set_state_dynamic_backend'. + +Changes in v4: + +* Documentation fixes and (re)formatting. + +Changes in v3: + +* Add some assertions. + +* Remove debugging printf's. + +* Improve documentation. + +* Make 'trace_event_get_state_static' use run-time information, and leave + TRACE_*_ENABLED for compile-time checks. + + +Changes in v2: + +* Minor compilation fixes. + + +%(shortlog)s +%(diffstat)s + +To: [email protected] +Cc: Stefan Hajnoczi <[email protected]> +Cc: Blue Swirl <[email protected]>
PATCH v7 2/9 build: Use separate makefile for "trace/"
Signed-off-by Lluís Vilanova <[email protected]>
Reviewed-by Paolo Bonzini <[email protected]>
--- .gitignore | 8 ++-- Makefile | 15 +++++--- Makefile.objs | 64 ++------------------------------ scripts/tracetool/backend/dtrace.py | 2 + scripts/tracetool/format/h.py | 6 ++- trace.h | 6 +++ trace/Makefile.objs | 70 +++++++++++++++++++++++++++++++++++ 7 files changed, 96 insertions(+), 75 deletions(-) create mode 100644 trace.h create mode 100644 trace/Makefile.objs
.gitignore +4 -4
@@ -2,10 +2,10 @@ config-devices.* config-all-devices.* config-host.* config-target.* -trace.h -trace.c -trace-dtrace.h -trace-dtrace.dtrace +trace/generated-tracers.h +trace/generated-tracers.c +trace/generated-tracers-dtrace.h +trace/generated-tracers-dtrace.dtrace *-timestamp *-softmmu *-darwin-user
Makefile +9 -6
@@ -31,12 +31,15 @@ ifneq ($(filter-out %clean,$(MAKECMDGOALS)),$(if $(MAKECMDGOALS),,fail)) endif endif -GENERATED_HEADERS = config-host.h trace.h qemu-options.def +GENERATED_HEADERS = config-host.h qemu-options.def +GENERATED_HEADERS += qmp-commands.h qapi-types.h qapi-visit.h +GENERATED_SOURCES += qmp-marshal.c qapi-types.c qapi-visit.c + +GENERATED_HEADERS += trace/generated-tracers.h ifeq ($(TRACE_BACKEND),dtrace) -GENERATED_HEADERS += trace-dtrace.h +GENERATED_HEADERS += trace/generated-tracers-dtrace.h endif -GENERATED_HEADERS += qmp-commands.h qapi-types.h qapi-visit.h -GENERATED_SOURCES += qmp-marshal.c qapi-types.c qapi-visit.c trace.c +GENERATED_SOURCES += trace/generated-tracers.c # Don't try to regenerate Makefile or configure # We don't generate any of them
@@ -252,9 +255,9 @@ clean: rm -f *.a *.lo $(TOOLS) $(HELPERS-y) qemu-ga TAGS cscope.* *.pod *~ */*~ rm -Rf .libs rm -f qemu-img-cmds.h - rm -f trace-dtrace.dtrace trace-dtrace.dtrace-timestamp @# May not be present in GENERATED_HEADERS - rm -f trace-dtrace.h trace-dtrace.h-timestamp + rm -f trace/generated-tracers-dtrace.dtrace* + rm -f trace/generated-tracers-dtrace.h* rm -f $(foreach f,$(GENERATED_HEADERS),$(f) $(f)-timestamp) rm -f $(foreach f,$(GENERATED_SOURCES),$(f) $(f)-timestamp) rm -rf qapi-generated
Makefile.objs +3 -61
74 lines not on this page · raw message
scripts/tracetool/backend/dtrace.py +1 -1
@@ -37,7 +37,7 @@ def c(events): def h(events): - out('#include "trace-dtrace.h"', + out('#include "trace/generated-tracers-dtrace.h"', '') for e in events:
scripts/tracetool/format/h.py +3 -3
@@ -19,8 +19,8 @@ from tracetool import out def begin(events): out('/* This file is autogenerated by tracetool, do not edit. */', '', - '#ifndef TRACE_H', - '#define TRACE_H', + '#ifndef TRACE__GENERATED_TRACERS_H', + '#define TRACE__GENERATED_TRACERS_H', '', '#include "qemu-common.h"')
@@ -32,7 +32,7 @@ def end(events): enabled = 1 out('#define TRACE_%s_ENABLED %d' % (e.name.upper(), enabled)) out('', - '#endif /* TRACE_H */') + '#endif /* TRACE__GENERATED_TRACERS_H */') def nop(events): for e in events:
trace.h new file +6 -0
@@ -0,0 +1,6 @@ +#ifndef TRACE_H +#define TRACE_H + +#include "trace/generated-tracers.h" + +#endif /* TRACE_H */
trace/Makefile.objs new file +70 -0
70 lines not on this page · raw message
Please disregard this thread and see next one (also v7).
Lluis
Quoted 68 lines · Lluís Vilanova
--- covers/generic-events | 57 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 covers/generic-eventscovers/generic-events new file +57
-0@@ -0,0 +1,57 @@ +From: %(sender)s +Subject: [%(prefix)sPATCH%(version)s%(number)s] trace: Generic event state description + +Provides a generic event state description structure (TraceEvent) and a more +detailed event control and query interface. + +This is achieved by creating a new "non-public" tracing backend (i.e., not +selectable by the user at configure time) that will generate the appropriate +event description information. + +Signed-off-by: Lluís Vilanova <[email protected]> +--- + +Changes in v7: + +* Rebase on a8a826a from master. +* Moved compilation & code generation for "trace/" into a separate makefile. +* Renamed targets and moved rules according to the new makefile structure. + +Changes in v6: + +* Fixed typos in the documentation of the 'TraceEvent' struct. + +Changes in v5: + +* Rebase on dbaf26b3 from master. +* Always initialize temporary 'ev' in 'trace_backend_init_events'. +* Make common sanity checks in 'trace_event_set_state_dynamic' and delay + backend-specific code to 'trace_event_set_state_dynamic_backend'. + +Changes in v4: + +* Documentation fixes and (re)formatting. + +Changes in v3: + +* Add some assertions. + +* Remove debugging printf's. + +* Improve documentation. + +* Make 'trace_event_get_state_static' use run-time information, and leave + TRACE_*_ENABLED for compile-time checks. + + +Changes in v2: + +* Minor compilation fixes. + + +%(shortlog)s +%(diffstat)s + +To: [email protected] +Cc: Stefan Hajnoczi <[email protected]> +Cc: Blue Swirl <[email protected]>
Signature · 4 lines
"And it's much the same thing with knowledge, for whenever you learn something new, the whole world becomes that much richer." -- The Princess of Pure Reason, as told by Norton Juster in The Phantom Tollbooth