diff options
author | Peter Zijlstra <a.p.zijlstra@chello.nl> | 2009-06-11 08:57:55 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-06-11 11:54:45 -0400 |
commit | cca3f454a85ff42d426401bce7ac804541b2bd03 (patch) | |
tree | 743b60d71cd4babb65619556db4101595a5fc18b /kernel | |
parent | a308444ceb576d3089f9ca0dfd097eba6f1e623f (diff) |
perf_counter: Add counter->id to the throttle event
So as to be able to distuinguish between multiple counters.
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/perf_counter.c | 4 |
1 files changed, 3 insertions, 1 deletions
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); |