Cleanup interrupt tracing in HandleInterrupts().
Change-Id: I092fff31b9cffef673f6929a510b3e643ab0ee29 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1496274 Reviewed-by: Andreas Haas <ahaas@chromium.org> Commit-Queue: Deepti Gandluri <gdeepti@chromium.org> Cr-Commit-Position: refs/heads/master@{#60019}
This commit is contained in:
parent
6eb66e1cbd
commit
fee068bf2f
@ -12,6 +12,15 @@
|
||||
#include "src/runtime-profiler.h"
|
||||
#include "src/vm-state-inl.h"
|
||||
|
||||
#define TRACE_INTERRUPT(...) \
|
||||
do { \
|
||||
if (FLAG_trace_interrupts) { \
|
||||
if (any_interrupt_handled) PrintF(", "); \
|
||||
PrintF(__VA_ARGS__); \
|
||||
any_interrupt_handled = true; \
|
||||
} \
|
||||
} while (false)
|
||||
|
||||
namespace v8 {
|
||||
namespace internal {
|
||||
|
||||
@ -627,47 +636,28 @@ Object StackGuard::HandleInterrupts() {
|
||||
}
|
||||
|
||||
if (CheckAndClearInterrupt(GC_REQUEST)) {
|
||||
if (FLAG_trace_interrupts) {
|
||||
PrintF("GC_REQUEST");
|
||||
any_interrupt_handled = true;
|
||||
}
|
||||
TRACE_INTERRUPT("GC_REQUEST");
|
||||
isolate_->heap()->HandleGCRequest();
|
||||
}
|
||||
|
||||
if (CheckAndClearInterrupt(TERMINATE_EXECUTION)) {
|
||||
if (FLAG_trace_interrupts) {
|
||||
if (any_interrupt_handled) PrintF(", ");
|
||||
PrintF("TERMINATE_EXECUTION");
|
||||
any_interrupt_handled = true;
|
||||
}
|
||||
TRACE_INTERRUPT("TERMINATE_EXECUTION");
|
||||
return isolate_->TerminateExecution();
|
||||
}
|
||||
|
||||
if (CheckAndClearInterrupt(DEOPT_MARKED_ALLOCATION_SITES)) {
|
||||
if (FLAG_trace_interrupts) {
|
||||
if (any_interrupt_handled) PrintF(", ");
|
||||
PrintF("DEOPT_MARKED_ALLOCATION_SITES");
|
||||
any_interrupt_handled = true;
|
||||
}
|
||||
TRACE_INTERRUPT("DEOPT_MARKED_ALLOCATION_SITES");
|
||||
isolate_->heap()->DeoptMarkedAllocationSites();
|
||||
}
|
||||
|
||||
if (CheckAndClearInterrupt(INSTALL_CODE)) {
|
||||
if (FLAG_trace_interrupts) {
|
||||
if (any_interrupt_handled) PrintF(", ");
|
||||
PrintF("INSTALL_CODE");
|
||||
any_interrupt_handled = true;
|
||||
}
|
||||
TRACE_INTERRUPT("INSTALL_CODE");
|
||||
DCHECK(isolate_->concurrent_recompilation_enabled());
|
||||
isolate_->optimizing_compile_dispatcher()->InstallOptimizedFunctions();
|
||||
}
|
||||
|
||||
if (CheckAndClearInterrupt(API_INTERRUPT)) {
|
||||
if (FLAG_trace_interrupts) {
|
||||
if (any_interrupt_handled) PrintF(", ");
|
||||
PrintF("API_INTERRUPT");
|
||||
any_interrupt_handled = true;
|
||||
}
|
||||
TRACE_INTERRUPT("API_INTERRUPT");
|
||||
// Callbacks must be invoked outside of ExecusionAccess lock.
|
||||
isolate_->InvokeApiInterruptCallbacks();
|
||||
}
|
||||
@ -688,3 +678,5 @@ Object StackGuard::HandleInterrupts() {
|
||||
|
||||
} // namespace internal
|
||||
} // namespace v8
|
||||
|
||||
#undef TRACE_INTERRUPT
|
||||
|
Loading…
Reference in New Issue
Block a user