Merge tag 'pull-loongarch-20241016' of https://gitlab.com/gaosong/qemu into staging
[qemu/armbru.git] / include / tcg / perf.h
blobc96b5920a3fdf6349bbecc4edc428dac7c07dc27
1 /*
2 * Linux perf perf-<pid>.map and jit-<pid>.dump integration.
4 * SPDX-License-Identifier: GPL-2.0-or-later
5 */
7 #ifndef TCG_PERF_H
8 #define TCG_PERF_H
10 #if defined(CONFIG_TCG) && defined(CONFIG_LINUX)
11 /* Start writing perf-<pid>.map. */
12 void perf_enable_perfmap(void);
14 /* Start writing jit-<pid>.dump. */
15 void perf_enable_jitdump(void);
17 /* Add information about TCG prologue to profiler maps. */
18 void perf_report_prologue(const void *start, size_t size);
20 /* Add information about JITted guest code to profiler maps. */
21 void perf_report_code(uint64_t guest_pc, TranslationBlock *tb,
22 const void *start);
24 /* Stop writing perf-<pid>.map and/or jit-<pid>.dump. */
25 void perf_exit(void);
26 #else
27 static inline void perf_enable_perfmap(void)
31 static inline void perf_enable_jitdump(void)
35 static inline void perf_report_prologue(const void *start, size_t size)
39 static inline void perf_report_code(uint64_t guest_pc, TranslationBlock *tb,
40 const void *start)
44 static inline void perf_exit(void)
47 #endif
49 #endif