[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-build-dev
Subject:    Re: RFR: 8065656: Use DWARF debug symbols for Solaris
From:       "Peter B. Kessler" <Peter.B.Kessler () Oracle ! COM>
Date:       2014-11-21 23:03:25
Message-ID: 546FC4BD.2050209 () Oracle ! COM
[Download RAW message or body]

I don't think I invented the stab format.  I think stab.h came with adb and sdb, but \
might predate even those.  Stab.h covers the basics of global symbols, procedures, \
source files, line numbers, etc.  (The earliest copy I can find is \
http://svnweb.freebsd.org/csrg/include/stab.h?revision=12194&view=markup)

I probably did invent the N_PC (0x30) stab variant for the Berkeley Pascal compiler.  \
The trick there was that, rather than having to negotiate for some modest number of \
the limited (< 2 bytes) available space for stab entries, to claim only one entry for \
all the Pascal symbolic information and put all the information I needed into the \
string part of the "symbol".  That left lots of room for other languages, and \
separated the Pascal compiler (and all the other languages) from having to edit \
stab.h as we figured out what we wanted in the way of debugging information.  Maybe \
that is the origin of the "symbol table in the string" (stabs) idea.

That said, I'm happy to see stabs replaced by something better.

I'm also not an upper-case R reviewer.

			... peter
     
On 11/21/14 01:42 PM, Srinivas Ramakrishna wrote:
> 
> What does Peter think? For those too young to remember, Peter invented stabs way \
> back when he was a young grad student at Berkeley :-) It has given admirable \
> service, like so much else he has touched! 
> -- Ramki
> 
> ysr1729
> 
> > On Nov 21, 2014, at 08:30, charlie hunt <charlie.hunt@oracle.com> wrote:
> > 
> > Looks good, though I am not an official (R)eviewer.
> > 
> > Charlie
> > 
> > > On Nov 21, 2014, at 9:30 AM, Erik Helin <erik.helin@oracle.com> wrote:
> > > 
> > > Hi all,
> > > 
> > > this patch changes the debug symbols format on Solaris from STABS
> > > [0] to DWARF [1] for libjvm.so. Since the supported compiler on Solaris
> > > has been updated to Oracle Solaris Studio 12.3 [2], the STABS debug format
> > > is now deprecated in the supported compiler [3]:
> > > 
> > > -xdebugformat=stabs generates debugging information
> > > using the stabs standard format. The stabs format is no
> > > longer supported.
> > > 
> > > Furthermore, in Oracle Solaris Studio 12.4, the release notes says [4]:
> > > 
> > > The –xdebugformat=stabs for all compilers might be removed in a future
> > > release. The only debugger format option will be –xdebugformat=dwarf,
> > > which is currently the default.
> > > 
> > > So, it seems to be a good time to change the debug format to DWARF when
> > > compiling with Oracle Solaris Studio. I also changed the debug format for
> > > GCC on Solaris to be DWARF, since the STABS support in GCC is in
> > > maintenance mode [5].
> > > 
> > > More reasons for using DWARF instead of STABS are:
> > > - Better support by Oracle Studio Performance Analyzer (the performance
> > > team have requested that we use DWARF v2 or later instead of STABS).
> > > - DWARF provides a better debugging experience for C++ compared to STABS.
> > > 
> > > The one drawback of using DWARF compared to STABS is that the size of the
> > > debuginfo increases. For a SPARC fastdebug build the size of
> > > libjvm.debuginfo built with STABS is 782 MB and with DWARF 1002 MB.
> > > 
> > > To summarize, we need to change from STABS to DWARF because STABS is
> > > deprecated in 12.3 (even "more" deprecated 12.4 given the wording in the
> > > release notes). I would suggest to change sooner rather than later, given
> > > that the change to DWARF also brings Oracle Studio Performance Analyzer
> > > support as well as a better C++ debugging experience in dbx.
> > > 
> > > Webrev:
> > > http://cr.openjdk.java.net/~ehelin/8065656/webrev.00/
> > > 
> > > Bug:
> > > https://bugs.openjdk.java.net/browse/JDK-8065656
> > > 
> > > Testing:
> > > - Compiled with Oracle Solaris Studio 12.3 on both Solaris 11.1 on SPARC
> > > and Solaris 11.1 on x86-64 using JPRT.
> > > - Verified that DWARF v2 symbols are produced with objdump.
> > > 
> > > Thanks,
> > > Erik
> > > 
> > > [0]: http://www.sourceware.org/gdb/onlinedocs/stabs.html
> > > [1]: http://www.dwarfstd.org/
> > > [2]: http://mail.openjdk.java.net/pipermail/jdk9-dev/2014-October/001489.html
> > > [3]: https://docs.oracle.com/cd/E24457_01/html/E22003/cplusplus.1.html
> > > [4]: https://docs.oracle.com/cd/E37069_01/html/E37070/gnxfn.html
> > > [5]: https://sourceware.org/ml/binutils/2013-01/msg00028.html


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic