Re: RFR: 8278518: String(byte[], int, int, Charset) constructor and String.translateEscapes() miss bounds check elimination

2021-12-21 Thread Roland Westrelin
On Sat, 18 Dec 2021 21:48:33 GMT, amirhadadi wrote: >> This does look like a HotSpot JIT compiler issue to me. My guess is that it >> is related to how checkBoundsOffCount() checks for offset < 0: >> >> 396 if ((length | fromIndex | size) < 0 || size > length - >> fromIndex) >> >> u

Re: RFR: 8257837: Performance regression in heap byte buffer views

2020-12-10 Thread Roland Westrelin
On Thu, 10 Dec 2020 13:15:41 GMT, Maurizio Cimadamore wrote: > As a result of the recent integration of the foreign memory access API, some > of the buffer implementations now use `ScopedMemoryAccess` instead of > `Unsafe`. While this works generally well, there are situations where profile >

Integrated: 8255150: Add utility methods to check long indexes and ranges

2020-11-17 Thread Roland Westrelin
On Mon, 2 Nov 2020 10:47:18 GMT, Roland Westrelin wrote: > This change add 3 new methods in Objects: > > public static long checkIndex(long index, long length) > public static long checkFromToIndex(long fromIndex, long toIndex, long length) > public static long checkFromIndexSize

Re: RFR: 8255150: Add utility methods to check long indexes and ranges [v7]

2020-11-17 Thread Roland Westrelin
ts improve > significantly. > > This change includes: > > - the API change > - the C2 intrinsic > - tests for the API and the C2 intrinsic > > This is a joint work with Paul who reviewed and reworked the API change > and filled the CSR. Roland Westrelin has updated the pu

Re: RFR: 8255150: Add utility methods to check long indexes and ranges [v6]

2020-11-13 Thread Roland Westrelin
ts improve > significantly. > > This change includes: > > - the API change > - the C2 intrinsic > - tests for the API and the C2 intrinsic > > This is a joint work with Paul who reviewed and reworked the API change > and filled the CSR. Roland Westrelin has updated the pu

Re: RFR: 8255150: Add utility methods to check long indexes and ranges [v5]

2020-11-13 Thread Roland Westrelin
ts improve > significantly. > > This change includes: > > - the API change > - the C2 intrinsic > - tests for the API and the C2 intrinsic > > This is a joint work with Paul who reviewed and reworked the API change > and filled the CSR. Roland Westrelin has updated t

Re: RFR: 8255150: Add utility methods to check long indexes and ranges [v3]

2020-11-13 Thread Roland Westrelin
On Sat, 7 Nov 2020 11:38:50 GMT, Vladimir Ivanov wrote: >> Roland Westrelin has refreshed the contents of this pull request, and >> previous commits have been removed. The incremental views will show >> differences compared to the previous content of the PR. > > Marked

Re: RFR: 8255150: Add utility methods to check long indexes and ranges [v3]

2020-11-09 Thread Roland Westrelin
On Sat, 7 Nov 2020 11:38:37 GMT, Vladimir Ivanov wrote: >> Roland Westrelin has refreshed the contents of this pull request, and >> previous commits have been removed. The incremental views will show >> differences compared to the previous content of the PR. > >

Re: RFR: 8255150: Add utility methods to check long indexes and ranges [v4]

2020-11-09 Thread Roland Westrelin
ts improve > significantly. > > This change includes: > > - the API change > - the C2 intrinsic > - tests for the API and the C2 intrinsic > > This is a joint work with Paul who reviewed and reworked the API change > and filled the CSR. Roland Westrelin has updated t

Re: RFR: 8255150: Add utility methods to check long indexes and ranges [v2]

2020-11-06 Thread Roland Westrelin
On Thu, 5 Nov 2020 23:59:43 GMT, Dean Long wrote: > C2 changes look good, except for new code block in > inline_preconditions_checkIndex could use a comment. Thanks for the review. I added a comment for this block and some other comments for the rest of this method. - PR: https:/

Re: RFR: 8255150: Add utility methods to check long indexes and ranges [v3]

2020-11-06 Thread Roland Westrelin
ts improve > significantly. > > This change includes: > > - the API change > - the C2 intrinsic > - tests for the API and the C2 intrinsic > > This is a joint work with Paul who reviewed and reworked the API change > and filled the CSR. Roland Westrelin has updated

Re: RFR: 8255150: Add utility methods to check long indexes and ranges [v2]

2020-11-06 Thread Roland Westrelin
On Fri, 6 Nov 2020 04:25:40 GMT, Dean Long wrote: >> src/hotspot/share/opto/library_call.cpp line 1015: >> >>> 1013: Deoptimization::Action_make_not_entrant); >>> 1014: } >>> 1015: >> >> A comment here explaining what the code below is doing would be helpful. > > This code

Re: RFR: 8255150: Add utility methods to check long indexes and ranges [v2]

2020-11-05 Thread Roland Westrelin
ts improve > significantly. > > This change includes: > > - the API change > - the C2 intrinsic > - tests for the API and the C2 intrinsic > > This is a joint work with Paul who reviewed and reworked the API change > and filled the CSR. Roland Westrelin has updated t

Re: RFR: 8255150: Add utility methods to check long indexes and ranges [v2]

2020-11-05 Thread Roland Westrelin
On Thu, 5 Nov 2020 11:58:43 GMT, Jorn Vernee wrote: > Although I'm not a 'Reviewer', I've done a pass over the code and left some > inline comments that I hope you find useful. Thanks for the review! All suggestions (except the exception message one that I commented on) look good to me. I appl

RFR: 8255150: Add utility methods to check long indexes and ranges

2020-11-02 Thread Roland Westrelin
This change add 3 new methods in Objects: public static long checkIndex(long index, long length) public static long checkFromToIndex(long fromIndex, long toIndex, long length) public static long checkFromIndexSize(long fromIndex, long size, long length) This mirrors the int utility methods that w

Re: RFR 8143628: Fork sun.misc.Unsafe and jdk.internal.misc.Unsafe native method tables

2015-12-09 Thread Roland Westrelin
> http://cr.openjdk.java.net/~psandoz/jdk9/JDK-8143628-unsafe-native-hotspot/ The hotspot changes look good to me. Roland.

Re: [9] RFR (M): 8079205: CallSite dependency tracking is broken after sun.misc.Cleaner became automatically cleared

2015-05-20 Thread Roland Westrelin
> What do you think about the following version: > http://cr.openjdk.java.net/~vlivanov/8079205/webrev.04 Still looks good to me. Roland.

Re: [9] RFR (M): 8079205: CallSite dependency tracking is broken after sun.misc.Cleaner became automatically cleared

2015-05-13 Thread Roland Westrelin
> http://cr.openjdk.java.net/~vlivanov/8079205/webrev.02/ The hotspot code looks good to me. Roland.

Re: [9] RFR (M): 8057967: CallSite dependency tracking scales devastatingly poorly

2015-04-15 Thread Roland Westrelin
> http://cr.openjdk.java.net/~vlivanov/8057967/webrev.01/ That looks good to me. Roland.

Re: [9] RFR (M): 8057967: CallSite dependency tracking scales devastatingly poorly

2015-04-15 Thread Roland Westrelin
Hi Vladimir, > http://cr.openjdk.java.net/~vlivanov/8057967/webrev.01/hotspot/ In ciCallSite::get_context(), is it safe to manipulate a raw oop the way you do it (with 2 different oops). Can’t it be moved concurrently by the GC? Roland. > http://cr.openjdk.java.net/~vlivanov/8057967/webrev.0

Re: Failing jdk testcase: java/lang/Math/WorstCaseTests.java

2012-06-11 Thread Roland Westrelin
> cc'ing Rroland Westrelin, as this may be caused by some of the changes in > hs24-b12. Note that jdk8/tl is only sync with b11 and that probably explains > why we aren't seeing them here. Yes, a change we made to speed up pow/exp calculation by relying on x86 fpu instructions broke this test.