|
From: Dirk R. <dre...@ia...> - 2005-09-12 14:29:33
|
Hi Josef, On Sun, 2005-09-11 at 20:30 -0700, valgrind-users- re...@li... wrote: > > Aside from that, with VG, you could start your tool in non-instrument > mode, and switch to full instrumentation later, by invalidating VG's > translation cache. Thus your program first would run at speed of > "valgrind --tool=none". That sounds interesting, but for a slightly different reason. I'm trying to callgrind a program that takes quite a long time to initialize, and the initialization clutters up the profile. How do I start a program with none and switch to callgrind after the init phase? Thanks Dirk |
|
From: Dirk R. <dre...@ia...> - 2005-09-13 00:27:06
|
Hi Josef, On Mon, 2005-09-12 at 14:46 -0700, valgrind-users- re...@li... wrote: > > This is done under control of callgrind itself (on VG 2.4.1): > Start with > callgrind --instr-atstart=no ... > Full instrumentation can be switched on either interactive with > > callgrind_control -i on > > or with a client request in your code. > Include "callgrind.h" and insert at the point you want full profiling > > CALLGRIND_START_INSTRUMENTATION(); > > You can switch on/off instrumentation multiple times as you want (via > ... -i off and CALLGRIND_STOP_INSTRUMENTATION() ). > > Note that the produced call graph will only contain functions executed while > full instrumentation is on. which is exactly what I want. Thanks for the hint, it's working perfectly! Yours Dirk |
|
From: Josef W. <Jos...@gm...> - 2005-09-12 16:55:29
|
On Monday 12 September 2005 16:29, Dirk Reiners wrote: > Hi Josef, > > On Sun, 2005-09-11 at 20:30 -0700, valgrind-users- > > re...@li... wrote: > > Aside from that, with VG, you could start your tool in non-instrument > > mode, and switch to full instrumentation later, by invalidating VG's > > translation cache. Thus your program first would run at speed of > > "valgrind --tool=none". > > That sounds interesting, but for a slightly different reason. I'm trying > to callgrind a program that takes quite a long time to initialize, and > the initialization clutters up the profile. > > How do I start a program with none and switch to callgrind after the > init phase? This is done under control of callgrind itself (on VG 2.4.1): Start with callgrind --instr-atstart=no ... Full instrumentation can be switched on either interactive with callgrind_control -i on or with a client request in your code. Include "callgrind.h" and insert at the point you want full profiling CALLGRIND_START_INSTRUMENTATION(); You can switch on/off instrumentation multiple times as you want (via ... -i off and CALLGRIND_STOP_INSTRUMENTATION() ). Note that the produced call graph will only contain functions executed while full instrumentation is on. Josef > > Thanks > > Dirk > > > > > ------------------------------------------------------- > SF.Net email is Sponsored by the Better Software Conference & EXPO > September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices > Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA > Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf > _______________________________________________ > Valgrind-users mailing list > Val...@li... > https://lists.sourceforge.net/lists/listinfo/valgrind-users |