Profiler

Discussion in 'C++' started by Lars Ribe, Feb 21, 2008.

  1. Lars Ribe

    Lars Ribe Guest

    Dear C++ people,
    I was just wondering if anyone can recommend a profiler for Microsoft
    Windows (for a project written in Borland Developer Studio 2006 if
    that is of interest)?
    Also, I have a lot of getters/setters and loops which I clearly
    expects to be inlined and optimized when turning on optimization. Is
    it possible to profile on optimized code or has the code been
    "scrambled" so much that it is no longer possible to detect what is
    what? If it is not possible, how can one determine what is the
    bottleneck in optimized code (which clearly is the answer we are
    looking for...)?

    Thanks,
    Lars
    Lars Ribe, Feb 21, 2008
    #1
    1. Advertising

  2. Lars Ribe wrote:
    > I was just wondering if anyone can recommend a profiler for Microsoft
    > Windows (for a project written in Borland Developer Studio 2006 if
    > that is of interest)?
    > Also, I have a lot of getters/setters and loops which I clearly
    > expects to be inlined and optimized when turning on optimization. Is
    > it possible to profile on optimized code or has the code been
    > "scrambled" so much that it is no longer possible to detect what is
    > what? If it is not possible, how can one determine what is the
    > bottleneck in optimized code (which clearly is the answer we are
    > looking for...)?


    I've used a few serious profilers in my recent past: the built-in
    Performance Analyzer in MS Visual Studio, GlowCode, Intel VTune,
    AutomatedQA's AQtime. The latter two are good. Neither is cheap.
    I've no idea what GlowCode costs, and I've had my share of problems
    with it, but for a quick estimate it was OK. The built-in one is
    on par with GlowCode, but since you're using Borland, it probably
    isn't an option for you.

    Good profilers instrument the code even if the code has been
    optimized. Usually there are numerous options with which you can
    control the instrumentation process, but those vary with products.

    V
    --
    Please remove capital 'A's when replying by e-mail
    I do not respond to top-posted replies, please don't ask
    Victor Bazarov, Feb 21, 2008
    #2
    1. Advertising

  3. Lars Ribe

    Eric Johnson Guest

    Hi Lars,

    On Feb 21, 8:27 am, Lars Ribe <> wrote:
    > Dear C++ people,
    > I was just wondering if anyone can recommend a profiler for Microsoft
    > Windows (for a project written in Borland Developer Studio 2006 if
    > that is of interest)?


    I can recommend Intel VTune as a performance analysis tool. Go to
    Intel's website find more info on how to get a copy.

    > Also, I have a lot of getters/setters and loops which I clearly
    > expects to be inlined and optimized when turning on optimization. Is
    > it possible to profile on optimized code or has the code been
    > "scrambled" so much that it is no longer possible to detect what is
    > what? If it is not possible, how can one determine what is the
    > bottleneck in optimized code (which clearly is the answer we are
    > looking for...)?
    >


    When you want to profile your code, you generally want to create a
    special "profiling" build. A profiling build is like a "release"
    build (fully optimized), but it contains debugging symbols (like a
    "debug" build would).
    This way, the profiler is able to find function names, but is still
    using optimized code. Note that the profiler may have a hard time
    correlating an exact line of source code with the optimized machine
    code. They often will provide a disassembly viewer for this reason.
    You should consult the documentation for whatever profiling tool
    you decide to use for more detailed information about the process of
    profiling and optimizing your code.

    Good luck!
    -Eric
    Eric Johnson, Feb 21, 2008
    #3
  4. Lars Ribe

    Lars Ribe Guest

    On Feb 21, 8:18 pm, Eric Johnson <> wrote:
    > Hi Lars,
    >
    > On Feb 21, 8:27 am, Lars Ribe <> wrote:
    >
    > > Dear C++ people,
    > > I was just wondering if anyone can recommend a profiler for Microsoft
    > > Windows (for a project written in Borland Developer Studio 2006 if
    > > that is of interest)?

    >
    > I can recommend Intel VTune as a performance analysis tool. Go to
    > Intel's website find more info on how to get a copy.
    >
    > > Also, I have a lot of getters/setters and loops which I clearly
    > > expects to be inlined and optimized when turning on optimization. Is
    > > it possible to profile on optimized code or has the code been
    > > "scrambled" so much that it is no longer possible to detect what is
    > > what? If it is not possible, how can one determine what is the
    > > bottleneck in optimized code (which clearly is the answer we are
    > > looking for...)?

    >
    > When you want to profile your code, you generally want to create a
    > special "profiling" build. A profiling build is like a "release"
    > build (fully optimized), but it contains debugging symbols (like a
    > "debug" build would).
    > This way, the profiler is able to find function names, but is still
    > using optimized code. Note that the profiler may have a hard time
    > correlating an exact line of source code with the optimized machine
    > code. They often will provide a disassembly viewer for this reason.
    > You should consult the documentation for whatever profiling tool
    > you decide to use for more detailed information about the process of
    > profiling and optimizing your code.
    >
    > Good luck!
    > -Eric


    Thank you to both of you!

    Lars
    Lars Ribe, Feb 21, 2008
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Steven Cheng[MSFT]

    RE: CLR Profiler

    Steven Cheng[MSFT], May 31, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    503
    =?Utf-8?B?TWFyayBGb3g=?=
    May 31, 2004
  2. Carl San

    CLR Profiler....

    Carl San, Mar 26, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    532
    Matt Berther
    Mar 26, 2005
  3. Anders K. Jacobsen [DK]

    ASP.NET MEM profiler

    Anders K. Jacobsen [DK], Jun 7, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    471
    Anders K. Jacobsen [DK]
    Jun 7, 2005
  4. Sara T.

    VS.NET 2005 and Profiler

    Sara T., Oct 26, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    1,099
    sp3d2orbit
    Oct 26, 2005
  5. potatosoftware
    Replies:
    0
    Views:
    655
    potatosoftware
    Nov 4, 2009
Loading...

Share This Page