1 /* 2 * Linux perf perf-<pid>.map and jit-<pid>.dump integration. 3 * 4 * SPDX-License-Identifier: GPL-2.0-or-later 5 */ 6 7 #ifndef TCG_PERF_H 8 #define TCG_PERF_H 9 10 #if defined(CONFIG_TCG) && defined(CONFIG_LINUX) 11 /* Start writing perf-<pid>.map. */ 12 void perf_enable_perfmap(void); 13 14 /* Start writing jit-<pid>.dump. */ 15 void perf_enable_jitdump(void); 16 17 /* Add information about TCG prologue to profiler maps. */ 18 void perf_report_prologue(const void *start, size_t size); 19 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); 23 24 /* Stop writing perf-<pid>.map and/or jit-<pid>.dump. */ 25 void perf_exit(void); 26 #else perf_enable_perfmap(void)27static inline void perf_enable_perfmap(void) 28 { 29 } 30 perf_enable_jitdump(void)31static inline void perf_enable_jitdump(void) 32 { 33 } 34 perf_report_prologue(const void * start,size_t size)35static inline void perf_report_prologue(const void *start, size_t size) 36 { 37 } 38 perf_report_code(uint64_t guest_pc,TranslationBlock * tb,const void * start)39static inline void perf_report_code(uint64_t guest_pc, TranslationBlock *tb, 40 const void *start) 41 { 42 } 43 perf_exit(void)44static inline void perf_exit(void) 45 { 46 } 47 #endif 48 49 #endif 50