Skip to content

Commit

Permalink
Enforce/Disable IProfiler during startup phase with -XX:[+/-]IProfile…
Browse files Browse the repository at this point in the history
…DuringStartupPhase

eclipse-openj9#1204

Added a new topic for the new option, XX:[+/-]IProfileDuringStartupPhase. Updated the What's new in version 0.42.0 topic and the yaml file.

Closes eclipse-openj9#1204
Signed-off-by: Sreekala Gopakumar <[email protected]>
  • Loading branch information
Sreekala-Gopakumar committed Dec 7, 2023
1 parent 63f7c19 commit 2093946
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 0 deletions.
5 changes: 5 additions & 0 deletions docs/version0.42.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ The following new features and notable changes since version 0.41.0 are included
- [New binaries and changes to supported environments](#binaries-and-supported-environments)
- ![Start of content that applies to Java 21 (LTS) and later](cr/java21plus.png) [OpenJ9 `jextract` removed](#openj9-jextract-removed) ![End of content that applies to Java 21 (LTS) and later](cr/java_close_lts.png)
- [Change in the `System.gc()` call behavior](#change-in-the-systemgc-call-behavior)
- [New `-XX:[+|-]IProfileDuringStartupPhase` option added](#new-xx-iprofileduringstartupphase-option-added)
- ![Start of content that applies to Java 21 (LTS) and later](cr/java21plus.png) [New JDK 21 features](#new-jdk-21-features) ![End of content that applies to Java 21 (LTS) and later](cr/java_close_lts.png)

## Features and changes
Expand All @@ -52,6 +53,10 @@ Now, the `System.gc()` call triggers the GC cycle twice internally to clear the

For more information, see [Garbage collection](gc_overview.md).

### New `-XX:[+|-]IProfileDuringStartupPhase` option added

I-Profiler collects profiling information at the time of JIT compilation. The I-Profiler uses an algorithm to decide whether to collect the information or not during a VM startup. You can overrule the algorithm result and control the collection of the profiling information during the startup phase by using the [`-XX:[+|-]IProfileDuringStartupPhase`](xxiprofileduringstartupphase.md) option.

### ![Start of content that applies to Java 21 plus](cr/java21plus.png) New JDK 21 features

The following features are supported by OpenJ9:
Expand Down
49 changes: 49 additions & 0 deletions docs/xxiprofileduringstartupphase.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<!--
* Copyright (c) 2017, 2023 IBM Corp. and others
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution and is available at
* https://www.eclipse.org/legal/epl-2.0/ or the Apache
* License, Version 2.0 which accompanies this distribution and
* is available at https://www.apache.org/licenses/LICENSE-2.0.
*
* This Source Code may also be made available under the
* following Secondary Licenses when the conditions for such
* availability set forth in the Eclipse Public License, v. 2.0
* are satisfied: GNU General Public License, version 2 with
* the GNU Classpath Exception [1] and GNU General Public
* License, version 2 with the OpenJDK Assembly Exception [2].
*
* [1] https://www.gnu.org/software/classpath/license.html
* [2] https://openjdk.org/legal/assembly-exception.html
*
* SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0 OR GPL-2.0-only WITH OpenJDK-assembly-exception-1.0
-->

# -XX:[+|-]IProfileDuringStartupPhase

This option enables or disables the I-Profiler data collection of the profiling information during a VM startup.

## Syntax

-XX:[+|-]IProfileDuringStartupPhase

| Setting | Effect |
|----------------------------------|---------|
|`-XX:+IProfileDuringStartupPhase` | Enable |
|`-XX:-IProfileDuringStartupPhase` | Disable |

## Explanation

I-Profiler collects profiling information that is used to optimize methods at the time of JIT compilation. This interpreter profiling data is stored in the shared classes cache and improves the VM startup time. I-Profiler uses an algorithm that includes the shared classes cache properties to decide whether to collect the information or not during a VM startup. You can overrule the algorithm result and control the collection of the profiling information during the startup phase by using the `-XX:[+|-]IProfileDuringStartupPhase` option.

- If the `-XX:+IProfileDuringStartupPhase` option is specified, the VM collects the I-Profiler information during startup. Use this option to collect the latest profiling information for optimizing the methods and storing the information in the shared classes cache. By using this option, the optimization levels of methods might increase but might affect performance in the startup phase.
- If the `-XX:-IProfileDuringStartupPhase` option is specified, the VM does not collect the I-Profiler information during startup. Use this option if the shared classes cache already has the I-Profiler information and therefore, you don't have to collect the new information and affect performance.

## See also

- [The JIT compiler](jit.md)


<!-- ==== END OF TOPIC ==== xxiprofileduringstartupphase.md ==== -->
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,7 @@ nav:
- "-XX:InitialRAMPercentage" : xxinitialrampercentage.md
- "-XX:InitialHeapSize" : xxinitialheapsize.md
- "-XX:[+|-]InterleaveMemory" : xxinterleavememory.md
- "-XX:[+|-]IProfileDuringStartupPhase" : xxiprofileduringstartupphase.md
- "-XX:[+|-]JITInlineWatches" : xxjitinlinewatches.md
- "-XX:JITServerAddress" : xxjitserveraddress.md
- "-XX:JITServerAOTCacheDir" : xxjitserveraotcachedir.md
Expand Down

0 comments on commit 2093946

Please sign in to comment.