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,
"Used with --prof, turns on browser-compatible mode for profiling.")
DEFINE_bool(log_regexp, false, "Log regular expression execution.")
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_string(gc_fake_mmap, "/tmp/__v8_gc__",
"Specify the name of the file for fake gc mmap used in ll_prof")
......
......@@ -1765,15 +1765,14 @@ void Logger::LogAccessorCallbacks() {
static void AddIsolateIdIfNeeded(Isolate* isolate, StringStream* stream) {
if (isolate->IsDefaultIsolate()) return;
if (isolate->IsDefaultIsolate() || !FLAG_logfile_per_isolate) return;
stream->Add("isolate-%p-", isolate);
}
static SmartArrayPointer<const char> PrepareLogFileName(
Isolate* isolate, const char* file_name) {
if (strchr(file_name, '%') != NULL ||
!isolate->IsDefaultIsolate()) {
if (strchr(file_name, '%') != NULL || !isolate->IsDefaultIsolate()) {
// If there's a '%' in the log file name we have to expand
// placeholders.
HeapStringAllocator allocator;
......
......@@ -91,6 +91,7 @@ class ScopedLoggerInitializer {
i::FLAG_log = true;
i::FLAG_prof = true;
i::FLAG_logfile = i::Log::kLogToTemporaryFile;
i::FLAG_logfile_per_isolate = 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