Collecting CPU performance counters for tx1

Hi All,

I think I did my homework and I can’t find any resources for collecting CPU performance counters on TX1. I give a summary of my findings and please let me know if I’m missing something.

First of all, I went for Linux “perf”, the package managers can’t find in linux-tools and linux-tool-3.10.96. I got the source code and compiled it myself but it always returns “not-supported” for all counters. I checked linux kernel messages and I found:

“hw perfevents: enabled with arm/armv8-pmuv3 PMU driver, 7 counters available”

which means profiling is enabled in my kernel.
I checked libpfm for L4T and the library is not available yet.
I tried to use Linux linux/perf_event.h but not sure about the reuslts. For example it returned very small numbers (around thousands) for CPU cycles while CPU freq is 1.7Ghz.

Nvidia has nvprof but it only collects results for CUDA programs. I also tried Tegra System profiler but it has two problems 1) it’s on the another machine 2) I couldn’t find all performance counters (if I’m not wrong I found cycles and some cache information) also I don’t like the GUI interface, I want something I can use in my scripts.

So in simple words does anyone used “perf” or something like it to collect the CPU performance counters? I’m pretty sure it should be something out there? NVIDIA has multiple tools for GPU but I need for CPU???

Thank you for all your help

Regards,
Reza

This is probably not specific enough for what you want, but the “tegrastats” program likely monitors those event counters for its own display (meaning it can be done). Looks like this program is put in the “~ubuntu” home directory.

Thank you for your response but tegrastats only report resource utilization like RAM CPU and GPU or at least this is what is reporting and I need raw performance counters like last level cache misses or number of instructions executed and etc. I checked Nvidia forums and they won’t release tagrastats source code so even if it collects performance counters I have no access to them.

Hi reza_azimi,

Similar issue was discussed before, and hope below thread could help on your case:

[url]https://devtalk.nvidia.com/default/topic/955554/jetson-tx1/performance-counters-reset-itself/post/4963456/#4963456[/url]

Thanks