Re: RFR: 8236569: -Xss not multiple of 4K does not work for the main thread on macOS [v2]

2022-05-31 Thread Thomas Stuefe
On Tue, 31 May 2022 15:10:38 GMT, Adam Sotona wrote: >> This is continuation of PR #4256 >> >> The patch simply rounds up the specified stack size to multiple of the >> system page size, on systems where necessary. >> The patch is based on the original PR/branch, with reflected remaining >>

Re: RFR: 8236569: -Xss not multiple of 4K does not work for the main thread on macOS [v2]

2022-05-31 Thread David Holmes
On Tue, 31 May 2022 15:10:38 GMT, Adam Sotona wrote: >> This is continuation of PR #4256 >> >> The patch simply rounds up the specified stack size to multiple of the >> system page size, on systems where necessary. >> The patch is based on the original PR/branch, with reflected remaining >>

Re: RFR: 8236569: -Xss not multiple of 4K does not work for the main thread on macOS [v2]

2022-05-31 Thread Adam Sotona
On Tue, 31 May 2022 13:28:30 GMT, David Holmes wrote: >> Adam Sotona has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Updated Java mannpage > > src/java.base/share/classes/sun/launcher/resources/launcher.properties line > 176: > >>

Re: RFR: 8236569: -Xss not multiple of 4K does not work for the main thread on macOS [v2]

2022-05-31 Thread Adam Sotona
> This is continuation of PR #4256 > > The patch simply rounds up the specified stack size to multiple of the system > page size, on systems where necessary. > The patch is based on the original PR/branch, with reflected remaining > recommendations. > > Please review. > > Thank you, > Adam

Re: RFR: 8236569: -Xss not multiple of 4K does not work for the main thread on macOS

2022-05-31 Thread David Holmes
On Tue, 31 May 2022 08:37:19 GMT, Adam Sotona wrote: > This is continuation of PR #4256 > > The patch simply rounds up the specified stack size to multiple of the system > page size, on systems where necessary. > The patch is based on the original PR/branch, with reflected remaining >

RFR: 8236569: -Xss not multiple of 4K does not work for the main thread on macOS

2022-05-31 Thread Adam Sotona
This is continuation of PR #4256 The patch simply rounds up the specified stack size to multiple of the system page size, on systems where necessary. The patch is based on the original PR/branch, with reflected remaining recommendations. Please review. Thank you, Adam - Commit

Re: RFR: 8236569: -Xss not multiple of 4K does not work for the main thread on macOS [v6]

2022-05-31 Thread Adam Sotona
On Tue, 8 Jun 2021 16:53:38 GMT, Henry Jen wrote: >> …d on macOS >> >> This patch simply round up the specified stack size to multiple of the >> system page size. >> >> Test is trivial, simply run java with -Xss option against following code. On >> MacOS, before the fix, running with

Re: RFR: 8236569: -Xss not multiple of 4K does not work for the main thread on macOS [v6]

2021-07-23 Thread Alan Bateman
On Tue, 8 Jun 2021 16:53:38 GMT, Henry Jen wrote: >> …d on macOS >> >> This patch simply round up the specified stack size to multiple of the >> system page size. >> >> Test is trivial, simply run java with -Xss option against following code. On >> MacOS, before the fix, running with

Re: RFR: 8236569: -Xss not multiple of 4K does not work for the main thread on macOS [v5]

2021-07-14 Thread Henry Jen
On Tue, 8 Jun 2021 13:37:10 GMT, Thomas Stuefe wrote: >> Henry Jen has updated the pull request with a new target base due to a merge >> or a rebase. The incremental webrev excludes the unrelated changes brought >> in by the merge/rebase. The pull request contains seven additional commits >>

Re: RFR: 8236569: -Xss not multiple of 4K does not work for the main thread on macOS [v5]

2021-06-08 Thread Thomas Stuefe
On Tue, 8 Jun 2021 16:45:12 GMT, Henry Jen wrote: >> src/java.base/unix/native/libjli/java_md.c line 666: >> >>> 664: return page_size * pages; >>> 665: } >>> 666: } >> >> Could probably be shortened to something like this: >> >> >> size_t pagesize =

Re: RFR: 8236569: -Xss not multiple of 4K does not work for the main thread on macOS [v6]

2021-06-08 Thread David Holmes
On Tue, 8 Jun 2021 16:53:38 GMT, Henry Jen wrote: >> …d on macOS >> >> This patch simply round up the specified stack size to multiple of the >> system page size. >> >> Test is trivial, simply run java with -Xss option against following code. On >> MacOS, before the fix, running with

Re: RFR: 8236569: -Xss not multiple of 4K does not work for the main thread on macOS [v5]

2021-06-08 Thread David Holmes
On 8/06/2021 11:40 pm, Thomas Stuefe wrote: On Mon, 7 Jun 2021 03:18:32 GMT, Henry Jen wrote: …d on macOS This patch simply round up the specified stack size to multiple of the system page size. Test is trivial, simply run java with -Xss option against following code. On MacOS, before the

Re: RFR: 8236569: -Xss not multiple of 4K does not work for the main thread on macOS [v6]

2021-06-08 Thread Henry Jen
> …d on macOS > > This patch simply round up the specified stack size to multiple of the system > page size. > > Test is trivial, simply run java with -Xss option against following code. On > MacOS, before the fix, running with `-Xss159k` and `-Xss160k` would get > `7183` and `649`

Re: RFR: 8236569: -Xss not multiple of 4K does not work for the main thread on macOS [v5]

2021-06-08 Thread Henry Jen
On Tue, 8 Jun 2021 08:17:54 GMT, Thomas Stuefe wrote: >> Henry Jen has updated the pull request with a new target base due to a merge >> or a rebase. The incremental webrev excludes the unrelated changes brought >> in by the merge/rebase. The pull request contains seven additional commits >>

Re: RFR: 8236569: -Xss not multiple of 4K does not work for the main thread on macOS [v5]

2021-06-08 Thread Henry Jen
On Tue, 8 Jun 2021 02:36:26 GMT, David Holmes wrote: >> Henry Jen has updated the pull request with a new target base due to a merge >> or a rebase. The incremental webrev excludes the unrelated changes brought >> in by the merge/rebase. The pull request contains seven additional commits >>

Re: RFR: 8236569: -Xss not multiple of 4K does not work for the main thread on macOS [v5]

2021-06-08 Thread Thomas Stuefe
On Mon, 7 Jun 2021 03:18:32 GMT, Henry Jen wrote: >> …d on macOS >> >> This patch simply round up the specified stack size to multiple of the >> system page size. >> >> Test is trivial, simply run java with -Xss option against following code. On >> MacOS, before the fix, running with

Re: RFR: 8236569: -Xss not multiple of 4K does not work for the main thread on macOS [v5]

2021-06-08 Thread Thomas Stuefe
On Mon, 7 Jun 2021 03:18:32 GMT, Henry Jen wrote: >> …d on macOS >> >> This patch simply round up the specified stack size to multiple of the >> system page size. >> >> Test is trivial, simply run java with -Xss option against following code. On >> MacOS, before the fix, running with

Re: RFR: 8236569: -Xss not multiple of 4K does not work for the main thread on macOS [v5]

2021-06-07 Thread David Holmes
On Mon, 7 Jun 2021 03:18:32 GMT, Henry Jen wrote: >> …d on macOS >> >> This patch simply round up the specified stack size to multiple of the >> system page size. >> >> Test is trivial, simply run java with -Xss option against following code. On >> MacOS, before the fix, running with

Re: RFR: 8236569: -Xss not multiple of 4K does not work for the main thread on macOS [v5]

2021-06-07 Thread Henry Jen
On Mon, 7 Jun 2021 03:18:32 GMT, Henry Jen wrote: >> …d on macOS >> >> This patch simply round up the specified stack size to multiple of the >> system page size. >> >> Test is trivial, simply run java with -Xss option against following code. On >> MacOS, before the fix, running with

Re: RFR: 8236569: -Xss not multiple of 4K does not work for the main thread on macOS [v5]

2021-06-06 Thread David Holmes
On Mon, 7 Jun 2021 03:22:18 GMT, Henry Jen wrote: > while some other Posix system might as explained in the man page What manpage? The POSIX specification for this does not allow for EINVAL being returned due to alignment issues. That is an extra constraint imposed by macOS and which makes

Re: RFR: 8236569: -Xss not multiple of 4K does not work for the main thread on macOS [v5]

2021-06-06 Thread Henry Jen
On Mon, 7 Jun 2021 03:18:32 GMT, Henry Jen wrote: >> …d on macOS >> >> This patch simply round up the specified stack size to multiple of the >> system page size. >> >> Test is trivial, simply run java with -Xss option against following code. On >> MacOS, before the fix, running with

Re: RFR: 8236569: -Xss not multiple of 4K does not work for the main thread on macOS [v5]

2021-06-06 Thread Henry Jen
> …d on macOS > > This patch simply round up the specified stack size to multiple of the system > page size. > > Test is trivial, simply run java with -Xss option against following code. On > MacOS, before the fix, running with `-Xss159k` and `-Xss160k` would get > `7183` and `649`

Re: RFR: 8236569: -Xss not multiple of 4K does not work for the main thread on macOS [v4]

2021-06-06 Thread David Holmes
On Sat, 5 Jun 2021 01:48:21 GMT, Henry Jen wrote: >> …d on macOS >> >> This patch simply round up the specified stack size to multiple of the >> system page size. >> >> Test is trivial, simply run java with -Xss option against following code. On >> MacOS, before the fix, running with

Re: RFR: 8236569: -Xss not multiple of 4K does not work for the main thread on macOS [v4]

2021-06-04 Thread Henry Jen
> …d on macOS > > This patch simply round up the specified stack size to multiple of the system > page size. > > Test is trivial, simply run java with -Xss option against following code. On > MacOS, before the fix, running with `-Xss159k` and `-Xss160k` would get > `7183` and `649`

Re: RFR: 8236569: -Xss not multiple of 4K does not work for the main thread on macOS [v3]

2021-06-04 Thread Henry Jen
> …d on macOS > > This patch simply round up the specified stack size to multiple of the system > page size. > > Test is trivial, simply run java with -Xss option against following code. On > MacOS, before the fix, running with `-Xss159k` and `-Xss160k` would get > `7183` and `649`

Re: RFR: 8236569: -Xss not multiple of 4K does not work for the main thread on macOS [v2]

2021-06-04 Thread Henry Jen
> …d on macOS > > This patch simply round up the specified stack size to multiple of the system > page size. > > Test is trivial, simply run java with -Xss option against following code. On > MacOS, before the fix, running with `-Xss159k` and `-Xss160k` would get > `7183` and `649`

Re: RFR: 8236569: -Xss not multiple of 4K does not work for the main thread on macOS

2021-06-03 Thread Henry Jen
On Fri, 28 May 2021 21:55:24 GMT, Henry Jen wrote: > …d on macOS > > This patch simply round up the specified stack size to multiple of the system > page size. > > Test is trivial, simply run java with -Xss option against following code. On > MacOS, before the fix, running with `-Xss159k`

Re: RFR: 8236569: -Xss not multiple of 4K does not work for the main thread on macOS

2021-06-03 Thread Henry Jen
On Mon, 31 May 2021 20:23:53 GMT, Vladimir Kempik wrote: >> src/java.base/macosx/native/libjli/java_md_macosx.m line 727: >> >>> 725: >>> 726: static size_t alignUp(size_t stack_size) { >>> 727: long page_size = sysconf(_SC_PAGESIZE); >> >> In hotspot we use `getpagesize()`. There is also

Re: RFR: 8236569: -Xss not multiple of 4K does not work for the main thread on macOS

2021-05-31 Thread Vladimir Kempik
On Sun, 30 May 2021 03:00:56 GMT, David Holmes wrote: >> …d on macOS >> >> This patch simply round up the specified stack size to multiple of the >> system page size. >> >> Test is trivial, simply run java with -Xss option against following code. On >> MacOS, before the fix, running with

Re: RFR: 8236569: -Xss not multiple of 4K does not work for the main thread on macOS

2021-05-29 Thread David Holmes
On Fri, 28 May 2021 21:55:24 GMT, Henry Jen wrote: > …d on macOS > > This patch simply round up the specified stack size to multiple of the system > page size. > > Test is trivial, simply run java with -Xss option against following code. On > MacOS, before the fix, running with `-Xss159k`

RFR: 8236569: -Xss not multiple of 4K does not work for the main thread on macOS

2021-05-28 Thread Henry Jen
…d on macOS This patch simply round up the specified stack size to multiple of the system page size. Test is trivial, simply run java with -Xss option against following code. On MacOS, before the fix, running with `-Xss159k` and `-Xss160k` would get `7183` and `649` respectively. After fix,