Skip to content

Commit e82e804

Browse files
committed
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 342a85b commit e82e804

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 5
1212
#define V8_MINOR_VERSION 0
1313
#define V8_BUILD_NUMBER 71
14-
#define V8_PATCH_LEVEL 57
14+
#define V8_PATCH_LEVEL 58
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
@@ -248,10 +248,6 @@ class PerfBasicLogger : public CodeEventLogger {
248248
static const char kFilenameFormatString[];
249249
static const int kFilenameBufferPadding;
250250

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

@@ -272,7 +268,7 @@ PerfBasicLogger::PerfBasicLogger()
272268
perf_output_handle_ =
273269
base::OS::FOpen(perf_dump_name.start(), base::OS::LogFileOpenMode);
274270
CHECK_NOT_NULL(perf_output_handle_);
275-
setvbuf(perf_output_handle_, NULL, _IOFBF, kLogBufferSize);
271+
setvbuf(perf_output_handle_, NULL, _IOLBF, 0);
276272
}
277273

278274

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

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

@@ -387,7 +379,7 @@ LowLevelLogger::LowLevelLogger(const char* name)
387379
MemCopy(ll_name.start() + len, kLogExt, sizeof(kLogExt));
388380
ll_output_handle_ =
389381
base::OS::FOpen(ll_name.start(), base::OS::LogFileOpenMode);
390-
setvbuf(ll_output_handle_, NULL, _IOFBF, kLogBufferSize);
382+
setvbuf(ll_output_handle_, NULL, _IOLBF, 0);
391383

392384
LogCodeInfo();
393385
}

0 commit comments

Comments
 (0)