|
From: Rukhsana A. <ruk...@gm...> - 2017-05-24 15:55:58
|
Hi, Is there a mechanism in valgrind to entirely skip memcheck on a particular function? I would like memcheck to ignore a particular function because of the slowness associated when the function is executed under valgrind. I tried compiling my program with : VALGRIND_DISABLE_ERROR_REPORTING func(); VALGRIND_ENABLE_ERROR_REPORTING This doesn't solve the issue as it merely disables reporting errors. I suppose using VALGRIND_NON_SIMD_CALL is an option but am hesistant because of the header caveat on its usage: "Note that these client requests are not entirely reliable. " I looked at the user manual but wasn't able to locate any other relevant macro. Thanks -- -Rukhsana |
|
From: Tom H. <to...@co...> - 2017-05-24 16:16:44
|
On 24/05/17 16:55, Rukhsana Ansari wrote: > Is there a mechanism in valgrind to entirely skip memcheck on a > particular function? No, because it doesn't make any sense. In order for memcheck to work it needs to track the status of every individual bit of memory - as soon as code was allowed to run outside of memcheck changes could be made to memory that memcheck wouldn't know about and from then on all it's reports would be worthless. You would get false alerts about uninitialised memory where that memory had in fact been initialised while memcheck was disabled and wouldn't get alerts about memory that, for example, was freed during that period. Tom -- Tom Hughes (to...@co...) http://compton.nu/ |