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

Side by Side Diff: src/debug/debug-coverage.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 unified diff | Download patch
« no previous file with comments | « src/d8.cc ('k') | src/debug/debug-coverage.cc » ('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 2017 the V8 project authors. All rights reserved. 1 // Copyright 2017 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_DEBUG_DEBUG_COVERAGE_H_ 5 #ifndef V8_DEBUG_DEBUG_COVERAGE_H_
6 #define V8_DEBUG_DEBUG_COVERAGE_H_ 6 #define V8_DEBUG_DEBUG_COVERAGE_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "src/debug/debug-interface.h" 10 #include "src/debug/debug-interface.h"
(...skipping 21 matching lines...) Expand all
32 // Functions are sorted by start position, from outer to inner function. 32 // Functions are sorted by start position, from outer to inner function.
33 std::vector<CoverageFunction> functions; 33 std::vector<CoverageFunction> functions;
34 }; 34 };
35 35
36 class Coverage : public std::vector<CoverageScript> { 36 class Coverage : public std::vector<CoverageScript> {
37 public: 37 public:
38 // Allocate a new Coverage object and populate with result. 38 // Allocate a new Coverage object and populate with result.
39 // The ownership is transferred to the caller. 39 // The ownership is transferred to the caller.
40 static Coverage* Collect(Isolate* isolate, bool reset_count); 40 static Coverage* Collect(Isolate* isolate, bool reset_count);
41 41
42 // Enable precise code coverage. This disables optimization and makes sure 42 // Select code coverage mode.
43 // invocation count is not affected by GC. 43 static void SelectMode(Isolate* isolate, debug::Coverage::Mode mode);
44 static void TogglePrecise(Isolate* isolate, bool enable);
45 44
46 private: 45 private:
47 Coverage() {} 46 Coverage() {}
48 }; 47 };
49 48
50 } // namespace internal 49 } // namespace internal
51 } // namespace v8 50 } // namespace v8
52 51
53 #endif // V8_DEBUG_DEBUG_COVERAGE_H_ 52 #endif // V8_DEBUG_DEBUG_COVERAGE_H_
OLDNEW
« no previous file with comments | « src/d8.cc ('k') | src/debug/debug-coverage.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698