vtune and optimization flag problem

vtune and optimization flag problem

Hi,I found out that when compileing with -O flag it's does not meter what optimize flag i'm using once -O is specify vtune stop collecting data.i installed a clean Ubuntu 11.1amir@ubuntu:~/vtune_intel_test$ uname -aLinux ubuntu 3.0.0-12-server #20-Ubuntu SMP Fri Oct 7 16:36:30 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux==========================================compile with -O==========================================g++ test.cpp -g -I/opt/intel/vtune_amplifier_xe_2011/include /opt/intel/vtune_amplifier_xe_2011/lib64/libittnotify.a -lpthread -ldl -O -o testamir@ubuntu:~/vtune_intel_test$ rm -Rf r00*; amplxe-cl -collect hotspots -start-paused -- ./test; amplxe-cl -report hotspots r000hs/Error: Cannot change stateError: Cannot change stateError: Cannot change stateUsing result path `/home/amir/vtune_intel_test/r000hs'Executing actions 16 % Loading data files Warning: Cannot load data file `/home/amir/vtune_intel_test/r000hs/data.0/11058-11066.0.log' ().Executing actions 75 % Generating a report Summary-------Elapsed Time: 0.021CPU Time: 0Executing actions 100 % done Using result path `/home/amir/vtune_intel_test/r000hs'Executing actions 75 % Generating a report Function Module CPU Time-------- ------ --------Executing actions 100 % done amir@ubuntu:~/vtune_intel_test$==========================================compile without==========================================amir@ubuntu:~/vtune_intel_test$ g++ test.cpp -g -I/opt/intel/vtune_amplifier_xe_2011/include /opt/intel/vtune_amplifier_xe_2011/lib64/libittnotify.a -lpthread -ldl -o testamir@ubuntu:~/vtune_intel_test$ rm -Rf r00*; amplxe-cl -collect hotspots -start-paused -- ./test; amplxe-cl -report hotspots r000hs/Error: Cannot change stateError: Cannot change stateError: Cannot change stateUsing result path `/home/amir/vtune_intel_test/r000hs'Executing actions 16 % Loading data files Warning: Cannot load data file `/home/amir/vtune_intel_test/r000hs/data.0/11128-11136.0.log' ().Executing actions 75 % Generating a report Summary-------Elapsed Time: 0.102CPU Time: 0.027Executing actions 100 % done Using result path `/home/amir/vtune_intel_test/r000hs'Executing actions 75 % Generating a report Function Module CPU Time------------------ ------ --------foo_data_collected test 0.027Executing actions 100 % done this is the test.cpp code//test.cpp : Defines the entry point for the console application.//#include "ittnotify.h"void foo_data_collected(){ for (int i=0; i<10000000L; i++);}void foo_data_not_collected(){ for (int i=0; i<10000000L; i++);}int main(int argc, char* argv[]){ // Assume that data collector was paused in user interface foo_data_not_collected(); // Now resume data collecting __itt_resume(); foo_data_collected(); // Pasue data collecting again __itt_pause(); foo_data_not_collected(); // Resume data collecting again __itt_resume(); foo_data_collected(); // The user shouldn't see data collecting in foo_data_not_collected() in result return 0;}how can i use vtune whith -O2 or -O3 ?RegardsAmir

6 posts / novo 0
Último post
Para obter mais informações sobre otimizações de compiladores, consulte Aviso sobre otimizações.

Amk21,

This new forum post appears to be a duplicate of forum thread hereyou posted which is in process. Let us know if this
is not the case.

- Rob

this is more direct question way gcc optimization flag cause vtune to stop collecting in the previous post there where several issues

I never use option "-Ox" when I tried Resume/Pause API. But I think this should be a probelm.
I have reported this problem to engineering team, and willupdate on this thread if any progress.

Currently, workaround is not to use "-Ox" when using Resume/Pause API.

Regards, Peter

i think i figure the problem the functions are inline when using -Ox flag

Inlined functions will cause the associated data to be associated with a calling function. So it's often useful to disable in-lining for profiling.

Deixar um comentário

Faça login para adicionar um comentário. Não é membro? Inscreva-se hoje mesmo!