1
Running Valgrind
- n multiple processors:
a prototype
Philippe Waroquiers FOSDEM 2015 valgrind devroom
Running Valgrind on multiple processors: a prototype Philippe - - PowerPoint PPT Presentation
Running Valgrind on multiple processors: a prototype Philippe Waroquiers FOSDEM 2015 valgrind devroom 1 Valgrind and threads Valgrind runs properly multi-threaded applications But (mostly) runs them using a single CORE Valgrind
1
Philippe Waroquiers FOSDEM 2015 valgrind devroom
2
single-threaded applications are slowed down by a factor 4x to 100x or more
typically around 5 .. 10%
Tool “runtime” code Generated/instrumented code (from program to run) JIT decoder and compiler, malloc replacement, scheduler, ...
TOOL GUEST Valgrind CORE layer
Tool instrument function
aspacemgr, CORE statistics, …
memcheck VA bits data structures, …
Valgrind global variables/all tool data structures/...
(default) or via futex ('ticket lock'), cfr --fair-sched
locks'
current Valgrind, the rw lock will be efficient enough for parallel use
accessed when running JIT-ted guest code
valgrind just keeps the lock
Write mode => a lot more (expensive) 'lock/unlock'
translated code) is in fact doing many updates e.g.
– statistical counters – fast cache associating guest code with JIT code – Translation chaining – ...
an 'inner parallel valgrind' under an outer helgrind
it is now easy/ier to run Valgrind under Valgrind
prototype parallel Valgrind
replaced by RW lock code copied/modified from glibc
16
Julian Seward
e.g. Valgrind malloc, error mgr, stack unwind, ...