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, |