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

Unified Diff: src/profile-generator.cc

Issue 10444137: Expose last seen heap object id via v8 public api. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: test was added Created 8 years, 7 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 0fe7499d70abb2bc4bd75fe9b94c20c759536d46..69ef082dce09da266bc4300b4781a387f25e854a 100644
--- a/src/profile-generator.cc
+++ b/src/profile-generator.cc
@@ -1357,7 +1357,7 @@ void HeapObjectsMap::UpdateHeapObjectsMap() {
}
-void HeapObjectsMap::PushHeapObjectsStats(OutputStream* stream) {
+SnapshotObjectId HeapObjectsMap::PushHeapObjectsStats(OutputStream* stream) {
UpdateHeapObjectsMap();
time_intervals_.Add(TimeInterval(next_id_));
int prefered_chunk_size = stream->GetChunkSize();
@@ -1387,7 +1387,7 @@ void HeapObjectsMap::PushHeapObjectsStats(OutputStream* stream) {
if (stats_buffer.length() >= prefered_chunk_size) {
OutputStream::WriteResult result = stream->WriteHeapStatsChunk(
&stats_buffer.first(), stats_buffer.length());
- if (result == OutputStream::kAbort) return;
+ if (result == OutputStream::kAbort) return last_assigned_id();
stats_buffer.Clear();
}
}
@@ -1396,9 +1396,10 @@ void HeapObjectsMap::PushHeapObjectsStats(OutputStream* stream) {
if (!stats_buffer.is_empty()) {
OutputStream::WriteResult result = stream->WriteHeapStatsChunk(
&stats_buffer.first(), stats_buffer.length());
- if (result == OutputStream::kAbort) return;
+ if (result == OutputStream::kAbort) return last_assigned_id();
}
stream->EndOfStream();
+ return last_assigned_id();
}
« 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