diff options
author | Ingo Molnar <mingo@kernel.org> | 2015-02-26 06:24:50 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2015-02-26 06:24:50 -0500 |
commit | e9e4e44309f866b115d08ab4a54834008c50a8a4 (patch) | |
tree | ae9f91e682a4d6592ef263f30a4a0b1a862b7987 /include/linux/perf_event.h | |
parent | 8a26ce4e544659256349551283414df504889a59 (diff) | |
parent | c517d838eb7d07bbe9507871fab3931deccff539 (diff) |
Merge tag 'v4.0-rc1' into perf/core, to refresh the tree
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'include/linux/perf_event.h')
-rw-r--r-- | include/linux/perf_event.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index 724d3720c9b1..a503100388cc 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h | |||
@@ -928,12 +928,22 @@ struct perf_pmu_events_attr { | |||
928 | const char *event_str; | 928 | const char *event_str; |
929 | }; | 929 | }; |
930 | 930 | ||
931 | ssize_t perf_event_sysfs_show(struct device *dev, struct device_attribute *attr, | ||
932 | char *page); | ||
933 | |||
931 | #define PMU_EVENT_ATTR(_name, _var, _id, _show) \ | 934 | #define PMU_EVENT_ATTR(_name, _var, _id, _show) \ |
932 | static struct perf_pmu_events_attr _var = { \ | 935 | static struct perf_pmu_events_attr _var = { \ |
933 | .attr = __ATTR(_name, 0444, _show, NULL), \ | 936 | .attr = __ATTR(_name, 0444, _show, NULL), \ |
934 | .id = _id, \ | 937 | .id = _id, \ |
935 | }; | 938 | }; |
936 | 939 | ||
940 | #define PMU_EVENT_ATTR_STRING(_name, _var, _str) \ | ||
941 | static struct perf_pmu_events_attr _var = { \ | ||
942 | .attr = __ATTR(_name, 0444, perf_event_sysfs_show, NULL), \ | ||
943 | .id = 0, \ | ||
944 | .event_str = _str, \ | ||
945 | }; | ||
946 | |||
937 | #define PMU_FORMAT_ATTR(_name, _format) \ | 947 | #define PMU_FORMAT_ATTR(_name, _format) \ |
938 | static ssize_t \ | 948 | static ssize_t \ |
939 | _name##_show(struct device *dev, \ | 949 | _name##_show(struct device *dev, \ |