From: Song Liu <song@kernel.org>
To: linux-kernel@vger.kernel.org
Cc: Song Liu <song@kernel.org>, Mark Rutland <mark.rutland@arm.com>,
Thomas Gleixner <tglx@linutronix.de>,
Rob Herring <robh@kernel.org>, Will Deacon <will@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Namhyung Kim <namhyung@kernel.org>
Subject: [PATCH] Revert "perf: Add a counter for number of user access events in context"
Date: Mon, 5 Aug 2024 16:10:31 -0700 [thread overview]
Message-ID: <20240805231031.1760371-1-song@kernel.org> (raw)
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
next reply other threads:[~2024-08-05 23:10 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-05 23:10 Song Liu [this message]
2024-08-06 11:41 ` [PATCH] Revert "perf: Add a counter for number of user access events in context" 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240805231031.1760371-1-song@kernel.org \
--to=song@kernel.org \
--cc=acme@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
--cc=robh@kernel.org \
--cc=tglx@linutronix.de \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox