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}
This commit is contained in:
parent
86c955fee0
commit
e8dd6981ca
@ -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_);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user