User-level SystemTap Tracing for CMSSW

SystemTap is able to record user-level events in its kernel traces. We can add debug symbols to various portions of CMSSW and use these debug symbols to add calls in ROOT and CMSSW to BlockTrace's output

Compiling parts of ROOT with debug symbols.

This is not a tutorial for making ROOT; you can in fact probably rebuild it from the CMSSW RPM. Here's what I do (getting debug symbols for is sufficient for me):

svn co root-52200h
cd root-52200h
./configure linux --build=debug
make lib/ -j9

At this point, you can link the newly-created into the CMSSW environment.

cmsrel CMSSW_3_5_4
cd CMSSW_3_5_4
ln -s /path/to/root-52200h/lib/ lib/slc5_ia32_gcc434/

Compiling parts of CMSSW with debug symbols.

This one is easier. Once you check out the CMSSW code you want to modify, run scram with the following argument:
scram b USER_CXXFLAGS="-g"

For example, if you want the Input module to have debugging symbols, you can execute the following two commands:

addpkg IOPool/Input
scram b USER_CXXFLAGS="-g"

SystemTap and user symbols

Once you have debug symbols in ROOT and/or CMSSW, you can start writing traces for them. For example, the following code will trace entry and exit for the 'fillHistory' function in IOPool/Input/src/ and 'FillBuffer' in tree/tree/src/TTreeCache.cxx:
probe process("/home/cse496/bbockelm/tmp/CMSSW_3_5_4/lib/slc5_ia32_gcc434/").function("fillHistory") {

probe process("/home/cse496/bbockelm/tmp/CMSSW_3_5_4/lib/slc5_ia32_gcc434/").function("fillHistory").return {

probe process("/mnt/unl/home/cse496/bbockelm/software/root-5.22.00h/lib/").function("FillBuffer") {

probe process("/mnt/unl/home/cse496/bbockelm/software/root-5.22.00h/lib/").function("FillBuffer").return {
Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r3 - 2010-05-13 - BrianBockelman
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    Main All webs login

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