| 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 | 9 |
| 10 #include "src/allocation.h" | 10 #include "src/allocation.h" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 }; | 29 }; |
| 30 | 30 |
| 31 struct ScriptData { | 31 struct ScriptData { |
| 32 // Initialize top-level function in case it has been garbage-collected. | 32 // Initialize top-level function in case it has been garbage-collected. |
| 33 ScriptData(Handle<Script> s, int source_length) | 33 ScriptData(Handle<Script> s, int source_length) |
| 34 : script(s), toplevel(0, source_length, 1) {} | 34 : script(s), toplevel(0, source_length, 1) {} |
| 35 Handle<Script> script; | 35 Handle<Script> script; |
| 36 Range toplevel; | 36 Range toplevel; |
| 37 }; | 37 }; |
| 38 | 38 |
| 39 static std::vector<ScriptData> Collect(Isolate* isolate); | 39 V8_EXPORT_PRIVATE static std::vector<ScriptData> Collect(Isolate* isolate); |
| 40 | 40 |
| 41 // Enable precise code coverage. This disables optimization and makes sure | 41 // Enable precise code coverage. This disables optimization and makes sure |
| 42 // invocation count is not affected by GC. | 42 // invocation count is not affected by GC. |
| 43 static void EnablePrecise(Isolate* isolate); | 43 V8_EXPORT_PRIVATE static void EnablePrecise(Isolate* isolate); |
| 44 static void DisablePrecise(Isolate* isolate); | 44 V8_EXPORT_PRIVATE static void DisablePrecise(Isolate* isolate); |
| 45 }; | 45 }; |
| 46 | 46 |
| 47 } // namespace internal | 47 } // namespace internal |
| 48 } // namespace v8 | 48 } // namespace v8 |
| 49 | 49 |
| 50 #endif // V8_DEBUG_DEBUG_COVERAGE_H_ | 50 #endif // V8_DEBUG_DEBUG_COVERAGE_H_ |
| OLD | NEW |