Skip to content

Commit

Permalink
Add option to toggle Extended HCR capability
Browse files Browse the repository at this point in the history
#1352

New option -XX:[+|-]EnableExtendedHCR added.

Closes #1352
Signed-off-by: Sreekala Gopakumar <[email protected]>
  • Loading branch information
Sreekala-Gopakumar committed Jun 26, 2024
1 parent 5a22101 commit cfbdb15
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 0 deletions.
7 changes: 7 additions & 0 deletions docs/version0.46.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ The following new features and notable changes since version 0.45.0 are included
- [MD5 message digest algorithm support for OpenSSL](#md5-message-digest-algorithm-support-for-openssl)
- [Support added for the `com.sun.management.ThreadMXBean.getTotalThreadAllocatedBytes()` API](#support-added-for-the-comsunmanagementthreadmxbeangettotalthreadallocatedbytes-api)
- [The JITServer AOT caching feature enabled by default at the JITServer server](#the-jitserver-aot-caching-feature-enabled-by-default-at-the-jitserver-server)
- [New `-XX:[+|-]EnableExtendedHCR` option added](#new-xx-enableextendedhcr-option-added)

## Features and changes

Expand Down Expand Up @@ -56,6 +57,12 @@ Although this option is by default enabled at the server, it is still disabled f

For more information, see [ `-XX:[+|-]JITServerUseAOTCache`](xxjitserveruseaotcache.md).

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

By default, the extended Hot Code Replace (HCR) capability in the VM is disabled for all OpenJDK versions. You can enable or disable the HCR capability by using the [`-XX:[+|-]EnableExtendedHCR`](xxenableextendedhcr.md) option.

The extended HCR feature is deprecated in this release and will be removed in a future release. From OpenJDK 25 onwards, extended HCR will not be supported. Following that, the extended HCR support will be removed from other earlier OpenJDK versions also.

## Known problems and full release information

To see known problems and a complete list of changes between Eclipse OpenJ9 v0.45.0 and v0.46.0 releases, see the [Release notes](https://github.com/eclipse-openj9/openj9/blob/master/doc/release-notes/0.46/0.46.md).
Expand Down
52 changes: 52 additions & 0 deletions docs/xxenableextendedhcr.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<!--
* Copyright (c) 2017, 2024 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:[+|-]EnableExtendedHCR

This option enables or disables the extended Hot Code Replace (HCR) capability in the VM.

## Syntax

-XX:[+|-]EnableExtendedHCR

| Setting | Effect | Default |
|-----------------------|---------|:----------------------------------------------------------------------------------:|
| `-XX:+EnableExtendedHCR` | Enable | |
| `-XX:-EnableExtendedHCR` | Disable | :fontawesome-solid-check:{: .yes aria-hidden="true"}<span class="sr-only">yes</span> |

## Explanation

Supporting extended HCR has a maintenance cost and because only few users use this capability, the extended HCR feature is deprecated and will be removed in a future release. From OpenJDK 25 onwards, extended HCR will not be supported. Following that, the extended HCR support will be removed from other earlier OpenJDK versions also.

If the extended HCR support is disabled (`-XX:-EnableExtendedHCR`), it might result in a JVMTI failure. In case of such a failure, the following warning message is displayed:

```
Warning: Extended HCR is disabled, enable with -XX:+EnableExtendedHCR. This feature is deprecated. In the future, the extended HCR capability, and the option to enable it, will be completely removed from all versions.
```

## See also

- [What's new in version 0.46.0](version0.46.md#new-xx-enableextendedhcr-option-added)


<!-- ==== END OF TOPIC ==== xxenableextendedhcr.md ==== -->

0 comments on commit cfbdb15

Please sign in to comment.