diff --git a/src/config.h b/src/config.h index 69b0a70..d3d1fc6 100644 --- a/src/config.h +++ b/src/config.h @@ -46,10 +46,10 @@ // using timers in addition to number of times it loops to determine what to trace -#ifdef CONF_RELEASE_BUILD -# define CONF_USE_TIMERS -#endif -#define CONF_TIMER_DELAY_MS CONF_BUILD_TOGGLE(0, 5000) +//#ifdef CONF_RELEASE_BUILD +#define CONF_USE_TIMERS +//#endif +#define CONF_TIMER_DELAY_MS CONF_BUILD_TOGGLE(10000, 60000) #define CONF_ESTIMATE_INSTRUCTIONS diff --git a/src/user_interface.c b/src/user_interface.c index 3570570..c9e23de 100644 --- a/src/user_interface.c +++ b/src/user_interface.c @@ -1,6 +1,6 @@ // useful for compiling against while not causing any "problems" -//#define DISABLE_REDMAGIC +#define DISABLE_REDMAGIC // this is define in a .c file instead of .s so that we can // interface with the -fPIC methods & macros, also need to have @plt at the end diff --git a/src/wrap_malloc.cc b/src/wrap_malloc.cc index 38e7878..6627fe1 100644 --- a/src/wrap_malloc.cc +++ b/src/wrap_malloc.cc @@ -8,6 +8,9 @@ #include + +#include "jit_internal.h" + // we can't direclty use allocators when we are tracing since it might screw with their internal states // use mmap and mprotect to wrap all alloc options @@ -81,7 +84,7 @@ extern "C" void *__wrap_malloc(size_t size) { BUFFER_SIZES(FIND_BUFFER); use_real_malloc: - printf("============trying to use real malloc\n"); + red_printf("============trying to use real malloc\n"); abort(); return __real_malloc(size); @@ -107,8 +110,10 @@ extern "C" void __wrap_free(void *ptr) { BUFFER_SIZES(FREE_BUFFER); +#ifdef CONF_VERBOSE if(protected_malloc) - printf("more wtf\n"); + red_printf("more wtf\n"); +#endif __real_free(ptr); }