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

Side by Side Diff: src/profile-generator.cc

Issue 14402014: Print ProfileNode id when dumping CPU profile to console (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 return tree_->TicksToMillis(self_ticks_); 253 return tree_->TicksToMillis(self_ticks_);
254 } 254 }
255 255
256 256
257 double ProfileNode::GetTotalMillis() const { 257 double ProfileNode::GetTotalMillis() const {
258 return tree_->TicksToMillis(total_ticks_); 258 return tree_->TicksToMillis(total_ticks_);
259 } 259 }
260 260
261 261
262 void ProfileNode::Print(int indent) { 262 void ProfileNode::Print(int indent) {
263 OS::Print("%5u %5u %*c %s%s [%d]", 263 OS::Print("%5u %5u %*c %s%s [%d] #%d",
264 total_ticks_, self_ticks_, 264 total_ticks_, self_ticks_,
265 indent, ' ', 265 indent, ' ',
266 entry_->name_prefix(), 266 entry_->name_prefix(),
267 entry_->name(), 267 entry_->name(),
268 entry_->security_token_id()); 268 entry_->security_token_id(),
269 id());
269 if (entry_->resource_name()[0] != '\0') 270 if (entry_->resource_name()[0] != '\0')
270 OS::Print(" %s:%d", entry_->resource_name(), entry_->line_number()); 271 OS::Print(" %s:%d", entry_->resource_name(), entry_->line_number());
271 OS::Print("\n"); 272 OS::Print("\n");
272 for (HashMap::Entry* p = children_.Start(); 273 for (HashMap::Entry* p = children_.Start();
273 p != NULL; 274 p != NULL;
274 p = children_.Next(p)) { 275 p = children_.Next(p)) {
275 reinterpret_cast<ProfileNode*>(p->value)->Print(indent + 2); 276 reinterpret_cast<ProfileNode*>(p->value)->Print(indent + 2);
276 } 277 }
277 } 278 }
278 279
(...skipping 643 matching lines...) Expand 10 before | Expand all | Expand 10 after
922 if (no_symbolized_entries) { 923 if (no_symbolized_entries) {
923 *entry++ = EntryForVMState(sample.state); 924 *entry++ = EntryForVMState(sample.state);
924 } 925 }
925 } 926 }
926 927
927 profiles_->AddPathToCurrentProfiles(entries); 928 profiles_->AddPathToCurrentProfiles(entries);
928 } 929 }
929 930
930 931
931 } } // namespace v8::internal 932 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698