diff --git a/runtime/Makefile b/runtime/Makefile index 2bbcfd1..2fe298e 100644 --- a/runtime/Makefile +++ b/runtime/Makefile @@ -59,7 +59,6 @@ BINARY_NAME=sledgert # CFLAGS += -DLOG_ADMISSIONS_CONTROL # CFLAGS += -DLOG_CONTEXT_SWITCHES # CFLAGS += -DLOG_HTTP_PARSER -# CFLAGS += -DLOG_LOCK_OVERHEAD # CFLAGS += -DLOG_TENANT_LOADING # CFLAGS += -DLOG_PREEMPTION # CFLAGS += -DLOG_SANDBOX_ALLOCATION diff --git a/runtime/src/current_sandbox.c b/runtime/src/current_sandbox.c index 792558c..4674495 100644 --- a/runtime/src/current_sandbox.c +++ b/runtime/src/current_sandbox.c @@ -28,8 +28,6 @@ current_sandbox_sleep() struct sandbox *sleeping_sandbox = current_sandbox_get(); assert(sleeping_sandbox != NULL); - generic_thread_dump_lock_overhead(); - switch (sleeping_sandbox->state) { case SANDBOX_RUNNING_SYS: { sandbox_sleep(sleeping_sandbox); @@ -54,8 +52,6 @@ current_sandbox_exit() struct sandbox *exiting_sandbox = current_sandbox_get(); assert(exiting_sandbox != NULL); - generic_thread_dump_lock_overhead(); - switch (exiting_sandbox->state) { case SANDBOX_RETURNED: sandbox_exit_success(exiting_sandbox); @@ -107,7 +103,6 @@ current_sandbox_wasm_trap_handler(int trapno) debuglog("%s", error_message); worker_thread_epoll_remove_sandbox(sandbox); - generic_thread_dump_lock_overhead(); current_sandbox_exit(); assert(0); } @@ -155,7 +150,6 @@ current_sandbox_init() err: debuglog("%s", error_message); worker_thread_epoll_remove_sandbox(sandbox); - generic_thread_dump_lock_overhead(); current_sandbox_exit(); return NULL; } @@ -179,7 +173,6 @@ done: sandbox_set_as_returned(sandbox, SANDBOX_RUNNING_SYS); /* Cleanup connection and exit sandbox */ - generic_thread_dump_lock_overhead(); current_sandbox_exit(); assert(0); err: diff --git a/runtime/src/generic_thread.c b/runtime/src/generic_thread.c index e774784..5ade7d2 100644 --- a/runtime/src/generic_thread.c +++ b/runtime/src/generic_thread.c @@ -28,13 +28,9 @@ generic_thread_initialize() void generic_thread_dump_lock_overhead() { -#ifndef NDEBUG -#ifdef LOG_LOCK_OVERHEAD uint64_t duration = __getcycles() - generic_thread_start_timestamp; debuglog("Locks consumed %lu / %lu cycles, or %f%%\n", generic_thread_lock_duration, duration, (double)generic_thread_lock_duration / duration * 100); debuglog("Longest Held Lock was %lu cycles, or %f quantums\n", generic_thread_lock_longest, (double)generic_thread_lock_longest / ((uint64_t)runtime_processor_speed_MHz * runtime_quantum_us)); -#endif -#endif } diff --git a/runtime/src/listener_thread.c b/runtime/src/listener_thread.c index f615db8..98b6a2d 100644 --- a/runtime/src/listener_thread.c +++ b/runtime/src/listener_thread.c @@ -396,7 +396,6 @@ listener_thread_main(void *dummy) on_client_socket_epoll_event(&epoll_events[i]); } } - generic_thread_dump_lock_overhead(); } panic("Listener thread unexpectedly broke loop\n"); diff --git a/runtime/src/main.c b/runtime/src/main.c index ff04f3b..5289d19 100644 --- a/runtime/src/main.c +++ b/runtime/src/main.c @@ -287,12 +287,6 @@ log_compiletime_config() pretty_print_key_disabled("Log HTTP Parser"); #endif -#ifdef LOG_LOCK_OVERHEAD - pretty_print_key_enabled("Log Lock Overhead"); -#else - pretty_print_key_disabled("Log Lock Overhead"); -#endif - #ifdef LOG_TENANT_LOADING pretty_print_key_enabled("Log Tenant Loading"); #else