This discussion is archived
1 Reply Latest reply: Aug 15, 2012 7:02 PM by rajp RSS

Studio 12.3 analysis results: How to interpret? Best flags to use?

917192 Newbie
Currently Being Moderated
Hello,

A couple of questions related to the analysis tooling on Solaris x86-64:

*1) What compile flags should I use to garner the most meaningful results from tools like discover and rtc? Just -g and no optimization?*

If I use optimization and/or OpenMP, is there anything I can do to aid the analysis tooling?

(Asking since if no optimization flags are used, my program crashes. Similar to compiler bug ? Studio 11.1 and 12 (-xmodel=medium and -KPIC flags together) , but on start up not exit.)

*2) Where can I find documentation to help interpret discover's output?*

In particular, it's not clear (to me at least) which variables or variable usages on a given line discover is concerned with, nor what what the addresses/offsets reported are referring to.

Thank you,
:)
  • 1. Re: Studio 12.3 analysis results: How to interpret? Best flags to use?
    rajp Newbie
    Currently Being Moderated
    1. Best results come from no optimization flag. However, if you must use optimization flags, use the lowest possible level. Optimizers change code in manners that make checking for errors more difficult.

    2. Discover documentation is available here - http://docs.oracle.com/cd/E24457_01/html/E22000/index.html.

    Generally if you see address in 0xff... range it is a stack area (local variables), other addresses are generally heap (returned by malloc).

    Sometimes breaking up a line of code into multiple lines helps with analysis.

    Raj

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points