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

Unified Diff: src/log.cc

Issue 1400813003: Revert of improve perf_basic_prof filename reporting (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 2 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 | test/cctest/test-log.cc » ('j') | 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 ea69fb4bee3e71cecb6ae6a38f8dba69445b3657..b9eb577b2054f5c5e84d7b02f91425ff06522f65 100644
--- a/src/log.cc
+++ b/src/log.cc
@@ -123,9 +123,8 @@
}
void AppendInt(int n) {
- int space = kUtf8BufferSize - utf8_pos_;
- if (space <= 0) return;
- Vector<char> buffer(utf8_buffer_ + utf8_pos_, space);
+ Vector<char> buffer(utf8_buffer_ + utf8_pos_,
+ kUtf8BufferSize - utf8_pos_);
int size = SNPrintF(buffer, "%d", n);
if (size > 0 && utf8_pos_ + size <= kUtf8BufferSize) {
utf8_pos_ += size;
@@ -133,9 +132,8 @@
}
void AppendHex(uint32_t n) {
- int space = kUtf8BufferSize - utf8_pos_;
- if (space <= 0) return;
- Vector<char> buffer(utf8_buffer_ + utf8_pos_, space);
+ Vector<char> buffer(utf8_buffer_ + utf8_pos_,
+ kUtf8BufferSize - utf8_pos_);
int size = SNPrintF(buffer, "%x", n);
if (size > 0 && utf8_pos_ + size <= kUtf8BufferSize) {
utf8_pos_ += size;
@@ -147,7 +145,7 @@
private:
static const int kUtf8BufferSize = 512;
- static const int kUtf16BufferSize = kUtf8BufferSize;
+ static const int kUtf16BufferSize = 128;
int utf8_pos_;
char utf8_buffer_[kUtf8BufferSize];
« no previous file with comments | « no previous file | test/cctest/test-log.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698