diff options
-rw-r--r-- | include/linux/perf_counter.h | 1 | ||||
-rw-r--r-- | kernel/perf_counter.c | 4 |
2 files changed, 4 insertions, 1 deletions
diff --git a/include/linux/perf_counter.h b/include/linux/perf_counter.h index 1fa1a26cb1b3..6e133954e2e4 100644 --- a/include/linux/perf_counter.h +++ b/include/linux/perf_counter.h | |||
@@ -286,6 +286,7 @@ enum perf_event_type { | |||
286 | * struct { | 286 | * struct { |
287 | * struct perf_event_header header; | 287 | * struct perf_event_header header; |
288 | * u64 time; | 288 | * u64 time; |
289 | * u64 id; | ||
289 | * }; | 290 | * }; |
290 | */ | 291 | */ |
291 | PERF_EVENT_THROTTLE = 5, | 292 | PERF_EVENT_THROTTLE = 5, |
diff --git a/kernel/perf_counter.c b/kernel/perf_counter.c index 8859b97390ec..ef5d8a5b2453 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) | |||
2950 | struct { | 2950 | struct { |
2951 | struct perf_event_header header; | 2951 | struct perf_event_header header; |
2952 | u64 time; | 2952 | u64 time; |
2953 | u64 id; | ||
2953 | } throttle_event = { | 2954 | } throttle_event = { |
2954 | .header = { | 2955 | .header = { |
2955 | .type = PERF_EVENT_THROTTLE + 1, | 2956 | .type = PERF_EVENT_THROTTLE + 1, |
2956 | .misc = 0, | 2957 | .misc = 0, |
2957 | .size = sizeof(throttle_event), | 2958 | .size = sizeof(throttle_event), |
2958 | }, | 2959 | }, |
2959 | .time = sched_clock(), | 2960 | .time = sched_clock(), |
2961 | .id = counter->id, | ||
2960 | }; | 2962 | }; |
2961 | 2963 | ||
2962 | ret = perf_output_begin(&handle, counter, sizeof(throttle_event), 1, 0); | 2964 | ret = perf_output_begin(&handle, counter, sizeof(throttle_event), 1, 0); |