Skip to contentSkip to conversation

move the tcg files into tcg directory.

PATCH Superseded Yang Zhong 2 participants 9 messages May 19, 2017 – May 22, 2017 Kbuild

v0 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Yang Zhong

author
#0 lore raw

cover move the tcg files into tcg directory.

Move the tcg relative files into tcg directory, which will make the code more clean in qemu.

Yang Zhong (6):
move tcg relative files into tcg directory
move tcg relative files into tcg directory
move tcg header file
move tcg relative files into tcg directory
move tcg relative files into tcg directory
change tcg relative file's compile definition

 Makefile.objs                                | 1 +
 Makefile.target                              | 8 ++------
 tcg/Makefile.objs                            | 2 ++
 tcg-runtime.c => tcg/tcg-runtime.c           | 0
 tci.c => tcg/tci.c                           | 0
 tcg/trace-events                             | 6 ++++++
 translate-all.c => tcg/translate-all.c       | 2 +-
 translate-all.h => tcg/translate-all.h       | 0
 translate-common.c => tcg/translate-common.c | 0
 trace-events                                 | 3 ---
 10 files changed, 12 insertions(+), 10 deletions(-)
 create mode 100644 tcg/Makefile.objs
 rename tcg-runtime.c => tcg/tcg-runtime.c (100%)
 rename tci.c => tcg/tci.c (100%)
 create mode 100644 tcg/trace-events
 rename translate-all.c => tcg/translate-all.c (99%)
 rename translate-all.h => tcg/translate-all.h (100%)
 rename translate-common.c => tcg/translate-common.c (100%)
Signature · 1 line
1.9.1
author
#1 lore raw

PATCH 1/6 move tcg relative files into tcg directory

move tcg-runtime.c to ./tcg directory

---
 Makefile.target                    | 2 +-
 tcg-runtime.c => tcg/tcg-runtime.c | 0
 2 files changed, 1 insertion(+), 1 deletion(-)
 rename tcg-runtime.c => tcg/tcg-runtime.c (100%)
Makefile.target +1 -1
index 465a633..c388fd6 100644
@@ -98,7 +98,7 @@ obj-$(CONFIG_TCG_INTERPRETER) += disas/tci.o
 obj-y += fpu/softfloat.o
 obj-y += target/$(TARGET_BASE_ARCH)/
 obj-y += disas.o
-obj-y += tcg-runtime.o
+obj-y += tcg/tcg-runtime.o
 obj-$(call notempty,$(TARGET_XML_FILES)) += gdbstub-xml.o
 obj-$(call lnot,$(CONFIG_HAX)) += hax-stub.o
 obj-$(call lnot,$(CONFIG_KVM)) += kvm-stub.o
tcg/tcg-runtime.c renamed from tcg-runtime.c +0 -0
similarity index 100%
rename from tcg-runtime.c
rename to tcg/tcg-runtime.c
Signature · 1 line
1.9.1
author
#2 lore raw

PATCH 2/6 move tcg relative files into tcg directory

In reply to Yang Zhong

move translate-all.c file into tcg directory and update trace-events file

---
 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%)
Makefile.objs +1 -0
index 2100845..1de6462 100644
@@ -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)
 
Makefile.target +2 -1
index c388fd6..c96ebd2 100644
@@ -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
tcg/trace-events new file +6 -0
new file mode 100644
index 0000000..989a06e
@@ -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"
+
tcg/translate-all.c renamed from translate-all.c +1 -1
similarity index 99%
rename from translate-all.c
rename to tcg/translate-all.c
index b3ee876..7b25a16 100644
@@ -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"
trace-events +0 -3
index e582d63..d89380e 100644
@@ -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"
Signature · 1 line
1.9.1
author
#3 lore raw

PATCH 3/6 move tcg header file

In reply to Yang Zhong

move translate-all.h to ./tcg

---
 translate-all.h => tcg/translate-all.h | 0
 1 file changed, 0 insertions(+), 0 deletions(-)
 rename translate-all.h => tcg/translate-all.h (100%)
tcg/translate-all.h renamed from translate-all.h +0 -0
similarity index 100%
rename from translate-all.h
rename to tcg/translate-all.h
Signature · 1 line
1.9.1
author
#4 lore raw

PATCH 4/6 move tcg relative files into tcg directory

In reply to Yang Zhong

move translate-common.c to ./tcg

---
 Makefile.target                              | 2 +-
 translate-common.c => tcg/translate-common.c | 0
 2 files changed, 1 insertion(+), 1 deletion(-)
 rename translate-common.c => tcg/translate-common.c (100%)
Makefile.target +1 -1
index c96ebd2..7ee6cb3 100644
@@ -90,7 +90,7 @@ all: $(PROGS) stap
 # cpu emulator library
 obj-y = exec.o cpu-exec.o
 obj-y += tcg/translate-all.o
-obj-y += translate-common.o
+obj-y += tcg/translate-common.o
 obj-y += cpu-exec-common.o
 obj-y += tcg/tcg.o tcg/tcg-op.o tcg/optimize.o
 obj-$(CONFIG_TCG_INTERPRETER) += tci.o
tcg/translate-common.c renamed from translate-common.c +0 -0
similarity index 100%
rename from translate-common.c
rename to tcg/translate-common.c
Signature · 1 line
1.9.1
author
#5 lore raw

PATCH 5/6 move tcg relative files into tcg directory

In reply to Yang Zhong

move tci.c to ./tcg

---
 Makefile.target    | 2 +-
 tci.c => tcg/tci.c | 0
 2 files changed, 1 insertion(+), 1 deletion(-)
 rename tci.c => tcg/tci.c (100%)
Makefile.target +1 -1
index 7ee6cb3..489a325 100644
@@ -93,7 +93,7 @@ obj-y += tcg/translate-all.o
 obj-y += tcg/translate-common.o
 obj-y += cpu-exec-common.o
 obj-y += tcg/tcg.o tcg/tcg-op.o tcg/optimize.o
-obj-$(CONFIG_TCG_INTERPRETER) += tci.o
+obj-$(CONFIG_TCG_INTERPRETER) += tcg/tci.o
 obj-y += tcg/tcg-common.o
 obj-$(CONFIG_TCG_INTERPRETER) += disas/tci.o
 obj-y += fpu/softfloat.o
tcg/tci.c renamed from tci.c +0 -0
similarity index 100%
rename from tci.c
rename to tcg/tci.c
Signature · 1 line
1.9.1
author
#6 lore raw

PATCH 6/6 change tcg relative file's compile definition

In reply to Yang Zhong

move tcg relative compile definitions form Makefile.target to tcg/Makefile.objs

---
 Makefile.target   | 7 +------
 tcg/Makefile.objs | 2 ++
 2 files changed, 3 insertions(+), 6 deletions(-)
 create mode 100644 tcg/Makefile.objs
Makefile.target +1 -6
index 489a325..c0272b4 100644
@@ -89,17 +89,12 @@ all: $(PROGS) stap
 #########################################################
 # cpu emulator library
 obj-y = exec.o cpu-exec.o
-obj-y += tcg/translate-all.o
-obj-y += tcg/translate-common.o
 obj-y += cpu-exec-common.o
-obj-y += tcg/tcg.o tcg/tcg-op.o tcg/optimize.o
-obj-$(CONFIG_TCG_INTERPRETER) += tcg/tci.o
-obj-y += tcg/tcg-common.o
+obj-y += tcg/
 obj-$(CONFIG_TCG_INTERPRETER) += disas/tci.o
 obj-y += fpu/softfloat.o
 obj-y += target/$(TARGET_BASE_ARCH)/
 obj-y += disas.o
-obj-y += tcg/tcg-runtime.o
 obj-$(call notempty,$(TARGET_XML_FILES)) += gdbstub-xml.o
 obj-$(call lnot,$(CONFIG_HAX)) += hax-stub.o
 obj-$(call lnot,$(CONFIG_KVM)) += kvm-stub.o
tcg/Makefile.objs new file +2 -0
new file mode 100644
index 0000000..f4dcc3b
@@ -0,0 +1,2 @@
+obj-y += translate-all.o translate-common.o tcg.o tcg-op.o optimize.o tcg-common.o tcg-runtime.o
+obj-$(CONFIG_TCG_INTERPRETER) += tci.o
Signature · 1 line
1.9.1
#7 lore raw
In reply to Yang Zhong
Quoted 2 lines · Yang Zhong

Move the tcg relative files into tcg directory, which will make the code more clean in qemu.

Titling a patch series v0 is a bit unusual (typically, the first version is untitled, and the second version is titled v2; 'git send-email -v2' can help). But since 0 is less than 1 or 2, I don't think it breaks any tools if you use that as your explicit title for a first submission, even if you have to respin.

Quoted 7 lines

Yang Zhong (6):
move tcg relative files into tcg directory
move tcg relative files into tcg directory
move tcg header file
move tcg relative files into tcg directory
move tcg relative files into tcg directory

None of your patches match the usual "topic: Short description" of other patches. Furthermore, having identical titles on 4 out of 6 distinct patches is a nightmare for downstream backporters (which "move tcg relative files into tcg directory" do I have to backport to fix the bug, again?). I highly suggest that every patch you submit have enough details in the subject line that the subject is distinct (we don't always succeed, but it's usually quite easy to avoid duplicates).

So, as an example, I might title a patch:

"tcg: Move tcg-runtime.c to tcg/ subdirectory"

Quoted 12 lines

change tcg relative file's compile definition

 Makefile.objs                                | 1 +
 Makefile.target                              | 8 ++------
 tcg/Makefile.objs                            | 2 ++
 tcg-runtime.c => tcg/tcg-runtime.c           | 0
 tci.c => tcg/tci.c                           | 0
 tcg/trace-events                             | 6 ++++++
 translate-all.c => tcg/translate-all.c       | 2 +-
 translate-all.h => tcg/translate-all.h       | 0
 translate-common.c => tcg/translate-common.c | 0
 trace-events                                 | 3 ---

Thankfully, you've got git rename detection turned on, which makes for much nicer reviews.

Quoted 9 lines
 10 files changed, 12 insertions(+), 10 deletions(-)
 create mode 100644 tcg/Makefile.objs
 rename tcg-runtime.c => tcg/tcg-runtime.c (100%)
 rename tci.c => tcg/tci.c (100%)
 create mode 100644 tcg/trace-events
 rename translate-all.c => tcg/translate-all.c (99%)
 rename translate-all.h => tcg/translate-all.h (100%)
 rename translate-common.c => tcg/translate-common.c (100%)
Signature · 3 lines
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org
author
#8 lore raw
Quoted 26 lines · Eric Blake
Quoted 2 lines · Yang Zhong

Move the tcg relative files into tcg directory, which will make the code more clean in qemu.

Titling a patch series v0 is a bit unusual (typically, the first version is untitled, and the second version is titled v2; 'git send-email -v2' can help). But since 0 is less than 1 or 2, I don't think it breaks any tools if you use that as your explicit title for a first submission, even if you have to respin.

Quoted 7 lines

Yang Zhong (6):
move tcg relative files into tcg directory
move tcg relative files into tcg directory
move tcg header file
move tcg relative files into tcg directory
move tcg relative files into tcg directory

None of your patches match the usual "topic: Short description" of other patches. Furthermore, having identical titles on 4 out of 6 distinct patches is a nightmare for downstream backporters (which "move tcg relative files into tcg directory" do I have to backport to fix the bug, again?). I highly suggest that every patch you submit have enough details in the subject line that the subject is distinct (we don't always succeed, but it's usually quite easy to avoid duplicates).

Quoted 4 lines

So, as an example, I might title a patch:

"tcg: Move tcg-runtime.c to tcg/ subdirectory"

Thanks for your comments, and i will send v2 patchset to commnunity accroding to your suggestions. Please also help review my tcg accelator patchset,many thanks!

Quoted 31 lines
Quoted 12 lines

change tcg relative file's compile definition

 Makefile.objs                                | 1 +
 Makefile.target                              | 8 ++------
 tcg/Makefile.objs                            | 2 ++
 tcg-runtime.c => tcg/tcg-runtime.c           | 0
 tci.c => tcg/tci.c                           | 0
 tcg/trace-events                             | 6 ++++++
 translate-all.c => tcg/translate-all.c       | 2 +-
 translate-all.h => tcg/translate-all.h       | 0
 translate-common.c => tcg/translate-common.c | 0
 trace-events                                 | 3 ---

Thankfully, you've got git rename detection turned on, which makes for much nicer reviews.

Quoted 9 lines
 10 files changed, 12 insertions(+), 10 deletions(-)
 create mode 100644 tcg/Makefile.objs
 rename tcg-runtime.c => tcg/tcg-runtime.c (100%)
 rename tci.c => tcg/tci.c (100%)
 create mode 100644 tcg/trace-events
 rename translate-all.c => tcg/translate-all.c (99%)
 rename translate-all.h => tcg/translate-all.h (100%)
 rename translate-common.c => tcg/translate-common.c (100%)
Signature · 3 lines
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org