Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-7188173

RFE: consider switching from STABS to DWARF on linux-x86 (32-bit)

    XMLWordPrintable

    Details

    • Subcomponent:
    • CPU:
      generic
    • OS:
      linux

      Description

      The following fix:

          7071904 4/4 HotSpot: Full Debug Symbols

      enabled the Full Debug Symbol (FDS) feature in HotSpot.

      For the linux-x86 (32-bit) config, FDS uses the STABS
      format debug info instead of the DWARF format.

      This choice is controlled by the following:

      make/linux/makefiles/gcc.make:

            210 #------------------------------------------------------------------------
            211 # Debug flags
            212
            213 # Use the stabs format for debugging information (this is the default
            214 # on gcc-2.91). It's good enough, has all the information about line
            215 # numbers and local variables, and libjvm_g.so is only about 16M.
            216 # Change this back to "-g" if you want the most expressive format.
            217 # (warning: that could easily inflate libjvm_g.so to 150M!)
            218 # Note: The Itanium gcc compiler crashes when using -gstabs.
            219 DEBUG_CFLAGS/ia64 = -g
            220 DEBUG_CFLAGS/amd64 = -g
            221 DEBUG_CFLAGS/arm = -g
            222 DEBUG_CFLAGS/ppc = -g
            223 DEBUG_CFLAGS += $(DEBUG_CFLAGS/$(BUILDARCH))
            224 ifeq ($(DEBUG_CFLAGS/$(BUILDARCH)),)
            225 DEBUG_CFLAGS += -gstabs
            226 endif
            227
            228 ifneq ($(OBJCOPY),)
            229 FASTDEBUG_CFLAGS/ia64 = -g
            230 FASTDEBUG_CFLAGS/amd64 = -g
            231 FASTDEBUG_CFLAGS/arm = -g
            232 FASTDEBUG_CFLAGS/ppc = -g
            233 FASTDEBUG_CFLAGS += $(DEBUG_CFLAGS/$(BUILDARCH))
            234 ifeq ($(FASTDEBUG_CFLAGS/$(BUILDARCH)),)
            235 FASTDEBUG_CFLAGS += -gstabs
            236 endif
            237
            238 OPT_CFLAGS/ia64 = -g
            239 OPT_CFLAGS/amd64 = -g
            240 OPT_CFLAGS/arm = -g
            241 OPT_CFLAGS/ppc = -g
            242 OPT_CFLAGS += $(OPT_CFLAGS/$(BUILDARCH))
            243 ifeq ($(OPT_CFLAGS/$(BUILDARCH)),)
            244 OPT_CFLAGS += -gstabs
            245 endif
            246 endif
            247
            248 # DEBUG_BINARIES overrides everything, use full -g debug information
            249 ifeq ($(DEBUG_BINARIES), true)
            250 DEBUG_CFLAGS = -g
            251 CFLAGS += $(DEBUG_CFLAGS)
            252 endif


      The default for arch-configs that are not specifically
      called out is '-gstabs' (STABS format) instead of '-g'
      (DWARF format).

      When investigating whether to switch from STABS to DWARF,
      the size of the resulting debug info files must be considered
      as that impact the disk footprint for the JPRT systems, the
      RE systems and the SQE systems.
      A quick thumbnail sketch on possible JPRT diskspace impact
      from switching to '-g' from '-gstabs'.

      In my work on the following bug:

          7188168 4/4 7071904 broke the DEBUG_BINARIES option on Linux

      I did a JPRT Linux only test job with DEBUG_BINARIES=true and
      another JPRT Linux only test job without DEBUG_BINARIES at all:

      For DEBUG_BINARIES=true:

      $ du -sk 2012/08/2012-08-01-155321.ddaugher.7188168_for_hsx24/bundles
      3897295

      For the default:

      $ du -sk 2012/08/2012-08-01-155405.ddaugher.7188168_for_hsx24/bundles
      2025941

      It looks like building everything on Linux using '-g' increases
      the JPRT disk footprint by 92.36% or almost double:

      $ bc
      scale=4
      3897295 - 2025941
      1871354

      1871354 / 2025941
      .9236


      Part of that increase is because the embedded bits went from
      mostly no debug info to '-g' debug info.

      Looking at just the linux_i586* bundles:

      For DEBUG_BINARIES=true:

      $ du -sk linux_i586_2.6-* | awk '{ sum += $1; } END { printf("sum=%d", sum); }'
      sum=1172180

      For the default:

      $ du -sk linux_i586_2.6-* | awk '{ sum += $1; } END { printf("sum=%d", sum); }'
      sum=620996

      It looks like building just linux_i586* bundles with '-g'
      instead of '-gstabs' still increases JPRT footprint by 88.75%:

      $ bc
      scale=4
      1172180 - 620996
      551184

      551184 / 620996
      .8875

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              dcubed Daniel Daugherty
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: