From The Battle for Wesnoth Wiki
Revision as of 02:55, 9 June 2021 by Pentarctagon (Created page with "== Linux == When using either scons or cmake to build, there are four options available for profiling which are listed below. For cmake use <code>-DPROFILER=<name></code>, for...")
When using either scons or cmake to build, there are four options available for profiling which are listed below. For cmake use
-DPROFILER=<name>, for scons use
To use gperftools:
- Install the packages
google-perftools(needed later for running google-pprof) and
libgoogle-perftools-dev(needed in order to use the -lprofiler linker option).
- In a terminal, export the
CPUPROFILEvariable, such as
- Build any executable while setting either
- Run the executable and have it do any task(s) as needed to get relevant profiling information.
- Generate the human-readable profiling output using the command
google-pprof <executable> <profiling info> > prof.txtfor a text file, or
google-pprof -gif <executable> <profiling info> > prof.giffor a viewable gif image.