Re: RFR: JDK-8221851: Use of THIS_FILE in hotspot invalidates precompiled header on Linux/GCC

2019-04-09 Thread Yasumasa Suenaga
2019年4月10日(水) 13:55 David Holmes : > > Hi Erik, > > On 9/04/2019 11:55 pm, Erik Joelsson wrote: > > Hello, > > > > Here is a new webrev with an even simpler change: > > > > http://cr.openjdk.java.net/~erikj/8221851/webrev.06/ > > > > I decided to just remove the usage of THIS_FILE from exceptions.h

Re: RFR: JDK-8221851: Use of THIS_FILE in hotspot invalidates precompiled header on Linux/GCC

2019-04-09 Thread David Holmes
Hi Erik, On 9/04/2019 11:55 pm, Erik Joelsson wrote: Hello, Here is a new webrev with an even simpler change: http://cr.openjdk.java.net/~erikj/8221851/webrev.06/ I decided to just remove the usage of THIS_FILE from exceptions.hpp since it did not work well. It currently does not work at all

Re: RFR: JDK-8221851: Use of THIS_FILE in hotspot invalidates precompiled header on Linux/GCC

2019-04-09 Thread Erik Joelsson
Hello, Here is a new webrev with an even simpler change: http://cr.openjdk.java.net/~erikj/8221851/webrev.06/ I decided to just remove the usage of THIS_FILE from exceptions.hpp since it did not work well. It currently does not work at all on Windows or Macosx builds. On Linux it invalidates

Re: RFR: JDK-8221851: Use of THIS_FILE in hotspot invalidates precompiled header on Linux/GCC

2019-04-08 Thread David Holmes
Hi Erik, On 9/04/2019 8:08 am, Erik Joelsson wrote: New webrev with "_simple_basename": http://cr.openjdk.java.net/~erikj/8221851/webrev.05/ Given the usage is typically of the form: Exceptions::_throw(THREAD_AND_LOCATION, e); which will expand to: Exceptions::_throw(THREAD, _simple_basen

Re: RFR: JDK-8221851: Use of THIS_FILE in hotspot invalidates precompiled header on Linux/GCC

2019-04-08 Thread Erik Joelsson
New webrev with "_simple_basename": http://cr.openjdk.java.net/~erikj/8221851/webrev.05/ /Erik On 2019-04-08 12:20, Erik Joelsson wrote: On 2019-04-08 11:40, Kim Barrett wrote: On Apr 8, 2019, at 10:28 AM, Erik Joelsson wrote: Hello, On 2019-04-05 15:46, Kim Barrett wrote: Assuming all t

Re: RFR: JDK-8221851: Use of THIS_FILE in hotspot invalidates precompiled header on Linux/GCC

2019-04-08 Thread Erik Joelsson
On 2019-04-08 11:40, Kim Barrett wrote: On Apr 8, 2019, at 10:28 AM, Erik Joelsson wrote: Hello, On 2019-04-05 15:46, Kim Barrett wrote: Assuming all that, consider instead putting this_file_helper in exceptions.hpp (perhaps with a better name?), don't bother with THIS_FILE, and define THREAD

Re: RFR: JDK-8221851: Use of THIS_FILE in hotspot invalidates precompiled header on Linux/GCC

2019-04-08 Thread Kim Barrett
> On Apr 8, 2019, at 10:28 AM, Erik Joelsson wrote: > > Hello, > > On 2019-04-05 15:46, Kim Barrett wrote: >> Assuming all that, consider instead putting this_file_helper in >> exceptions.hpp (perhaps with a better name?), don't bother with >> THIS_FILE, and define THREAD_AND_LOCATION as >> >>

Re: RFR: JDK-8221851: Use of THIS_FILE in hotspot invalidates precompiled header on Linux/GCC

2019-04-08 Thread Tim Bell
On 04/08/19 07:28, Erik Joelsson wrote: > I'm now looking for another Hotspot reviewer. > > http://cr.openjdk.java.net/~erikj/8221851/webrev.04/ I'm not a Hotspot Reviewer, however the build changes look good FWIW. Tim Hello, On 2019-04-05 15:46, Kim Barrett wrote: On Apr 5, 2019, at 11:09

Re: RFR: JDK-8221851: Use of THIS_FILE in hotspot invalidates precompiled header on Linux/GCC

2019-04-08 Thread Erik Joelsson
Hello, On 2019-04-05 15:46, Kim Barrett wrote: On Apr 5, 2019, at 11:09 AM, Erik Joelsson wrote: So to make it clear. This patch now does the following: * Removes the setting of -DTHIS_FILE=... from all compilation units involved in building Hotspot. * Introduces THIS_FILE as a macro in Hots

Re: RFR: JDK-8221851: Use of THIS_FILE in hotspot invalidates precompiled header on Linux/GCC

2019-04-05 Thread Kim Barrett
> On Apr 5, 2019, at 11:09 AM, Erik Joelsson wrote: > So to make it clear. This patch now does the following: > > * Removes the setting of -DTHIS_FILE=... from all compilation units involved > in building Hotspot. > > * Introduces THIS_FILE as a macro in Hotspot src which gets just the filename

Re: RFR: JDK-8221851: Use of THIS_FILE in hotspot invalidates precompiled header on Linux/GCC

2019-04-05 Thread Erik Joelsson
Hello, On 2019-04-05 06:56, Erik Joelsson wrote: On 2019-04-04 22:23, Ioi Lam wrote: I am sure the build system is correct . but it's complicated. BTW, we actually have generated sources that can live outside of the source repo. And with luck, their names can actually be shorter than

Re: RFR: JDK-8221851: Use of THIS_FILE in hotspot invalidates precompiled header on Linux/GCC

2019-04-05 Thread Erik Joelsson
On 2019-04-04 22:23, Ioi Lam wrote: On 4/4/19 10:08 PM, David Holmes wrote: Adding back build-dev On 5/04/2019 2:41 pm, Ioi Lam wrote: #define THIS_FILE (__FILE__ + FILE_MACRO_OFFSET) This make me a little uneasy, as it could potential point past the end of the string. The intent of co

Re: RFR: JDK-8221851: Use of THIS_FILE in hotspot invalidates precompiled header on Linux/GCC

2019-04-05 Thread Thomas Stüfe
On Fri, Apr 5, 2019 at 10:51 AM David Holmes wrote: > Hi Thomas, > > On 5/04/2019 6:23 pm, Thomas Stüfe wrote: > > Hi, > > > > sorry, just sniping in from the side. > > > > About the motivation: the original intent of Yasumasas patch was to > > reduce the length of the event log messages. > > > >

Re: RFR: JDK-8221851: Use of THIS_FILE in hotspot invalidates precompiled header on Linux/GCC

2019-04-05 Thread David Holmes
Hi Thomas, On 5/04/2019 6:23 pm, Thomas Stüfe wrote: Hi, sorry, just sniping in from the side. About the motivation: the original intent of Yasumasas patch was to reduce the length of the event log messages. I have a patch out there for RFR, since ~2 weeks or so, which largely solves this

Re: RFR: JDK-8221851: Use of THIS_FILE in hotspot invalidates precompiled header on Linux/GCC

2019-04-05 Thread Thomas Stüfe
p.s.: Review is at hs-runtime-dev: https://mail.openjdk.java.net/pipermail/hotspot-runtime-dev/2019-March/033150.html . On Fri, Apr 5, 2019 at 10:23 AM Thomas Stüfe wrote: > Hi, > > sorry, just sniping in from the side. > > About the motivation: the original intent of Yasumasas patch was to redu

Re: RFR: JDK-8221851: Use of THIS_FILE in hotspot invalidates precompiled header on Linux/GCC

2019-04-05 Thread Thomas Stüfe
Hi, sorry, just sniping in from the side. About the motivation: the original intent of Yasumasas patch was to reduce the length of the event log messages. I have a patch out there for RFR, since ~2 weeks or so, which largely solves this problem: https://bugs.openjdk.java.net/browse/JDK-8220762

Re: RFR: JDK-8221851: Use of THIS_FILE in hotspot invalidates precompiled header on Linux/GCC

2019-04-04 Thread David Holmes
On 5/04/2019 3:23 pm, Ioi Lam wrote: On 4/4/19 10:08 PM, David Holmes wrote: Adding back build-dev On 5/04/2019 2:41 pm, Ioi Lam wrote: #define THIS_FILE (__FILE__ + FILE_MACRO_OFFSET) This make me a little uneasy, as it could potential point past the end of the string. The intent of cou

Re: RFR: JDK-8221851: Use of THIS_FILE in hotspot invalidates precompiled header on Linux/GCC

2019-04-04 Thread Ioi Lam
On 4/4/19 10:08 PM, David Holmes wrote: Adding back build-dev On 5/04/2019 2:41 pm, Ioi Lam wrote: #define THIS_FILE (__FILE__ + FILE_MACRO_OFFSET) This make me a little uneasy, as it could potential point past the end of the string. The intent of course is that that is impossible: - _FI

Re: RFR: JDK-8221851: Use of THIS_FILE in hotspot invalidates precompiled header on Linux/GCC

2019-04-04 Thread David Holmes
Adding back build-dev On 5/04/2019 2:41 pm, Ioi Lam wrote: #define THIS_FILE (__FILE__ + FILE_MACRO_OFFSET) This make me a little uneasy, as it could potential point past the end of the string. The intent of course is that that is impossible: - _FILE_ is an absolute file path within the repo

Re: RFR: JDK-8221851: Use of THIS_FILE in hotspot invalidates precompiled header on Linux/GCC

2019-04-04 Thread David Holmes
Hi Erik, Build and hotspot changes seem okay. Thanks, David On 5/04/2019 8:03 am, Erik Joelsson wrote: On 2019-04-04 14:26, Kim Barrett wrote: OK, I can do that. -- src/hotspot/share/utilities/macros.hpp   645 #

Re: RFR: JDK-8221851: Use of THIS_FILE in hotspot invalidates precompiled header on Linux/GCC

2019-04-04 Thread Kim Barrett
> On Apr 4, 2019, at 6:03 PM, Erik Joelsson wrote: > > > On 2019-04-04 14:26, Kim Barrett wrote: >> >> OK, I can do that. >> >> -- >> src/hotspot/share/utilities/macros.hpp >> 645 #if FILE_MACRO_OFFSET >> 646 #define

Re: RFR: JDK-8221851: Use of THIS_FILE in hotspot invalidates precompiled header on Linux/GCC

2019-04-04 Thread Erik Joelsson
On 2019-04-04 14:26, Kim Barrett wrote: OK, I can do that. -- src/hotspot/share/utilities/macros.hpp 645 #if FILE_MACRO_OFFSET 646 #define THIS_FILE (__FILE__ + FILE_MACRO_OFFSET) 647 #else 648 #define THIS_FI

Re: RFR: JDK-8221851: Use of THIS_FILE in hotspot invalidates precompiled header on Linux/GCC

2019-04-04 Thread Kim Barrett
> On Apr 4, 2019, at 9:36 AM, Erik Joelsson wrote: > > Hello Kim, > > On 2019-04-03 16:34, Kim Barrett wrote: >>> On Apr 3, 2019, at 9:51 AM, Erik Joelsson >>> wrote:Additionally, I would like to replace all (or at least most) >>> instances of __FILE__ with my new THIS_FILE, and I suspect som

Re: RFR: JDK-8221851: Use of THIS_FILE in hotspot invalidates precompiled header on Linux/GCC

2019-04-04 Thread Erik Joelsson
Hello Kim, On 2019-04-03 16:34, Kim Barrett wrote: On Apr 3, 2019, at 9:51 AM, Erik Joelsson wrote: On 2019-04-02 16:02, Kim Barrett wrote: Bug: https://bugs.openjdk.java.net/browse/JDK-8221851 Webrev: http://cr.openjdk.java.net/~erikj/8221851/webrev.01/index.html /Erik Here's an alternativ

Re: RFR: JDK-8221851: Use of THIS_FILE in hotspot invalidates precompiled header on Linux/GCC

2019-04-03 Thread Kim Barrett
> On Apr 3, 2019, at 9:51 AM, Erik Joelsson wrote: > On 2019-04-02 16:02, Kim Barrett wrote: >>> >>> Bug: https://bugs.openjdk.java.net/browse/JDK-8221851 >>> >>> Webrev: http://cr.openjdk.java.net/~erikj/8221851/webrev.01/index.html >>> >>> /Erik >> Here's an alternative approach that seems si

Re: RFR: JDK-8221851: Use of THIS_FILE in hotspot invalidates precompiled header on Linux/GCC

2019-04-03 Thread Erik Joelsson
Hello Kim, On 2019-04-02 16:02, Kim Barrett wrote: On Apr 2, 2019, at 5:39 PM, Erik Joelsson wrote: In JDK-8204551, exceptions.hpp started using THIS_FILE instead of __FILE__ to generate exception messages. This is causing the precompiled header to no longer provide any benefit on Linux/GCC.

Re: RFR: JDK-8221851: Use of THIS_FILE in hotspot invalidates precompiled header on Linux/GCC

2019-04-02 Thread Kim Barrett
> On Apr 2, 2019, at 5:39 PM, Erik Joelsson wrote: > > In JDK-8204551, exceptions.hpp started using THIS_FILE instead of __FILE__ to > generate exception messages. This is causing the precompiled header to no > longer provide any benefit on Linux/GCC. The problem is that the THIS_FILE > macro

RFR: JDK-8221851: Use of THIS_FILE in hotspot invalidates precompiled header on Linux/GCC

2019-04-02 Thread Erik Joelsson
In JDK-8204551, exceptions.hpp started using THIS_FILE instead of __FILE__ to generate exception messages. This is causing the precompiled header to no longer provide any benefit on Linux/GCC. The problem is that the THIS_FILE macro is provided on the command line and is different for each comp