RFR: 8316305: Initial buffer size of StackWalker is too small caused by JDK-8285447

Brent Christian bchristi at openjdk.org
Thu Sep 14 21:28:39 UTC 2023


On Thu, 14 Sep 2023 21:15:48 GMT, Mandy Chung <mchung at openjdk.org> wrote:

>> src/java.base/share/classes/java/lang/StackStreamFactory.java line 544:
>> 
>>> 542:                 return walker.estimateDepth() == 0
>>> 543:                         ? SMALL_BATCH
>>> 544:                         : Math.min(walker.estimateDepth() + RESERVED_ELEMENTS, LARGE_BATCH_SIZE);
>> 
>> Without the
>> `Math.max(walker.estimateDepth()+RESERVED_ELEMENTS, MIN_BATCH_SIZE)`
>> for estimateDepth = 1, I believe this will now return 2, where previously it returned 3.
>> Is that OK?
>
> yes as it's asked by the user.  It will fetch the second batch if it walks more than 1 frame.

Sounds good, thanks

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/15749#discussion_r1326532469


More information about the core-libs-dev mailing list