From 7362ac9ca95598c2715ea3fe8f25231cf3ce104f Mon Sep 17 00:00:00 2001 From: Matt Macy Date: Mon, 24 Sep 2018 19:06:09 +0000 Subject: [PATCH] restore pmccontrol -L behavior on x86 When I updated counter definition handling for x86 I broke 'pmccontrol -L' listing counter names. This just changes pmccontrol to call the library function on x86. PR: 230984 Approved by: re (kib@) --- usr.sbin/pmccontrol/pmccontrol.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/usr.sbin/pmccontrol/pmccontrol.c b/usr.sbin/pmccontrol/pmccontrol.c index b80db1f348b..147aab2d2ba 100644 --- a/usr.sbin/pmccontrol/pmccontrol.c +++ b/usr.sbin/pmccontrol/pmccontrol.c @@ -282,6 +282,14 @@ pmcc_do_list_state(void) return 0; } +#if defined(__i386__) || defined(__amd64__) +static int +pmcc_do_list_events(void) +{ + pmc_pmu_print_counters(NULL); + return (0); +} +#else static int pmcc_do_list_events(void) { @@ -311,6 +319,7 @@ pmcc_do_list_events(void) } return 0; } +#endif static int pmcc_show_statistics(void)