aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/linux/perf_counter.h1
-rw-r--r--kernel/perf_counter.c4
2 files changed, 4 insertions, 1 deletions
diff --git a/include/linux/perf_counter.h b/include/linux/perf_counter.h
index 1fa1a26cb1b..6e133954e2e 100644
--- a/include/linux/perf_counter.h
+++ b/include/linux/perf_counter.h
@@ -286,6 +286,7 @@ enum perf_event_type {
* struct {
* struct perf_event_header header;
* u64 time;
+ * u64 id;
* };
*/
PERF_EVENT_THROTTLE = 5,
diff --git a/kernel/perf_counter.c b/kernel/perf_counter.c
index 8859b97390e..ef5d8a5b245 100644
--- a/kernel/perf_counter.c
+++ b/kernel/perf_counter.c
@@ -2950,13 +2950,15 @@ static void perf_log_throttle(struct perf_counter *counter, int enable)
struct {
struct perf_event_header header;
u64 time;
+ u64 id;
} throttle_event = {
.header = {
.type = PERF_EVENT_THROTTLE + 1,
.misc = 0,
.size = sizeof(throttle_event),
},
- .time = sched_clock(),
+ .time = sched_clock(),
+ .id = counter->id,
};
ret = perf_output_begin(&handle, counter, sizeof(throttle_event), 1, 0);