OLD | NEW |
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 544 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
555 | 555 |
556 for (const Address *stack_pos = sample.stack, | 556 for (const Address *stack_pos = sample.stack, |
557 *stack_end = stack_pos + sample.frames_count; | 557 *stack_end = stack_pos + sample.frames_count; |
558 stack_pos != stack_end; | 558 stack_pos != stack_end; |
559 ++stack_pos) { | 559 ++stack_pos) { |
560 *entry++ = code_map_.FindEntry(*stack_pos); | 560 *entry++ = code_map_.FindEntry(*stack_pos); |
561 } | 561 } |
562 } | 562 } |
563 | 563 |
564 if (FLAG_prof_browser_mode) { | 564 if (FLAG_prof_browser_mode) { |
565 // Put VM state as the topmost entry. | 565 bool no_symbolized_entries = true; |
566 *entry++ = EntryForVMState(sample.state); | 566 for (CodeEntry** e = entries.start(); e != entry; ++e) { |
| 567 if (*e != NULL) { |
| 568 no_symbolized_entries = false; |
| 569 break; |
| 570 } |
| 571 } |
| 572 // If no frames were symbolized, put the VM state entry in. |
| 573 if (no_symbolized_entries) { |
| 574 *entry++ = EntryForVMState(sample.state); |
| 575 } |
567 } | 576 } |
568 | 577 |
569 profiles_->AddPathToCurrentProfiles(entries); | 578 profiles_->AddPathToCurrentProfiles(entries); |
570 } | 579 } |
571 | 580 |
572 } } // namespace v8::internal | 581 } } // namespace v8::internal |
573 | 582 |
574 #endif // ENABLE_LOGGING_AND_PROFILING | 583 #endif // ENABLE_LOGGING_AND_PROFILING |
OLD | NEW |