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

Review URL: https://codereview.chromium.org/14402014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14386 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
yurys@chromium.org 2013-04-23 07:26:30 +00:00
parent 526558409d
commit 75605f82b6

View File

@ -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");