Index: src/log.h |
diff --git a/src/log.h b/src/log.h |
index 91331f04fc068c0ad3b16149a70bc85971896a14..303e352898a0cd76a8774be863fbe787e3b56d65 100644 |
--- a/src/log.h |
+++ b/src/log.h |
@@ -89,6 +89,7 @@ class JitLogger; |
class PerfBasicLogger; |
class LowLevelLogger; |
class PerfJitLogger; |
+class ProfilerListener; |
class Logger : public CodeEventListener { |
public: |
@@ -101,8 +102,16 @@ class Logger : public CodeEventListener { |
void SetCodeEventHandler(uint32_t options, |
JitCodeEventHandler event_handler); |
+ // Sets up ProfilerListener. |
+ void SetUpProfilerListener(); |
+ |
+ // Tear down ProfilerListener if it has no observers. |
+ void TearDownProfilerListener(); |
+ |
sampler::Sampler* sampler(); |
+ ProfilerListener* profiler_listener() { return profiler_listener_.get(); } |
+ |
// Frees resources acquired in SetUp. |
// When a temporary file is used for the log, returns its stream descriptor, |
// leaving the file open. |
@@ -332,6 +341,7 @@ class Logger : public CodeEventListener { |
PerfJitLogger* perf_jit_logger_; |
LowLevelLogger* ll_logger_; |
JitLogger* jit_logger_; |
+ std::unique_ptr<ProfilerListener> profiler_listener_; |
List<CodeEventListener*> listeners_; |
// Guards against multiple calls to TearDown() that can happen in some tests. |