Bug 366817

Summary: VALGRIND_MEMPOOL_CHANGE has a performance bug
Product: [Developer tools] valgrind Reporter: kde-bug
Component: memcheckAssignee: Julian Seward <jseward>
Status: REPORTED ---    
Severity: normal CC: ivosh
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description kde-bug 2016-08-16 08:08:39 UTC
Using VALGRIND_MEMPOOL_CHANGE is prohibitively slow as it (twice) calls check_mempool_sane().

Looking at r15577 of memcheck/mc_malloc_wrappers.c, I suggest adding "if (MP_DETAILED_SANITY_CHECKS" before the two calls to check_mempool_sane() in MC_(mempool_change).

This speeds up my application by more than a factor of 10 or so…

There are more unconditional calls to check_mempool_sane() in that file; maybe some of them should be reconsidered as well?

Reproducible: Always
Comment 1 Julian Seward 2016-09-15 06:59:41 UTC
Do you have a suggested patch that we could look at?  That would be helpful.
Comment 2 Julian Seward 2016-10-19 11:59:15 UTC
ping?
Comment 3 Ivo Raisr 2017-05-05 14:46:03 UTC
ping²?