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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 int line_number = v8::CpuProfileNode::kNoLineNumberInfo)); | 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 script_id() const) { return script_id_; } | |
115 INLINE(void set_script_id(int script_id)) { script_id_ = script_id; } | |
116 INLINE(int security_token_id() const) { return security_token_id_; } | 114 INLINE(int security_token_id() const) { return security_token_id_; } |
117 | 115 |
118 INLINE(static bool is_js_function_tag(Logger::LogEventsAndTags tag)); | 116 INLINE(static bool is_js_function_tag(Logger::LogEventsAndTags tag)); |
119 | 117 |
120 List<OffsetRange>* no_frame_ranges() const { return no_frame_ranges_; } | 118 List<OffsetRange>* no_frame_ranges() const { return no_frame_ranges_; } |
121 void set_no_frame_ranges(List<OffsetRange>* ranges) { | 119 void set_no_frame_ranges(List<OffsetRange>* ranges) { |
122 no_frame_ranges_ = ranges; | 120 no_frame_ranges_ = ranges; |
123 } | 121 } |
124 | 122 |
125 void SetBuiltinId(Builtins::Name id); | 123 void SetBuiltinId(Builtins::Name id); |
126 Builtins::Name builtin_id() const { return builtin_id_; } | 124 Builtins::Name builtin_id() const { return builtin_id_; } |
127 | 125 |
128 void CopyData(const CodeEntry& source); | 126 void CopyData(const CodeEntry& source); |
129 uint32_t GetCallUid() const; | 127 uint32_t GetCallUid() const; |
130 bool IsSameAs(CodeEntry* entry) const; | 128 bool IsSameAs(CodeEntry* entry) const; |
131 | 129 |
132 static const char* const kEmptyNamePrefix; | 130 static const char* const kEmptyNamePrefix; |
133 static const char* const kEmptyResourceName; | 131 static const char* const kEmptyResourceName; |
134 | 132 |
135 private: | 133 private: |
136 Logger::LogEventsAndTags tag_ : 8; | 134 Logger::LogEventsAndTags tag_ : 8; |
137 Builtins::Name builtin_id_ : 8; | 135 Builtins::Name builtin_id_ : 8; |
138 const char* name_prefix_; | 136 const char* name_prefix_; |
139 const char* name_; | 137 const char* name_; |
140 const char* resource_name_; | 138 const char* resource_name_; |
141 int line_number_; | 139 int line_number_; |
142 int shared_id_; | 140 int shared_id_; |
143 int script_id_; | |
144 int security_token_id_; | 141 int security_token_id_; |
145 List<OffsetRange>* no_frame_ranges_; | 142 List<OffsetRange>* no_frame_ranges_; |
146 | 143 |
147 DISALLOW_COPY_AND_ASSIGN(CodeEntry); | 144 DISALLOW_COPY_AND_ASSIGN(CodeEntry); |
148 }; | 145 }; |
149 | 146 |
150 | 147 |
151 class ProfileTree; | 148 class ProfileTree; |
152 | 149 |
153 class ProfileNode { | 150 class ProfileNode { |
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
443 CodeEntry* unresolved_entry_; | 440 CodeEntry* unresolved_entry_; |
444 SampleRateCalculator sample_rate_calc_; | 441 SampleRateCalculator sample_rate_calc_; |
445 | 442 |
446 DISALLOW_COPY_AND_ASSIGN(ProfileGenerator); | 443 DISALLOW_COPY_AND_ASSIGN(ProfileGenerator); |
447 }; | 444 }; |
448 | 445 |
449 | 446 |
450 } } // namespace v8::internal | 447 } } // namespace v8::internal |
451 | 448 |
452 #endif // V8_PROFILE_GENERATOR_H_ | 449 #endif // V8_PROFILE_GENERATOR_H_ |
OLD | NEW |