Category : fork

I use the call stack logger into open source TVM to log call stack to file. Initialization of the call stack logger: // trace.cpp static FILE *fp_trace; static int current_stack_depth = -1; static bool last_frame_was_resolved = false; __attribute__ ((constructor)) NO_INSTRUMENT void trace_begin() { fp_trace = fopen("trace.log", "a"); } __attribute__ ((destructor)) NO_INSTRUMENT void trace_end() { if(fp_trace ..

Read more