perf
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
perf [2014/03/29 19:06] – created mikael.ohman | perf [2014/08/22 00:11] (current) – [Perf] mikael.ohman | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Measuring performance ====== | ====== Measuring performance ====== | ||
In general, to obtain useful information from binaries, certain compile flags should be used. | In general, to obtain useful information from binaries, certain compile flags should be used. | ||
- | |||
===== Perf ===== | ===== Perf ===== | ||
For using perf, one should compile OOFEM with the flag '' | For using perf, one should compile OOFEM with the flag '' | ||
First record a session using | First record a session using | ||
+ | |||
'' | '' | ||
- | Then you can visualize the results in several ways. A good, simple to understand method is to use gprof2dot to generate a complete callgraph: | ||
- | '' | ||
+ | which will generate a perf.data file. | ||
+ | Then you can visualize the results in several ways. A good, simple to understand method is to use [[http:// | ||
+ | |||
+ | '' | ||
+ | |||
+ | Or use the ncurses program | ||
+ | |||
+ | '' | ||
+ | |||
+ | Perf has very small overhead, but only does statistical sampling. | ||
+ | |||
+ | |||
+ | //Users of perf will likely first need to turn off the restrictions before they are able to run '' | ||
+ | |||
+ | '' | ||
===== Callgrind ===== | ===== Callgrind ===== | ||
Callgrind is a tool in valgrind, and should only be used on medium. This has a huge overhead, so expect OOFEM to run over a hundred times slower through valgrind. | Callgrind is a tool in valgrind, and should only be used on medium. This has a huge overhead, so expect OOFEM to run over a hundred times slower through valgrind. | ||
Simply run | Simply run | ||
+ | |||
'' | '' | ||
+ | |||
and you will produce a new file named '' | and you will produce a new file named '' | ||
Open this file in Kcachegrind to visualize the results. | Open this file in Kcachegrind to visualize the results. | ||
perf.1396116415.txt.gz · Last modified: 2014/03/29 19:06 by mikael.ohman