CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2002
    Location
    Germany
    Posts
    1,557

    Getting started with gprof

    Hello Gurus,

    Can anyone tell me in a few simple steps how to get started with the code profiler gprof? I compiled and linked with the -pg flag and do not know how to proceed.

    The program to be tested performs computationally-intensive floating point calculations.

    I would appreciate any help in this matter.

    Thanks. Chris.

    You're gonna go blind staring into that box all day.

  2. #2
    Join Date
    Jun 2002
    Location
    Letchworth, UK
    Posts
    1,020
    Long time since I've used gprof but it is something like this. Say your program is xxx. Run xxx. This will generate a file called gmon.out. Then

    gprof xxx

    It will pick up gmon.out and display the relevant info. There are a whole bunch of switches which go with gprof. You'll have to look up the man page for these.
    Succinct is verbose for terse

  3. #3
    Join Date
    Jun 2002
    Location
    Germany
    Posts
    1,557

    profiler

    Thanks cup,

    I'm up and running with gprof. It has already provided some keen insights.

    I found the following flags to be OK for a brief, clear summary:

    gprof xxx.exe --brief --flat-profile

    Chris.

    You're gonna go blind staring into that box all day.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured