• kschimpf's avatar
    Localize counter class member functions. · f073a20b
    kschimpf authored
    This CL takes advantage of the fact that StatsCounter is now local to
    the Counters class. This includes:
    
    1) Method StatsTable::SetCreateHistogramFunction() was only called in
    one spot (in api.cc), which also called Counters::ResetHistograms()
    and Counters::InitializeHistorgram(). InitializeHistogram can be
    folded into Histogram.Reset().
    
    2) Since Histogram::Reset() now regenerats the histogram, we no longer
    need the field lookup_done_. Therefore there is no longer a race
    between updating ptr_ and lookup_done_, making the Histogram class
    thread safe.
    
    3) Made the constructors of several classes private (except for class
    Counters), minimizing the scope that they are used. When the couldn't
    be moved, add comment that they were public only for test cases.
    
    4) Removed the need for a mutex lock on StatsCounter::Reset(), since
    it is now guaranteed to only be called when
    StatsTable::SetCounterFunction() is called.
    
    BUG=v8:6361
    CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_chromium_rel_ng
    
    Review-Url: https://codereview.chromium.org/2918703002
    Cr-Commit-Position: refs/heads/master@{#45791}
    f073a20b
Name
Last commit
Last update
..
api Loading commit data...
asmjs Loading commit data...
base Loading commit data...
compiler Loading commit data...
compiler-dispatcher Loading commit data...
heap Loading commit data...
interpreter Loading commit data...
libplatform Loading commit data...
parser Loading commit data...
wasm Loading commit data...
zone Loading commit data...
BUILD.gn Loading commit data...
DEPS Loading commit data...
cancelable-tasks-unittest.cc Loading commit data...
char-predicates-unittest.cc Loading commit data...
counters-unittest.cc Loading commit data...
eh-frame-iterator-unittest.cc Loading commit data...
eh-frame-writer-unittest.cc Loading commit data...
locked-queue-unittest.cc Loading commit data...
object-unittest.cc Loading commit data...
register-configuration-unittest.cc Loading commit data...
run-all-unittests.cc Loading commit data...
source-position-table-unittest.cc Loading commit data...
test-helpers.cc Loading commit data...
test-helpers.h Loading commit data...
test-utils.cc Loading commit data...
test-utils.h Loading commit data...
unicode-unittest.cc Loading commit data...
unittests.gyp Loading commit data...
unittests.isolate Loading commit data...
unittests.status Loading commit data...
value-serializer-unittest.cc Loading commit data...