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 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 return tree_->TicksToMillis(self_ticks_); | 213 return tree_->TicksToMillis(self_ticks_); |
214 } | 214 } |
215 | 215 |
216 | 216 |
217 double ProfileNode::GetTotalMillis() const { | 217 double ProfileNode::GetTotalMillis() const { |
218 return tree_->TicksToMillis(total_ticks_); | 218 return tree_->TicksToMillis(total_ticks_); |
219 } | 219 } |
220 | 220 |
221 | 221 |
222 void ProfileNode::Print(int indent) { | 222 void ProfileNode::Print(int indent) { |
223 OS::Print("%5u %5u %*c %s%s #%d %d", | 223 OS::Print("%5u %5u %*c %s%s %d #%d", |
224 total_ticks_, self_ticks_, | 224 total_ticks_, self_ticks_, |
225 indent, ' ', | 225 indent, ' ', |
226 entry_->name_prefix(), | 226 entry_->name_prefix(), |
227 entry_->name(), | 227 entry_->name(), |
228 entry_->script_id(), | 228 entry_->script_id(), |
229 id()); | 229 id()); |
230 if (entry_->resource_name()[0] != '\0') | 230 if (entry_->resource_name()[0] != '\0') |
231 OS::Print(" %s:%d", entry_->resource_name(), entry_->line_number()); | 231 OS::Print(" %s:%d", entry_->resource_name(), entry_->line_number()); |
232 OS::Print("\n"); | 232 OS::Print("\n"); |
233 for (HashMap::Entry* p = children_.Start(); | 233 for (HashMap::Entry* p = children_.Start(); |
(...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
707 if (no_symbolized_entries) { | 707 if (no_symbolized_entries) { |
708 *entry++ = EntryForVMState(sample.state); | 708 *entry++ = EntryForVMState(sample.state); |
709 } | 709 } |
710 } | 710 } |
711 | 711 |
712 profiles_->AddPathToCurrentProfiles(entries); | 712 profiles_->AddPathToCurrentProfiles(entries); |
713 } | 713 } |
714 | 714 |
715 | 715 |
716 } } // namespace v8::internal | 716 } } // namespace v8::internal |
OLD | NEW |