On Thu, 22 Oct 2020 10:11:31 GMT, Claes Redestad <redes...@openjdk.org> wrote:
> Current implementation of the statSampler does upcalls to System.getProperty > to collect values for a number of properties that are all provided by the VM > itself. And since the sampling starts before any user code run then no > property can have changed. > > I suggest refactoring the code so that no upcalls are made normally - while > asserting this invariant holds using assert-only upcalls. > > This is a small startup optimization - reducing the startup sequence by > approx. 300k instructions and 70k branches in my linux-x64 setup. This pull request has now been integrated. Changeset: f7c59c66 Author: Claes Redestad <redes...@openjdk.org> URL: https://git.openjdk.java.net/jdk/commit/f7c59c66 Stats: 136 lines in 7 files changed: 51 ins; 41 del; 44 mod 8255231: Avoid upcalls when initializing the statSampler Reviewed-by: iklam, dholmes ------------- PR: https://git.openjdk.java.net/jdk/pull/802