From: Samuel Holland <samuel.holland@sifive.com>
To: Atish Patra <atishp@atishpatra.org>
Cc: linux-riscv@lists.infradead.org,
Arnaldo Carvalho de Melo <acme@redhat.com>,
Ian Rogers <irogers@google.com>,
Palmer Dabbelt <palmer@dabbelt.com>,
linux-perf-users@vger.kernel.org,
Mark Rutland <mark.rutland@arm.com>,
Adrian Hunter <adrian.hunter@intel.com>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
linux-kernel@vger.kernel.org, Jiri Olsa <jolsa@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Namhyung Kim <namhyung@kernel.org>,
Atish Patra <atishp@rivosinc.com>
Subject: Re: [RESEND PATCH 0/7] perf vendor events riscv: Update SiFive CPU PMU events
Date: Fri, 21 Mar 2025 15:57:09 -0500 [thread overview]
Message-ID: <7c42afed-e877-4136-a6d6-8ebc9864cc04@sifive.com> (raw)
In-Reply-To: <CAOnJCUKUY8YQ0UtLa39EkGEjckiOqdnuqEsf2ak4Dcp779iY+Q@mail.gmail.com>
Hi Atish,
On 2025-03-21 1:31 PM, Atish Patra wrote:
> On Fri, Mar 7, 2025 at 1:19 AM Samuel Holland <samuel.holland@sifive.com> wrote:
>> On 2025-03-01 3:21 AM, Atish Patra wrote:
>>> On Wed, Feb 19, 2025 at 1:27 PM Namhyung Kim <namhyung@kernel.org> wrote:
>>>> On Wed, Feb 12, 2025 at 05:21:33PM -0800, Samuel Holland wrote:
>>>>> This series updates the PMU event JSON files to add support for newer
>>>>> SiFive CPUs, including those used in the HiFive Premier P550 board.
>>>>> Since most changes are incremental, symbolic links are used when a set
>>>>> of events is unchanged from the previous CPU series.
>>>>>
>>>>> I originally sent this series about a year ago[1], but received no
>>>>> feedback. The P550 board is now available (and I have tested this series
>>>>> on it), so it would be good to get perf support for it upstream.
>>>>>
>>>>> [1]: https://lore.kernel.org/linux-perf-users/20240509021531.680920-1-samuel.holland@sifive.com/
>>>>>
>>>
>>> Tested the patches that are part of sifive's release tree for p550.
>>> Both perf stat/record seems to work fine
>>> for a bunch of events.
>>>
>>> Based on that
>>> Tested-by: Atish Patra <atishp@rivosinc.com>
>>
>> Thanks for testing!
>>
>>> @Samuel Holland : perf report that the following two events are not
>>> supported on the p550 board.
>>>
>>> cycle and instruction count:
>>> core_clock_cycles
>>> [Counts core clock cycles]
>>> instructions_retired
>>> [Counts instructions retired]
>>>
>>> I assumed that these are raw events cycle/instruction retired events
>>> that can support
>>> perf sampling as well. Maybe I am missing something ? DT binding ?
>>
>> perf is correct. Those two events are not supported on P550, only by the newer
>> cores (bulled-0d and p650). Yes, those are aliases of cycles and instructions
>> that were added to support sampling.
>>
>
> Thanks for the confirmation. Are there other events that can be used to sample
> instruction count on P550 ? I did not find anything in the perf list
> or the json file.
> I am not sure if I missed something.
Likely the closest approximation is ORing together the instruction class
retirement events from instruction.json: cpu/r0x3fffe00/. The difference between
that and "instructions" looks to be well within 1% for CPU-intensive workloads.
Maybe it makes sense to add an entry for this combination in the JSON? Would it
be appropriate to call it "instructions_retired"? The same thing could be done
for the older SiFive cores.
Regards,
Samuel
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
next prev parent reply other threads:[~2025-03-21 20:57 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-13 1:21 [RESEND PATCH 0/7] perf vendor events riscv: Update SiFive CPU PMU events Samuel Holland
2025-02-13 1:21 ` [RESEND PATCH 1/7] perf vendor events riscv: Rename U74 to Bullet Samuel Holland
2025-02-13 1:21 ` [RESEND PATCH 2/7] perf vendor events riscv: Remove leading zeroes Samuel Holland
2025-02-13 1:21 ` [RESEND PATCH 3/7] perf vendor events riscv: Update SiFive Bullet events Samuel Holland
2025-02-13 1:21 ` [RESEND PATCH 4/7] perf vendor events riscv: Add SiFive Bullet version 0x07 events Samuel Holland
2025-02-13 1:21 ` [RESEND PATCH 5/7] perf vendor events riscv: Add SiFive Bullet version 0x0d events Samuel Holland
2025-02-13 1:21 ` [RESEND PATCH 6/7] perf vendor events riscv: Add SiFive P550 events Samuel Holland
2025-02-13 1:21 ` [RESEND PATCH 7/7] perf vendor events riscv: Add SiFive P650 events Samuel Holland
2025-02-19 21:20 ` [RESEND PATCH 0/7] perf vendor events riscv: Update SiFive CPU PMU events Namhyung Kim
2025-02-20 17:37 ` Ian Rogers
2025-03-01 9:21 ` Atish Patra
2025-03-07 9:19 ` Samuel Holland
2025-03-21 18:31 ` Atish Patra
2025-03-21 20:57 ` Samuel Holland [this message]
2025-03-11 16:11 ` Namhyung Kim
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=7c42afed-e877-4136-a6d6-8ebc9864cc04@sifive.com \
--to=samuel.holland@sifive.com \
--cc=acme@kernel.org \
--cc=acme@redhat.com \
--cc=adrian.hunter@intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=atishp@atishpatra.org \
--cc=atishp@rivosinc.com \
--cc=irogers@google.com \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=mark.rutland@arm.com \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=palmer@dabbelt.com \
--cc=peterz@infradead.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