[OpenWalnut-Dev] Debugging and profiling of multi-threaded applications on POSIX systems

Mathias Goldau math at informatik.uni-leipzig.de
Thu Sep 23 15:36:07 CEST 2010


Hi,

getting the backtrace of all threads (e.g. investigate dead locks):
 1. compile with debug info
 1. run walnut and determine its PID
 1. `gdb -p PID`
 1. `thread apply all bt`

profile your application with valgrind and kcachegrind:
 1. compile with debug info
 1. `valgrind --tool=callgrind --separate-threads=yes bin/walnut`
   then you will have several options and control with `callgrind_control`
   - kill
   - stats
   - start stop
 1. `kcachegrind callgrind.out.PID-THREADNUM`
 1. TIP: you may compile with build type: RelWithDebugInfo, since valgrind may
be very very slow

math

-- 
Institut für Informatik
Universität Leipzig
Johannisgasse 26, 04103 Leipzig
Phone: +493419732283


More information about the OpenWalnut-Dev mailing list