OLD | NEW |
---|---|
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 #include "src/isolate.h" | 9 #include "src/allocation.h" |
jgruber
2017/02/09 16:08:48
This does not seem to be needed here.
Yang
2017/02/09 17:42:15
This is for the AllStatic base class.
| |
10 | 10 |
11 namespace v8 { | 11 namespace v8 { |
12 namespace internal { | 12 namespace internal { |
13 | 13 |
14 // Forward declaration. | |
15 class Isolate; | |
16 | |
14 class Coverage : public AllStatic { | 17 class Coverage : public AllStatic { |
15 public: | 18 public: |
16 struct RangeEntry { | 19 struct RangeEntry { |
17 int end_position; | 20 int end_position; |
18 uint32_t count; | 21 uint32_t count; |
19 }; | 22 }; |
20 | 23 |
21 struct ScriptData { | 24 struct ScriptData { |
22 int script_id; | 25 int script_id; |
23 std::vector<RangeEntry> entries; | 26 std::vector<RangeEntry> entries; |
24 }; | 27 }; |
25 | 28 |
26 static std::vector<ScriptData> Collect(Isolate* isolate); | 29 static std::vector<ScriptData> Collect(Isolate* isolate); |
30 | |
31 // Enable precise code coverage. This disables optimization and makes sure | |
32 // invocation count is not affected by GC. | |
33 static void EnablePrecise(Isolate* isolate); | |
34 static void DisablePrecise(Isolate* isolate); | |
27 }; | 35 }; |
28 | 36 |
29 } // namespace internal | 37 } // namespace internal |
30 } // namespace v8 | 38 } // namespace v8 |
31 | 39 |
32 #endif // V8_DEBUG_DEBUG_COVERAGE_H_ | 40 #endif // V8_DEBUG_DEBUG_COVERAGE_H_ |
OLD | NEW |