OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 22 matching lines...) Expand all Loading... |
33 #include "circular-queue.h" | 33 #include "circular-queue.h" |
34 #include "sampler.h" | 34 #include "sampler.h" |
35 #include "unbound-queue.h" | 35 #include "unbound-queue.h" |
36 | 36 |
37 namespace v8 { | 37 namespace v8 { |
38 namespace internal { | 38 namespace internal { |
39 | 39 |
40 // Forward declarations. | 40 // Forward declarations. |
41 class CodeEntry; | 41 class CodeEntry; |
42 class CodeMap; | 42 class CodeMap; |
| 43 class CompilationInfo; |
43 class CpuProfile; | 44 class CpuProfile; |
44 class CpuProfilesCollection; | 45 class CpuProfilesCollection; |
45 class ProfileGenerator; | 46 class ProfileGenerator; |
46 class TokenEnumerator; | 47 class TokenEnumerator; |
47 | 48 |
48 #define CODE_EVENTS_TYPE_LIST(V) \ | 49 #define CODE_EVENTS_TYPE_LIST(V) \ |
49 V(CODE_CREATION, CodeCreateEventRecord) \ | 50 V(CODE_CREATION, CodeCreateEventRecord) \ |
50 V(CODE_MOVE, CodeMoveEventRecord) \ | 51 V(CODE_MOVE, CodeMoveEventRecord) \ |
51 V(SHARED_FUNC_MOVE, SharedFunctionInfoMoveEventRecord) | 52 V(SHARED_FUNC_MOVE, SharedFunctionInfoMoveEventRecord) |
52 | 53 |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 INLINE(bool running()) { return running_; } | 136 INLINE(bool running()) { return running_; } |
136 | 137 |
137 // Events adding methods. Called by VM threads. | 138 // Events adding methods. Called by VM threads. |
138 void CallbackCreateEvent(Logger::LogEventsAndTags tag, | 139 void CallbackCreateEvent(Logger::LogEventsAndTags tag, |
139 const char* prefix, Name* name, | 140 const char* prefix, Name* name, |
140 Address start); | 141 Address start); |
141 void CodeCreateEvent(Logger::LogEventsAndTags tag, | 142 void CodeCreateEvent(Logger::LogEventsAndTags tag, |
142 Name* name, | 143 Name* name, |
143 String* resource_name, int line_number, | 144 String* resource_name, int line_number, |
144 Address start, unsigned size, | 145 Address start, unsigned size, |
145 Address shared); | 146 Address shared, |
| 147 CompilationInfo* info); |
146 void CodeCreateEvent(Logger::LogEventsAndTags tag, | 148 void CodeCreateEvent(Logger::LogEventsAndTags tag, |
147 const char* name, | 149 const char* name, |
148 Address start, unsigned size); | 150 Address start, unsigned size); |
149 void CodeCreateEvent(Logger::LogEventsAndTags tag, | 151 void CodeCreateEvent(Logger::LogEventsAndTags tag, |
150 int args_count, | 152 int args_count, |
151 Address start, unsigned size); | 153 Address start, unsigned size); |
152 void CodeMoveEvent(Address from, Address to); | 154 void CodeMoveEvent(Address from, Address to); |
153 void CodeDeleteEvent(Address from); | 155 void CodeDeleteEvent(Address from); |
154 void SharedFunctionInfoMoveEvent(Address from, Address to); | 156 void SharedFunctionInfoMoveEvent(Address from, Address to); |
155 void RegExpCodeCreateEvent(Logger::LogEventsAndTags tag, | 157 void RegExpCodeCreateEvent(Logger::LogEventsAndTags tag, |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 | 222 |
221 // Must be called via PROFILE macro, otherwise will crash when | 223 // Must be called via PROFILE macro, otherwise will crash when |
222 // profiling is not enabled. | 224 // profiling is not enabled. |
223 void CallbackEvent(Name* name, Address entry_point); | 225 void CallbackEvent(Name* name, Address entry_point); |
224 void CodeCreateEvent(Logger::LogEventsAndTags tag, | 226 void CodeCreateEvent(Logger::LogEventsAndTags tag, |
225 Code* code, const char* comment); | 227 Code* code, const char* comment); |
226 void CodeCreateEvent(Logger::LogEventsAndTags tag, | 228 void CodeCreateEvent(Logger::LogEventsAndTags tag, |
227 Code* code, Name* name); | 229 Code* code, Name* name); |
228 void CodeCreateEvent(Logger::LogEventsAndTags tag, | 230 void CodeCreateEvent(Logger::LogEventsAndTags tag, |
229 Code* code, | 231 Code* code, |
230 SharedFunctionInfo* shared, | 232 SharedFunctionInfo* shared, |
231 Name* name); | 233 CompilationInfo* info, |
| 234 Name* name); |
232 void CodeCreateEvent(Logger::LogEventsAndTags tag, | 235 void CodeCreateEvent(Logger::LogEventsAndTags tag, |
233 Code* code, | 236 Code* code, |
234 SharedFunctionInfo* shared, | 237 SharedFunctionInfo* shared, |
| 238 CompilationInfo* info, |
235 String* source, int line); | 239 String* source, int line); |
236 void CodeCreateEvent(Logger::LogEventsAndTags tag, | 240 void CodeCreateEvent(Logger::LogEventsAndTags tag, |
237 Code* code, int args_count); | 241 Code* code, int args_count); |
238 void CodeMovingGCEvent() {} | 242 void CodeMovingGCEvent() {} |
239 void CodeMoveEvent(Address from, Address to); | 243 void CodeMoveEvent(Address from, Address to); |
240 void CodeDeleteEvent(Address from); | 244 void CodeDeleteEvent(Address from); |
241 void GetterCallbackEvent(Name* name, Address entry_point); | 245 void GetterCallbackEvent(Name* name, Address entry_point); |
242 void RegExpCodeCreateEvent(Code* code, String* source); | 246 void RegExpCodeCreateEvent(Code* code, String* source); |
243 void SetterCallbackEvent(Name* name, Address entry_point); | 247 void SetterCallbackEvent(Name* name, Address entry_point); |
244 void SharedFunctionInfoMoveEvent(Address from, Address to); | 248 void SharedFunctionInfoMoveEvent(Address from, Address to); |
(...skipping 17 matching lines...) Expand all Loading... |
262 bool is_profiling_; | 266 bool is_profiling_; |
263 | 267 |
264 private: | 268 private: |
265 DISALLOW_COPY_AND_ASSIGN(CpuProfiler); | 269 DISALLOW_COPY_AND_ASSIGN(CpuProfiler); |
266 }; | 270 }; |
267 | 271 |
268 } } // namespace v8::internal | 272 } } // namespace v8::internal |
269 | 273 |
270 | 274 |
271 #endif // V8_CPU_PROFILER_H_ | 275 #endif // V8_CPU_PROFILER_H_ |
OLD | NEW |