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

Unified Diff: include/v8-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, 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/v8-profiler.h
diff --git a/include/v8-profiler.h b/include/v8-profiler.h
index 007ae2eca55e411981171e3a34396f06f5b0236e..535e8212d61161d3cc3a09838d4515b4f5352265 100644
--- a/include/v8-profiler.h
+++ b/include/v8-profiler.h
@@ -515,6 +515,11 @@ class V8_EXPORT AllocationProfile {
*/
class V8_EXPORT HeapProfiler {
public:
+ enum SamplingFlags {
+ kSamplingNoFlags = 0,
+ kSamplingForceGC = 1 << 0,
ulan 2016/05/04 13:13:06 To be more descriptive, maybe kSamplingForceGCAtAl
alph 2016/05/04 18:40:16 Don't think we should go into implementation detai
+ };
+
/**
* Callback function invoked for obtaining RetainedObjectInfo for
* the given JavaScript wrapper object. It is prohibited to enter V8
@@ -640,7 +645,8 @@ class V8_EXPORT HeapProfiler {
* Returns false if a sampling heap profiler is already running.
*/
bool StartSamplingHeapProfiler(uint64_t sample_interval = 512 * 1024,
- int stack_depth = 16);
+ int stack_depth = 16,
+ SamplingFlags flags = kSamplingNoFlags);
/**
* Stops the sampling heap profile and discards the current profile.
« no previous file with comments | « no previous file | src/api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698