Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F159194365
D30526.id90064.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
832 B
Referenced Files
None
Subscribers
None
D30526.id90064.diff
View Options
Index: usr.sbin/pmccontrol/pmccontrol.c
===================================================================
--- usr.sbin/pmccontrol/pmccontrol.c
+++ usr.sbin/pmccontrol/pmccontrol.c
@@ -282,14 +282,6 @@
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)
{
@@ -298,6 +290,13 @@
const char **eventnamelist;
const struct pmc_cpuinfo *ci;
+ /* First, try pmu events. */
+ if (pmc_pmu_enabled()) {
+ pmc_pmu_print_counters(NULL);
+ return (0);
+ }
+
+ /* Otherwise, use the legacy pmc(3) interfaces. */
if (pmc_cpuinfo(&ci) != 0)
err(EX_OSERR, "Unable to determine CPU information");
@@ -319,7 +318,6 @@
}
return 0;
}
-#endif
static int
pmcc_show_statistics(void)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Jun 12, 4:28 AM (10 h, 12 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33899496
Default Alt Text
D30526.id90064.diff (832 B)
Attached To
Mode
D30526: pmccontrol: improve -L with pmu-events
Attached
Detach File
Event Timeline
Log In to Comment