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

Side by Side Diff: src/api.cc

Issue 1618693004: Revert "Revert of [profiler] Implement POC Sampling Heap Profiler (patchset #12 id:220001 of https:… (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add flag to suppress randomness from sampling heap profiler tests Created 4 years, 11 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 | « include/v8-profiler.h ('k') | src/flag-definitions.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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/api.h" 5 #include "src/api.h"
6 6
7 #include <string.h> // For memcpy, strlen. 7 #include <string.h> // For memcpy, strlen.
8 #ifdef V8_USE_ADDRESS_SANITIZER 8 #ifdef V8_USE_ADDRESS_SANITIZER
9 #include <sanitizer/asan_interface.h> 9 #include <sanitizer/asan_interface.h>
10 #endif // V8_USE_ADDRESS_SANITIZER 10 #endif // V8_USE_ADDRESS_SANITIZER
(...skipping 8259 matching lines...) Expand 10 before | Expand all | Expand 10 after
8270 } 8270 }
8271 8271
8272 8272
8273 SnapshotObjectId HeapProfiler::GetHeapStats(OutputStream* stream, 8273 SnapshotObjectId HeapProfiler::GetHeapStats(OutputStream* stream,
8274 int64_t* timestamp_us) { 8274 int64_t* timestamp_us) {
8275 i::HeapProfiler* heap_profiler = reinterpret_cast<i::HeapProfiler*>(this); 8275 i::HeapProfiler* heap_profiler = reinterpret_cast<i::HeapProfiler*>(this);
8276 return heap_profiler->PushHeapObjectsStats(stream, timestamp_us); 8276 return heap_profiler->PushHeapObjectsStats(stream, timestamp_us);
8277 } 8277 }
8278 8278
8279 8279
8280 bool HeapProfiler::StartSamplingHeapProfiler(uint64_t sample_interval,
8281 int stack_depth) {
8282 return reinterpret_cast<i::HeapProfiler*>(this)
8283 ->StartSamplingHeapProfiler(sample_interval, stack_depth);
8284 }
8285
8286
8287 void HeapProfiler::StopSamplingHeapProfiler() {
8288 reinterpret_cast<i::HeapProfiler*>(this)->StopSamplingHeapProfiler();
8289 }
8290
8291
8292 AllocationProfile* HeapProfiler::GetAllocationProfile() {
8293 return reinterpret_cast<i::HeapProfiler*>(this)->GetAllocationProfile();
8294 }
8295
8296
8280 void HeapProfiler::DeleteAllHeapSnapshots() { 8297 void HeapProfiler::DeleteAllHeapSnapshots() {
8281 reinterpret_cast<i::HeapProfiler*>(this)->DeleteAllSnapshots(); 8298 reinterpret_cast<i::HeapProfiler*>(this)->DeleteAllSnapshots();
8282 } 8299 }
8283 8300
8284 8301
8285 void HeapProfiler::SetWrapperClassInfoProvider(uint16_t class_id, 8302 void HeapProfiler::SetWrapperClassInfoProvider(uint16_t class_id,
8286 WrapperInfoCallback callback) { 8303 WrapperInfoCallback callback) {
8287 reinterpret_cast<i::HeapProfiler*>(this)->DefineWrapperClass(class_id, 8304 reinterpret_cast<i::HeapProfiler*>(this)->DefineWrapperClass(class_id,
8288 callback); 8305 callback);
8289 } 8306 }
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
8533 Address callback_address = 8550 Address callback_address =
8534 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); 8551 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback));
8535 VMState<EXTERNAL> state(isolate); 8552 VMState<EXTERNAL> state(isolate);
8536 ExternalCallbackScope call_scope(isolate, callback_address); 8553 ExternalCallbackScope call_scope(isolate, callback_address);
8537 callback(info); 8554 callback(info);
8538 } 8555 }
8539 8556
8540 8557
8541 } // namespace internal 8558 } // namespace internal
8542 } // namespace v8 8559 } // namespace v8
OLDNEW
« no previous file with comments | « include/v8-profiler.h ('k') | src/flag-definitions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698