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 Updated to NodeBB v4.3 + New Features

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

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 3 Posters 437 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 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

    JonBJ jsulmJ 2 Replies Last reply
    0
    • R RahibeMeryem

      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

      JonBJ Online
      JonBJ Online
      JonB
      wrote on 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 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

          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

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on 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

          • Login

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