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.
------------- Commit messages: - 8285447: StackWalker minimal batch size should be optimized for getCallerClass Changes: https://git.openjdk.org/jdk/pull/15642/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15642&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8285447 Stats: 75 lines in 3 files changed: 60 ins; 10 del; 5 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