GeezerVison is showing github.com — Broken (?) raw pmu support · Issue #734 · async-profiler/async-profiler
Broken (?) raw pmu support #734DescriptionHi!
Just tried raw PMU encoding with async-profiler. Tried different options (see below) but nothing works except 'rXXX' encoding.
# ./profiler.sh -e pmu/cpu/umask=0x1,event=0xd3/ -d 30 -t 7
[ERROR] Duplicate event argument
# ./profiler.sh -e pmu/umask=0x1,event=0xd3/ -d 30 -t 7
[ERROR] Duplicate event argument
# ./profiler.sh -e r1d3 -d 30 -t 7
.....
Works!
looks like a problem here with ',event'. Something treats it as argment (now sure how it works).
So, the question is how to encode raw events from perf-list output to asyn-profiler. Example:
mem_load_uops_l3_hit_retired.xsnp_hitm
cpu/umask=0x4,(null)=0x4e2b,event=0xd2/
mem_trans_retired.load_latency_gt_128
cpu/umask=0x1,(null)=0x3f1,event=0xcd,ldlat=0x80/
How should I encode these events to asyn-profiler? What is '(null)' ? Should I skip this?
--Sergey Activityapangin commented on Mar 26, 2023 , is treated as an argument delimiter in the agent command line and cannot appear anywhere in the value string.
For PMU event descriptor, you can replace it with :
Here is the correct format:
-e pmu/umask=0x1:event=0xd3/
I will change asprof launcher to replace , with : in the PMU event descriptor automatically.
I have no idea about (null) in perf-list output; seems like a perf bug. I'd suggest to consult CPU architecture reference for the correct configuration of PMU events. RainM commented on Mar 26, 2023 Tried with proper delimiter. Does not work:
# ./profiler.sh -e pmu/umask=0x1:event=0xd3/ -d 60 -t 7. << copy-pasted your example
[ERROR] Unsupported event type
./profiler.sh -e r1d3 -d 60 -t 7 -f 1
Profiling for 60 seconds <<< plain raw encoding works
.....
# ./profiler.sh -e pmu/umask=0x20:event=0xd1/ -d 60 -t 7 << another event
[ERROR] Unsupported event type
# ./profiler.sh -e r20d1 -d 60 -t 7 -f 1
Profiling for 60 seconds
.....
added 2 commits that reference this issue on Mar 28, 2023#734: Raw PMU event descriptors #734: Raw PMU event descriptors apangin commented on Mar 28, 2023 Sorry for the confusion, I meant -e cpu/umask=0x1:event=0xd3/
I also added the possibility to specify an event descriptor in perf format (with comma):
-e cpu/umask=0x1,event=0xd3/ apangin commented on Mar 30, 2023 I'm closing the issue, since the question is answered and the bug with "," in the event name is fixed.
Feel free to reopen if you have further comments. Reacted by Sergey Melnikov
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|