Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct


    Qt World Summit: Early-Bird Tickets

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

    General and Desktop
    2
    3
    3739
    Loading More Posts
    • 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
      hongdiao last edited by

      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 Reply Quote 0
      • H
        hongdiao last edited by

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

        1 Reply Last reply Reply Quote 0
        • K
          koahnig last edited by

          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 Reply Quote 0
          • First post
            Last post