Fermilab


MINOS Offline Documentation
[home] [installing MINOS software] [supported platforms] [package links] [mailing list] [HyperNews] [FAQ] [computing help] [MINOS glossary] [archives]

Debugging and Optimising



The hope is that this page will develop into one covering the using of debugging tools including leak checkers and performance analysers.

Also see Understanding Error Messages, Brett's talk on gdb and Mike's talk on Valgrind

Hardware watchpoints in gdb

From Brett: As talked about at the meeting I dug up an old email to George about using hardware watchpoints to watch for when a variable changes.

To do this, the variable must be less than 16 bytes (on x86 hardware), so if you are looking at a struct or a class, just choose one member. I think there is also a limit on the number of hardware watchpoints allowed (4?). Here is an example usage for looking at a member of a CINT global structure:

shell> gdb loon
...
(gdb) b main
...
(gdb) r
...
(gdb) awatch G__definedtemplateclass.next
Hardware access (read/write) watchpoint 2: G__definedtemplateclass.next
(gdb) c
Continuing.
Hardware access (read/write) watchpoint 2: G__definedtemplateclass.next

Old value = (struct G__Definedtemplateclass *) 0x889a790
New value = (struct G__Definedtemplateclass *) 0x889a720
0x4265ed80 in strcpy () from /lib/libc.so.6
(gdb) where
#0  0x4265ed80 in strcpy () from /lib/libc.so.6
...

Jim Kowalkowski's profiler

From Brett: the documentation for Jim Kowalkowski's profiler and my wrapper to run it and analyze the output is now committed and online at:

http://minos.phy.bnl.gov/software/prof/PerfTools/doc/

This describes how it works and how to install and run it.

It includes a walk through tutorial, including screenshots. It uses an example that, while admittedly contrived, has qualitatively the same features that were found in the DeMux improvements.

Leak Checkers

We use several leak checkers including Valgrind and MemCheck.

Message Service Output

If all else fails, there is alway the humble debug print! The Message Service, used by our software, allows the job user to control the level of output, from any module or framework service, at execution time. It also contains a Trip Wire Debug Facility that can globally control all output. See the Message Service chapter of the User Manual for details.


Last Modified: $Date: 2005/11/03 14:51:16 $
Contact: n.west1@physics.oxford.ac.uk
Page viewed from http://www-numi.fnal.gov/offline_software/srt_public_context/WebDocs/debugging_optimising.html
Fermilab
Security, Privacy, Legal Fermi National Accelerator Laboratory