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

Unified Diff: runtime/vm/source_report.h

Issue 1779333004: Add profile data to getSourceReport (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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
Index: runtime/vm/source_report.h
diff --git a/runtime/vm/source_report.h b/runtime/vm/source_report.h
index 77bf6c269ba079e334afec380943f4777d8ebd5a..636f290227821dddd04b1e04d4c2aace1123ac44 100644
--- a/runtime/vm/source_report.h
+++ b/runtime/vm/source_report.h
@@ -9,6 +9,7 @@
#include "vm/flags.h"
#include "vm/hash_map.h"
#include "vm/object.h"
+#include "vm/profiler_service.h"
#include "vm/token_position.h"
namespace dart {
@@ -22,6 +23,7 @@ class SourceReport {
kCallSites = 0x1,
kCoverage = 0x2,
kPossibleBreakpoints = 0x4,
+ kProfile = 0x8,
};
enum CompileMode {
@@ -48,6 +50,7 @@ class SourceReport {
Thread* thread() const { return thread_; }
Zone* zone() const { return thread_->zone(); }
+ Isolate* isolate() const { return thread_->isolate(); }
bool IsReportRequested(ReportKind report_kind);
bool ShouldSkipFunction(const Function& func);
@@ -60,6 +63,7 @@ class SourceReport {
const Function& func, const Code& code);
void PrintPossibleBreakpointsData(JSONObject* jsobj,
const Function& func, const Code& code);
+ void PrintProfileData(JSONObject* jsobj, ProfileFunction* profile_function);
void PrintScriptTable(JSONArray* jsarr);
void VisitFunction(JSONArray* jsarr, const Function& func);
@@ -104,6 +108,7 @@ class SourceReport {
const Script* script_;
TokenPosition start_pos_;
TokenPosition end_pos_;
+ Profile profile_;
GrowableArray<ScriptTableEntry> script_table_entries_;
DirectChainedHashMap<ScriptTableTrait> script_table_;
intptr_t next_script_index_;

Powered by Google App Engine
This is Rietveld 408576698