free() calls taking 100us on release builds |
|||
Issue descriptionWhile investigating some performance issues, I found that free() was taking upwards of 100us for each call (for large free blocks allocated by V8's zone allocator). This was unexpected since free should be relatively cheap even when freeing large blocks of memory. After investigating with Primiano we found that this is due to the tracked_objects.cc initializing ThreadHeapUsageTracker heap tracking unconditionally even on release builds. It doesn't seem reasonable that we enable heap tracking on release builds which in-turn changes the performance profile of free calls by 10-100x. Could we put this behind a runtime flag which is enabled when the user wants to profile heap usage?
,
Feb 14 2017
Sorry guys to trip you up like this. I like the cmdline argument.
,
Feb 14 2017
,
Feb 16 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/014a8015a054e4f8b21f7b1a163297bd9f12c22a commit 014a8015a054e4f8b21f7b1a163297bd9f12c22a Author: siggi <siggi@chromium.org> Date: Thu Feb 16 16:23:54 2017 Only enable heap tracking under --enable-heap-profiling=task-profiler. BUG= 692045 Review-Url: https://codereview.chromium.org/2695013005 Cr-Commit-Position: refs/heads/master@{#450984} [modify] https://crrev.com/014a8015a054e4f8b21f7b1a163297bd9f12c22a/base/base_switches.cc [modify] https://crrev.com/014a8015a054e4f8b21f7b1a163297bd9f12c22a/base/base_switches.h [modify] https://crrev.com/014a8015a054e4f8b21f7b1a163297bd9f12c22a/base/trace_event/memory_dump_manager.cc [modify] https://crrev.com/014a8015a054e4f8b21f7b1a163297bd9f12c22a/base/tracked_objects.cc
,
Feb 16 2017
Awesome, thanks for the quick fix Siggi!
,
Feb 21 2017
|
|||
►
Sign in to add a comment |
|||
Comment 1 by primiano@chromium.org
, Feb 14 2017