Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(121)

Side by Side Diff: src/log.h

Issue 434074: Include getters and setters callbacks invocations in CPU profiler log. (Closed)
Patch Set: Comments addressed Created 11 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/log.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 static void ApiIndexedPropertyAccess(const char* tag, 201 static void ApiIndexedPropertyAccess(const char* tag,
202 JSObject* holder, 202 JSObject* holder,
203 uint32_t index); 203 uint32_t index);
204 static void ApiObjectAccess(const char* tag, JSObject* obj); 204 static void ApiObjectAccess(const char* tag, JSObject* obj);
205 static void ApiEntryCall(const char* name); 205 static void ApiEntryCall(const char* name);
206 206
207 207
208 // ==== Events logged by --log-code. ==== 208 // ==== Events logged by --log-code. ====
209 // Emits a code event for a callback function. 209 // Emits a code event for a callback function.
210 static void CallbackEvent(String* name, Address entry_point); 210 static void CallbackEvent(String* name, Address entry_point);
211 static void GetterCallbackEvent(String* name, Address entry_point);
212 static void SetterCallbackEvent(String* name, Address entry_point);
211 // Emits a code create event. 213 // Emits a code create event.
212 static void CodeCreateEvent(LogEventsAndTags tag, 214 static void CodeCreateEvent(LogEventsAndTags tag,
213 Code* code, const char* source); 215 Code* code, const char* source);
214 static void CodeCreateEvent(LogEventsAndTags tag, Code* code, String* name); 216 static void CodeCreateEvent(LogEventsAndTags tag, Code* code, String* name);
215 static void CodeCreateEvent(LogEventsAndTags tag, Code* code, String* name, 217 static void CodeCreateEvent(LogEventsAndTags tag, Code* code, String* name,
216 String* source, int line); 218 String* source, int line);
217 static void CodeCreateEvent(LogEventsAndTags tag, Code* code, int args_count); 219 static void CodeCreateEvent(LogEventsAndTags tag, Code* code, int args_count);
218 // Emits a code create event for a RegExp. 220 // Emits a code create event for a RegExp.
219 static void RegExpCodeCreateEvent(Code* code, String* source); 221 static void RegExpCodeCreateEvent(Code* code, String* source);
220 // Emits a code move event. 222 // Emits a code move event.
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 static void PauseProfiler(int flags); 268 static void PauseProfiler(int flags);
267 static void ResumeProfiler(int flags); 269 static void ResumeProfiler(int flags);
268 static int GetActiveProfilerModules(); 270 static int GetActiveProfilerModules();
269 271
270 // If logging is performed into a memory buffer, allows to 272 // If logging is performed into a memory buffer, allows to
271 // retrieve previously written messages. See v8.h. 273 // retrieve previously written messages. See v8.h.
272 static int GetLogLines(int from_pos, char* dest_buf, int max_size); 274 static int GetLogLines(int from_pos, char* dest_buf, int max_size);
273 275
274 // Logs all compiled functions found in the heap. 276 // Logs all compiled functions found in the heap.
275 static void LogCompiledFunctions(); 277 static void LogCompiledFunctions();
278 // Logs all accessor callbacks found in the heap.
279 static void LogAccessorCallbacks();
276 // Used for logging stubs found in the snapshot. 280 // Used for logging stubs found in the snapshot.
277 static void LogCodeObject(Object* code_object); 281 static void LogCodeObject(Object* code_object);
278 282
279 private: 283 private:
280 284
281 // Profiler's sampling interval (in milliseconds). 285 // Profiler's sampling interval (in milliseconds).
282 static const int kSamplingIntervalMs = 1; 286 static const int kSamplingIntervalMs = 1;
283 287
284 // Size of window used for log records compression. 288 // Size of window used for log records compression.
285 static const int kCompressionWindowSize = 4; 289 static const int kCompressionWindowSize = 4;
286 290
287 // Emits the profiler's first message. 291 // Emits the profiler's first message.
288 static void ProfilerBeginEvent(); 292 static void ProfilerBeginEvent();
289 293
294 // Emits callback event messages.
295 static void CallbackEventInternal(const char* prefix,
296 const char* name,
297 Address entry_point);
298
290 // Emits aliases for compressed messages. 299 // Emits aliases for compressed messages.
291 static void LogAliases(); 300 static void LogAliases();
292 301
293 // Emits the source code of a regexp. Used by regexp events. 302 // Emits the source code of a regexp. Used by regexp events.
294 static void LogRegExpSource(Handle<JSRegExp> regexp); 303 static void LogRegExpSource(Handle<JSRegExp> regexp);
295 304
296 // Emits a profiler tick event. Used by the profiler thread. 305 // Emits a profiler tick event. Used by the profiler thread.
297 static void TickEvent(TickSample* sample, bool overflow); 306 static void TickEvent(TickSample* sample, bool overflow);
298 307
299 static void ApiEvent(const char* name, ...); 308 static void ApiEvent(const char* name, ...);
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 // Class that extracts stack trace, used for profiling. 362 // Class that extracts stack trace, used for profiling.
354 class StackTracer : public AllStatic { 363 class StackTracer : public AllStatic {
355 public: 364 public:
356 static void Trace(TickSample* sample); 365 static void Trace(TickSample* sample);
357 }; 366 };
358 367
359 368
360 } } // namespace v8::internal 369 } } // namespace v8::internal
361 370
362 #endif // V8_LOG_H_ 371 #endif // V8_LOG_H_
OLDNEW
« no previous file with comments | « no previous file | src/log.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698