OLD | NEW |
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 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
266 return tree_->TicksToMillis(self_ticks_); | 266 return tree_->TicksToMillis(self_ticks_); |
267 } | 267 } |
268 | 268 |
269 | 269 |
270 double ProfileNode::GetTotalMillis() const { | 270 double ProfileNode::GetTotalMillis() const { |
271 return tree_->TicksToMillis(total_ticks_); | 271 return tree_->TicksToMillis(total_ticks_); |
272 } | 272 } |
273 | 273 |
274 | 274 |
275 void ProfileNode::Print(int indent) { | 275 void ProfileNode::Print(int indent) { |
276 OS::Print("%5u %5u %*c %s%s [%d] #%d %d", | 276 OS::Print("%5u %5u %*c %s%s [%d] #%d", |
277 total_ticks_, self_ticks_, | 277 total_ticks_, self_ticks_, |
278 indent, ' ', | 278 indent, ' ', |
279 entry_->name_prefix(), | 279 entry_->name_prefix(), |
280 entry_->name(), | 280 entry_->name(), |
281 entry_->security_token_id(), | 281 entry_->security_token_id(), |
282 entry_->script_id(), | |
283 id()); | 282 id()); |
284 if (entry_->resource_name()[0] != '\0') | 283 if (entry_->resource_name()[0] != '\0') |
285 OS::Print(" %s:%d", entry_->resource_name(), entry_->line_number()); | 284 OS::Print(" %s:%d", entry_->resource_name(), entry_->line_number()); |
286 OS::Print("\n"); | 285 OS::Print("\n"); |
287 for (HashMap::Entry* p = children_.Start(); | 286 for (HashMap::Entry* p = children_.Start(); |
288 p != NULL; | 287 p != NULL; |
289 p = children_.Next(p)) { | 288 p = children_.Next(p)) { |
290 reinterpret_cast<ProfileNode*>(p->value)->Print(indent + 2); | 289 reinterpret_cast<ProfileNode*>(p->value)->Print(indent + 2); |
291 } | 290 } |
292 } | 291 } |
(...skipping 642 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
935 if (no_symbolized_entries) { | 934 if (no_symbolized_entries) { |
936 *entry++ = EntryForVMState(sample.state); | 935 *entry++ = EntryForVMState(sample.state); |
937 } | 936 } |
938 } | 937 } |
939 | 938 |
940 profiles_->AddPathToCurrentProfiles(entries); | 939 profiles_->AddPathToCurrentProfiles(entries); |
941 } | 940 } |
942 | 941 |
943 | 942 |
944 } } // namespace v8::internal | 943 } } // namespace v8::internal |
OLD | NEW |