trace: Remove trace.h from console.h (less dependencies)
PATCH 1/2 trace: Remove trace.h from console.h (less dependencies)
This reduces the dependencies on trace.h.
Only two source files which need console.h also need trace.h.
---
Without this patch, 449 .o files depend on trace.h and must be rebuild whenever the file trace-events is changed.
The patch reduces this number to 382 for the default QEMU build.
hw/display/vmware_vga.c | 1 + include/ui/console.h | 1 - ui/console.c | 1 + 3 files changed, 2 insertions(+), 1 deletion(-)
hw/display/vmware_vga.c +1 -0
@@ -23,6 +23,7 @@*/ #include "hw/hw.h" #include "hw/loader.h" +#include "trace.h" #include "ui/console.h" #include "hw/pci/pci.h"
include/ui/console.h +0 -1
@@ -6,7 +6,6 @@#include "qapi/qmp/qdict.h" #include "qemu/notify.h" #include "monitor/monitor.h" -#include "trace.h" #include "qapi-types.h" #include "qapi/error.h"
ui/console.c +1 -0
@@ -27,6 +27,7 @@#include "qemu/timer.h" #include "qmp-commands.h" #include "sysemu/char.h" +#include "trace.h" //#define DEBUG_CONSOLE #define DEFAULT_BACKSCROLL 512
Signature · 1 line
1.7.9.5
PATCH 2/2 trace: Remove trace.h from hw/usb/hcd-ehci.h (less dependencies)
This reduces the dependencies on trace.h.
Only one source file which needs hcd-ehci.h also needs trace.h.
---
This patch reduces the number of .o files which depend on trace.h in a default QEMU build from 382 to 379.
That's not a big reduction, but now there is no longer a .h file which directly includes trace.h, so future improvements (splitting trace headers, one header per source file, no longer compile 379 files after each change of trace-events) are easier to implement.
hw/usb/hcd-ehci.c | 1 + hw/usb/hcd-ehci.h | 1 - 2 files changed, 1 insertion(+), 1 deletion(-)
hw/usb/hcd-ehci.c +1 -0
@@ -28,6 +28,7 @@*/ #include "hw/usb/hcd-ehci.h" +#include "trace.h" /* Capability Registers Base Address - section 2.2 */ #define CAPLENGTH 0x0000/* 1-byte, 0x0001 reserved */
hw/usb/hcd-ehci.h +0 -1
@@ -21,7 +21,6 @@#include "qemu/timer.h" #include "hw/usb.h" #include "monitor/monitor.h" -#include "trace.h" #include "sysemu/dma.h" #include "sysemu/sysemu.h" #include "hw/pci/pci.h"
Signature · 1 line
1.7.9.5
Michael Tokarev
AppliedQuoted 2 lines · Stefan Weil
This reduces the dependencies on
trace.h.
Only two source files which needconsole.halso needtrace.h.
Thanks, applied both patches to the trivial patches queue, after actually verifying that the result is sane ;)
/mjt