Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MB-44539: Reduce cost of MemoryAllocator 'read bytes allocated'
MemoryTrackingAllocator::getBytesAllocated returns a shared_ptr meaning all calls to getBytesAllocated result in ref count inc/dec. This is visible in profiling and accumulated 1.2% of a front-end thread time. Commit changes getBytesAllocated to return the size so that functions like Checkpoint::getMemoryOverhead don't copy shared_ptr objects and inc/dec ref-counts. Change-Id: I62080b160f1eaa8fde37212a1aeacf5e17ccfa8d Reviewed-on: http://review.couchbase.org/c/kv_engine/+/148275 Reviewed-by: Dave Rigby <daver@couchbase.com> Tested-by: Build Bot <build@couchbase.com>
- Loading branch information
1 parent
113471f
commit 3e32796
Showing
6 changed files
with
44 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters