Re: [BUG] perf: No samples found when using kcore + coresight

From: James Clark
Date: Tue Mar 07 2023 - 05:33:40 EST




On 06/03/2023 21:13, Yang Shi wrote:
> Hi,
>
> I'm seeking some help regarding perf record --kcore + coresight. When
> I tracing with perf record --kcore -e cs_etm ... , perf report shows
> "The perf.data/data data has no samples!".
>
> I tried other combinations:
> 1. perf record --kcore (w/o using coresight): works
> 2. perf record -e cs_etm ... : works
> 3. Manually copy kcore with perf buildid-cache, then run perf record
> -e cs_etm... : works
>
> So just "perf record --kcore -e cs_etm ..." doesn't work.
>
> I'm using v6.2 kernel and the perf is built from the same kernel
> source with OpenCSD 1.4. Also attached the sample file generated by
> perf.
>
> Any suggestion is appreciated.
>
> Thanks,
> Yang

Hi Yang,

I don't see any issue with this command and I still get samples:

perf record -e cs_etm// --kcore -- true

You might want to try running both record and report in verbose and
stdio mode (-vvv --stdio) to see if you see any warnings.

I can't think of any way --kcore would cause an issue because all it
does is save kcore into the .debug cache rather than affecting the
actual perf.data file.

Are you running perf report in the same place the recording was made? Or
on another system?

James