[cleanup] Remove obsolete and broken --log-timer-events

The --log-timer-events doesn't work anymore, since it cannot be enabled
after the snapshot was created ever since the CallApiCallback stub was
turned into a builtin.

Bug: v8:9183
Change-Id: I6e0b92141f1986fc791943ffef42dd4961aea0a1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1617931
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61633}
This commit is contained in:
Benedikt Meurer 2019-05-20 08:52:54 +02:00 committed by Commit Bot
parent 90b39673c3
commit 20d90b769b
14 changed files with 1 additions and 176 deletions

View File

@ -2865,26 +2865,8 @@ void CallApiFunctionAndReturn(MacroAssembler* masm, Register function_address,
__ add(r6, r6, Operand(1)); __ add(r6, r6, Operand(1));
__ str(r6, MemOperand(r9, kLevelOffset)); __ str(r6, MemOperand(r9, kLevelOffset));
if (FLAG_log_timer_events) {
FrameScope frame(masm, StackFrame::MANUAL);
__ PushSafepointRegisters();
__ PrepareCallCFunction(1);
__ Move(r0, ExternalReference::isolate_address(isolate));
__ CallCFunction(ExternalReference::log_enter_external_function(), 1);
__ PopSafepointRegisters();
}
__ StoreReturnAddressAndCall(r3); __ StoreReturnAddressAndCall(r3);
if (FLAG_log_timer_events) {
FrameScope frame(masm, StackFrame::MANUAL);
__ PushSafepointRegisters();
__ PrepareCallCFunction(1);
__ Move(r0, ExternalReference::isolate_address(isolate));
__ CallCFunction(ExternalReference::log_leave_external_function(), 1);
__ PopSafepointRegisters();
}
Label promote_scheduled_exception; Label promote_scheduled_exception;
Label delete_allocated_handles; Label delete_allocated_handles;
Label leave_exit_frame; Label leave_exit_frame;

View File

@ -3442,25 +3442,9 @@ void CallApiFunctionAndReturn(MacroAssembler* masm, Register function_address,
__ Add(level_reg, level_reg, 1); __ Add(level_reg, level_reg, 1);
__ Str(level_reg, MemOperand(handle_scope_base, kLevelOffset)); __ Str(level_reg, MemOperand(handle_scope_base, kLevelOffset));
if (FLAG_log_timer_events) {
FrameScope frame(masm, StackFrame::MANUAL);
__ PushSafepointRegisters();
__ Mov(x0, ExternalReference::isolate_address(isolate));
__ CallCFunction(ExternalReference::log_enter_external_function(), 1);
__ PopSafepointRegisters();
}
__ Mov(x10, x3); // TODO(arm64): Load target into x10 directly. __ Mov(x10, x3); // TODO(arm64): Load target into x10 directly.
__ StoreReturnAddressAndCall(x10); __ StoreReturnAddressAndCall(x10);
if (FLAG_log_timer_events) {
FrameScope frame(masm, StackFrame::MANUAL);
__ PushSafepointRegisters();
__ Mov(x0, ExternalReference::isolate_address(isolate));
__ CallCFunction(ExternalReference::log_leave_external_function(), 1);
__ PopSafepointRegisters();
}
Label promote_scheduled_exception; Label promote_scheduled_exception;
Label delete_allocated_handles; Label delete_allocated_handles;
Label leave_exit_frame; Label leave_exit_frame;

View File

@ -3019,16 +3019,6 @@ void CallApiFunctionAndReturn(MacroAssembler* masm, Register function_address,
__ mov(esi, __ ExternalReferenceAsOperand(next_address, esi)); __ mov(esi, __ ExternalReferenceAsOperand(next_address, esi));
__ mov(edi, __ ExternalReferenceAsOperand(limit_address, edi)); __ mov(edi, __ ExternalReferenceAsOperand(limit_address, edi));
if (FLAG_log_timer_events) {
FrameScope frame(masm, StackFrame::MANUAL);
__ PushSafepointRegisters();
__ PrepareCallCFunction(1, eax);
__ Move(Operand(esp, 0),
Immediate(ExternalReference::isolate_address(isolate)));
__ CallCFunction(ExternalReference::log_enter_external_function(), 1);
__ PopSafepointRegisters();
}
Label profiler_disabled; Label profiler_disabled;
Label end_profiler_check; Label end_profiler_check;
__ Move(eax, Immediate(ExternalReference::is_profiling_address(isolate))); __ Move(eax, Immediate(ExternalReference::is_profiling_address(isolate)));
@ -3047,16 +3037,6 @@ void CallApiFunctionAndReturn(MacroAssembler* masm, Register function_address,
__ call(function_address); __ call(function_address);
__ bind(&end_profiler_check); __ bind(&end_profiler_check);
if (FLAG_log_timer_events) {
FrameScope frame(masm, StackFrame::MANUAL);
__ PushSafepointRegisters();
__ PrepareCallCFunction(1, eax);
__ mov(eax, Immediate(ExternalReference::isolate_address(isolate)));
__ mov(Operand(esp, 0), eax);
__ CallCFunction(ExternalReference::log_leave_external_function(), 1);
__ PopSafepointRegisters();
}
Label prologue; Label prologue;
// Load the value from ReturnValue // Load the value from ReturnValue
__ mov(eax, return_value_operand); __ mov(eax, return_value_operand);

View File

@ -2854,26 +2854,8 @@ void CallApiFunctionAndReturn(MacroAssembler* masm, Register function_address,
__ Addu(s2, s2, Operand(1)); __ Addu(s2, s2, Operand(1));
__ sw(s2, MemOperand(s5, kLevelOffset)); __ sw(s2, MemOperand(s5, kLevelOffset));
if (FLAG_log_timer_events) {
FrameScope frame(masm, StackFrame::MANUAL);
__ PushSafepointRegisters();
__ PrepareCallCFunction(1, a0);
__ li(a0, ExternalReference::isolate_address(isolate));
__ CallCFunction(ExternalReference::log_enter_external_function(), 1);
__ PopSafepointRegisters();
}
__ StoreReturnAddressAndCall(t9); __ StoreReturnAddressAndCall(t9);
if (FLAG_log_timer_events) {
FrameScope frame(masm, StackFrame::MANUAL);
__ PushSafepointRegisters();
__ PrepareCallCFunction(1, a0);
__ li(a0, ExternalReference::isolate_address(isolate));
__ CallCFunction(ExternalReference::log_leave_external_function(), 1);
__ PopSafepointRegisters();
}
Label promote_scheduled_exception; Label promote_scheduled_exception;
Label delete_allocated_handles; Label delete_allocated_handles;
Label leave_exit_frame; Label leave_exit_frame;

View File

@ -2893,26 +2893,8 @@ void CallApiFunctionAndReturn(MacroAssembler* masm, Register function_address,
__ Addu(s2, s2, Operand(1)); __ Addu(s2, s2, Operand(1));
__ Sw(s2, MemOperand(s5, kLevelOffset)); __ Sw(s2, MemOperand(s5, kLevelOffset));
if (FLAG_log_timer_events) {
FrameScope frame(masm, StackFrame::MANUAL);
__ PushSafepointRegisters();
__ PrepareCallCFunction(1, a0);
__ li(a0, ExternalReference::isolate_address(isolate));
__ CallCFunction(ExternalReference::log_enter_external_function(), 1);
__ PopSafepointRegisters();
}
__ StoreReturnAddressAndCall(t9); __ StoreReturnAddressAndCall(t9);
if (FLAG_log_timer_events) {
FrameScope frame(masm, StackFrame::MANUAL);
__ PushSafepointRegisters();
__ PrepareCallCFunction(1, a0);
__ li(a0, ExternalReference::isolate_address(isolate));
__ CallCFunction(ExternalReference::log_leave_external_function(), 1);
__ PopSafepointRegisters();
}
Label promote_scheduled_exception; Label promote_scheduled_exception;
Label delete_allocated_handles; Label delete_allocated_handles;
Label leave_exit_frame; Label leave_exit_frame;

View File

@ -2990,26 +2990,8 @@ static void CallApiFunctionAndReturn(MacroAssembler* masm,
__ addi(r16, r16, Operand(1)); __ addi(r16, r16, Operand(1));
__ stw(r16, MemOperand(r17, kLevelOffset)); __ stw(r16, MemOperand(r17, kLevelOffset));
if (FLAG_log_timer_events) {
FrameScope frame(masm, StackFrame::MANUAL);
__ PushSafepointRegisters();
__ PrepareCallCFunction(1, r3);
__ Move(r3, ExternalReference::isolate_address(isolate));
__ CallCFunction(ExternalReference::log_enter_external_function(), 1);
__ PopSafepointRegisters();
}
__ StoreReturnAddressAndCall(scratch); __ StoreReturnAddressAndCall(scratch);
if (FLAG_log_timer_events) {
FrameScope frame(masm, StackFrame::MANUAL);
__ PushSafepointRegisters();
__ PrepareCallCFunction(1, r3);
__ Move(r3, ExternalReference::isolate_address(isolate));
__ CallCFunction(ExternalReference::log_leave_external_function(), 1);
__ PopSafepointRegisters();
}
Label promote_scheduled_exception; Label promote_scheduled_exception;
Label delete_allocated_handles; Label delete_allocated_handles;
Label leave_exit_frame; Label leave_exit_frame;

View File

@ -3028,26 +3028,8 @@ static void CallApiFunctionAndReturn(MacroAssembler* masm,
__ AddP(r8, Operand(1)); __ AddP(r8, Operand(1));
__ StoreW(r8, MemOperand(r9, kLevelOffset)); __ StoreW(r8, MemOperand(r9, kLevelOffset));
if (FLAG_log_timer_events) {
FrameScope frame(masm, StackFrame::MANUAL);
__ PushSafepointRegisters();
__ PrepareCallCFunction(1, r2);
__ Move(r2, ExternalReference::isolate_address(isolate));
__ CallCFunction(ExternalReference::log_enter_external_function(), 1);
__ PopSafepointRegisters();
}
__ StoreReturnAddressAndCall(scratch); __ StoreReturnAddressAndCall(scratch);
if (FLAG_log_timer_events) {
FrameScope frame(masm, StackFrame::MANUAL);
__ PushSafepointRegisters();
__ PrepareCallCFunction(1, r2);
__ Move(r2, ExternalReference::isolate_address(isolate));
__ CallCFunction(ExternalReference::log_leave_external_function(), 1);
__ PopSafepointRegisters();
}
Label promote_scheduled_exception; Label promote_scheduled_exception;
Label delete_allocated_handles; Label delete_allocated_handles;
Label leave_exit_frame; Label leave_exit_frame;

View File

@ -3009,15 +3009,6 @@ void CallApiFunctionAndReturn(MacroAssembler* masm, Register function_address,
__ movq(prev_limit_reg, Operand(base_reg, kLimitOffset)); __ movq(prev_limit_reg, Operand(base_reg, kLimitOffset));
__ addl(Operand(base_reg, kLevelOffset), Immediate(1)); __ addl(Operand(base_reg, kLevelOffset), Immediate(1));
if (FLAG_log_timer_events) {
FrameScope frame(masm, StackFrame::MANUAL);
__ PushSafepointRegisters();
__ PrepareCallCFunction(1);
__ LoadAddress(arg_reg_1, ExternalReference::isolate_address(isolate));
__ CallCFunction(ExternalReference::log_enter_external_function(), 1);
__ PopSafepointRegisters();
}
Label profiler_disabled; Label profiler_disabled;
Label end_profiler_check; Label end_profiler_check;
__ Move(rax, ExternalReference::is_profiling_address(isolate)); __ Move(rax, ExternalReference::is_profiling_address(isolate));
@ -3038,15 +3029,6 @@ void CallApiFunctionAndReturn(MacroAssembler* masm, Register function_address,
// Call the api function! // Call the api function!
__ call(rax); __ call(rax);
if (FLAG_log_timer_events) {
FrameScope frame(masm, StackFrame::MANUAL);
__ PushSafepointRegisters();
__ PrepareCallCFunction(1);
__ LoadAddress(arg_reg_1, ExternalReference::isolate_address(isolate));
__ CallCFunction(ExternalReference::log_leave_external_function(), 1);
__ PopSafepointRegisters();
}
// Load the value from ReturnValue // Load the value from ReturnValue
__ movq(rax, return_value_operand); __ movq(rax, return_value_operand);
__ bind(&prologue); __ bind(&prologue);

View File

@ -338,9 +338,6 @@ FUNCTION_REFERENCE(f64_mod_wrapper_function, f64_mod_wrapper)
FUNCTION_REFERENCE(wasm_call_trap_callback_for_testing, FUNCTION_REFERENCE(wasm_call_trap_callback_for_testing,
wasm::call_trap_callback_for_testing) wasm::call_trap_callback_for_testing)
FUNCTION_REFERENCE(log_enter_external_function, Logger::EnterExternal)
FUNCTION_REFERENCE(log_leave_external_function, Logger::LeaveExternal)
ExternalReference ExternalReference::isolate_root(Isolate* isolate) { ExternalReference ExternalReference::isolate_root(Isolate* isolate) {
return ExternalReference(isolate->isolate_root()); return ExternalReference(isolate->isolate_root());
} }

View File

@ -150,8 +150,6 @@ class StatsCounter;
V(libc_memcpy_function, "libc_memcpy") \ V(libc_memcpy_function, "libc_memcpy") \
V(libc_memmove_function, "libc_memmove") \ V(libc_memmove_function, "libc_memmove") \
V(libc_memset_function, "libc_memset") \ V(libc_memset_function, "libc_memset") \
V(log_enter_external_function, "Logger::EnterExternal") \
V(log_leave_external_function, "Logger::LeaveExternal") \
V(mod_two_doubles_operation, "mod_two_doubles") \ V(mod_two_doubles_operation, "mod_two_doubles") \
V(new_deoptimizer_function, "Deoptimizer::New()") \ V(new_deoptimizer_function, "Deoptimizer::New()") \
V(orderedhashmap_gethash_raw, "orderedhashmap_gethash_raw") \ V(orderedhashmap_gethash_raw, "orderedhashmap_gethash_raw") \

View File

@ -1384,9 +1384,6 @@ DEFINE_IMPLICATION(perf_prof, perf_prof_unwinding_info)
DEFINE_STRING(gc_fake_mmap, "/tmp/__v8_gc__", DEFINE_STRING(gc_fake_mmap, "/tmp/__v8_gc__",
"Specify the name of the file for fake gc mmap used in ll_prof") "Specify the name of the file for fake gc mmap used in ll_prof")
DEFINE_BOOL(log_internal_timer_events, false, "Time internal events.") DEFINE_BOOL(log_internal_timer_events, false, "Time internal events.")
DEFINE_BOOL(log_timer_events, false,
"Time events including external callbacks.")
DEFINE_IMPLICATION(log_timer_events, log_internal_timer_events)
DEFINE_IMPLICATION(log_internal_timer_events, prof) DEFINE_IMPLICATION(log_internal_timer_events, prof)
DEFINE_BOOL(log_instruction_stats, false, "Log AArch64 instruction statistics.") DEFINE_BOOL(log_instruction_stats, false, "Log AArch64 instruction statistics.")
DEFINE_STRING(log_instruction_file, "arm64_inst.csv", DEFINE_STRING(log_instruction_file, "arm64_inst.csv",

View File

@ -1065,22 +1065,6 @@ void Logger::TimerEvent(Logger::StartEnd se, const char* name) {
msg.WriteToLogFile(); msg.WriteToLogFile();
} }
// static
void Logger::EnterExternal(Isolate* isolate) {
DCHECK(FLAG_log_internal_timer_events);
LOG(isolate, TimerEvent(START, TimerEventExternal::name()));
DCHECK(isolate->current_vm_state() == JS);
isolate->set_current_vm_state(EXTERNAL);
}
// static
void Logger::LeaveExternal(Isolate* isolate) {
DCHECK(FLAG_log_internal_timer_events);
LOG(isolate, TimerEvent(END, TimerEventExternal::name()));
DCHECK(isolate->current_vm_state() == EXTERNAL);
isolate->set_current_vm_state(JS);
}
bool Logger::is_logging() { bool Logger::is_logging() {
// Disable logging while the CPU profiler is running. // Disable logging while the CPU profiler is running.
if (isolate_->is_profiling()) return false; if (isolate_->is_profiling()) return false;

View File

@ -352,8 +352,7 @@ class Logger : public CodeEventListener {
V(CompileCode, true) \ V(CompileCode, true) \
V(CompileCodeBackground, true) \ V(CompileCodeBackground, true) \
V(DeoptimizeCode, true) \ V(DeoptimizeCode, true) \
V(Execute, true) \ V(Execute, true)
V(External, true)
#define V(TimerName, expose) \ #define V(TimerName, expose) \
class TimerEvent##TimerName : public AllStatic { \ class TimerEvent##TimerName : public AllStatic { \

View File

@ -43,18 +43,12 @@ inline const char* StateToString(StateTag state) {
template <StateTag Tag> template <StateTag Tag>
VMState<Tag>::VMState(Isolate* isolate) VMState<Tag>::VMState(Isolate* isolate)
: isolate_(isolate), previous_tag_(isolate->current_vm_state()) { : isolate_(isolate), previous_tag_(isolate->current_vm_state()) {
if (FLAG_log_timer_events && previous_tag_ != EXTERNAL && Tag == EXTERNAL) {
LOG(isolate_, TimerEvent(Logger::START, TimerEventExternal::name()));
}
isolate_->set_current_vm_state(Tag); isolate_->set_current_vm_state(Tag);
} }
template <StateTag Tag> template <StateTag Tag>
VMState<Tag>::~VMState() { VMState<Tag>::~VMState() {
if (FLAG_log_timer_events && previous_tag_ != EXTERNAL && Tag == EXTERNAL) {
LOG(isolate_, TimerEvent(Logger::END, TimerEventExternal::name()));
}
isolate_->set_current_vm_state(previous_tag_); isolate_->set_current_vm_state(previous_tag_);
} }