What are the recommended gcc optimization flags?

What are the recommended gcc optimization flags?

1. What are the recommended gcc optimization flags for a concurrency analysis? We generally I use -pg -p -O2, and sometimes -finline-functions. For a concurrency test, I can see the CPU usage for different libraries, but it doesn't have the symbol info for each function, etc. Those same options work fine for a hotspot analysis (though the -finline-functions removes some symbols, but not all).

2. Is there some way to annotate each test result so it can be remembered what was done to them? The test names are written with folder names like r00hs or things like that.

I have discussed this some internally with the engineers. Those flags should be OK for the Intel Concurrency Checker. But for testing the mechanics of his parallelization, optimizaiton (-O2) should be disabled.