For CoreSight Tracing using the Embedded Trace Macrocells (ETMs) I followed the steps described here (please read).
I configured the CoreSight kernel drivers and the Devicetree so that all the devices are shown at /sys/bus/coresight/devices/. Turning on the ETF and ETM via echo 1 > enable_sink/source also works as expected
However, when trying to dump the trace data from the ETF into a file, there is nothing to be written:
dd if=/dev/72030000.etf of=~/trace.bin
0+1 records in
0+1 records out
64 bytes copied, 0.000981324 s, 65.2 kB/s
Using the mem_parser only shows the following:
I give up, asking kernel team for sku id variable name.
mem_parser version 2.0.9
Parsing Pogram Trace Macrocell buffer (ETM4.x) ......
Please note: Direct branch could have been executed before the flush and not after the requested flush.
etb buffer size: 64
Sorry for the late reply that I didn’t get a chance to reproduce it locally.
I will do that by next week.
Could you also verify with the latest Jetpack 4.6.6(r32.7.6) on the Jetson Nano devkit?
Please also share the result of the following command on your board.
If you want to reproduce it locally, you would have to use my CoreSight devicetree configurations. I can send you the .dtsi files if you want. Or does Nvidia have their own Coresight devicetree file which was not released?
Have you checked if the ETM is actually generating trace data?
How would I check that other than trying to read the data which was written (or in this case: not written) into the ETF?
Maybe try different trace modes or check if there’s a missing configuration in the device tree. Also, could be worth verifying permissions and kernel logs (dmesg) for any errors.
I ran all instructions as root (see the #), and there are no errors in dmesg (otherwise the “enabled” and “read start/end” outputs wouldn’t be there). I also checked the devicetree configuration with a CoreSight expert at Linaro, so this should not be the issue.
One possibility why it doesn’t work could be that the CoreSight drivers are too old (kernel version 4.9) and thus no trace is generated by the ETM or stored in the ETF. But this would not explain why the initialization of the Coresight components is sucsessful.
Are you serious?!
The first one is referenced in the guide I linked in my original post (I wrote “please read” for a reason!), and you just confirmed that you did in fact not read it.
The second one is linked in my second post to this thread.
This thread and the others that I created show that the moderators in this forum straight up ignore most of the explanations and links that the original posters provide.
You guys just keep embarrassing yourselves…
Sorry that I was not clear about this topic and there’re too many topics on the forum so that I mis-understand what you’ve done.
I’m trying to reproduce your use case locally.
When I perform this to include your device tree, I would get the following errors:
ERROR (phandle_references): Reference to non-existent node or label "cpu0"
ERROR (phandle_references): Reference to non-existent node or label "cpu1"
ERROR (phandle_references): Reference to non-existent node or label "cpu2"
ERROR (phandle_references): Reference to non-existent node or label "cpu3"
I’ve digged into this feature with no luck that it is from old release and seems not working currently.
Similar result as tegra_ptm_t210 driver cannot be enabled in current release.
Could you try using ftrace as the following instead?
Please confirm the following kernel configs have been enabled:
I’ve digged into this feature with no luck that it is from old release and seems not working currently.
Similar result as tegra_ptm_t210 driver cannot be enabled in current release.
As explained in another post, I managed to enable the tegra_ptm_t210 driver with a few small modifications. I just want to know why the standard Linux CoreSight driver does not work. Can you give me a reason?
Could you try using ftrace as the following instead?
ftrace is no option for me, as it does not provide the functionality that I need (instruction-level tracing). Only CoreSight does