mirror of
https://git.FreeBSD.org/src.git
synced 2024-10-19 02:29:40 +00:00
libpmc: fix the 'cycles' event alias on x86
Looking for "tsc-tsc" in the pmu tables will fail every time. Instead, make this an alias for the static TSC event defined in pmc_events.h. This fixes 'pmcstat -s cycles' on Intel and AMD. Reviewed by: emaste MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D32197
This commit is contained in:
parent
69ab528386
commit
937539e0a3
@ -178,7 +178,7 @@ static const struct pmc_event_descr cortex_a76_event_table[] =
|
||||
|
||||
static const struct pmc_event_descr tsc_event_table[] =
|
||||
{
|
||||
__PMC_EV_TSC()
|
||||
__PMC_EV_ALIAS_TSC()
|
||||
};
|
||||
|
||||
#undef PMC_CLASS_TABLE_DESC
|
||||
|
@ -74,7 +74,6 @@ static struct pmu_alias pmu_intel_alias_table[] = {
|
||||
{"BRANCH-INSTRUCTION-RETIRED", "BR_INST_RETIRED.ALL_BRANCHES"},
|
||||
{"BRANCH_MISSES_RETIRED", "BR_MISP_RETIRED.ALL_BRANCHES"},
|
||||
{"BRANCH-MISSES-RETIRED", "BR_MISP_RETIRED.ALL_BRANCHES"},
|
||||
{"cycles", "tsc-tsc"},
|
||||
{"unhalted-cycles", "CPU_CLK_UNHALTED.THREAD_P_ANY"},
|
||||
{"instructions", "inst_retired.any_p"},
|
||||
{"branch-mispredicts", "br_misp_retired.all_branches"},
|
||||
|
@ -54,6 +54,9 @@
|
||||
#define PMC_EV_TSC_FIRST PMC_EV_TSC_TSC
|
||||
#define PMC_EV_TSC_LAST PMC_EV_TSC_TSC
|
||||
|
||||
#define __PMC_EV_ALIAS_TSC() \
|
||||
__PMC_EV_ALIAS("cycles", TSC_TSC)
|
||||
|
||||
/*
|
||||
* Software events are dynamically defined.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user