Tracing function calls in C/C++ using gcc's in-built profiling tools