Chromium Code Reviews

Unified Diff: src/profile-generator.cc

Issue 1084009: Add a few tests to ProfilerEventsProcessor. (Closed)
Patch Set: Created 10 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
« no previous file with comments | « src/profile-generator.h ('k') | test/cctest/SConscript » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/profile-generator.cc
diff --git a/src/profile-generator.cc b/src/profile-generator.cc
index 9d7c3461cd3eaa790de955389d94f97bd5a77fb8..7f020c5bb5b4f8a543b84eb09fe6cbcfe15e7ffc 100644
--- a/src/profile-generator.cc
+++ b/src/profile-generator.cc
@@ -53,6 +53,15 @@ ProfileNode* ProfileNode::FindOrAddChild(CodeEntry* entry) {
}
+void ProfileNode::GetChildren(List<ProfileNode*>* children) {
+ for (HashMap::Entry* p = children_.Start();
+ p != NULL;
+ p = children_.Next(p)) {
+ children->Add(reinterpret_cast<ProfileNode*>(p->value));
+ }
+}
+
+
void ProfileNode::Print(int indent) {
OS::Print("%4u %4u %*c %s\n",
total_ticks_, self_ticks_,
« no previous file with comments | « src/profile-generator.h ('k') | test/cctest/SConscript » ('j') | no next file with comments »

Powered by Google App Engine