mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-29 16:38:05 +08:00
sim: add helper macros for branch profiling
The profile code has a lot of helper macros already, but none yet for the branch profiling code. So add ones for the basic functions -- taken and untaken branches. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
2010-04-12 Mike Frysinger <vapier@gentoo.org>
|
||||||
|
|
||||||
|
* sim-profile.h (PROFILE_BRANCH_TAKEN, PROFILE_BRANCH_UNTAKEN): New
|
||||||
|
defines.
|
||||||
|
|
||||||
2010-04-12 Mike Frysinger <vapier@gentoo.org>
|
2010-04-12 Mike Frysinger <vapier@gentoo.org>
|
||||||
|
|
||||||
* dv-core.c (dv_core_descriptor): Add NULL initializer.
|
* dv-core.c (dv_core_descriptor): Add NULL initializer.
|
||||||
|
@ -290,6 +290,22 @@ do { \
|
|||||||
#define PROFILE_COUNT_CORE(cpu, addr, size, map)
|
#define PROFILE_COUNT_CORE(cpu, addr, size, map)
|
||||||
#endif /* ! core */
|
#endif /* ! core */
|
||||||
|
|
||||||
|
#if WITH_PROFILE_MODEL_P
|
||||||
|
#define PROFILE_BRANCH_TAKEN(cpu) \
|
||||||
|
do { \
|
||||||
|
if (PROFILE_MODEL_P (cpu)) \
|
||||||
|
++ PROFILE_MODEL_TAKEN_COUNT (CPU_PROFILE_DATA (cpu)); \
|
||||||
|
} while (0)
|
||||||
|
#define PROFILE_BRANCH_UNTAKEN(cpu) \
|
||||||
|
do { \
|
||||||
|
if (PROFILE_MODEL_P (cpu)) \
|
||||||
|
++ PROFILE_MODEL_UNTAKEN_COUNT (CPU_PROFILE_DATA (cpu)); \
|
||||||
|
} while (0)
|
||||||
|
#else
|
||||||
|
#define PROFILE_BRANCH_TAKEN(cpu)
|
||||||
|
#define PROFILE_BRANCH_UNTAKEN(cpu)
|
||||||
|
#endif /* ! model */
|
||||||
|
|
||||||
/* Misc. utilities. */
|
/* Misc. utilities. */
|
||||||
|
|
||||||
extern void sim_profile_print_bar (SIM_DESC, unsigned int, unsigned int, unsigned int);
|
extern void sim_profile_print_bar (SIM_DESC, unsigned int, unsigned int, unsigned int);
|
||||||
|
Reference in New Issue
Block a user