Commit e8dd6981 authored by fmeawad's avatar fmeawad Committed by Commit bot

Remove V8.External traces due to its high overhead

The Tracing split CL https://codereview.chromium.org/1707563002 mostly moved the location of
the TRACE call, but it added 2 very high frequency calls related to tracking V8.External.

In most benchmark and devices the added overhead is negligible except on N6 where it gets amplified.
This CL removes those 2 calls until more efficient tracing or a different technique is used.

BUG=588137
LOG=N

Review URL: https://codereview.chromium.org/1765673003

Cr-Commit-Position: refs/heads/master@{#34499}
parent 86c955fe
......@@ -882,7 +882,6 @@ void Logger::TimerEvent(Logger::StartEnd se, const char* name) {
void Logger::EnterExternal(Isolate* isolate) {
LOG(isolate, TimerEvent(START, TimerEventExternal::name()));
TRACE_EVENT_BEGIN0(TRACE_DISABLED_BY_DEFAULT("v8"), "V8.External");
DCHECK(isolate->current_vm_state() == JS);
isolate->set_current_vm_state(EXTERNAL);
}
......@@ -890,7 +889,6 @@ void Logger::EnterExternal(Isolate* isolate) {
void Logger::LeaveExternal(Isolate* isolate) {
LOG(isolate, TimerEvent(END, TimerEventExternal::name()));
TRACE_EVENT_END0(TRACE_DISABLED_BY_DEFAULT("v8"), "V8.External");
DCHECK(isolate->current_vm_state() == EXTERNAL);
isolate->set_current_vm_state(JS);
}
......
......@@ -40,11 +40,8 @@ inline const char* StateToString(StateTag state) {
template <StateTag Tag>
VMState<Tag>::VMState(Isolate* isolate)
: isolate_(isolate), previous_tag_(isolate->current_vm_state()) {
if (previous_tag_ != EXTERNAL && Tag == EXTERNAL) {
if (FLAG_log_timer_events) {
LOG(isolate_, TimerEvent(Logger::START, TimerEventExternal::name()));
}
TRACE_EVENT_BEGIN0(TRACE_DISABLED_BY_DEFAULT("v8"), "V8.External");
if (FLAG_log_timer_events && previous_tag_ != EXTERNAL && Tag == EXTERNAL) {
LOG(isolate_, TimerEvent(Logger::START, TimerEventExternal::name()));
}
isolate_->set_current_vm_state(Tag);
}
......@@ -52,11 +49,8 @@ VMState<Tag>::VMState(Isolate* isolate)
template <StateTag Tag>
VMState<Tag>::~VMState() {
if (previous_tag_ != EXTERNAL && Tag == EXTERNAL) {
if (FLAG_log_timer_events) {
LOG(isolate_, TimerEvent(Logger::END, TimerEventExternal::name()));
}
TRACE_EVENT_END0(TRACE_DISABLED_BY_DEFAULT("v8"), "V8.External");
if (FLAG_log_timer_events && previous_tag_ != EXTERNAL && Tag == EXTERNAL) {
LOG(isolate_, TimerEvent(Logger::END, TimerEventExternal::name()));
}
isolate_->set_current_vm_state(previous_tag_);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment