Which profiler is more accurate: OProfile or Google Performance Tools?

I found two large profilers:

Has anyone tried both of them? What's better?

+3
source share
1 answer

oprofile is more accurate; It uses processor performance monitoring (built-in hardware monitoring with 100 second performance events);

and google-perftools libprofiler.so uses setitimer- the kernel kernel intreval timer:

$ nm -D libprofiler.so | grep timer
     U getitimer
     U setitimer

HZ, (100 1000 300 250). 10000, 100000, 1000 ( 2 , 2000 , cpu profiler google). HZ:

$ zgrep HZ= /proc/config.gz
CONFIG_HZ=1000

, ​​ .

, oprofile CPU, . , , 100000 1000000 , HZ. , N- , N- L2 N-th jmp ..... CPU Pentium Pro.

oprofile , , ​​ .

oprofile , root (AFAIK), ; ( ).

google-perftools: ; ; . , google-perftools .

oprofile google-perftools/cpuprofiler:

  • ( gprof/gcov)
  • callgraph (, kcachegind, 1 2; pprof kcachegrind callgrind)
  • ( , kcachegrind/callgrind/other valgrind)
  • portable (oprofile CPU, intel/amd/through/many, perftools , callstack setitimer)
+3

Source: https://habr.com/ru/post/1719814/


All Articles