RFR: 8268829: Provide an optimized way to walk the stack with Class object only [v9]
Brent Christian
bchristi at openjdk.org
Wed Sep 6 21:38:43 UTC 2023
On Tue, 5 Sep 2023 17:52:44 GMT, Mandy Chung <mchung at openjdk.org> wrote:
>> test/micro/org/openjdk/bench/java/lang/StackWalkBench.java line 64:
>>
>>> 62: default -> throw new IllegalArgumentException(name);
>>> 63: };
>>> 64: }
>>
>> The previous `WALKER_DEFAULT` would not have retained the Class reference, but the new `default` will?
>
> Some benchmarks need the Class reference but some do not. For simplicity, use only walkers that retain Class reference so that all benchmarks can run with the default walker.
In my mind, a "default" StackWalker (obtained from no-arg`StackWalker.getInstance()`) does not retain the Class instance. I think this will be confusing when the "default" Param value is reported in JMH results.
I like running the benchmarks with both sets of StackWalker options, but I think the `default` Param value should be changed to something like, `class+methods`.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/15370#discussion_r1317859222
More information about the core-libs-dev
mailing list