Reviewers: vitaflo,
Description:
Move Logger to isolate, keep Log a per-process instance.
Logger and Profiler are now per-isolate.
Log (the actual memory buffer or file) is per-process, already threadsafe.
Accessed by multiple Loggers. Since there is a callback from a single Log to
multiple Loggers, added a Log::RegisterLogger/UnregisterLogger that keeps a
list
of Loggers to invoke the callback on. Callback (Logger::LogFailure()) is
used in
case Log is overflown so Loggers should stop profilers.
Log is Initialize()'ed when first Logger connects and Close()'d when last
Logger
disconnects.
Also, former Logger::Setup() which initialized both Log and Logger is split
into
2 functions: Log::Initialize() and Logger::Setup().
globals.h, TRACK_MEMORY macro - I couldn't figure out how to re-arrange .h
files
in a simple way to allow the Isolate be included before this macros
definition.
Don't see how, so added static functions to the Logger that redirect to the
non-static ones for this specific case.
Loggers do not yet prefix log entries with isolate ids, this is yet to be
implemented.
Please review this at http://codereview.chromium.org/2813030/show
Affected files:
M src/api.cc
M src/codegen.cc
M src/compiler.cc
M src/cpu-profiler.cc
M src/debug.cc
M src/globals.h
M src/isolate.h
M src/isolate.cc
M src/log-utils.h
M src/log-utils.cc
M src/log.h
M src/log.cc
M src/runtime.cc
M src/vm-state-inl.h
M test/cctest/test-log.cc
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev