OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "v8.h" | 5 #include "v8.h" |
6 | 6 |
7 #include "profile-generator-inl.h" | 7 #include "profile-generator-inl.h" |
8 | 8 |
9 #include "compiler.h" | 9 #include "compiler.h" |
10 #include "debug.h" | 10 #include "debug.h" |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
201 // New node added. | 201 // New node added. |
202 ProfileNode* new_node = new ProfileNode(tree_, entry); | 202 ProfileNode* new_node = new ProfileNode(tree_, entry); |
203 map_entry->value = new_node; | 203 map_entry->value = new_node; |
204 children_list_.Add(new_node); | 204 children_list_.Add(new_node); |
205 } | 205 } |
206 return reinterpret_cast<ProfileNode*>(map_entry->value); | 206 return reinterpret_cast<ProfileNode*>(map_entry->value); |
207 } | 207 } |
208 | 208 |
209 | 209 |
210 void ProfileNode::Print(int indent) { | 210 void ProfileNode::Print(int indent) { |
211 OS::Print("%5u %*c %s%s %d #%d %s", | 211 OS::Print("%5u %*s %s%s %d #%d %s", |
212 self_ticks_, | 212 self_ticks_, |
213 indent, ' ', | 213 indent, "", |
214 entry_->name_prefix(), | 214 entry_->name_prefix(), |
215 entry_->name(), | 215 entry_->name(), |
216 entry_->script_id(), | 216 entry_->script_id(), |
217 id(), | 217 id(), |
218 entry_->bailout_reason()); | 218 entry_->bailout_reason()); |
219 if (entry_->resource_name()[0] != '\0') | 219 if (entry_->resource_name()[0] != '\0') |
220 OS::Print(" %s:%d", entry_->resource_name(), entry_->line_number()); | 220 OS::Print(" %s:%d", entry_->resource_name(), entry_->line_number()); |
221 OS::Print("\n"); | 221 OS::Print("\n"); |
222 for (HashMap::Entry* p = children_.Start(); | 222 for (HashMap::Entry* p = children_.Start(); |
223 p != NULL; | 223 p != NULL; |
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
670 case OTHER: | 670 case OTHER: |
671 case EXTERNAL: | 671 case EXTERNAL: |
672 return program_entry_; | 672 return program_entry_; |
673 case IDLE: | 673 case IDLE: |
674 return idle_entry_; | 674 return idle_entry_; |
675 default: return NULL; | 675 default: return NULL; |
676 } | 676 } |
677 } | 677 } |
678 | 678 |
679 } } // namespace v8::internal | 679 } } // namespace v8::internal |
OLD | NEW |