RFR (XS) 7182040 - make native thread creation failure message more descriptive (original) (raw)
Ioi Lam ioi.lam at oracle.com
Wed Feb 12 15:17:53 PST 2014
- Previous message: RFR (XS) 7182040 - make native thread creation failure message more descriptive
- Next message: RFR (XS) 7182040 - make native thread creation failure message more descriptive
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 2/12/14, 2:35 PM, Christian Thalinger wrote:
On Feb 12, 2014, at 1:03 PM, Ioi Lam <ioi.lam at oracle.com> wrote:
Christian,
It's not clear to me how to define a "generic" version of a method and override it in a port. In the "os" class, there aren't virtual methods. Also, the various os.hpp files are included into the middle of the declaration of the "os" class. So it seems to me one way or another you have to use #ifdef. Sigh. We have to stop including stuff into the middle of class declarations. This is such bad design. Is actually a port using a different message right now? No, all ports are using the same message right now.
- Ioi
Thanks - Ioi
On 2/12/14, 12:06 PM, Christian Thalinger wrote: Can we not use a macro for the message?
OSNATIVETHREADCREATIONFAILEDMSG If you want to be able to override the message override the method. On Feb 10, 2014, at 2:00 PM, Ioi Lam <ioi.lam at oracle.com> wrote:
Please review a very small fix (JDK9):
http://cr.openjdk.java.net/~iklam/7182040/threadcreatefailedmsg001/ Bug: The original "OutOfMemorError" message could be misleading when the actual cause is the OS limit on number of processes/threads. https://bugs.openjdk.java.net/browse/JDK-7182040 Summary of fix: I changed all occurrence of the literal string "unable to create new native thread" in the C code to call a common function os::nativethreadcreationfailedmsg(). Individual OS ports may define an alternative message by defining the OSNATIVETHREADCREATIONFAILEDMSG macro in os.hpp Here's a snap shot of the new message: java.lang.OutOfMemoryError: unable to create native thread: possibly out of memory or process/resource limits reached at java.lang.Thread.start0(Native Method) at java.lang.Thread.start(Thread.java:713) at spin.main(spin.java:15) Tests: JPRT Thanks - Ioi
- Previous message: RFR (XS) 7182040 - make native thread creation failure message more descriptive
- Next message: RFR (XS) 7182040 - make native thread creation failure message more descriptive
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]