| 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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 cache_entry->value = c_name; | 115 cache_entry->value = c_name; |
| 116 } else { | 116 } else { |
| 117 DeleteArray(c_name); | 117 DeleteArray(c_name); |
| 118 } | 118 } |
| 119 return reinterpret_cast<const char*>(cache_entry->value); | 119 return reinterpret_cast<const char*>(cache_entry->value); |
| 120 } | 120 } |
| 121 return ""; | 121 return ""; |
| 122 } | 122 } |
| 123 | 123 |
| 124 | 124 |
| 125 const char* CodeEntry::kEmptyNamePrefix = ""; | 125 const char* const CodeEntry::kEmptyNamePrefix = ""; |
| 126 | 126 |
| 127 | 127 |
| 128 void CodeEntry::CopyData(const CodeEntry& source) { | 128 void CodeEntry::CopyData(const CodeEntry& source) { |
| 129 tag_ = source.tag_; | 129 tag_ = source.tag_; |
| 130 name_prefix_ = source.name_prefix_; | 130 name_prefix_ = source.name_prefix_; |
| 131 name_ = source.name_; | 131 name_ = source.name_; |
| 132 resource_name_ = source.resource_name_; | 132 resource_name_ = source.resource_name_; |
| 133 line_number_ = source.line_number_; | 133 line_number_ = source.line_number_; |
| 134 } | 134 } |
| 135 | 135 |
| (...skipping 617 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 753 (measured_ticks_per_ms - ticks_per_ms_) / measurements_count_; | 753 (measured_ticks_per_ms - ticks_per_ms_) / measurements_count_; |
| 754 // Update the externally accessible result. | 754 // Update the externally accessible result. |
| 755 result_ = static_cast<AtomicWord>(ticks_per_ms_ * kResultScale); | 755 result_ = static_cast<AtomicWord>(ticks_per_ms_ * kResultScale); |
| 756 } | 756 } |
| 757 last_wall_time_ = current_time; | 757 last_wall_time_ = current_time; |
| 758 wall_time_query_countdown_ = | 758 wall_time_query_countdown_ = |
| 759 static_cast<unsigned>(kWallTimeQueryIntervalMs * ticks_per_ms_); | 759 static_cast<unsigned>(kWallTimeQueryIntervalMs * ticks_per_ms_); |
| 760 } | 760 } |
| 761 | 761 |
| 762 | 762 |
| 763 const char* ProfileGenerator::kAnonymousFunctionName = "(anonymous function)"; | 763 const char* const ProfileGenerator::kAnonymousFunctionName = |
| 764 const char* ProfileGenerator::kProgramEntryName = "(program)"; | 764 "(anonymous function)"; |
| 765 const char* ProfileGenerator::kGarbageCollectorEntryName = | 765 const char* const ProfileGenerator::kProgramEntryName = |
| 766 "(garbage collector)"; | 766 "(program)"; |
| 767 const char* const ProfileGenerator::kGarbageCollectorEntryName = |
| 768 "(garbage collector)"; |
| 767 | 769 |
| 768 | 770 |
| 769 ProfileGenerator::ProfileGenerator(CpuProfilesCollection* profiles) | 771 ProfileGenerator::ProfileGenerator(CpuProfilesCollection* profiles) |
| 770 : profiles_(profiles), | 772 : profiles_(profiles), |
| 771 program_entry_( | 773 program_entry_( |
| 772 profiles->NewCodeEntry(Logger::FUNCTION_TAG, kProgramEntryName)), | 774 profiles->NewCodeEntry(Logger::FUNCTION_TAG, kProgramEntryName)), |
| 773 gc_entry_( | 775 gc_entry_( |
| 774 profiles->NewCodeEntry(Logger::BUILTIN_TAG, | 776 profiles->NewCodeEntry(Logger::BUILTIN_TAG, |
| 775 kGarbageCollectorEntryName)) { | 777 kGarbageCollectorEntryName)) { |
| 776 } | 778 } |
| (...skipping 1738 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2515 void HeapSnapshotJSONSerializer::SortHashMap( | 2517 void HeapSnapshotJSONSerializer::SortHashMap( |
| 2516 HashMap* map, List<HashMap::Entry*>* sorted_entries) { | 2518 HashMap* map, List<HashMap::Entry*>* sorted_entries) { |
| 2517 for (HashMap::Entry* p = map->Start(); p != NULL; p = map->Next(p)) | 2519 for (HashMap::Entry* p = map->Start(); p != NULL; p = map->Next(p)) |
| 2518 sorted_entries->Add(p); | 2520 sorted_entries->Add(p); |
| 2519 sorted_entries->Sort(SortUsingEntryValue); | 2521 sorted_entries->Sort(SortUsingEntryValue); |
| 2520 } | 2522 } |
| 2521 | 2523 |
| 2522 } } // namespace v8::internal | 2524 } } // namespace v8::internal |
| 2523 | 2525 |
| 2524 #endif // ENABLE_LOGGING_AND_PROFILING | 2526 #endif // ENABLE_LOGGING_AND_PROFILING |
| OLD | NEW |