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

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

Issue 2694623003: [debugger] change coverage format to nested, with function name. (Closed)
Patch Set: address comments Created 3 years, 10 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/debug/debug-coverage.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/debug/debug-coverage.h
diff --git a/src/debug/debug-coverage.h b/src/debug/debug-coverage.h
index f56d6ff2f3a6201a198ddcfc4e5c239021e68ec9..2ab9da5ec67234bbd97e403246c373328484278a 100644
--- a/src/debug/debug-coverage.h
+++ b/src/debug/debug-coverage.h
@@ -8,6 +8,8 @@
#include <vector>
#include "src/allocation.h"
+#include "src/debug/debug-interface.h"
+#include "src/objects.h"
namespace v8 {
namespace internal {
@@ -17,16 +19,21 @@ class Isolate;
class Coverage : public AllStatic {
public:
- struct RangeEntry {
- int end_position;
+ struct Range {
+ Range(int s, int e, uint32_t c) : start(s), end(e), count(c) {}
+ int start;
+ int end;
uint32_t count;
+ std::vector<uint16_t> name;
+ std::vector<Range> inner;
};
struct ScriptData {
- ScriptData(int s, std::vector<RangeEntry> e)
- : script_id(s), entries(std::move(e)) {}
- int script_id;
- std::vector<RangeEntry> entries;
+ // Initialize top-level function in case it has been garbage-collected.
+ ScriptData(Handle<Script> s, int source_length)
+ : script(s), toplevel(0, source_length, 1) {}
+ Handle<Script> script;
+ Range toplevel;
};
static std::vector<ScriptData> Collect(Isolate* isolate);
« no previous file with comments | « no previous file | src/debug/debug-coverage.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698