Debuggers

Call frames

  • Parameters passed to the function
  • Local variables of the function
  • A snapshot of registers to use and restore
  • A return address
  • A frame pointer (for debugging)

Profiling resources

Tools

  • valgrind
  • perf
  • /usr/bin/time --verbose
  • Tracy
  • htop
  • Google Benchmark
  • gprof

Graph tools

Compiler options

Enabling in gcc

Use -p for prof and -pg for gprof. But it will take longer to run.

References