MCPcopy Create free account
hub / github.com/1a1a11a/libCacheSim / print_stack_trace

Function print_stack_trace

libCacheSim/utils/logging.c:14–24  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12pthread_mutex_t log_mtx = PTHREAD_MUTEX_INITIALIZER;
13
14void print_stack_trace(void) {
15 void *array[10];
16 size_t size;
17
18 // get void*'s for all entries on the stack
19 size = backtrace(array, 10);
20
21 // print out all the frames to stderr
22 fprintf(stderr, "stack trace: \n");
23 backtrace_symbols_fd(array, size, STDERR_FILENO);
24}
25
26void print_progress(double perc) {
27 static double last_perc = 0;

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected