class Recorder
Defined at line 33 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 35 of file ../../src/performance/memory/sampler/instrumentation/recorder.h
void Recorder (Recorder && )
Defined at line 35 of file ../../src/performance/memory/sampler/instrumentation/recorder.h
Recorder & operator= (const Recorder & )
Defined at line 35 of file ../../src/performance/memory/sampler/instrumentation/recorder.h
Recorder & operator= (Recorder && )
Defined at line 35 of file ../../src/performance/memory/sampler/instrumentation/recorder.h
bool is_disabled ()
Returns true if the recorder has disconnected from the profiler.
Defined at line 64 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 74 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 80 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 110 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 231 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 333 of file ../../src/performance/memory/sampler/instrumentation/recorder.cc
Recorder CreateRecorderForTesting (fidl::SyncClient<fuchsia_memory_sampler::Sampler>client,std::function<PoissonSampler &()>get_poisson_sampler,booluse_socket)
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 388 of file ../../src/performance/memory/sampler/instrumentation/recorder.cc
void Disconnect ()
Disconnects the recorder from the profiler and disables all subsequent recording.
Defined at line 82 of file ../../src/performance/memory/sampler/instrumentation/recorder.cc
Friends
class RecorderTestPeer