From MozillaWiki
Jump to: navigation, search

Profiling Firefox or Fennec with oprofile

oprofile is a useful profiling tool for Linux. Using it does not require recompiling in many cases, which is nice.

  • You may need to compile with
  ac_add_options --enable-optimize="-fno-omit-frame-pointer"

in order to get callgraph data properly. Also you need debug symbols.

  • You can then follow the following workflow:
  sudo opcontrol --reset
  sudo opcontrol --no-vmlinux
  sudo opcontrol --start --callgraph=10
  [... do stuff ...]
  sudo opcontrol --shutdown
  opreport --demangle=smart --symbols --callgraph ./fennec `ls *.so` &> o ; gedit o


  • Callgraph data may not work on x86_64 or ARM, sadly.