RFR: 8255231: Avoid upcalls when initializing the statSampler [v3]

Claes Redestad redestad at openjdk.java.net
Sat Oct 24 12:29:05 UTC 2020


> 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.

Claes Redestad has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains 19 additional commits since the last revision:

 - Refactor to remove stable_java_property_counters and clarify comments
 - Merge branch 'master' into com_ns
 - Revert unrelated changes to perfData
 - Merge branch 'master' into com_ns
 - Improve comments
 - typo
 - Missing definition
 - Extract the shorthand java.version from VersionProps and use it in StatSampler
 - Improve assert
 - Assert on missing value
 - ... and 9 more: https://git.openjdk.java.net/jdk/compare/2d0f01eb...6e220227

-------------

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/802/files
  - new: https://git.openjdk.java.net/jdk/pull/802/files/5daedb01..6e220227

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=802&range=02
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=802&range=01-02

  Stats: 3039 lines in 175 files changed: 1182 ins; 1239 del; 618 mod
  Patch: https://git.openjdk.java.net/jdk/pull/802.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/802/head:pull/802

PR: https://git.openjdk.java.net/jdk/pull/802


More information about the hotspot-dev mailing list