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

Unified Diff: src/log.h

Issue 12040075: Log event start and event end separately when using --log-timer-events. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/counters.cc ('k') | src/log.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/log.h
diff --git a/src/log.h b/src/log.h
index b5b681711c5cbe1f43de6d70484b9efb966c5880..093906c3848c2966bf2defd349cb19bdabe6b14c 100644
--- a/src/log.h
+++ b/src/log.h
@@ -273,8 +273,9 @@ class Logger {
uintptr_t end);
// ==== Events logged by --log-timer-events. ====
- void TimerEvent(const char* name, int64_t start, int64_t end);
- void ExternalSwitch(StateTag old_tag, StateTag new_tag);
+ enum StartEnd { START, END };
+
+ void TimerEvent(StartEnd se, const char* name);
static void EnterExternal();
static void LeaveExternal();
@@ -282,25 +283,25 @@ class Logger {
class TimerEventScope {
public:
TimerEventScope(Isolate* isolate, const char* name)
- : isolate_(isolate), name_(name), start_(0) {
- if (FLAG_log_internal_timer_events) start_ = OS::Ticks();
+ : isolate_(isolate), name_(name) {
+ if (FLAG_log_internal_timer_events) LogTimerEvent(START);
}
~TimerEventScope() {
- if (FLAG_log_internal_timer_events) LogTimerEvent();
+ if (FLAG_log_internal_timer_events) LogTimerEvent(END);
}
- void LogTimerEvent();
+ void LogTimerEvent(StartEnd se);
static const char* v8_recompile_synchronous;
static const char* v8_recompile_parallel;
static const char* v8_compile_full_code;
static const char* v8_execute;
+ static const char* v8_external;
private:
Isolate* isolate_;
const char* name_;
- int64_t start_;
};
// ==== Events logged by --log-regexp ====
@@ -473,7 +474,6 @@ class Logger {
Address prev_code_;
int64_t epoch_;
- static int64_t enter_external_;
friend class CpuProfiler;
};
« no previous file with comments | « src/counters.cc ('k') | src/log.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698