Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. how to generate profile data and and using it with qmake?
Forum Update on Monday, May 27th 2025

how to generate profile data and and using it with qmake?

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 3 Posters 436 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    RahibeMeryem
    wrote on 10 Dec 2019, 18:39 last edited by
    #1

    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

    J J 2 Replies Last reply 10 Dec 2019, 18:48
    0
    • R RahibeMeryem
      10 Dec 2019, 18:39

      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

      J Online
      J Online
      JonB
      wrote on 10 Dec 2019, 18:48 last edited by
      #2

      @RahibeMeryem
      What do you mean "nothing generated", and what do you mean by "I used to", what used to work but does not now?

      1 Reply Last reply
      0
      • R Offline
        R Offline
        RahibeMeryem
        wrote on 10 Dec 2019, 19:48 last edited by
        #3

        @JonB

        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.

        1 Reply Last reply
        0
        • R RahibeMeryem
          10 Dec 2019, 18:39

          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

          J Offline
          J Offline
          jsulm
          Lifetime Qt Champion
          wrote on 11 Dec 2019, 06:00 last edited by
          #4

          @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"

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          2

          1/4

          10 Dec 2019, 18:39

          • Login

          • Login or register to search.
          1 out of 4
          • First post
            1/4
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved