All of lore.kernel.org
 help / color / mirror / Atom feed
* perf tools:Is there any tools  to found out the max latency by irq or cpu idle
@ 2019-04-12  0:57 Linhaifeng
  2019-04-12 14:06 ` William Cohen
  0 siblings, 1 reply; 8+ messages in thread
From: Linhaifeng @ 2019-04-12  0:57 UTC (permalink / raw)
  To: linux-perf-users, linux-kernel

Hi, 
I have a single thread application like this:

While (1) {
    start = rdtsc();
    sqrt (1024);      
  end = rdtsc();
  cycles = end – start;
  printf("cycles: %d-%02d-%02d %02d:%02d:%02d: %lu\n", 
      1900+timeinfo->tm_year, 1+timeinfo->tm_mon, timeinfo->tm_mday, timeinfo->tm_hour, timeinfo->tm_min, timeinfo->tm_sec,
      cycles);
}
It print the cycles of sqrt every second and run with taskset –c 1 ./sqrt.
The result of test is:

sqrt 2019-04-10 23:53:50: 43968
sqrt 2019-04-10 23:53:51: 44060
sqrt 2019-04-10 23:53:52: 49012
sqrt 2019-04-10 23:53:53: 38172
sqrt 2019-04-10 23:53:54: 131081408
sqrt 2019-04-10 23:53:55: 43600
sqrt 2019-04-10 23:53:56: 46704
sqrt 2019-04-10 23:53:57: 46880
sqrt 2019-04-10 23:53:58: 44332
……
sqrt 2019-04-10 02:17:15: 131081408
……
sqrt 2019-04-10 04:40:35: 131081408
……

Every 2hour23min there would be a large cycles. I use perf sched not found any sched_switch events.

L2GW_2680:/home/fsp/zn # perf sched record -C 6-11 -o perf.sched
^C[ perf record: Woken up 64 times to write data ]
[ perf record: Captured and wrote 204.878 MB perf.sched (1911189 samples) ]

L2GW_2680:/home/fsp/zn # perf sched latency -i perf.sched 

-----------------------------------------------------------------------------------------------------------------
  Task                  |   Runtime ms  | Switches | Average delay ms | Maximum delay ms | Maximum delay at       |
-----------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------------
  TOTAL:                |      0.000 ms |        0 |
---------------------------------------------------



Is there any other tools of perf to found out the max latency by irq or cpu idle ?



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2019-04-16  1:34 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-12  0:57 perf tools:Is there any tools to found out the max latency by irq or cpu idle Linhaifeng
2019-04-12 14:06 ` William Cohen
2019-04-13  6:01   ` Linhaifeng
2019-04-14  0:09     ` William Cohen
2019-04-15 12:52     ` Paul Clarke
2019-04-15 17:59       ` Arnaldo Carvalho de Melo
2019-04-16  1:09         ` Linhaifeng
2019-04-16  1:34       ` Linhaifeng

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.