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

Side by Side Diff: src/log.h

Issue 382043003: Add ExternalTimerEventScope to log non internal timer events scopes (Closed) Base URL: git://github.com/v8/v8.git@master
Patch Set: Minor fix Created 6 years, 5 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
« no previous file with comments | « src/ic.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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_LOG_H_ 5 #ifndef V8_LOG_H_
6 #define V8_LOG_H_ 6 #define V8_LOG_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "src/allocation.h" 10 #include "src/allocation.h"
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 static const char* v8_compile_full_code; 318 static const char* v8_compile_full_code;
319 static const char* v8_execute; 319 static const char* v8_execute;
320 static const char* v8_external; 320 static const char* v8_external;
321 static const char* v8_ic_miss; 321 static const char* v8_ic_miss;
322 322
323 private: 323 private:
324 Isolate* isolate_; 324 Isolate* isolate_;
325 const char* name_; 325 const char* name_;
326 }; 326 };
327 327
328 class ExternalTimerEventScope {
329 public:
330 ExternalTimerEventScope(Isolate* isolate, const char* name)
331 : isolate_(isolate), name_(name) {
332 LogTimerEvent(START);
333 }
334
335 ~ExternalTimerEventScope() {
336 LogTimerEvent(END);
337 }
338
339 void LogTimerEvent(StartEnd se);
340
341 private:
342 Isolate* isolate_;
343 const char* name_;
344 };
345
328 // ==== Events logged by --log-regexp ==== 346 // ==== Events logged by --log-regexp ====
329 // Regexp compilation and execution events. 347 // Regexp compilation and execution events.
330 348
331 void RegExpCompileEvent(Handle<JSRegExp> regexp, bool in_cache); 349 void RegExpCompileEvent(Handle<JSRegExp> regexp, bool in_cache);
332 350
333 bool is_logging() { 351 bool is_logging() {
334 return is_logging_; 352 return is_logging_;
335 } 353 }
336 354
337 bool is_logging_code_events() { 355 bool is_logging_code_events() {
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
520 int length) = 0; 538 int length) = 0;
521 539
522 NameBuffer* name_buffer_; 540 NameBuffer* name_buffer_;
523 }; 541 };
524 542
525 543
526 } } // namespace v8::internal 544 } } // namespace v8::internal
527 545
528 546
529 #endif // V8_LOG_H_ 547 #endif // V8_LOG_H_
OLDNEW
« no previous file with comments | « src/ic.cc ('k') | src/log.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698