Integrated: 8255231: Avoid upcalls when initializing the statSampler

Claes Redestad redestad at openjdk.java.net
Tue Oct 27 10:38:28 UTC 2020


On Thu, 22 Oct 2020 10:11:31 GMT, Claes Redestad <redestad at 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 <redestad at 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


More information about the core-libs-dev mailing list