mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 03:36:19 +00:00
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>
This commit is contained in:
parent
a308444ceb
commit
cca3f454a8
2 changed files with 4 additions and 1 deletions
|
@ -286,6 +286,7 @@ enum perf_event_type {
|
||||||
* struct {
|
* struct {
|
||||||
* struct perf_event_header header;
|
* struct perf_event_header header;
|
||||||
* u64 time;
|
* u64 time;
|
||||||
|
* u64 id;
|
||||||
* };
|
* };
|
||||||
*/
|
*/
|
||||||
PERF_EVENT_THROTTLE = 5,
|
PERF_EVENT_THROTTLE = 5,
|
||||||
|
|
|
@ -2950,13 +2950,15 @@ static void perf_log_throttle(struct perf_counter *counter, int enable)
|
||||||
struct {
|
struct {
|
||||||
struct perf_event_header header;
|
struct perf_event_header header;
|
||||||
u64 time;
|
u64 time;
|
||||||
|
u64 id;
|
||||||
} throttle_event = {
|
} throttle_event = {
|
||||||
.header = {
|
.header = {
|
||||||
.type = PERF_EVENT_THROTTLE + 1,
|
.type = PERF_EVENT_THROTTLE + 1,
|
||||||
.misc = 0,
|
.misc = 0,
|
||||||
.size = sizeof(throttle_event),
|
.size = sizeof(throttle_event),
|
||||||
},
|
},
|
||||||
.time = sched_clock(),
|
.time = sched_clock(),
|
||||||
|
.id = counter->id,
|
||||||
};
|
};
|
||||||
|
|
||||||
ret = perf_output_begin(&handle, counter, sizeof(throttle_event), 1, 0);
|
ret = perf_output_begin(&handle, counter, sizeof(throttle_event), 1, 0);
|
||||||
|
|
Loading…
Reference in a new issue