Skip to content

Commit 52cba41

Browse files
ofrobotsMylesBorins
authored andcommittedOct 26, 2016
deps: backport 2bcbe2f from V8 upstream
Excessive buffering of perf map files in V8 could cause profiles to be missing symbols at times. Original commit message: switch perf and ll_prof loggers to line buffering BUG=v8:5015 [email protected],[email protected] Review-Url: https://codereview.chromium.org/2041243002 Cr-Commit-Position: refs/heads/master@{#36788} PR-URL: #7814 Reviewed-By: bnoordhuis - Ben Noordhuis <[email protected]>
1 parent 50acf72 commit 52cba41

File tree

2 files changed

+3
-11
lines changed

2 files changed

+3
-11
lines changed
 

‎deps/v8/include/v8-version.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#define V8_MAJOR_VERSION 4
1212
#define V8_MINOR_VERSION 5
1313
#define V8_BUILD_NUMBER 103
14-
#define V8_PATCH_LEVEL 41
14+
#define V8_PATCH_LEVEL 42
1515

1616
// Use 1 for candidates and 0 otherwise.
1717
// (Boolean macro values are not supported by all preprocessors.)

‎deps/v8/src/log.cc

+2-10
Original file line numberDiff line numberDiff line change
@@ -250,10 +250,6 @@ class PerfBasicLogger : public CodeEventLogger {
250250
static const char kFilenameFormatString[];
251251
static const int kFilenameBufferPadding;
252252

253-
// File buffer size of the low-level log. We don't use the default to
254-
// minimize the associated overhead.
255-
static const int kLogBufferSize = 2 * MB;
256-
257253
FILE* perf_output_handle_;
258254
};
259255

@@ -274,7 +270,7 @@ PerfBasicLogger::PerfBasicLogger()
274270
perf_output_handle_ =
275271
base::OS::FOpen(perf_dump_name.start(), base::OS::LogFileOpenMode);
276272
CHECK_NOT_NULL(perf_output_handle_);
277-
setvbuf(perf_output_handle_, NULL, _IOFBF, kLogBufferSize);
273+
setvbuf(perf_output_handle_, NULL, _IOLBF, 0);
278274
}
279275

280276

@@ -361,10 +357,6 @@ class LowLevelLogger : public CodeEventLogger {
361357
// Extension added to V8 log file name to get the low-level log name.
362358
static const char kLogExt[];
363359

364-
// File buffer size of the low-level log. We don't use the default to
365-
// minimize the associated overhead.
366-
static const int kLogBufferSize = 2 * MB;
367-
368360
void LogCodeInfo();
369361
void LogWriteBytes(const char* bytes, int size);
370362

@@ -389,7 +381,7 @@ LowLevelLogger::LowLevelLogger(const char* name)
389381
MemCopy(ll_name.start() + len, kLogExt, sizeof(kLogExt));
390382
ll_output_handle_ =
391383
base::OS::FOpen(ll_name.start(), base::OS::LogFileOpenMode);
392-
setvbuf(ll_output_handle_, NULL, _IOFBF, kLogBufferSize);
384+
setvbuf(ll_output_handle_, NULL, _IOLBF, 0);
393385

394386
LogCodeInfo();
395387
}

0 commit comments

Comments
 (0)