[PING?] RFR: 8214796: Create a jlink plugin for stripping debug info symbols from native libraries

Severin Gehwolf sgehwolf at redhat.com
Fri Feb 22 15:29:22 UTC 2019


Mandy, Alan, any more thoughts on this?

Thanks,
Severin

On Fri, 2019-02-15 at 18:01 +0100, Severin Gehwolf wrote:
> Hi Alan, Mandy,
> 
> Here is the next round of this change:
> http://cr.openjdk.java.net/~sgehwolf/webrevs/JDK-8214796/06/webrev/
> 
> It now also has tests which don't require objcopy to be present on test
> machines as well as being integrated with --strip-debug (once JDK-
> 8218913 is pushed). --list-plugins help output for --strip-native-
> debug-symbols now reads:
> 
> ----->8-------------------------
> Plugin Name: strip-native-debug-symbols
> Option: --strip-native-debug-symbols=<omit-debuginfo|keep-debuginfo>
> Description: Strip debug symbols from native libraries (if any). 
>  This plugin requires at least one option: 
>    objcopy: The path to the objcopy binary. Defaults to objcopy in PATH.
>    omit-debuginfo: Do not keep debug info files. Defaults to true.
>    keep-debuginfo[=<ext>]: Keep debug info files in <file>.<ext>.
>                            Defaults to <file>.debuginfo 
>  Examples: --strip-native-debug-symbols objcopy=/usr/bin/objcopy
>            --strip-native-debug-symbols=omit-debuginfo
>            --strip-native-debug-symbols keep-debuginfo:objcopy=objcopy
> ----->8-------------------------
> 
> Testing: jdk.jlink tests jdk/submit (ongoing), added tests:
>          DefaultStripDebugPluginTest, StripNativeDebugSymbolsPluginTest
> 
> Note: IntegrationTest needed a heap size bump as this now runs
>       StripNativeDebugSymbolsPluginTest on some systems. Especially with
>       --with-native-debug-symbols=internal builds this can eat some
>       memory.
> 
> Please let me know what you think.
> 
> Thanks,
> Severin
> 
> On Wed, 2019-02-13 at 15:36 -0800, Mandy Chung wrote:
> > On 2/13/19 1:04 AM, Severin Gehwolf wrote:
> > > >      --strip-native-debug-symbols no-keep-debuginfo
> > > --strip-native-debug-symbols strip-debuginfo
> > > --strip-native-debug-symbols remove-debuginfo
> > > 
> > > It would avoid using negation.
> > 
> > What about 'omit', i.e.
> > 
> > --strip-native-debug-symbols  omit-debuginfo
> > --strip-native-debug-symbols  keep-debuginfo=<ext>
> > 
> > > Sure. I've filed JDK-8218913 for doing this first. Would a name of --
> > > strip-java-debug-symbols be acceptable? My thinking is that it would
> > > have nice symmetry with --strip-native-debug-symbols. Thoughts?
> > 
> > --strip-native-debug-symbols is okay.
> > 
> > Having a second thought, javac -g and gcc -g both say "debugging
> > information".  I think we could go with:
> > 
> > --strip-java-debug-info
> > --strip-native-debug-info  omit-debuginfo
> > --strip-native-debug-info  keep-debuginfo=<ext>
> > 
> > unless anyone thinks `-debug-symbols` is better?
> > 
> > The options are getting pretty good now.
> > 
> > Mandy



More information about the jigsaw-dev mailing list