how to generate profile data and and using it with qmake?
-
Hi,
I want to profile my app and than use it for improving the performance.
I used to generate :QMAKE_CXXFLAGS += -std=c++11 -Ofast -mavx2 -msse4.1 -march=native -fprofile-dir=/data/profile -fprofile-generate=/data/profile
nothing generated ?
any idea how we can do this in QtCreator with qmake ?
Best
-
@RahibeMeryem
What do you mean "nothing generated", and what do you mean by "I used to", what used to work but does not now? -
gcc should generate profiling data to use it to more tune the next compiling.
I succesfull with my other cmake project. But this is first time to use gcc profiling.
-
@RahibeMeryem said in how to generate profile data and and using it with qmake?:
/data/profile
Is this just an example or really the path you're using?
Is this directory writeable by you?Did you make sure these parameters were really passed to the compiler?
Also, according to https://gcc.gnu.org/onlinedocs/gcc/Instrumentation-Options.html
"You must use -fprofile-generate both when compiling and when linking your program"