Quantcast
Channel: CodeCentral Submissions
Viewing all articles
Browse latest Browse all 1693

A QD tracer for Clang compiler on Windows.<FIXED>

$
0
0
This code makes use of a built in feature of the Clang compilers, when you specify "-finstrument-functions", the compiler will then inject two functions into the entry and exit of each function that the compiler compiles. The added profile code will log to a file (and the debugger via an ODS, but this will slow execution) the function address and microseconds taken (it can handle nanoseconds). This function address can then be looked up in the MAP file for the application to get the function name.To make this tracer work add the following option to the compiler options list"-finstrument-functions" (w/o quotes) to the compiler options for the 64-bit compilerProject | Options | "C++ Compiler" | Advanced | "Additional options to pass to the compiler"for the 32-bit CLANG compilerProject | Options | "C++ Compiler" | Advanced | "Other options" | "Additional options to pass to the compiler"add the tracer source to your project, and build, the compiler will then inject the tracing functions into every entry and exit of each function it compiles.This now works in Seattle and Berlin.

Viewing all articles
Browse latest Browse all 1693

Trending Articles