RFR: 8303548: Arguments::get_default_shared_archive_path() should cache the result for future use

Matias Saavedra Silva matsaave at openjdk.org
Thu Mar 9 23:23:02 UTC 2023


The method `Arguments::get_default_shared_archive_path()` generates a string containing a path every time it is called. Since this method is idempotent, the string only needs to be constructed once in the lifetime of the VM. This change caches the result of `Arguments::get_default_shared_archive_path()` and ensures the path string is only generated once.

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

Commit messages:
 - 8303548: Arguments::get_default_shared_archive_path() should cache the result for future use

Changes: https://git.openjdk.org/jdk/pull/12963/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=12963&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8303548
  Stats: 21 lines in 3 files changed: 3 ins; 3 del; 15 mod
  Patch: https://git.openjdk.org/jdk/pull/12963.diff
  Fetch: git fetch https://git.openjdk.org/jdk pull/12963/head:pull/12963

PR: https://git.openjdk.org/jdk/pull/12963


More information about the hotspot-runtime-dev mailing list