class Recorder
Defined at line 31 of file ../../src/performance/memory/sampler/instrumentation/recorder.h
Allocation recorder. This class is designed to be initialized in
static storage, to be thread safe, and to be suitable for use
during an allocation or a deallocation (by being safe to call
from within the scudo allocation hooks).
It establishes a FIDL connection to a sampling profiler on
startup, reports allocations and deallocations, and relevant
information to support symbolization of the collected profiles.
Public Members
static const size_t kSamplingIntervalBytes
Public Methods
void Recorder (const Recorder & )
Defined at line 33 of file ../../src/performance/memory/sampler/instrumentation/recorder.h
void Recorder (Recorder && )
Defined at line 33 of file ../../src/performance/memory/sampler/instrumentation/recorder.h
Recorder & operator= (const Recorder & )
Defined at line 33 of file ../../src/performance/memory/sampler/instrumentation/recorder.h
Recorder & operator= (Recorder && )
Defined at line 33 of file ../../src/performance/memory/sampler/instrumentation/recorder.h
Recorder * Get ()
Returns a reference to the singleton object, initializing (and
blocking) it if necessary.
Defined at line 60 of file ../../src/performance/memory/sampler/instrumentation/recorder.cc
Recorder * GetIfReady ()
Returns a pointer to the singleton object if it is initialized;
returns nullptr otherwise.
Defined at line 66 of file ../../src/performance/memory/sampler/instrumentation/recorder.cc
void MaybeRecordAllocation (void * address, size_t size)
Decides whether to discard or sample this allocation, and acts
appropriately.
Defined at line 73 of file ../../src/performance/memory/sampler/instrumentation/recorder.cc
void MaybeForgetAllocation (void * address)
Decides whether to discard or sample this deallocation, and acts
appropriately.
Defined at line 103 of file ../../src/performance/memory/sampler/instrumentation/recorder.cc
void SetModulesInfo ()
Collects the module layout of the current process and
communicates it to the profiler.
Defined at line 133 of file ../../src/performance/memory/sampler/instrumentation/recorder.cc
Recorder CreateRecorderForTesting (fidl::SyncClient<fuchsia_memory_sampler::Sampler> client, std::function<PoissonSampler &()> get_poisson_sampler)
Convenience factory method for use in tests. This eschews the
singleton interface, and supports providing a custom FIDL
client. It does not perform any of the initialisations handled by
the singleton interface. This should not be used outside of tests.
Defined at line 186 of file ../../src/performance/memory/sampler/instrumentation/recorder.cc