| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 DISALLOW_COPY_AND_ASSIGN(StringsStorage); | 92 DISALLOW_COPY_AND_ASSIGN(StringsStorage); |
| 93 }; | 93 }; |
| 94 | 94 |
| 95 | 95 |
| 96 class CodeEntry { | 96 class CodeEntry { |
| 97 public: | 97 public: |
| 98 // CodeEntry doesn't own name strings, just references them. | 98 // CodeEntry doesn't own name strings, just references them. |
| 99 INLINE(CodeEntry(Logger::LogEventsAndTags tag, | 99 INLINE(CodeEntry(Logger::LogEventsAndTags tag, |
| 100 const char* name_prefix, | 100 const char* name_prefix, |
| 101 const char* name, | 101 const char* name, |
| 102 const char* resource_name, | 102 int security_token_id = TokenEnumerator::kNoSecurityToken, |
| 103 int line_number, | 103 const char* resource_name = CodeEntry::kEmptyResourceName, |
| 104 int security_token_id)); | 104 int line_number = v8::CpuProfileNode::kNoLineNumberInfo)); |
| 105 ~CodeEntry(); | 105 ~CodeEntry(); |
| 106 | 106 |
| 107 INLINE(bool is_js_function() const) { return is_js_function_tag(tag_); } | 107 INLINE(bool is_js_function() const) { return is_js_function_tag(tag_); } |
| 108 INLINE(const char* name_prefix() const) { return name_prefix_; } | 108 INLINE(const char* name_prefix() const) { return name_prefix_; } |
| 109 INLINE(bool has_name_prefix() const) { return name_prefix_[0] != '\0'; } | 109 INLINE(bool has_name_prefix() const) { return name_prefix_[0] != '\0'; } |
| 110 INLINE(const char* name() const) { return name_; } | 110 INLINE(const char* name() const) { return name_; } |
| 111 INLINE(const char* resource_name() const) { return resource_name_; } | 111 INLINE(const char* resource_name() const) { return resource_name_; } |
| 112 INLINE(int line_number() const) { return line_number_; } | 112 INLINE(int line_number() const) { return line_number_; } |
| 113 INLINE(void set_shared_id(int shared_id)) { shared_id_ = shared_id; } | 113 INLINE(void set_shared_id(int shared_id)) { shared_id_ = shared_id; } |
| 114 INLINE(int security_token_id() const) { return security_token_id_; } | 114 INLINE(int security_token_id() const) { return security_token_id_; } |
| 115 | 115 |
| 116 INLINE(static bool is_js_function_tag(Logger::LogEventsAndTags tag)); | 116 INLINE(static bool is_js_function_tag(Logger::LogEventsAndTags tag)); |
| 117 | 117 |
| 118 List<OffsetRange>* no_frame_ranges() const { return no_frame_ranges_; } | 118 List<OffsetRange>* no_frame_ranges() const { return no_frame_ranges_; } |
| 119 void set_no_frame_ranges(List<OffsetRange>* ranges) { | 119 void set_no_frame_ranges(List<OffsetRange>* ranges) { |
| 120 no_frame_ranges_ = ranges; | 120 no_frame_ranges_ = ranges; |
| 121 } | 121 } |
| 122 | 122 |
| 123 void CopyData(const CodeEntry& source); | 123 void CopyData(const CodeEntry& source); |
| 124 uint32_t GetCallUid() const; | 124 uint32_t GetCallUid() const; |
| 125 bool IsSameAs(CodeEntry* entry) const; | 125 bool IsSameAs(CodeEntry* entry) const; |
| 126 | 126 |
| 127 static const char* const kEmptyNamePrefix; | 127 static const char* const kEmptyNamePrefix; |
| 128 static const char* const kEmptyResourceName; |
| 128 | 129 |
| 129 private: | 130 private: |
| 130 Logger::LogEventsAndTags tag_; | 131 Logger::LogEventsAndTags tag_; |
| 131 const char* name_prefix_; | 132 const char* name_prefix_; |
| 132 const char* name_; | 133 const char* name_; |
| 133 const char* resource_name_; | 134 const char* resource_name_; |
| 134 int line_number_; | 135 int line_number_; |
| 135 int shared_id_; | 136 int shared_id_; |
| 136 int security_token_id_; | 137 int security_token_id_; |
| 137 List<OffsetRange>* no_frame_ranges_; | 138 List<OffsetRange>* no_frame_ranges_; |
| (...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 431 CodeEntry* gc_entry_; | 432 CodeEntry* gc_entry_; |
| 432 SampleRateCalculator sample_rate_calc_; | 433 SampleRateCalculator sample_rate_calc_; |
| 433 | 434 |
| 434 DISALLOW_COPY_AND_ASSIGN(ProfileGenerator); | 435 DISALLOW_COPY_AND_ASSIGN(ProfileGenerator); |
| 435 }; | 436 }; |
| 436 | 437 |
| 437 | 438 |
| 438 } } // namespace v8::internal | 439 } } // namespace v8::internal |
| 439 | 440 |
| 440 #endif // V8_PROFILE_GENERATOR_H_ | 441 #endif // V8_PROFILE_GENERATOR_H_ |
| OLD | NEW |