| 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 27 matching lines...) Expand all Loading... |
| 38 const char* StringsStorage::GetFunctionName(String* name) { | 38 const char* StringsStorage::GetFunctionName(String* name) { |
| 39 return GetFunctionName(GetName(name)); | 39 return GetFunctionName(GetName(name)); |
| 40 } | 40 } |
| 41 | 41 |
| 42 | 42 |
| 43 const char* StringsStorage::GetFunctionName(const char* name) { | 43 const char* StringsStorage::GetFunctionName(const char* name) { |
| 44 return strlen(name) > 0 ? name : ProfileGenerator::kAnonymousFunctionName; | 44 return strlen(name) > 0 ? name : ProfileGenerator::kAnonymousFunctionName; |
| 45 } | 45 } |
| 46 | 46 |
| 47 | 47 |
| 48 CodeEntry::CodeEntry(int security_token_id) | |
| 49 : tag_(Logger::FUNCTION_TAG), | |
| 50 name_prefix_(kEmptyNamePrefix), | |
| 51 name_(""), | |
| 52 resource_name_(""), | |
| 53 line_number_(0), | |
| 54 security_token_id_(security_token_id) { | |
| 55 } | |
| 56 | |
| 57 | |
| 58 CodeEntry::CodeEntry(Logger::LogEventsAndTags tag, | 48 CodeEntry::CodeEntry(Logger::LogEventsAndTags tag, |
| 59 const char* name_prefix, | 49 const char* name_prefix, |
| 60 const char* name, | 50 const char* name, |
| 61 const char* resource_name, | 51 const char* resource_name, |
| 62 int line_number, | 52 int line_number, |
| 63 int security_token_id) | 53 int security_token_id) |
| 64 : tag_(tag), | 54 : tag_(tag), |
| 65 name_prefix_(name_prefix), | 55 name_prefix_(name_prefix), |
| 66 name_(name), | 56 name_(name), |
| 67 resource_name_(resource_name), | 57 resource_name_(resource_name), |
| 68 line_number_(line_number), | 58 line_number_(line_number), |
| 59 shared_id_(0), |
| 69 security_token_id_(security_token_id) { | 60 security_token_id_(security_token_id) { |
| 70 } | 61 } |
| 71 | 62 |
| 72 | 63 |
| 73 bool CodeEntry::is_js_function_tag(Logger::LogEventsAndTags tag) { | 64 bool CodeEntry::is_js_function_tag(Logger::LogEventsAndTags tag) { |
| 74 return tag == Logger::FUNCTION_TAG | 65 return tag == Logger::FUNCTION_TAG |
| 75 || tag == Logger::LAZY_COMPILE_TAG | 66 || tag == Logger::LAZY_COMPILE_TAG |
| 76 || tag == Logger::SCRIPT_TAG | 67 || tag == Logger::SCRIPT_TAG |
| 77 || tag == Logger::NATIVE_FUNCTION_TAG | 68 || tag == Logger::NATIVE_FUNCTION_TAG |
| 78 || tag == Logger::NATIVE_LAZY_COMPILE_TAG | 69 || tag == Logger::NATIVE_LAZY_COMPILE_TAG |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 v8::ActivityControl::kContinue; | 147 v8::ActivityControl::kContinue; |
| 157 } | 148 } |
| 158 return true; | 149 return true; |
| 159 } | 150 } |
| 160 | 151 |
| 161 } } // namespace v8::internal | 152 } } // namespace v8::internal |
| 162 | 153 |
| 163 #endif // ENABLE_LOGGING_AND_PROFILING | 154 #endif // ENABLE_LOGGING_AND_PROFILING |
| 164 | 155 |
| 165 #endif // V8_PROFILE_GENERATOR_INL_H_ | 156 #endif // V8_PROFILE_GENERATOR_INL_H_ |
| OLD | NEW |