Prevent test-log.cc from creating log files.

R=dcarney@chromium.org
TEST=cctest/test-log/EquivalenceOfLoggingAndTraversal

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16852 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 6fc2875d
...@@ -771,6 +771,7 @@ DEFINE_bool(prof_browser_mode, true, ...@@ -771,6 +771,7 @@ DEFINE_bool(prof_browser_mode, true,
"Used with --prof, turns on browser-compatible mode for profiling.") "Used with --prof, turns on browser-compatible mode for profiling.")
DEFINE_bool(log_regexp, false, "Log regular expression execution.") DEFINE_bool(log_regexp, false, "Log regular expression execution.")
DEFINE_string(logfile, "v8.log", "Specify the name of the log file.") DEFINE_string(logfile, "v8.log", "Specify the name of the log file.")
DEFINE_bool(logfile_per_isolate, true, "Separate log files for each isolate.")
DEFINE_bool(ll_prof, false, "Enable low-level linux profiler.") DEFINE_bool(ll_prof, false, "Enable low-level linux profiler.")
DEFINE_string(gc_fake_mmap, "/tmp/__v8_gc__", DEFINE_string(gc_fake_mmap, "/tmp/__v8_gc__",
"Specify the name of the file for fake gc mmap used in ll_prof") "Specify the name of the file for fake gc mmap used in ll_prof")
......
...@@ -1765,15 +1765,14 @@ void Logger::LogAccessorCallbacks() { ...@@ -1765,15 +1765,14 @@ void Logger::LogAccessorCallbacks() {
static void AddIsolateIdIfNeeded(Isolate* isolate, StringStream* stream) { static void AddIsolateIdIfNeeded(Isolate* isolate, StringStream* stream) {
if (isolate->IsDefaultIsolate()) return; if (isolate->IsDefaultIsolate() || !FLAG_logfile_per_isolate) return;
stream->Add("isolate-%p-", isolate); stream->Add("isolate-%p-", isolate);
} }
static SmartArrayPointer<const char> PrepareLogFileName( static SmartArrayPointer<const char> PrepareLogFileName(
Isolate* isolate, const char* file_name) { Isolate* isolate, const char* file_name) {
if (strchr(file_name, '%') != NULL || if (strchr(file_name, '%') != NULL || !isolate->IsDefaultIsolate()) {
!isolate->IsDefaultIsolate()) {
// If there's a '%' in the log file name we have to expand // If there's a '%' in the log file name we have to expand
// placeholders. // placeholders.
HeapStringAllocator allocator; HeapStringAllocator allocator;
......
...@@ -91,6 +91,7 @@ class ScopedLoggerInitializer { ...@@ -91,6 +91,7 @@ class ScopedLoggerInitializer {
i::FLAG_log = true; i::FLAG_log = true;
i::FLAG_prof = true; i::FLAG_prof = true;
i::FLAG_logfile = i::Log::kLogToTemporaryFile; i::FLAG_logfile = i::Log::kLogToTemporaryFile;
i::FLAG_logfile_per_isolate = false;
return false; return false;
} }
......
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