google perftools usage for lhcb software optimization


goole-perftools is a set of measurement tools and a optimized memory allocation library called tcmallc.

CPU Profiling

general documentation:

I will focus on LHCb and CMT specific details:


env LD_PRELOAD="/usr/lib/"

WARNING: Gaudi dynamically loads a lot of libs at runtime. If the CPU Profiler does an sampling interupt while Gaudi loads a lib you'll get a crash. So preloading libprofile is not feasble for real world gaudi apps.

Linking against

In order to prevent the crashes mentioned above. You want to link against the and use the API calls in a code section that is invoked after most of the dynamic libs have been loaded.

For example in order to profile Moore i placed the calls to ProfilerStart() and ProfilerStop() in the initalize() and finalize() of HltGlobalMonitor.


Text Output


Heap Profiling (aka Memory Profiling)

Text Output


Heap Checking (aka Memory Leak Detection)


-- StephanNies - 2009-10-02

Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r1 - 2009-10-02 - unknown
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    LHCb All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2020 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback