Hi Peng,
On Sun, Mar 22, 2020 at 06:24:35AM +0000, Peng Fan wrote:
Hi All,
I follow this guide to do test on i.MX8MP, https://elinux.org/images/b/b3/Hardware_Assisted_Tracing_on_ARM.pdf
I could see dump with perf report --dump (attached), but when I use perf report --stdio, I met Error: The perf.data data has no samples! # To display the perf.data header info, please use --header/--header-only options. #
The perf I use to dump data is not compiled with CORESIGHT support, but the host perf has been compiled with CORESIGHT support. Do you know what might cause this issue?
From the dump log file, the CoreSight trace data is quite small:
CoreSight ETM Trace data: size 192 bytes
This is possible has no enough trace data to generate packets and Perf samples. Usually the CoreSight trace data should be bigger than 192 bytes (form KBs ~ MBs).
Another pontential issue is related DSO. I saw you are using 'host perf', if so you need to copy the DSOs from the target board to host, so the host can find the corresponding DSOs and generate samples. You could use 'perf archive' command to gather all relevant DSOs and copy the archived file to host for offline analysis. I understand you might work on some rootFS (e.g. Android) which cannot easily use the native built perf, but if it's possible, I'd like to suggest you could try native build perf tool firstly (e.g. the perf tool is built on Arm64 debian).
BTW, it's appreicate if you could describe which kernel code base (and which branch with exact commit ID) when report issue.
Thanks, Leo