Page MenuHomeFreeBSD

D26113.diff
No OneTemporary

D26113.diff

Index: head/lib/libpmc/libpmc.c
===================================================================
--- head/lib/libpmc/libpmc.c
+++ head/lib/libpmc/libpmc.c
@@ -149,6 +149,7 @@
PMC_CLASSDEP_TABLE(octeon, OCTEON);
PMC_CLASSDEP_TABLE(ppc7450, PPC7450);
PMC_CLASSDEP_TABLE(ppc970, PPC970);
+PMC_CLASSDEP_TABLE(power8, POWER8);
PMC_CLASSDEP_TABLE(e500, E500);
static struct pmc_event_descr soft_event_table[PMC_EV_DYN_COUNT];
@@ -204,6 +205,7 @@
PMC_MDEP_TABLE(octeon, OCTEON, PMC_CLASS_SOFT, PMC_CLASS_OCTEON);
PMC_MDEP_TABLE(ppc7450, PPC7450, PMC_CLASS_SOFT, PMC_CLASS_PPC7450, PMC_CLASS_TSC);
PMC_MDEP_TABLE(ppc970, PPC970, PMC_CLASS_SOFT, PMC_CLASS_PPC970, PMC_CLASS_TSC);
+PMC_MDEP_TABLE(power8, POWER8, PMC_CLASS_SOFT, PMC_CLASS_POWER8, PMC_CLASS_TSC);
PMC_MDEP_TABLE(e500, E500, PMC_CLASS_SOFT, PMC_CLASS_E500, PMC_CLASS_TSC);
PMC_MDEP_TABLE(generic, SOFT, PMC_CLASS_SOFT);
@@ -252,6 +254,7 @@
#if defined(__powerpc__)
PMC_CLASS_TABLE_DESC(ppc7450, PPC7450, ppc7450, powerpc);
PMC_CLASS_TABLE_DESC(ppc970, PPC970, ppc970, powerpc);
+PMC_CLASS_TABLE_DESC(power8, POWER8, power8, powerpc);
PMC_CLASS_TABLE_DESC(e500, E500, e500, powerpc);
#endif
@@ -913,6 +916,12 @@
EV_ALIAS(NULL, NULL)
};
+static struct pmc_event_alias power8_aliases[] = {
+ EV_ALIAS("instructions", "INSTR_COMPLETED"),
+ EV_ALIAS("cycles", "CYCLES"),
+ EV_ALIAS(NULL, NULL)
+};
+
static struct pmc_event_alias e500_aliases[] = {
EV_ALIAS("instructions", "INSTR_COMPLETED"),
EV_ALIAS("cycles", "CYCLES"),
@@ -1313,6 +1322,10 @@
ev = ppc970_event_table;
count = PMC_EVENT_TABLE_SIZE(ppc970);
break;
+ case PMC_CLASS_POWER8:
+ ev = power8_event_table;
+ count = PMC_EVENT_TABLE_SIZE(power8);
+ break;
case PMC_CLASS_E500:
ev = e500_event_table;
count = PMC_EVENT_TABLE_SIZE(e500);
@@ -1564,6 +1577,10 @@
PMC_MDEP_INIT(ppc970);
pmc_class_table[n] = &ppc970_class_table_descr;
break;
+ case PMC_CPU_PPC_POWER8:
+ PMC_MDEP_INIT(power8);
+ pmc_class_table[n] = &power8_class_table_descr;
+ break;
case PMC_CPU_PPC_E500:
PMC_MDEP_INIT(e500);
pmc_class_table[n] = &e500_class_table_descr;
@@ -1701,6 +1718,9 @@
} else if (pe >= PMC_EV_PPC970_FIRST && pe <= PMC_EV_PPC970_LAST) {
ev = ppc970_event_table;
evfence = ppc970_event_table + PMC_EVENT_TABLE_SIZE(ppc970);
+ } else if (pe >= PMC_EV_POWER8_FIRST && pe <= PMC_EV_POWER8_LAST) {
+ ev = power8_event_table;
+ evfence = power8_event_table + PMC_EVENT_TABLE_SIZE(power8);
} else if (pe >= PMC_EV_E500_FIRST && pe <= PMC_EV_E500_LAST) {
ev = e500_event_table;
evfence = e500_event_table + PMC_EVENT_TABLE_SIZE(e500);

File Metadata

Mime Type
text/plain
Expires
Sun, Jan 19, 7:04 PM (19 h, 13 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15955656
Default Alt Text
D26113.diff (2 KB)

Event Timeline