Bug 366817 - VALGRIND_MEMPOOL_CHANGE has a performance bug
Summary: VALGRIND_MEMPOOL_CHANGE has a performance bug
Status: REPORTED
Alias: None
Product: valgrind
Classification: Developer tools
Component: memcheck (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Julian Seward
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-08-16 08:08 UTC by kde-bug
Modified: 2017-05-05 14:46 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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²?