RFR 8027434: "-XX:OnOutOfMemoryError" uses fork instead of vfork
roger.riggs at oracle.com
Fri Sep 14 13:26:30 UTC 2018
There is a parallel thread on core-libs-dev recommending to use
posix_spawn instead of vfork
in the JDK's process launcher.
That might be worth considering here too; but would be a larger change.
On 9/14/18 2:32 AM, Muthusamy Chinnathambi wrote:
> Hi David,
>> please refactor into a static helper function
> Sure, I will change and get back after testing.
> Muthusamy C
> -----Original Message-----
> From: David Holmes
> Sent: Friday, September 14, 2018 11:16 AM
> To: Muthusamy Chinnathambi <muthusamy.chinnathambi at oracle.com>; hotspot-runtime-dev at openjdk.java.net
> Subject: Re: RFR 8027434: "-XX:OnOutOfMemoryError" uses fork instead of vfork
> Hi Muthusamy,
> Instead of duplicating all the code - which I think only differs in the
> fork versus vfork line - please refactor into a static helper function
> that takes a boolean vfork and call that from
> fork_and_exec/vfork_and_exec selecting fork or vfork as appropriate.
> I'm still mulling over whether there is a cleaner way to do this other
> than introducing a linux only entry to the os class.
> On 14/09/2018 1:55 PM, Muthusamy Chinnathambi wrote:
>> Hi all,
>> Could you review this fix for JDK-8027434 - to use vfork instead of fork for -XX:OnOutOfMemoryError.
>> See bug comments for more details.
>> Bug URL: https://bugs.openjdk.java.net/browse/JDK-8027434
>> Webrev URL: http://cr.openjdk.java.net/~mchinnathamb/8027434/webrev.00/
>> Tested with mach5 hs-tier1-4.
>> Muthusamy C
More information about the hotspot-runtime-dev