Great to hear, Sebastian! :) The "failed to mmap" was the same error I got, as well.
Is this a good place to talk about perf inject machinery, or should I start a new thread for that?
If this is the right place, it looks like the traces from my hikey might not be getting read properly by `perf inject` when I'm trying to generate LBR traces. A bit of debugging has shown that many of the traces can be decoded, but we eventually hit one of type ETM4_PKT_I_COND_I_F2, which TrcPktDecodeEtmV4I::decodePacket currently doesn't support.
I'm reading the docs, and it looks like that kind of tracing needs to be explicitly enabled. Doing `cat /sys/bus/coresight/devices/*.etm/mode`, the bits to enable that all appear clear on my setup. So, I'm unsure how it's sneaking into the traces. I found a convenient way to dump the traces (cs_etm__dump_event), and it looks like there may be some invalid traces in perf.data, as well?
In any case, I've attached three things in one tarball:
- perf.data from running a bubble sort program on Hikey for a few ms; recorded using `taskset 1 ./perf record -e cs_etm/@f6404000.etr/u --per-thread ./gbiv-tool`
- etm-dump.txt, which is stdout from running `perf --debug verbose=9 inject -i ./perf.data -o lbr_trace --itrace=i100usl64 --strip` (with a call to cs_etm__dump_event baked in)
- lbr_trace, the (nearly empty?) output of the trace.
When trying to convert lbr_trace to an LLVM profile, I get errors about 0% of the samples being mappable onto the executable.
I'm running perf on my x86 machine from the opencsd 4.11 branch; opencsd was freshly pulled+compiled earlier today.
I'll continue trying to figure out the root cause tomorrow.