linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: kajoljain <kjain@linux.ibm.com>
Cc: Ian Rogers <irogers@google.com>,
	namhyung@kernel.org, linux-kernel@vger.kernel.org,
	linux-perf-users@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
	akanksha@linux.ibm.com, maddy@linux.ibm.com,
	atrajeev@linux.vnet.ibm.com, hbathini@linux.ibm.com,
	disgoel@linux.vnet.ibm.com
Subject: Re: [PATCH] perf vendor events power10: Update JSON/events
Date: Thu, 1 Aug 2024 11:56:01 -0300	[thread overview]
Message-ID: <ZquiAS74kQQ-TCtv@x1> (raw)
In-Reply-To: <ac3ce4aa-146b-4be9-9edc-1533d0b7dc98@linux.ibm.com>

On Thu, Aug 01, 2024 at 01:03:44PM +0530, kajoljain wrote:
> 
> 
> On 8/1/24 01:44, Arnaldo Carvalho de Melo wrote:
> > On Wed, Jul 31, 2024 at 04:44:49PM -0300, Arnaldo Carvalho de Melo wrote:
> >> On Fri, Jul 26, 2024 at 11:08:55AM -0300, Arnaldo Carvalho de Melo wrote:
> >>> On Tue, Jul 23, 2024 at 09:02:23AM -0700, Ian Rogers wrote:
> >>>> On Mon, Jul 22, 2024 at 10:27 PM Kajol Jain <kjain@linux.ibm.com> wrote:
> >>>>>
> >>>>> Update JSON/events for power10 platform with additional events.
> >>>>> Also move PM_VECTOR_LD_CMPL event from others.json to
> >>>>> frontend.json file.
> >>>>>
> >>>>> Signed-off-by: Kajol Jain <kjain@linux.ibm.com>
> >>>>
> >>>> Reviewed-by: Ian Rogers <irogers@google.com>
> >>>
> >>> Thanks, applied to tmp.perf-tools-next,
> >>
> >> This seems to be causing this:
> >>
> >> Exception processing pmu-events/arch/powerpc/power10/others.json
> >> Traceback (most recent call last):
> >>   File "pmu-events/jevents.py", line 1309, in <module>
> >>     main()
> >>   File "pmu-events/jevents.py", line 1291, in main
> >>     ftw(arch_path, [], preprocess_one_file)
> >>   File "pmu-events/jevents.py", line 1241, in ftw
> >>     ftw(item.path, parents + [item.name], action)
> >>   File "pmu-events/jevents.py", line 1239, in ftw
> >>     action(parents, item)
> >>   File "pmu-events/jevents.py", line 623, in preprocess_one_file
> >>     for event in read_json_events(item.path, topic):
> >>   File "pmu-events/jevents.py", line 440, in read_json_events
> >>     events = json.load(open(path), object_hook=JsonEvent)
> >>   File "/usr/lib/python3.6/json/__init__.py", line 296, in load
> >>   CC      /tmp/build/perf/bench/evlist-open-close.o
> >>     return loads(fp.read(),
> >>   File "/usr/lib/python3.6/encodings/ascii.py", line 26, in decode
> >>     return codecs.ascii_decode(input, self.errors)[0]
> >> UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 9231: ordinal not in range(128)
> >> pmu-events/Build:35: recipe for target '/tmp/build/perf/pmu-events/pmu-events.c' failed
> >> make[3]: *** [/tmp/build/perf/pmu-events/pmu-events.c] Error 1
> >> make[3]: *** Deleting file '/tmp/build/perf/pmu-events/pmu-events.c'
> >> Makefile.perf:763: recipe for target '/tmp/build/perf/pmu-events/pmu-events-in.o' failed
> >> make[2]: *** [/tmp/build/perf/pmu-events/pmu-events-in.o] Error 2
> >> make[2]: *** Waiting for unfinished jobs....
> >>   CC      /tmp/build/perf/tests/hists_cumulate.o
> >>   CC      /tmp/build/perf/arch/powerpc/util/event.o
> >>   CC      /tmp/build/perf/bench/breakpoint.o
> >>   CC      /tmp/build/perf/builtin-data.o
> >>
> >>
> >> This happened in the past, I'm now trying to figure this out :-\
> >>
> >> This was in:
> >>
> >> toolsbuilder@five:~$ cat dm.log/ubuntu:18.04-x-powerpc
> >>
> >>
> >> So 32-bit powerpc, ubuntu 18.04
> > 
> > This did the trick, so I fixed it in my repo, please ack, just replacing
> > ’ with ' :-\
> > 
> > - Arnaldo
> > 
> 
> Hi Arnaldo,
>   Thanks for fixing it. I will make sure in next series of patches, we
> are also checking for this combination to avoid ascii issue.
> 
> Change looks fine to me.

Thanks for checking,

- Arnaldo
 
> Thanks,
> Kajol Jain
> 
> > 
> > diff --git a/tools/perf/pmu-events/arch/powerpc/power10/others.json b/tools/perf/pmu-events/arch/powerpc/power10/others.json
> > index 53ca610152faa237..3789304cb363bbb7 100644
> > --- a/tools/perf/pmu-events/arch/powerpc/power10/others.json
> > +++ b/tools/perf/pmu-events/arch/powerpc/power10/others.json
> > @@ -197,6 +197,6 @@
> >    {
> >      "EventCode": "0x0B0000026880",
> >      "EventName": "PM_L2_SNP_TLBIE_SLBIE_DELAY",
> > -    "BriefDescription": "Cycles when a TLBIE/SLBIEG/SLBIAG that targets this thread's LPAR was in flight while in a hottemp condition. Multiply this count by 1000 to obtain the total number of cycles. This can be divided by PM_L2_SNP_TLBIE_SLBIE_START to obtain the overall efficiency. Note: ’inflight’ means SnpTLB has been sent to core(ie doesn’t include when SnpTLB is in NCU waiting to be launched serially behind different SnpTLB). The NCU Snooper gets in a ’hottemp’ delay window when it detects it is above its TLBIE/SLBIE threshold for process SnpTLBIE/SLBIE with this core. Event count should be multiplied by 2 since the data is coming from a 2:1 clock domain and the data is time sliced across all 4 threads."
> > +    "BriefDescription": "Cycles when a TLBIE/SLBIEG/SLBIAG that targets this thread's LPAR was in flight while in a hottemp condition. Multiply this count by 1000 to obtain the total number of cycles. This can be divided by PM_L2_SNP_TLBIE_SLBIE_START to obtain the overall efficiency. Note: 'inflight' means SnpTLB has been sent to core(ie doesn't include when SnpTLB is in NCU waiting to be launched serially behind different SnpTLB). The NCU Snooper gets in a 'hottemp' delay window when it detects it is above its TLBIE/SLBIE threshold for process SnpTLBIE/SLBIE with this core. Event count should be multiplied by 2 since the data is coming from a 2:1 clock domain and the data is time sliced across all 4 threads."
> >    }
> >  ]
> > 

      reply	other threads:[~2024-08-01 14:56 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-23  5:21 [PATCH] perf vendor events power10: Update JSON/events Kajol Jain
2024-07-23  7:05 ` Disha Goel
2024-07-30 13:53   ` kajoljain
2024-07-23 16:02 ` Ian Rogers
2024-07-26 14:08   ` Arnaldo Carvalho de Melo
2024-07-31 19:44     ` Arnaldo Carvalho de Melo
2024-07-31 20:14       ` Arnaldo Carvalho de Melo
2024-08-01  7:33         ` kajoljain
2024-08-01 14:56           ` Arnaldo Carvalho de Melo [this message]

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=ZquiAS74kQQ-TCtv@x1 \
    --to=acme@kernel.org \
    --cc=akanksha@linux.ibm.com \
    --cc=atrajeev@linux.vnet.ibm.com \
    --cc=disgoel@linux.vnet.ibm.com \
    --cc=hbathini@linux.ibm.com \
    --cc=irogers@google.com \
    --cc=kjain@linux.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=maddy@linux.ibm.com \
    --cc=namhyung@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;
as well as URLs for NNTP newsgroup(s).