Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentes Révision précédente
Prochaine révision
Révision précédente
outils_analyse:linuxperf [2018/03/08 09:22] – [Listing Events] adminoutils_analyse:linuxperf [2018/05/15 21:06] (Version actuelle) – [Links] admin
Ligne 6: Ligne 6:
 <code bash> <code bash>
 $ perf list $ perf list
 +</code> 
 +<code bash>
 List of pre-defined events (to be used in -e): List of pre-defined events (to be used in -e):
   cpu-cycles OR cycles                               [Hardware event]   cpu-cycles OR cycles                               [Hardware event]
Ligne 14: Ligne 15:
   branch-instructions OR branches                    [Hardware event]   branch-instructions OR branches                    [Hardware event]
   branch-misses                                      [Hardware event]   branch-misses                                      [Hardware event]
 +  ...
 +  ... 
 +</code>
 +
 +===== Counting Events =====
 +'''perf stat''' runs a command and collects Linux performance statistics during the execution of such command.
 +
 +**Example: CPU counter statistics for the specified command**
 +
 +<code bash>
 +$ perf stat ./ser_matmul
 +
 +Performance counter stats for './ser_matmul':
 +
 +      10617,167685 task-clock                #    1,000 CPUs utilized          
 +                54 context-switches          #    0,005 K/sec                  
 +                27 CPU-migrations            #    0,003 K/sec                  
 +             6 306 page-faults               #    0,594 K/sec                  
 +    28 119 617 371 cycles                    #    2,649 GHz                     [83,34%]
 +    23 887 379 283 stalled-cycles-frontend   #   84,95% frontend cycles idle    [83,33%]
 +    16 806 041 279 stalled-cycles-backend    #   59,77% backend  cycles idle    [66,65%]
 +     7 586 969 293 instructions              #    0,27  insns per cycle        
 +                                             #    3,15  stalled cycles per insn [83,33%]
 +     1 085 642 258 branches                  #  102,253 M/sec                   [83,34%]
 +         1 188 913 branch-misses             #    0,11% of all branches         [83,34%]
 +
 +      10,620474819 seconds time elapsed
  
 </code> </code>
 +
 +Various CPU level 1 data cache statistics for the specified command:
 +
 +<code bash>
 +$ perf stat -e L1-dcache-loads,L1-dcache-load-misses,L1-dcache-stores  ./ser_matmul
 +
 +Performance counter stats for './ser_matmul':
 +
 +     3 237 999 611 L1-dcache-loads
 +                                            
 +     1 639 446 360 L1-dcache-misses
 +         #   50,63% of all L1-dcache hits  
 +        12 950 108 L1-dcache-stores
 +                                           
 +
 +      10,537918325 seconds time elapsed
 +
 +</code>
 +
 +
 +
 +====== Links ======
 +
 +  /* http://sandsoftwaresound.net/perf/perf-tutorial-hot-spots/*/
 +  * http://www.brendangregg.com/perf.html
 +  * https://perf.wiki.kernel.org/index.php/Tutorial#multiplexing_and_scaling_events
  
  • outils_analyse/linuxperf.1520500933.txt.gz
  • Dernière modification : 2018/03/08 09:22
  • de admin