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 596 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
607 line_number); | 607 line_number); |
608 code_entries_.Add(code_entry); | 608 code_entries_.Add(code_entry); |
609 return code_entry; | 609 return code_entry; |
610 } | 610 } |
611 | 611 |
612 | 612 |
613 const char* const ProfileGenerator::kAnonymousFunctionName = | 613 const char* const ProfileGenerator::kAnonymousFunctionName = |
614 "(anonymous function)"; | 614 "(anonymous function)"; |
615 const char* const ProfileGenerator::kProgramEntryName = | 615 const char* const ProfileGenerator::kProgramEntryName = |
616 "(program)"; | 616 "(program)"; |
| 617 const char* const ProfileGenerator::kIdleEntryName = |
| 618 "(idle)"; |
617 const char* const ProfileGenerator::kGarbageCollectorEntryName = | 619 const char* const ProfileGenerator::kGarbageCollectorEntryName = |
618 "(garbage collector)"; | 620 "(garbage collector)"; |
619 const char* const ProfileGenerator::kUnresolvedFunctionName = | 621 const char* const ProfileGenerator::kUnresolvedFunctionName = |
620 "(unresolved function)"; | 622 "(unresolved function)"; |
621 | 623 |
622 | 624 |
623 ProfileGenerator::ProfileGenerator(CpuProfilesCollection* profiles) | 625 ProfileGenerator::ProfileGenerator(CpuProfilesCollection* profiles) |
624 : profiles_(profiles), | 626 : profiles_(profiles), |
625 program_entry_( | 627 program_entry_( |
626 profiles->NewCodeEntry(Logger::FUNCTION_TAG, kProgramEntryName)), | 628 profiles->NewCodeEntry(Logger::FUNCTION_TAG, kProgramEntryName)), |
| 629 idle_entry_( |
| 630 profiles->NewCodeEntry(Logger::FUNCTION_TAG, kIdleEntryName)), |
627 gc_entry_( | 631 gc_entry_( |
628 profiles->NewCodeEntry(Logger::BUILTIN_TAG, | 632 profiles->NewCodeEntry(Logger::BUILTIN_TAG, |
629 kGarbageCollectorEntryName)), | 633 kGarbageCollectorEntryName)), |
630 unresolved_entry_( | 634 unresolved_entry_( |
631 profiles->NewCodeEntry(Logger::FUNCTION_TAG, | 635 profiles->NewCodeEntry(Logger::FUNCTION_TAG, |
632 kUnresolvedFunctionName)) { | 636 kUnresolvedFunctionName)) { |
633 } | 637 } |
634 | 638 |
635 | 639 |
636 void ProfileGenerator::RecordTickSample(const TickSample& sample) { | 640 void ProfileGenerator::RecordTickSample(const TickSample& sample) { |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
703 if (no_symbolized_entries) { | 707 if (no_symbolized_entries) { |
704 *entry++ = EntryForVMState(sample.state); | 708 *entry++ = EntryForVMState(sample.state); |
705 } | 709 } |
706 } | 710 } |
707 | 711 |
708 profiles_->AddPathToCurrentProfiles(entries); | 712 profiles_->AddPathToCurrentProfiles(entries); |
709 } | 713 } |
710 | 714 |
711 | 715 |
712 } } // namespace v8::internal | 716 } } // namespace v8::internal |
OLD | NEW |