Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cca3f454 authored by Peter Zijlstra's avatar Peter Zijlstra Committed by Ingo Molnar
Browse files

perf_counter: Add counter->id to the throttle event



So as to be able to distuinguish between multiple counters.

Signed-off-by: default avatarPeter 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: default avatarIngo Molnar <mingo@elte.hu>
parent a308444c
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -286,6 +286,7 @@ enum perf_event_type {
	 * struct {
	 *	struct perf_event_header	header;
	 *	u64				time;
	 *	u64				id;
	 * };
	 */
	PERF_EVENT_THROTTLE		= 5,
+3 −1
Original line number Diff line number Diff line
@@ -2950,6 +2950,7 @@ 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,
@@ -2957,6 +2958,7 @@ static void perf_log_throttle(struct perf_counter *counter, int enable)
			.size = sizeof(throttle_event),
		},
		.time	= sched_clock(),
		.id	= counter->id,
	};

	ret = perf_output_begin(&handle, counter, sizeof(throttle_event), 1, 0);