Skip to content

Features Contributed by SAP

Volker Simonis edited this page Jan 11, 2019 · 126 revisions

This page lists features of SapMachine that were crafted by SAP to enhance the enterprise-readiness of SapMachine. In general, we contribute these directly upstream to OpenJDK. We might downport these to an earlier version of SapMachine, though. If a feature is not accepted by the OpenJDK community, but considered essential by us, it might only appear in SapMachine. This listing omits bug fixes, work on our platform ports, work on the build and test infrastructure etc. we do directly in OpenJDK.

Functional Improvements

Memory Management

Metaspace

The Metaspace memory region contains metadata for loaded java classes. It can get abnormally large and is a common cause for high memory footprint and Java OOMs, especially when running programs with many class loaders (e.g. JEE), lots of reflection or lambdas.

SAP did significant work in improving the Metaspace allocator. We greatly reduced its memory footprint and made it more predictable. Additionally, we contributed a large number of smaller fixes and improvements.

OpenJDK SapMachine
8198423: Improve metaspace chunk allocation 11 11

Java in Containers

Applications run in Containers or the Cloud need to be optimized for small footprint.

OpenJDK SapMachine
8198510: Enable UseDynamicNumberOfGCThreads by default
We saw the VM starting too many GC threads.
11 11
8198756: Lazy allocation of compiler threads
We saw the VM starting too many compiler threads.
11 11
8213086: Compiler thread creation should be bounded by available space in memory and Code Cache
We saw the VM starting too many compiler threads.
11.0.3 11.0.2
8196062: Enable docker container related tests for linux ppc64le
This also needed some functional improvements.
11 11
8197412: Enable docker container related tests for linux s390x 11 11

Files and Network

OpenJDK SapMachine
8170868: DefaultProxySelector should use system defaults on Windows, MacOS and Gnome 9 9
8213082: (zipfs) Add support for POSIX file permissions 13?? 11.0.2

Threads and Stack sizes

OpenJDK SapMachine
8215962: Support ThreadPriorityPolicy mode 1 for non-root users on linux/bsd 13 11.0.2

Configuring stack sizes used to depend strongly on the system page size and was optimized for 4K pages. We made stack configuration less dependent on the page size wrt. overflow detection and minimal stack sizes.

OpenJDK SapMachine
8170655: [posix] Fix minimum stack size computations 10 10
8139864: Improve handling of stack protection zones. 10 10

Exception messages

Many exceptions thrown in OpenJDK 10 and earlier don't give detailed information about the underlying problem, although it's known when the exception is thrown. We improve these messages step by step.

OpenJDK SapMachine
8197405: Improve messages of AbstractMethodErrors and IncompatibleClassChangeErrors. 11 10
8204268: Improve some IncompatibleClassChangeError messages. 11 11
8199852: Print more information about class loaders in LinkageErrors. 11 11
8201593: Print array length in ArrayIndexOutOfBoundsException. 11 11
8203881: Print erroneous size in NegativeArraySizeException 11 11
8199940: Print more information about class loaders in IllegalAccessErrors 11 11
8204943: Improve message of ArrayStoreException. 11 11
8205525: Improve exception messages during manifest parsing of jar archives. 12 12
12 12

Servicability Extensions

Debugging on Demand

SAP JVM was known for its debugging on demand. This means you could attach at any time to an application running on SAP JVM and start debugging it. We want to enhance OpenJDK with similar features.

OpenJDK SapMachine
8214892: Delayed starting of debugging via jcmd 11.0.3 11.0.2
These changes improve the VM performance if debugging is enabled:
8214352: C1: Unnecessary "compilation bailout: block join failed" with JVMTI 13 11.0.2

Jcmd improvements

Jcmd allows to request information from a running Java VM. SAP JVM knows similar tools. We add the commands known in the SAP JVM tools to Jcmd.

OpenJDK SapMachine
8189864: Provide an ascii map to visualize metaspace fragmentation 10 10
8198691: CodeHeap State Analytics
Print information about the memory containing Java methods compiled to native code.
11 11
8198553: jcmd: separate Metaspace statistics from NMT
Introduces new command VM.metaspace.
11 11
8201572: Improve Metaspace Statistics 11 11
8203219: VM.metaspace jcmd should optionally show loaded classes for loaders 11 11
8203455: jcmd: VM.metaspace: print loader name for anonymous CLDs 11 11
8203682: Add jcmd "VM.classloaders" command to print out class loader hierarchy, details 11 11
8200720: Print additional information in thread dump (times, allocated bytes etc.) 11 11
8203682: Add jcmd "VM.classloaders" command to print out class loader hierarchy, details 11 11
8203343: VM.{metaspace|classloaders|classhierarchy...} jcmd should show invocation targets for Generated{Method|Constructor}AccessorImpl classes 11 11

Java Flight Recorder (JFR)

We will improve Java Flight Recorder and Mission Control as a replacement of SAP JVM Profiler.

OpenJDK SapMachine
8207392: [PPC64] Implement JFR profiling. 11 11
8211768: [s390] Implement JFR profiling. 11.0.2 11.0.2

Retaining information in case of a crash / hs_err file

If OpenJdk crashes, it writes a collection of basic information into a file named hs-err_<process id>.log. This information is very useful to analyze the crash post-mortem. We enrich this printout with information we found useful for SAP JVM support.

OpenJDK SapMachine
8191101: Show register content in hs-err file on assert 11 11
8203292: Print complete set of flags in the hs_err file 11 11
8202427: Enhance os::print_memory_info on Windows 11 11
8204476: Add additional statistics to CodeCache::print_summary 11 11
8204477: Count linkage errors and print in Exceptions::print_exception_counts_on_error 11 11
8204598: Add more thread-related system settings info to hs_error file on Linux 11 11
8210964: Add more ld preloading info to hs_error file on Linux 11.0.2 11.0.2
8211852: Inspect stack during error reporting Besides this functional improvement, we contributed 8210754 to make printing register content more reliable. 11.0.2 11.0.2

Other

OpenJDK SapMachine
8204539: improve error messages in matchJavaTZ [windows] 11 11

Documentation

We improve the documentation, be it Javadoc, the tools etc.

OpenJDK SapMachine
8200384: jcmd help output should be sorted 11 11
8189102: All tools should support -?, -h and --help 11 11
8203014: jcmd should output command list if no command is given 11 11

Clone this wiki locally