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:
parent
21cf617c69
commit
58f03a4028
|
@ -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>
|
||||
|
||||
* dv-core.c (dv_core_descriptor): Add NULL initializer.
|
||||
|
|
|
@ -290,6 +290,22 @@ do { \
|
|||
#define PROFILE_COUNT_CORE(cpu, addr, size, map)
|
||||
#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. */
|
||||
|
||||
extern void sim_profile_print_bar (SIM_DESC, unsigned int, unsigned int, unsigned int);
|
||||
|
|
Loading…
Reference in New Issue