| 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", | 276 OS::Print("%5u %5u %*c %s%s [%d] #%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(), |
| 282 id()); | 283 id()); |
| 283 if (entry_->resource_name()[0] != '\0') | 284 if (entry_->resource_name()[0] != '\0') |
| 284 OS::Print(" %s:%d", entry_->resource_name(), entry_->line_number()); | 285 OS::Print(" %s:%d", entry_->resource_name(), entry_->line_number()); |
| 285 OS::Print("\n"); | 286 OS::Print("\n"); |
| 286 for (HashMap::Entry* p = children_.Start(); | 287 for (HashMap::Entry* p = children_.Start(); |
| 287 p != NULL; | 288 p != NULL; |
| 288 p = children_.Next(p)) { | 289 p = children_.Next(p)) { |
| 289 reinterpret_cast<ProfileNode*>(p->value)->Print(indent + 2); | 290 reinterpret_cast<ProfileNode*>(p->value)->Print(indent + 2); |
| 290 } | 291 } |
| 291 } | 292 } |
| (...skipping 642 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 934 if (no_symbolized_entries) { | 935 if (no_symbolized_entries) { |
| 935 *entry++ = EntryForVMState(sample.state); | 936 *entry++ = EntryForVMState(sample.state); |
| 936 } | 937 } |
| 937 } | 938 } |
| 938 | 939 |
| 939 profiles_->AddPathToCurrentProfiles(entries); | 940 profiles_->AddPathToCurrentProfiles(entries); |
| 940 } | 941 } |
| 941 | 942 |
| 942 | 943 |
| 943 } } // namespace v8::internal | 944 } } // namespace v8::internal |
| OLD | NEW |