From: Ravi Bangoria <ravi.bangoria@amd.com>
To: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: namhyung@kernel.org, irogers@google.com, peterz@infradead.org,
mingo@redhat.com, mark.rutland@arm.com,
alexander.shishkin@linux.intel.com, jolsa@kernel.org,
adrian.hunter@intel.com, kan.liang@linux.intel.com,
yangjihong1@huawei.com, linux-kernel@vger.kernel.org,
linux-perf-users@vger.kernel.org, sandipan.das@amd.com,
ananth.narayan@amd.com, santosh.shukla@amd.com,
Ravi Bangoria <ravi.bangoria@amd.com>
Subject: Re: [PATCH] perf doc: Add AMD IBS usage document
Date: Wed, 19 Jun 2024 21:09:22 +0530 [thread overview]
Message-ID: <abbf2ec4-c25d-4cc8-8ec7-a86c8de8be7a@amd.com> (raw)
In-Reply-To: <ZnLc9V9UHBFvuqRg@x1>
> IIRC if one does:
>
> perf record -e cycles:P
>
> on AMD systems it maps it to
>
> ibs_op//
>
> No?
Correct. man perf-list already covers that under event modifier section
but will add brief detail here as well.
> I don't have access right now to my 5950X, so its from memory, about
> "IBS invocation from core PMUs with precise_ip set"
>
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=78075d947534013b4575687d19ebcbbb6d3addcd
>
> One other thing to mention is 'perf mem record' that will use ibs_op//
> as we can see in the cover letter for this perf-tools merge commit
> upstream:
>
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=9d64bf433c53cab2f48a3fff7a1f2a696bc5229a
>
> # perf mem record -a --filter 'mem_op == load || mem_op == store, ip > 0x8000000000000000'
> ^C[ perf record: Woken up 1 times to write data ]
> [ perf record: Captured and wrote 2.199 MB perf.data (2913 samples) ]
> #
> # ls -la perf.data
> -rw-------. 1 root root 2346486 Jan 9 18:36 perf.data
> # perf evlist
> ibs_op//
> dummy:u
> # perf evlist -v
> ibs_op//: type: 11, size: 136, config: 0, { sample_period, sample_freq }: 4000, sample_type: IP|TID|TIME|ADDR|CPU|PERIOD|IDENTIFIER|DATA_SRC|WEIGHT, read_format: ID, disabled: 1, inherit: 1, freq: 1, sample_id_all: 1
>
> Another examples available in the merge commit of when ibs_op support
> was added to 'perf c2c' and 'perf mem':
Correct. Will add brief detail about perf mem and c2c here.
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d465bff130bf4ca17b6980abe51164ace1e0cba4
>
> Showing how you can use 'perf report -D' to extract info about these
> samples should be interesting as well:
>
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=0429796e45ec17eee26d7a59de92271c275d7666
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=291dcb98d7ee5cd719f4c5991d977794b1829c16
Sure. Will add that in the example below.
>> +To go over each sample
>> +
>> + $ sudo perf script
>
> Here I think it would be to have an example of such output.
This would be a normal perf script output but raw dump contains IBS
specific raw values. I'll add a sample output in below command.
>> +Raw dump of IBS registers when profiled with --raw-samples
>> +
>> + $ sudo perf report -D
>> + /* Look for PERF_RECORD_SAMPLE */
>
> Ditto
...
>> +SEE ALSO
>> +--------
>> +
>> +linkperf:perf-record[1], linkperf:perf-script[1], linkperf:perf-report[1]
>
> perf-mem, perf-c2c
Ack.
Thanks for the review,
Ravi
next prev parent reply other threads:[~2024-06-19 15:39 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-19 9:22 [PATCH] perf doc: Add AMD IBS usage document Ravi Bangoria
2024-06-19 13:28 ` Arnaldo Carvalho de Melo
2024-06-19 15:39 ` Ravi Bangoria [this message]
2024-06-19 14:51 ` Namhyung Kim
2024-06-19 15:56 ` Ravi Bangoria
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=abbf2ec4-c25d-4cc8-8ec7-a86c8de8be7a@amd.com \
--to=ravi.bangoria@amd.com \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=ananth.narayan@amd.com \
--cc=irogers@google.com \
--cc=jolsa@kernel.org \
--cc=kan.liang@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
--cc=sandipan.das@amd.com \
--cc=santosh.shukla@amd.com \
--cc=yangjihong1@huawei.com \
/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