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

Unified Diff: src/profile-generator.cc

Issue 10110001: Push heap stats as HeapStatsUpdate struct instead of raw array of uint32_t values. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fields of HeapStatsUpdate struct were commented. Created 8 years, 8 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/profile-generator.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/profile-generator.cc
diff --git a/src/profile-generator.cc b/src/profile-generator.cc
index 5a5531a7b6d5981fbf56670f9c2a3047b734ddfa..a3ba6fff20f0d4150ddea1154b5cd1a7c1f0dc83 100644
--- a/src/profile-generator.cc
+++ b/src/profile-generator.cc
@@ -1403,7 +1403,7 @@ void HeapObjectsMap::PushHeapObjectsStats(OutputStream* stream) {
UpdateHeapObjectsMap();
time_intervals_.Add(TimeInterval(next_id_));
int prefered_chunk_size = stream->GetChunkSize();
- List<uint32_t> stats_buffer;
+ List<v8::HeapStatsUpdate> stats_buffer;
ASSERT(!entries_.is_empty());
EntryInfo* entry_info = &entries_.first();
EntryInfo* end_entry_info = &entries_.last() + 1;
@@ -1422,11 +1422,12 @@ void HeapObjectsMap::PushHeapObjectsStats(OutputStream* stream) {
static_cast<uint32_t>(entry_info - start_entry_info);
if (time_interval.count != entries_count ||
time_interval.size != entries_size) {
- stats_buffer.Add(time_interval_index);
- stats_buffer.Add(time_interval.count = entries_count);
- stats_buffer.Add(time_interval.size = entries_size);
+ stats_buffer.Add(v8::HeapStatsUpdate(
+ time_interval_index,
+ time_interval.count = entries_count,
+ time_interval.size = entries_size));
if (stats_buffer.length() >= prefered_chunk_size) {
- OutputStream::WriteResult result = stream->WriteUint32Chunk(
+ OutputStream::WriteResult result = stream->WriteHeapStatsChunk(
&stats_buffer.first(), stats_buffer.length());
if (result == OutputStream::kAbort) return;
stats_buffer.Clear();
@@ -1435,8 +1436,8 @@ void HeapObjectsMap::PushHeapObjectsStats(OutputStream* stream) {
}
ASSERT(entry_info == end_entry_info);
if (!stats_buffer.is_empty()) {
- OutputStream::WriteResult result =
- stream->WriteUint32Chunk(&stats_buffer.first(), stats_buffer.length());
+ OutputStream::WriteResult result = stream->WriteHeapStatsChunk(
+ &stats_buffer.first(), stats_buffer.length());
if (result == OutputStream::kAbort) return;
}
stream->EndOfStream();
« no previous file with comments | « src/profile-generator.h ('k') | test/cctest/test-heap-profiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698