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

Side by Side Diff: src/log.h

Issue 186163002: Add support for allowing an embedder to get the V8 profile timer event logs. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Remove check for an existing event_logger, as at this point, none might have already been set Created 6 years, 9 months 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 | Annotate | Revision Log
« no previous file with comments | « src/isolate.cc ('k') | 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 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 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 // ==== Events logged by --log-timer-events. ==== 309 // ==== Events logged by --log-timer-events. ====
310 enum StartEnd { START, END }; 310 enum StartEnd { START, END };
311 311
312 void CodeDeoptEvent(Code* code); 312 void CodeDeoptEvent(Code* code);
313 313
314 void TimerEvent(StartEnd se, const char* name); 314 void TimerEvent(StartEnd se, const char* name);
315 315
316 static void EnterExternal(Isolate* isolate); 316 static void EnterExternal(Isolate* isolate);
317 static void LeaveExternal(Isolate* isolate); 317 static void LeaveExternal(Isolate* isolate);
318 318
319 static void EmptyLogInternalEvents(const char* name, int se) { }
320 static void LogInternalEvents(const char* name, int se);
321
319 class TimerEventScope { 322 class TimerEventScope {
320 public: 323 public:
321 TimerEventScope(Isolate* isolate, const char* name) 324 TimerEventScope(Isolate* isolate, const char* name)
322 : isolate_(isolate), name_(name) { 325 : isolate_(isolate), name_(name) {
323 if (FLAG_log_internal_timer_events) LogTimerEvent(START); 326 LogTimerEvent(START);
324 } 327 }
325 328
326 ~TimerEventScope() { 329 ~TimerEventScope() {
327 if (FLAG_log_internal_timer_events) LogTimerEvent(END); 330 LogTimerEvent(END);
328 } 331 }
329 332
330 void LogTimerEvent(StartEnd se); 333 void LogTimerEvent(StartEnd se);
331 334
332 static const char* v8_recompile_synchronous; 335 static const char* v8_recompile_synchronous;
333 static const char* v8_recompile_concurrent; 336 static const char* v8_recompile_concurrent;
334 static const char* v8_compile_full_code; 337 static const char* v8_compile_full_code;
335 static const char* v8_execute; 338 static const char* v8_execute;
336 static const char* v8_external; 339 static const char* v8_external;
337 340
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
537 int length) = 0; 540 int length) = 0;
538 541
539 NameBuffer* name_buffer_; 542 NameBuffer* name_buffer_;
540 }; 543 };
541 544
542 545
543 } } // namespace v8::internal 546 } } // namespace v8::internal
544 547
545 548
546 #endif // V8_LOG_H_ 549 #endif // V8_LOG_H_
OLDNEW
« no previous file with comments | « src/isolate.cc ('k') | src/log.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698