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

Side by Side Diff: src/heap-profiler.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, 6 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 | Annotate | Revision Log
« no previous file with comments | « src/heap-profiler.h ('k') | src/profile-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 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 Isolate::Current()->heap_profiler()->StartHeapObjectsTrackingImpl(); 90 Isolate::Current()->heap_profiler()->StartHeapObjectsTrackingImpl();
91 } 91 }
92 92
93 93
94 void HeapProfiler::StopHeapObjectsTracking() { 94 void HeapProfiler::StopHeapObjectsTracking() {
95 ASSERT(Isolate::Current()->heap_profiler() != NULL); 95 ASSERT(Isolate::Current()->heap_profiler() != NULL);
96 Isolate::Current()->heap_profiler()->StopHeapObjectsTrackingImpl(); 96 Isolate::Current()->heap_profiler()->StopHeapObjectsTrackingImpl();
97 } 97 }
98 98
99 99
100 void HeapProfiler::PushHeapObjectsStats(v8::OutputStream* stream) { 100 SnapshotObjectId HeapProfiler::PushHeapObjectsStats(v8::OutputStream* stream) {
101 ASSERT(Isolate::Current()->heap_profiler() != NULL); 101 ASSERT(Isolate::Current()->heap_profiler() != NULL);
102 return Isolate::Current()->heap_profiler()->PushHeapObjectsStatsImpl(stream); 102 return Isolate::Current()->heap_profiler()->PushHeapObjectsStatsImpl(stream);
103 } 103 }
104 104
105 105
106 void HeapProfiler::DefineWrapperClass( 106 void HeapProfiler::DefineWrapperClass(
107 uint16_t class_id, v8::HeapProfiler::WrapperInfoCallback callback) { 107 uint16_t class_id, v8::HeapProfiler::WrapperInfoCallback callback) {
108 ASSERT(class_id != v8::HeapProfiler::kPersistentHandleNoClassId); 108 ASSERT(class_id != v8::HeapProfiler::kPersistentHandleNoClassId);
109 if (wrapper_callbacks_.length() <= class_id) { 109 if (wrapper_callbacks_.length() <= class_id) {
110 wrapper_callbacks_.AddBlock( 110 wrapper_callbacks_.AddBlock(
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 int type, 151 int type,
152 v8::ActivityControl* control) { 152 v8::ActivityControl* control) {
153 return TakeSnapshotImpl(snapshots_->names()->GetName(name), type, control); 153 return TakeSnapshotImpl(snapshots_->names()->GetName(name), type, control);
154 } 154 }
155 155
156 void HeapProfiler::StartHeapObjectsTrackingImpl() { 156 void HeapProfiler::StartHeapObjectsTrackingImpl() {
157 snapshots_->StartHeapObjectsTracking(); 157 snapshots_->StartHeapObjectsTracking();
158 } 158 }
159 159
160 160
161 void HeapProfiler::PushHeapObjectsStatsImpl(OutputStream* stream) { 161 SnapshotObjectId HeapProfiler::PushHeapObjectsStatsImpl(OutputStream* stream) {
162 snapshots_->PushHeapObjectsStats(stream); 162 return snapshots_->PushHeapObjectsStats(stream);
163 } 163 }
164 164
165 165
166 void HeapProfiler::StopHeapObjectsTrackingImpl() { 166 void HeapProfiler::StopHeapObjectsTrackingImpl() {
167 snapshots_->StopHeapObjectsTracking(); 167 snapshots_->StopHeapObjectsTracking();
168 } 168 }
169 169
170 170
171 int HeapProfiler::GetSnapshotsCount() { 171 int HeapProfiler::GetSnapshotsCount() {
172 HeapProfiler* profiler = Isolate::Current()->heap_profiler(); 172 HeapProfiler* profiler = Isolate::Current()->heap_profiler();
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 profiler->ResetSnapshots(); 204 profiler->ResetSnapshots();
205 } 205 }
206 206
207 207
208 void HeapProfiler::ObjectMoveEvent(Address from, Address to) { 208 void HeapProfiler::ObjectMoveEvent(Address from, Address to) {
209 snapshots_->ObjectMoveEvent(from, to); 209 snapshots_->ObjectMoveEvent(from, to);
210 } 210 }
211 211
212 212
213 } } // namespace v8::internal 213 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/heap-profiler.h ('k') | src/profile-generator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698