public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Revert "perf: Add a counter for number of user access events in context"
@ 2024-08-05 23:10 Song Liu
  2024-08-06 11:41 ` Peter Zijlstra
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Song Liu @ 2024-08-05 23:10 UTC (permalink / raw)
  To: linux-kernel
  Cc: Song Liu, Mark Rutland, Thomas Gleixner, Rob Herring, Will Deacon,
	Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
	Namhyung Kim

This reverts commit 82ff0c022d19c2ad69a472692bb7ee01ac07a40b.

perf_event->nr_user is not used any more. Remove it.

Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Rob Herring <robh@kernel.org>
Cc: Will Deacon <will@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Song Liu <song@kernel.org>
---
 include/linux/perf_event.h | 1 -
 kernel/events/core.c       | 4 ----
 2 files changed, 5 deletions(-)

diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h
index 1a8942277dda..509ae4770bbe 100644
--- a/include/linux/perf_event.h
+++ b/include/linux/perf_event.h
@@ -931,7 +931,6 @@ struct perf_event_context {
 	struct list_head		event_list;
 
 	int				nr_events;
-	int				nr_user;
 	int				is_active;
 
 	int				nr_task_data;
diff --git a/kernel/events/core.c b/kernel/events/core.c
index aa3450bdc227..6f44755ae907 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -1793,8 +1793,6 @@ list_add_event(struct perf_event *event, struct perf_event_context *ctx)
 
 	list_add_rcu(&event->event_entry, &ctx->event_list);
 	ctx->nr_events++;
-	if (event->hw.flags & PERF_EVENT_FLAG_USER_READ_CNT)
-		ctx->nr_user++;
 	if (event->attr.inherit_stat)
 		ctx->nr_stat++;
 
@@ -2017,8 +2015,6 @@ list_del_event(struct perf_event *event, struct perf_event_context *ctx)
 	event->attach_state &= ~PERF_ATTACH_CONTEXT;
 
 	ctx->nr_events--;
-	if (event->hw.flags & PERF_EVENT_FLAG_USER_READ_CNT)
-		ctx->nr_user--;
 	if (event->attr.inherit_stat)
 		ctx->nr_stat--;
 
-- 
2.43.5


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-08-06 15:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-05 23:10 [PATCH] Revert "perf: Add a counter for number of user access events in context" Song Liu
2024-08-06 11:41 ` Peter Zijlstra
2024-08-06 13:28 ` kernel test robot
2024-08-06 13:37 ` Rob Herring
2024-08-06 15:50   ` Song Liu
2024-08-06 15:15 ` kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox