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/runtime-profiler.h"
|
||||||
#include "src/vm-state-inl.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 v8 {
|
||||||
namespace internal {
|
namespace internal {
|
||||||
|
|
||||||
@ -627,47 +636,28 @@ Object StackGuard::HandleInterrupts() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (CheckAndClearInterrupt(GC_REQUEST)) {
|
if (CheckAndClearInterrupt(GC_REQUEST)) {
|
||||||
if (FLAG_trace_interrupts) {
|
TRACE_INTERRUPT("GC_REQUEST");
|
||||||
PrintF("GC_REQUEST");
|
|
||||||
any_interrupt_handled = true;
|
|
||||||
}
|
|
||||||
isolate_->heap()->HandleGCRequest();
|
isolate_->heap()->HandleGCRequest();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CheckAndClearInterrupt(TERMINATE_EXECUTION)) {
|
if (CheckAndClearInterrupt(TERMINATE_EXECUTION)) {
|
||||||
if (FLAG_trace_interrupts) {
|
TRACE_INTERRUPT("TERMINATE_EXECUTION");
|
||||||
if (any_interrupt_handled) PrintF(", ");
|
|
||||||
PrintF("TERMINATE_EXECUTION");
|
|
||||||
any_interrupt_handled = true;
|
|
||||||
}
|
|
||||||
return isolate_->TerminateExecution();
|
return isolate_->TerminateExecution();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CheckAndClearInterrupt(DEOPT_MARKED_ALLOCATION_SITES)) {
|
if (CheckAndClearInterrupt(DEOPT_MARKED_ALLOCATION_SITES)) {
|
||||||
if (FLAG_trace_interrupts) {
|
TRACE_INTERRUPT("DEOPT_MARKED_ALLOCATION_SITES");
|
||||||
if (any_interrupt_handled) PrintF(", ");
|
|
||||||
PrintF("DEOPT_MARKED_ALLOCATION_SITES");
|
|
||||||
any_interrupt_handled = true;
|
|
||||||
}
|
|
||||||
isolate_->heap()->DeoptMarkedAllocationSites();
|
isolate_->heap()->DeoptMarkedAllocationSites();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CheckAndClearInterrupt(INSTALL_CODE)) {
|
if (CheckAndClearInterrupt(INSTALL_CODE)) {
|
||||||
if (FLAG_trace_interrupts) {
|
TRACE_INTERRUPT("INSTALL_CODE");
|
||||||
if (any_interrupt_handled) PrintF(", ");
|
|
||||||
PrintF("INSTALL_CODE");
|
|
||||||
any_interrupt_handled = true;
|
|
||||||
}
|
|
||||||
DCHECK(isolate_->concurrent_recompilation_enabled());
|
DCHECK(isolate_->concurrent_recompilation_enabled());
|
||||||
isolate_->optimizing_compile_dispatcher()->InstallOptimizedFunctions();
|
isolate_->optimizing_compile_dispatcher()->InstallOptimizedFunctions();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CheckAndClearInterrupt(API_INTERRUPT)) {
|
if (CheckAndClearInterrupt(API_INTERRUPT)) {
|
||||||
if (FLAG_trace_interrupts) {
|
TRACE_INTERRUPT("API_INTERRUPT");
|
||||||
if (any_interrupt_handled) PrintF(", ");
|
|
||||||
PrintF("API_INTERRUPT");
|
|
||||||
any_interrupt_handled = true;
|
|
||||||
}
|
|
||||||
// Callbacks must be invoked outside of ExecusionAccess lock.
|
// Callbacks must be invoked outside of ExecusionAccess lock.
|
||||||
isolate_->InvokeApiInterruptCallbacks();
|
isolate_->InvokeApiInterruptCallbacks();
|
||||||
}
|
}
|
||||||
@ -688,3 +678,5 @@ Object StackGuard::HandleInterrupts() {
|
|||||||
|
|
||||||
} // namespace internal
|
} // namespace internal
|
||||||
} // namespace v8
|
} // namespace v8
|
||||||
|
|
||||||
|
#undef TRACE_INTERRUPT
|
||||||
|
Loading…
Reference in New Issue
Block a user