Skip to content

Commit

Permalink
Merge branch 'sapmachine21' into pr-jdk-21.0.4+2
Browse files Browse the repository at this point in the history
  • Loading branch information
RealCLanger committed May 9, 2024
2 parents 93d091a + 1e8f70d commit 3ad1c1d
Show file tree
Hide file tree
Showing 109 changed files with 17,364 additions and 72 deletions.
9 changes: 5 additions & 4 deletions .github/actions/upload-bundles/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,11 @@ runs:
id: bundles
run: |
# Rename bundles to consistent names
jdk_bundle_zip="$(ls build/*/bundles/jdk-*_bin${{ inputs.debug-suffix }}.zip 2> /dev/null || true)"
jdk_bundle_tar_gz="$(ls build/*/bundles/jdk-*_bin${{ inputs.debug-suffix }}.tar.gz 2> /dev/null || true)"
symbols_bundle="$(ls build/*/bundles/jdk-*_bin${{ inputs.debug-suffix }}-symbols.tar.gz 2> /dev/null || true)"
tests_bundle="$(ls build/*/bundles/jdk-*_bin-tests${{ inputs.debug-suffix }}.tar.gz 2> /dev/null || true)"
# SapMachine 2020-11-04: Adapt bundle names
jdk_bundle_zip="$(ls build/*/bundles/sapmachine-jdk-*_bin${{ inputs.debug-suffix }}.zip 2> /dev/null || true)"
jdk_bundle_tar_gz="$(ls build/*/bundles/sapmachine-jdk-*_bin${{ inputs.debug-suffix }}.tar.gz 2> /dev/null || true)"
symbols_bundle="$(ls build/*/bundles/sapmachine-jdk-*_bin${{ inputs.debug-suffix }}-symbols.tar.gz 2> /dev/null || true)"
tests_bundle="$(ls build/*/bundles/sapmachine-jdk-*_bin-tests${{ inputs.debug-suffix }}.tar.gz 2> /dev/null || true)"
mkdir bundles
Expand Down
4 changes: 4 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
The description of this pull request goes here.

fixes #Issue

19 changes: 14 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,18 @@
# questions.
#

name: 'OpenJDK GHA Sanity Checks'
# SapMachine 2022-06-22: Change the name of the GitHub Action
name: 'SapMachine GHA Sanity Checks'

on:
push:
branches-ignore:
- master
- pr/*
# SapMachine 2020-11-04: Ignore sapmachine branch
- sapmachine21
# SapMachine 2020-11-04: Trigger on pull request
pull_request:
branches:
- sapmachine21
workflow_dispatch:
inputs:
platforms:
Expand All @@ -55,6 +60,8 @@ jobs:

select:
name: 'Select platforms'
# SapMachine 2022-06-23: On 'pull_request' we only want to run GHA if the PR comes from a remote repo. Otherwise we have the run on 'push' already as a check.
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name }}
runs-on: ubuntu-22.04
outputs:
linux-x64: ${{ steps.include.outputs.linux-x64 }}
Expand All @@ -80,7 +87,8 @@ jobs:
function check_platform() {
if [[ $GITHUB_EVENT_NAME == workflow_dispatch ]]; then
input='${{ github.event.inputs.platforms }}'
elif [[ $GITHUB_EVENT_NAME == push ]]; then
# SapMachine 2022-06-24: Also handle 'pull_request' event.
elif [[ $GITHUB_EVENT_NAME == push ]] || [[ $GITHUB_EVENT_NAME == pull_request ]]; then
if [[ '${{ !secrets.JDK_SUBMIT_FILTER || startsWith(github.ref, 'refs/heads/submit/') }}' == 'false' ]]; then
# If JDK_SUBMIT_FILTER is set, and this is not a "submit/" branch, don't run anything
>&2 echo 'JDK_SUBMIT_FILTER is set and not a "submit/" branch'
Expand Down Expand Up @@ -343,7 +351,8 @@ jobs:
remove-bundles:
name: 'Remove bundle artifacts'
runs-on: ubuntu-22.04
if: always()
# SapMachine 2022-06-23: On 'pull_request' we only want to run GHA if the PR comes from a remote repo. Otherwise we have the run on 'push' already as a check.
if: ${{ github.event_name != 'pull_request' || github.repository != 'SAP/SapMachine' }}
needs:
- build-linux-x64
- build-linux-x86
Expand Down
52 changes: 43 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,46 @@
# Welcome to the JDK!
[![GitHub release (latest by date)](https://img.shields.io/github/downloads/sap/sapmachine/latest/total?label=Downloads%20of%20Latest%20Release)](https://sap.github.io/SapMachine/#download) [![DockerPulls](https://img.shields.io/docker/pulls/_/sapmachine?label=Docker%20Pulls)](https://hub.docker.com/_/sapmachine)

For build instructions please see the
[online documentation](https://openjdk.org/groups/build/doc/building.html),
or either of these files:
<img align="right" width=350 src="https://sap.github.io/SapMachine/assets/images/logo_circular.svg">

- [doc/building.html](doc/building.html) (html version)
- [doc/building.md](doc/building.md) (markdown version)
# [](#SapMachine) SapMachine
This project contains a downstream version of the [OpenJDK](http://openjdk.java.net/) project. It is used to build and maintain a SAP supported version of OpenJDK for SAP customers and partners who wish to use OpenJDK to run their applications.

See <https://openjdk.org/> for more information about the OpenJDK
Community and the JDK and see <https://bugs.openjdk.org> for JDK issue
tracking.
We want to stress that this is clearly a "*friendly fork*". SAP is committed to ensuring the continued success of the Java platform. SAP is:

* A member of the [JCP Executive committee](https://jcp.org/en/participation/committee) since 2001 and recently served in the [JSR 379 (Java SE 9)](https://www.jcp.org/en/jsr/detail?id=379), [JSR 383 (Java SE 18.3)](https://www.jcp.org/en/jsr/detail?id=383), [JSR 384 (Java SE 11)](https://www.jcp.org/en/jsr/detail?id=384), [JSR 386 (Java SE 12)](https://www.jcp.org/en/jsr/detail?id=386), [JSR 388 (Java SE 13)](https://www.jcp.org/en/jsr/detail?id=388), [JSR 389 (Java SE 14)](https://www.jcp.org/en/jsr/detail?id=389), [JSR 390 (Java SE 15)](https://www.jcp.org/en/jsr/detail?id=390), [JSR 391 (Java SE 16)](https://www.jcp.org/en/jsr/detail?id=391), [JSR 392 (Java SE 17)](https://www.jcp.org/en/jsr/detail?id=392), [JSR 393 (Java SE 18)](https://www.jcp.org/en/jsr/detail?id=393), [JSR 394 (Java SE 19)](https://www.jcp.org/en/jsr/detail?id=394) and [JSR 395 (Java SE 20)](https://www.jcp.org/en/jsr/detail?id=395) Expert Groups.

* Among the biggest external contributors to the OpenJDK project (see fix ratio for [Java 11](https://blogs.oracle.com/java-platform-group/building-jdk-11-together), [12](https://blogs.oracle.com/java-platform-group/the-arrival-of-java-12), [13](https://blogs.oracle.com/java-platform-group/the-arrival-of-java-13), [14](https://blogs.oracle.com/java-platform-group/the-arrival-of-java-14), [15](https://blogs.oracle.com/java-platform-group/the-arrival-of-java-15), [16](https://inside.java/2021/03/16/the-arrival-of-java16/), [17](https://inside.java/2021/09/14/the-arrival-of-java17/), [18](https://inside.java/2022/03/22/the-arrival-of-java18/), [19](https://inside.java/2022/09/20/the-arrival-of-java-19/)).

* Leading the [OpenJDK 17 updates project](https://wiki.openjdk.java.net/display/JDKUpdates/JDK+17u) and heavily supporting the [OpenJDK 11 updates project](https://wiki.openjdk.java.net/display/JDKUpdates/JDK11u).

* Leading the [PowerPC/AIX porting project](http://openjdk.java.net/projects/ppc-aix-port/).

* Contributing as many of our features as possible to the OpenJDK project and keep the diff of this project as small as possible.


## Downloads

Check out the [Download](https://sap.github.io/SapMachine/#download) section on [https://sapmachine.io](https://sapmachine.io).

## Documentation
Check out our [FAQ's](https://github.com/SAP/SapMachine/wiki/Frequently-Asked-Questions) and [wikipages](https://github.com/SAP/SapMachine/wiki) for information about:
* [Installation](https://github.com/SAP/SapMachine/wiki/Installation) and [Docker Images](https://github.com/SAP/SapMachine/wiki/Docker-Images)
* [Certifications and Java Compatibility](https://github.com/SAP/SapMachine/wiki/Certification-and-Java-Compatibility)
* [SapMachine Development Process](https://github.com/SAP/SapMachine/wiki/SapMachine-Development-Process)

## Have an issue?
If it's SapMachine specific please let us know by filing a [new issue](https://github.com/SAP/SapMachine/issues/new).

Please notice that the SapMachine [issue tracker](https://github.com/SAP/SapMachine/issues) is mainly used internally by the SapMachine team to organize its work (i.e. sync with upstream, downporting fixes, add SapMachine specific features, etc.).

General VM/JDK bugs are maintained directly in the [OpenJDK Bug System](https://bugs.openjdk.java.net/). You can open a SapMachine issue with a reference to an open or resolved OpenJDK bug if you want us to resolve the issue or downport the fix to a specific SapMachine version. If you find a general VM/JDK bug in SapMachine and don't have write access to the OpenJDK Bug System you can open an issue here and we'll take care to open a corresponding OpenJDK bug for it.

Every SapMachine release contains at least all the fixes of the corresponding OpenJDK release it is based on. You can easily find the OpenJDK base version by looking at the [SapMachine version string](https://github.com/SAP/SapMachine/wiki/Differences-between-SapMachine-and-OpenJDK#version-numbers).

You can find the [Differences between SapMachine and OpenJDK](https://github.com/SAP/SapMachine/wiki/Differences-between-SapMachine-and-OpenJDK) and the [Features Contributed by SAP](https://github.com/SAP/SapMachine/wiki/Features-Contributed-by-SAP) in the [SapMachine Wiki](https://github.com/SAP/SapMachine/wiki).

## Contributing
We currently do not accept external contributions for this project. If you want to improve the code or fix a bug please consider contributing directly to the upstream [OpenJDK](http://openjdk.java.net/contribute/) project. Our repositories will be regularly synced with the upstream project so any improvements in the upstream OpenJDK project will directly become visible in our project as well.

## License
This project is run under the same licensing terms as the upstream OpenJDK project. Please see the [LICENSE](LICENSE) file in the top-level directory for more information.
4 changes: 2 additions & 2 deletions make/Bundles.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,8 @@ ifeq ($(call isTargetOs, macosx)+$(DEBUG_LEVEL), true+release)
else
JDK_IMAGE_HOMEDIR := $(JDK_IMAGE_DIR)
JRE_IMAGE_HOMEDIR := $(JRE_IMAGE_DIR)
JDK_BUNDLE_SUBDIR := jdk-$(VERSION_NUMBER)
JRE_BUNDLE_SUBDIR := jre-$(VERSION_NUMBER)
JDK_BUNDLE_SUBDIR := sapmachine-jdk-$(VERSION_NUMBER)
JRE_BUNDLE_SUBDIR := sapmachine-jre-$(VERSION_NUMBER)
ifneq ($(DEBUG_LEVEL), release)
JDK_BUNDLE_SUBDIR := $(JDK_BUNDLE_SUBDIR)/$(DEBUG_LEVEL)
JRE_BUNDLE_SUBDIR := $(JRE_BUNDLE_SUBDIR)/$(DEBUG_LEVEL)
Expand Down
3 changes: 2 additions & 1 deletion make/Images.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,9 @@ ALL_MODULES := $(call FindAllModules)

$(eval $(call ReadImportMetaData))

# SapMachine 2021-09-24: add jcmd to JRE
JRE_MODULES += $(filter $(ALL_MODULES), $(BOOT_MODULES) \
$(PLATFORM_MODULES) jdk.jdwp.agent)
$(PLATFORM_MODULES) jdk.jdwp.agent jdk.jcmd)
JDK_MODULES += $(ALL_MODULES)

JRE_MODULES_LIST := $(call CommaList, $(JRE_MODULES))
Expand Down
7 changes: 6 additions & 1 deletion make/MacBundles.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,12 @@ ifeq ($(call isTargetOs, macosx), true)

MACOSX_PLIST_SRC := $(TOPDIR)/make/data/bundle

BUNDLE_NAME := $(MACOSX_BUNDLE_NAME_BASE) $(VERSION_SHORT)
# SapMachine 2023-06-24: ea bundles should have build number in CFBundleName
ifeq ($(VERSION_PRE), ea)
BUNDLE_NAME := $(MACOSX_BUNDLE_NAME_BASE) $(VERSION_STRING)
else
BUNDLE_NAME := $(MACOSX_BUNDLE_NAME_BASE) $(VERSION_SHORT)
endif
BUNDLE_INFO := $(MACOSX_BUNDLE_NAME_BASE) $(VERSION_STRING)
ifeq ($(COMPANY_NAME), N/A)
BUNDLE_VENDOR := UNDEFINED
Expand Down
30 changes: 15 additions & 15 deletions make/autoconf/spec.gmk.in
Original file line number Diff line number Diff line change
Expand Up @@ -939,16 +939,16 @@ GRAAL_BUILDER_IMAGE_SUBDIR := graal-builder-jdk
GRAAL_BUILDER_IMAGE_DIR := $(IMAGES_OUTPUTDIR)/$(GRAAL_BUILDER_IMAGE_SUBDIR)

# Macosx bundles directory definitions
JDK_MACOSX_BUNDLE_SUBDIR=jdk-bundle
JRE_MACOSX_BUNDLE_SUBDIR=jre-bundle
JDK_MACOSX_BUNDLE_SUBDIR_SIGNED=jdk-bundle-signed
JRE_MACOSX_BUNDLE_SUBDIR_SIGNED=jre-bundle-signed
JDK_MACOSX_BUNDLE_SUBDIR=sapmachine-jdk-bundle
JRE_MACOSX_BUNDLE_SUBDIR=sapmachine-jre-bundle
JDK_MACOSX_BUNDLE_SUBDIR_SIGNED=sapmachine-jdk-bundle-signed
JRE_MACOSX_BUNDLE_SUBDIR_SIGNED=sapmachine-jre-bundle-signed
JDK_MACOSX_BUNDLE_DIR=$(IMAGES_OUTPUTDIR)/$(JDK_MACOSX_BUNDLE_SUBDIR)
JRE_MACOSX_BUNDLE_DIR=$(IMAGES_OUTPUTDIR)/$(JRE_MACOSX_BUNDLE_SUBDIR)
JDK_MACOSX_BUNDLE_DIR_SIGNED=$(IMAGES_OUTPUTDIR)/$(JDK_MACOSX_BUNDLE_SUBDIR_SIGNED)
JRE_MACOSX_BUNDLE_DIR_SIGNED=$(IMAGES_OUTPUTDIR)/$(JRE_MACOSX_BUNDLE_SUBDIR_SIGNED)
JDK_MACOSX_BUNDLE_TOP_DIR=jdk-$(VERSION_NUMBER).jdk
JRE_MACOSX_BUNDLE_TOP_DIR=jre-$(VERSION_NUMBER).jre
JDK_MACOSX_BUNDLE_TOP_DIR=sapmachine-jdk-$(VERSION_NUMBER).jdk
JRE_MACOSX_BUNDLE_TOP_DIR=sapmachine-jre-$(VERSION_NUMBER).jre
JDK_MACOSX_CONTENTS_SUBDIR=$(JDK_MACOSX_BUNDLE_TOP_DIR)/Contents
JRE_MACOSX_CONTENTS_SUBDIR=$(JRE_MACOSX_BUNDLE_TOP_DIR)/Contents
JDK_MACOSX_CONTENTS_DIR=$(JDK_MACOSX_BUNDLE_DIR)/$(JDK_MACOSX_CONTENTS_SUBDIR)
Expand All @@ -971,16 +971,16 @@ ifeq ($(OPENJDK_TARGET_OS), windows)
else
JDK_BUNDLE_EXTENSION := tar.gz
endif
JDK_BUNDLE_NAME := jdk-$(BASE_NAME)_bin$(DEBUG_PART).$(JDK_BUNDLE_EXTENSION)
JRE_BUNDLE_NAME := jre-$(BASE_NAME)_bin$(DEBUG_PART).$(JDK_BUNDLE_EXTENSION)
JDK_SYMBOLS_BUNDLE_NAME := jdk-$(BASE_NAME)_bin$(DEBUG_PART)-symbols.tar.gz
TEST_DEMOS_BUNDLE_NAME := jdk-$(BASE_NAME)_bin-tests-demos$(DEBUG_PART).tar.gz
TEST_BUNDLE_NAME := jdk-$(BASE_NAME)_bin-tests$(DEBUG_PART).tar.gz
DOCS_JDK_BUNDLE_NAME := jdk-$(BASE_NAME)_doc-api-spec$(DEBUG_PART).tar.gz
JDK_BUNDLE_NAME := sapmachine-jdk-$(BASE_NAME)_bin$(DEBUG_PART).$(JDK_BUNDLE_EXTENSION)
JRE_BUNDLE_NAME := sapmachine-jre-$(BASE_NAME)_bin$(DEBUG_PART).$(JDK_BUNDLE_EXTENSION)
JDK_SYMBOLS_BUNDLE_NAME := sapmachine-jdk-$(BASE_NAME)_bin$(DEBUG_PART)-symbols.tar.gz
TEST_DEMOS_BUNDLE_NAME := sapmachine-jdk-$(BASE_NAME)_bin-tests-demos$(DEBUG_PART).tar.gz
TEST_BUNDLE_NAME := sapmachine-jdk-$(BASE_NAME)_bin-tests$(DEBUG_PART).tar.gz
DOCS_JDK_BUNDLE_NAME := sapmachine-jdk-$(BASE_NAME)_doc-api-spec$(DEBUG_PART).tar.gz
DOCS_JAVASE_BUNDLE_NAME := javase-$(BASE_NAME)_doc-api-spec$(DEBUG_PART).tar.gz
DOCS_REFERENCE_BUNDLE_NAME := jdk-reference-$(BASE_NAME)_doc-api-spec$(DEBUG_PART).tar.gz
STATIC_LIBS_BUNDLE_NAME := jdk-$(BASE_NAME)_bin-static-libs$(DEBUG_PART).tar.gz
JCOV_BUNDLE_NAME := jdk-jcov-$(BASE_NAME)_bin$(DEBUG_PART).$(JDK_BUNDLE_EXTENSION)
DOCS_REFERENCE_BUNDLE_NAME := sapmachine-jdk-reference-$(BASE_NAME)_doc-api-spec$(DEBUG_PART).tar.gz
STATIC_LIBS_BUNDLE_NAME := sapmachine-jdk-$(BASE_NAME)_bin-static-libs$(DEBUG_PART).tar.gz
JCOV_BUNDLE_NAME := sapmachine-jdk-jcov-$(BASE_NAME)_bin$(DEBUG_PART).$(JDK_BUNDLE_EXTENSION)

JDK_BUNDLE := $(BUNDLES_OUTPUTDIR)/$(JDK_BUNDLE_NAME)
JRE_BUNDLE := $(BUNDLES_OUTPUTDIR)/$(JRE_BUNDLE_NAME)
Expand Down
16 changes: 8 additions & 8 deletions make/conf/github-actions.conf
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,17 @@ GTEST_VERSION=1.13.0
JTREG_VERSION=7.3.1+1

LINUX_X64_BOOT_JDK_EXT=tar.gz
LINUX_X64_BOOT_JDK_URL=https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.3%2B9/OpenJDK21U-jdk_x64_linux_hotspot_21.0.3_9.tar.gz
LINUX_X64_BOOT_JDK_SHA256=fffa52c22d797b715a962e6c8d11ec7d79b90dd819b5bc51d62137ea4b22a340
LINUX_X64_BOOT_JDK_URL=https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3/sapmachine-jdk-21.0.3_linux-x64_bin.tar.gz
LINUX_X64_BOOT_JDK_SHA256=774bb6f5cf54ff22a64c289edf64c4772efe3f200e4f7e781d5e316651290e81

MACOS_X64_BOOT_JDK_EXT=tar.gz
MACOS_X64_BOOT_JDK_URL=https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.3%2B9/OpenJDK21U-jdk_x64_mac_hotspot_21.0.3_9.tar.gz
MACOS_X64_BOOT_JDK_SHA256=f777103aab94330d14a29bd99f3a26d60abbab8e2c375cec9602746096721a7c
MACOS_X64_BOOT_JDK_URL=https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3/sapmachine-jdk-21.0.3_macos-x64_bin.tar.gz
MACOS_X64_BOOT_JDK_SHA256=ec510e2d281273f9a8df78c984ca180a720583d113a18162d1b1778301603536

MACOS_AARCH64_BOOT_JDK_EXT=tar.gz
MACOS_AARCH64_BOOT_JDK_URL=https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.3%2B9/OpenJDK21U-jdk_aarch64_mac_hotspot_21.0.3_9.tar.gz
MACOS_AARCH64_BOOT_JDK_SHA256=b6be6a9568be83695ec6b7cb977f4902f7be47d74494c290bc2a5c3c951e254f
MACOS_AARCH64_BOOT_JDK_URL=https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3/sapmachine-jdk-21.0.3_macos-aarch64_bin.tar.gz
MACOS_AARCH64_BOOT_JDK_SHA256=beb695bbacc1b9a2b598859f0cf58e426ea6ca965456a85704462c4ec63428aa

WINDOWS_X64_BOOT_JDK_EXT=zip
WINDOWS_X64_BOOT_JDK_URL=https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.3%2B9/OpenJDK21U-jdk_x64_windows_hotspot_21.0.3_9.zip
WINDOWS_X64_BOOT_JDK_SHA256=c43a66cff7a403d56c5c5e1ff10d3d5f95961abf80f97f0e35380594909f0e4d
WINDOWS_X64_BOOT_JDK_URL=https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3/sapmachine-jdk-21.0.3_windows-x64_bin.zip
WINDOWS_X64_BOOT_JDK_SHA256=25d40eaa07b8b7c987bd7c3e5b15f855a4353d24a9b9b12d8fcf32167b9f7008
13 changes: 13 additions & 0 deletions make/modules/java.base/Copy.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -277,3 +277,16 @@ $(eval $(call SetupTextFileProcessing, CREATE_CLASSFILE_CONSTANTS_H, \
TARGETS += $(CREATE_CLASSFILE_CONSTANTS_H)

################################################################################
# SapMachine 2023-11-28: Copy mallochook.h

ifeq ($(call isTargetOs, linux macosx), true)

$(eval $(call SetupCopyFiles, CREATE_MALLOC_HOOKS_H, \
FILES := $(TOPDIR)/src/java.base/unix/native/libmallochooks/mallochooks.h, \
DEST := $(SUPPORT_OUTPUTDIR)/modules_include/java.base/, \
))

TARGETS += $(CREATE_MALLOC_HOOKS_H)
endif

################################################################################
15 changes: 15 additions & 0 deletions make/modules/java.base/lib/CoreLibraries.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -205,3 +205,18 @@ ifeq ($(call isTargetOs, aix), true)
TARGETS += $(BUILD_LIBJLI_STATIC)

endif

# SapMachine 2023-11-28: build libmallochooks

ifeq ($(call isTargetOs, linux macosx), true)
$(eval $(call SetupJdkLibrary, BUILD_LIBMALLOCHOOKS, \
NAME := mallochooks, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB), \
LDFLAGS := $(LDFLAGS_JDKLIB) $(call SET_SHARED_LIBRARY_ORIGIN), \
LIBS := -ldl, \
))

TARGETS += $(BUILD_LIBMALLOCHOOKS)
endif
3 changes: 3 additions & 0 deletions make/test/JtregNativeHotspot.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -858,6 +858,9 @@ ifeq ($(call isTargetOs, linux), true)
BUILD_TEST_exeinvoke_exeinvoke.c_OPTIMIZATION := NONE
BUILD_HOTSPOT_JTREG_EXECUTABLES_LIBS_exeFPRegs := -ldl
BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libAsyncGetCallTraceTest := -ldl
# SapMachine 2023-10-04: Added link flags for malloc hooks tests
BUILD_HOTSPOT_JTREG_EXECUTABLES_LIBS_exetestmallochooks := -ldl
BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libtestmallochooks := -ldl
else
BUILD_HOTSPOT_JTREG_EXCLUDE += libtest-rw.c libtest-rwx.c \
exeinvoke.c exestack-gap.c exestack-tls.c libAsyncGetCallTraceTest.cpp
Expand Down
43 changes: 43 additions & 0 deletions src/hotspot/os/aix/vitals_aix.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/*
* Copyright (c) 2019, 2021 SAP SE. All rights reserved.
* Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*
*/

#include "precompiled.hpp"

#include "runtime/os.hpp"
#include "utilities/debug.hpp"
#include "utilities/globalDefinitions.hpp"
#include "vitals/vitals_internals.hpp"

namespace sapmachine_vitals {

bool platform_columns_initialize() {
return true;
}

void sample_platform_values(Sample* record) {
}

} // namespace sapmachine_vitals
Loading

0 comments on commit 3ad1c1d

Please sign in to comment.