google perftools usage for lhcb software optimization

About

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

CPU Profiling

general documentation: http://google-perftools.googlecode.com/svn/trunk/doc/cpuprofile.html

I will focus on LHCb and CMT specific details:

Preloading libprofiler.so

env LD_PRELOAD="/usr/lib/libprofiler.so"

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 libprofiler.so

In order to prevent the crashes mentioned above. You want to link against the libprofile.so 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.

-lprofiler

Text Output

Callgraph

Heap Profiling (aka Memory Profiling)

Text Output

Callgraph

Heap Checking (aka Memory Leak Detection)

tcmalloc

-- 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