@@ -163,6 +163,7 @@ trace-events-subdirs += target/ppc
trace-events-subdirs += qom
trace-events-subdirs += linux-user
trace-events-subdirs += qapi
+trace-events-subdirs += tcg
trace-events-files = $(SRC_PATH)/trace-events $(trace-events-subdirs:%=$(SRC_PATH)/%/trace-events)
@@ -88,7 +88,8 @@ all: $(PROGS) stap
#########################################################
# cpu emulator library
-obj-y = exec.o translate-all.o cpu-exec.o
+obj-y = exec.o cpu-exec.o
+obj-y += tcg/translate-all.o
obj-y += translate-common.o
obj-y += cpu-exec-common.o
obj-y += tcg/tcg.o tcg/tcg-op.o tcg/optimize.o
new file mode 100644
@@ -0,0 +1,6 @@
+# Trace events for debugging and performance instrumentation
+#
+# TCG related tracing (mostly disabled by default)
+# translate-all.c
+translate_block(void *tb, uintptr_t pc, uint8_t *tb_code) "tb:%p, pc:0x%"PRIxPTR", tb_code:%p"
+
similarity index 99%
rename from translate-all.c
rename to tcg/translate-all.c
@@ -25,7 +25,7 @@
#include "qemu-common.h"
#define NO_CPU_IO_DEFS
#include "cpu.h"
-#include "trace-root.h"
+#include "trace.h"
#include "disas/disas.h"
#include "exec/exec-all.h"
#include "tcg.h"
@@ -78,9 +78,6 @@ disable exec_tb(void *tb, uintptr_t pc) "tb:%p pc=0x%"PRIxPTR
disable exec_tb_nocache(void *tb, uintptr_t pc) "tb:%p pc=0x%"PRIxPTR
disable exec_tb_exit(void *last_tb, unsigned int flags) "tb:%p flags=%x"
-# translate-all.c
-translate_block(void *tb, uintptr_t pc, uint8_t *tb_code) "tb:%p, pc:0x%"PRIxPTR", tb_code:%p"
-
# memory.c
memory_region_ops_read(int cpu_index, void *mr, uint64_t addr, uint64_t value, unsigned size) "cpu %d mr %p addr %#"PRIx64" value %#"PRIx64" size %u"
memory_region_ops_write(int cpu_index, void *mr, uint64_t addr, uint64_t value, unsigned size) "cpu %d mr %p addr %#"PRIx64" value %#"PRIx64" size %u"
move translate-all.c file into tcg directory and update trace-events file Signed-off-by: Yang Zhong <yang.zhong@intel.com> --- Makefile.objs | 1 + Makefile.target | 3 ++- tcg/trace-events | 6 ++++++ translate-all.c => tcg/translate-all.c | 2 +- trace-events | 3 --- 5 files changed, 10 insertions(+), 5 deletions(-) create mode 100644 tcg/trace-events rename translate-all.c => tcg/translate-all.c (99%)