Re: RFR: 8338768: Introduce runtime lookup to check for static builds [v2]

2024-09-11 Thread Josef Eisl
On Tue, 10 Sep 2024 21:47:15 GMT, Magnus Ihse Bursie wrote: > sort out the mess that is libawt_headless/libawt_xawt sounds good. can you point me to a JBS? - PR Review Comment: https://git.openjdk.org/jdk/pull/20666#discussion_r1753307449

Re: RFR: 8338768: Introduce runtime lookup to check for static builds [v2]

2024-09-10 Thread Magnus Ihse Bursie
On Tue, 10 Sep 2024 13:51:55 GMT, Josef Eisl wrote: >> Magnus Ihse Bursie has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Also update build to link properly > > src/java.desktop/unix/native/libawt/awt/awt_LoadLibrary.c line 135: > >> 13

Re: RFR: 8338768: Introduce runtime lookup to check for static builds [v2]

2024-09-10 Thread Josef Eisl
On Wed, 21 Aug 2024 22:14:40 GMT, Magnus Ihse Bursie wrote: >> As a preparation for Hermetic Java, we need to have a way to look up during >> runtime if we are using a statically linked library or not. >> >> This change will be the first step needed towards compiling the object files >> only o

Re: RFR: 8338768: Introduce runtime lookup to check for static builds [v2]

2024-09-01 Thread Julian Waters
On Mon, 2 Sep 2024 04:09:19 GMT, David Holmes wrote: > > This does make me wonder: What if the new method for checking if the VM was > > statically linked was inlined? Then the problem comes back yet again as the > > object files need to be recompiled once more. This is possible if Link Time >

Re: RFR: 8338768: Introduce runtime lookup to check for static builds [v2]

2024-09-01 Thread David Holmes
On Sun, 1 Sep 2024 16:30:33 GMT, Julian Waters wrote: > This does make me wonder: What if the new method for checking if the VM was > statically linked was inlined? Then the problem comes back yet again as the > object files need to be recompiled once more. This is possible if Link Time > Opti

Re: RFR: 8338768: Introduce runtime lookup to check for static builds [v2]

2024-09-01 Thread Julian Waters
On Wed, 21 Aug 2024 22:14:40 GMT, Magnus Ihse Bursie wrote: >> As a preparation for Hermetic Java, we need to have a way to look up during >> runtime if we are using a statically linked library or not. >> >> This change will be the first step needed towards compiling the object files >> only o

Re: RFR: 8338768: Introduce runtime lookup to check for static builds [v2]

2024-08-31 Thread David Holmes
On Fri, 30 Aug 2024 10:51:30 GMT, Magnus Ihse Bursie wrote: >> I understand the cost overhead experienced by any individual Java run may be >> lost in the noise, but it still impacts every single Java run just to save >> some time/resources for the handful of builders of statically linked VMs.

Re: RFR: 8338768: Introduce runtime lookup to check for static builds [v2]

2024-08-30 Thread Magnus Ihse Bursie
On Mon, 26 Aug 2024 02:07:39 GMT, David Holmes wrote: >> Magnus Ihse Bursie has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Also update build to link properly > > I understand the cost overhead experienced by any individual Java run may

Re: RFR: 8338768: Introduce runtime lookup to check for static builds [v2]

2024-08-30 Thread Alan Bateman
On Wed, 21 Aug 2024 22:14:40 GMT, Magnus Ihse Bursie wrote: >> As a preparation for Hermetic Java, we need to have a way to look up during >> runtime if we are using a statically linked library or not. >> >> This change will be the first step needed towards compiling the object files >> only o

Re: RFR: 8338768: Introduce runtime lookup to check for static builds [v2]

2024-08-29 Thread Jiangli Zhou
On Thu, 29 Aug 2024 08:26:16 GMT, Magnus Ihse Bursie wrote: > Okay. Unless I misunderstand something, there were no additional authors to > be credited for these two commits. That's correct for these. - PR Comment: https://git.openjdk.org/jdk/pull/20666#issuecomment-2317982354

Re: RFR: 8338768: Introduce runtime lookup to check for static builds [v2]

2024-08-29 Thread Magnus Ihse Bursie
On Wed, 21 Aug 2024 22:14:40 GMT, Magnus Ihse Bursie wrote: >> As a preparation for Hermetic Java, we need to have a way to look up during >> runtime if we are using a statically linked library or not. >> >> This change will be the first step needed towards compiling the object files >> only o

Re: RFR: 8338768: Introduce runtime lookup to check for static builds [v2]

2024-08-28 Thread Jiangli Zhou
On Tue, 27 Aug 2024 23:15:03 GMT, Jiangli Zhou wrote: >> And the discussion whether the checks are made "dynamically" or "statically" >> is too simplified to be really helpful. >> >> Currently, we compile two sets of all object files, with slightly different >> compiler arguments, one for dyna

Re: RFR: 8338768: Introduce runtime lookup to check for static builds [v2]

2024-08-28 Thread Erik Joelsson
On Mon, 26 Aug 2024 02:07:39 GMT, David Holmes wrote: > I understand the cost overhead experienced by any individual Java run may be > lost in the noise, but it still impacts every single Java run just to save > some time/resources for the handful of builders of statically linked VMs. I > am n

Re: RFR: 8338768: Introduce runtime lookup to check for static builds [v2]

2024-08-28 Thread Magnus Ihse Bursie
On Tue, 27 Aug 2024 23:15:03 GMT, Jiangli Zhou wrote: >> And the discussion whether the checks are made "dynamically" or "statically" >> is too simplified to be really helpful. >> >> Currently, we compile two sets of all object files, with slightly different >> compiler arguments, one for dyna

Re: RFR: 8338768: Introduce runtime lookup to check for static builds [v2]

2024-08-27 Thread Jiangli Zhou
On Tue, 27 Aug 2024 13:55:51 GMT, Magnus Ihse Bursie wrote: >> Magnus Ihse Bursie has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Also update build to link properly > > And the discussion whether the checks are made "dynamically" or "sta

Re: RFR: 8338768: Introduce runtime lookup to check for static builds [v2]

2024-08-27 Thread Jiangli Zhou
On Wed, 21 Aug 2024 22:14:40 GMT, Magnus Ihse Bursie wrote: >> As a preparation for Hermetic Java, we need to have a way to look up during >> runtime if we are using a statically linked library or not. >> >> This change will be the first step needed towards compiling the object files >> only o

Re: RFR: 8338768: Introduce runtime lookup to check for static builds [v2]

2024-08-27 Thread Jiangli Zhou
On Tue, 27 Aug 2024 13:55:51 GMT, Magnus Ihse Bursie wrote: >> Magnus Ihse Bursie has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Also update build to link properly > > And the discussion whether the checks are made "dynamically" or "sta

Re: RFR: 8338768: Introduce runtime lookup to check for static builds [v2]

2024-08-27 Thread Magnus Ihse Bursie
On Wed, 21 Aug 2024 22:14:40 GMT, Magnus Ihse Bursie wrote: >> As a preparation for Hermetic Java, we need to have a way to look up during >> runtime if we are using a statically linked library or not. >> >> This change will be the first step needed towards compiling the object files >> only o

Re: RFR: 8338768: Introduce runtime lookup to check for static builds [v2]

2024-08-27 Thread Magnus Ihse Bursie
On Mon, 26 Aug 2024 09:39:28 GMT, Magnus Ihse Bursie wrote: >> I understand the cost overhead experienced by any individual Java run may be >> lost in the noise, but it still impacts every single Java run just to save >> some time/resources for the handful of builders of statically linked VMs.

Re: RFR: 8338768: Introduce runtime lookup to check for static builds [v2]

2024-08-26 Thread Jiangli Zhou
On Thu, 22 Aug 2024 00:30:07 GMT, Jiangli Zhou wrote: >> Magnus Ihse Bursie has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Also update build to link properly > > I compared the extracted changes in this PR with the related parts in > h

Re: RFR: 8338768: Introduce runtime lookup to check for static builds [v2]

2024-08-26 Thread Magnus Ihse Bursie
On Mon, 26 Aug 2024 02:07:39 GMT, David Holmes wrote: > but it still impacts every single Java run just to save some time/resources > for the handful of builders of statically linked VMs. Seriously? I challenge you do prove there is any effect at all. :-/ Also, there is not a "handful" of buil

Re: RFR: 8338768: Introduce runtime lookup to check for static builds [v2]

2024-08-26 Thread Magnus Ihse Bursie
On Sun, 25 Aug 2024 14:57:22 GMT, Alan Bateman wrote: > That is true for now but there 30-50 other places that will need attention > once this effort is further along. Everywhere that deals with user editable > configuration (conf tree) will change, as will everywhere that reads JDK > internal

Re: RFR: 8338768: Introduce runtime lookup to check for static builds [v2]

2024-08-25 Thread David Holmes
On Wed, 21 Aug 2024 22:14:40 GMT, Magnus Ihse Bursie wrote: >> As a preparation for Hermetic Java, we need to have a way to look up during >> runtime if we are using a statically linked library or not. >> >> This change will be the first step needed towards compiling the object files >> only o

Re: RFR: 8338768: Introduce runtime lookup to check for static builds [v2]

2024-08-25 Thread Alan Bateman
On Fri, 23 Aug 2024 10:04:42 GMT, Magnus Ihse Bursie wrote: > But, if you look at the actual functions that are affected, you can see that > it is just a handful of calls that are all done at startup time. That is true for now but there 30-50 other places that will need attention once this ef

Re: RFR: 8338768: Introduce runtime lookup to check for static builds [v2]

2024-08-23 Thread Magnus Ihse Bursie
On Thu, 22 Aug 2024 22:49:50 GMT, David Holmes wrote: > is the final intent here that this one magic file will be compiled first with > an inline declaration such that when the other files containing the apparent > runtime check get compiled, it can actually be determined at build time and > s

Re: RFR: 8338768: Introduce runtime lookup to check for static builds [v2]

2024-08-22 Thread David Holmes
On Thu, 22 Aug 2024 08:54:56 GMT, Magnus Ihse Bursie wrote: >> Sorry but I don't understand the point of changing build-time constructs >> using `ifdef STATIC_BUILD` into what appear to be runtime checks, but the >> result of which is already determined at build time. These are not really >> r

Re: RFR: 8338768: Introduce runtime lookup to check for static builds [v2]

2024-08-22 Thread Magnus Ihse Bursie
On Thu, 22 Aug 2024 02:46:34 GMT, David Holmes wrote: >> Magnus Ihse Bursie has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Also update build to link properly > > Sorry but I don't understand the point of changing build-time constructs

Re: RFR: 8338768: Introduce runtime lookup to check for static builds [v2]

2024-08-22 Thread Magnus Ihse Bursie
On Thu, 22 Aug 2024 00:30:07 GMT, Jiangli Zhou wrote: >> Magnus Ihse Bursie has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Also update build to link properly > > I compared the extracted changes in this PR with the related parts in > h

Re: RFR: 8338768: Introduce runtime lookup to check for static builds [v2]

2024-08-21 Thread Julian Waters
On Thu, 22 Aug 2024 02:46:34 GMT, David Holmes wrote: > Sorry but I don't understand the point of changing build-time constructs > using `ifdef STATIC_BUILD` into what appear to be runtime checks, but the > result of which is already determined at build time. These are not really > runtime che

Re: RFR: 8338768: Introduce runtime lookup to check for static builds [v2]

2024-08-21 Thread David Holmes
On Wed, 21 Aug 2024 22:14:40 GMT, Magnus Ihse Bursie wrote: >> As a preparation for Hermetic Java, we need to have a way to look up during >> runtime if we are using a statically linked library or not. >> >> This change will be the first step needed towards compiling the object files >> only o

Re: RFR: 8338768: Introduce runtime lookup to check for static builds [v2]

2024-08-21 Thread Jiangli Zhou
On Wed, 21 Aug 2024 22:14:40 GMT, Magnus Ihse Bursie wrote: >> As a preparation for Hermetic Java, we need to have a way to look up during >> runtime if we are using a statically linked library or not. >> >> This change will be the first step needed towards compiling the object files >> only o

Re: RFR: 8338768: Introduce runtime lookup to check for static builds [v2]

2024-08-21 Thread Phil Race
On Wed, 21 Aug 2024 22:14:40 GMT, Magnus Ihse Bursie wrote: >> As a preparation for Hermetic Java, we need to have a way to look up during >> runtime if we are using a statically linked library or not. >> >> This change will be the first step needed towards compiling the object files >> only o

Re: RFR: 8338768: Introduce runtime lookup to check for static builds [v2]

2024-08-21 Thread Magnus Ihse Bursie
> As a preparation for Hermetic Java, we need to have a way to look up during > runtime if we are using a statically linked library or not. > > This change will be the first step needed towards compiling the object files > only once, and then link them into either dynamic or static libraries. (T