rnd's website logoprofiling utility hints

Some small hints for profiling utilities used on Linux systems.

gmon and gperf hints

  • compile with -pg in both CFLAGS/CXXFLAGS and LDFLAGS

  • use env variable GMON_OUT_PREFIX to make programs output to $GMON_OUT_PREFIX.$pid instead of gmon.out

  • despite warnings, usable on multithreaded programs (all threads' times are added up), even if you can't tell individual threads apart

using linux's perf

  • record: perf record -g [-o outputfile] program

  • view data: perf report [-i inputfile]

When a program is running with MPI, its rank is stored in the $PMI_RANK env variable.

Hosted by Neocities Follow me on Mastodon This page made with Vim SimpleJPC-16 Best viewed in Firefox Alpine Linux The Dreamcast Junkyard Dreamcast Live Blaseball F-Droid jan li lukin e lipu ni lon tenpo mute Jet Set Radio Live Trans Rights Now!
Website created and updated by /dev/urandom. Source code available on the GitLab page.