qemu-e2k/scripts/tracetool/format
Markus Armbruster 13d4ff07e8 trace: Do not include qom/cpu.h into generated trace.h
docs/devel/tracing.txt explains "since many source files include
trace.h, [the generated trace.h use] a minimum of types and other
header files included to keep the namespace clean and compile times
and dependencies down."

Commit 4815185902 "trace: Add per-vCPU tracing states for events with
the 'vcpu' property" made them all include qom/cpu.h via
control-internal.h.  qom/cpu.h in turn includes about thirty headers.
Ouch.

Per-vCPU tracing is currently not supported in sub-directories'
trace-events.  In other words, qom/cpu.h can only be used in
trace-root.h, not in any trace.h.

Split trace/control-vcpu.h off trace/control.h and
trace/control-internal.h.  Have the generated trace.h include
trace/control.h (which no longer includes qom/cpu.h), and trace-root.h
include trace/control-vcpu.h (which includes it).

The resulting improvement is a bit disappointing: in my "build
everything" tree, some 1100 out of 6600 objects (not counting tests
and objects that don't depend on qemu/osdep.h) depend on a trace.h,
and about 600 of them no longer depend on qom/cpu.h.  But more than
1300 others depend on trace-root.h.  More work is clearly needed.
Left for another day.

Cc: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20190812052359.30071-8-armbru@redhat.com>
2019-08-16 13:31:52 +02:00
..
__init__.py trace: introduce a formal group name for trace events 2016-10-12 09:54:53 +02:00
c.py trace: Do not include qom/cpu.h into generated trace.h 2019-08-16 13:31:52 +02:00
d.py trace: avoid SystemTap dtrace(1) warnings on empty files 2019-03-22 15:55:50 +00:00
h.py trace: Do not include qom/cpu.h into generated trace.h 2019-08-16 13:31:52 +02:00
log_stap.py trace: Eliminate use of TARGET_FMT_plx 2019-08-16 13:31:51 +02:00
simpletrace_stap.py scripts: Remove unused python imports 2019-01-17 17:52:40 -02:00
stap.py trace: introduce a formal group name for trace events 2016-10-12 09:54:53 +02:00
tcg_h.py trace: [tcg] Do not generate TCG code to trace dynamically-disabled events 2017-07-17 13:11:12 +01:00
tcg_helper_c.py Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
tcg_helper_h.py trace: introduce a formal group name for trace events 2016-10-12 09:54:53 +02:00
tcg_helper_wrapper_h.py trace: introduce a formal group name for trace events 2016-10-12 09:54:53 +02:00
ust_events_c.py trace: switch to modular code generation for sub-directories 2017-01-31 17:11:18 +00:00
ust_events_h.py Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00