Re: RFR: 8295657: SA: Allow larger object alignments [v2]

2022-10-21 Thread Aleksey Shipilev
On Thu, 20 Oct 2022 09:40:55 GMT, Aleksey Shipilev wrote: >> Found this when working on JOL support >> ([CODETOOLS-7903364](https://bugs.openjdk.org/browse/CODETOOLS-7903364)). If >> you try to attach to VM running with -XX:ObjectAlignmentInBytes=32, then SA >> would fail with: >> >> >> Caus

Re: RFR: 8295657: SA: Allow larger object alignments [v2]

2022-10-20 Thread Chris Plummer
On Thu, 20 Oct 2022 09:40:55 GMT, Aleksey Shipilev wrote: >> Found this when working on JOL support >> ([CODETOOLS-7903364](https://bugs.openjdk.org/browse/CODETOOLS-7903364)). If >> you try to attach to VM running with -XX:ObjectAlignmentInBytes=32, then SA >> would fail with: >> >> >> Caus

Re: RFR: 8295657: SA: Allow larger object alignments

2022-10-20 Thread Aleksey Shipilev
On Thu, 20 Oct 2022 09:35:16 GMT, Aleksey Shipilev wrote: > Ran those too with different object alignments. I am running tests with > different GCs too. Ran with Serial, Parallel, G1. Shenandoah and ZGC have problems with SA tests even with default object alignment, so I skipped those. Serial

Re: RFR: 8295657: SA: Allow larger object alignments [v2]

2022-10-20 Thread Aleksey Shipilev
On Wed, 19 Oct 2022 22:44:37 GMT, Chris Plummer wrote: >> Yes. I don't see a need for it. > > You could keep in the check to make sure it is aligned to a power of 2, since > I doubt SA would work with a value that isn't, but then I don't see the > possibility of hotspot ever supporting it eithe

Re: RFR: 8295657: SA: Allow larger object alignments

2022-10-20 Thread Aleksey Shipilev
On Wed, 19 Oct 2022 21:02:13 GMT, Chris Plummer wrote: > Sorry, I missed that. There are also some SA tests in > test/jdk/sun/tools/jhsdb. Ran those too with different object alignments. I am running tests with different GCs too. - PR: https://git.openjdk.org/jdk/pull/10762

Re: RFR: 8295657: SA: Allow larger object alignments [v2]

2022-10-20 Thread Aleksey Shipilev
> Found this when working on JOL support > ([CODETOOLS-7903364](https://bugs.openjdk.org/browse/CODETOOLS-7903364)). If > you try to attach to VM running with -XX:ObjectAlignmentInBytes=32, then SA > would fail with: > > > Caused by: java.lang.RuntimeException: Object alignment 32 not yet supp

Re: RFR: 8295657: SA: Allow larger object alignments

2022-10-19 Thread Chris Plummer
On Wed, 19 Oct 2022 20:59:29 GMT, Chris Plummer wrote: >> I don't think there is anything specific in SA that prohibits it to follow >> what Hotspot is capable of. Are you proposing to drop the range check >> altogether? I can do that. > > Yes. I don't see a need for it. You could keep in the

Re: RFR: 8295657: SA: Allow larger object alignments

2022-10-19 Thread Chris Plummer
On Wed, 19 Oct 2022 20:25:32 GMT, Aleksey Shipilev wrote: >> src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/VM.java line 505: >> >>> 503: >>> 504: minObjAlignmentInBytes = getObjectAlignmentInBytes(); >>> 505: if (minObjAlignmentInBytes < 8 || minObjAlignmentInBytes > 256 |

Re: RFR: 8295657: SA: Allow larger object alignments

2022-10-19 Thread Chris Plummer
On Wed, 19 Oct 2022 20:26:33 GMT, Aleksey Shipilev wrote: > As I stated in "Additional testing" in the PR description, I did ran > `serviceability/sa` with different alignments. What other tests we should run? Sorry, I missed that. There are also some SA tests in test/jdk/sun/tools/jhsdb.

Re: RFR: 8295657: SA: Allow larger object alignments

2022-10-19 Thread Aleksey Shipilev
On Wed, 19 Oct 2022 12:04:49 GMT, Aleksey Shipilev wrote: > Found this when working on JOL support > ([CODETOOLS-7903364](https://bugs.openjdk.org/browse/CODETOOLS-7903364)). If > you try to attach to VM running with -XX:ObjectAlignmentInBytes=32, then SA > would fail with: > > > Caused by:

Re: RFR: 8295657: SA: Allow larger object alignments

2022-10-19 Thread Aleksey Shipilev
On Wed, 19 Oct 2022 19:42:31 GMT, Chris Plummer wrote: >> Found this when working on JOL support >> ([CODETOOLS-7903364](https://bugs.openjdk.org/browse/CODETOOLS-7903364)). If >> you try to attach to VM running with -XX:ObjectAlignmentInBytes=32, then SA >> would fail with: >> >> >> Caused

Re: RFR: 8295657: SA: Allow larger object alignments

2022-10-19 Thread Chris Plummer
On Wed, 19 Oct 2022 12:04:49 GMT, Aleksey Shipilev wrote: > Found this when working on JOL support > ([CODETOOLS-7903364](https://bugs.openjdk.org/browse/CODETOOLS-7903364)). If > you try to attach to VM running with -XX:ObjectAlignmentInBytes=32, then SA > would fail with: > > > Caused by:

Re: RFR: 8295657: SA: Allow larger object alignments

2022-10-19 Thread Chris Plummer
On Wed, 19 Oct 2022 12:04:49 GMT, Aleksey Shipilev wrote: > Found this when working on JOL support > ([CODETOOLS-7903364](https://bugs.openjdk.org/browse/CODETOOLS-7903364)). If > you try to attach to VM running with -XX:ObjectAlignmentInBytes=32, then SA > would fail with: > > > Caused by:

Re: RFR: 8295657: SA: Allow larger object alignments

2022-10-19 Thread Chris Plummer
On Wed, 19 Oct 2022 13:09:59 GMT, Aleksey Shipilev wrote: > Looks fine. Curious, how well are all these alignments tested? E.g. do they > work with all GCs? We have gc/TestObjectAlignment.java. I don't see any indication that this test is not run with all GCs. - PR: https://git.o

Re: RFR: 8295657: SA: Allow larger object alignments

2022-10-19 Thread Aleksey Shipilev
On Wed, 19 Oct 2022 13:03:53 GMT, Thomas Stuefe wrote: > Looks fine. Curious, how well are all these alignments tested? E.g. do they > work with all GCs? I tested `serviceability/sa` with default (G1) and all acceptable alignments, seems to work fine. We can run the tests with other GCs, if an

Re: RFR: 8295657: SA: Allow larger object alignments

2022-10-19 Thread Thomas Stuefe
On Wed, 19 Oct 2022 12:04:49 GMT, Aleksey Shipilev wrote: > Found this when working on JOL support > ([CODETOOLS-7903364](https://bugs.openjdk.org/browse/CODETOOLS-7903364)). If > you try to attach to VM running with -XX:ObjectAlignmentInBytes=32, then SA > would fail with: > > > Caused by:

RFR: 8295657: SA: Allow larger object alignments

2022-10-19 Thread Aleksey Shipilev
Found this when working on JOL support ([CODETOOLS-7903364](https://bugs.openjdk.org/browse/CODETOOLS-7903364)). If you try to attach to VM running with -XX:ObjectAlignmentInBytes=32, then SA would fail with: Caused by: java.lang.RuntimeException: Object alignment 32 not yet supported at jdk.h