Skip to content

Commit

Permalink
Merge pull request #1462 from Sreekala-Gopakumar/1433StartupHint
Browse files Browse the repository at this point in the history
New CML option to adjust storage of extra startup hints
  • Loading branch information
pshipton authored Dec 19, 2024
2 parents c8c5e14 + 54a97de commit d4d5bc6
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
7 changes: 7 additions & 0 deletions docs/version0.49.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ The following new features and notable changes since version 0.48.0 are included

- [New binaries and changes to supported environments](#binaries-and-supported-environments)
- [Change to the shared classes cache generation number](#change-to-the-shared-classes-cache-generation-number)
- [New shared classes cache suboption added to adjust the number of startup hints that can be stored](#new-shared-classes-cache-suboption-added-to-adjust-the-number-of-startup-hints-that-can-be-stored)

## Features and changes

Expand All @@ -46,6 +47,12 @@ To save space, all existing shared caches can be removed unless they are in use

The shared classes cache generation number is modified because of a change in the format of ROMClasses that are stored in the shared classes cache. A new flag `J9AccClassIsShared` is added to ROMClasses to indicate whether a ROMClass was loaded from a shared classes cache or from a VM.

### New shared classes cache suboption added to adjust the number of startup hints that can be stored

You can use the `-Xshareclasses:extraStartupHints=<number>` option to adjust the number of startup hints that can be stored in a shared cache. By default, you can store only up to 64 startup hints in a shared cache.

For more information, see [`-Xshareclasses:extraStartupHints`](xshareclasses.md#extrastartuphints).

## Known problems and full release information

To see known problems and a complete list of changes between Eclipse OpenJ9 v0.48.0 and v0.49.0 releases, see the [Release notes](https://github.com/eclipse-openj9/openj9/blob/master/doc/release-notes/0.49/0.49.md).
Expand Down
16 changes: 16 additions & 0 deletions docs/xshareclasses.md
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,16 @@ case, the VM continues without using shared classes.

: Destroys all caches that are unused for the time that is specified before loading shared classes. This option is not a utility option because it does not cause the VM to exit. On Windows systems, which have NTFS file systems, the `expire` option is accurate to the nearest hour.

### `extraStartupHints`

-Xshareclasses:extraStartupHints=<number>

: where, `<number>` is greater than or equal to 0.

: Adjusts the number of startup hints that can be stored in a shared cache. By default, you can store only up to 64 startup hints in a shared cache. This count decrements by 1 each time a startup hint is stored. After the count reaches 0, no more hints can be added to the cache. You can use `-Xshareclasses:extraStartupHints=<number>` to adjust this count as needed. For example, `-Xshareclasses:extraStartupHints=0` prevents any new hints to be stored and `-Xshareclasses:extraStartupHints=10` allows 10 more new hints in addition to the default number of 64 startup hints.

: You can use [`-Xshareclasses:printStats=startuphint`](#printstats-cache-utility) to check how many startup hints are already stored in the shared cache. You can also use [`-Xshareclasses:printDetails`](#printdetails-cache-utility) to check how many hints in addition to the default startup hints can be stored in the cache. In the output of the `printDetails` suboption, the number of extra startup hints that can be stored is found on the line `# Additional startup hints allowed`.

### `fatal`

-Xshareclasses:fatal
Expand Down Expand Up @@ -466,6 +476,12 @@ behavior, which can improve the performance of class loading from the shared cla

: Displays detailed information about the contents of the cache that is specified in the [`name`](#name) suboption. If the name is not specified, statistics are displayed about the default cache. For layered caches, information is shown for all layers (to see information for the top layer cache only, use [`printTopLayerStats=all`](#printtoplayerstats-cache-utility)). Every class is listed in chronological order with a reference to the location from which it was loaded. For more information, see [Shared classes cache diagnostic utilities](shrc_diag_util.md#shared-classes-cache-diagnostic-utilities).

### `printDetails` (Cache utility)

-Xshareclasses:printDetails

: Displays detailed cache statistics. The output of this suboption is similar to the output of [`-Xshareclasses:printStats`](#printstats-cache-utility) but with additional information. For example, instead of "AOT bytes" which is a total, the output shows "AOT code bytes", "AOT data bytes", "AOT class hierarchy bytes", and "AOT thunk bytes".

### `printStats` (Cache utility)

-Xshareclasses:printStats=<data_type>[+<data_type>]
Expand Down

0 comments on commit d4d5bc6

Please sign in to comment.