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

Side by Side Diff: src/api.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, 9 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/heap-profiler.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 7771 matching lines...) Expand 10 before | Expand all | Expand 10 after
7782 reinterpret_cast<i::HeapProfiler*>(this)->StartHeapObjectsTracking( 7782 reinterpret_cast<i::HeapProfiler*>(this)->StartHeapObjectsTracking(
7783 track_allocations); 7783 track_allocations);
7784 } 7784 }
7785 7785
7786 7786
7787 void HeapProfiler::StopTrackingHeapObjects() { 7787 void HeapProfiler::StopTrackingHeapObjects() {
7788 reinterpret_cast<i::HeapProfiler*>(this)->StopHeapObjectsTracking(); 7788 reinterpret_cast<i::HeapProfiler*>(this)->StopHeapObjectsTracking();
7789 } 7789 }
7790 7790
7791 7791
7792 SnapshotObjectId HeapProfiler::GetHeapStats(OutputStream* stream) { 7792 SnapshotObjectId HeapProfiler::GetHeapStats(OutputStream* stream,
7793 return reinterpret_cast<i::HeapProfiler*>(this)->PushHeapObjectsStats(stream); 7793 int64_t* timestamp_us) {
7794 i::HeapProfiler* heap_profiler = reinterpret_cast<i::HeapProfiler*>(this);
7795 return heap_profiler->PushHeapObjectsStats(stream, timestamp_us);
7794 } 7796 }
7795 7797
7796 7798
7797 void HeapProfiler::DeleteAllHeapSnapshots() { 7799 void HeapProfiler::DeleteAllHeapSnapshots() {
7798 reinterpret_cast<i::HeapProfiler*>(this)->DeleteAllSnapshots(); 7800 reinterpret_cast<i::HeapProfiler*>(this)->DeleteAllSnapshots();
7799 } 7801 }
7800 7802
7801 7803
7802 void HeapProfiler::SetWrapperClassInfoProvider(uint16_t class_id, 7804 void HeapProfiler::SetWrapperClassInfoProvider(uint16_t class_id,
7803 WrapperInfoCallback callback) { 7805 WrapperInfoCallback callback) {
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
8050 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); 8052 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate());
8051 Address callback_address = 8053 Address callback_address =
8052 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); 8054 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback));
8053 VMState<EXTERNAL> state(isolate); 8055 VMState<EXTERNAL> state(isolate);
8054 ExternalCallbackScope call_scope(isolate, callback_address); 8056 ExternalCallbackScope call_scope(isolate, callback_address);
8055 callback(info); 8057 callback(info);
8056 } 8058 }
8057 8059
8058 8060
8059 } } // namespace v8::internal 8061 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « include/v8-profiler.h ('k') | src/heap-profiler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698