Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(777)

Unified Diff: src/log.h

Issue 20406: First step in refactoring the logging system to allow the logging messages to... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/log.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/log.h
===================================================================
--- src/log.h (revision 1277)
+++ src/log.h (working copy)
@@ -69,6 +69,7 @@
class Profiler;
class Semaphore;
class SlidingStateWindow;
+class LogMessageBuilder;
#undef LOG
#ifdef ENABLE_LOGGING_AND_PROFILING
@@ -227,8 +228,15 @@
// Logs a StringEvent regardless of whether FLAG_log is true.
static void UncheckedStringEvent(const char* name, const char* value);
- // When logging is active, logfile_ refers the file
- // events are written to.
+ // Size of buffer used for formatting log messages.
+ static const int kMessageBufferSize = 256;
+
+ // Buffer used for formatting log messages. This is a singleton buffer and
+ // mutex_ should be acquired before using it.
+ static char* message_buffer_;
+
+ // When logging is active, logfile_ refers the file events are written to.
+ // mutex_ should be acquired before using logfile_.
static FILE* logfile_;
// The sampler used by the profiler and the sliding state window.
@@ -240,7 +248,7 @@
static Profiler* profiler_;
// mutex_ is a Mutex used for enforcing exclusive
- // access to the log file.
+ // access to the formatting buffer and the log file.
static Mutex* mutex_;
// A stack of VM states.
@@ -252,6 +260,7 @@
// Internal implementation classes with access to
// private members.
+ friend class LogMessageBuilder;
friend class EventLog;
friend class TimeLog;
friend class Profiler;
« no previous file with comments | « no previous file | src/log.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698