lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <abbf2ec4-c25d-4cc8-8ec7-a86c8de8be7a@amd.com>
Date: Wed, 19 Jun 2024 21:09:22 +0530
From: Ravi Bangoria <ravi.bangoria@....com>
To: Arnaldo Carvalho de Melo <acme@...nel.org>
Cc: namhyung@...nel.org, irogers@...gle.com, peterz@...radead.org,
 mingo@...hat.com, mark.rutland@....com, alexander.shishkin@...ux.intel.com,
 jolsa@...nel.org, adrian.hunter@...el.com, kan.liang@...ux.intel.com,
 yangjihong1@...wei.com, linux-kernel@...r.kernel.org,
 linux-perf-users@...r.kernel.org, sandipan.das@....com,
 ananth.narayan@....com, santosh.shukla@....com,
 Ravi Bangoria <ravi.bangoria@....com>
Subject: Re: [PATCH] perf doc: Add AMD IBS usage document

> 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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ