• Peter Marshall's avatar
    [cpu-profiler] Reduce size of circular queue to 512 KiB · 9fc55a9d
    Peter Marshall authored
    This queue is used for transferring tick samples between the foreground
    thread which creates them and the background thread which processes
    them.
    
    I've tested this on the node server example that we are using to
    measure memory use and found that we never fill the queue at this size.
    
    The load factor of the queue is basically a measure of how fast the
    producer pushes to it and how fast the consumer processes samples from
    it. To load test the configuration a bit I reduced the sampling
    interval from 1000us (1000 samples/sec) to 50us (20,000 samples/sec).
    At this rate we still only use 196/251 available slots in the queue at
    peak load (measurement taken by keeping a running max of #slots used,
    taken at StartEnqueue()).
    
    The default sampling interval is 1000us. 512 KiB ought be enough for
    anybody!
    
    Bug: v8:7719
    
    Change-Id: I93cc1119d3549a319d2db8b831781712bfb88613
    Reviewed-on: https://chromium-review.googlesource.com/c/1397704Reviewed-by: 's avatarAlexei Filippov <alph@chromium.org>
    Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
    Commit-Queue: Peter Marshall <petermarshall@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#58600}
    9fc55a9d
Name
Last commit
Last update
benchmarks Loading commit data...
build_overrides Loading commit data...
custom_deps Loading commit data...
docs Loading commit data...
gni Loading commit data...
include Loading commit data...
infra Loading commit data...
samples Loading commit data...
src Loading commit data...
test Loading commit data...
testing Loading commit data...
third_party Loading commit data...
tools Loading commit data...
.clang-format Loading commit data...
.clang-tidy Loading commit data...
.editorconfig Loading commit data...
.git-blame-ignore-revs Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.gn Loading commit data...
.vpython Loading commit data...
.ycm_extra_conf.py Loading commit data...
AUTHORS Loading commit data...
BUILD.gn Loading commit data...
CODE_OF_CONDUCT.md Loading commit data...
ChangeLog Loading commit data...
DEPS Loading commit data...
LICENSE Loading commit data...
LICENSE.fdlibm Loading commit data...
LICENSE.strongtalk Loading commit data...
LICENSE.v8 Loading commit data...
LICENSE.valgrind Loading commit data...
OWNERS Loading commit data...
PRESUBMIT.py Loading commit data...
README.md Loading commit data...
WATCHLISTS Loading commit data...
codereview.settings Loading commit data...
snapshot_toolchain.gni Loading commit data...