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. Use Gprof to get profiler information on QT release version program on Win7
Forum Updated to NodeBB v4.3 + New Features

Use Gprof to get profiler information on QT release version program on Win7

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 4.1k Views 1 Watching
  • 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.
  • H Offline
    H Offline
    hongdiao
    wrote on last edited by
    #1

    Hi, I am trying to profile my QT program with Gprof. For debug version I can do that via adding follwing lines in the .pro file:
    QMAKE_CXXFLAGS += -pg
    QMAKE_LFLAGS += -pg

    This will create a gmon.out after closing the program, and then use gporf on it will get the profiling information.

    However when I try this on the release version, it failed. The gmon.out can still be created but gprof can't read it, and reported:
    "myprogram has no symbols". I add "-g" or even "-g --disable-strip --enable-debug" but it still doesn't work. Any ideas?

    1 Reply Last reply
    0
    • H Offline
      H Offline
      hongdiao
      wrote on last edited by
      #2

      so it is impossible to do it in the QT release version program?

      1 Reply Last reply
      0
      • K Offline
        K Offline
        koahnig
        wrote on last edited by
        #3

        welcome to devnet

        AFAIK this is not specific question to Qt. It depends on whether you can profile with a certain compiler/linker option. Personally, I doubt that this is possible straight away, but my knowledge of using gprof is very limited.

        You need to check the gprof manual for special settings required. As soon as there are specific gprof settings required, you may need at least a recompilation IMO.

        Vote the answer(s) that helped you to solve your issue(s)

        1 Reply Last reply
        0

        • Login

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