Reviewers: Sven Panne, alph, loislo,

Description:
Print ProfileNode id when dumping CPU profile to console

Node ids are monotonically increasing and looking at them we can
say e.g. when the node was added before another one. We need this
to diagnose sporadic failures of cctest/test-cpu-profiler/CollectCpuProfile

BUG=v8:2628

Please review this at https://codereview.chromium.org/14402014/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files:
  M src/profile-generator.cc


Index: src/profile-generator.cc
diff --git a/src/profile-generator.cc b/src/profile-generator.cc
index e4c750cb83c1dbc8b489f2a08779d3b43ccacb0d..837faa0c84cdcc938354c15892ae63d71a46c07e 100644
--- a/src/profile-generator.cc
+++ b/src/profile-generator.cc
@@ -260,12 +260,13 @@ double ProfileNode::GetTotalMillis() const {


 void ProfileNode::Print(int indent) {
-  OS::Print("%5u %5u %*c %s%s [%d]",
+  OS::Print("%5u %5u %*c %s%s [%d] #%d",
             total_ticks_, self_ticks_,
             indent, ' ',
             entry_->name_prefix(),
             entry_->name(),
-            entry_->security_token_id());
+            entry_->security_token_id(),
+            id());
   if (entry_->resource_name()[0] != '\0')
     OS::Print(" %s:%d", entry_->resource_name(), entry_->line_number());
   OS::Print("\n");


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to