This patchset complements the kernel portion of the solution by adding the capability to decode and render traces based on the time they were executed.
Most of the changes are related to decoding traces with multiple traceIDs, something that is mandatory when dealing with N:1 source/sink topologies. Both kernel and user space patches have been rebased on yesterday's linux-next and are available here[1].
Note that compiling the perf tools on both target and host platforms in the 5.1 cycle requires the addition of "CORESIGHT=1", i.e:
$ make -C tools/perf CORESIGHT=1 VF=1
Moreover this set uses a new decoder callback that was introduced in version 0.11.0 of the openCSD library. Testing with a different version of the library than the one installed on a system can be done by using the CSINCLUDES and CSLIBS environment variables, as described in the library's documentation[2]. As with the kernel portion, I'm only sending to the coresight mailing list because of the merge window.
Review and comments would be most appreciated.
Thanks, Mathieu
[1]. https://git.linaro.org/people/mathieu.poirier/coresight.git/log/?h=next-2019... [2]. https://github.com/Linaro/OpenCSD/blob/master/HOWTO.md
Mathieu Poirier (17): perf tools: Configure contextID tracing in CPU-wide mode perf tools: Configure timestsamp generation in CPU-wide mode perf tools: Configure SWITCH_EVENTS in CPU-wide mode perf tools: Add handling of itrace start events perf tools: Add handling of switch-CPU-wide events perf tools: Refactor error path in cs_etm_decoder__new() perf tools: Move packet queue out of decoder structure perf tools: Introduce the concept of trace ID queues perf tools: Get rid of unused cpu in struct cs_etm_queue perf tools: Move thread to traceid_queue perf tools: Move tid/pid to traceid_queue perf tools: Mandate using openCSD v0.11.0 perf tools: Use traceID aware memory callback API perf tools: Add support for multiple traceID queues perf tools: Linking PE contextID with perf thread mechanic perf tools: Add notion of time to decoding code perf tools: Add support for CPU-wide trace scenarios
tools/build/feature/test-libopencsd.c | 4 +- tools/perf/arch/arm/util/cs-etm.c | 186 +++- .../perf/util/cs-etm-decoder/cs-etm-decoder.c | 270 +++-- .../perf/util/cs-etm-decoder/cs-etm-decoder.h | 39 +- tools/perf/util/cs-etm.c | 939 ++++++++++++++---- tools/perf/util/cs-etm.h | 104 ++ 6 files changed, 1208 insertions(+), 334 deletions(-)