Commit 19fdbc26 authored by loislo@chromium.org's avatar loislo@chromium.org

Logger: extract CodeEventLogger classes.

The idea is to extract all the CodeEvent loggers into separate classes
make an interface for code events and put them into a listeners array.

I extracted code that works with name_buffer into a separate base class CodeEventLogger.
And made JitLogger, LowLevelLogger and new CodeMap its descendants.

As a side effect I converted NameBuffer into nested class of CodeEventLogger
and converted NameMap into nested class of CodeMap.

BUG=260203
R=yangguo@chromium.org, yurys@chromium.org

Review URL: https://codereview.chromium.org/19795002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15784 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent a9c074b8
This diff is collapsed.
......@@ -70,6 +70,7 @@ namespace internal {
// tick profiler requires code events, so --prof implies --log-code.
// Forward declarations.
class CodeAddressMap;
class CompilationInfo;
class CpuProfiler;
class Isolate;
......@@ -373,9 +374,6 @@ class Logger {
void LogFailure();
private:
class NameBuffer;
class NameMap;
explicit Logger(Isolate* isolate);
~Logger();
......@@ -402,14 +400,6 @@ class Logger {
// Helper method. It resets name_buffer_ and add tag name into it.
void InitNameBuffer(LogEventsAndTags tag);
// Helper method. It push recorded buffer into different handlers.
void LogRecordedBuffer(Code*, SharedFunctionInfo*);
// Helper method. It dumps name into name_buffer_.
void AppendName(Name* name);
void RegisterSnapshotCodeName(Code* code, const char* name, int name_size);
// Emits a profiler tick event. Used by the profiler thread.
void TickEvent(TickSample* sample, bool overflow);
......@@ -452,10 +442,7 @@ class Logger {
Log* log_;
LowLevelLogger* ll_logger_;
JitLogger* jit_logger_;
NameBuffer* name_buffer_;
NameMap* address_to_name_map_;
CodeAddressMap* code_address_map_;
// Guards against multiple calls to TearDown() that can happen in some tests.
// 'true' between SetUp() and TearDown().
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment