openj9 icon indicating copy to clipboard operation
openj9 copied to clipboard

Remove unnecessary checks on String methods

Open IBMJimmyk opened this issue 1 month ago • 3 comments

Removes boundchks and nullchks for trusted String methods that will never trigger the checks. This includes:

AbstractStringBuilder.append AbstractStringBuilder.putStringAt AbstractStringBuilder.ensureCapacityInternal AbstractStringBuilder.inflateIfNeededFor StringBuilder.append String.substring StringLatin1.newString String.deduplicateStrings

The checks can be restored by setting the TR_DisableStringChkSkips envvar.

IBMJimmyk avatar Dec 09 '25 21:12 IBMJimmyk

@zl-wang Could you take a look at this when you get the chance?

IBMJimmyk avatar Dec 09 '25 21:12 IBMJimmyk

Jenkins test sanity plinux,xlinux,zlinux jdk8,jdk21

zl-wang avatar Dec 10 '25 16:12 zl-wang

Is it only null checks being skipped for these methods ? i.e. bound checks are not being skipped ?

vijaysun-omr avatar Dec 10 '25 23:12 vijaysun-omr

both pending and failure look like infrastructure issues (JITServer failing to set up on s390 and sanity.openjdk didn't run at all on x86 linux. Merging ...

zl-wang avatar Dec 11 '25 13:12 zl-wang

This list of methods didn't have any bound chks to begin with so it was only null chks being skipped this time.

IBMJimmyk avatar Dec 11 '25 14:12 IBMJimmyk