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

Unified Diff: src/debug/debug-interface.h

Issue 2765813002: [debug] refactor code coverage to use enum for mode. (Closed)
Patch Set: fix d8 Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/debug/debug-coverage.cc ('k') | src/feedback-vector.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/debug/debug-interface.h
diff --git a/src/debug/debug-interface.h b/src/debug/debug-interface.h
index c36784b93311bf71c8915244ce3d4905d825f00d..905a71e8628977c14f4eed6dd16143119be58f40 100644
--- a/src/debug/debug-interface.h
+++ b/src/debug/debug-interface.h
@@ -215,6 +215,14 @@ class GeneratorObject {
*/
class V8_EXPORT_PRIVATE Coverage {
public:
+ enum Mode {
+ // Make use of existing information in feedback vectors on the heap.
+ kBestEffort,
+ // Disable optimization and prevent feedback vectors from being garbage
+ // collected in order to get precise invocation counts.
+ kPreciseCount,
+ };
+
class ScriptData; // Forward declaration.
class V8_EXPORT_PRIVATE FunctionData {
@@ -247,7 +255,7 @@ class V8_EXPORT_PRIVATE Coverage {
static Coverage Collect(Isolate* isolate, bool reset_count);
- static void TogglePrecise(Isolate* isolate, bool enable);
+ static void SelectMode(Isolate* isolate, Mode mode);
size_t ScriptCount();
ScriptData GetScriptData(size_t i);
« no previous file with comments | « src/debug/debug-coverage.cc ('k') | src/feedback-vector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698