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

Unified Diff: src/log.cc

Issue 2041243002: switch perf and ll_prof loggers to line buffering (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/log.cc
diff --git a/src/log.cc b/src/log.cc
index 201a9ef9be65fa269e1a65a96e1a153d9b39eda1..156fc847ea63a5361bc4f016bd274832af1c1f8f 100644
--- a/src/log.cc
+++ b/src/log.cc
@@ -241,10 +241,6 @@ class PerfBasicLogger : public CodeEventLogger {
static const char kFilenameFormatString[];
static const int kFilenameBufferPadding;
- // File buffer size of the low-level log. We don't use the default to
- // minimize the associated overhead.
- static const int kLogBufferSize = 2 * MB;
-
FILE* perf_output_handle_;
};
@@ -265,7 +261,7 @@ PerfBasicLogger::PerfBasicLogger()
perf_output_handle_ =
base::OS::FOpen(perf_dump_name.start(), base::OS::LogFileOpenMode);
CHECK_NOT_NULL(perf_output_handle_);
- setvbuf(perf_output_handle_, NULL, _IOFBF, kLogBufferSize);
+ setvbuf(perf_output_handle_, NULL, _IOLBF, 0);
}
@@ -336,10 +332,6 @@ class LowLevelLogger : public CodeEventLogger {
// Extension added to V8 log file name to get the low-level log name.
static const char kLogExt[];
- // File buffer size of the low-level log. We don't use the default to
- // minimize the associated overhead.
- static const int kLogBufferSize = 2 * MB;
-
void LogCodeInfo();
void LogWriteBytes(const char* bytes, int size);
@@ -364,7 +356,7 @@ LowLevelLogger::LowLevelLogger(const char* name)
MemCopy(ll_name.start() + len, kLogExt, sizeof(kLogExt));
ll_output_handle_ =
base::OS::FOpen(ll_name.start(), base::OS::LogFileOpenMode);
- setvbuf(ll_output_handle_, NULL, _IOFBF, kLogBufferSize);
+ setvbuf(ll_output_handle_, NULL, _IOLBF, 0);
LogCodeInfo();
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698