|
From: Timur I. <tim...@go...> - 2013-01-06 20:17:26
|
Hi, I'm benchmarking Valgrind (as an instrumentation framework) on large apps and noticed it's sometimes too slow. For example, running DumpRenderTree* takes ~16.5 seconds under an "empty" tool (similar to "none") on my machine. The same binary runs for just 0.3 seconds without Valgrind. This is roughly a 50x slowdown, I'd expect it to be much smaller when doing little to no additional instrumentation. See a tool I've created for my benchmarking attached, it runs the same test in 17 seconds. Flipping "#if 0" -> "#if 1" gives the 16.5 seconds mentioned above. That means, almost all the overhead is inside Valgrind. Is there any way to optimize Valgrind for such usage? What I want is basically to instrument only a couple of .so modules, leaving anything else unchanged. Thanks! * - DumpRenderTree is one of the targets in a Chromium checkout. I've built a Release build of DRT and ran it like this: xvfb-run time ./valgrind-3.8.1/BUILD/bin/valgrind --tool=vgtool ../DumpRenderTree ../hello.html You can find the build instructions here: http://code.google.com/p/chromium/wiki/LinuxBuildInstructions and hello.html is just "<html><body>Hello world!</body></html>". I ran the tests on Intel Xeon E5620, Ubuntu 12.04, gcc 4.6.3. -- Timur Iskhodzhanov, Google Russia |