How can I test a particular part of my program using valgrind(and perf, if the same principles apply)? I'm asking this because perf ./progname tests the whole program.
I cannot remove the other parts because the part I need to test depends on them.
Thanks
You can't run part of a program under Valgrind; Valgrind is an all or nothing affair.
What you can do is to tell it to ignore errors you aren't interested in (because they're in a part of the program you can't fix, for example). To do this, check the Valgrind Suppression Howto: http://wiki.wxwidgets.org/Valgrind_Suppression_File_Howto
This won't speed anything up though, so if speed is your motiviation, this won't help.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With