forked from eclipse-openj9/openj9
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Add JPP flag for JFR - Add com.ibm.oti.vm.VM::triggerExecutionSample that calls jfrExecutionSample on all Java threads - Add test for triggerExecutionSample Depend on: - ibmruntimes/openj9-openjdk-jdk#817 - adoptium/TKG#589 Signed-off-by: Gengchen Tuo <gengchen.tuo@ibm.com>
- Loading branch information
1 parent
487b005
commit 81754c7
Showing
16 changed files
with
2,481 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<!-- | ||
Copyright IBM Corp. and others 2024 | ||
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 | ||
--> | ||
<exports group="jfr"> | ||
<export name="Java_com_ibm_oti_vm_VM_triggerExecutionSample" /> | ||
</exports> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
<?xml version="1.0"?> | ||
|
||
<!-- | ||
Copyright IBM Corp. and others 2024 | ||
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 | ||
--> | ||
<project name="jfr" default="build" basedir="."> | ||
<taskdef resource="net/sf/antcontrib/antlib.xml" /> | ||
<description> | ||
Build cmdLineTests_jfr | ||
</description> | ||
|
||
<import file="${TEST_ROOT}/functional/cmdLineTests/buildTools.xml"/> | ||
|
||
<!-- set properties for this build --> | ||
<property name="DEST" value="${BUILD_ROOT}/functional/cmdLineTests/jfr" /> | ||
<property name="src" location="./src"/> | ||
<property name="build" location="./bin"/> | ||
|
||
<condition property="jfrEnabled"> | ||
<and> | ||
<contains string="${TEST_FLAG}" substring="JFR" /> | ||
<!-- For the time being, JFR tests are only limited to JDK17+. --> | ||
<not> | ||
<matches string="${JDK_VERSION}" pattern="^(8|9|1[0-6])$$" /> | ||
</not> | ||
</and> | ||
</condition> | ||
|
||
<target name="init"> | ||
<mkdir dir="${DEST}" /> | ||
<mkdir dir="${build}" /> | ||
</target> | ||
|
||
<target name="compile" depends="init" description="Using java ${JDK_VERSION} to compile the source" if="jfrEnabled"> | ||
<echo>Ant version is ${ant.version}</echo> | ||
<echo>============COMPILER SETTINGS============</echo> | ||
<echo>===fork: yes</echo> | ||
<echo>===executable: ${compiler.javac}</echo> | ||
<echo>===debug: on</echo> | ||
<echo>===destdir: ${DEST}</echo> | ||
<javac srcdir="${src}" destdir="${build}" debug="true" fork="true" executable="${compiler.javac}" includeAntRuntime="false" encoding="ISO-8859-1"> | ||
<compilerarg line="--add-exports java.base/com.ibm.oti.vm=ALL-UNNAMED" /> | ||
<src path="${src}"/> | ||
</javac> | ||
</target> | ||
|
||
<target name="dist" depends="compile" description="generate the distribution"> | ||
<jar jarfile="${DEST}/jfr.jar" filesonly="true"> | ||
<fileset dir="${build}" /> | ||
<fileset dir="${src}" /> | ||
</jar> | ||
<copy todir="${DEST}"> | ||
<fileset dir="${src}/../" includes="*.xml,*.mk,metadata.blob" /> | ||
</copy> | ||
</target> | ||
|
||
<target name="clean" depends="dist" description="clean up"> | ||
<!-- Delete the ${build} directory trees --> | ||
<delete dir="${build}" /> | ||
</target> | ||
|
||
<target name="build" depends="buildCmdLineTestTools"> | ||
<antcall target="clean" inheritall="true" /> | ||
</target> | ||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="no" ?> | ||
|
||
<!-- | ||
Copyright IBM Corp. and others 2024 | ||
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 | ||
--> | ||
|
||
<!DOCTYPE suite SYSTEM "cmdlinetester.dtd"> | ||
|
||
<suite id="JFR Tests" timeout="300"> | ||
<envvar name="OPENJ9_METADATA_BLOB_FILE_PATH" value="$METADATA_BLOB_PATH$"/> | ||
<test id="triggerExecutionSample"> | ||
<command>$EXE$ -XX:+FlightRecorder --add-exports java.base/com.ibm.oti.vm=ALL-UNNAMED -cp $RESJAR$ org.openj9.test.TriggerExecutionSample</command> | ||
<return type="success" value="0" /> | ||
</test> | ||
</suite> |
Oops, something went wrong.