diff options
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/events/core.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/kernel/events/core.c b/kernel/events/core.c index 7f2fbb8b5069..8812d8e35f5b 100644 --- a/kernel/events/core.c +++ b/kernel/events/core.c @@ -8508,6 +8508,18 @@ void __init perf_event_init(void) != 1024); } +ssize_t perf_event_sysfs_show(struct device *dev, struct device_attribute *attr, + char *page) +{ + struct perf_pmu_events_attr *pmu_attr = + container_of(attr, struct perf_pmu_events_attr, attr); + + if (pmu_attr->event_str) + return sprintf(page, "%s\n", pmu_attr->event_str); + + return 0; +} + static int __init perf_event_sysfs_init(void) { struct pmu *pmu; |