Passing current fork number to profiler
Aleksey Shipilev
aleksey.shipilev at oracle.com
Wed Dec 3 12:13:17 UTC 2014
On 11/28/2014 03:12 AM, Aggelos Biboudis wrote:
> What do you think of the attached patch? Note, that the added field is not
> final.
I don't like BenchmarkParams becoming mutable. By construction,
BenchmarkParams is the immutable runtime configuration for the
benchmark. It should not hold the transient data, e.g. current fork ID.
If anything, another (new) object class should encapsulate all the
transient run info. A great refactoring lies that way: this object class
should also contain the current iteration ids, which forces us to
reconsider how the control flows through the harness. In current code,
iterations are handled not in the Runner, but in BenchmarkHandler, which
can be run solo in the forked VM.
Thanks,
-Aleksey.
More information about the jmh-dev
mailing list