diff --git a/src/main/hdr-histogram/hdr_thread.c b/src/main/hdr-histogram/hdr_thread.c index 262a29b..fc59b90 100644 --- a/src/main/hdr-histogram/hdr_thread.c +++ b/src/main/hdr-histogram/hdr_thread.c @@ -30,7 +30,7 @@ void hdr_mutex_free(struct hdr_mutex* mutex) #endif #include -#include +#include int hdr_mutex_init(struct hdr_mutex* mutex) { diff --git a/src/main/iidxhook-util/log-server.c b/src/main/iidxhook-util/log-server.c index 1a7f687..cc866d2 100644 --- a/src/main/iidxhook-util/log-server.c +++ b/src/main/iidxhook-util/log-server.c @@ -116,15 +116,17 @@ static int log_thread_proc(void *ctx) static void log_post(char level, const char *module, const char *fmt, va_list ap) { - if (WaitForSingleObject(log_rv_producer, INFINITE)) { - return; - } + // TODO test if this addresses performance issues and stuttering + // TODO measure time how long waiting takes here? + // if (WaitForSingleObject(log_rv_producer, INFINITE)) { + // return; + // } - log_rv_level = level; - log_rv_module = module; - str_vformat(log_rv_buffer, sizeof(log_rv_buffer), fmt, ap); + // log_rv_level = level; + // log_rv_module = module; + // str_vformat(log_rv_buffer, sizeof(log_rv_buffer), fmt, ap); - ReleaseSemaphore(log_rv_consumer, 1, NULL); + // ReleaseSemaphore(log_rv_consumer, 1, NULL); } #define LOG_POST_IMPL(name, level) \ diff --git a/src/main/iidxhook1/dllmain.c b/src/main/iidxhook1/dllmain.c index a3a4a35..69f0029 100644 --- a/src/main/iidxhook1/dllmain.c +++ b/src/main/iidxhook1/dllmain.c @@ -261,7 +261,8 @@ skip: BOOL WINAPI DllMain(HMODULE mod, DWORD reason, void *ctx) { if (reason == DLL_PROCESS_ATTACH) { - log_to_writer(log_writer_debug, NULL); + // TODO switched to null writer to see if it addresses performance issues + log_to_writer(log_writer_null, NULL); /* Bootstrap hook for further init tasks (see above) */ diff --git a/src/main/iidxhook2/dllmain.c b/src/main/iidxhook2/dllmain.c index 25a76ed..85e8808 100644 --- a/src/main/iidxhook2/dllmain.c +++ b/src/main/iidxhook2/dllmain.c @@ -254,7 +254,8 @@ skip: BOOL WINAPI DllMain(HMODULE mod, DWORD reason, void *ctx) { if (reason == DLL_PROCESS_ATTACH) { - log_to_writer(log_writer_debug, NULL); + // TODO switched to null writer to see if it addresses performance issues + log_to_writer(log_writer_null, NULL); /* Bootstrap hook for further init tasks (see above) */ diff --git a/src/main/iidxhook3/dllmain.c b/src/main/iidxhook3/dllmain.c index b2e0e41..f00ba6f 100644 --- a/src/main/iidxhook3/dllmain.c +++ b/src/main/iidxhook3/dllmain.c @@ -246,7 +246,8 @@ skip: BOOL WINAPI DllMain(HMODULE mod, DWORD reason, void *ctx) { if (reason == DLL_PROCESS_ATTACH) { - log_to_writer(log_writer_debug, NULL); + // TODO switched to null writer to see if it addresses performance issues + log_to_writer(log_writer_null, NULL); /* Bootstrap hook for further init tasks (see above) */ diff --git a/src/main/iidxio-perf/Module.mk b/src/main/iidxio-perf/Module.mk index 7df509f..fdb36fa 100644 --- a/src/main/iidxio-perf/Module.mk +++ b/src/main/iidxio-perf/Module.mk @@ -1,6 +1,7 @@ dlls += iidxio-perf ldflags_iidxio-perf := \ + -lws2_32 libs_iidxio-perf := \ hdr-histogram \