'How to generate trace on armv8 Linux - CoreSight ETM - NVIDIA DRIVE AGX

I'd like to analyze worst case execution time of the programs. For this, there is a tool and expecting trace output of the program(specifically CoreSight - Embedded Trace Macrocell (ETM) instruction trace data, e.g. generated by ARMv7/v8 AARch32...)

We are using NVIDIA DRIVE AGX board(armv8) with following specs:

  • -NVIDIA DRIVE™ Software 10.0 (Linux)

  • uname -a : Linux tegra-ubuntu 4.14.102-rt53-tegra #1 SMP PREEMPT RT Fri Sep 20 16:23:45 PDT 2019 aarch64 aarch64 aarch64 GNU/Linux

First, CoreSight drivers were not visible in the target board. I've managed to take kernel build by modifying and adding CoreSight drivers. For the summary, this is the topic I've followed:https://forums.developer.nvidia.com/t/how-to-generate-trace-output-for-drive-agx/185179 However, after the build and flash procedure, ls /sys/bus/coresight/devices/ does not show anything. According to documents related to CoreSight: https://www.kernel.org/doc/html/latest/trace/coresight/coresight.html, There are two ways to use the CoreSight framework:

1)Using the perf cmd line tools.

2)Interacting directly with the CoreSight devices using the sysFS interface.

In both cases, they check the devices. In my case, CoreSight devices are not being shown up under the /sys/bus/coresight/devices. At this moment, does it mean my board is not supported for CoreSight ETM trace or do I need to do additional things?

EDIT: I think corresponding .dtsi needs to be added to the system. Similar issue observed on NXP side:https://community.nxp.com/t5/i-MX-Processors/Enabling-CoreSight-on-i-MX-8MM/m-p/1244483

Then my next question becomes how to create .dtsi and configure it for the CoreSight HW...?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source