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

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

Issue 1949693003: Sampling heap profiler: Force Full GC before retrieving the profile. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Making the GC optional Created 4 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 unified diff | Download patch
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 #ifndef V8_PROFILER_HEAP_PROFILER_H_ 5 #ifndef V8_PROFILER_HEAP_PROFILER_H_
6 #define V8_PROFILER_HEAP_PROFILER_H_ 6 #define V8_PROFILER_HEAP_PROFILER_H_
7 7
8 #include "src/base/smart-pointers.h" 8 #include "src/base/smart-pointers.h"
9 #include "src/isolate.h" 9 #include "src/isolate.h"
10 #include "src/list.h" 10 #include "src/list.h"
(...skipping 12 matching lines...) Expand all
23 public: 23 public:
24 explicit HeapProfiler(Heap* heap); 24 explicit HeapProfiler(Heap* heap);
25 ~HeapProfiler(); 25 ~HeapProfiler();
26 26
27 size_t GetMemorySizeUsedByProfiler(); 27 size_t GetMemorySizeUsedByProfiler();
28 28
29 HeapSnapshot* TakeSnapshot( 29 HeapSnapshot* TakeSnapshot(
30 v8::ActivityControl* control, 30 v8::ActivityControl* control,
31 v8::HeapProfiler::ObjectNameResolver* resolver); 31 v8::HeapProfiler::ObjectNameResolver* resolver);
32 32
33 bool StartSamplingHeapProfiler(uint64_t sample_interval, int stack_depth); 33 bool StartSamplingHeapProfiler(uint64_t sample_interval, int stack_depth,
34 v8::HeapProfiler::SamplingFlags);
34 void StopSamplingHeapProfiler(); 35 void StopSamplingHeapProfiler();
35 bool is_sampling_allocations() { return !sampling_heap_profiler_.is_empty(); } 36 bool is_sampling_allocations() { return !sampling_heap_profiler_.is_empty(); }
36 AllocationProfile* GetAllocationProfile(); 37 AllocationProfile* GetAllocationProfile();
37 38
38 void StartHeapObjectsTracking(bool track_allocations); 39 void StartHeapObjectsTracking(bool track_allocations);
39 void StopHeapObjectsTracking(); 40 void StopHeapObjectsTracking();
40 AllocationTracker* allocation_tracker() const { 41 AllocationTracker* allocation_tracker() const {
41 return allocation_tracker_.get(); 42 return allocation_tracker_.get();
42 } 43 }
43 HeapObjectsMap* heap_object_map() const { return ids_.get(); } 44 HeapObjectsMap* heap_object_map() const { return ids_.get(); }
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 base::SmartPointer<AllocationTracker> allocation_tracker_; 86 base::SmartPointer<AllocationTracker> allocation_tracker_;
86 bool is_tracking_object_moves_; 87 bool is_tracking_object_moves_;
87 base::Mutex profiler_mutex_; 88 base::Mutex profiler_mutex_;
88 base::SmartPointer<SamplingHeapProfiler> sampling_heap_profiler_; 89 base::SmartPointer<SamplingHeapProfiler> sampling_heap_profiler_;
89 }; 90 };
90 91
91 } // namespace internal 92 } // namespace internal
92 } // namespace v8 93 } // namespace v8
93 94
94 #endif // V8_PROFILER_HEAP_PROFILER_H_ 95 #endif // V8_PROFILER_HEAP_PROFILER_H_
OLDNEW
« include/v8-profiler.h ('K') | « src/api.cc ('k') | src/profiler/heap-profiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698