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

Unified Diff: runtime/vm/profiler_service.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 | « no previous file | runtime/vm/profiler_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/profiler_service.h
diff --git a/runtime/vm/profiler_service.h b/runtime/vm/profiler_service.h
index 218bcb9ec168404f87b8c00443ea9240eff90417..4bd64da740283b6478f04b69efff3a5f71f00fb2 100644
--- a/runtime/vm/profiler_service.h
+++ b/runtime/vm/profiler_service.h
@@ -105,6 +105,14 @@ class ProfileFunction : public ZoneAllocated {
void TickSourcePosition(TokenPosition token_position, bool exclusive);
+ intptr_t NumSourcePositions() const {
+ return source_position_ticks_.length();
+ }
+
+ const ProfileFunctionSourcePosition& GetSourcePosition(intptr_t i) const {
+ return source_position_ticks_.At(i);
+ }
+
private:
const Kind kind_;
const char* name_;
@@ -347,6 +355,8 @@ class Profile : public ValueObject {
}
intptr_t sample_count() const { return sample_count_; }
+ intptr_t NumFunctions() const;
+
ProfileFunction* GetFunction(intptr_t index);
ProfileCode* GetCode(intptr_t index);
ProfileTrieNode* GetTrieRoot(TrieKind trie_kind);
@@ -354,6 +364,8 @@ class Profile : public ValueObject {
void PrintProfileJSON(JSONStream* stream);
void PrintTimelineJSON(JSONStream* stream);
+ ProfileFunction* FindFunction(const Function& function);
+
private:
void PrintHeaderJSON(JSONObject* obj);
void PrintTimelineFrameJSON(JSONObject* frames,
« no previous file with comments | « no previous file | runtime/vm/profiler_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698