[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <dc9f6cc9-e6b6-46eb-a239-3ad2b80196e7@linux.ibm.com>
Date: Fri, 13 Sep 2024 10:16:01 +0530
From: Madhavan Srinivasan <maddy@...ux.ibm.com>
To: Namhyung Kim <namhyung@...nel.org>, Peter Zijlstra
<peterz@...radead.org>,
Ingo Molnar <mingo@...nel.org>
Cc: Kan Liang <kan.liang@...ux.intel.com>,
Mark Rutland
<mark.rutland@....com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Arnaldo Carvalho de Melo <acme@...nel.org>,
LKML <linux-kernel@...r.kernel.org>,
Stephane Eranian <eranian@...gle.com>,
Ravi Bangoria <ravi.bangoria@....com>,
Michael Ellerman
<mpe@...erman.id.au>,
Nicholas Piggin <npiggin@...il.com>,
Christophe Leroy <christophe.leroy@...roup.eu>,
Naveen N Rao <naveen@...nel.org>, Kajol Jain <kjain@...ux.ibm.com>,
Athira Rajeev <atrajeev@...ux.vnet.ibm.com>,
linuxppc-dev@...ts.ozlabs.org
Subject: Re: [PATCH 4/5] perf/powerpc: Count dropped samples in core-book3s
PMU
On 9/5/24 8:40 AM, Namhyung Kim wrote:
> Due to the hardware limitation, sometimes it could sample kernel address
> while attr.exclude_kernel is set. In that case it silently drops the
> sample. Let's count that case in the new dropped_samples counter.
Nice catch. Thanks for the fix.
Reviewed-by: Madhavan Srinivasan <maddy@...ux.ibm.com>
> Cc: Michael Ellerman <mpe@...erman.id.au>
> Cc: Nicholas Piggin <npiggin@...il.com>
> Cc: Christophe Leroy <christophe.leroy@...roup.eu>
> Cc: Naveen N Rao <naveen@...nel.org>
> Cc: Kajol Jain <kjain@...ux.ibm.com>
> Cc: Athira Rajeev <atrajeev@...ux.vnet.ibm.com>
> Cc: linuxppc-dev@...ts.ozlabs.org
> Signed-off-by: Namhyung Kim <namhyung@...nel.org>
> ---
> arch/powerpc/perf/core-book3s.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/arch/powerpc/perf/core-book3s.c b/arch/powerpc/perf/core-book3s.c
> index 42867469752d73cf..553e288b9f113836 100644
> --- a/arch/powerpc/perf/core-book3s.c
> +++ b/arch/powerpc/perf/core-book3s.c
> @@ -2287,8 +2287,10 @@ static void record_and_restart(struct perf_event *event, unsigned long val,
> */
> if (event->attr.exclude_kernel &&
> (event->attr.sample_type & PERF_SAMPLE_IP) &&
> - is_kernel_addr(mfspr(SPRN_SIAR)))
> + is_kernel_addr(mfspr(SPRN_SIAR))) {
> + atomic64_inc(&event->dropped_samples);
> record = 0;
> + }
>
> /*
> * Finally record data if requested.
Powered by blists - more mailing lists