diff options
Diffstat (limited to 'kernel/events/core.c')
-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 20cece0a7aea..af924bc38121 100644 --- a/kernel/events/core.c +++ b/kernel/events/core.c @@ -8539,6 +8539,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; |