| 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 18 matching lines...) Expand all Loading... |
| 29 #define V8_PROFILE_GENERATOR_INL_H_ | 29 #define V8_PROFILE_GENERATOR_INL_H_ |
| 30 | 30 |
| 31 #ifdef ENABLE_CPP_PROFILES_PROCESSOR | 31 #ifdef ENABLE_CPP_PROFILES_PROCESSOR |
| 32 | 32 |
| 33 #include "profile-generator.h" | 33 #include "profile-generator.h" |
| 34 | 34 |
| 35 namespace v8 { | 35 namespace v8 { |
| 36 namespace internal { | 36 namespace internal { |
| 37 | 37 |
| 38 CodeEntry::CodeEntry(Logger::LogEventsAndTags tag, | 38 CodeEntry::CodeEntry(Logger::LogEventsAndTags tag, |
| 39 const char* name_prefix, |
| 39 const char* name, | 40 const char* name, |
| 40 const char* resource_name, | 41 const char* resource_name, |
| 41 int line_number) | 42 int line_number) |
| 42 : tag_(tag), | 43 : tag_(tag), |
| 44 name_prefix_(name_prefix), |
| 43 name_(name), | 45 name_(name), |
| 44 resource_name_(resource_name), | 46 resource_name_(resource_name), |
| 45 line_number_(line_number) { | 47 line_number_(line_number) { |
| 46 } | 48 } |
| 47 | 49 |
| 48 | 50 |
| 49 bool CodeEntry::is_js_function() { | 51 bool CodeEntry::is_js_function() const { |
| 50 return tag_ == Logger::FUNCTION_TAG | 52 return tag_ == Logger::FUNCTION_TAG |
| 51 || tag_ == Logger::LAZY_COMPILE_TAG | 53 || tag_ == Logger::LAZY_COMPILE_TAG |
| 52 || tag_ == Logger::SCRIPT_TAG; | 54 || tag_ == Logger::SCRIPT_TAG; |
| 53 } | 55 } |
| 54 | 56 |
| 55 | 57 |
| 56 ProfileNode::ProfileNode(CodeEntry* entry) | 58 ProfileNode::ProfileNode(CodeEntry* entry) |
| 57 : entry_(entry), | 59 : entry_(entry), |
| 58 total_ticks_(0), | 60 total_ticks_(0), |
| 59 self_ticks_(0), | 61 self_ticks_(0), |
| (...skipping 21 matching lines...) Expand all Loading... |
| 81 // Called from VM thread, and only it can mutate the list, | 83 // Called from VM thread, and only it can mutate the list, |
| 82 // so no locking is needed here. | 84 // so no locking is needed here. |
| 83 return current_profiles_.length() == 1; | 85 return current_profiles_.length() == 1; |
| 84 } | 86 } |
| 85 | 87 |
| 86 } } // namespace v8::internal | 88 } } // namespace v8::internal |
| 87 | 89 |
| 88 #endif // ENABLE_CPP_PROFILES_PROCESSOR | 90 #endif // ENABLE_CPP_PROFILES_PROCESSOR |
| 89 | 91 |
| 90 #endif // V8_PROFILE_GENERATOR_INL_H_ | 92 #endif // V8_PROFILE_GENERATOR_INL_H_ |
| OLD | NEW |