how to generate profile data and and using it with qmake?
-
wrote on 10 Dec 2019, 18:39 last edited by
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
-
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
wrote on 10 Dec 2019, 18:48 last edited by@RahibeMeryem
What do you mean "nothing generated", and what do you mean by "I used to", what used to work but does not now? -
wrote on 10 Dec 2019, 19:48 last edited by
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.
-
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 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"
1/4