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

Side by Side Diff: src/heap-profiler.cc

Issue 1037803002: Return timestamp of the last recorded interval to the caller of HeapProfiler::GetHeapStats (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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 unified diff | Download patch
« no previous file with comments | « src/heap-profiler.h ('k') | src/heap-snapshot-generator.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2009-2010 the V8 project authors. All rights reserved. 1 // Copyright 2009-2010 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/heap-profiler.h" 7 #include "src/heap-profiler.h"
8 8
9 #include "src/allocation-tracker.h" 9 #include "src/allocation-tracker.h"
10 #include "src/heap-snapshot-generator-inl.h" 10 #include "src/heap-snapshot-generator-inl.h"
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 ids_->UpdateHeapObjectsMap(); 84 ids_->UpdateHeapObjectsMap();
85 is_tracking_object_moves_ = true; 85 is_tracking_object_moves_ = true;
86 DCHECK(!is_tracking_allocations()); 86 DCHECK(!is_tracking_allocations());
87 if (track_allocations) { 87 if (track_allocations) {
88 allocation_tracker_.Reset(new AllocationTracker(ids_.get(), names_.get())); 88 allocation_tracker_.Reset(new AllocationTracker(ids_.get(), names_.get()));
89 heap()->DisableInlineAllocation(); 89 heap()->DisableInlineAllocation();
90 } 90 }
91 } 91 }
92 92
93 93
94 SnapshotObjectId HeapProfiler::PushHeapObjectsStats(OutputStream* stream) { 94 SnapshotObjectId HeapProfiler::PushHeapObjectsStats(OutputStream* stream,
95 return ids_->PushHeapObjectsStats(stream); 95 int64_t* timestamp_us) {
96 return ids_->PushHeapObjectsStats(stream, timestamp_us);
96 } 97 }
97 98
98 99
99 void HeapProfiler::StopHeapObjectsTracking() { 100 void HeapProfiler::StopHeapObjectsTracking() {
100 ids_->StopHeapObjectsTracking(); 101 ids_->StopHeapObjectsTracking();
101 if (is_tracking_allocations()) { 102 if (is_tracking_allocations()) {
102 allocation_tracker_.Reset(NULL); 103 allocation_tracker_.Reset(NULL);
103 heap()->EnableInlineAllocation(); 104 heap()->EnableInlineAllocation();
104 } 105 }
105 } 106 }
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 } 180 }
180 181
181 182
182 void HeapProfiler::ClearHeapObjectMap() { 183 void HeapProfiler::ClearHeapObjectMap() {
183 ids_.Reset(new HeapObjectsMap(heap())); 184 ids_.Reset(new HeapObjectsMap(heap()));
184 if (!is_tracking_allocations()) is_tracking_object_moves_ = false; 185 if (!is_tracking_allocations()) is_tracking_object_moves_ = false;
185 } 186 }
186 187
187 188
188 } } // namespace v8::internal 189 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/heap-profiler.h ('k') | src/heap-snapshot-generator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698