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

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
« no previous file with comments | « runtime/vm/service.cc ('k') | runtime/vm/source_report.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/source_report.h
diff --git a/runtime/vm/source_report.h b/runtime/vm/source_report.h
index 77bf6c269ba079e334afec380943f4777d8ebd5a..cd2ad3a2190b88f733894071a667486cbc485eba 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,8 +23,14 @@ class SourceReport {
kCallSites = 0x1,
kCoverage = 0x2,
kPossibleBreakpoints = 0x4,
+ kProfile = 0x8,
};
+ static const char* kCallSitesStr;
+ static const char* kCoverageStr;
+ static const char* kPossibleBreakpointsStr;
+ static const char* kProfileStr;
+
enum CompileMode {
kNoCompile,
kForceCompile
@@ -48,6 +55,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 +68,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 +113,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_;
« no previous file with comments | « runtime/vm/service.cc ('k') | runtime/vm/source_report.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698