[Proposal] jlink plugin which replaces dynamic shared libraries

2018-12-04 Thread Severin Gehwolf
Hi, Apologies if this isn't the right list. Please let me know where jlink related issues are being discussed. The Problem: --- This issue originally surfaced in our packaged OpenJDK 11 builds for Fedora. If a user created a custom image from the packag

Re: [Proposal] jlink plugin which replaces dynamic shared libraries

2018-12-04 Thread Severin Gehwolf
Hi Alan, On Tue, 2018-12-04 at 13:19 +, Alan Bateman wrote: > On 04/12/2018 12:47, Severin Gehwolf wrote: > > : > > > > > > Proposed Solution: > > --- > > The solution we came up with is a new jlink p

Re: [Proposal] jlink plugin which replaces dynamic shared libraries

2018-12-04 Thread Severin Gehwolf
On Tue, 2018-12-04 at 15:15 +, Alan Bateman wrote: > > > You mail makes me wonder if it would be feasible to have a plugin that > > > does the stripping, maybe you've looked into that already? > > > > We've considered it, but I haven't looked into it. > > I think it's worth exploring, even if

Re: jdeps --generate-module-info fails when mixing MR JARs and non-MR JARs

2018-12-17 Thread Severin Gehwolf
Hi Gunnar, On Sun, 2018-12-16 at 22:20 +0100, Gunnar Morling wrote: > Hi Alan, > > Yes, I just tested with build 12-ea+23 and can confirm things work as > expected. Is there any chance that this gets backported into 11.0.4? JDK-8210502 seems to be already backported to JDK 11. According to JBS i

Custom jlink images and dynamically linked shared libraries

2018-12-17 Thread Severin Gehwolf
Hi, It appears to be that jlink-produced custom images rely on the fact that jmods in the module-path have been produced with static linking and bundled libraries. This assumption might not always hold for downstream builders. Since JDK 9+ there are build options to use system lcms, system jpeg,

Re: [Proposal] jlink plugin which replaces dynamic shared libraries

2018-12-18 Thread Severin Gehwolf
Hi Alan, On Tue, 2018-12-04 at 16:55 +0100, Severin Gehwolf wrote: > On Tue, 2018-12-04 at 15:15 +, Alan Bateman wrote: > > > > You mail makes me wonder if it would be feasible to have a plugin that > > > > does the stripping, maybe you've looked into

Re: [Proposal] jlink plugin which replaces dynamic shared libraries

2018-12-21 Thread Severin Gehwolf
On Fri, 2018-12-21 at 12:07 +, Alan Bateman wrote: > On 18/12/2018 14:40, Severin Gehwolf wrote: > > : > > I've added a proof-of-concept for a strip-native-debug-symbols plugin > > to the bug. It requires objcopy to be on the system on which jlink is >

Re: [Proposal] jlink plugin which replaces dynamic shared libraries

2019-01-02 Thread Severin Gehwolf
On Mon, 2018-12-31 at 07:33 +, Alan Bateman wrote: > On 21/12/2018 18:21, Mandy Chung wrote: > > I also like this, stripping the native debug symbols, as a jlink plugin. > > > > Currently jlink does not support platform-specific plugin. The > > Plugin API will need > > to be extended to spe

Re: Help with build changes for: 8214796: Create a jlink plugin for stripping debug info symbols from native libraries

2019-01-28 Thread Severin Gehwolf
Hi Alan, Mandy, On Sun, 2019-01-27 at 08:14 +, Alan Bateman wrote: > On 26/01/2019 00:06, Mandy Chung wrote: > > Hi Severin, > > > > Another alternative would be to support per-jlink-plugin resource > > bundle to avoid merging .properties files at build time. The > > plugin-specific messages

Re: Help with build changes for: 8214796: Create a jlink plugin for stripping debug info symbols from native libraries

2019-01-28 Thread Severin Gehwolf
On Mon, 2019-01-28 at 14:40 +, Alan Bateman wrote: > On 28/01/2019 09:26, Severin Gehwolf wrote: > > : > > > I skimmed the current patch and I see the usability has improved since > > > the original proposal. It would be nice to get to > > > `--strip-nativ

RFR: 8217877: Dead code in jdk.jlink's TaskHelper

2019-01-28 Thread Severin Gehwolf
Hi, There seems to be dead code in class TaskHelper. Plugins are loaded via ServiceLoader from the module boot loader. I don't see how this code could ever be reached. The proposal is to remove it for clarity. Bug: https://bugs.openjdk.java.net/browse/JDK-8217877 webrev: http://cr.openjdk.java.ne

Re: RFR: 8217877: Dead code in jdk.jlink's TaskHelper

2019-01-28 Thread Severin Gehwolf
On Mon, 2019-01-28 at 11:16 -0800, Mandy Chung wrote: > > > On 1/28/19 11:01 AM, Alan Bateman wrote: > > On 28/01/2019 15:00, Severin Gehwolf wrote: > > > Hi, > > > > > > There seems to be dead code in class TaskHelper. Plugins are loaded via >

RFR: Move jlink plugin resources into their own files (was: Re: Help with build changes for: 8214796: Create a jlink plugin for stripping debug info symbols from native libraries)

2019-01-29 Thread Severin Gehwolf
Hi Mandy, Alan, On Mon, 2019-01-28 at 13:02 -0800, Mandy Chung wrote: > > On 1/28/19 1:26 AM, Severin Gehwolf wrote: > > Hi Alan, Mandy, > > > > On Sun, 2019-01-27 at 08:14 +, Alan Bateman wrote: > > > On 26/01/2019 00:06, Mandy Chung wrote: > > &

RFR: 8214796: Create a jlink plugin for stripping debug info symbols from native libraries

2019-02-07 Thread Severin Gehwolf
Hi, Could I please get reviews for this enhancement? It adds a debug symbols stripping plug-in to jlink for Linux and Unix platforms. It's the first platform specific jlink plugin and the approach taken for keeping it contained is to use a plugin specific ResourceBundle. Discussion for this happen

Re: RFR: 8214796: Create a jlink plugin for stripping debug info symbols from native libraries

2019-02-07 Thread Severin Gehwolf
rin > Otherwise build changes look ok. > > /Erik > > On 2019-02-07 09:09, Severin Gehwolf wrote: > > Hi, > > > > Could I please get reviews for this enhancement? It adds a debug > > symbols stripping plug-in to jlink for Linux and Unix platforms. It

Re: RFR: 8214796: Create a jlink plugin for stripping debug info symbols from native libraries

2019-02-11 Thread Severin Gehwolf
Hi Erik, On Thu, 2019-02-07 at 17:01 -0800, Erik Joelsson wrote: > On 2019-02-07 11:09, Severin Gehwolf wrote: > > Hi Erik, > > > > On Thu, 2019-02-07 at 09:39 -0800, Erik Joelsson wrote: > > > Hello Severin, > > > > > > There is a macro for au

Re: RFR: 8214796: Create a jlink plugin for stripping debug info symbols from native libraries

2019-02-11 Thread Severin Gehwolf
Hi Alan, Thanks for the review! On Fri, 2019-02-08 at 10:08 +, Alan Bateman wrote: > On 07/02/2019 17:09, Severin Gehwolf wrote: > > Hi, > > > > Could I please get reviews for this enhancement? It adds a debug > > symbols stripping plug-in to jlink for Linux and U

Re: RFR: 8214796: Create a jlink plugin for stripping debug info symbols from native libraries

2019-02-12 Thread Severin Gehwolf
ent so much. We have style guidelines [1], which > recommend 4 spaces for line break indentation. OK, sorry. Fixed locally. Thanks, Severin > /Erik > > [1] http://openjdk.java.net/groups/build/doc/code-conventions.html > > On 2019-02-11 10:03, Severin Gehwolf wrote: > >

Re: RFR: 8214796: Create a jlink plugin for stripping debug info symbols from native libraries

2019-02-12 Thread Severin Gehwolf
Hi Erik, On Tue, 2019-02-12 at 08:44 -0800, Erik Joelsson wrote: > On 2019-02-12 01:35, Severin Gehwolf wrote: > > Hi Erik, > > > > On Mon, 2019-02-11 at 11:12 -0800, Erik Joelsson wrote: > > > Hello Severin, > > > > > > I think you also need a

Re: RFR: 8214796: Create a jlink plugin for stripping debug info symbols from native libraries

2019-02-12 Thread Severin Gehwolf
Hi Mandy, Alan, Please find the proposal for CLI option of --strip-native-debug-symbols below. On Fri, 2019-02-08 at 10:53 -0800, Mandy Chung wrote: > > On 2/8/19 2:08 AM, Alan Bateman wrote: > > I agree with Mandy that the CLI options need examination. The proposed > > `--strip-native-debug-s

Re: RFR: 8214796: Create a jlink plugin for stripping debug info symbols from native libraries

2019-02-12 Thread Severin Gehwolf
Hi Mandy, Thanks for the review! On Thu, 2019-02-07 at 12:43 -0800, Mandy Chung wrote: > Hi Severin, > > Using the plugin specific ResourceBundle is good. Thanks for making > the change. > > I see that Alan's comment [1] on the plugin options and I assume > you will investigate the plugin opti

Re: RFR: 8214796: Create a jlink plugin for stripping debug info symbols from native libraries

2019-02-13 Thread Severin Gehwolf
On Tue, 2019-02-12 at 15:29 -0800, Mandy Chung wrote: > > On 2/12/19 11:52 AM, Severin Gehwolf wrote: > > Hi Mandy, Alan, > > > > Please find the proposal for CLI option of --strip-native-debug-symbols > > below. > > > > The current implementatio

RFR: 8218913: Rename --strip-debug jlink plugin

2019-02-13 Thread Severin Gehwolf
Hi, As discussed in the RFR thread for JDK-8214796 it was suggested to rename the --strip-debug plugin so that --strip-debug could actually perform java debug symbols stripping *and* native debug symbols stripping at once. That's what this patch does. It renames --strip- debug to --strip-java-debu

Re: RFR: 8214796: Create a jlink plugin for stripping debug info symbols from native libraries

2019-02-14 Thread Severin Gehwolf
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 > > >

Re: RFR: 8218913: Rename --strip-debug jlink plugin

2019-02-14 Thread Severin Gehwolf
g-info. We can settle the naming in the other thread > to get others > opinion. As indicated in the other thread, I'd be happy to call it --strip-java- debug-info and --strip-native-debug-info. I'll wait for the other thread to settle before I'll update the webrev. Thanks, Seve

Re: RFR: 8218913: Rename --strip-debug jlink plugin

2019-02-14 Thread Severin Gehwolf
Hi Alan, On Thu, 2019-02-14 at 15:26 +, Alan Bateman wrote: > On 13/02/2019 11:16, Severin Gehwolf wrote: > > Hi, > > > > As discussed in the RFR thread for JDK-8214796 it was suggested to > > rename the --strip-debug plugin so that --strip-debug could actually >

Re: RFR: 8218913: Rename --strip-debug jlink plugin

2019-02-15 Thread Severin Gehwolf
Generate all debugging info > > The other choice is --strip-java-debug-info and > --strip-native-debug-info. We can settle the naming in the other > thread > to get others > opinion. > > Mandy > > On 2/13/19 3:16 AM, Severin Gehwolf wrote: > > Hi, > > &

Re: RFR: 8218913: Rename --strip-debug jlink plugin

2019-02-15 Thread Severin Gehwolf
Hi Alan, On Fri, 2019-02-15 at 15:57 +, Alan Bateman wrote: > On 15/02/2019 12:15, Severin Gehwolf wrote: > > : > > Here is the latest webrev: > > http://cr.openjdk.java.net/~sgehwolf/webrevs/JDK-8218913/02/webrev/ > > > > It uses --strip-java-debug-attribute

Re: RFR: 8214796: Create a jlink plugin for stripping debug info symbols from native libraries

2019-02-15 Thread Severin Gehwolf
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. &

Re: RFR: 8218913: Rename --strip-debug jlink plugin

2019-02-18 Thread Severin Gehwolf
On Fri, 2019-02-15 at 23:27 -0800, Mandy Chung wrote: > On 2/15/19 8:12 AM, Severin Gehwolf wrote: > > Thanks for the review! I've remove the @author tag: > > http://cr.openjdk.java.net/~sgehwolf/webrevs/JDK-8218913/03/webrev/ > > Looks good. As Alan said, this needs

Re: RFR: 8218913: Rename --strip-debug jlink plugin

2019-02-18 Thread Severin Gehwolf
On Mon, 2019-02-18 at 10:10 +, Alan Bateman wrote: > On 18/02/2019 09:50, Severin Gehwolf wrote: > > : > > Thanks. CSR has been filed here: > > https://bugs.openjdk.java.net/browse/JDK-8219207 > > > The interface change is to add --strip-java-debug-attribu

Re: RFR: 8214796: Create a jlink plugin for stripping debug info symbols from native libraries

2019-02-18 Thread Severin Gehwolf
Hi Magnus, On Mon, 2019-02-18 at 09:32 +0100, Magnus Ihse Bursie wrote: > > 15 feb. 2019 kl. 18:01 skrev Severin Gehwolf : > > > > Hi Alan, Mandy, > > > > Here is the next round of this change: > > http://cr.openjdk.java.net/~sgehwolf/webrevs/JDK-8214796

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

2019-02-22 Thread Severin Gehwolf
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 w

Re: RFR: 8214796: Create a jlink plugin for stripping debug info symbols from native libraries

2019-02-25 Thread Severin Gehwolf
On Mon, 2019-02-25 at 10:49 +, Alan Bateman wrote: > On 15/02/2019 17:01, Severin Gehwolf wrote: > > : > > > > ->8- > > Plugin Name: strip-native-debug-symbols > > Option: --strip-native-debug-symbols= > > Description: Str

Re: RFR: 8214796: Create a jlink plugin for stripping debug info symbols from native libraries

2019-02-26 Thread Severin Gehwolf
On Tue, 2019-02-26 at 09:46 +, Alan Bateman wrote: > On 25/02/2019 22:26, Mandy Chung wrote: > > Adding the "-files" suffix sounds good to me. I'm okay > > with omit-debuginfo-files or exclude-debuginfo-files. > > > > One comment though this is a plugin option name rather than > > a plugin na

Re: RFR: 8214796: Create a jlink plugin for stripping debug info symbols from native libraries

2019-02-28 Thread Severin Gehwolf
Hi Mandy, Thanks for the review! I'll update the webrev ASAP and will get back to you once ready. Thanks, Severin On Tue, 2019-02-26 at 13:35 -0800, Mandy Chung wrote: > Hi Severin, > > This is my initial set of comments. > > On 2/26/19 3:01 AM, Severin Gehwolf wrote

Re: RFR: 8214796: Create a jlink plugin for stripping debug info symbols from native libraries

2019-04-09 Thread Severin Gehwolf
with the updates: http://cr.openjdk.java.net/~sgehwolf/webrevs/JDK-8214796/09/webrev/ > On 2/26/19 3:01 AM, Severin Gehwolf wrote: > > --list-plugins output for --strip-native-debug-symbols: > > > > Plugin Name: strip-native-debug-symbols > > Option: --strip-nat

Re: RFR: 8214796: Create a jlink plugin for stripping debug info symbols from native libraries

2019-04-18 Thread Severin Gehwolf
Alan, Mandy, any more comments? Appreciate your help getting this reviewed. Thanks, Severin On Tue, 2019-04-09 at 11:06 +0200, Severin Gehwolf wrote: > Hi Mandy, > > Sorry for the long delay. Other priorities came up, but I am ready to > pick this up again. CSR updated and comm

Re: RFR: 8214796: Create a jlink plugin for stripping debug info symbols from native libraries

2019-05-13 Thread Severin Gehwolf
On Sun, 2019-05-12 at 09:35 +0100, Alan Bateman wrote: > On 08/05/2019 15:37, sgehw...@redhat.com wrote: > > : > > > stripBinary uses ProcessBuilder to launch objdump but it doesn't > > > redirect or read from the process streams. This could make diagnosing > > > problems difficult so I think it sh

Re: RFR 8220700: jlink generated launcher script needs quoting to avoid parameter expansion

2019-08-21 Thread Severin Gehwolf
Hi, On Wed, 2019-08-21 at 12:23 +0530, sundararajan.athijegannat...@oracle.com wrote: > Updated to add a test: > > http://cr.openjdk.java.net/~sundar/8220700/webrev.01 > > PS. There are launcher tests in BasicTest.java and arguments are passed > even - but args are only printed. The new test p

Re: RFR 8220700: jlink generated launcher script needs quoting to avoid parameter expansion

2019-08-21 Thread Severin Gehwolf
On Wed, 2019-08-21 at 17:03 +0530, sundararajan.athijegannat...@oracle.com wrote: > Thanks Severin for your test improvement suggestion! > > Updated: http://cr.openjdk.java.net/~sundar/8220700/webrev.02/index.html Looks good. Thanks, Severin

Re: RFR (XS) 8241462: StripNativeDebugSymbols jlink plugin allocates huge arrays

2020-03-24 Thread Severin Gehwolf
On Tue, 2020-03-24 at 12:03 +0100, Aleksey Shipilev wrote: > On 3/23/20 9:35 PM, Alan Bateman wrote: > > On 23/03/2020 19:22, Aleksey Shipilev wrote: > > > +import java.io.InputStream; > > > import java.io.IOException; > > > import java.lang.ProcessBuilder.Redirect; > > > @@ -314,5 +315,8 @@ >