Commit 2bcbe2fe authored by ofrobots's avatar ofrobots Committed by Commit bot

switch perf and ll_prof loggers to line buffering

BUG=v8:5015
R=jarin@chromium.org,yangguo@chromium.org

Review-Url: https://codereview.chromium.org/2041243002
Cr-Commit-Position: refs/heads/master@{#36788}
parent 764d4e61
......@@ -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();
}
......
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