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

Unified Diff: src/log-utils.cc

Issue 209028: Heap profiler: count the number of back references for objects. (Closed)
Patch Set: Comments addressed Created 11 years, 3 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 | « src/log-utils.h ('k') | test/cctest/test-heap-profiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/log-utils.cc
diff --git a/src/log-utils.cc b/src/log-utils.cc
index b31864be4695c752ebe210ad1ac77282c377a855..f280bfbe28a2a3ecc853cf5620b1a42d39fca5a0 100644
--- a/src/log-utils.cc
+++ b/src/log-utils.cc
@@ -310,6 +310,18 @@ void LogMessageBuilder::AppendDetailed(String* str, bool show_impl_info) {
}
+void LogMessageBuilder::AppendStringPart(const char* str, int len) {
+ if (pos_ + len > Log::kMessageBufferSize) {
+ len = Log::kMessageBufferSize - pos_;
+ ASSERT(len >= 0);
+ if (len == 0) return;
+ }
+ strncpy(Log::message_buffer_ + pos_, str, len);
+ pos_ += len;
+ ASSERT(pos_ <= Log::kMessageBufferSize);
+}
+
+
bool LogMessageBuilder::StoreInCompressor(LogRecordCompressor* compressor) {
return compressor->Store(Vector<const char>(Log::message_buffer_, pos_));
}
« no previous file with comments | « src/log-utils.h ('k') | test/cctest/test-heap-profiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698