qemu-e2k/trace
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
..
control-internal.h trace: Do not include qom/cpu.h into generated trace.h 2019-08-16 13:31:52 +02:00
control-target.c move public invalidate APIs out of translate-all.{c,h}, clean up 2018-06-28 19:05:30 +02:00
control-vcpu.h trace: Do not include qom/cpu.h into generated trace.h 2019-08-16 13:31:52 +02:00
control.c tracing: Use double-dash spelling for trace option 2018-07-19 13:09:04 +01:00
control.h trace: Do not include qom/cpu.h into generated trace.h 2019-08-16 13:31:52 +02:00
event-internal.h trace: remove the TraceEventID and TraceEventVCPUID enums 2016-10-12 09:35:54 +02:00
ftrace.c trace: handle tracefs path truncation 2019-03-22 15:55:50 +00:00
ftrace.h Clean up decorations and whitespace around header guards 2016-07-12 16:20:46 +02:00
Makefile.objs build: get rid of target-obj-y 2019-03-11 16:33:49 +01:00
mem-internal.h trace: add trace_mem_build_info_no_se_be/le 2018-06-27 11:09:24 +01:00
mem.h trace: simplify trace_mem functions 2018-06-27 11:09:24 +01:00
qmp.c trace: Do not include qom/cpu.h into generated trace.h 2019-08-16 13:31:52 +02:00
simple.c trace: Simplify how st_print_trace_file_status() prints 2019-04-18 22:18:59 +02:00
simple.h trace: Simplify how st_print_trace_file_status() prints 2019-04-18 22:18:59 +02:00