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

Unified Diff: runtime/vm/profiler_service.h

Issue 1210283003: Extend allocation profile testing (Closed) Base URL: git@github.com:dart-lang/sdk.git@profile_model_public
Patch Set: Created 5 years, 6 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 62612bb1e23232eb54f47c3647c07974dfaad19b..d281a84d3803db5baa65fc517a09b2b51a12c30d 100644
--- a/runtime/vm/profiler_service.h
+++ b/runtime/vm/profiler_service.h
@@ -50,6 +50,8 @@ class ProfileFunction : public ZoneAllocated {
return name_;
}
+ const char* Name() const;
+
RawFunction* function() const {
return function_.raw();
}
@@ -246,6 +248,8 @@ class ProfileTrieNode : public ZoneAllocated {
return children_.At(i);
}
+ intptr_t IndexOf(ProfileTrieNode* node);
+
protected:
void SortChildren();
@@ -285,6 +289,14 @@ class Profile : public ValueObject {
kNumTrieKinds,
};
+ static bool IsCodeTrie(TrieKind kind) {
+ return (kind == kExclusiveCode) || (kind == kInclusiveCode);
+ }
+
+ static bool IsFunctionTrie(TrieKind kind) {
+ return !IsCodeTrie(kind);
+ }
+
explicit Profile(Isolate* isolate);
// Build a filtered model using |filter| with the specified |tag_order|.
@@ -324,6 +336,31 @@ class Profile : public ValueObject {
};
+class ProfileTrieWalker : public ValueObject {
+ public:
+ explicit ProfileTrieWalker(Profile* profile)
+ : profile_(profile),
+ parent_(NULL),
+ current_(NULL),
+ code_trie_(false) {
+ ASSERT(profile_ != NULL);
+ }
+
+ void Reset(Profile::TrieKind trie_kind);
+
+ const char* CurrentName();
+
+ bool Down();
+ bool NextSibling();
+
+ private:
+ Profile* profile_;
+ ProfileTrieNode* parent_;
+ ProfileTrieNode* current_;
+ bool code_trie_;
+};
+
+
class ProfilerService : public AllStatic {
public:
static void PrintJSON(JSONStream* stream,
« 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