RFR: 8285447: StackWalker minimal batch size should be optimized for getCallerClass [v4]

Mandy Chung mchung at openjdk.org
Mon Sep 11 17:52:56 UTC 2023


> Typically it will find the caller class at the second stack frame from the frame of executing `StackWalker::getCallerClass`.   The initial size of the buffer can be changed from 8 to 4 (the top 2 elements are reserved for implementation use).   If it fetches another batch, `getCallerClass` may be invoked via core reflection, so subsequent batches can be increased to a larger size.   This PR also moves the benchmark for `getCallerClass` in its own file because it does not need to test with different depth and can be separated from StackWalkBench.

Mandy Chung has updated the pull request incrementally with one additional commit since the last revision:

  cleanup

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/15642/files
  - new: https://git.openjdk.org/jdk/pull/15642/files/3df1ca13..b250597b

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=15642&range=03
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15642&range=02-03

  Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod
  Patch: https://git.openjdk.org/jdk/pull/15642.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/15642/head:pull/15642

PR: https://git.openjdk.org/jdk/pull/15642


More information about the core-libs-dev mailing list