]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
accel/tcg: Move perf and debuginfo support to tcg/
authorIlya Leoshkevich <iii@linux.ibm.com>
Thu, 25 Jan 2024 05:46:30 +0000 (06:46 +0100)
committerRichard Henderson <richard.henderson@linaro.org>
Mon, 29 Jan 2024 11:04:10 +0000 (21:04 +1000)
tcg/ should not depend on accel/tcg/, but perf and debuginfo
support provided by the latter are being used by tcg/tcg.c.

Since that's the only user, move both to tcg/.

Suggested-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-ID: <20231212003837.64090-5-iii@linux.ibm.com>
Message-Id: <20240125054631.78867-5-philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
13 files changed:
accel/tcg/meson.build
accel/tcg/translate-all.c
hw/core/loader.c
include/tcg/debuginfo.h [moved from accel/tcg/debuginfo.h with 96% similarity]
include/tcg/perf.h [moved from accel/tcg/perf.h with 95% similarity]
linux-user/elfload.c
linux-user/exit.c
linux-user/main.c
system/vl.c
tcg/debuginfo.c [moved from accel/tcg/debuginfo.c with 98% similarity]
tcg/meson.build
tcg/perf.c [moved from accel/tcg/perf.c with 99% similarity]
tcg/tcg.c

index c15ac9ac8fb843d6267031e544e121e4a5cfca17..46f7d53eeb7e8d2dd31de47e54e1901d7cfbafb3 100644 (file)
@@ -16,10 +16,6 @@ tcg_ss.add(when: 'CONFIG_SYSTEM_ONLY', if_false: files('user-exec-stub.c'))
 if get_option('plugins')
   tcg_ss.add(files('plugin-gen.c'))
 endif
-tcg_ss.add(when: libdw, if_true: files('debuginfo.c'))
-if host_os == 'linux'
-  tcg_ss.add(files('perf.c'))
-endif
 specific_ss.add_all(when: 'CONFIG_TCG', if_true: tcg_ss)
 
 specific_ss.add(when: ['CONFIG_SYSTEM_ONLY', 'CONFIG_TCG'], if_true: files(
index 1737bb3da5831a9ed9e6b05cef4021d4dd64ff8a..1c695efe021c0064c345590352714c486af317c2 100644 (file)
@@ -63,7 +63,7 @@
 #include "tb-context.h"
 #include "internal-common.h"
 #include "internal-target.h"
-#include "perf.h"
+#include "tcg/perf.h"
 #include "tcg/insn-start-words.h"
 
 TBContext tb_ctx;
index e7a9b3775bbc9f7cca0c438c7653f28309a64853..b8e52f3fb0fd31a501fb6cded56667deb66e211e 100644 (file)
@@ -62,7 +62,7 @@
 #include "hw/boards.h"
 #include "qemu/cutils.h"
 #include "sysemu/runstate.h"
-#include "accel/tcg/debuginfo.h"
+#include "tcg/debuginfo.h"
 
 #include <zlib.h>
 
similarity index 96%
rename from accel/tcg/debuginfo.h
rename to include/tcg/debuginfo.h
index f064e1c144b88d66d9d1f546d9e42e30c01d499d..858535b5da5a2ccdfa43a4cbbf07aa1b6ac785ab 100644 (file)
@@ -4,8 +4,8 @@
  * SPDX-License-Identifier: GPL-2.0-or-later
  */
 
-#ifndef ACCEL_TCG_DEBUGINFO_H
-#define ACCEL_TCG_DEBUGINFO_H
+#ifndef TCG_DEBUGINFO_H
+#define TCG_DEBUGINFO_H
 
 #include "qemu/bitops.h"
 
similarity index 95%
rename from accel/tcg/perf.h
rename to include/tcg/perf.h
index f92dd52c6994e2b23fc25f6ab2b6d9a91e607593..c96b5920a3fdf6349bbecc4edc428dac7c07dc27 100644 (file)
@@ -4,8 +4,8 @@
  * SPDX-License-Identifier: GPL-2.0-or-later
  */
 
-#ifndef ACCEL_TCG_PERF_H
-#define ACCEL_TCG_PERF_H
+#ifndef TCG_PERF_H
+#define TCG_PERF_H
 
 #if defined(CONFIG_TCG) && defined(CONFIG_LINUX)
 /* Start writing perf-<pid>.map. */
index daf7ef843564b811617f10ef068084d53b1b9ad4..b8eef893d0c77fa4acf23b971f132ec112c6dd2c 100644 (file)
@@ -22,7 +22,7 @@
 #include "qapi/error.h"
 #include "qemu/error-report.h"
 #include "target_signal.h"
-#include "accel/tcg/debuginfo.h"
+#include "tcg/debuginfo.h"
 
 #ifdef TARGET_ARM
 #include "target/arm/cpu-features.h"
index 50266314e0a9ab3618567f24cd7d069a052f5d01..1ff8fe4f072fcc902d1a202bfc24c516a588b059 100644 (file)
@@ -17,7 +17,7 @@
  *  along with this program; if not, see <http://www.gnu.org/licenses/>.
  */
 #include "qemu/osdep.h"
-#include "accel/tcg/perf.h"
+#include "tcg/perf.h"
 #include "gdbstub/syscalls.h"
 #include "qemu.h"
 #include "user-internals.h"
index c9470eeccfc55c452d361f8df3bc3331f7723ea5..74b2fbb39386b3ab96fa8e00236f25b42725a9dd 100644 (file)
@@ -54,7 +54,7 @@
 #include "signal-common.h"
 #include "loader.h"
 #include "user-mmap.h"
-#include "accel/tcg/perf.h"
+#include "tcg/perf.h"
 
 #ifdef CONFIG_SEMIHOSTING
 #include "semihosting/semihost.h"
index 788d88ea03a758c906b55d5b8f4ad0c57febdfe0..60fd1e56b6b854ab1f2b142607d52602adb30aee 100644 (file)
@@ -96,7 +96,7 @@
 #endif
 #include "sysemu/qtest.h"
 #ifdef CONFIG_TCG
-#include "accel/tcg/perf.h"
+#include "tcg/perf.h"
 #endif
 
 #include "disas/disas.h"
similarity index 98%
rename from accel/tcg/debuginfo.c
rename to tcg/debuginfo.c
index 71c66d04d1217bf76cc6b066353f59d642b204ce..3753f7ef67ce17265e5212f9c04e25d6b4932a86 100644 (file)
@@ -6,11 +6,10 @@
 
 #include "qemu/osdep.h"
 #include "qemu/lockable.h"
+#include "tcg/debuginfo.h"
 
 #include <elfutils/libdwfl.h>
 
-#include "debuginfo.h"
-
 static QemuMutex lock;
 static Dwfl *dwfl;
 static const Dwfl_Callbacks dwfl_callbacks = {
index 5afdec1e1ae171e235d1af29001b9ddadf2a21b8..8251589fd4e9e9b8987e2165dfa691854c0d2137 100644 (file)
@@ -22,6 +22,11 @@ if get_option('tcg_interpreter')
   tcg_ss.add(files('tci.c'))
 endif
 
+tcg_ss.add(when: libdw, if_true: files('debuginfo.c'))
+if host_os == 'linux'
+  tcg_ss.add(files('perf.c'))
+endif
+
 tcg_ss = tcg_ss.apply({})
 
 libtcg_user = static_library('tcg_user',
similarity index 99%
rename from accel/tcg/perf.c
rename to tcg/perf.c
index 68a46b1b5241f3b50e232d3e6b4396fda8e7be24..412a987d9561bfa21f8e961bd9d28d6d564fd5e8 100644 (file)
 #include "qemu/osdep.h"
 #include "elf.h"
 #include "exec/target_page.h"
-#include "exec/exec-all.h"
+#include "exec/translation-block.h"
 #include "qemu/timer.h"
+#include "tcg/debuginfo.h"
+#include "tcg/perf.h"
 #include "tcg/tcg.h"
 
-#include "debuginfo.h"
-#include "perf.h"
-
 static FILE *safe_fopen_w(const char *path)
 {
     int saved_errno;
index e2c38f6d11c668d7387895c41693397b7ddd19c5..eeff4c1d519c986f051b76429a58cb82bb8b8bad 100644 (file)
--- a/tcg/tcg.c
+++ b/tcg/tcg.c
@@ -55,7 +55,7 @@
 #include "tcg/tcg-ldst.h"
 #include "tcg/tcg-temp-internal.h"
 #include "tcg-internal.h"
-#include "accel/tcg/perf.h"
+#include "tcg/perf.h"
 #ifdef CONFIG_USER_ONLY
 #include "exec/user/guest-base.h"
 #endif