[cfe-commits] r62475 - in /cfe/trunk: Driver/PrintParserCallbacks.cpp include/clang/Parse/Action.h lib/Parse/ParseExpr.cpp lib/Parse/ParseStmt.cpp lib/Sema/Sema.h lib/Sema/SemaChecking.cpp lib/Sema/SemaExpr.cpp lib/Sema/SemaOverload.cpp

Chris Lattner clattner at apple.com
Thu Jan 22 11:13:50 PST 2009


On Jan 22, 2009, at 11:12 AM, Sebastian Redl wrote:
>>> Trying to profile Clang now, but it's not going well. Sample  
>>> density is
>>> just too low - I'm getting 28 samples from a run on a 3.3MB source  
>>> file.
>>> Definitely not enough to make decisions by.
>>
>> Are you on a mac using shark?  If so, I'd suggest using "shark -i -1
>> -I 10u ~/llvm/Release-Asserts/bin/clang ..."
> Nope, on Linux using gprof.

Ok.  You might try out oprofile, it will probably work substantially  
better for this sort of thing.

>>>
>>> How do I get the assembly listing of a Clang file? For that  
>>> matter, how
>>> do I get the makefiles to actually print the compilation command  
>>> so that
>>> I can duplicate it?
>>
>> make VERBOSE=1 will print the command used to build.
> OK, thanks.

Another trick is to use:

make ENABLE_OPTIMIZED=1 DISABLE_ASSERTIONS=1 EXTRA_OPTIONS=-g

which will give you debug info in your Release-Asserts build.

-Chris



More information about the cfe-commits mailing list