diff options
-rw-r--r-- | Documentation/arm/CCN.txt | 2 | ||||
-rw-r--r-- | drivers/bus/arm-ccn.c | 17 |
2 files changed, 18 insertions, 1 deletions
diff --git a/Documentation/arm/CCN.txt b/Documentation/arm/CCN.txt index 3a7604874762..ffca443a19b4 100644 --- a/Documentation/arm/CCN.txt +++ b/Documentation/arm/CCN.txt | |||
@@ -45,7 +45,7 @@ Example of perf tool use: | |||
45 | / # perf list | grep ccn | 45 | / # perf list | grep ccn |
46 | ccn/cycles/ [Kernel PMU event] | 46 | ccn/cycles/ [Kernel PMU event] |
47 | <...> | 47 | <...> |
48 | ccn/xp_valid_flit/ [Kernel PMU event] | 48 | ccn/xp_valid_flit,xp=?,port=?,vc=?,dir=?/ [Kernel PMU event] |
49 | <...> | 49 | <...> |
50 | 50 | ||
51 | / # perf stat -a -e ccn/cycles/,ccn/xp_valid_flit,xp=1,port=0,vc=1,dir=1/ \ | 51 | / # perf stat -a -e ccn/cycles/,ccn/xp_valid_flit,xp=1,port=0,vc=1,dir=1/ \ |
diff --git a/drivers/bus/arm-ccn.c b/drivers/bus/arm-ccn.c index 3374dcb12f1e..572360f1f493 100644 --- a/drivers/bus/arm-ccn.c +++ b/drivers/bus/arm-ccn.c | |||
@@ -340,6 +340,23 @@ static ssize_t arm_ccn_pmu_event_show(struct device *dev, | |||
340 | if (event->mask) | 340 | if (event->mask) |
341 | res += snprintf(buf + res, PAGE_SIZE - res, ",mask=0x%x", | 341 | res += snprintf(buf + res, PAGE_SIZE - res, ",mask=0x%x", |
342 | event->mask); | 342 | event->mask); |
343 | |||
344 | /* Arguments required by an event */ | ||
345 | switch (event->type) { | ||
346 | case CCN_TYPE_CYCLES: | ||
347 | break; | ||
348 | case CCN_TYPE_XP: | ||
349 | res += snprintf(buf + res, PAGE_SIZE - res, | ||
350 | ",xp=?,port=?,vc=?,dir=?"); | ||
351 | if (event->event == CCN_EVENT_WATCHPOINT) | ||
352 | res += snprintf(buf + res, PAGE_SIZE - res, | ||
353 | ",cmp_l=?,cmp_h=?,mask=?"); | ||
354 | break; | ||
355 | default: | ||
356 | res += snprintf(buf + res, PAGE_SIZE - res, ",node=?"); | ||
357 | break; | ||
358 | } | ||
359 | |||
343 | res += snprintf(buf + res, PAGE_SIZE - res, "\n"); | 360 | res += snprintf(buf + res, PAGE_SIZE - res, "\n"); |
344 | 361 | ||
345 | return res; | 362 | return res; |