@ -138,7 +138,7 @@ software_interrupt_handle_signals(int signal_type, siginfo_t *signal_info, void
/* Signals should not nest */
assert ( handler_depth = = 0 ) ;
atomic_fetch_add ( & handler_depth , 1 ) ;
//atomic_fetch_add(&handler_depth, 1);
ucontext_t * interrupted_context = ( ucontext_t * ) interrupted_context_raw ;
struct sandbox * current_sandbox = current_sandbox_get ( ) ;
@ -172,7 +172,7 @@ software_interrupt_handle_signals(int signal_type, siginfo_t *signal_info, void
global_timeout_queue_process_promotions ( ) ;
}
propagate_sigalrm ( signal_info ) ;
atomic_fetch_add ( & deferred_sigalrm , 1 ) ;
//atomic_fetch_add(&deferred_sigalrm, 1);
}
break ;
@ -197,7 +197,7 @@ software_interrupt_handle_signals(int signal_type, siginfo_t *signal_info, void
software_interrupt_counts_sigfpe_increment ( ) ;
if ( likely ( current_sandbox & & current_sandbox - > state = = SANDBOX_RUNNING_USER ) ) {
atomic_fetch_sub ( & handler_depth , 1 ) ;
//atomic_fetch_sub(&handler_depth, 1);
current_sandbox_trap ( WASM_TRAP_ILLEGAL_ARITHMETIC_OPERATION ) ;
} else {
panic ( " Runtime SIGFPE \n " ) ;
@ -209,7 +209,7 @@ software_interrupt_handle_signals(int signal_type, siginfo_t *signal_info, void
software_interrupt_counts_sigsegv_increment ( ) ;
if ( likely ( current_sandbox & & current_sandbox - > state = = SANDBOX_RUNNING_USER ) ) {
atomic_fetch_sub ( & handler_depth , 1 ) ;
//atomic_fetch_sub(&handler_depth, 1);
current_sandbox_trap ( WASM_TRAP_OUT_OF_BOUNDS_LINEAR_MEMORY ) ;
} else {
panic ( " Runtime SIGSEGV \n " ) ;
@ -225,9 +225,10 @@ software_interrupt_handle_signals(int signal_type, siginfo_t *signal_info, void
/* calculate the throughput */
time_t t_end = time ( NULL ) ;
double seconds = difftime ( t_end , t_start ) ;
double throughput = atomic_load ( & sandbox_state_totals [ SANDBOX_COMPLETE ] ) / seconds ;
//double throughput = atomic_load(&sandbox_state_totals[SANDBOX_COMPLETE]) / seconds;
double throughput = total_local_requests / seconds ;
uint32_t total_sandboxes_error = atomic_load ( & sandbox_state_totals [ SANDBOX_ERROR ] ) ;
printf ( " throughput is %f , error request is %u global total request %d worker %d total requests is %u worker total_held %" PRIu64 " longest_held % " PRIu64 " listener total_held % " PRIu64 " longest_held % " PRIu64 " \n " ,
printf ( " throughput is %f error request is %u global total request %d worker %d total requests is %u worker total_held %" PRIu64 " longest_held % " PRIu64 " listener total_held % " PRIu64 " longest_held % " PRIu64 " \n " ,
throughput , total_sandboxes_error , atomic_load ( & sandbox_state_totals [ SANDBOX_COMPLETE ] ) , worker_thread_idx , total_local_requests , total_held [ worker_thread_idx ] , longest_held [ worker_thread_idx ] , total_held [ 200 ] , longest_held [ 200 ] ) ;
fflush ( stdout ) ;
pthread_exit ( 0 ) ;
@ -249,7 +250,7 @@ software_interrupt_handle_signals(int signal_type, siginfo_t *signal_info, void
}
}
atomic_fetch_sub ( & handler_depth , 1 ) ;
//atomic_fetch_sub(&handler_depth, 1);
return ;
}