This is a cache of https://discuss.96boards.org/t/perf-tool-used-for-profiling-crashes-on-heavy-load/9167. It is a snapshot of the page at 2024-09-20T00:02:23.406+0000.
Per<strong>f</strong> tool, used <strong>f</strong>or pro<strong>f</strong>iling, crashes on heavy load - 96Boards <strong>f</strong>orum

Perf tool, used for profiling, crashes on heavy load

When I am using “perf record -f 99 -g -p – sleep 300” during average load, I am getting the perf.data file without any problem. But when the load is high, it is crashing. The only way to get an ok result is to reduce the frequency to around 30, which is terrible.

Ideally, the rate should be high to get better results(about 997 samples/sec). Is there any solution to this.

I think that the issue might be related to the Linux kernel space. If so, what would I have to do to solve this issue?

1 Like

Would be useful to share the board, kernel version and crash logs.

Hi,
The Linux version that i am using is “Linux version 3.10.0-957.21.3.el7.x86_64”. I am not getting any stack-trace when it crashes. Is there any way to generate the stack-trace as it is not coming by default. Also. should i add anything in the “perf record” statement to get the stack-trace.

I’m afraid you are probably asking on the wrong forums. It is still possible someone can offer you a clue but none of the 96Boards has an x86-64 processor in them so this isn’t the best place to connect with those that could help you.

1 Like

Hi,
Below is the stack trace that i got :

[root@finesse25 ~]# perf record -f 9997 -g -p 23675 -v
Warning:
The cycles event is not supported, trying to fall back to cpu-clock-ticks
Using CPUID GenuineIntel-6-3E-4
mmap size 528384B
couldn’t open /proc/14480/status

Note that I have used -v (perf record -f 9997 -g -p 23675 -v) as an extra argument to the one mentioned in the original question. (perf record -f 99 -g -p – sleep 300)

was there any fix for this?

1 Like
  • Cycles Event Support: If accurate performance measurements are crucial, investigate why the cycles event is not supported. This might involve checking CPU microarchitecture or kernel configuration.
  • Process Access: If you need to profile process 14480, troubleshoot why /proc/14480/status cannot be opened. This could be due to permissions, process termination, or other system-related issues.
  • Data Collection: Given the warning about the cycles event, consider using a different event or adjusting the sampling frequency to optimize data collection.
  • Output Analysis: Once you have a successful perf record session, use perf report to analyze the collected data.