Skip to content

Commit 03ef3cd

Browse files
ofrobotsCommit bot
authored andcommitted
improve perf_basic_prof filename reporting
The buffer used for appending filenames to the string printed to the perf_basic_prof log was unnecessarily too small. Bump it up to be at least kUtf8BufferSize. Truncation of filenames makes it really hard to work with profiles gathered on Node.js. Because of the way Node.js works, you can have node module dependencies in deeply nested directories. The last thing you want when investigating a performance problem is to have script names be truncated. This patch is a stop-gap. Ideally, I want no truncation of the filename at all and use a dynamically growing buffer. That would be a larger change, and I wanted to have a quick fix available that can be back-ported to Node.js LTS release. R=yangguo@chromium.org,yurys@chromium.org BUG= Review URL: https://codereview.chromium.org/1388543002 Cr-Commit-Position: refs/heads/master@{#31092}
1 parent 8708e4e commit 03ef3cd

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/log.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ class CodeEventLogger::NameBuffer {
145145

146146
private:
147147
static const int kUtf8BufferSize = 512;
148-
static const int kUtf16BufferSize = 128;
148+
static const int kUtf16BufferSize = kUtf8BufferSize;
149149

150150
int utf8_pos_;
151151
char utf8_buffer_[kUtf8BufferSize];

0 commit comments

Comments
 (0)