mirror of
https://github.com/JetBrains/JetBrainsRuntime.git
synced 2025-12-08 02:19:37 +01:00
Compare commits
37 Commits
1852
...
linux-ui-t
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3c7dbc8f04 | ||
|
|
62f7f766d4 | ||
|
|
b1926bdb59 | ||
|
|
81e60e5e9c | ||
|
|
8a8cbd9310 | ||
|
|
772eef8cd7 | ||
|
|
0e299b0bdb | ||
|
|
cdc9e359ee | ||
|
|
4d8db791a8 | ||
|
|
ff12dc9542 | ||
|
|
914ae8f936 | ||
|
|
28cb76df77 | ||
|
|
934d918311 | ||
|
|
7bbed87471 | ||
|
|
834d57edf6 | ||
|
|
811cea5610 | ||
|
|
cbc4299f2d | ||
|
|
fca82dafa1 | ||
|
|
951f4bdc00 | ||
|
|
3c0bc75172 | ||
|
|
82fd81ba35 | ||
|
|
8ca68e66bb | ||
|
|
cb8bb82dc2 | ||
|
|
f2436be7ca | ||
|
|
779e93ee2c | ||
|
|
029552b010 | ||
|
|
7e51c75463 | ||
|
|
1034319f69 | ||
|
|
bd7695a9f0 | ||
|
|
bc0c3c9671 | ||
|
|
f440cae2a7 | ||
|
|
5582217946 | ||
|
|
c81034edc4 | ||
|
|
2f36acdfa7 | ||
|
|
c5f98324ee | ||
|
|
4fbed06017 | ||
|
|
bdea9f75a5 |
1
.gitattributes
vendored
1
.gitattributes
vendored
@@ -1 +0,0 @@
|
||||
* -text
|
||||
1513
.github/workflows/submit.yml
vendored
1513
.github/workflows/submit.yml
vendored
File diff suppressed because it is too large
Load Diff
1
.gitignore
vendored
1
.gitignore
vendored
@@ -24,4 +24,3 @@ test/nashorn/lib
|
||||
NashornProfile.txt
|
||||
**/JTreport/**
|
||||
**/JTwork/**
|
||||
/jb/project/java-gradle/.idea/workspace.xml
|
||||
|
||||
76
.hgtags
76
.hgtags
@@ -565,79 +565,3 @@ deaef57bf366fdab908b97a9760d0fa6e273abcd jdk-11.0.5+6
|
||||
ee7128cf507a670ae84841b202a7a06711608359 jdk-11.0.5+9
|
||||
6385eb06af947d8ec5fd51a4733bc8187efb88b5 jdk-11.0.5+10
|
||||
6385eb06af947d8ec5fd51a4733bc8187efb88b5 jdk-11.0.5-ga
|
||||
6eb89e59a06a2f83f7fe0399da4bf4ca638d46f3 jdk-11.0.6+1
|
||||
8d3e0c2c009815cae59ad3c9bf9e4b1f090efc8b jdk-11.0.6+2
|
||||
f8b2e95a1d41585a757729ed28ce35d43aba1b3f jdk-11.0.6+3
|
||||
577a1fc440666e3c0724e07f6a8d736b2c7905cf jdk-11.0.6+4
|
||||
bfce7426e091127450a70b7d07941c0f9e02d347 jdk-11.0.6+5
|
||||
aa260c24480a2bd7d21ad1c863e6fe9a3973011e jdk-11.0.6+6
|
||||
42500af9232ed5b2990ff618a1e92ef6ccc0b9af jdk-11.0.6+7
|
||||
0c54fb645a7388cb7e3d587b4df75a2edd7826e2 jdk-11.0.6+8
|
||||
1859de77ee6cd7e10ac0b9e71027d9f974a6e481 jdk-11.0.6+9
|
||||
837b7afec083aaddeef0a6c3e6501b2200eaf1d4 jdk-11.0.6+10
|
||||
837b7afec083aaddeef0a6c3e6501b2200eaf1d4 jdk-11.0.6-ga
|
||||
8cdfd6139b1efc9064b10f24a82848b1bb4a0550 jdk-11.0.7+1
|
||||
15cc1c8a63718c394e9cd1f35d735bb74a850084 jdk-11.0.7+2
|
||||
f2d8162261ae3c1e50eb0667b3c9669caa67c652 jdk-11.0.7+3
|
||||
d3d1f7f67de13fd5c227424b9ddc514c0ca32aff jdk-11.0.7+4
|
||||
f03574cfc0d728ca7b5146ca22c707717f9f899f jdk-11.0.7+5
|
||||
17d2e0c27889a00a3df7de9bcea0e8caf0d1771a jdk-11.0.7+6
|
||||
f56b853d452bd339e3f4360cf4be42cc90f9284c jdk-11.0.7+7
|
||||
3c570d183ab2afc0b204a8e980be69e7fbe761ef jdk-11.0.7+8
|
||||
7201cd0c64776aa574d252b03a4c92b25d0a7d7f jdk-11.0.7+9
|
||||
44ce940b344b9f240be4807f5b8f06e178e3aecd jdk-11.0.7+10
|
||||
44ce940b344b9f240be4807f5b8f06e178e3aecd jdk-11.0.7-ga
|
||||
2eb415c82056bdc308d23ee6761f422de46dc5e5 jdk-11.0.8+1
|
||||
88eaa453331e9aeca979d58509538ebb74831ce4 jdk-11.0.8+2
|
||||
2c0c9cfe2a4e1340f7db106e2220dbd0d5b86092 jdk-11.0.8+3
|
||||
aa6c93b4f1acf4166d74d0252b35c53ad71d8540 jdk-11.0.8+4
|
||||
8df1a601187c0b4cb9e525075bd7b85ee3d72595 jdk-11.0.8+5
|
||||
e42c6d1a1993c720a4643140190bb1ba6f1bbf9f jdk-11.0.8+6
|
||||
46d4984bb3c6dd1b0f5135505b77921d23c69841 jdk-11.0.8+7
|
||||
40b646e9d8fbb2d70992b61e4f4b08ca5652c907 jdk-11.0.8+8
|
||||
59f8565ee5e224697a9e09ee2c557836733bc579 jdk-11.0.8+9
|
||||
0b0d55cb09b29360ab254edeef32a3b386e9713e jdk-11.0.8+10
|
||||
0b0d55cb09b29360ab254edeef32a3b386e9713e jdk-11.0.8-ga
|
||||
5cc275af8419178813299cc0ed81a2a85dadfdcd jdk-11.0.9+1
|
||||
3112657edde9491fb83f098f1a8b7e9275bcb2f7 jdk-11.0.9+2
|
||||
d8a0513b92ee262d4e64c1e13d43e1b3f3e5c5d5 jdk-11.0.9+3
|
||||
cb299db4a5698b814f6b3ba1f3d73d01f6a0e1f6 jdk-11.0.9+4
|
||||
55237fa85afb404bc0dc0f4948a6459d8d3e5dac jdk-11.0.9+5
|
||||
c07e785e36f587b95e151de382844cea3d1a5868 jdk-11.0.9+6
|
||||
1ba4c16a8afa3f5aaa7830fc1f14a0137cc2553b jdk-11.0.9+7
|
||||
8711e8554e15ae2fa38718d5c7dc858da10e8a4a jdk-11.0.9+8
|
||||
e872676174c7f171a9864becba83cb783cfec9d0 jdk-11.0.9+9
|
||||
6ac1b68e7c0034e08a96d7d37e93e5075a6e8d61 jdk-11.0.9+10
|
||||
4397fa4529b2794ddcdf3445c0611fe383243fb4 jdk-11.0.9+11
|
||||
4397fa4529b2794ddcdf3445c0611fe383243fb4 jdk-11.0.9-ga
|
||||
4fd46d208f0a4b55924af8e0c2fb6bcf46e18ec6 jdk-11.0.9.1+0
|
||||
27723943c0dd65a191cbefe031cec001521e4b13 jdk-11.0.9.1+1
|
||||
31affc22b3b5f5d43783ffadf57f22848bad9db8 jdk-11.0.9.1-ga
|
||||
f3168de4eb0dd74bf8e81537f62742bde5e412c3 jdk-11.0.10+1
|
||||
a35aa07b57bab3690224e3af939ee085d50eb476 jdk-11.0.10+2
|
||||
bca12c00a776f8cee7a0eeaf788499b9eab9cf9d jdk-11.0.10+3
|
||||
9504fa6f98f5aad0aa1ac36d5bff3260a32020c8 jdk-11.0.10+4
|
||||
5f5c3544ccb4d0bbc638e665524b292860dd9515 jdk-11.0.10+5
|
||||
4b9bc2a1dde0631958393125997855382325964d jdk-11.0.10+6
|
||||
c45f74d45787a857d35b5a66c9b0304c91a9c5d0 jdk-11.0.10+7
|
||||
43428f69099f6f87f6e1922deacbf13e1adb751f jdk-11.0.10+8
|
||||
8b3498547395ee80a6e731078056b2aeb3e3c5e8 jdk-11.0.10+9
|
||||
8b3498547395ee80a6e731078056b2aeb3e3c5e8 jdk-11.0.10-ga
|
||||
4ed322bf6b0098353ceaecf35662fadf457cd81d jdk-11.0.11+1
|
||||
b68647c6ecc1e73111d8047448d75966f255460f jdk-11.0.11+2
|
||||
14cc036b17a5f4be5b0643e6b24ed32563684ab9 jdk-11.0.11+3
|
||||
c4405735470a92e2c45490b89a8099252f3481d2 jdk-11.0.11+4
|
||||
38430a8a4488582612c6a87ab58d109cc5217e8b jdk-11.0.11+5
|
||||
e41ae00add1d76a8f25adb558933382947ea840d jdk-11.0.11+6
|
||||
14f9928caac31368d27f13e4e21ca25c1e0be950 jdk-11.0.11+7
|
||||
9f0347b029d3a0349f23befcfb68ee02d85d9034 jdk-11.0.11+8
|
||||
15862747ee15445292b4b9949b4f0f4badba4812 jdk-11.0.11+9
|
||||
15862747ee15445292b4b9949b4f0f4badba4812 jdk-11.0.11-ga
|
||||
5720ffa08f8514b9f0ea8b3a49e05a872c9c0efe jdk-11.0.12+1
|
||||
70a4031a8bef3e693f34864fdd482429c73dc76a jdk-11.0.12+2
|
||||
873a691b1ae4fa8b55ca5d08fa21aca3a4904fb8 jdk-11.0.12+3
|
||||
40d1e784e1937aaea696a9654cc2d944d3d78996 jdk-11.0.12+4
|
||||
6aa6f6860508fca3a97aea1de7a36574498d22bf jdk-11.0.12+5
|
||||
91e81ac088545abdc3eaaa707853d31a6cf99af3 jdk-11.0.12+6
|
||||
f412f2537f1502a9697a9684c77bea8d848db1ab jdk-11.0.12+7
|
||||
f412f2537f1502a9697a9684c77bea8d848db1ab jdk-11.0.12-ga
|
||||
|
||||
6
.idea/copyright/JetBrains.xml
generated
6
.idea/copyright/JetBrains.xml
generated
@@ -1,7 +1,9 @@
|
||||
<component name="CopyrightManager">
|
||||
<copyright>
|
||||
<option name="allowReplaceRegexp" value="JetBrains" />
|
||||
<option name="notice" value="Copyright 2000-&#36;today.year JetBrains s.r.o. 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." />
|
||||
<option name="notice" value="Copyright 2000-&#36;today.year JetBrains s.r.o. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License." />
|
||||
<option name="keyword" value="Copyright" />
|
||||
<option name="allowReplaceKeyword" value="JetBrains" />
|
||||
<option name="myName" value="JetBrains" />
|
||||
<option name="myLocal" value="true" />
|
||||
</copyright>
|
||||
</component>
|
||||
14
.idea/vcs.xml
generated
14
.idea/vcs.xml
generated
@@ -1,19 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="IssueNavigationConfiguration">
|
||||
<option name="links">
|
||||
<list>
|
||||
<IssueNavigationLink>
|
||||
<option name="issueRegexp" value="[A-Z]+\-\d+" />
|
||||
<option name="linkRegexp" value="http://youtrack.jetbrains.com/issue/$0" />
|
||||
</IssueNavigationLink>
|
||||
<IssueNavigationLink>
|
||||
<option name="issueRegexp" value="^(\d+)\:" />
|
||||
<option name="linkRegexp" value="https://bugs.openjdk.java.net/browse/JDK-$1" />
|
||||
</IssueNavigationLink>
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
</component>
|
||||
|
||||
33
.jcheck/conf
33
.jcheck/conf
@@ -1,31 +1,2 @@
|
||||
[general]
|
||||
project=jdk-updates
|
||||
jbs=JDK
|
||||
version=11.0.13
|
||||
|
||||
[checks]
|
||||
error=author,committer,reviewers,merge,issues,executable,symlink,message,hg-tag,whitespace
|
||||
|
||||
[repository]
|
||||
tags=(?:jdk-(?:[1-9]([0-9]*)(?:\.(?:0|[1-9][0-9]*)){0,4})(?:\+(?:(?:[0-9]+))|(?:-ga)))|(?:jdk[4-9](?:u\d{1,3})?-(?:(?:b\d{2,3})|(?:ga)))|(?:hs\d\d(?:\.\d{1,2})?-b\d\d)
|
||||
branches=
|
||||
|
||||
[census]
|
||||
version=0
|
||||
domain=openjdk.org
|
||||
|
||||
[checks "whitespace"]
|
||||
files=.*\.cpp|.*\.hpp|.*\.c|.*\.h|.*\.java
|
||||
|
||||
[checks "merge"]
|
||||
message=Merge
|
||||
|
||||
[checks "reviewers"]
|
||||
reviewers=1
|
||||
ignore=duke
|
||||
|
||||
[checks "committer"]
|
||||
role=committer
|
||||
|
||||
[checks "issues"]
|
||||
pattern=^([124-8][0-9]{6}): (\S.*)$
|
||||
project=jdk10
|
||||
bugids=dup
|
||||
|
||||
162
README.md
162
README.md
@@ -1,172 +1,68 @@
|
||||
[](https://confluence.jetbrains.com/display/ALL/JetBrains+on+GitHub)
|
||||
|
||||
# Welcome to JetBrains Runtime!
|
||||
<a name="jetbrains-runtime"></a>
|
||||
# Downloads
|
||||
|
||||
JetBrains Runtime is a fork of [OpenJDK](https://github.com/openjdk/jdk) available for Windows, Mac OS X, and Linux.
|
||||
It includes a number enhancements in font rendering, HiDPI support, ligatures, performance improvements, and bugfixes.
|
||||
|Windows-x64 |macOS |Linux-x64 |
|
||||
|-------------|-------------|-------------|
|
||||
|<a href="https://bintray.com/jetbrains/intellij-jdk/openjdk9-windows-x64/_latestVersion"> <img src="https://api.bintray.com/packages/jetbrains/intellij-jdk/openjdk9-windows-x64/images/download.svg"/></a>|<a href="https://bintray.com/jetbrains/intellij-jdk/openjdk9-osx-x64/_latestVersion"> <img src="https://api.bintray.com/packages/jetbrains/intellij-jdk/openjdk9-osx-x64/images/download.svg"/></a>|<a href="https://bintray.com/jetbrains/intellij-jdk/openjdk9-linux-x64/_latestVersion"><img src="https://api.bintray.com/packages/jetbrains/intellij-jdk/openjdk9-linux-x64/images/download.svg"/></a>|
|
||||
|
||||
## Releases
|
||||
Download the latest releases of JetBrains Runtime to use with JetBrains IDEs. The full list
|
||||
can be found on the [releases page](https://github.com/JetBrains/JetBrainsRuntime/releases).
|
||||
|
||||
| IDE Version | Latest JBR | Date Released |
|
||||
| --- | --- | --- |
|
||||
| 2021.3 | [11_0_13-b1751.19](https://github.com/JetBrains/JetBrainsRuntime/releases/tag/jbr11_0_13b1751.19) | 9-Nov-2021 |
|
||||
| 2021.2 | [11_0_13-b1504.49](https://github.com/JetBrains/JetBrainsRuntime/releases/tag/jb11_0_13-b1504.49) | 15-Nov-2021 |
|
||||
| 2021.1 | [11.0.11+9-b1341.60](https://confluence.jetbrains.com/pages/viewpage.action?pageId=218857477) | 15-Jun-2021 |
|
||||
| 2020.3 | [11_0_11-b1145.115](https://confluence.jetbrains.com/pages/viewpage.action?pageId=219349001) | 21-Jun-2021 |
|
||||
# How JetBrains Runtime is organised
|
||||
## Workspaces
|
||||
|
||||
## Contents
|
||||
- [Welcome to JetBrains Runtime](#jetbrains-runtime)
|
||||
- [Products Built on JetBrains Runtime](#products-built-on-jetbrains-runtime)
|
||||
- [Getting Sources](#getting-sources)
|
||||
- [macOS, Linux](#macos-linux)
|
||||
- [Windows](#sources-windows)
|
||||
- [Configuring the Build Environment](#configuring-the-build-environment)
|
||||
- [Linux (Docker)](#linux-docker)
|
||||
- [Ubuntu Linux](#ubuntu-linux)
|
||||
- [Windows](#build-windows)
|
||||
- [macOS](#macos)
|
||||
- [Developing](#developing)
|
||||
- [Contributing](#contributing)
|
||||
- [Resources](#resources)
|
||||
[github.com/JetBrains/JetBrainsRuntime](https://github.com/JetBrains/JetBrainsRuntime)
|
||||
|
||||
## Products Built on JetBrains Runtime
|
||||
* [Android Studio](https://developer.android.com/studio). The official IDE for Google's Android operating system.
|
||||
* [CLion](https://www.jetbrains.com/clion/). A cross-platform IDE for C and C++ from JetBrains.
|
||||
* [DataGrip](https://www.jetbrains.com/datagrip/). The IDE for Databases and SQL from JetBrains.
|
||||
* [GoLand](https://www.jetbrains.com/go/). The cross-platform Go IDE from JetBrains.
|
||||
* [IntelliJ IDEA](https://www.jetbrains.com/idea/). The IDE for JVM from JetBrains.
|
||||
* [JProfiler](https://www.ej-technologies.com/products/jprofiler/overview.html). The Java profiler.
|
||||
* [PhpStorm](https://www.jetbrains.com/phpstorm/). The PHP IDE from JetBrains.
|
||||
* [PyCharm](https://www.jetbrains.com/pycharm/). The Python IDE from JetBrains.
|
||||
* [Rider](https://www.jetbrains.com/rider/). The cross-platform .NET IDE from JetBrains.
|
||||
* [RubyMine](https://www.jetbrains.com/ruby/). The Ruby and Rails IDE from JetBrains.
|
||||
* [WebStorm](https://www.jetbrains.com/webstorm/). The JavaScript IDE from JetBrains.
|
||||
* [YourKit](https://www.yourkit.com/). Java and .NET profilers.
|
||||
|
||||
## Getting Sources
|
||||
### macOS, Linux
|
||||
## Getting sources
|
||||
__OSX, Linux:__
|
||||
```
|
||||
git config --global core.autocrlf input
|
||||
git clone git@github.com:JetBrains/JetBrainsRuntime.git
|
||||
```
|
||||
|
||||
### Windows
|
||||
<a name="sources-windows"></a>
|
||||
__Windows:__
|
||||
```
|
||||
git config --global core.autocrlf false
|
||||
git clone git@github.com:JetBrains/JetBrainsRuntime.git
|
||||
```
|
||||
|
||||
## Configuring the Build Environment
|
||||
Here are quick per-platform instructions for those who can't wait to get started.
|
||||
Please refer to [OpenJDK build docs](http://hg.openjdk.java.net/jdk/jdk11/raw-file/tip/doc/building.html) for in-depth
|
||||
coverage of all the details.
|
||||
|
||||
> **_TIP:_** To get a preliminary report of what's missing, run `./configure` and check its output.
|
||||
> It would usually have a meaningful advice on how to solve the problem.
|
||||
|
||||
### Linux (Docker)
|
||||
Create a container:
|
||||
# Configure Local Build Environment
|
||||
## Linux (docker)
|
||||
```
|
||||
$ cd jb/project/docker
|
||||
$ docker build .
|
||||
...
|
||||
Successfully built 942ea9900054
|
||||
```
|
||||
Run these commands in the new container:
|
||||
```
|
||||
|
||||
$ docker run -v `pwd`../../../../:/JetBrainsRuntime -it 942ea9900054
|
||||
|
||||
# cd /JetBrainsRuntime
|
||||
# sh ./configure
|
||||
# make images CONF=linux-x86_64-normal-server-release
|
||||
|
||||
```
|
||||
|
||||
### Ubuntu Linux
|
||||
Install the necessary tools, libraries, and headers with:
|
||||
```
|
||||
$ sudo apt-get install autoconf make build-essential libx11-dev libxext-dev libxrender-dev libxtst-dev \
|
||||
libxt-dev libxrandr-dev libcups2-dev libfontconfig1-dev libasound2-dev \
|
||||
openjdk-11-jdk
|
||||
```
|
||||
Then run the following:
|
||||
## Linux (Ubuntu 18.10 desktop)
|
||||
```
|
||||
$ sudo apt-get install autoconf make build-essential libx11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev libxrandr-dev libcups2-dev libfontconfig1-dev libasound2-dev
|
||||
|
||||
$ cd JetBrainsRuntime
|
||||
$ sh ./configure --disable-warnings-as-errors
|
||||
$ make images
|
||||
```
|
||||
|
||||
### Windows
|
||||
<a name="build-windows"></a>
|
||||
Install the following:
|
||||
* [Cygwin x64](http://www.cygwin.com/).
|
||||
Required packages: `autoconf`, `binutils`, `cpio`, `diffutils`, `file`, `gawk`, `gcc-core`, `make`, `m4`, `unzip`, `zip`.
|
||||
Install those together with Cygwin.
|
||||
* [Visual Studio compiler toolset](https://visualstudio.microsoft.com/downloads/).
|
||||
Install with the desktop development kit, which includes Windows SDK and compilers.
|
||||
Visual Studio 2015 is supported by default.
|
||||
* [Java 11](https://docs.aws.amazon.com/corretto/latest/corretto-11-ug/downloads-list.html).
|
||||
If you have problems while configuring, read [Java tips on Cygwin](http://horstmann.com/articles/cygwin-tips.html).
|
||||
## Windows
|
||||
#### TBD
|
||||
|
||||
From the command line:
|
||||
```
|
||||
"c:\Program Files (x86)\Microsoft Visual Studio 15.0\VC\vcvarsall.bat" amd64
|
||||
c:\cygwin64\bin\mintty.exe /usr/bin/bash -l
|
||||
```
|
||||
The first command sets up environment variables, the second starts a Cygwin shell with the proper environment.
|
||||
## OSX
|
||||
|
||||
install Xcode console tools, autoconf (via homebrew)
|
||||
|
||||
run
|
||||
|
||||
In the Cygwin shell:
|
||||
```
|
||||
$ cd JetBrainsRuntime
|
||||
$ bash configure --enable-option-checking=fatal --with-toolchain-version=2015 \
|
||||
--with-boot-jdk="/cygdrive/c/Program Files/Java/jdk-11.0.5" --disable-warnings-as-errors
|
||||
$ make images
|
||||
sh ./configure --prefix=$(pwd)/build --disable-warnings-as-errors
|
||||
make images
|
||||
```
|
||||
|
||||
### macOS
|
||||
Install the following:
|
||||
* Xcode command line developer tools and `autoconf` via [Homebrew](getDpiInfo).
|
||||
* [Java 11](https://docs.aws.amazon.com/corretto/latest/corretto-11-ug/downloads-list.html).
|
||||
|
||||
From the command line:
|
||||
```
|
||||
$ cd JetBrainsRuntime
|
||||
$ sh ./configure --prefix=$(pwd)/build --disable-warnings-as-errors
|
||||
$ make images
|
||||
```
|
||||
|
||||
## Developing
|
||||
You can use [CLion](https://www.jetbrains.com/clion/) to develop native parts of the JetBrains Runtime and
|
||||
[IntelliJ IDEA](https://www.jetbrains.com/idea/) for the parts written in Java.
|
||||
Both require projects to be created.
|
||||
|
||||
### CLion
|
||||
Run
|
||||
```
|
||||
$ make compile-commands
|
||||
```
|
||||
in the git root and open the resulting `build/.../compile_commands.json` file as a project.
|
||||
Then use `Tools | Compilation Database | Change Project Root` to point to git root of this repository.
|
||||
|
||||
See also this detailed step-by-step tutorial for all platforms:
|
||||
[How to develop OpenJDK with CLion](https://blog.jetbrains.com/clion/2020/03/openjdk-with-clion/).
|
||||
|
||||
### IDEA
|
||||
Run
|
||||
```
|
||||
$ sh ./bin/idea.sh
|
||||
```
|
||||
in the git root to generate project files (add `--help` for options). Then open the git root directory
|
||||
as a project in IDEA.
|
||||
|
||||
## Contributing
|
||||
We are happy to receive your pull requests!
|
||||
Before you submit one, please sign our [Contributor License Agreement (CLA)](https://www.jetbrains.com/agreements/cla/).
|
||||
|
||||
## Resources
|
||||
* [JetBrains Runtime on github](https://github.com/JetBrains/JetBrainsRuntime).
|
||||
* [OpenJDK build instructions](http://hg.openjdk.java.net/jdk/jdk11/raw-file/tip/doc/building.html).
|
||||
* [OpenJDK test instructions](http://hg.openjdk.java.net/jdk/jdk11/raw-file/tip/doc/building.html#running-tests).
|
||||
* [How to develop OpenJDK with CLion](https://blog.jetbrains.com/clion/2020/03/openjdk-with-clion/).
|
||||
## Contribution
|
||||
We will be happy to receive your pull requests. Before you submit one, please sign our Contributor License Agreement (CLA) https://www.jetbrains.com/agreements/cla/
|
||||
|
||||
@@ -68,12 +68,10 @@
|
||||
</ul></li>
|
||||
<li><a href="#running-tests">Running Tests</a></li>
|
||||
<li><a href="#cross-compiling">Cross-compiling</a><ul>
|
||||
<li><a href="#cross-compiling-the-easy-way-with-openjdk-devkits">Cross compiling the easy way with OpenJDK devkits</a></li>
|
||||
<li><a href="#boot-jdk-and-build-jdk">Boot JDK and Build JDK</a></li>
|
||||
<li><a href="#specifying-the-target-platform">Specifying the Target Platform</a></li>
|
||||
<li><a href="#toolchain-considerations">Toolchain Considerations</a></li>
|
||||
<li><a href="#native-libraries">Native Libraries</a></li>
|
||||
<li><a href="#creating-and-using-sysroots-with-qemu-deboostrap">Creating And Using Sysroots With qemu-deboostrap</a></li>
|
||||
<li><a href="#building-for-armaarch64">Building for ARM/aarch64</a></li>
|
||||
<li><a href="#verifying-the-build">Verifying the Build</a></li>
|
||||
</ul></li>
|
||||
@@ -93,10 +91,12 @@
|
||||
<li><a href="#getting-help">Getting Help</a></li>
|
||||
</ul></li>
|
||||
<li><a href="#hints-and-suggestions-for-advanced-users">Hints and Suggestions for Advanced Users</a><ul>
|
||||
<li><a href="#setting-up-a-forest-for-pushing-changes-defpath">Setting Up a Forest for Pushing Changes (defpath)</a></li>
|
||||
<li><a href="#bash-completion">Bash Completion</a></li>
|
||||
<li><a href="#using-multiple-configurations">Using Multiple Configurations</a></li>
|
||||
<li><a href="#handling-reconfigurations">Handling Reconfigurations</a></li>
|
||||
<li><a href="#using-fine-grained-make-targets">Using Fine-Grained Make Targets</a></li>
|
||||
<li><a href="#learn-about-mercurial">Learn About Mercurial</a></li>
|
||||
</ul></li>
|
||||
<li><a href="#understanding-the-build-system">Understanding the Build System</a><ul>
|
||||
<li><a href="#configurations">Configurations</a></li>
|
||||
@@ -110,10 +110,10 @@
|
||||
</ul>
|
||||
</nav>
|
||||
<h2 id="tldr-instructions-for-the-impatient">TL;DR (Instructions for the Impatient)</h2>
|
||||
<p>If you are eager to try out building the JDK, these simple steps works most of the time. They assume that you have installed Git (and Cygwin if running on Windows) and cloned the top-level JDK repository that you want to build.</p>
|
||||
<p>If you are eager to try out building the JDK, these simple steps works most of the time. They assume that you have installed Mercurial (and Cygwin if running on Windows) and cloned the top-level JDK repository that you want to build.</p>
|
||||
<ol type="1">
|
||||
<li><p><a href="#getting-the-source-code">Get the complete source code</a>:<br />
|
||||
<code>git clone https://git.openjdk.java.net/jdk/</code></p></li>
|
||||
<code>hg clone http://hg.openjdk.java.net/jdk/jdk</code></p></li>
|
||||
<li><p><a href="#running-configure">Run configure</a>:<br />
|
||||
<code>bash configure</code></p>
|
||||
<p>If <code>configure</code> fails due to missing dependencies (to either the <a href="#native-compiler-toolchain-requirements">toolchain</a>, <a href="#build-tools-requirements">build tools</a>, <a href="#external-library-requirements">external libraries</a> or the <a href="#boot-jdk-requirements">boot JDK</a>), most of the time it prints a suggestion on how to resolve the situation on your platform. Follow the instructions, and try running <code>bash configure</code> again.</p></li>
|
||||
@@ -129,8 +129,8 @@
|
||||
<p>The JDK is a complex software project. Building it requires a certain amount of technical expertise, a fair number of dependencies on external software, and reasonably powerful hardware.</p>
|
||||
<p>If you just want to use the JDK and not build it yourself, this document is not for you. See for instance <a href="http://openjdk.java.net/install">OpenJDK installation</a> for some methods of installing a prebuilt JDK.</p>
|
||||
<h2 id="getting-the-source-code">Getting the Source Code</h2>
|
||||
<p>Make sure you are getting the correct version. As of JDK 10, the source is no longer split into separate repositories so you only need to clone one single repository. At the <a href="https://git.openjdk.java.net/">OpenJDK Git site</a> you can see a list of all available repositories. If you want to build an older version, e.g. JDK 8, it is recommended that you get the <code>jdk8u</code> forest, which contains incremental updates, instead of the <code>jdk8</code> forest, which was frozen at JDK 8 GA.</p>
|
||||
<p>If you are new to Git, a good place to start is the book <a href="https://git-scm.com/book/en/v2">Pro Git</a>. The rest of this document assumes a working knowledge of Git.</p>
|
||||
<p>Make sure you are getting the correct version. As of JDK 10, the source is no longer split into separate repositories so you only need to clone one single repository. At the <a href="http://hg.openjdk.java.net/">OpenJDK Mercurial server</a> you can see a list of all available forests. If you want to build an older version, e.g. JDK 8, it is recommended that you get the <code>jdk8u</code> forest, which contains incremental updates, instead of the <code>jdk8</code> forest, which was frozen at JDK 8 GA.</p>
|
||||
<p>If you are new to Mercurial, a good place to start is the <a href="http://www.mercurial-scm.org/guide">Mercurial Beginner's Guide</a>. The rest of this document assumes a working knowledge of Mercurial.</p>
|
||||
<h3 id="special-considerations">Special Considerations</h3>
|
||||
<p>For a smooth building experience, it is recommended that you follow these rules on where and how to check out the source code.</p>
|
||||
<ul>
|
||||
@@ -141,11 +141,7 @@
|
||||
<ul>
|
||||
<li><p>Create the directory that is going to contain the top directory of the JDK clone by using the <code>mkdir</code> command in the Cygwin bash shell. That is, do <em>not</em> create it using Windows Explorer. This will ensure that it will have proper Cygwin attributes, and that it's children will inherit those attributes.</p></li>
|
||||
<li><p>Do not put the JDK clone in a path under your Cygwin home directory. This is especially important if your user name contains spaces and/or mixed upper and lower case letters.</p></li>
|
||||
<li><p>You need to install a git client. You have two choices, Cygwin git or Git for Windows. Unfortunately there are pros and cons with each choice.</p>
|
||||
<ul>
|
||||
<li><p>The Cygwin <code>git</code> client has no line ending issues and understands Cygwin paths (which are used throughout the JDK build system). However, it does not currently work well with the Skara CLI tooling. Please see the <a href="https://wiki.openjdk.java.net/display/SKARA/Skara#Skara-Git">Skara wiki on Git clients</a> for up-to-date information about the Skara git client support.</p></li>
|
||||
<li><p>The <a href="https://gitforwindows.org">Git for Windows</a> client has issues with line endings, and do not understand Cygwin paths. It does work well with the Skara CLI tooling, however. To alleviate the line ending problems, make sure you set <code>core.autocrlf</code> to <code>false</code> (this is asked during installation).</p></li>
|
||||
</ul></li>
|
||||
<li><p>Clone the JDK repository using the Cygwin command line <code>hg</code> client as instructed in this document. That is, do <em>not</em> use another Mercurial client such as TortoiseHg.</p></li>
|
||||
</ul>
|
||||
<p>Failure to follow this procedure might result in hard-to-debug build problems.</p></li>
|
||||
</ul>
|
||||
@@ -195,7 +191,7 @@
|
||||
<p>Windows XP is not a supported platform, but all newer Windows should be able to build the JDK.</p>
|
||||
<p>On Windows, it is important that you pay attention to the instructions in the <a href="#special-considerations">Special Considerations</a>.</p>
|
||||
<p>Windows is the only non-POSIX OS supported by the JDK, and as such, requires some extra care. A POSIX support layer is required to build on Windows. Currently, the only supported such layer is Cygwin. (Msys is no longer supported due to a too old bash; msys2 and the new Windows Subsystem for Linux (WSL) would likely be possible to support in a future version but that would require effort to implement.)</p>
|
||||
<p>Internally in the build system, all paths are represented as Unix-style paths, e.g. <code>/cygdrive/c/git/jdk/Makefile</code> rather than <code>C:\git\jdk\Makefile</code>. This rule also applies to input to the build system, e.g. in arguments to <code>configure</code>. So, use <code>--with-msvcr-dll=/cygdrive/c/msvcr100.dll</code> rather than <code>--with-msvcr-dll=c:\msvcr100.dll</code>. For details on this conversion, see the section on <a href="#fixpath">Fixpath</a>.</p>
|
||||
<p>Internally in the build system, all paths are represented as Unix-style paths, e.g. <code>/cygdrive/c/hg/jdk9/Makefile</code> rather than <code>C:\hg\jdk9\Makefile</code>. This rule also applies to input to the build system, e.g. in arguments to <code>configure</code>. So, use <code>--with-msvcr-dll=/cygdrive/c/msvcr100.dll</code> rather than <code>--with-msvcr-dll=c:\msvcr100.dll</code>. For details on this conversion, see the section on <a href="#fixpath">Fixpath</a>.</p>
|
||||
<h4 id="cygwin">Cygwin</h4>
|
||||
<p>A functioning <a href="http://www.cygwin.com/">Cygwin</a> environment is thus required for building the JDK on Windows. If you have a 64-bit OS, we strongly recommend using the 64-bit version of Cygwin.</p>
|
||||
<p><strong>Note:</strong> Cygwin has a model of continuously updating all packages without any easy way to install or revert to a specific version of a package. This means that whenever you add or update a package in Cygwin, you might (inadvertently) update tools that are used by the JDK build process, and that can cause unexpected build problems.</p>
|
||||
@@ -281,7 +277,7 @@
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td style="text-align: left;">Windows</td>
|
||||
<td style="text-align: left;">Microsoft Visual Studio 2017 update 15.9.16</td>
|
||||
<td style="text-align: left;">Microsoft Visual Studio 2017 update 15.5.5</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -357,7 +353,7 @@ cc: Sun C 5.13 SunOS_i386 2014/10/20
|
||||
$ CC -V
|
||||
CC: Sun C++ 5.13 SunOS_i386 151846-10 2015/10/30</code></pre>
|
||||
<h3 id="microsoft-visual-studio">Microsoft Visual Studio</h3>
|
||||
<p>The minimum accepted version of Visual Studio is 2010. Older versions will not be accepted by <code>configure</code>. The maximum accepted version of Visual Studio is 2019. Versions older than 2017 are unlikely to continue working for long.</p>
|
||||
<p>The minimum accepted version of Visual Studio is 2010. Older versions will not be accepted by <code>configure</code>. The maximum accepted version of Visual Studio is 2017. Versions older than 2017 are unlikely to continue working for long.</p>
|
||||
<p>If you have multiple versions of Visual Studio installed, <code>configure</code> will by default pick the latest. You can request a specific version to be used by setting <code>--with-toolchain-version</code>, e.g. <code>--with-toolchain-version=2015</code>.</p>
|
||||
<p>If you get <code>LINK: fatal error LNK1123: failure during conversion to COFF: file invalid</code> when building using Visual Studio 2010, you have encountered <a href="http://support.microsoft.com/kb/2757355">KB2757355</a>, a bug triggered by a specific installation order. However, the solution suggested by the KB article does not always resolve the problem. See <a href="https://stackoverflow.com/questions/10888391">this stackoverflow discussion</a> for other suggestions.</p>
|
||||
<h3 id="ibm-xl-cc">IBM XL C/C++</h3>
|
||||
@@ -373,10 +369,10 @@ CC: Sun C++ 5.13 SunOS_i386 151846-10 2015/10/30</code></pre>
|
||||
<p>On Linux you can also get a JDK from the Linux distribution. On apt-based distros (like Debian and Ubuntu), <code>sudo apt-get install openjdk-<VERSION>-jdk</code> is typically enough to install a JDK <VERSION>. On rpm-based distros (like Fedora and Red Hat), try <code>sudo yum install java-<VERSION>-openjdk-devel</code>.</p>
|
||||
<h2 id="external-library-requirements">External Library Requirements</h2>
|
||||
<p>Different platforms require different external libraries. In general, libraries are not optional - that is, they are either required or not used.</p>
|
||||
<p>If a required library is not detected by <code>configure</code>, you need to provide the path to it. There are two forms of the <code>configure</code> arguments to point to an external library: <code>--with-<LIB>=<path></code> or <code>--with-<LIB>-include=<path to include> --with-<LIB>-lib=<path to lib></code>. The first variant is more concise, but require the include files and library files to reside in a default hierarchy under this directory. In most cases, it works fine.</p>
|
||||
<p>If a required library is not detected by <code>configure</code>, you need to provide the path to it. There are two forms of the <code>configure</code> arguments to point to an external library: <code>--with-<LIB>=<path></code> or <code>--with-<LIB>-include=<path to include> --with-<LIB>-lib=<path to lib></code>. The first variant is more concise, but require the include files an library files to reside in a default hierarchy under this directory. In most cases, it works fine.</p>
|
||||
<p>As a fallback, the second version allows you to point to the include directory and the lib directory separately.</p>
|
||||
<h3 id="freetype">FreeType</h3>
|
||||
<p>FreeType2 from <a href="http://www.freetype.org/">The FreeType Project</a> is not required on any platform. The exception is on Unix-based platforms when configuring such that the build artifacts will reference a system installed library, rather than bundling the JDK's own copy.</p>
|
||||
<p>FreeType2 from <a href="http://www.freetype.org/">The FreeType Project</a> is not required on any platform. The exception is on Unix-based platforms when configuring such that the build artifacts will reference a system installed library, rather than bundling the JDK’s own copy.</p>
|
||||
<ul>
|
||||
<li>To install on an apt-based Linux, try running <code>sudo apt-get install libfreetype6-dev</code>.</li>
|
||||
<li>To install on an rpm-based Linux, try running <code>sudo yum install freetype-devel</code>.</li>
|
||||
@@ -437,7 +433,7 @@ CC: Sun C++ 5.13 SunOS_i386 151846-10 2015/10/30</code></pre>
|
||||
<p>To build the JDK, you need a "configuration", which consists of a directory where to store the build output, coupled with information about the platform, the specific build machine, and choices that affect how the JDK is built.</p>
|
||||
<p>The configuration is created by the <code>configure</code> script. The basic invocation of the <code>configure</code> script looks like this:</p>
|
||||
<pre><code>bash configure [options]</code></pre>
|
||||
<p>This will create an output directory containing the configuration and setup an area for the build result. This directory typically looks like <code>build/linux-x64-server-release</code>, but the actual name depends on your specific configuration. (It can also be set directly, see <a href="#using-multiple-configurations">Using Multiple Configurations</a>). This directory is referred to as <code>$BUILD</code> in this documentation.</p>
|
||||
<p>This will create an output directory containing the configuration and setup an area for the build result. This directory typically looks like <code>build/linux-x64-normal-server-release</code>, but the actual name depends on your specific configuration. (It can also be set directly, see <a href="#using-multiple-configurations">Using Multiple Configurations</a>). This directory is referred to as <code>$BUILD</code> in this documentation.</p>
|
||||
<p><code>configure</code> will try to figure out what system you are running on and where all necessary build components are. If you have all prerequisites for building installed, it should find everything. If it fails to detect any component automatically, it will exit and inform you about the problem.</p>
|
||||
<p>Some command line examples:</p>
|
||||
<ul>
|
||||
@@ -569,47 +565,6 @@ CC: Sun C++ 5.13 SunOS_i386 151846-10 2015/10/30</code></pre>
|
||||
<p>This requires a more complex setup and build procedure. This section assumes you are familiar with cross-compiling in general, and will only deal with the particularities of cross-compiling the JDK. If you are new to cross-compiling, please see the <a href="https://en.wikipedia.org/wiki/Cross_compiler#External_links">external links at Wikipedia</a> for a good start on reading materials.</p>
|
||||
<p>Cross-compiling the JDK requires you to be able to build both for the build platform and for the target platform. The reason for the former is that we need to build and execute tools during the build process, both native tools and Java tools.</p>
|
||||
<p>If all you want to do is to compile a 32-bit version, for the same OS, on a 64-bit machine, consider using <code>--with-target-bits=32</code> instead of doing a full-blown cross-compilation. (While this surely is possible, it's a lot more work and will take much longer to build.)</p>
|
||||
<h3 id="cross-compiling-the-easy-way-with-openjdk-devkits">Cross compiling the easy way with OpenJDK devkits</h3>
|
||||
<p>The OpenJDK build system provides out-of-the box support for creating and using so called devkits. A <code>devkit</code> is basically a collection of a cross-compiling toolchain and a sysroot environment which can easily be used together with the <code>--with-devkit</code> configure option to cross compile the OpenJDK. On Linux/x86_64, the following command:</p>
|
||||
<pre><code>bash configure --with-devkit=<devkit-path> --openjdk-target=ppc64-linux-gnu && make</code></pre>
|
||||
<p>will configure and build OpenJDK for Linux/ppc64 assuming that <code><devkit-path></code> points to a Linux/x86_64 to Linux/ppc64 devkit.</p>
|
||||
<p>Devkits can be created from the <code>make/devkit</code> directory by executing:</p>
|
||||
<pre><code>make [ TARGETS="<TARGET_TRIPLET>+" ] [ BASE_OS=<OS> ] [ BASE_OS_VERSION=<VER> ]</code></pre>
|
||||
<p>where <code>TARGETS</code> contains one or more <code>TARGET_TRIPLET</code>s of the form described in <a href="https://sourceware.org/autobook/autobook/autobook_17.html">section 3.4 of the GNU Autobook</a>. If no targets are given, a native toolchain for the current platform will be created. Currently, at least the following targets are known to work:</p>
|
||||
<table>
|
||||
<thead>
|
||||
<tr class="header">
|
||||
<th>Supported devkit targets</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="odd">
|
||||
<td>x86_64-linux-gnu</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td>aarch64-linux-gnu</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td>arm-linux-gnueabihf</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td>ppc64-linux-gnu</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td>ppc64le-linux-gnu</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td>s390x-linux-gnu</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p><code>BASE_OS</code> must be one of "OEL6" for Oracle Enterprise Linux 6 or "Fedora" (if not specified "OEL6" will be the default). If the base OS is "Fedora" the corresponding Fedora release can be specified with the help of the <code>BASE_OS_VERSION</code> option (with "27" as default version). If the build is successful, the new devkits can be found in the <code>build/devkit/result</code> subdirectory:</p>
|
||||
<pre><code>cd make/devkit
|
||||
make TARGETS="ppc64le-linux-gnu aarch64-linux-gnu" BASE_OS=Fedora BASE_OS_VERSION=21
|
||||
ls -1 ../../build/devkit/result/
|
||||
x86_64-linux-gnu-to-aarch64-linux-gnu
|
||||
x86_64-linux-gnu-to-ppc64le-linux-gnu</code></pre>
|
||||
<p>Notice that devkits are not only useful for targeting different build platforms. Because they contain the full build dependencies for a system (i.e. compiler and root file system), they can easily be used to build well-known, reliable and reproducible build environments. You can for example create and use a devkit with GCC 7.3 and a Fedora 12 sysroot environment (with glibc 2.11) on Ubuntu 14.04 (which doesn't have GCC 7.3 by default) to produce OpenJDK binaries which will run on all Linux systems with runtime libraries newer than the ones from Fedora 12 (e.g. Ubuntu 16.04, SLES 11 or RHEL 6).</p>
|
||||
<h3 id="boot-jdk-and-build-jdk">Boot JDK and Build JDK</h3>
|
||||
<p>When cross-compiling, make sure you use a boot JDK that runs on the <em>build</em> system, and not on the <em>target</em> system.</p>
|
||||
<p>To be able to build, we need a "Build JDK", which is a JDK built from the current sources (that is, the same as the end result of the entire build process), but able to run on the <em>build</em> system, and not the <em>target</em> system. (In contrast, the Boot JDK should be from an older release, e.g. JDK 8 when building JDK 9.)</p>
|
||||
@@ -679,72 +634,6 @@ cp: cannot stat `arm-linux-gnueabihf/libSM.so': No such file or directory
|
||||
cp: cannot stat `arm-linux-gnueabihf/libXt.so': No such file or directory</code></pre></li>
|
||||
<li><p>If the X11 libraries are not properly detected by <code>configure</code>, you can point them out by <code>--with-x</code>.</p></li>
|
||||
</ul>
|
||||
<h3 id="creating-and-using-sysroots-with-qemu-deboostrap">Creating And Using Sysroots With qemu-deboostrap</h3>
|
||||
<p>Fortunately, you can create sysroots for foreign architectures with tools provided by your OS. On Debian/Ubuntu systems, one could use <code>qemu-deboostrap</code> to create the <em>target</em> system chroot, which would have the native libraries and headers specific to that <em>target</em> system. After that, we can use the cross-compiler on the <em>build</em> system, pointing into chroot to get the build dependencies right. This allows building for foreign architectures with native compilation speed.</p>
|
||||
<p>For example, cross-compiling to AArch64 from x86_64 could be done like this:</p>
|
||||
<ul>
|
||||
<li><p>Install cross-compiler on the <em>build</em> system:</p>
|
||||
<pre><code>apt install g++-aarch64-linux-gnu gcc-aarch64-linux-gnu</code></pre></li>
|
||||
<li><p>Create chroot on the <em>build</em> system, configuring it for <em>target</em> system:</p>
|
||||
<pre><code>sudo qemu-debootstrap --arch=arm64 --verbose \
|
||||
--include=fakeroot,build-essential,libx11-dev,libxext-dev,libxrender-dev,libxtst-dev,libxt-dev,libcups2-dev,libfontconfig1-dev,libasound2-dev,libfreetype6-dev,libpng12-dev \
|
||||
--resolve-deps jessie /chroots/arm64 http://httpredir.debian.org/debian/</code></pre></li>
|
||||
<li><p>Configure and build with newly created chroot as sysroot/toolchain-path:</p>
|
||||
<pre><code>CC=aarch64-linux-gnu-gcc CXX=aarch64-linux-gnu-g++ sh ./configure --openjdk-target=aarch64-linux-gnu --with-sysroot=/chroots/arm64/ --with-toolchain-path=/chroots/arm64/
|
||||
make images
|
||||
ls build/linux-aarch64-normal-server-release/</code></pre></li>
|
||||
</ul>
|
||||
<p>The build does not create new files in that chroot, so it can be reused for multiple builds without additional cleanup.</p>
|
||||
<p>Architectures that are known to successfully cross-compile like this are:</p>
|
||||
<table>
|
||||
<thead>
|
||||
<tr class="header">
|
||||
<th style="text-align: left;">Target</th>
|
||||
<th style="text-align: left;"><code>CC</code></th>
|
||||
<th style="text-align: left;"><code>CXX</code></th>
|
||||
<th><code>--arch=...</code></th>
|
||||
<th><code>--openjdk-target=...</code></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="odd">
|
||||
<td style="text-align: left;">x86</td>
|
||||
<td style="text-align: left;">default</td>
|
||||
<td style="text-align: left;">default</td>
|
||||
<td>i386</td>
|
||||
<td>i386-linux-gnu</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td style="text-align: left;">armhf</td>
|
||||
<td style="text-align: left;">gcc-arm-linux-gnueabihf</td>
|
||||
<td style="text-align: left;">g++-arm-linux-gnueabihf</td>
|
||||
<td>armhf</td>
|
||||
<td>arm-linux-gnueabihf</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td style="text-align: left;">aarch64</td>
|
||||
<td style="text-align: left;">gcc-aarch64-linux-gnu</td>
|
||||
<td style="text-align: left;">g++-aarch64-linux-gnu</td>
|
||||
<td>arm64</td>
|
||||
<td>aarch64-linux-gnu</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td style="text-align: left;">ppc64el</td>
|
||||
<td style="text-align: left;">gcc-powerpc64le-linux-gnu</td>
|
||||
<td style="text-align: left;">g++-powerpc64le-linux-gnu</td>
|
||||
<td>ppc64el</td>
|
||||
<td>powerpc64le-linux-gnu</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td style="text-align: left;">s390x</td>
|
||||
<td style="text-align: left;">gcc-s390x-linux-gnu</td>
|
||||
<td style="text-align: left;">g++-s390x-linux-gnu</td>
|
||||
<td>s390x</td>
|
||||
<td>s390x-linux-gnu</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p>Additional architectures might be supported by Debian/Ubuntu Ports.</p>
|
||||
<h3 id="building-for-armaarch64">Building for ARM/aarch64</h3>
|
||||
<p>A common cross-compilation target is the ARM CPU. When building for ARM, it is useful to set the ABI profile. A number of pre-defined ABI profiles are available using <code>--with-abi-profile</code>: arm-vfp-sflt, arm-vfp-hflt, arm-sflt, armv5-vfp-sflt, armv6-vfp-hflt. Note that soft-float ABIs are no longer properly supported by the JDK.</p>
|
||||
<p>The JDK contains two different ports for the aarch64 platform, one is the original aarch64 port from the <a href="http://openjdk.java.net/projects/aarch64-port">AArch64 Port Project</a> and one is a 64-bit version of the Oracle contributed ARM port. When targeting aarch64, by the default the original aarch64 port is used. To select the Oracle ARM 64 port, use <code>--with-cpu-port=arm64</code>. Also set the corresponding value (<code>aarch64</code> or <code>arm64</code>) to --with-abi-profile, to ensure a consistent build.</p>
|
||||
@@ -791,14 +680,14 @@ ls build/linux-aarch64-normal-server-release/</code></pre></li>
|
||||
|
||||
=== Output from failing command(s) repeated here ===
|
||||
* For target hotspot_variant-server_libjvm_objs_psMemoryPool.o:
|
||||
/localhome/git/jdk-sandbox/hotspot/src/share/vm/services/psMemoryPool.cpp:1:1: error: 'failhere' does not name a type
|
||||
/localhome/hg/jdk9-sandbox/hotspot/src/share/vm/services/psMemoryPool.cpp:1:1: error: 'failhere' does not name a type
|
||||
... (rest of output omitted)
|
||||
|
||||
* All command lines available in /localhome/git/jdk-sandbox/build/linux-x64/make-support/failure-logs.
|
||||
* All command lines available in /localhome/hg/jdk9-sandbox/build/linux-x64/make-support/failure-logs.
|
||||
=== End of repeated output ===
|
||||
|
||||
=== Make failed targets repeated here ===
|
||||
lib/CompileJvm.gmk:207: recipe for target '/localhome/git/jdk-sandbox/build/linux-x64/hotspot/variant-server/libjvm/objs/psMemoryPool.o' failed
|
||||
lib/CompileJvm.gmk:207: recipe for target '/localhome/hg/jdk9-sandbox/build/linux-x64/hotspot/variant-server/libjvm/objs/psMemoryPool.o' failed
|
||||
make/Main.gmk:263: recipe for target 'hotspot-server-libs' failed
|
||||
=== End of repeated output ===
|
||||
|
||||
@@ -821,11 +710,11 @@ Hint: If caused by a warning, try configure --disable-warnings-as-errors.</code>
|
||||
<p>Verify that the summary at the end looks correct. Are you indeed using the Boot JDK and native toolchain that you expect?</p>
|
||||
<p>By default, the JDK has a strict approach where warnings from the compiler is considered errors which fail the build. For very new or very old compiler versions, this can trigger new classes of warnings, which thus fails the build. Run <code>configure</code> with <code>--disable-warnings-as-errors</code> to turn of this behavior. (The warnings will still show, but not make the build fail.)</p>
|
||||
<h4 id="problems-with-incremental-rebuilds">Problems with Incremental Rebuilds</h4>
|
||||
<p>Incremental rebuilds mean that when you modify part of the product, only the affected parts get rebuilt. While this works great in most cases, and significantly speed up the development process, from time to time complex interdependencies will result in an incorrect build result. This is the most common cause for unexpected build problems.</p>
|
||||
<p>Incremental rebuilds mean that when you modify part of the product, only the affected parts get rebuilt. While this works great in most cases, and significantly speed up the development process, from time to time complex interdependencies will result in an incorrect build result. This is the most common cause for unexpected build problems, together with inconsistencies between the different Mercurial repositories in the forest.</p>
|
||||
<p>Here are a suggested list of things to try if you are having unexpected build problems. Each step requires more time than the one before, so try them in order. Most issues will be solved at step 1 or 2.</p>
|
||||
<ol type="1">
|
||||
<li><p>Make sure your repository is up-to-date</p>
|
||||
<p>Run <code>git pull origin master</code> to make sure you have the latest changes.</p></li>
|
||||
<li><p>Make sure your forest is up-to-date</p>
|
||||
<p>Run <code>bash get_source.sh</code> to make sure you have the latest version of all repositories.</p></li>
|
||||
<li><p>Clean build results</p>
|
||||
<p>The simplest way to fix incremental rebuild issues is to run <code>make clean</code>. This will remove all build results, but not the configuration or any build system support artifacts. In most cases, this will solve build errors resulting from incremental build mismatches.</p></li>
|
||||
<li><p>Completely clean the build directory.</p>
|
||||
@@ -834,8 +723,8 @@ Hint: If caused by a warning, try configure --disable-warnings-as-errors.</code>
|
||||
make dist-clean
|
||||
bash configure $(cat current-configuration)
|
||||
make</code></pre></li>
|
||||
<li><p>Re-clone the Git repository</p>
|
||||
<p>Sometimes the Git repository gets in a state that causes the product to be un-buildable. In such a case, the simplest solution is often the "sledgehammer approach": delete the entire repository, and re-clone it. If you have local changes, save them first to a different location using <code>git format-patch</code>.</p></li>
|
||||
<li><p>Re-clone the Mercurial forest</p>
|
||||
<p>Sometimes the Mercurial repositories themselves gets in a state that causes the product to be un-buildable. In such a case, the simplest solution is often the "sledgehammer approach": delete the entire forest, and re-clone it. If you have local changes, save them first to a different location using <code>hg export</code>.</p></li>
|
||||
</ol>
|
||||
<h3 id="specific-build-issues">Specific Build Issues</h3>
|
||||
<h4 id="clock-skew">Clock Skew</h4>
|
||||
@@ -857,6 +746,20 @@ spawn failed</code></pre>
|
||||
<p>If none of the suggestions in this document helps you, or if you find what you believe is a bug in the build system, please contact the Build Group by sending a mail to <a href="mailto:build-dev@openjdk.java.net">build-dev@openjdk.java.net</a>. Please include the relevant parts of the configure and/or build log.</p>
|
||||
<p>If you need general help or advice about developing for the JDK, you can also contact the Adoption Group. See the section on <a href="#contributing-to-openjdk">Contributing to OpenJDK</a> for more information.</p>
|
||||
<h2 id="hints-and-suggestions-for-advanced-users">Hints and Suggestions for Advanced Users</h2>
|
||||
<h3 id="setting-up-a-forest-for-pushing-changes-defpath">Setting Up a Forest for Pushing Changes (defpath)</h3>
|
||||
<p>To help you prepare a proper push path for a Mercurial repository, there exists a useful tool known as <a href="http://openjdk.java.net/projects/code-tools/defpath">defpath</a>. It will help you setup a proper push path for pushing changes to the JDK.</p>
|
||||
<p>Install the extension by cloning <code>http://hg.openjdk.java.net/code-tools/defpath</code> and updating your <code>.hgrc</code> file. Here's one way to do this:</p>
|
||||
<pre><code>cd ~
|
||||
mkdir hg-ext
|
||||
cd hg-ext
|
||||
hg clone http://hg.openjdk.java.net/code-tools/defpath
|
||||
cat << EOT >> ~/.hgrc
|
||||
[extensions]
|
||||
defpath=~/hg-ext/defpath/defpath.py
|
||||
EOT</code></pre>
|
||||
<p>You can now setup a proper push path using:</p>
|
||||
<pre><code>hg defpath -d -u <your OpenJDK username></code></pre>
|
||||
<p>If you also have the <code>trees</code> extension installed in Mercurial, you will automatically get a <code>tdefpath</code> command, which is even more useful. By running <code>hg tdefpath -du <username></code> in the top repository of your forest, all repos will get setup automatically. This is the recommended usage.</p>
|
||||
<h3 id="bash-completion">Bash Completion</h3>
|
||||
<p>The <code>configure</code> and <code>make</code> commands tries to play nice with bash command-line completion (using <code><tab></code> or <code><tab><tab></code>). To use this functionality, make sure you enable completion in your <code>~/.bashrc</code> (see instructions for bash in your operating system).</p>
|
||||
<p>Make completion will work out of the box, and will complete valid make targets. For instance, typing <code>make jdk-i<tab></code> will complete to <code>make jdk-image</code>.</p>
|
||||
@@ -910,6 +813,14 @@ sudo mv /tmp/configure /usr/local/bin</code></pre>
|
||||
<h4 id="rebuilding-part-of-java.base-jdk_filter">Rebuilding Part of java.base (JDK_FILTER)</h4>
|
||||
<p>If you are modifying files in <code>java.base</code>, which is the by far largest module in the JDK, then you need to rebuild all those files whenever a single file has changed. (This inefficiency will hopefully be addressed in JDK 10.)</p>
|
||||
<p>As a hack, you can use the make control variable <code>JDK_FILTER</code> to specify a pattern that will be used to limit the set of files being recompiled. For instance, <code>make java.base JDK_FILTER=javax/crypto</code> (or, to combine methods, <code>make java.base-java-only JDK_FILTER=javax/crypto</code>) will limit the compilation to files in the <code>javax.crypto</code> package.</p>
|
||||
<h3 id="learn-about-mercurial">Learn About Mercurial</h3>
|
||||
<p>To become an efficient JDK developer, it is recommended that you invest in learning Mercurial properly. Here are some links that can get you started:</p>
|
||||
<ul>
|
||||
<li><a href="http://www.mercurial-scm.org/wiki/GitConcepts">Mercurial for git users</a></li>
|
||||
<li><a href="http://www.mercurial-scm.org/wiki/Tutorial">The official Mercurial tutorial</a></li>
|
||||
<li><a href="http://hginit.com/">hg init</a></li>
|
||||
<li><a href="http://hgbook.red-bean.com/read/">Mercurial: The Definitive Guide</a></li>
|
||||
</ul>
|
||||
<h2 id="understanding-the-build-system">Understanding the Build System</h2>
|
||||
<p>This section will give you a more technical description on the details of the build system.</p>
|
||||
<h3 id="configurations">Configurations</h3>
|
||||
|
||||
219
doc/building.md
219
doc/building.md
@@ -3,11 +3,11 @@
|
||||
## TL;DR (Instructions for the Impatient)
|
||||
|
||||
If you are eager to try out building the JDK, these simple steps works most of
|
||||
the time. They assume that you have installed Git (and Cygwin if running
|
||||
the time. They assume that you have installed Mercurial (and Cygwin if running
|
||||
on Windows) and cloned the top-level JDK repository that you want to build.
|
||||
|
||||
1. [Get the complete source code](#getting-the-source-code): \
|
||||
`git clone https://git.openjdk.java.net/jdk/`
|
||||
`hg clone http://hg.openjdk.java.net/jdk/jdk`
|
||||
|
||||
2. [Run configure](#running-configure): \
|
||||
`bash configure`
|
||||
@@ -47,14 +47,14 @@ JDK.
|
||||
|
||||
Make sure you are getting the correct version. As of JDK 10, the source is no
|
||||
longer split into separate repositories so you only need to clone one single
|
||||
repository. At the [OpenJDK Git site](https://git.openjdk.java.net/) you
|
||||
can see a list of all available repositories. If you want to build an older version,
|
||||
repository. At the [OpenJDK Mercurial server](http://hg.openjdk.java.net/) you
|
||||
can see a list of all available forests. If you want to build an older version,
|
||||
e.g. JDK 8, it is recommended that you get the `jdk8u` forest, which contains
|
||||
incremental updates, instead of the `jdk8` forest, which was frozen at JDK 8 GA.
|
||||
|
||||
If you are new to Git, a good place to start is the book [Pro
|
||||
Git](https://git-scm.com/book/en/v2). The rest of this document
|
||||
assumes a working knowledge of Git.
|
||||
If you are new to Mercurial, a good place to start is the [Mercurial Beginner's
|
||||
Guide](http://www.mercurial-scm.org/guide). The rest of this document assumes a
|
||||
working knowledge of Mercurial.
|
||||
|
||||
### Special Considerations
|
||||
|
||||
@@ -89,21 +89,9 @@ on where and how to check out the source code.
|
||||
directory. This is especially important if your user name contains
|
||||
spaces and/or mixed upper and lower case letters.
|
||||
|
||||
* You need to install a git client. You have two choices, Cygwin git or
|
||||
Git for Windows. Unfortunately there are pros and cons with each choice.
|
||||
|
||||
* The Cygwin `git` client has no line ending issues and understands
|
||||
Cygwin paths (which are used throughout the JDK build system).
|
||||
However, it does not currently work well with the Skara CLI tooling.
|
||||
Please see the [Skara wiki on Git clients](
|
||||
https://wiki.openjdk.java.net/display/SKARA/Skara#Skara-Git) for
|
||||
up-to-date information about the Skara git client support.
|
||||
|
||||
* The [Git for Windows](https://gitforwindows.org) client has issues
|
||||
with line endings, and do not understand Cygwin paths. It does work
|
||||
well with the Skara CLI tooling, however. To alleviate the line ending
|
||||
problems, make sure you set `core.autocrlf` to `false` (this is asked
|
||||
during installation).
|
||||
* Clone the JDK repository using the Cygwin command line `hg` client
|
||||
as instructed in this document. That is, do *not* use another Mercurial
|
||||
client such as TortoiseHg.
|
||||
|
||||
Failure to follow this procedure might result in hard-to-debug build
|
||||
problems.
|
||||
@@ -183,7 +171,7 @@ supported due to a too old bash; msys2 and the new Windows Subsystem for Linux
|
||||
require effort to implement.)
|
||||
|
||||
Internally in the build system, all paths are represented as Unix-style paths,
|
||||
e.g. `/cygdrive/c/git/jdk/Makefile` rather than `C:\git\jdk\Makefile`. This
|
||||
e.g. `/cygdrive/c/hg/jdk9/Makefile` rather than `C:\hg\jdk9\Makefile`. This
|
||||
rule also applies to input to the build system, e.g. in arguments to
|
||||
`configure`. So, use `--with-msvcr-dll=/cygdrive/c/msvcr100.dll` rather than
|
||||
`--with-msvcr-dll=c:\msvcr100.dll`. For details on this conversion, see the section
|
||||
@@ -305,7 +293,7 @@ issues.
|
||||
Linux gcc 7.3.0
|
||||
macOS Apple Xcode 9.4 (using clang 9.1.0)
|
||||
Solaris Oracle Solaris Studio 12.4 (with compiler version 5.13)
|
||||
Windows Microsoft Visual Studio 2017 update 15.9.16
|
||||
Windows Microsoft Visual Studio 2017 update 15.5.5
|
||||
|
||||
### gcc
|
||||
|
||||
@@ -383,7 +371,7 @@ CC: Sun C++ 5.13 SunOS_i386 151846-10 2015/10/30
|
||||
|
||||
The minimum accepted version of Visual Studio is 2010. Older versions will not
|
||||
be accepted by `configure`. The maximum accepted version of Visual Studio is
|
||||
2019. Versions older than 2017 are unlikely to continue working for long.
|
||||
2017. Versions older than 2017 are unlikely to continue working for long.
|
||||
|
||||
If you have multiple versions of Visual Studio installed, `configure` will by
|
||||
default pick the latest. You can request a specific version to be used by
|
||||
@@ -448,8 +436,8 @@ If a required library is not detected by `configure`, you need to provide the
|
||||
path to it. There are two forms of the `configure` arguments to point to an
|
||||
external library: `--with-<LIB>=<path>` or `--with-<LIB>-include=<path to
|
||||
include> --with-<LIB>-lib=<path to lib>`. The first variant is more concise,
|
||||
but require the include files and library files to reside in a default
|
||||
hierarchy under this directory. In most cases, it works fine.
|
||||
but require the include files an library files to reside in a default hierarchy
|
||||
under this directory. In most cases, it works fine.
|
||||
|
||||
As a fallback, the second version allows you to point to the include directory
|
||||
and the lib directory separately.
|
||||
@@ -459,7 +447,7 @@ and the lib directory separately.
|
||||
FreeType2 from [The FreeType Project](http://www.freetype.org/) is not required
|
||||
on any platform. The exception is on Unix-based platforms when configuring such
|
||||
that the build artifacts will reference a system installed library,
|
||||
rather than bundling the JDK's own copy.
|
||||
rather than bundling the JDK’s own copy.
|
||||
|
||||
* To install on an apt-based Linux, try running `sudo apt-get install
|
||||
libfreetype6-dev`.
|
||||
@@ -598,8 +586,8 @@ bash configure [options]
|
||||
|
||||
This will create an output directory containing the configuration and setup an
|
||||
area for the build result. This directory typically looks like
|
||||
`build/linux-x64-server-release`, but the actual name depends on your specific
|
||||
configuration. (It can also be set directly, see [Using Multiple
|
||||
`build/linux-x64-normal-server-release`, but the actual name depends on your
|
||||
specific configuration. (It can also be set directly, see [Using Multiple
|
||||
Configurations](#using-multiple-configurations)). This directory is referred to
|
||||
as `$BUILD` in this documentation.
|
||||
|
||||
@@ -887,64 +875,6 @@ If all you want to do is to compile a 32-bit version, for the same OS, on a
|
||||
full-blown cross-compilation. (While this surely is possible, it's a lot more
|
||||
work and will take much longer to build.)
|
||||
|
||||
### Cross compiling the easy way with OpenJDK devkits
|
||||
|
||||
The OpenJDK build system provides out-of-the box support for creating and using
|
||||
so called devkits. A `devkit` is basically a collection of a cross-compiling
|
||||
toolchain and a sysroot environment which can easily be used together with the
|
||||
`--with-devkit` configure option to cross compile the OpenJDK. On Linux/x86_64,
|
||||
the following command:
|
||||
```
|
||||
bash configure --with-devkit=<devkit-path> --openjdk-target=ppc64-linux-gnu && make
|
||||
```
|
||||
|
||||
will configure and build OpenJDK for Linux/ppc64 assuming that `<devkit-path>`
|
||||
points to a Linux/x86_64 to Linux/ppc64 devkit.
|
||||
|
||||
Devkits can be created from the `make/devkit` directory by executing:
|
||||
```
|
||||
make [ TARGETS="<TARGET_TRIPLET>+" ] [ BASE_OS=<OS> ] [ BASE_OS_VERSION=<VER> ]
|
||||
```
|
||||
|
||||
where `TARGETS` contains one or more `TARGET_TRIPLET`s of the form
|
||||
described in [section 3.4 of the GNU Autobook](
|
||||
https://sourceware.org/autobook/autobook/autobook_17.html). If no
|
||||
targets are given, a native toolchain for the current platform will be
|
||||
created. Currently, at least the following targets are known to work:
|
||||
|
||||
Supported devkit targets
|
||||
------------------------
|
||||
x86_64-linux-gnu
|
||||
aarch64-linux-gnu
|
||||
arm-linux-gnueabihf
|
||||
ppc64-linux-gnu
|
||||
ppc64le-linux-gnu
|
||||
s390x-linux-gnu
|
||||
|
||||
`BASE_OS` must be one of "OEL6" for Oracle Enterprise Linux 6 or
|
||||
"Fedora" (if not specified "OEL6" will be the default). If the base OS
|
||||
is "Fedora" the corresponding Fedora release can be specified with the
|
||||
help of the `BASE_OS_VERSION` option (with "27" as default version).
|
||||
If the build is successful, the new devkits can be found in the
|
||||
`build/devkit/result` subdirectory:
|
||||
```
|
||||
cd make/devkit
|
||||
make TARGETS="ppc64le-linux-gnu aarch64-linux-gnu" BASE_OS=Fedora BASE_OS_VERSION=21
|
||||
ls -1 ../../build/devkit/result/
|
||||
x86_64-linux-gnu-to-aarch64-linux-gnu
|
||||
x86_64-linux-gnu-to-ppc64le-linux-gnu
|
||||
```
|
||||
|
||||
Notice that devkits are not only useful for targeting different build
|
||||
platforms. Because they contain the full build dependencies for a
|
||||
system (i.e. compiler and root file system), they can easily be used
|
||||
to build well-known, reliable and reproducible build environments. You
|
||||
can for example create and use a devkit with GCC 7.3 and a Fedora 12
|
||||
sysroot environment (with glibc 2.11) on Ubuntu 14.04 (which doesn't
|
||||
have GCC 7.3 by default) to produce OpenJDK binaries which will run on
|
||||
all Linux systems with runtime libraries newer than the ones from
|
||||
Fedora 12 (e.g. Ubuntu 16.04, SLES 11 or RHEL 6).
|
||||
|
||||
### Boot JDK and Build JDK
|
||||
|
||||
When cross-compiling, make sure you use a boot JDK that runs on the *build*
|
||||
@@ -1088,51 +1018,6 @@ Note that X11 is needed even if you only want to build a headless JDK.
|
||||
* If the X11 libraries are not properly detected by `configure`, you can
|
||||
point them out by `--with-x`.
|
||||
|
||||
### Creating And Using Sysroots With qemu-deboostrap
|
||||
|
||||
Fortunately, you can create sysroots for foreign architectures with tools
|
||||
provided by your OS. On Debian/Ubuntu systems, one could use `qemu-deboostrap` to
|
||||
create the *target* system chroot, which would have the native libraries and headers
|
||||
specific to that *target* system. After that, we can use the cross-compiler on the *build*
|
||||
system, pointing into chroot to get the build dependencies right. This allows building
|
||||
for foreign architectures with native compilation speed.
|
||||
|
||||
For example, cross-compiling to AArch64 from x86_64 could be done like this:
|
||||
|
||||
* Install cross-compiler on the *build* system:
|
||||
```
|
||||
apt install g++-aarch64-linux-gnu gcc-aarch64-linux-gnu
|
||||
```
|
||||
|
||||
* Create chroot on the *build* system, configuring it for *target* system:
|
||||
```
|
||||
sudo qemu-debootstrap --arch=arm64 --verbose \
|
||||
--include=fakeroot,build-essential,libx11-dev,libxext-dev,libxrender-dev,libxtst-dev,libxt-dev,libcups2-dev,libfontconfig1-dev,libasound2-dev,libfreetype6-dev,libpng12-dev \
|
||||
--resolve-deps jessie /chroots/arm64 http://httpredir.debian.org/debian/
|
||||
```
|
||||
|
||||
* Configure and build with newly created chroot as sysroot/toolchain-path:
|
||||
```
|
||||
CC=aarch64-linux-gnu-gcc CXX=aarch64-linux-gnu-g++ sh ./configure --openjdk-target=aarch64-linux-gnu --with-sysroot=/chroots/arm64/ --with-toolchain-path=/chroots/arm64/
|
||||
make images
|
||||
ls build/linux-aarch64-normal-server-release/
|
||||
```
|
||||
|
||||
The build does not create new files in that chroot, so it can be reused for multiple builds
|
||||
without additional cleanup.
|
||||
|
||||
Architectures that are known to successfully cross-compile like this are:
|
||||
|
||||
Target `CC` `CXX` `--arch=...` `--openjdk-target=...`
|
||||
------------ ------------------------- --------------------------- ------------ ----------------------
|
||||
x86 default default i386 i386-linux-gnu
|
||||
armhf gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf armhf arm-linux-gnueabihf
|
||||
aarch64 gcc-aarch64-linux-gnu g++-aarch64-linux-gnu arm64 aarch64-linux-gnu
|
||||
ppc64el gcc-powerpc64le-linux-gnu g++-powerpc64le-linux-gnu ppc64el powerpc64le-linux-gnu
|
||||
s390x gcc-s390x-linux-gnu g++-s390x-linux-gnu s390x s390x-linux-gnu
|
||||
|
||||
Additional architectures might be supported by Debian/Ubuntu Ports.
|
||||
|
||||
### Building for ARM/aarch64
|
||||
|
||||
A common cross-compilation target is the ARM CPU. When building for ARM, it is
|
||||
@@ -1273,14 +1158,14 @@ ERROR: Build failed for target 'hotspot' in configuration 'linux-x64' (exit code
|
||||
|
||||
=== Output from failing command(s) repeated here ===
|
||||
* For target hotspot_variant-server_libjvm_objs_psMemoryPool.o:
|
||||
/localhome/git/jdk-sandbox/hotspot/src/share/vm/services/psMemoryPool.cpp:1:1: error: 'failhere' does not name a type
|
||||
/localhome/hg/jdk9-sandbox/hotspot/src/share/vm/services/psMemoryPool.cpp:1:1: error: 'failhere' does not name a type
|
||||
... (rest of output omitted)
|
||||
|
||||
* All command lines available in /localhome/git/jdk-sandbox/build/linux-x64/make-support/failure-logs.
|
||||
* All command lines available in /localhome/hg/jdk9-sandbox/build/linux-x64/make-support/failure-logs.
|
||||
=== End of repeated output ===
|
||||
|
||||
=== Make failed targets repeated here ===
|
||||
lib/CompileJvm.gmk:207: recipe for target '/localhome/git/jdk-sandbox/build/linux-x64/hotspot/variant-server/libjvm/objs/psMemoryPool.o' failed
|
||||
lib/CompileJvm.gmk:207: recipe for target '/localhome/hg/jdk9-sandbox/build/linux-x64/hotspot/variant-server/libjvm/objs/psMemoryPool.o' failed
|
||||
make/Main.gmk:263: recipe for target 'hotspot-server-libs' failed
|
||||
=== End of repeated output ===
|
||||
|
||||
@@ -1370,15 +1255,17 @@ Incremental rebuilds mean that when you modify part of the product, only the
|
||||
affected parts get rebuilt. While this works great in most cases, and
|
||||
significantly speed up the development process, from time to time complex
|
||||
interdependencies will result in an incorrect build result. This is the most
|
||||
common cause for unexpected build problems.
|
||||
common cause for unexpected build problems, together with inconsistencies
|
||||
between the different Mercurial repositories in the forest.
|
||||
|
||||
Here are a suggested list of things to try if you are having unexpected build
|
||||
problems. Each step requires more time than the one before, so try them in
|
||||
order. Most issues will be solved at step 1 or 2.
|
||||
|
||||
1. Make sure your repository is up-to-date
|
||||
1. Make sure your forest is up-to-date
|
||||
|
||||
Run `git pull origin master` to make sure you have the latest changes.
|
||||
Run `bash get_source.sh` to make sure you have the latest version of all
|
||||
repositories.
|
||||
|
||||
2. Clean build results
|
||||
|
||||
@@ -1403,13 +1290,13 @@ order. Most issues will be solved at step 1 or 2.
|
||||
make
|
||||
```
|
||||
|
||||
4. Re-clone the Git repository
|
||||
4. Re-clone the Mercurial forest
|
||||
|
||||
Sometimes the Git repository gets in a state that causes the product
|
||||
to be un-buildable. In such a case, the simplest solution is often the
|
||||
"sledgehammer approach": delete the entire repository, and re-clone it.
|
||||
If you have local changes, save them first to a different location using
|
||||
`git format-patch`.
|
||||
Sometimes the Mercurial repositories themselves gets in a state that causes
|
||||
the product to be un-buildable. In such a case, the simplest solution is
|
||||
often the "sledgehammer approach": delete the entire forest, and re-clone
|
||||
it. If you have local changes, save them first to a different location
|
||||
using `hg export`.
|
||||
|
||||
### Specific Build Issues
|
||||
|
||||
@@ -1460,6 +1347,38 @@ contact the Adoption Group. See the section on [Contributing to OpenJDK](
|
||||
|
||||
## Hints and Suggestions for Advanced Users
|
||||
|
||||
### Setting Up a Forest for Pushing Changes (defpath)
|
||||
|
||||
To help you prepare a proper push path for a Mercurial repository, there exists
|
||||
a useful tool known as [defpath](
|
||||
http://openjdk.java.net/projects/code-tools/defpath). It will help you setup a
|
||||
proper push path for pushing changes to the JDK.
|
||||
|
||||
Install the extension by cloning
|
||||
`http://hg.openjdk.java.net/code-tools/defpath` and updating your `.hgrc` file.
|
||||
Here's one way to do this:
|
||||
|
||||
```
|
||||
cd ~
|
||||
mkdir hg-ext
|
||||
cd hg-ext
|
||||
hg clone http://hg.openjdk.java.net/code-tools/defpath
|
||||
cat << EOT >> ~/.hgrc
|
||||
[extensions]
|
||||
defpath=~/hg-ext/defpath/defpath.py
|
||||
EOT
|
||||
```
|
||||
|
||||
You can now setup a proper push path using:
|
||||
```
|
||||
hg defpath -d -u <your OpenJDK username>
|
||||
```
|
||||
|
||||
If you also have the `trees` extension installed in Mercurial, you will
|
||||
automatically get a `tdefpath` command, which is even more useful. By running
|
||||
`hg tdefpath -du <username>` in the top repository of your forest, all repos
|
||||
will get setup automatically. This is the recommended usage.
|
||||
|
||||
### Bash Completion
|
||||
|
||||
The `configure` and `make` commands tries to play nice with bash command-line
|
||||
@@ -1602,6 +1521,16 @@ instance, `make java.base JDK_FILTER=javax/crypto` (or, to combine methods,
|
||||
`make java.base-java-only JDK_FILTER=javax/crypto`) will limit the compilation
|
||||
to files in the `javax.crypto` package.
|
||||
|
||||
### Learn About Mercurial
|
||||
|
||||
To become an efficient JDK developer, it is recommended that you invest in
|
||||
learning Mercurial properly. Here are some links that can get you started:
|
||||
|
||||
* [Mercurial for git users](http://www.mercurial-scm.org/wiki/GitConcepts)
|
||||
* [The official Mercurial tutorial](http://www.mercurial-scm.org/wiki/Tutorial)
|
||||
* [hg init](http://hginit.com/)
|
||||
* [Mercurial: The Definitive Guide](http://hgbook.red-bean.com/read/)
|
||||
|
||||
## Understanding the Build System
|
||||
|
||||
This section will give you a more technical description on the details of the
|
||||
|
||||
54
doc/ide.html
54
doc/ide.html
@@ -1,54 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang="">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="generator" content="pandoc" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
|
||||
<title>IDE support in the JDK</title>
|
||||
<style type="text/css">
|
||||
code{white-space: pre-wrap;}
|
||||
span.smallcaps{font-variant: small-caps;}
|
||||
span.underline{text-decoration: underline;}
|
||||
div.column{display: inline-block; vertical-align: top; width: 50%;}
|
||||
</style>
|
||||
<link rel="stylesheet" href="../make/data/docs-resources/resources/jdk-default.css" />
|
||||
<!--[if lt IE 9]>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
|
||||
<![endif]-->
|
||||
</head>
|
||||
<body>
|
||||
<header id="title-block-header">
|
||||
<h1 class="title">IDE support in the JDK</h1>
|
||||
</header>
|
||||
<nav id="TOC">
|
||||
<ul>
|
||||
<li><a href="#introduction">Introduction</a><ul>
|
||||
<li><a href="#ide-support-for-native-code">IDE support for native code</a></li>
|
||||
<li><a href="#ide-support-for-java-code">IDE support for Java code</a></li>
|
||||
</ul></li>
|
||||
</ul>
|
||||
</nav>
|
||||
<h2 id="introduction">Introduction</h2>
|
||||
<p>When you are familiar with building and testing the JDK, you may want to configure an IDE to work with the source code. The instructions differ a bit depending on whether you are interested in working with the native (C/C++) or the Java code.</p>
|
||||
<h3 id="ide-support-for-native-code">IDE support for native code</h3>
|
||||
<p>There are a few ways to generate IDE configuration for the native sources, depending on which IDE to use.</p>
|
||||
<h4 id="visual-studio-code">Visual Studio Code</h4>
|
||||
<p>The make system can generate a <a href="https://code.visualstudio.com">Visual Studio Code</a> workspace that has C/C++ source indexing configured correctly, as well as launcher targets for tests and the Java launcher. After configuring, a workspace for the configuration can be generated using:</p>
|
||||
<pre class="shell"><code>make vscode-project</code></pre>
|
||||
<p>This creates a file called <code>jdk.code-workspace</code> in the build output folder. The full location will be printed after the workspace has been generated. To use it, choose <code>File -> Open Workspace...</code> in Visual Studio Code.</p>
|
||||
<h5 id="alternative-indexers">Alternative indexers</h5>
|
||||
<p>The main <code>vscode-project</code> target configures the default C++ support in Visual Studio Code. There are also other source indexers that can be installed, that may provide additional features. It's currently possible to generate configuration for two such indexers, <a href="https://clang.llvm.org/extra/clangd/">clangd</a> and <a href="https://github.com/Andersbakken/rtags">rtags</a>. These can be configured by appending the name of the indexer to the make target, such as:</p>
|
||||
<pre class="shell"><code>make vscode-project-clangd</code></pre>
|
||||
<p>Additional instructions for configuring the given indexer will be displayed after the workspace has been generated.</p>
|
||||
<h4 id="visual-studio">Visual Studio</h4>
|
||||
<p>This section is a work in progress.</p>
|
||||
<pre class="shell"><code>make ide-project</code></pre>
|
||||
<h4 id="compilation-database">Compilation Database</h4>
|
||||
<p>The make system can generate generic native code indexing support in the form of a <a href="https://clang.llvm.org/docs/JSONCompilationDatabase.html">Compilation Database</a> that can be used by many different IDEs and source code indexers.</p>
|
||||
<pre class="shell"><code>make compile-commands</code></pre>
|
||||
<p>It's also possible to generate the Compilation Database for the HotSpot source code only, which is a bit faster as it includes less information.</p>
|
||||
<pre class="shell"><code>make compile-commands-hotspot</code></pre>
|
||||
<h3 id="ide-support-for-java-code">IDE support for Java code</h3>
|
||||
<p>This section is a work in progress.</p>
|
||||
</body>
|
||||
</html>
|
||||
73
doc/ide.md
73
doc/ide.md
@@ -1,73 +0,0 @@
|
||||
% IDE support in the JDK
|
||||
|
||||
## Introduction
|
||||
|
||||
When you are familiar with building and testing the JDK, you may want to
|
||||
configure an IDE to work with the source code. The instructions differ a bit
|
||||
depending on whether you are interested in working with the native (C/C++) or
|
||||
the Java code.
|
||||
|
||||
### IDE support for native code
|
||||
|
||||
There are a few ways to generate IDE configuration for the native sources,
|
||||
depending on which IDE to use.
|
||||
|
||||
#### Visual Studio Code
|
||||
|
||||
The make system can generate a [Visual Studio Code](https://code.visualstudio.com)
|
||||
workspace that has C/C++ source indexing configured correctly, as well as
|
||||
launcher targets for tests and the Java launcher. After configuring, a workspace
|
||||
for the configuration can be generated using:
|
||||
|
||||
```shell
|
||||
make vscode-project
|
||||
```
|
||||
|
||||
This creates a file called `jdk.code-workspace` in the build output folder. The
|
||||
full location will be printed after the workspace has been generated. To use it,
|
||||
choose `File -> Open Workspace...` in Visual Studio Code.
|
||||
|
||||
##### Alternative indexers
|
||||
|
||||
The main `vscode-project` target configures the default C++ support in Visual
|
||||
Studio Code. There are also other source indexers that can be installed, that
|
||||
may provide additional features. It's currently possible to generate
|
||||
configuration for two such indexers, [clangd](https://clang.llvm.org/extra/clangd/)
|
||||
and [rtags](https://github.com/Andersbakken/rtags). These can be configured by
|
||||
appending the name of the indexer to the make target, such as:
|
||||
|
||||
```shell
|
||||
make vscode-project-clangd
|
||||
```
|
||||
|
||||
Additional instructions for configuring the given indexer will be displayed
|
||||
after the workspace has been generated.
|
||||
|
||||
#### Visual Studio
|
||||
|
||||
This section is a work in progress.
|
||||
|
||||
```shell
|
||||
make ide-project
|
||||
```
|
||||
|
||||
#### Compilation Database
|
||||
|
||||
The make system can generate generic native code indexing support in the form of
|
||||
a [Compilation Database](https://clang.llvm.org/docs/JSONCompilationDatabase.html)
|
||||
that can be used by many different IDEs and source code indexers.
|
||||
|
||||
```shell
|
||||
make compile-commands
|
||||
```
|
||||
|
||||
It's also possible to generate the Compilation Database for the HotSpot source
|
||||
code only, which is a bit faster as it includes less information.
|
||||
|
||||
```shell
|
||||
make compile-commands-hotspot
|
||||
```
|
||||
|
||||
### IDE support for Java code
|
||||
|
||||
This section is a work in progress.
|
||||
@@ -11,14 +11,14 @@
|
||||
span.underline{text-decoration: underline;}
|
||||
div.column{display: inline-block; vertical-align: top; width: 50%;}
|
||||
</style>
|
||||
<link rel="stylesheet" href="../make/data/docs-resources/resources/jdk-default.css" />
|
||||
<link rel="stylesheet" href="../make/data/docs-resources/resources/jdk-default.css">
|
||||
<!--[if lt IE 9]>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
|
||||
<![endif]-->
|
||||
<style type="text/css">pre, code, tt { color: #1d6ae5; }</style>
|
||||
</head>
|
||||
<body>
|
||||
<header id="title-block-header">
|
||||
<header>
|
||||
<h1 class="title">Testing the JDK</h1>
|
||||
</header>
|
||||
<nav id="TOC">
|
||||
@@ -32,13 +32,11 @@
|
||||
</ul></li>
|
||||
<li><a href="#test-results-and-summary">Test results and summary</a></li>
|
||||
<li><a href="#test-suite-control">Test suite control</a><ul>
|
||||
<li><a href="#general-keywords-test_opts">General keywords (TEST_OPTS)</a></li>
|
||||
<li><a href="#jtreg-keywords">JTReg keywords</a></li>
|
||||
<li><a href="#gtest-keywords">Gtest keywords</a></li>
|
||||
</ul></li>
|
||||
<li><a href="#notes-for-specific-tests">Notes for Specific Tests</a><ul>
|
||||
<li><a href="#docker-tests">Docker Tests</a></li>
|
||||
<li><a href="#client-ui-tests">Client UI Tests</a></li>
|
||||
</ul></li>
|
||||
</ul>
|
||||
</nav>
|
||||
@@ -91,24 +89,11 @@ TEST FAILURE</code></pre>
|
||||
<p>To separate multiple keyword=value pairs, use <code>;</code> (semicolon). Since the shell normally eats <code>;</code>, the recommended usage is to write the assignment inside qoutes, e.g. <code>JTREG="...;..."</code>. This will also make sure spaces are preserved, as in <code>JTREG="VM_OPTIONS=-XshowSettings -Xlog:gc+ref=debug"</code>.</p>
|
||||
<p>(Other ways are possible, e.g. using backslash: <code>JTREG=JOBS=1\;TIMEOUT=8</code>. Also, as a special technique, the string <code>%20</code> will be replaced with space for certain options, e.g. <code>JTREG=VM_OPTIONS=-XshowSettings%20-Xlog:gc+ref=debug</code>. This can be useful if you have layers of scripts and have trouble getting proper quoting of command line arguments through.)</p>
|
||||
<p>As far as possible, the names of the keywords have been standardized between test suites.</p>
|
||||
<h3 id="general-keywords-test_opts">General keywords (TEST_OPTS)</h3>
|
||||
<p>Some keywords are valid across different test suites. If you want to run tests from multiple test suites, or just don’t want to care which test suite specific control variable to use, then you can use the general TEST_OPTS control variable.</p>
|
||||
<p>There are also some keywords that applies globally to the test runner system, not to any specific test suites. These are also available as TEST_OPTS keywords.</p>
|
||||
<h4 id="jobs">JOBS</h4>
|
||||
<p>Currently only applies to JTReg.</p>
|
||||
<h4 id="timeout_factor">TIMEOUT_FACTOR</h4>
|
||||
<p>Currently only applies to JTReg.</p>
|
||||
<h4 id="vm_options">VM_OPTIONS</h4>
|
||||
<p>Applies to JTReg, GTest and Micro.</p>
|
||||
<h4 id="java_options">JAVA_OPTIONS</h4>
|
||||
<p>Applies to JTReg, GTest and Micro.</p>
|
||||
<h4 id="aot_modules">AOT_MODULES</h4>
|
||||
<p>Applies to JTReg and GTest.</p>
|
||||
<h3 id="jtreg-keywords">JTReg keywords</h3>
|
||||
<h4 id="jobs-1">JOBS</h4>
|
||||
<h4 id="jobs">JOBS</h4>
|
||||
<p>The test concurrency (<code>-concurrency</code>).</p>
|
||||
<p>Defaults to TEST_JOBS (if set by <code>--with-test-jobs=</code>), otherwise it defaults to JOBS, except for Hotspot, where the default is <em>number of CPU cores/2</em>, but never more than 12.</p>
|
||||
<h4 id="timeout_factor-1">TIMEOUT_FACTOR</h4>
|
||||
<h4 id="timeout">TIMEOUT</h4>
|
||||
<p>The timeout factor (<code>-timeoutFactor</code>).</p>
|
||||
<p>Defaults to 4.</p>
|
||||
<h4 id="test_mode">TEST_MODE</h4>
|
||||
@@ -127,21 +112,13 @@ TEST FAILURE</code></pre>
|
||||
<p>Limit memory consumption (<code>-Xmx</code> and <code>-vmoption:-Xmx</code>, or none).</p>
|
||||
<p>Limit memory consumption for JTReg test framework and VM under test. Set to 0 to disable the limits.</p>
|
||||
<p>Defaults to 512m, except for hotspot, where it defaults to 0 (no limit).</p>
|
||||
<h4 id="keywords">KEYWORDS</h4>
|
||||
<p>JTReg kewords sent to JTReg using <code>-k</code>. Please be careful in making sure that spaces and special characters (like <code>!</code>) are properly quoted. To avoid some issues, the special value <code>%20</code> can be used instead of space.</p>
|
||||
<h4 id="extra_problem_lists">EXTRA_PROBLEM_LISTS</h4>
|
||||
<p>Use additional problem lists file or files, in addition to the default ProblemList.txt located at the JTReg test roots.</p>
|
||||
<p>If multiple file names are specified, they should be separated by space (or, to help avoid quoting issues, the special value <code>%20</code>).</p>
|
||||
<p>The file names should be either absolute, or relative to the JTReg test root of the tests to be run.</p>
|
||||
<h4 id="options">OPTIONS</h4>
|
||||
<p>Additional options to the JTReg test framework.</p>
|
||||
<p>Use <code>JTREG="OPTIONS=--help all"</code> to see all available JTReg options.</p>
|
||||
<h4 id="java_options-1">JAVA_OPTIONS</h4>
|
||||
<h4 id="java_options">JAVA_OPTIONS</h4>
|
||||
<p>Additional Java options to JTReg (<code>-javaoption</code>).</p>
|
||||
<h4 id="vm_options-1">VM_OPTIONS</h4>
|
||||
<h4 id="vm_options">VM_OPTIONS</h4>
|
||||
<p>Additional VM options to JTReg (<code>-vmoption</code>).</p>
|
||||
<h4 id="aot_modules-1">AOT_MODULES</h4>
|
||||
<p>Generate AOT modules before testing for the specified module, or set of modules. If multiple modules are specified, they should be separated by space (or, to help avoid quoting issues, the special value <code>%20</code>).</p>
|
||||
<h3 id="gtest-keywords">Gtest keywords</h3>
|
||||
<h4 id="repeat">REPEAT</h4>
|
||||
<p>The number of times to repeat the tests (<code>--gtest_repeat</code>).</p>
|
||||
@@ -149,23 +126,11 @@ TEST FAILURE</code></pre>
|
||||
<h4 id="options-1">OPTIONS</h4>
|
||||
<p>Additional options to the Gtest test framework.</p>
|
||||
<p>Use <code>GTEST="OPTIONS=--help"</code> to see all available Gtest options.</p>
|
||||
<h4 id="aot_modules-2">AOT_MODULES</h4>
|
||||
<p>Generate AOT modules before testing for the specified module, or set of modules. If multiple modules are specified, they should be separated by space (or, to help avoid quoting issues, the special value <code>%20</code>).</p>
|
||||
<h2 id="notes-for-specific-tests">Notes for Specific Tests</h2>
|
||||
<h3 id="docker-tests">Docker Tests</h3>
|
||||
<p>Docker tests with default parameters may fail on systems with glibc versions not compatible with the one used in the default docker image (e.g., Oracle Linux 7.6 for x86). For example, they pass on Ubuntu 16.04 but fail on Ubuntu 18.04 if run like this on x86:</p>
|
||||
<pre><code>$ make run-test TEST="jtreg:test/hotspot/jtreg/containers/docker"</code></pre>
|
||||
<p>To run these tests correctly, additional parameters for the correct docker image are required on Ubuntu 18.04 by using <code>JAVA_OPTIONS</code>.</p>
|
||||
<pre><code>$ make run-test TEST="jtreg:test/hotspot/jtreg/containers/docker" JTREG="JAVA_OPTIONS=-Djdk.test.docker.image.name=ubuntu -Djdk.test.docker.image.version=latest"</code></pre>
|
||||
<h3 id="client-ui-tests">Client UI Tests</h3>
|
||||
<p>Some Client UI tests use key sequences which may be reserved by the operating system. Usually that causes the test failure. So it is highly recommended to disable system key shortcuts prior testing. The steps to access and disable system key shortcuts for various platforms are provided below.</p>
|
||||
<h4 id="macos">MacOS</h4>
|
||||
<p>Choose Apple menu; System Preferences, click Keyboard, then click Shortcuts; select or deselect desired shortcut.</p>
|
||||
<p>For example, test/jdk/javax/swing/TooltipManager/JMenuItemToolTipKeyBindingsTest/JMenuItemToolTipKeyBindingsTest.java fails on MacOS because it uses <code>CTRL + F1</code> key sequence to show or hide tooltip message but the key combination is reserved by the operating system. To run the test correctly the default global key shortcut should be disabled using the steps described above, and then deselect “Turn keyboard access on or off” option which is responsible for <code>CTRL + F1</code> combination.</p>
|
||||
<h4 id="linux">Linux</h4>
|
||||
<p>Open the Activities overview and start typing Settings; Choose Settings, click Devices, then click Keyboard; set or override desired shortcut.</p>
|
||||
<h4 id="windows">Windows</h4>
|
||||
<p>Type <code>gpedit</code> in the Search and then click Edit group policy; navigate to User Configuration -> Administrative Templates -> Windows Components -> File Explorer; in the right-side pane look for “Turn off Windows key hotkeys” and double click on it; enable or disable hotkeys.</p>
|
||||
<p>Note: restart is required to make the settings take effect.</p>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -162,35 +162,6 @@ proper quoting of command line arguments through.)
|
||||
As far as possible, the names of the keywords have been standardized between
|
||||
test suites.
|
||||
|
||||
### General keywords (TEST_OPTS)
|
||||
|
||||
Some keywords are valid across different test suites. If you want to run
|
||||
tests from multiple test suites, or just don't want to care which test suite specific
|
||||
control variable to use, then you can use the general TEST_OPTS control variable.
|
||||
|
||||
There are also some keywords that applies globally to the test runner system,
|
||||
not to any specific test suites. These are also available as TEST_OPTS keywords.
|
||||
|
||||
#### JOBS
|
||||
|
||||
Currently only applies to JTReg.
|
||||
|
||||
#### TIMEOUT_FACTOR
|
||||
|
||||
Currently only applies to JTReg.
|
||||
|
||||
#### VM_OPTIONS
|
||||
|
||||
Applies to JTReg, GTest and Micro.
|
||||
|
||||
#### JAVA_OPTIONS
|
||||
|
||||
Applies to JTReg, GTest and Micro.
|
||||
|
||||
#### AOT_MODULES
|
||||
|
||||
Applies to JTReg and GTest.
|
||||
|
||||
### JTReg keywords
|
||||
|
||||
#### JOBS
|
||||
@@ -200,7 +171,7 @@ Defaults to TEST_JOBS (if set by `--with-test-jobs=`), otherwise it defaults to
|
||||
JOBS, except for Hotspot, where the default is *number of CPU cores/2*, but
|
||||
never more than 12.
|
||||
|
||||
#### TIMEOUT_FACTOR
|
||||
#### TIMEOUT
|
||||
The timeout factor (`-timeoutFactor`).
|
||||
|
||||
Defaults to 4.
|
||||
@@ -234,24 +205,6 @@ to disable the limits.
|
||||
|
||||
Defaults to 512m, except for hotspot, where it defaults to 0 (no limit).
|
||||
|
||||
#### KEYWORDS
|
||||
|
||||
JTReg kewords sent to JTReg using `-k`. Please be careful in making sure that
|
||||
spaces and special characters (like `!`) are properly quoted. To avoid some
|
||||
issues, the special value `%20` can be used instead of space.
|
||||
|
||||
#### EXTRA_PROBLEM_LISTS
|
||||
|
||||
Use additional problem lists file or files, in addition to the default
|
||||
ProblemList.txt located at the JTReg test roots.
|
||||
|
||||
If multiple file names are specified, they should be separated by space (or, to
|
||||
help avoid quoting issues, the special value `%20`).
|
||||
|
||||
The file names should be either absolute, or relative to the JTReg test root of
|
||||
the tests to be run.
|
||||
|
||||
|
||||
#### OPTIONS
|
||||
Additional options to the JTReg test framework.
|
||||
|
||||
@@ -263,12 +216,6 @@ Additional Java options to JTReg (`-javaoption`).
|
||||
#### VM_OPTIONS
|
||||
Additional VM options to JTReg (`-vmoption`).
|
||||
|
||||
#### AOT_MODULES
|
||||
|
||||
Generate AOT modules before testing for the specified module, or set of
|
||||
modules. If multiple modules are specified, they should be separated by space
|
||||
(or, to help avoid quoting issues, the special value `%20`).
|
||||
|
||||
### Gtest keywords
|
||||
|
||||
#### REPEAT
|
||||
@@ -283,12 +230,6 @@ Additional options to the Gtest test framework.
|
||||
|
||||
Use `GTEST="OPTIONS=--help"` to see all available Gtest options.
|
||||
|
||||
#### AOT_MODULES
|
||||
|
||||
Generate AOT modules before testing for the specified module, or set of
|
||||
modules. If multiple modules are specified, they should be separated by space
|
||||
(or, to help avoid quoting issues, the special value `%20`).
|
||||
|
||||
## Notes for Specific Tests
|
||||
|
||||
### Docker Tests
|
||||
@@ -304,35 +245,6 @@ required on Ubuntu 18.04 by using `JAVA_OPTIONS`.
|
||||
|
||||
$ make run-test TEST="jtreg:test/hotspot/jtreg/containers/docker" JTREG="JAVA_OPTIONS=-Djdk.test.docker.image.name=ubuntu -Djdk.test.docker.image.version=latest"
|
||||
|
||||
### Client UI Tests
|
||||
|
||||
Some Client UI tests use key sequences which may be reserved by the operating
|
||||
system. Usually that causes the test failure. So it is highly recommended to disable
|
||||
system key shortcuts prior testing. The steps to access and disable system key shortcuts
|
||||
for various platforms are provided below.
|
||||
|
||||
#### MacOS
|
||||
Choose Apple menu; System Preferences, click Keyboard, then click Shortcuts;
|
||||
select or deselect desired shortcut.
|
||||
|
||||
For example, test/jdk/javax/swing/TooltipManager/JMenuItemToolTipKeyBindingsTest/JMenuItemToolTipKeyBindingsTest.java fails
|
||||
on MacOS because it uses `CTRL + F1` key sequence to show or hide tooltip message
|
||||
but the key combination is reserved by the operating system. To run the test correctly
|
||||
the default global key shortcut should be disabled using the steps described above, and then deselect
|
||||
"Turn keyboard access on or off" option which is responsible for `CTRL + F1` combination.
|
||||
|
||||
#### Linux
|
||||
Open the Activities overview and start typing Settings; Choose Settings, click Devices,
|
||||
then click Keyboard; set or override desired shortcut.
|
||||
|
||||
#### Windows
|
||||
Type `gpedit` in the Search and then click Edit group policy; navigate to
|
||||
User Configuration -> Administrative Templates -> Windows Components -> File Explorer;
|
||||
in the right-side pane look for "Turn off Windows key hotkeys" and double click on it;
|
||||
enable or disable hotkeys.
|
||||
|
||||
Note: restart is required to make the settings take effect.
|
||||
|
||||
---
|
||||
# Override some definitions in the global css file that are not optimal for
|
||||
# this document.
|
||||
|
||||
@@ -1,12 +1,9 @@
|
||||
# jetbrains/runtime:jbr11dev8env
|
||||
# jetbrains/runtime:jbr11env
|
||||
FROM centos:7
|
||||
RUN yum -y install centos-release-scl
|
||||
RUN yum -y install devtoolset-8
|
||||
RUN yum -y install zip bzip2 unzip tar wget make autoconf automake libtool alsa-devel cups-devel xorg-x11-devel libjpeg62-devel giflib-devel freetype-devel file which libXtst-devel libXt-devel libXrender-devel alsa-lib-devel fontconfig-devel libXrandr-devel libXi-devel git
|
||||
|
||||
RUN yum -y install zip bzip2 unzip tar wget make autoconf automake libtool gcc gcc-c++ libstdc++-devel alsa-devel cups-devel xorg-x11-devel libjpeg62-devel giflib-devel freetype-devel file which libXtst-devel libXt-devel libXrender-devel alsa-lib-devel fontconfig-devel libXrandr-devel libXi-devel
|
||||
# Install Java 11
|
||||
RUN wget https://cdn.azul.com/zulu/bin/zulu11.45.27-ca-jdk11.0.10-linux_x64.tar.gz \
|
||||
RUN wget https://bintray.com/jetbrains/intellij-jbr/download_file?file_path=jbrsdk-11_0_3-linux-x64-b360.2.tar.gz \
|
||||
-O - | tar xz -C /
|
||||
ENV JAVA_HOME /zulu11.45.27-ca-jdk11.0.10-linux_x64
|
||||
ENV PATH $JAVA_HOME/bin:/opt/rh/devtoolset-8/root/usr/bin:$PATH
|
||||
RUN git config --global user.email "teamcity@buildserver.intellij.net"
|
||||
RUN git config --global user.name "builduser"
|
||||
ENV JAVA_HOME /jbrsdk
|
||||
ENV PATH $JAVA_HOME/bin:$PATH
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
FROM i386/ubuntu:xenial
|
||||
|
||||
RUN linux32 apt-get update && apt-get install -y --no-install-recommends apt-utils
|
||||
COPY jbrsdk-11.0.5-b1 /jbrsdk-11.0.5-b1
|
||||
RUN linux32 apt-get -y install file build-essential zip unzip curl libx11-dev libxext-dev \
|
||||
libxrender-dev libxrandr-dev libxtst-dev libxt-dev libcups2-dev libasound2-data \
|
||||
libpng12-0 libasound2 libfreetype6 libfontconfig1-dev libasound2-dev autoconf
|
||||
@@ -495,6 +495,7 @@ set(SOURCE_FILES
|
||||
../../../src/hotspot/cpu/aarch64/vtableStubs_aarch64.cpp
|
||||
../../../src/hotspot/cpu/aarch64/relocInfo_aarch64.hpp
|
||||
../../../src/hotspot/cpu/aarch64/vm_version_aarch64.hpp
|
||||
../../../src/hotspot/cpu/aarch64/cpustate_aarch64.hpp
|
||||
../../../src/hotspot/cpu/aarch64/immediate_aarch64.cpp
|
||||
../../../src/hotspot/cpu/aarch64/vmreg_aarch64.cpp
|
||||
../../../src/hotspot/cpu/aarch64/jniFastGetField_aarch64.cpp
|
||||
@@ -519,6 +520,7 @@ set(SOURCE_FILES
|
||||
../../../src/hotspot/cpu/aarch64/c1_FrameMap_aarch64.hpp
|
||||
../../../src/hotspot/cpu/aarch64/templateTable_aarch64.cpp
|
||||
../../../src/hotspot/cpu/aarch64/vmStructs_aarch64.hpp
|
||||
../../../src/hotspot/cpu/aarch64/decode_aarch64.hpp
|
||||
../../../src/hotspot/cpu/aarch64/c1_CodeStubs_aarch64.cpp
|
||||
../../../src/hotspot/cpu/aarch64/nativeInst_aarch64.hpp
|
||||
../../../src/hotspot/cpu/aarch64/codeBuffer_aarch64.hpp
|
||||
@@ -527,6 +529,7 @@ set(SOURCE_FILES
|
||||
../../../src/hotspot/cpu/aarch64/assembler_aarch64.cpp
|
||||
../../../src/hotspot/cpu/aarch64/register_aarch64.cpp
|
||||
../../../src/hotspot/cpu/aarch64/vm_version_ext_aarch64.cpp
|
||||
../../../src/hotspot/cpu/aarch64/aarch64_call.cpp
|
||||
../../../src/hotspot/cpu/aarch64/macroAssembler_aarch64.hpp
|
||||
../../../src/hotspot/cpu/aarch64/bytecodes_aarch64.hpp
|
||||
../../../src/hotspot/cpu/aarch64/c1_MacroAssembler_aarch64.hpp
|
||||
@@ -1172,11 +1175,13 @@ set(SOURCE_FILES
|
||||
../../../src/hotspot/share/jfr/recorder/stringpool/jfrStringPoolBuffer.hpp
|
||||
../../../src/hotspot/share/jfr/recorder/repository/jfrChunkWriter.cpp
|
||||
../../../src/hotspot/share/jfr/recorder/repository/jfrEmergencyDump.hpp
|
||||
../../../src/hotspot/share/jfr/recorder/repository/jfrChunkSizeNotifier.hpp
|
||||
../../../src/hotspot/share/jfr/recorder/repository/jfrChunkState.hpp
|
||||
../../../src/hotspot/share/jfr/recorder/repository/jfrRepository.cpp
|
||||
../../../src/hotspot/share/jfr/recorder/repository/jfrChunkState.cpp
|
||||
../../../src/hotspot/share/jfr/recorder/repository/jfrRepository.hpp
|
||||
../../../src/hotspot/share/jfr/recorder/repository/jfrChunkWriter.hpp
|
||||
../../../src/hotspot/share/jfr/recorder/repository/jfrChunkSizeNotifier.cpp
|
||||
../../../src/hotspot/share/jfr/recorder/repository/jfrEmergencyDump.cpp
|
||||
../../../src/hotspot/share/jfr/recorder/checkpoint/jfrCheckpointBlob.hpp
|
||||
../../../src/hotspot/share/jfr/recorder/checkpoint/jfrCheckpointWriter.cpp
|
||||
@@ -1249,6 +1254,7 @@ set(SOURCE_FILES
|
||||
../../../src/hotspot/share/jfr/leakprofiler/checkpoint/objectSampleDescription.hpp
|
||||
../../../src/hotspot/share/jfr/leakprofiler/checkpoint/rootResolver.hpp
|
||||
../../../src/hotspot/share/jfr/leakprofiler/leakProfiler.hpp
|
||||
../../../src/hotspot/share/jfr/leakprofiler/emitEventOperation.hpp
|
||||
../../../src/hotspot/share/jfr/leakprofiler/sampling/objectSample.hpp
|
||||
../../../src/hotspot/share/jfr/leakprofiler/sampling/objectSampler.hpp
|
||||
../../../src/hotspot/share/jfr/leakprofiler/sampling/sampleList.cpp
|
||||
@@ -1264,6 +1270,7 @@ set(SOURCE_FILES
|
||||
../../../src/hotspot/share/jfr/leakprofiler/utilities/rootType.hpp
|
||||
../../../src/hotspot/share/jfr/leakprofiler/utilities/unifiedOop.hpp
|
||||
../../../src/hotspot/share/jfr/leakprofiler/startOperation.hpp
|
||||
../../../src/hotspot/share/jfr/leakprofiler/emitEventOperation.cpp
|
||||
../../../src/hotspot/share/jfr/leakprofiler/chains/edgeUtils.cpp
|
||||
../../../src/hotspot/share/jfr/leakprofiler/chains/rootSetClosure.cpp
|
||||
../../../src/hotspot/share/jfr/leakprofiler/chains/edge.hpp
|
||||
@@ -1474,6 +1481,7 @@ set(SOURCE_FILES
|
||||
../../../src/hotspot/share/runtime/basicLock.hpp
|
||||
../../../src/hotspot/share/runtime/compilationPolicy.cpp
|
||||
../../../src/hotspot/share/runtime/java.hpp
|
||||
../../../src/hotspot/share/runtime/simpleThresholdPolicy.cpp
|
||||
../../../src/hotspot/share/runtime/objectMonitor.inline.hpp
|
||||
../../../src/hotspot/share/runtime/mutexLocker.cpp
|
||||
../../../src/hotspot/share/runtime/serviceThread.cpp
|
||||
@@ -1516,6 +1524,7 @@ set(SOURCE_FILES
|
||||
../../../src/hotspot/share/runtime/compilationPolicy.hpp
|
||||
../../../src/hotspot/share/runtime/basicLock.cpp
|
||||
../../../src/hotspot/share/runtime/java.cpp
|
||||
../../../src/hotspot/share/runtime/simpleThresholdPolicy.hpp
|
||||
../../../src/hotspot/share/runtime/perfData.inline.hpp
|
||||
../../../src/hotspot/share/runtime/statSampler.hpp
|
||||
../../../src/hotspot/share/runtime/vm_operations.cpp
|
||||
@@ -1548,6 +1557,7 @@ set(SOURCE_FILES
|
||||
../../../src/hotspot/share/runtime/handshake.hpp
|
||||
../../../src/hotspot/share/runtime/thread.inline.hpp
|
||||
../../../src/hotspot/share/runtime/perfMemory.hpp
|
||||
../../../src/hotspot/share/runtime/simpleThresholdPolicy.inline.hpp
|
||||
../../../src/hotspot/share/runtime/javaCalls.cpp
|
||||
../../../src/hotspot/share/runtime/reflection.cpp
|
||||
../../../src/hotspot/share/runtime/icache.cpp
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
set(CMAKE_CXX_STANDARD 98)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_GNU_SOURCE -D_REENTRANT -DVM_LITTLE_ENDIAN -D_LP64 -DTARGET_ARCH_x86 ")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DINCLUDE_SUFFIX_CPU=_x86 -DAMD64 -DHOTSPOT_LIB_ARCH='amd64' -DCOMPILER1 -DCOMPILER2")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DFT2_BUILD_LIBRARY")
|
||||
|
||||
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin" OR ${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DTARGET_COMPILER_gcc")
|
||||
@@ -17,55 +16,15 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_ALLBSD_SOURCE -DTARGET_OS_FAMILY_bsd")
|
||||
endif ()
|
||||
|
||||
if ("${CMAKE_SYSTEM_NAME}" MATCHES "CYGWIN") #not sure about TARGET_COMPILER
|
||||
if ("${CMAKE_SYSTEM_NAME}" MATCHES "CYGWIN") #not shure about TARGET_COMPILER
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DTARGET_COMPILER_visCPP -DWIN64 -D_WINDOWS -DTARGET_OS_FAMILY_windows")
|
||||
endif ()
|
||||
|
||||
add_custom_target(configure
|
||||
COMMAND bash configure --disable-warnings-as-errors
|
||||
COMMAND bash configure
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/../../../)
|
||||
|
||||
add_custom_target(configure_debug
|
||||
COMMAND bash configure --disable-warnings-as-errors --enable-debug
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/../../../)
|
||||
|
||||
if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
set(JDK_RELEASE_TARGET "linux-x86_64-normal-server-release")
|
||||
set(JDK_DEBUG_TARGET "linux-x86_64-normal-server-fastdebug")
|
||||
endif ()
|
||||
|
||||
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
set(JDK_RELEASE_TARGET "macosx-x86_64-normal-server-release")
|
||||
set(JDK_DEBUG_TARGET "macosx-x86_64-normal-server-fastdebug")
|
||||
add_compile_definitions(MACOSX)
|
||||
endif ()
|
||||
|
||||
add_custom_target(build
|
||||
COMMAND make CONF=${JDK_RELEASE_TARGET}
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/../../../
|
||||
DEPENDS ${SOURCE_FILES})
|
||||
|
||||
add_custom_target(build_images
|
||||
COMMAND make images CONF=${JDK_RELEASE_TARGET}
|
||||
COMMAND make COMPILER_WARNINGS_FATAL=false images
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/../../../
|
||||
DEPENDS ${SOURCE_FILES})
|
||||
|
||||
add_custom_target(build_debug
|
||||
COMMAND make CONF=${JDK_DEBUG_TARGET}
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/../../../
|
||||
DEPENDS ${SOURCE_FILES})
|
||||
|
||||
add_custom_target(build_images_debug
|
||||
COMMAND make images CONF=${JDK_DEBUG_TARGET}
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/../../../
|
||||
DEPENDS ${SOURCE_FILES})
|
||||
|
||||
add_custom_target(make_clean
|
||||
COMMAND make clean CONF=${JDK_RELEASE_TARGET}
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/../../../
|
||||
DEPENDS ${SOURCE_FILES})
|
||||
|
||||
add_custom_target(make_clean_debug
|
||||
COMMAND make clean CONF=${JDK_DEBUG_TARGET}
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/../../../
|
||||
DEPENDS ${SOURCE_FILES})
|
||||
DEPENDS ${SOURCE_FILES})
|
||||
@@ -6,7 +6,6 @@ include(../java-common.cmake)
|
||||
include_directories(
|
||||
../../../src/java.base/share/native/include
|
||||
../../../src/java.base/share/native/libjava
|
||||
../../../src/java.base/share/native/libzip/zlib
|
||||
../../../src/java.desktop/share/native/common
|
||||
../../../src/java.desktop/share/native/common/awt/debug
|
||||
../../../src/java.desktop/share/native/common/font
|
||||
@@ -59,7 +58,6 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin" OR ${CMAKE_SYSTEM_NAME} MATCHES "Linux"
|
||||
../../../src/java.desktop/unix/native/common/font
|
||||
../../../src/java.desktop/unix/native/common/java2d/opengl
|
||||
../../../src/java.desktop/unix/native/common/java2d/opengl/J2D_GL
|
||||
../../../src/java.desktop/unix/native/common/java2d/x11
|
||||
../../../src/java.desktop/unix/native/common
|
||||
../../../src/java.desktop/unix/native/include
|
||||
../../../src/java.desktop/unix/native/libawt/java2d
|
||||
@@ -194,19 +192,16 @@ set(SOURCE_FILES
|
||||
../../../src/java.desktop/share/native/libfreetype/include/freetype/fttypes.h
|
||||
../../../src/java.desktop/share/native/libfreetype/include/freetype/ftparams.h
|
||||
../../../src/java.desktop/share/native/libfreetype/include/freetype/ftmm.h
|
||||
../../../src/java.desktop/share/native/libfreetype/include/freetype/config
|
||||
../../../src/java.desktop/share/native/libfreetype/include/freetype/config/ftstdlib.h
|
||||
../../../src/java.desktop/share/native/libfreetype/include/freetype/config/ftheader.h
|
||||
../../../src/java.desktop/share/native/libfreetype/include/freetype/config/ftconfig.h
|
||||
../../../src/java.desktop/share/native/libfreetype/include/freetype/config/ftoption.h
|
||||
../../../src/java.desktop/share/native/libfreetype/include/freetype/config/ftmodule.h
|
||||
../../../src/java.desktop/share/native/libfreetype/include/freetype/ftcolor.h
|
||||
../../../src/java.desktop/share/native/libfreetype/include/freetype/ftmodapi.h
|
||||
../../../src/java.desktop/share/native/libfreetype/include/freetype/fttrigon.h
|
||||
../../../src/java.desktop/share/native/libfreetype/include/freetype/ftbbox.h
|
||||
../../../src/java.desktop/share/native/libfreetype/include/freetype/ftgzip.h
|
||||
../../../src/java.desktop/share/native/libfreetype/include/freetype/ftdriver.h
|
||||
../../../src/java.desktop/share/native/libfreetype/include/freetype/internal
|
||||
../../../src/java.desktop/share/native/libfreetype/include/freetype/internal/sfnt.h
|
||||
../../../src/java.desktop/share/native/libfreetype/include/freetype/internal/internal.h
|
||||
../../../src/java.desktop/share/native/libfreetype/include/freetype/internal/ftdrv.h
|
||||
@@ -221,13 +216,13 @@ set(SOURCE_FILES
|
||||
../../../src/java.desktop/share/native/libfreetype/include/freetype/internal/tttypes.h
|
||||
../../../src/java.desktop/share/native/libfreetype/include/freetype/internal/ftvalid.h
|
||||
../../../src/java.desktop/share/native/libfreetype/include/freetype/internal/ftobjs.h
|
||||
../../../src/java.desktop/share/native/libfreetype/include/freetype/internal/ftpic.h
|
||||
../../../src/java.desktop/share/native/libfreetype/include/freetype/internal/fttrace.h
|
||||
../../../src/java.desktop/share/native/libfreetype/include/freetype/internal/ftmemory.h
|
||||
../../../src/java.desktop/share/native/libfreetype/include/freetype/internal/fthash.h
|
||||
../../../src/java.desktop/share/native/libfreetype/include/freetype/internal/ftgloadr.h
|
||||
../../../src/java.desktop/share/native/libfreetype/include/freetype/internal/ftpsprop.h
|
||||
../../../src/java.desktop/share/native/libfreetype/include/freetype/internal/ftserv.h
|
||||
../../../src/java.desktop/share/native/libfreetype/include/freetype/internal/services
|
||||
../../../src/java.desktop/share/native/libfreetype/include/freetype/internal/services/svprop.h
|
||||
../../../src/java.desktop/share/native/libfreetype/include/freetype/internal/services/svmm.h
|
||||
../../../src/java.desktop/share/native/libfreetype/include/freetype/internal/services/svcfftl.h
|
||||
@@ -277,8 +272,6 @@ set(SOURCE_FILES
|
||||
../../../src/java.desktop/share/native/libfreetype/include/freetype/ftbdf.h
|
||||
../../../src/java.desktop/share/native/libfreetype/include/freetype/ftrender.h
|
||||
../../../src/java.desktop/share/native/libfreetype/include/ft2build.h
|
||||
../../../src/java.desktop/share/native/libfreetype/src
|
||||
../../../src/java.desktop/share/native/libfreetype/src/type1
|
||||
../../../src/java.desktop/share/native/libfreetype/src/type1/t1objs.c
|
||||
../../../src/java.desktop/share/native/libfreetype/src/type1/t1load.h
|
||||
../../../src/java.desktop/share/native/libfreetype/src/type1/t1afm.h
|
||||
@@ -293,42 +286,40 @@ set(SOURCE_FILES
|
||||
../../../src/java.desktop/share/native/libfreetype/src/type1/t1driver.c
|
||||
../../../src/java.desktop/share/native/libfreetype/src/type1/t1parse.c
|
||||
../../../src/java.desktop/share/native/libfreetype/src/type1/t1gload.h
|
||||
../../../src/java.desktop/share/native/libfreetype/src/sfnt
|
||||
../../../src/java.desktop/share/native/libfreetype/src/sfnt/sfobjs.c
|
||||
../../../src/java.desktop/share/native/libfreetype/src/sfnt/ttcmap.h
|
||||
../../../src/java.desktop/share/native/libfreetype/src/sfnt/ttpost.h
|
||||
../../../src/java.desktop/share/native/libfreetype/src/sfnt/sfntpic.h
|
||||
../../../src/java.desktop/share/native/libfreetype/src/sfnt/ttkern.c
|
||||
../../../src/java.desktop/share/native/libfreetype/src/sfnt/ttcolr.h
|
||||
../../../src/java.desktop/share/native/libfreetype/src/sfnt/pngshim.h
|
||||
../../../src/java.desktop/share/native/libfreetype/src/sfnt/ttmtx.c
|
||||
../../../src/java.desktop/share/native/libfreetype/src/sfnt/ttload.h
|
||||
../../../src/java.desktop/share/native/libfreetype/src/sfnt/sfdriver.c
|
||||
../../../src/java.desktop/share/native/libfreetype/src/sfnt/ttsbit.c
|
||||
../../../src/java.desktop/share/native/libfreetype/src/sfnt/ttcmapc.h
|
||||
../../../src/java.desktop/share/native/libfreetype/src/sfnt/ttcpal.c
|
||||
../../../src/java.desktop/share/native/libfreetype/src/sfnt/ttkern.h
|
||||
../../../src/java.desktop/share/native/libfreetype/src/sfnt/ttpost.c
|
||||
../../../src/java.desktop/share/native/libfreetype/src/sfnt/sfntpic.c
|
||||
../../../src/java.desktop/share/native/libfreetype/src/sfnt/sfobjs.h
|
||||
../../../src/java.desktop/share/native/libfreetype/src/sfnt/ttcmap.c
|
||||
../../../src/java.desktop/share/native/libfreetype/src/sfnt/ttmtx.h
|
||||
../../../src/java.desktop/share/native/libfreetype/src/sfnt/pngshim.c
|
||||
../../../src/java.desktop/share/native/libfreetype/src/sfnt/ttcolr.c
|
||||
../../../src/java.desktop/share/native/libfreetype/src/sfnt/ttsbit.h
|
||||
../../../src/java.desktop/share/native/libfreetype/src/sfnt/sfdriver.h
|
||||
../../../src/java.desktop/share/native/libfreetype/src/sfnt/ttload.c
|
||||
../../../src/java.desktop/share/native/libfreetype/src/sfnt/sferrors.h
|
||||
../../../src/java.desktop/share/native/libfreetype/src/sfnt/ttcpal.h
|
||||
../../../src/java.desktop/share/native/libfreetype/src/smooth
|
||||
../../../src/java.desktop/share/native/libfreetype/src/smooth/ftgrays.c
|
||||
../../../src/java.desktop/share/native/libfreetype/src/smooth/ftsmooth.h
|
||||
../../../src/java.desktop/share/native/libfreetype/src/smooth/ftspic.h
|
||||
../../../src/java.desktop/share/native/libfreetype/src/smooth/ftsmerrs.h
|
||||
../../../src/java.desktop/share/native/libfreetype/src/smooth/ftgrays.h
|
||||
../../../src/java.desktop/share/native/libfreetype/src/smooth/ftspic.c
|
||||
../../../src/java.desktop/share/native/libfreetype/src/smooth/ftsmooth.c
|
||||
../../../src/java.desktop/share/native/libfreetype/src/cff
|
||||
../../../src/java.desktop/share/native/libfreetype/src/cff/cffload.h
|
||||
../../../src/java.desktop/share/native/libfreetype/src/cff/cffgload.c
|
||||
../../../src/java.desktop/share/native/libfreetype/src/cff/cffobjs.c
|
||||
../../../src/java.desktop/share/native/libfreetype/src/cff/cffparse.h
|
||||
../../../src/java.desktop/share/native/libfreetype/src/cff/cffpic.h
|
||||
../../../src/java.desktop/share/native/libfreetype/src/cff/cffcmap.h
|
||||
../../../src/java.desktop/share/native/libfreetype/src/cff/cffdrivr.c
|
||||
../../../src/java.desktop/share/native/libfreetype/src/cff/cffparse.c
|
||||
@@ -336,10 +327,10 @@ set(SOURCE_FILES
|
||||
../../../src/java.desktop/share/native/libfreetype/src/cff/cffobjs.h
|
||||
../../../src/java.desktop/share/native/libfreetype/src/cff/cffgload.h
|
||||
../../../src/java.desktop/share/native/libfreetype/src/cff/cffload.c
|
||||
../../../src/java.desktop/share/native/libfreetype/src/cff/cffpic.c
|
||||
../../../src/java.desktop/share/native/libfreetype/src/cff/cffdrivr.h
|
||||
../../../src/java.desktop/share/native/libfreetype/src/cff/cffcmap.c
|
||||
../../../src/java.desktop/share/native/libfreetype/src/cff/cfferrs.h
|
||||
../../../src/java.desktop/share/native/libfreetype/src/psaux
|
||||
../../../src/java.desktop/share/native/libfreetype/src/psaux/psarrst.h
|
||||
../../../src/java.desktop/share/native/libfreetype/src/psaux/psstack.h
|
||||
../../../src/java.desktop/share/native/libfreetype/src/psaux/cffdecode.h
|
||||
@@ -376,7 +367,6 @@ set(SOURCE_FILES
|
||||
../../../src/java.desktop/share/native/libfreetype/src/psaux/afmparse.c
|
||||
../../../src/java.desktop/share/native/libfreetype/src/psaux/psauxmod.h
|
||||
../../../src/java.desktop/share/native/libfreetype/src/psaux/psread.h
|
||||
../../../src/java.desktop/share/native/libfreetype/src/cid
|
||||
../../../src/java.desktop/share/native/libfreetype/src/cid/cidtoken.h
|
||||
../../../src/java.desktop/share/native/libfreetype/src/cid/cidriver.c
|
||||
../../../src/java.desktop/share/native/libfreetype/src/cid/cidparse.c
|
||||
@@ -389,12 +379,11 @@ set(SOURCE_FILES
|
||||
../../../src/java.desktop/share/native/libfreetype/src/cid/cidparse.h
|
||||
../../../src/java.desktop/share/native/libfreetype/src/cid/cidobjs.c
|
||||
../../../src/java.desktop/share/native/libfreetype/src/cid/cidload.h
|
||||
../../../src/java.desktop/share/native/libfreetype/src/autofit
|
||||
../../../src/java.desktop/share/native/libfreetype/src/autofit/afindic.h
|
||||
../../../src/java.desktop/share/native/libfreetype/src/autofit/afdummy.h
|
||||
../../../src/java.desktop/share/native/libfreetype/src/autofit/afmodule.h
|
||||
../../../src/java.desktop/share/native/libfreetype/src/autofit/afwarp.c
|
||||
../../../src/java.desktop/share/native/libfreetype/src/autofit/afblue.cin
|
||||
../../../src/java.desktop/share/native/libfreetype/src/autofit/afpic.c
|
||||
../../../src/java.desktop/share/native/libfreetype/src/autofit/afglobal.c
|
||||
../../../src/java.desktop/share/native/libfreetype/src/autofit/afcover.h
|
||||
../../../src/java.desktop/share/native/libfreetype/src/autofit/afwrtsys.h
|
||||
@@ -407,10 +396,10 @@ set(SOURCE_FILES
|
||||
../../../src/java.desktop/share/native/libfreetype/src/autofit/afranges.c
|
||||
../../../src/java.desktop/share/native/libfreetype/src/autofit/afcjk.c
|
||||
../../../src/java.desktop/share/native/libfreetype/src/autofit/afstyles.h
|
||||
../../../src/java.desktop/share/native/libfreetype/src/autofit/afblue.dat
|
||||
../../../src/java.desktop/share/native/libfreetype/src/autofit/aferrors.h
|
||||
../../../src/java.desktop/share/native/libfreetype/src/autofit/afdummy.c
|
||||
../../../src/java.desktop/share/native/libfreetype/src/autofit/afindic.c
|
||||
../../../src/java.desktop/share/native/libfreetype/src/autofit/afpic.h
|
||||
../../../src/java.desktop/share/native/libfreetype/src/autofit/afglobal.h
|
||||
../../../src/java.desktop/share/native/libfreetype/src/autofit/afwarp.h
|
||||
../../../src/java.desktop/share/native/libfreetype/src/autofit/afmodule.c
|
||||
@@ -420,58 +409,64 @@ set(SOURCE_FILES
|
||||
../../../src/java.desktop/share/native/libfreetype/src/autofit/aftypes.h
|
||||
../../../src/java.desktop/share/native/libfreetype/src/autofit/afcjk.h
|
||||
../../../src/java.desktop/share/native/libfreetype/src/autofit/afranges.h
|
||||
../../../src/java.desktop/share/native/libfreetype/src/autofit/afblue.hin
|
||||
../../../src/java.desktop/share/native/libfreetype/src/autofit/afloader.c
|
||||
../../../src/java.desktop/share/native/libfreetype/src/autofit/aflatin.h
|
||||
../../../src/java.desktop/share/native/libfreetype/src/autofit/afangles.h
|
||||
../../../src/java.desktop/share/native/libfreetype/src/autofit/afhints.c
|
||||
../../../src/java.desktop/share/native/libfreetype/src/pshinter
|
||||
../../../src/java.desktop/share/native/libfreetype/src/pshinter/pshmod.c
|
||||
../../../src/java.desktop/share/native/libfreetype/src/pshinter/pshrec.h
|
||||
../../../src/java.desktop/share/native/libfreetype/src/pshinter/pshpic.c
|
||||
../../../src/java.desktop/share/native/libfreetype/src/pshinter/pshglob.h
|
||||
../../../src/java.desktop/share/native/libfreetype/src/pshinter/pshalgo.c
|
||||
../../../src/java.desktop/share/native/libfreetype/src/pshinter/pshmod.h
|
||||
../../../src/java.desktop/share/native/libfreetype/src/pshinter/pshnterr.h
|
||||
../../../src/java.desktop/share/native/libfreetype/src/pshinter/pshpic.h
|
||||
../../../src/java.desktop/share/native/libfreetype/src/pshinter/pshrec.c
|
||||
../../../src/java.desktop/share/native/libfreetype/src/pshinter/pshalgo.h
|
||||
../../../src/java.desktop/share/native/libfreetype/src/pshinter/pshglob.c
|
||||
../../../src/java.desktop/share/native/libfreetype/src/truetype
|
||||
../../../src/java.desktop/share/native/libfreetype/src/truetype/ttinterp.c
|
||||
../../../src/java.desktop/share/native/libfreetype/src/truetype/ttpload.c
|
||||
../../../src/java.desktop/share/native/libfreetype/src/truetype/ttgxvar.c
|
||||
../../../src/java.desktop/share/native/libfreetype/src/truetype/ttsubpix.h
|
||||
../../../src/java.desktop/share/native/libfreetype/src/truetype/tterrors.h
|
||||
../../../src/java.desktop/share/native/libfreetype/src/truetype/ttdriver.h
|
||||
../../../src/java.desktop/share/native/libfreetype/src/truetype/ttpic.h
|
||||
../../../src/java.desktop/share/native/libfreetype/src/truetype/ttobjs.c
|
||||
../../../src/java.desktop/share/native/libfreetype/src/truetype/ttgload.h
|
||||
../../../src/java.desktop/share/native/libfreetype/src/truetype/ttgxvar.h
|
||||
../../../src/java.desktop/share/native/libfreetype/src/truetype/ttpload.h
|
||||
../../../src/java.desktop/share/native/libfreetype/src/truetype/ttinterp.h
|
||||
../../../src/java.desktop/share/native/libfreetype/src/truetype/ttpic.c
|
||||
../../../src/java.desktop/share/native/libfreetype/src/truetype/ttdriver.c
|
||||
../../../src/java.desktop/share/native/libfreetype/src/truetype/ttsubpix.c
|
||||
../../../src/java.desktop/share/native/libfreetype/src/truetype/ttobjs.h
|
||||
../../../src/java.desktop/share/native/libfreetype/src/truetype/ttgload.c
|
||||
../../../src/java.desktop/share/native/libfreetype/src/raster
|
||||
../../../src/java.desktop/share/native/libfreetype/src/raster/ftmisc.h
|
||||
../../../src/java.desktop/share/native/libfreetype/src/raster/rasterrs.h
|
||||
../../../src/java.desktop/share/native/libfreetype/src/raster/rastpic.c
|
||||
../../../src/java.desktop/share/native/libfreetype/src/raster/ftrend1.h
|
||||
../../../src/java.desktop/share/native/libfreetype/src/raster/ftraster.h
|
||||
../../../src/java.desktop/share/native/libfreetype/src/raster/rastpic.h
|
||||
../../../src/java.desktop/share/native/libfreetype/src/raster/ftraster.c
|
||||
../../../src/java.desktop/share/native/libfreetype/src/raster/ftrend1.c
|
||||
../../../src/java.desktop/share/native/libfreetype/src/psnames
|
||||
../../../src/java.desktop/share/native/libfreetype/src/psnames/psnamerr.h
|
||||
../../../src/java.desktop/share/native/libfreetype/src/psnames/psmodule.c
|
||||
../../../src/java.desktop/share/native/libfreetype/src/psnames/pspic.h
|
||||
../../../src/java.desktop/share/native/libfreetype/src/psnames/pstables.h
|
||||
../../../src/java.desktop/share/native/libfreetype/src/psnames/psmodule.h
|
||||
../../../src/java.desktop/share/native/libfreetype/src/base
|
||||
../../../src/java.desktop/share/native/libfreetype/src/psnames/pspic.c
|
||||
../../../src/java.desktop/share/native/libfreetype/src/base/ftobjs.c
|
||||
../../../src/java.desktop/share/native/libfreetype/src/base/ftfntfmt.c
|
||||
../../../src/java.desktop/share/native/libfreetype/src/base/ftinit.c
|
||||
../../../src/java.desktop/share/native/libfreetype/src/base/ftapi.c
|
||||
../../../src/java.desktop/share/native/libfreetype/src/base/ftdbgmem.c
|
||||
../../../src/java.desktop/share/native/libfreetype/src/base/fthash.c
|
||||
../../../src/java.desktop/share/native/libfreetype/src/base/basepic.c
|
||||
../../../src/java.desktop/share/native/libfreetype/src/base/ftpic.c
|
||||
../../../src/java.desktop/share/native/libfreetype/src/base/ftbitmap.c
|
||||
../../../src/java.desktop/share/native/libfreetype/src/base/ftpsprop.c
|
||||
../../../src/java.desktop/share/native/libfreetype/src/base/ftcid.c
|
||||
../../../src/java.desktop/share/native/libfreetype/src/base/md5.h
|
||||
../../../src/java.desktop/share/native/libfreetype/src/base/ftglyph.c
|
||||
../../../src/java.desktop/share/native/libfreetype/src/base/ftgloadr.c
|
||||
../../../src/java.desktop/share/native/libfreetype/src/base/ftsystem.c
|
||||
@@ -485,9 +480,11 @@ set(SOURCE_FILES
|
||||
../../../src/java.desktop/share/native/libfreetype/src/base/ftsnames.c
|
||||
../../../src/java.desktop/share/native/libfreetype/src/base/ftdebug.c
|
||||
../../../src/java.desktop/share/native/libfreetype/src/base/ftmm.c
|
||||
../../../src/java.desktop/share/native/libfreetype/src/base/basepic.h
|
||||
../../../src/java.desktop/share/native/libfreetype/src/base/ftbase.h
|
||||
../../../src/java.desktop/share/native/libfreetype/src/base/ftfstype.c
|
||||
../../../src/java.desktop/share/native/libfreetype/src/base/fttrigon.c
|
||||
../../../src/java.desktop/share/native/libfreetype/src/base/md5.c
|
||||
../../../src/java.desktop/share/native/libfreetype/src/base/ftbbox.c
|
||||
../../../src/java.desktop/share/native/libfreetype/src/base/ftstroke.c
|
||||
../../../src/java.desktop/share/native/libfreetype/src/base/ftgasp.c
|
||||
@@ -745,214 +742,38 @@ set(SOURCE_FILES
|
||||
../../../src/java.desktop/share/native/libjavajpeg/jidctred.c
|
||||
../../../src/java.desktop/share/native/libjavajpeg/jpegint.h
|
||||
../../../src/java.desktop/share/native/libjavajpeg/jdpostct.c
|
||||
../../../src/java.desktop/share/native/libfontmanager
|
||||
../../../src/java.desktop/share/native/libfontmanager/DrawGlyphList.c
|
||||
../../../src/java.desktop/share/native/libfontmanager/HBShaper.c
|
||||
../../../src/java.desktop/share/native/libfontmanager/scriptMapping.c
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-buffer.h
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-aat-fdsc-table.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-post-table.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-shape-complex-indic-machine.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-open-type.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-subset-plan.cc
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-aat-layout-common.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-shape-complex-use-machine.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-layout-base-table.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-head-table.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-set.h
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-coretext.cc
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-shape-complex-arabic-win1256.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-shape-complex-khmer.cc
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-shaper-list.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-face.h
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-buffer.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-var.cc
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-cff-interp-common.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-map.cc
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-post-macroman.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-shape-fallback.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-common.h
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-deprecated.h
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-blob.cc
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-subset.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-shape-normalize.cc
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-unicode.cc
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-version.h
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-stat-table.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-name-language.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-aat-ltag-table.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-aat.h
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-font.h
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-color.cc
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-cff-interp-cs-common.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-kern.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-subset-cff-common.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-shape-complex-default.cc
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-face.cc
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-coretext.h
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-cff1-table.cc
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-aat-layout-just-table.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-color-colr-table.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-tag.h
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-deprecated.h
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-subset-cff1.cc
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-shape-complex-arabic-table.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-aat-layout-kerx-table.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-vorg-table.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-blob.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-font.cc
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-unicode.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-shape-complex-indic-table.cc
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-kern-table.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-subset.cc
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-shape-normalize.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-common.cc
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-buffer-serialize.cc
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-name-language.cc
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-layout-gpos-table.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-var-avar-table.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-subset-cff-common.cc
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-fallback-shape.cc
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot.h
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-cff1-table.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-face.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-string-array.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-layout.h
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-subset-cff1.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-aat-layout-lcar-table.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-var-hvar-table.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-layout-gsubgpos.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-var.h
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-atomic.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-static.cc
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ucdn
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ucdn/ucdn.c
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ucdn/ucdn.h
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ucdn/ucdn_db.h
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-aat-layout-morx-table.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-cff2-interp-cs.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ucdn.cc
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-shape-complex-khmer-machine.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-name.h
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-shape-complex-thai.cc
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-hhea-table.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-var-mvar-table.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-shape.h
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-tag.cc
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-subset-plan.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-os2-unicode-ranges.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-warning.cc
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-hdmx-table.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-shape-complex-khmer.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ft.cc
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-cff-common.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-layout-gdef-table.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-glyf-table.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-shape-fallback.cc
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-buffer.cc
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-map.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-subset-glyf.cc
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-name-table.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-set.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-color.h
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-cff2-table.cc
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-shape-plan.h
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-shape-plan.cc
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-font.h
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-shape-complex-use.cc
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-color-sbix-table.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-shape-complex-indic.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-unicode.h
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-unicode-emoji-table.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-aat-layout-feat-table.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-object.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-shape-complex-myanmar.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-gasp-table.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-shape-complex-arabic.cc
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-buffer-deserialize-json.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-shape.h
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-vector.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-shape-complex-myanmar-machine.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-shape-complex-arabic-fallback.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-debug.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-tag-table.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-shape-complex-vowel-constraints.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-shaper.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-aat-layout.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-iter.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-blob.h
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-layout.cc
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-face.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-aat-layout-trak-table.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-cff1-interp-cs.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-hmtx-table.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-aat-layout-ankr-table.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-shape.cc
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-cff-interp-dict-common.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-aat-map.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-layout-common.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-subset-input.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-color-cbdt-table.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-color-cpal-table.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-subset-cff2.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-utf.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-shape-complex-hebrew.cc
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-map.cc
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-var-fvar-table.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-font.cc
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-map.h
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb.h
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-shaper.cc
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-layout-jstf-table.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-aat-layout.cc
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-mutex.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-os2-table.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-face.cc
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-layout.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-layout-gsub-table.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-aat-layout.h
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-subset-input.cc
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-math-table.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-cmap-table.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-aat-layout-bsln-table.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-aat-map.cc
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-shape.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-font.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-maxp-table.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-buffer-deserialize-text.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-map.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-subset-cff2.cc
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-array.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-set.cc
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-shape-plan.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-shape.cc
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-shape-complex-hangul.cc
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-null.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-cff2-table.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-name.cc
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-shape-complex.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-subset-glyf.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-set-digest.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-shape-complex-indic.cc
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-open-file.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-machinery.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-shape-complex-myanmar.cc
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-subset.h
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-color-svg-table.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-shape-complex-use.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-dsalgs.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-shape-complex-use-table.cc
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-math.h
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-math.cc
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ft.h
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-shape-complex-arabic.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-shape-complex-vowel-constraints.cc
|
||||
../../../src/java.desktop/share/native/libfontmanager/harfbuzz/hb-shaper-impl.hh
|
||||
../../../src/java.desktop/share/native/libfontmanager/glyphblitting.h
|
||||
../../../src/java.desktop/share/native/libfontmanager/hb-jdk.h
|
||||
../../../src/java.desktop/share/native/libfontmanager/fontconfig.h
|
||||
../../../src/java.desktop/share/native/libfontmanager/hb-jdk-font.cc
|
||||
../../../src/java.desktop/share/native/libfontmanager/freetypeScaler.c
|
||||
../../../src/java.desktop/share/native/libfontmanager/scriptMapping.h
|
||||
../../../src/java.desktop/share/native/libfontmanager/ColorGlyphSurfaceData.c
|
||||
@@ -1028,10 +849,7 @@ set(SOURCE_FILES
|
||||
../../../src/jdk.jdwp.agent/share/native/include/jdwpTransport.h
|
||||
../../../src/hotspot/share/include/jmm.h
|
||||
../../../src/java.base/share/native/include/jni.h
|
||||
../../../src/java.base/share/native/include/jvmticmlr.h
|
||||
../../../src/java.base/share/native/libzip/zlib/zutil.c
|
||||
../../../src/java.base/share/native/libzip/zlib/inflate.c)
|
||||
|
||||
../../../src/java.base/share/native/include/jvmticmlr.h)
|
||||
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
set(SOURCE_FILES
|
||||
@@ -1093,6 +911,7 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
../../../src/java.desktop/macosx/native/libawt_lwawt/awt/CFileDialog.h
|
||||
../../../src/java.desktop/macosx/native/libawt_lwawt/awt/AWTWindow.h
|
||||
../../../src/java.desktop/macosx/native/libawt_lwawt/awt/LWCToolkit.h
|
||||
../../../src/java.desktop/macosx/native/libawt_lwawt/awt/CGraphicsConfig.m
|
||||
../../../src/java.desktop/macosx/native/libawt_lwawt/awt/CDesktopPeer.m
|
||||
../../../src/java.desktop/macosx/native/libawt_lwawt/awt/PrintModel.h
|
||||
../../../src/java.desktop/macosx/native/libawt_lwawt/awt/CTrayIcon.m
|
||||
@@ -1330,8 +1149,10 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin" OR ${CMAKE_SYSTEM_NAME} MATCHES "Linux"
|
||||
../../../src/java.desktop/unix/native/libawt/awt/awt_Mlib.c
|
||||
../../../src/java.desktop/unix/native/libawt/awt/awt_LoadLibrary.c
|
||||
../../../src/java.desktop/unix/native/libawt/awt/initIDs.c
|
||||
../../../src/java.desktop/unix/native/libawt_xawt/awt
|
||||
../../../src/java.desktop/unix/native/libawt_xawt/java2d/x11/XRBackendNative.c
|
||||
../../../src/java.desktop/unix/native/libawt_xawt/java2d/x11/XRSurfaceData.c
|
||||
../../../src/java.desktop/unix/native/libawt_xawt/awt/gtk2_interface.c
|
||||
../../../src/java.desktop/unix/native/libawt_xawt/awt/randr.h
|
||||
../../../src/java.desktop/unix/native/libawt_xawt/awt/list.c
|
||||
../../../src/java.desktop/unix/native/libawt_xawt/awt/awt_DrawingSurface.c
|
||||
../../../src/java.desktop/unix/native/libawt_xawt/awt/swing_GTKStyle.c
|
||||
@@ -1346,6 +1167,8 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin" OR ${CMAKE_SYSTEM_NAME} MATCHES "Linux"
|
||||
../../../src/java.desktop/unix/native/libawt_xawt/awt/multi_font.c
|
||||
../../../src/java.desktop/unix/native/libawt_xawt/awt/multiVis.h
|
||||
../../../src/java.desktop/unix/native/libawt_xawt/awt/awt_Event.c
|
||||
../../../src/java.desktop/unix/native/libawt_xawt/awt/Xrandr.h
|
||||
../../../src/java.desktop/unix/native/libawt_xawt/awt/robot_common.c
|
||||
../../../src/java.desktop/unix/native/libawt_xawt/awt/awt_util.c
|
||||
../../../src/java.desktop/unix/native/libawt_xawt/awt/list.h
|
||||
../../../src/java.desktop/unix/native/libawt_xawt/awt/gtk2_interface.h
|
||||
@@ -1353,15 +1176,24 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin" OR ${CMAKE_SYSTEM_NAME} MATCHES "Linux"
|
||||
../../../src/java.desktop/unix/native/libawt_xawt/awt/gtk3_interface.c
|
||||
../../../src/java.desktop/unix/native/libawt_xawt/awt/gtk_interface.h
|
||||
../../../src/java.desktop/unix/native/libawt_xawt/awt/awt_Robot.c
|
||||
../../../src/java.desktop/unix/native/libawt_xawt/awt/HPkeysym.h
|
||||
../../../src/java.desktop/unix/native/libawt_xawt/awt/awt_Event.h
|
||||
../../../src/java.desktop/unix/native/libawt_xawt/awt/multiVis.c
|
||||
../../../src/java.desktop/unix/native/libawt_xawt/awt/canvas.h
|
||||
../../../src/java.desktop/unix/native/libawt_xawt/awt/awt_AWTEvent.c
|
||||
../../../src/java.desktop/unix/native/libawt_xawt/awt/multi_font.h
|
||||
../../../src/java.desktop/unix/native/libawt_xawt/awt/robot_common.h
|
||||
../../../src/java.desktop/unix/native/libawt_xawt/awt/sun_awt_X11_GtkFileDialogPeer.c
|
||||
../../../src/java.desktop/unix/native/libawt_xawt/awt/awt_GraphicsEnv.c
|
||||
../../../src/java.desktop/unix/native/libawt_xawt/awt/awt_InputMethod.c
|
||||
../../../src/java.desktop/unix/native/libawt_xawt/java2d/x11/XRBackendNative.c
|
||||
../../../src/java.desktop/unix/native/libawt_xawt/xawt/awt_Desktop.c
|
||||
../../../src/java.desktop/unix/native/libawt_xawt/xawt/XToolkit.c
|
||||
../../../src/java.desktop/unix/native/libawt_xawt/xawt/awt_Taskbar.c
|
||||
../../../src/java.desktop/unix/native/libawt_xawt/xawt/gnome_interface.c
|
||||
../../../src/java.desktop/unix/native/libawt_xawt/xawt/XlibWrapper.c
|
||||
../../../src/java.desktop/unix/native/libawt_xawt/xawt/gnome_interface.h
|
||||
../../../src/java.desktop/unix/native/libawt_xawt/xawt/awt_Taskbar.h
|
||||
../../../src/java.desktop/unix/native/libawt_xawt/xawt/XWindow.c
|
||||
../../../src/java.desktop/unix/native/libfontmanager/X11FontScaler.c
|
||||
../../../src/java.desktop/unix/native/libfontmanager/X11TextRenderer.c
|
||||
../../../src/java.desktop/unix/native/libsplashscreen/splashscreen_config.h
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
VENDOR_NAME="JetBrains s.r.o."
|
||||
VENDOR_VERSION_STRING="JBR-${JBSDK_VERSION_WITH_DOTS}.${JDK_BUILD_NUMBER}-${build_number}"
|
||||
[ -z ${bundle_type} ] || VENDOR_VERSION_STRING="${VENDOR_VERSION_STRING}-${bundle_type}"
|
||||
|
||||
do_reset_changes=0
|
||||
do_reset_dcevm=0
|
||||
HEAD_REVISION=0
|
||||
|
||||
function do_exit() {
|
||||
exit_code=$1
|
||||
[ $do_reset_changes -eq 1 ] && git checkout HEAD modules.list src/java.desktop/share/classes/module-info.java
|
||||
if [ $do_reset_dcevm -eq 1 ]; then
|
||||
[ ! -z $HEAD_REVISION ] && git reset --hard $HEAD_REVISION
|
||||
fi
|
||||
exit $exit_code
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# $1 - Boot JDK
|
||||
# $2 - JBR part of API version
|
||||
|
||||
cd "`dirname "$0"`/../../../../.."
|
||||
PWD="`pwd`"
|
||||
CONF="$PWD/build/jbr-api.conf"
|
||||
./configure --with-debug-level=release --with-boot-jdk=$1 || exit $?
|
||||
make jbr-api CONF=release MAKEOVERRIDES= "JBR_API_CONF_FILE=$CONF" JBR_API_JBR_VERSION=$2 || exit $?
|
||||
. $CONF || exit $?
|
||||
echo "##teamcity[buildNumber '$VERSION']"
|
||||
cp "$JAR" ./jbr-api-${VERSION}.jar || exit $?
|
||||
cp "$SOURCES_JAR" ./jbr-api-${VERSION}-sources.jar || exit $?
|
||||
echo "##teamcity[publishArtifacts '$PWD/jbr-api-${VERSION}.jar']"
|
||||
echo "##teamcity[publishArtifacts '$PWD/jbr-api-${VERSION}-sources.jar']"
|
||||
@@ -1,102 +0,0 @@
|
||||
#!/bin/bash -x
|
||||
|
||||
# The following parameters must be specified:
|
||||
# JBSDK_VERSION - specifies the current version of OpenJDK e.g. 11_0_6
|
||||
# JDK_BUILD_NUMBER - specifies the number of OpenJDK build or the value of --with-version-build argument to configure
|
||||
# build_number - specifies the number of JetBrainsRuntime build
|
||||
# bundle_type - specifies bundle to bu built; possible values:
|
||||
# jcef - the bundles 1) jbr with jcef+javafx, 2) jbrsdk and 3) test will be created
|
||||
#
|
||||
# jbrsdk-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
|
||||
# jbr-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
|
||||
#
|
||||
# $ ./java --version
|
||||
# openjdk 11.0.6 2020-01-14
|
||||
# OpenJDK Runtime Environment (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number})
|
||||
# OpenJDK 64-Bit Server VM (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number}, mixed mode)
|
||||
#
|
||||
|
||||
while getopts ":i?" o; do
|
||||
case "${o}" in
|
||||
i)
|
||||
i="incremental build"
|
||||
INC_BUILD=1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
shift $((OPTIND-1))
|
||||
|
||||
JBSDK_VERSION=$1
|
||||
JDK_BUILD_NUMBER=$2
|
||||
build_number=$3
|
||||
|
||||
JBSDK_VERSION_WITH_DOTS=$(echo $JBSDK_VERSION | sed 's/_/\./g')
|
||||
|
||||
source jb/project/tools/common.sh
|
||||
|
||||
function do_configure {
|
||||
sh configure \
|
||||
--disable-warnings-as-errors \
|
||||
--with-debug-level=release \
|
||||
--with-vendor-name="${VENDOR_NAME}" \
|
||||
--with-vendor-version-string="${VENDOR_VERSION_STRING}" \
|
||||
--with-jvm-features=shenandoahgc \
|
||||
--with-version-pre= \
|
||||
--with-version-build=${JDK_BUILD_NUMBER} \
|
||||
--with-version-opt=b${build_number} \
|
||||
--with-import-modules=./modular-sdk \
|
||||
--with-boot-jdk=amazon-corretto-11.0.5.10.1-linux-aarch64 \
|
||||
--enable-cds=yes || exit $?
|
||||
}
|
||||
|
||||
JBRSDK_BASE_NAME=jbrsdk-${JBSDK_VERSION}
|
||||
|
||||
if [ -z "$INC_BUILD" ]; then
|
||||
do_configure || do_exit $?
|
||||
make clean CONF=linux-aarch64-normal-server-release || exit $?
|
||||
fi
|
||||
make images CONF=linux-aarch64-normal-server-release test-image || exit $?
|
||||
|
||||
JBSDK=${JBRSDK_BASE_NAME}-linux-aarch64-b${build_number}
|
||||
BASE_DIR=build/linux-aarch64-normal-server-release/images
|
||||
JSDK=${BASE_DIR}/jdk
|
||||
JBRSDK_BUNDLE=jbrsdk
|
||||
|
||||
echo Fixing permissions
|
||||
chmod -R a+r $JSDK
|
||||
|
||||
rm -rf $BASE_DIR/$JBRSDK_BUNDLE
|
||||
cp -r $JSDK $BASE_DIR/$JBRSDK_BUNDLE || exit $?
|
||||
|
||||
echo Creating $JBSDK.tar.gz ...
|
||||
sed 's/JBR/JBRSDK/g' ${BASE_DIR}/${JBRSDK_BUNDLE}/release > release
|
||||
mv release ${BASE_DIR}/${JBRSDK_BUNDLE}/release
|
||||
|
||||
tar -pcf $JBSDK.tar \
|
||||
--exclude=*.debuginfo --exclude=demo --exclude=sample --exclude=man \
|
||||
-C $BASE_DIR ${JBRSDK_BUNDLE} || exit $?
|
||||
gzip $JBSDK.tar || exit $?
|
||||
|
||||
JBR_BUNDLE=jbr
|
||||
JBR_BASE_NAME=jbr-$JBSDK_VERSION
|
||||
rm -rf $BASE_DIR/$JBR_BUNDLE
|
||||
|
||||
JBR=$JBR_BASE_NAME-linux-aarch64-b$build_number
|
||||
grep -v javafx modules.list | grep -v "jdk.internal.vm\|jdk.aot\|jcef" > modules.list.aarch64
|
||||
echo Running jlink....
|
||||
${JSDK}/bin/jlink \
|
||||
--module-path ${JSDK}/jmods --no-man-pages --compress=2 \
|
||||
--add-modules $(xargs < modules.list.aarch64 | sed s/" "//g | sed s/,$//g) \
|
||||
--output ${BASE_DIR}/${JBR_BUNDLE} || exit $?
|
||||
|
||||
echo Modifying release info ...
|
||||
grep -v \"^JAVA_VERSION\" ${JSDK}/release | grep -v \"^MODULES\" >> ${BASE_DIR}/${JBR_BUNDLE}/release
|
||||
|
||||
echo Creating $JBR.tar.gz ...
|
||||
tar -pcf $JBR.tar -C $BASE_DIR ${JBR_BUNDLE} || exit $?
|
||||
gzip $JBR.tar || exit $?
|
||||
|
||||
JBRSDK_TEST=$JBRSDK_BASE_NAME-linux-test-aarch64-b$build_number
|
||||
echo Creating $JBRSDK_TEST.tar.gz ...
|
||||
tar -pcf $JBRSDK_TEST.tar -C $BASE_DIR --exclude='test/jdk/demos' test || exit $?
|
||||
gzip $JBRSDK_TEST.tar || exit $?
|
||||
@@ -1,170 +0,0 @@
|
||||
#!/bin/bash -x
|
||||
|
||||
# The following parameters must be specified:
|
||||
# JBSDK_VERSION - specifies major version of OpenJDK e.g. 11_0_6 (instead of dots '.' underbars "_" are used)
|
||||
# JDK_BUILD_NUMBER - specifies update release of OpenJDK build or the value of --with-version-build argument to configure
|
||||
# build_number - specifies the number of JetBrainsRuntime build
|
||||
# bundle_type - specifies bundle to be built; possible values:
|
||||
# jcef - the release bundles with jcef
|
||||
# dcevm - the release bundles with dcevm patches
|
||||
# nomod - the release bundles without any additional modules (jcef)
|
||||
# fd - the fastdebug bundles which also include the jcef module
|
||||
#
|
||||
# jbrsdk-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
|
||||
# jbr-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
|
||||
#
|
||||
# $ ./java --version
|
||||
# openjdk 11.0.6 2020-01-14
|
||||
# OpenJDK Runtime Environment (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number})
|
||||
# OpenJDK 64-Bit Server VM (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number}, mixed mode)
|
||||
#
|
||||
# Environment variables:
|
||||
# MODULAR_SDK_PATH - specifies the path to the directory where imported modules are located.
|
||||
# By default imported modules should be located in ./modular-sdk
|
||||
# JCEF_PATH - specifies the path to the directory with JCEF binaries.
|
||||
# By default JCEF binaries should be located in ./jcef_linux_x64
|
||||
|
||||
while getopts ":i?" o; do
|
||||
case "${o}" in
|
||||
i)
|
||||
i="incremental build"
|
||||
INC_BUILD=1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
shift $((OPTIND-1))
|
||||
|
||||
JBSDK_VERSION=$1
|
||||
JDK_BUILD_NUMBER=$2
|
||||
build_number=$3
|
||||
bundle_type=$4
|
||||
JBSDK_VERSION_WITH_DOTS=$(echo $JBSDK_VERSION | sed 's/_/\./g')
|
||||
WITH_IMPORT_MODULES="--with-import-modules=${MODULAR_SDK_PATH:=./modular-sdk}"
|
||||
JCEF_PATH=${JCEF_PATH:=./jcef_linux_x64}
|
||||
|
||||
source jb/project/tools/common.sh
|
||||
|
||||
function do_configure {
|
||||
sh configure \
|
||||
--disable-warnings-as-errors \
|
||||
$WITH_DEBUG_LEVEL \
|
||||
--with-vendor-name="${VENDOR_NAME}" \
|
||||
--with-vendor-version-string="${VENDOR_VERSION_STRING}" \
|
||||
--with-jvm-features=shenandoahgc \
|
||||
--with-version-pre= \
|
||||
--with-version-build=${JDK_BUILD_NUMBER} \
|
||||
--with-version-opt=b${build_number} \
|
||||
$WITH_IMPORT_MODULES \
|
||||
--enable-cds=yes || do_exit $?
|
||||
}
|
||||
|
||||
function create_jbr {
|
||||
|
||||
JBR_BUNDLE=jbr_${bundle_type}
|
||||
|
||||
case "${bundle_type}" in
|
||||
"jcef" | "dcevm" | "nomod" | "fd")
|
||||
JBR_BASE_NAME=jbr_${bundle_type}-${JBSDK_VERSION}
|
||||
;;
|
||||
*)
|
||||
echo "***ERR*** bundle was not specified" && do_exit 1
|
||||
;;
|
||||
esac
|
||||
cat modules.list > modules_tmp.list
|
||||
rm -rf ${BASE_DIR}/${JBR_BUNDLE}
|
||||
|
||||
JBR=${JBR_BASE_NAME}-linux-x64-b${build_number}
|
||||
|
||||
echo Running jlink....
|
||||
$JSDK/bin/jlink \
|
||||
--module-path $JSDK/jmods --no-man-pages --compress=2 \
|
||||
--add-modules $(xargs < modules_tmp.list | sed s/" "//g) --output $BASE_DIR/$JBR_BUNDLE || do_exit $?
|
||||
|
||||
if [[ "${bundle_type}" == *jcef* ]] || [[ "${bundle_type}" == *dcevm* ]] || [[ "${bundle_type}" == fd ]]; then
|
||||
cp -R $BASE_DIR/$JBR_BUNDLE $BASE_DIR/jbr
|
||||
rsync -av ${JCEF_PATH}/ $BASE_DIR/$JBR_BUNDLE/lib --exclude="modular-sdk" || do_exit $?
|
||||
fi
|
||||
grep -v "^JAVA_VERSION" $JSDK/release | grep -v "^MODULES" >> $BASE_DIR/$JBR_BUNDLE/release
|
||||
|
||||
echo Creating ${JBR}.tar.gz ...
|
||||
rm -rf ${BASE_DIR}/jbr
|
||||
cp -R ${BASE_DIR}/${JBR_BUNDLE} ${BASE_DIR}/jbr
|
||||
tar -pcf ${JBR}.tar -C ${BASE_DIR} jbr || do_exit $?
|
||||
gzip -f ${JBR}.tar || do_exit $?
|
||||
rm -rf ${BASE_DIR}/${JBR_BUNDLE}
|
||||
}
|
||||
|
||||
JBRSDK_BASE_NAME=jbrsdk-${JBSDK_VERSION}
|
||||
WITH_DEBUG_LEVEL="--with-debug-level=release"
|
||||
RELEASE_NAME=linux-x86_64-normal-server-release
|
||||
JBSDK=${JBRSDK_BASE_NAME}-linux-x64-b${build_number}
|
||||
case "$bundle_type" in
|
||||
"jcef")
|
||||
git apply -p0 < jb/project/tools/patches/add_jcef_module.patch || do_exit $?
|
||||
do_reset_changes=1
|
||||
;;
|
||||
"dcevm")
|
||||
HEAD_REVISION=$(git rev-parse HEAD)
|
||||
git am jb/project/tools/patches/dcevm/*.patch || do_exit $?
|
||||
do_reset_dcevm=1
|
||||
git apply -p0 < jb/project/tools/patches/add_jcef_module.patch || do_exit $?
|
||||
do_reset_changes=1
|
||||
;;
|
||||
"nomod")
|
||||
WITH_IMPORT_MODULES=""
|
||||
;;
|
||||
"fd")
|
||||
git apply -p0 < jb/project/tools/patches/add_jcef_module.patch || do_exit $?
|
||||
do_reset_changes=1
|
||||
WITH_DEBUG_LEVEL="--with-debug-level=fastdebug"
|
||||
RELEASE_NAME=linux-x86_64-normal-server-fastdebug
|
||||
JBSDK=${JBRSDK_BASE_NAME}-linux-x64-fastdebug-b${build_number}
|
||||
;;
|
||||
*)
|
||||
echo "***ERR*** bundle was not specified" && do_exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -z "$INC_BUILD" ]; then
|
||||
do_configure || do_exit $?
|
||||
make clean CONF=$RELEASE_NAME || do_exit $?
|
||||
fi
|
||||
make images CONF=$RELEASE_NAME || do_exit $?
|
||||
|
||||
JSDK=build/${RELEASE_NAME}/images/jdk
|
||||
|
||||
echo Fixing permissions
|
||||
chmod -R a+r $JSDK
|
||||
|
||||
BASE_DIR=build/${RELEASE_NAME}/images
|
||||
JBRSDK_BUNDLE=jbrsdk
|
||||
|
||||
rm -rf ${BASE_DIR}/${JBRSDK_BUNDLE}
|
||||
cp -r $JSDK $BASE_DIR/$JBRSDK_BUNDLE || do_exit $?
|
||||
|
||||
if [[ "${bundle_type}" == *jcef* ]] || [[ "${bundle_type}" == *dcevm* ]] || [[ "${bundle_type}" == fd ]]; then
|
||||
rsync -av ${JCEF_PATH}/ $BASE_DIR/$JBRSDK_BUNDLE/lib --exclude="modular-sdk" || do_exit $?
|
||||
fi
|
||||
if [ "${bundle_type}" == "jcef" ] || [ "${bundle_type}" == "fd" ]; then
|
||||
echo Creating $JBSDK.tar.gz ...
|
||||
sed 's/JBR/JBRSDK/g' ${BASE_DIR}/${JBRSDK_BUNDLE}/release > release
|
||||
mv release ${BASE_DIR}/${JBRSDK_BUNDLE}/release
|
||||
|
||||
tar -pcf ${JBSDK}.tar --exclude=*.debuginfo --exclude=demo --exclude=sample --exclude=man \
|
||||
-C ${BASE_DIR} ${JBRSDK_BUNDLE} || do_exit $?
|
||||
gzip -f ${JBSDK}.tar || do_exit $?
|
||||
fi
|
||||
|
||||
create_jbr || do_exit $?
|
||||
|
||||
if [ "$bundle_type" == "jcef" ]; then
|
||||
make test-image CONF=$RELEASE_NAME || do_exit $?
|
||||
|
||||
JBRSDK_TEST=$JBRSDK_BASE_NAME-linux-test-x64-b$build_number
|
||||
|
||||
echo Creating $JBSDK_TEST.tar.gz ...
|
||||
tar -pcf ${JBRSDK_TEST}.tar -C ${BASE_DIR} --exclude='test/jdk/demos' test || do_exit $?
|
||||
gzip -f ${JBRSDK_TEST}.tar || do_exit $?
|
||||
fi
|
||||
|
||||
do_exit 0
|
||||
@@ -1,82 +0,0 @@
|
||||
#!/bin/bash -x
|
||||
|
||||
# The following parameters must be specified:
|
||||
# JBSDK_VERSION - specifies the current version of OpenJDK e.g. 11_0_6
|
||||
# JDK_BUILD_NUMBER - specifies the number of OpenJDK build or the value of --with-version-build argument to configure
|
||||
# build_number - specifies the number of JetBrainsRuntime build
|
||||
# bundle_type - specifies bundle to bu built; possible values:
|
||||
# jcef - the bundles 1) jbr with jcef+javafx, 2) jbrsdk and 3) test will be created
|
||||
#
|
||||
# jbrsdk-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
|
||||
# jbr-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
|
||||
#
|
||||
# $ ./java --version
|
||||
# openjdk 11.0.6 2020-01-14
|
||||
# OpenJDK Runtime Environment (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number})
|
||||
# OpenJDK 64-Bit Server VM (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number}, mixed mode)
|
||||
#
|
||||
|
||||
JBSDK_VERSION=$1
|
||||
JDK_BUILD_NUMBER=$2
|
||||
build_number=$3
|
||||
|
||||
JBSDK_VERSION_WITH_DOTS=$(echo $JBSDK_VERSION | sed 's/_/\./g')
|
||||
|
||||
source jb/project/tools/common.sh
|
||||
|
||||
JBRSDK_BASE_NAME=jbrsdk-${JBSDK_VERSION}
|
||||
|
||||
linux32 bash configure \
|
||||
--disable-warnings-as-errors \
|
||||
--with-debug-level=release \
|
||||
--with-vendor-name="${VENDOR_NAME}" \
|
||||
--with-vendor-version-string="${VENDOR_VERSION_STRING}" \
|
||||
--with-jvm-features=shenandoahgc \
|
||||
--with-version-pre= \
|
||||
--with-version-build=$JDK_BUILD_NUMBER \
|
||||
--with-version-opt=b${build_number} \
|
||||
--with-boot-jdk=/jbrsdk-11.0.5-b1 \
|
||||
--enable-cds=yes || exit $?
|
||||
make clean CONF=linux-x86-normal-server-release || exit $?
|
||||
make images CONF=linux-x86-normal-server-release test-image || exit $?
|
||||
|
||||
JBSDK=${JBRSDK_BASE_NAME}-linux-x86-b${build_number}
|
||||
BASE_DIR=build/linux-x86-normal-server-release/images
|
||||
JSDK=${BASE_DIR}/jdk
|
||||
JBRSDK_BUNDLE=jbrsdk
|
||||
|
||||
echo Fixing permissions
|
||||
chmod -R a+r $JSDK
|
||||
|
||||
rm -rf $BASE_DIR/$JBRSDK_BUNDLE
|
||||
cp -r $JSDK $BASE_DIR/$JBRSDK_BUNDLE || exit $?
|
||||
|
||||
echo Creating $JBSDK.tar.gz ...
|
||||
sed 's/JBR/JBRSDK/g' ${BASE_DIR}/${JBRSDK_BUNDLE}/release > release
|
||||
mv release ${BASE_DIR}/${JBRSDK_BUNDLE}/release
|
||||
|
||||
tar -pcf $JBSDK.tar --exclude=*.debuginfo --exclude=demo --exclude=sample --exclude=man -C $BASE_DIR ${JBRSDK_BUNDLE} || exit $?
|
||||
gzip $JBSDK.tar || exit $?
|
||||
|
||||
JBR_BUNDLE=jbr
|
||||
JBR_BASE_NAME=jbr-$JBSDK_VERSION
|
||||
rm -rf $BASE_DIR/$JBR_BUNDLE
|
||||
|
||||
JBR=$JBR_BASE_NAME-linux-x86-b$build_number
|
||||
grep -v javafx modules.list | grep -v "jdk.internal.vm\|jdk.aot\|jcef" > modules.list.x86
|
||||
echo Running jlink....
|
||||
${JSDK}/bin/jlink \
|
||||
--module-path ${JSDK}/jmods --no-man-pages --compress=2 \
|
||||
--add-modules $(xargs < modules.list.x86 | sed s/" "//g | sed s/,$//g) --output ${BASE_DIR}/${JBR_BUNDLE} || exit $?
|
||||
|
||||
echo Modifying release info ...
|
||||
grep -v \"^JAVA_VERSION\" ${JSDK}/release | grep -v \"^MODULES\" >> ${BASE_DIR}/${JBR_BUNDLE}/release
|
||||
|
||||
echo Creating $JBR.tar.gz ...
|
||||
tar -pcf $JBR.tar -C $BASE_DIR $JBR_BUNDLE || exit $?
|
||||
gzip $JBR.tar || exit $?
|
||||
|
||||
JBRSDK_TEST=$JBRSDK_BASE_NAME-linux-test-x86-b$build_number
|
||||
echo Creating $JBRSDK_TEST.tar.gz ...
|
||||
tar -pcf $JBRSDK_TEST.tar -C $BASE_DIR --exclude='test/jdk/demos' --exclude='test/hotspot/gtest' test || exit $?
|
||||
gzip $JBRSDK_TEST.tar || exit $?
|
||||
@@ -1,235 +0,0 @@
|
||||
#!/bin/bash -x
|
||||
|
||||
# The following parameters must be specified:
|
||||
# JBSDK_VERSION - specifies major version of OpenJDK e.g. 11_0_6 (instead of dots '.' underbars "_" are used)
|
||||
# JDK_BUILD_NUMBER - specifies update release of OpenJDK build or the value of --with-version-build argument to configure
|
||||
# build_number - specifies the number of JetBrainsRuntime build
|
||||
# bundle_type - specifies bundle to be built; possible values:
|
||||
# jcef - the release bundles with jcef
|
||||
# dcevm - the release bundles with dcevm patches
|
||||
# nomod - the release bundles without any additional modules (jcef)
|
||||
# fd - the fastdebug bundles which also include the jcef module
|
||||
#
|
||||
# jbrsdk-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
|
||||
# jbr-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
|
||||
#
|
||||
# $ ./java --version
|
||||
# openjdk 11.0.6 2020-01-14
|
||||
# OpenJDK Runtime Environment (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number})
|
||||
# OpenJDK 64-Bit Server VM (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number}, mixed mode)
|
||||
#
|
||||
# Environment variables:
|
||||
# MODULAR_SDK_PATH - specifies the path to the directory where imported modules are located.
|
||||
# By default imported modules should be located in ./modular-sdk
|
||||
# JCEF_PATH - specifies the path to the directory with JCEF binaries.
|
||||
# By default JCEF binaries should be located in ./jcef_mac
|
||||
|
||||
while getopts ":i?" o; do
|
||||
case "${o}" in
|
||||
i)
|
||||
i="incremental build"
|
||||
INC_BUILD=1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
shift $((OPTIND-1))
|
||||
|
||||
JBSDK_VERSION=$1
|
||||
JDK_BUILD_NUMBER=$2
|
||||
build_number=$3
|
||||
bundle_type=$4
|
||||
architecture=$5 # aarch64 or x64
|
||||
enable_aot=$6 # temporary param for building test jre with aot under aarch64
|
||||
JBSDK_VERSION_WITH_DOTS=$(echo $JBSDK_VERSION | sed 's/_/\./g')
|
||||
WITH_IMPORT_MODULES="--with-import-modules=${MODULAR_SDK_PATH:=./modular-sdk}"
|
||||
JCEF_PATH=${JCEF_PATH:=./jcef_mac}
|
||||
architecture=${architecture:=x64}
|
||||
|
||||
source jb/project/tools/common.sh
|
||||
|
||||
function copyJNF {
|
||||
__contents_dir=$1
|
||||
mkdir -p ${__contents_dir}/Frameworks
|
||||
cp -Rp Frameworks/JavaNativeFoundation.framework ${__contents_dir}/Frameworks
|
||||
}
|
||||
|
||||
function do_configure {
|
||||
if [[ "${architecture}" == *aarch64* ]]; then
|
||||
# NOTE: aot, cds aren't supported yet
|
||||
WITH_JVM_FEATURES="--with-jvm-features=-aot"
|
||||
if [[ "${enable_aot}" == *enable_aot* ]]; then
|
||||
echo "Enable unstable jvm feature: AOT"
|
||||
WITH_JVM_FEATURES=""
|
||||
fi
|
||||
sh configure \
|
||||
--disable-warnings-as-errors \
|
||||
$WITH_DEBUG_LEVEL \
|
||||
--with-vendor-name="${VENDOR_NAME}" \
|
||||
--with-vendor-version-string="${VENDOR_VERSION_STRING}" \
|
||||
--with-jvm-features=shenandoahgc \
|
||||
--with-version-pre= \
|
||||
--with-version-build=${JDK_BUILD_NUMBER} \
|
||||
--with-version-opt=b${build_number} \
|
||||
$WITH_IMPORT_MODULES \
|
||||
--with-boot-jdk=`/usr/libexec/java_home -v 11` \
|
||||
--disable-hotspot-gtest --disable-javac-server --disable-full-docs --disable-manpages \
|
||||
--enable-cds=no \
|
||||
$WITH_JVM_FEATURES \
|
||||
--with-extra-cflags="-F$(pwd)/Frameworks" \
|
||||
--with-extra-cxxflags="-F$(pwd)/Frameworks" \
|
||||
--with-extra-ldflags="-F$(pwd)/Frameworks" || do_exit $?
|
||||
else
|
||||
sh configure \
|
||||
--disable-warnings-as-errors \
|
||||
$WITH_DEBUG_LEVEL \
|
||||
--with-vendor-name="${VENDOR_NAME}" \
|
||||
--with-vendor-version-string="${VENDOR_VERSION_STRING}" \
|
||||
--with-jvm-features=shenandoahgc \
|
||||
--with-version-pre= \
|
||||
--with-version-build=${JDK_BUILD_NUMBER} \
|
||||
--with-version-opt=b${build_number} \
|
||||
$WITH_IMPORT_MODULES \
|
||||
--with-boot-jdk=`/usr/libexec/java_home -v 11` \
|
||||
--enable-cds=yes || do_exit $?
|
||||
fi
|
||||
}
|
||||
|
||||
function create_jbr {
|
||||
|
||||
JBR_BUNDLE=jbr_${bundle_type}
|
||||
|
||||
case "${bundle_type}" in
|
||||
"jcef" | "dcevm" | "nomod" | "fd")
|
||||
JBR_BASE_NAME=jbr_${bundle_type}-${JBSDK_VERSION}
|
||||
;;
|
||||
*)
|
||||
echo "***ERR*** bundle was not specified" && do_exit 1
|
||||
;;
|
||||
esac
|
||||
if [[ "${architecture}" == *aarch64* ]] && [[ "${enable_aot}" != *enable_aot* ]]; then
|
||||
# aot isn't supported yet, so remove dependent modules
|
||||
echo "Exclude jdk.internal.vm.compiler and jdk.aot (because aot not supported yet)"
|
||||
cat modules.list | \
|
||||
grep -v "jdk.internal.vm.compiler\|jdk.aot" \
|
||||
> modules_tmp.list
|
||||
else
|
||||
cat modules.list > modules_tmp.list
|
||||
fi
|
||||
rm -rf ${BASE_DIR}/${JBR_BUNDLE}
|
||||
|
||||
JRE_CONTENTS=${BASE_DIR}/${JBR_BUNDLE}/Contents
|
||||
JRE_HOME=${JRE_CONTENTS}/Home
|
||||
if [ -d "${JRE_CONTENTS}" ]; then
|
||||
rm -rf ${JRE_CONTENTS}
|
||||
fi
|
||||
mkdir -p ${JRE_CONTENTS}
|
||||
|
||||
JBR=${JBR_BASE_NAME}-osx-${architecture}-b${build_number}
|
||||
|
||||
echo Running jlink....
|
||||
${BASE_DIR}/$JBRSDK_BUNDLE/Contents/Home/bin/jlink \
|
||||
--module-path ${BASE_DIR}/${JBRSDK_BUNDLE}/Contents/Home/jmods --no-man-pages --compress=2 \
|
||||
--add-modules $(xargs < modules_tmp.list | sed s/" "//g) --output ${JRE_HOME} || do_exit $?
|
||||
grep -v "^JAVA_VERSION" ${BASE_DIR}/${JBRSDK_BUNDLE}/Contents/Home/release | grep -v "^MODULES" >> ${JRE_HOME}/release
|
||||
cp -R ${BASE_DIR}/${JBRSDK_BUNDLE}/Contents/MacOS ${JRE_CONTENTS}
|
||||
cp ${BASE_DIR}/${JBRSDK_BUNDLE}/Contents/Info.plist ${JRE_CONTENTS}
|
||||
|
||||
rm -rf ${JRE_CONTENTS}/Frameworks || do_exit $?
|
||||
if [[ "${architecture}" == *aarch64* ]]; then
|
||||
# we can't notarize this library as usual framework (with headers and tbd-file)
|
||||
# but single library notarizes correctly
|
||||
copyJNF ${JRE_CONTENTS}
|
||||
fi
|
||||
if [[ "${bundle_type}" == *jcef* ]] || [[ "${bundle_type}" == *dcevm* ]] || [[ "${bundle_type}" == fd ]]; then
|
||||
cp -a ${JCEF_PATH}/Frameworks ${JRE_CONTENTS} || do_exit $?
|
||||
fi
|
||||
|
||||
echo Creating ${JBR}.tar.gz ...
|
||||
rm -rf ${BASE_DIR}/jbr
|
||||
cp -R ${BASE_DIR}/${JBR_BUNDLE} ${BASE_DIR}/jbr
|
||||
|
||||
COPYFILE_DISABLE=1 tar -pczf ${JBR}.tar.gz --exclude='*.dSYM' --exclude='man' -C ${BASE_DIR} jbr || do_exit $?
|
||||
rm -rf ${BASE_DIR}/${JBR_BUNDLE}
|
||||
}
|
||||
|
||||
JBRSDK_BASE_NAME=jbrsdk-${JBSDK_VERSION}
|
||||
WITH_DEBUG_LEVEL="--with-debug-level=release"
|
||||
CONF_ARCHITECTURE=x86_64
|
||||
if [[ "${architecture}" == *aarch64* ]]; then
|
||||
CONF_ARCHITECTURE=aarch64
|
||||
fi
|
||||
CONF_NAME=macosx-${CONF_ARCHITECTURE}-normal-server-release
|
||||
|
||||
JBSDK=${JBRSDK_BASE_NAME}-osx-${architecture}-b${build_number}
|
||||
case "$bundle_type" in
|
||||
"jcef")
|
||||
git apply -p0 < jb/project/tools/patches/add_jcef_module.patch || do_exit $?
|
||||
do_reset_changes=1
|
||||
;;
|
||||
"dcevm")
|
||||
HEAD_REVISION=$(git rev-parse HEAD)
|
||||
git am jb/project/tools/patches/dcevm/*.patch || do_exit $?
|
||||
do_reset_dcevm=1
|
||||
git apply -p0 < jb/project/tools/patches/add_jcef_module.patch || do_exit $?
|
||||
do_reset_changes=1
|
||||
;;
|
||||
"nomod")
|
||||
WITH_IMPORT_MODULES=""
|
||||
;;
|
||||
"fd")
|
||||
git apply -p0 < jb/project/tools/patches/add_jcef_module.patch || do_exit $?
|
||||
do_reset_changes=1
|
||||
WITH_DEBUG_LEVEL="--with-debug-level=fastdebug"
|
||||
CONF_NAME=macosx-${CONF_ARCHITECTURE}-normal-server-fastdebug
|
||||
JBSDK=${JBRSDK_BASE_NAME}-osx-${architecture}-fastdebug-b${build_number}
|
||||
;;
|
||||
*)
|
||||
echo "***ERR*** bundle was not specified" && do_exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -z "$INC_BUILD" ]; then
|
||||
do_configure || do_exit $?
|
||||
make clean CONF=$RELEASE_NAME || do_exit $?
|
||||
fi
|
||||
make images CONF=$CONF_NAME || do_exit $?
|
||||
|
||||
JSDK=build/${CONF_NAME}/images/jdk-bundle
|
||||
|
||||
BASE_DIR=jre
|
||||
JBRSDK_BUNDLE=jbrsdk
|
||||
|
||||
rm -rf $BASE_DIR
|
||||
mkdir $BASE_DIR || do_exit $?
|
||||
cp -a $JSDK/jdk-$JBSDK_VERSION_WITH_DOTS.jdk $BASE_DIR/$JBRSDK_BUNDLE || do_exit $?
|
||||
if [[ "${bundle_type}" == *jcef* ]] || [[ "${bundle_type}" == *dcevm* ]] || [[ "${bundle_type}" == fd ]]; then
|
||||
cp -a ${JCEF_PATH}/Frameworks $BASE_DIR/$JBRSDK_BUNDLE/Contents/
|
||||
fi
|
||||
if [ "${bundle_type}" == "jcef" ] || [ "${bundle_type}" == "fd" ]; then
|
||||
echo Creating $JBSDK.tar.gz ...
|
||||
if [[ "${architecture}" == *aarch64* ]]; then
|
||||
copyJNF $BASE_DIR/$JBRSDK_BUNDLE/Contents
|
||||
fi
|
||||
sed 's/JBR/JBRSDK/g' ${BASE_DIR}/${JBRSDK_BUNDLE}/Contents/Home/release > release
|
||||
mv release ${BASE_DIR}/${JBRSDK_BUNDLE}/Contents/Home/release
|
||||
[ -f "${JBSDK}.tar.gz" ] && rm "${JBSDK}.tar.gz"
|
||||
COPYFILE_DISABLE=1 tar -pczf ${JBSDK}.tar.gz -C ${BASE_DIR} \
|
||||
--exclude='.DS_Store' --exclude='*~' \
|
||||
--exclude='Home/demo' --exclude='Home/man' --exclude='Home/sample' \
|
||||
${JBRSDK_BUNDLE} || do_exit $?
|
||||
fi
|
||||
|
||||
create_jbr || do_exit $?
|
||||
|
||||
if [ "$bundle_type" == "jcef" ]; then
|
||||
make test-image CONF=$CONF_NAME || do_exit $?
|
||||
|
||||
JBRSDK_TEST=$JBRSDK_BASE_NAME-osx-test-${architecture}-b$build_number
|
||||
|
||||
echo Creating $JBRSDK_TEST.tar.gz ...
|
||||
[ -f "${JBRSDK_TEST}.tar.gz" ] && rm "${JBRSDK_TEST}.tar.gz"
|
||||
COPYFILE_DISABLE=1 tar -pczf ${JBRSDK_TEST}.tar.gz -C build/${CONF_NAME}/images \
|
||||
--exclude='test/jdk/demos' test || do_exit $?
|
||||
fi
|
||||
|
||||
do_exit 0
|
||||
@@ -58,7 +58,7 @@ file="$APP_NAME.zip"
|
||||
|
||||
log "Zipping $file..."
|
||||
rm -rf "$file"
|
||||
ditto -c -k --sequesterRsrc --keepParent "$APP_DIRECTORY" "$file"
|
||||
ditto -c -k --sequesterRsrc --keepParent "$APP_DIRECTORY/Contents" "$file"
|
||||
|
||||
log "Notarizing $file..."
|
||||
rm -rf "altool.init.out" "altool.check.out"
|
||||
|
||||
@@ -30,26 +30,12 @@ for f in \
|
||||
if [ -d "$APP_DIRECTORY/$f" ]; then
|
||||
find "$APP_DIRECTORY/$f" \
|
||||
-type f \( -name "*.jnilib" -o -name "*.dylib" -o -name "*.so" -o -perm +111 \) \
|
||||
-exec codesign --timestamp --force \
|
||||
-exec codesign --timestamp \
|
||||
-v -s "$JB_CERT" --options=runtime \
|
||||
--entitlements entitlements.xml {} \;
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -d "$APP_DIRECTORY/Contents/Frameworks" ]; then
|
||||
log "Signing frameworks..."
|
||||
for f in $APP_DIRECTORY/Contents/Frameworks/*; do
|
||||
find "$f" \
|
||||
-type f \( -name "*.jnilib" -o -name "*.dylib" -o -name "*.so" \) \
|
||||
-exec codesign --timestamp --force \
|
||||
-v -s "$JB_CERT" \
|
||||
--entitlements entitlements.xml {} \;
|
||||
codesign --timestamp --force \
|
||||
-v -s "$JB_CERT" --options=runtime \
|
||||
--entitlements entitlements.xml "$f"
|
||||
done
|
||||
fi
|
||||
|
||||
log "Signing libraries in jars in $PWD"
|
||||
|
||||
# todo: add set -euo pipefail; into the inner sh -c
|
||||
@@ -68,7 +54,7 @@ find "$APP_DIRECTORY" -name '*.jar' \
|
||||
|
||||
find jarfolder \
|
||||
-type f \( -name "*.jnilib" -o -name "*.dylib" -o -name "*.so" -o -name "jattach" \) \
|
||||
-exec codesign --timestamp --force \
|
||||
-exec codesign --timestamp \
|
||||
-v -s "$JB_CERT" --options=runtime \
|
||||
--entitlements entitlements.xml {} \;
|
||||
|
||||
@@ -84,7 +70,7 @@ for f in \
|
||||
if [ -d "$APP_DIRECTORY/$f" ]; then
|
||||
find "$APP_DIRECTORY/$f" \
|
||||
-type f \( -name "*.jnilib" -o -name "*.dylib" -o -name "*.so" -o -perm +111 \) \
|
||||
-exec codesign --timestamp --force \
|
||||
-exec codesign --timestamp \
|
||||
-v -s "$JB_CERT" --options=runtime \
|
||||
--entitlements entitlements.xml {} \;
|
||||
fi
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/bin/bash -x
|
||||
#!/bin/bash
|
||||
|
||||
#immediately exit script with an error if a command fails
|
||||
set -euo pipefail
|
||||
@@ -32,14 +32,16 @@ mkdir "$BACKUP_JMODS"
|
||||
|
||||
log "Unzipping $INPUT_FILE to $EXPLODED ..."
|
||||
tar -xzvf "$INPUT_FILE" --directory $EXPLODED
|
||||
BUILD_NAME="$(ls "$EXPLODED")"
|
||||
sed -i '' s/BNDL/APPL/ $EXPLODED/$BUILD_NAME/Contents/Info.plist
|
||||
rm -f $EXPLODED/$BUILD_NAME/Contents/CodeResources
|
||||
rm "$INPUT_FILE"
|
||||
BUILD_NAME="$(ls "$EXPLODED")"
|
||||
if test -d $EXPLODED/$BUILD_NAME/Contents/Home/jmods; then
|
||||
mv $EXPLODED/$BUILD_NAME/Contents/Home/jmods $BACKUP_JMODS
|
||||
fi
|
||||
if test -f $EXPLODED/$BUILD_NAME/Contents/MacOS/libjli.dylib; then
|
||||
mv $EXPLODED/$BUILD_NAME/Contents/MacOS/libjli.dylib $BACKUP_JMODS
|
||||
fi
|
||||
|
||||
#log "$INPUT_FILE unzipped and removed"
|
||||
log "$INPUT_FILE extracted and removed"
|
||||
|
||||
APPLICATION_PATH="$EXPLODED/$BUILD_NAME"
|
||||
@@ -123,12 +125,15 @@ log "Zipping $BUILD_NAME to $INPUT_FILE ..."
|
||||
(
|
||||
#cd "$EXPLODED"
|
||||
#ditto -c -k --sequesterRsrc --keepParent "$BUILD_NAME" "../$INPUT_FILE"
|
||||
if test ! -z $(ls $BACKUP_JMODS/libjli.dylib); then
|
||||
mv $BACKUP_JMODS/libjli.dylib $EXPLODED/$BUILD_NAME/Contents/MacOS
|
||||
fi
|
||||
if test -d $BACKUP_JMODS/jmods; then
|
||||
mv $BACKUP_JMODS/jmods $EXPLODED/$BUILD_NAME/Contents/Home
|
||||
fi
|
||||
|
||||
tar -pczvf $INPUT_FILE --exclude='*.dSYM' --exclude='man' -C $EXPLODED $BUILD_NAME
|
||||
COPYFILE_DISABLE=1 tar -pczf $INPUT_FILE --exclude='*.dSYM' --exclude='man' -C $EXPLODED $BUILD_NAME
|
||||
log "Finished zipping"
|
||||
)
|
||||
rm -rf "$EXPLODED"
|
||||
log "Done"
|
||||
log "Done"
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
diff --git modules.list modules.list
|
||||
index 33375b527c4..76539cbc0e0 100644
|
||||
--- modules.list
|
||||
+++ modules.list
|
||||
@@ -55,4 +55,7 @@ jdk.unsupported,
|
||||
jdk.xml.dom,
|
||||
jdk.zipfs,
|
||||
jdk.hotspot.agent,
|
||||
-jdk.jcmd
|
||||
+jdk.jcmd,
|
||||
+jcef,
|
||||
+gluegen.rt,
|
||||
+jogl.all
|
||||
diff --git src/java.desktop/share/classes/module-info.java src/java.desktop/share/classes/module-info.java
|
||||
index b663b382f52..3e9acdc0c27 100644
|
||||
--- src/java.desktop/share/classes/module-info.java
|
||||
+++ src/java.desktop/share/classes/module-info.java
|
||||
@@ -109,7 +109,11 @@ module java.desktop {
|
||||
// see make/GensrcModuleInfo.gmk
|
||||
exports sun.awt to
|
||||
jdk.accessibility,
|
||||
- jdk.unsupported.desktop;
|
||||
+ jdk.unsupported.desktop,
|
||||
+ jcef,
|
||||
+ jogl.all;
|
||||
+
|
||||
+ exports java.awt.peer to jcef;
|
||||
|
||||
exports java.awt.dnd.peer to jdk.unsupported.desktop;
|
||||
exports sun.awt.dnd to jdk.unsupported.desktop;
|
||||
@@ -1,27 +0,0 @@
|
||||
diff --git modules.list modules.list
|
||||
index 33375b527c4..76539cbc0e0 100644
|
||||
--- modules.list
|
||||
+++ modules.list
|
||||
@@ -55,4 +55,5 @@ jdk.unsupported,
|
||||
jdk.xml.dom,
|
||||
jdk.zipfs,
|
||||
jdk.hotspot.agent,
|
||||
-jdk.jcmd
|
||||
+jdk.jcmd,
|
||||
+jcef
|
||||
diff --git src/java.desktop/share/classes/module-info.java src/java.desktop/share/classes/module-info.java
|
||||
index b663b382f52..3e9acdc0c27 100644
|
||||
--- src/java.desktop/share/classes/module-info.java
|
||||
+++ src/java.desktop/share/classes/module-info.java
|
||||
@@ -109,7 +109,10 @@ module java.desktop {
|
||||
// see make/GensrcModuleInfo.gmk
|
||||
exports sun.awt to
|
||||
jdk.accessibility,
|
||||
- jdk.unsupported.desktop;
|
||||
+ jdk.unsupported.desktop,
|
||||
+ jcef;
|
||||
+
|
||||
+ exports java.awt.peer to jcef;
|
||||
|
||||
exports java.awt.dnd.peer to jdk.unsupported.desktop;
|
||||
exports sun.awt.dnd to jdk.unsupported.desktop;
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,488 +0,0 @@
|
||||
From a23078dc957ec7b88de7b82fdea6438c9a046cf1 Mon Sep 17 00:00:00 2001
|
||||
From: skybber <lada.dvorak7@gmail.com>
|
||||
Date: Wed, 12 Dec 2018 19:38:28 +0100
|
||||
Subject: [PATCH 03/33] Support for Concurrent Mark Sweep (CMS) collector
|
||||
|
||||
---
|
||||
.../share/gc/cms/compactibleFreeListSpace.cpp | 139 ++++++++++++------
|
||||
.../share/gc/cms/compactibleFreeListSpace.hpp | 5 +-
|
||||
.../gc/cms/concurrentMarkSweepThread.cpp | 10 +-
|
||||
src/hotspot/share/gc/serial/markSweep.cpp | 2 +-
|
||||
src/hotspot/share/gc/shared/gcConfig.cpp | 2 +-
|
||||
src/hotspot/share/gc/shared/space.cpp | 16 +-
|
||||
src/hotspot/share/gc/shared/space.hpp | 6 +-
|
||||
src/hotspot/share/gc/shared/space.inline.hpp | 16 +-
|
||||
.../prims/jvmtiEnhancedRedefineClasses.cpp | 12 +-
|
||||
src/hotspot/share/runtime/arguments.cpp | 6 +-
|
||||
10 files changed, 135 insertions(+), 79 deletions(-)
|
||||
|
||||
diff --git a/src/hotspot/share/gc/cms/compactibleFreeListSpace.cpp b/src/hotspot/share/gc/cms/compactibleFreeListSpace.cpp
|
||||
index 4c9918627a2..f335173576f 100644
|
||||
--- a/src/hotspot/share/gc/cms/compactibleFreeListSpace.cpp
|
||||
+++ b/src/hotspot/share/gc/cms/compactibleFreeListSpace.cpp
|
||||
@@ -376,55 +376,58 @@ CompactibleFreeListSpace::CompactibleFreeListSpace(BlockOffsetSharedArray* bs, M
|
||||
_used_stable = 0;
|
||||
}
|
||||
|
||||
+#define forward_compact_top_DEFN() \
|
||||
+ assert(this == cp->space, "'this' should be current compaction space."); \
|
||||
+ size_t compaction_max_size = pointer_delta(end(), compact_top); \
|
||||
+ assert(adjustObjectSize(size) == cp->space->adjust_object_size_v(size), \
|
||||
+ "virtual adjustObjectSize_v() method is not correct"); \
|
||||
+ size_t adjusted_size = adjustObjectSize(size); \
|
||||
+ assert(compaction_max_size >= MinChunkSize || compaction_max_size == 0, \
|
||||
+ "no small fragments allowed"); \
|
||||
+ assert(minimum_free_block_size() == MinChunkSize, \
|
||||
+ "for de-virtualized reference below"); \
|
||||
+ /* Can't leave a nonzero size, residual fragment smaller than MinChunkSize */ \
|
||||
+ if (adjusted_size + MinChunkSize > compaction_max_size && \
|
||||
+ adjusted_size != compaction_max_size) { \
|
||||
+ do { \
|
||||
+ /* switch to next compaction space*/ \
|
||||
+ cp->space->set_compaction_top(compact_top); \
|
||||
+ cp->space = cp->space->next_compaction_space(); \
|
||||
+ if (cp->space == NULL) { \
|
||||
+ cp->gen = CMSHeap::heap()->young_gen(); \
|
||||
+ assert(cp->gen != NULL, "compaction must succeed"); \
|
||||
+ cp->space = cp->gen->first_compaction_space(); \
|
||||
+ assert(cp->space != NULL, "generation must have a first compaction space"); \
|
||||
+ } \
|
||||
+ compact_top = cp->space->bottom(); \
|
||||
+ cp->space->set_compaction_top(compact_top); \
|
||||
+ /* The correct adjusted_size may not be the same as that for this method */ \
|
||||
+ /* (i.e., cp->space may no longer be "this" so adjust the size again. */ \
|
||||
+ /* Use the virtual method which is not used above to save the virtual */ \
|
||||
+ /* dispatch. */ \
|
||||
+ adjusted_size = cp->space->adjust_object_size_v(size); \
|
||||
+ compaction_max_size = pointer_delta(cp->space->end(), compact_top); \
|
||||
+ assert(cp->space->minimum_free_block_size() == 0, "just checking"); \
|
||||
+ } while (adjusted_size > compaction_max_size); \
|
||||
+ }
|
||||
+
|
||||
+
|
||||
HeapWord* CompactibleFreeListSpace::forward_compact_top(size_t size,
|
||||
CompactPoint* cp, HeapWord* compact_top) {
|
||||
- ShouldNotReachHere();
|
||||
- return NULL;
|
||||
+ forward_compact_top_DEFN()
|
||||
+ return compact_top;
|
||||
}
|
||||
|
||||
// Like CompactibleSpace forward() but always calls cross_threshold() to
|
||||
// update the block offset table. Removed initialize_threshold call because
|
||||
// CFLS does not use a block offset array for contiguous spaces.
|
||||
HeapWord* CompactibleFreeListSpace::forward(oop q, size_t size,
|
||||
- CompactPoint* cp, HeapWord* compact_top) {
|
||||
- // q is alive
|
||||
- // First check if we should switch compaction space
|
||||
- assert(this == cp->space, "'this' should be current compaction space.");
|
||||
- size_t compaction_max_size = pointer_delta(end(), compact_top);
|
||||
- assert(adjustObjectSize(size) == cp->space->adjust_object_size_v(size),
|
||||
- "virtual adjustObjectSize_v() method is not correct");
|
||||
- size_t adjusted_size = adjustObjectSize(size);
|
||||
- assert(compaction_max_size >= MinChunkSize || compaction_max_size == 0,
|
||||
- "no small fragments allowed");
|
||||
- assert(minimum_free_block_size() == MinChunkSize,
|
||||
- "for de-virtualized reference below");
|
||||
- // Can't leave a nonzero size, residual fragment smaller than MinChunkSize
|
||||
- if (adjusted_size + MinChunkSize > compaction_max_size &&
|
||||
- adjusted_size != compaction_max_size) {
|
||||
- do {
|
||||
- // switch to next compaction space
|
||||
- cp->space->set_compaction_top(compact_top);
|
||||
- cp->space = cp->space->next_compaction_space();
|
||||
- if (cp->space == NULL) {
|
||||
- cp->gen = CMSHeap::heap()->young_gen();
|
||||
- assert(cp->gen != NULL, "compaction must succeed");
|
||||
- cp->space = cp->gen->first_compaction_space();
|
||||
- assert(cp->space != NULL, "generation must have a first compaction space");
|
||||
- }
|
||||
- compact_top = cp->space->bottom();
|
||||
- cp->space->set_compaction_top(compact_top);
|
||||
- // The correct adjusted_size may not be the same as that for this method
|
||||
- // (i.e., cp->space may no longer be "this" so adjust the size again.
|
||||
- // Use the virtual method which is not used above to save the virtual
|
||||
- // dispatch.
|
||||
- adjusted_size = cp->space->adjust_object_size_v(size);
|
||||
- compaction_max_size = pointer_delta(cp->space->end(), compact_top);
|
||||
- assert(cp->space->minimum_free_block_size() == 0, "just checking");
|
||||
- } while (adjusted_size > compaction_max_size);
|
||||
- }
|
||||
+ CompactPoint* cp, HeapWord* compact_top, bool force_forward) {
|
||||
+ forward_compact_top_DEFN()
|
||||
|
||||
// store the forwarding pointer into the mark word
|
||||
- if ((HeapWord*)q != compact_top) {
|
||||
+ // the size of object changed for: new_version() != NULL
|
||||
+ if (force_forward || (HeapWord*)q != compact_top || q->klass()->new_version() != NULL) {
|
||||
q->forward_to(oop(compact_top));
|
||||
assert(q->is_gc_marked(), "encoding the pointer should preserve the mark");
|
||||
} else {
|
||||
@@ -2209,13 +2212,60 @@ CompactibleFreeListSpace::refillLinearAllocBlock(LinearAllocBlock* blk) {
|
||||
|
||||
// Support for compaction
|
||||
void CompactibleFreeListSpace::prepare_for_compaction(CompactPoint* cp) {
|
||||
- scan_and_forward(this, cp, false);
|
||||
- // of the free lists doesn't work after.
|
||||
+ if (!Universe::is_redefining_gc_run()) {
|
||||
+ scan_and_forward(this, cp, false);
|
||||
+ } else {
|
||||
+ // Redefinition run
|
||||
+ scan_and_forward(this, cp, true);
|
||||
+ }
|
||||
// Prepare_for_compaction() uses the space between live objects
|
||||
// so that later phase can skip dead space quickly. So verification
|
||||
// of the free lists doesn't work after.
|
||||
}
|
||||
|
||||
+bool CompactibleFreeListSpace::must_rescue(oop old_obj, oop new_obj) {
|
||||
+ // Only redefined objects can have the need to be rescued.
|
||||
+ if (oop(old_obj)->klass()->new_version() == NULL) return false;
|
||||
+
|
||||
+ int new_size = adjustObjectSize(old_obj->size_given_klass(oop(old_obj)->klass()->new_version()));
|
||||
+ int original_size = adjustObjectSize(old_obj->size());
|
||||
+
|
||||
+ Generation* tenured_gen = CMSHeap::heap()->old_gen();
|
||||
+ bool old_in_tenured = tenured_gen->is_in_reserved(old_obj);
|
||||
+ bool new_in_tenured = tenured_gen->is_in_reserved(new_obj);
|
||||
+ if (old_in_tenured == new_in_tenured) {
|
||||
+ // Rescue if object may overlap with a higher memory address.
|
||||
+ bool overlap = ((HeapWord*)old_obj + original_size < (HeapWord*)new_obj + new_size);
|
||||
+ if (old_in_tenured) {
|
||||
+ // Old and new address are in same space, so just compare the address.
|
||||
+ // Must rescue if object moves towards the top of the space.
|
||||
+ assert(space_index(old_obj) == space_index(new_obj), "old_obj and new_obj must be in same space");
|
||||
+ } else {
|
||||
+ // In the new generation, eden is located before the from space, so a
|
||||
+ // simple pointer comparison is sufficient.
|
||||
+ assert(CMSHeap::heap()->young_gen()->is_in_reserved(old_obj), "old_obj must be in DefNewGeneration");
|
||||
+ assert(CMSHeap::heap()->young_gen()->is_in_reserved(new_obj), "new_obj must be in DefNewGeneration");
|
||||
+ assert(overlap == (space_index(old_obj) < space_index(new_obj)), "slow and fast computation must yield same result");
|
||||
+ }
|
||||
+ return overlap;
|
||||
+
|
||||
+ } else {
|
||||
+ assert(space_index(old_obj) != space_index(new_obj), "old_obj and new_obj must be in different spaces");
|
||||
+ if (new_in_tenured) {
|
||||
+ // Must never rescue when moving from the new into the old generation.
|
||||
+ assert(CMSHeap::heap()->young_gen()->is_in_reserved(old_obj), "old_obj must be in DefNewGeneration");
|
||||
+ assert(space_index(old_obj) > space_index(new_obj), "must be");
|
||||
+ return false;
|
||||
+
|
||||
+ } else /* if (tenured_gen->is_in_reserved(old_obj)) */ {
|
||||
+ // Must always rescue when moving from the old into the new generation.
|
||||
+ assert(CMSHeap::heap()->young_gen()->is_in_reserved(new_obj), "new_obj must be in DefNewGeneration");
|
||||
+ assert(space_index(old_obj) < space_index(new_obj), "must be");
|
||||
+ return true;
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
void CompactibleFreeListSpace::adjust_pointers() {
|
||||
// In other versions of adjust_pointers(), a bail out
|
||||
// based on the amount of live data in the generation
|
||||
@@ -2228,7 +2278,12 @@ void CompactibleFreeListSpace::adjust_pointers() {
|
||||
}
|
||||
|
||||
void CompactibleFreeListSpace::compact() {
|
||||
- scan_and_compact(this, false);
|
||||
+ if(!Universe::is_redefining_gc_run()) {
|
||||
+ scan_and_compact(this, false);
|
||||
+ } else {
|
||||
+ // Redefinition run
|
||||
+ scan_and_compact(this, true);
|
||||
+ }
|
||||
}
|
||||
|
||||
// Fragmentation metric = 1 - [sum of (fbs**2) / (sum of fbs)**2]
|
||||
diff --git a/src/hotspot/share/gc/cms/compactibleFreeListSpace.hpp b/src/hotspot/share/gc/cms/compactibleFreeListSpace.hpp
|
||||
index 9fd2ea58320..d29b81f6fca 100644
|
||||
--- a/src/hotspot/share/gc/cms/compactibleFreeListSpace.hpp
|
||||
+++ b/src/hotspot/share/gc/cms/compactibleFreeListSpace.hpp
|
||||
@@ -201,7 +201,7 @@ class CompactibleFreeListSpace: public CompactibleSpace {
|
||||
// Support for compacting cms
|
||||
HeapWord* cross_threshold(HeapWord* start, HeapWord* end);
|
||||
HeapWord* forward_compact_top(size_t size, CompactPoint* cp, HeapWord* compact_top);
|
||||
- HeapWord* forward(oop q, size_t size, CompactPoint* cp, HeapWord* compact_top);
|
||||
+ HeapWord* forward(oop q, size_t size, CompactPoint* cp, HeapWord* compact_top, bool force_forward);
|
||||
|
||||
// Initialization helpers.
|
||||
void initializeIndexedFreeListArray();
|
||||
@@ -576,6 +576,9 @@ class CompactibleFreeListSpace: public CompactibleSpace {
|
||||
|
||||
// Support for compaction.
|
||||
void prepare_for_compaction(CompactPoint* cp);
|
||||
+
|
||||
+ bool must_rescue(oop old_obj, oop new_obj);
|
||||
+
|
||||
void adjust_pointers();
|
||||
void compact();
|
||||
// Reset the space to reflect the fact that a compaction of the
|
||||
diff --git a/src/hotspot/share/gc/cms/concurrentMarkSweepThread.cpp b/src/hotspot/share/gc/cms/concurrentMarkSweepThread.cpp
|
||||
index 3ada5755875..b6e930922d7 100644
|
||||
--- a/src/hotspot/share/gc/cms/concurrentMarkSweepThread.cpp
|
||||
+++ b/src/hotspot/share/gc/cms/concurrentMarkSweepThread.cpp
|
||||
@@ -78,10 +78,12 @@ void ConcurrentMarkSweepThread::run_service() {
|
||||
while (!should_terminate()) {
|
||||
sleepBeforeNextCycle();
|
||||
if (should_terminate()) break;
|
||||
- GCIdMark gc_id_mark;
|
||||
- GCCause::Cause cause = _collector->_full_gc_requested ?
|
||||
- _collector->_full_gc_cause : GCCause::_cms_concurrent_mark;
|
||||
- _collector->collect_in_background(cause);
|
||||
+ if (!Universe::is_redefining_gc_run()) {
|
||||
+ GCIdMark gc_id_mark;
|
||||
+ GCCause::Cause cause = _collector->_full_gc_requested ?
|
||||
+ _collector->_full_gc_cause : GCCause::_cms_concurrent_mark;
|
||||
+ _collector->collect_in_background(cause);
|
||||
+ }
|
||||
}
|
||||
|
||||
// Check that the state of any protocol for synchronization
|
||||
diff --git a/src/hotspot/share/gc/serial/markSweep.cpp b/src/hotspot/share/gc/serial/markSweep.cpp
|
||||
index d0ff86c8215..b4ed59f020c 100644
|
||||
--- a/src/hotspot/share/gc/serial/markSweep.cpp
|
||||
+++ b/src/hotspot/share/gc/serial/markSweep.cpp
|
||||
@@ -247,7 +247,7 @@ void MarkSweep::copy_rescued_objects_back() {
|
||||
|
||||
FREE_RESOURCE_ARRAY(HeapWord, rescued_ptr, size);
|
||||
|
||||
- new_obj->init_mark();
|
||||
+ new_obj->init_mark_raw();
|
||||
assert(oopDesc::is_oop(new_obj), "must be a valid oop");
|
||||
}
|
||||
_rescued_oops->clear();
|
||||
diff --git a/src/hotspot/share/gc/shared/gcConfig.cpp b/src/hotspot/share/gc/shared/gcConfig.cpp
|
||||
index 9779df92447..adb0f5dd25c 100644
|
||||
--- a/src/hotspot/share/gc/shared/gcConfig.cpp
|
||||
+++ b/src/hotspot/share/gc/shared/gcConfig.cpp
|
||||
@@ -106,7 +106,7 @@ void GCConfig::fail_if_unsupported_gc_is_selected() {
|
||||
}
|
||||
|
||||
void GCConfig::select_gc_ergonomically() {
|
||||
- if (AllowEnhancedClassRedefinition) {
|
||||
+ if (AllowEnhancedClassRedefinition && !UseConcMarkSweepGC) {
|
||||
// Enhanced class redefinition only supports serial GC at the moment
|
||||
FLAG_SET_ERGO(bool, UseSerialGC, true);
|
||||
} else if (os::is_server_class_machine()) {
|
||||
diff --git a/src/hotspot/share/gc/shared/space.cpp b/src/hotspot/share/gc/shared/space.cpp
|
||||
index bc0dd1980db..56b144b46f1 100644
|
||||
--- a/src/hotspot/share/gc/shared/space.cpp
|
||||
+++ b/src/hotspot/share/gc/shared/space.cpp
|
||||
@@ -388,11 +388,11 @@ HeapWord* CompactibleSpace::forward_compact_top(size_t size, CompactPoint* cp, H
|
||||
}
|
||||
|
||||
HeapWord* CompactibleSpace::forward(oop q, size_t size,
|
||||
- CompactPoint* cp, HeapWord* compact_top) {
|
||||
+ CompactPoint* cp, HeapWord* compact_top, bool force_forward) {
|
||||
compact_top = forward_compact_top(size, cp, compact_top);
|
||||
|
||||
// store the forwarding pointer into the mark word
|
||||
- if ((HeapWord*)q != compact_top || (size_t)q->size() != size) {
|
||||
+ if (force_forward || (HeapWord*)q != compact_top || (size_t)q->size() != size) {
|
||||
q->forward_to(oop(compact_top));
|
||||
assert(q->is_gc_marked(), "encoding the pointer should preserve the mark");
|
||||
} else {
|
||||
@@ -514,7 +514,7 @@ bool CompactibleSpace::must_rescue(oop old_obj, oop new_obj) {
|
||||
|
||||
} else {
|
||||
assert(space_index(old_obj) != space_index(new_obj), "old_obj and new_obj must be in different spaces");
|
||||
- if (tenured_gen->is_in_reserved(new_obj)) {
|
||||
+ if (new_in_tenured) {
|
||||
// Must never rescue when moving from the new into the old generation.
|
||||
assert(GenCollectedHeap::heap()->young_gen()->is_in_reserved(old_obj), "old_obj must be in DefNewGeneration");
|
||||
assert(space_index(old_obj) > space_index(new_obj), "must be");
|
||||
@@ -858,14 +858,14 @@ void OffsetTableContigSpace::verify() const {
|
||||
// Compute the forward sizes and leave out objects whose position could
|
||||
// possibly overlap other objects.
|
||||
HeapWord* CompactibleSpace::forward_with_rescue(HeapWord* q, size_t size,
|
||||
- CompactPoint* cp, HeapWord* compact_top) {
|
||||
+ CompactPoint* cp, HeapWord* compact_top, bool force_forward) {
|
||||
size_t forward_size = size;
|
||||
|
||||
// (DCEVM) There is a new version of the class of q => different size
|
||||
if (oop(q)->klass()->new_version() != NULL) {
|
||||
|
||||
size_t new_size = oop(q)->size_given_klass(oop(q)->klass()->new_version());
|
||||
- assert(size != new_size, "instances without changed size have to be updated prior to GC run");
|
||||
+ // assert(size != new_size, "instances without changed size have to be updated prior to GC run");
|
||||
forward_size = new_size;
|
||||
}
|
||||
|
||||
@@ -879,7 +879,7 @@ HeapWord* CompactibleSpace::forward_with_rescue(HeapWord* q, size_t size,
|
||||
return compact_top;
|
||||
}
|
||||
|
||||
- return forward(oop(q), forward_size, cp, compact_top);
|
||||
+ return forward(oop(q), forward_size, cp, compact_top, force_forward);
|
||||
}
|
||||
|
||||
// Compute the forwarding addresses for the objects that need to be rescued.
|
||||
@@ -895,11 +895,11 @@ HeapWord* CompactibleSpace::forward_rescued(CompactPoint* cp, HeapWord* compact_
|
||||
// (DCEVM) There is a new version of the class of q => different size
|
||||
if (oop(q)->klass()->new_version() != NULL) {
|
||||
size_t new_size = oop(q)->size_given_klass(oop(q)->klass()->new_version());
|
||||
- assert(size != new_size, "instances without changed size have to be updated prior to GC run");
|
||||
+ // assert(size != new_size, "instances without changed size have to be updated prior to GC run");
|
||||
size = new_size;
|
||||
}
|
||||
|
||||
- compact_top = cp->space->forward(oop(q), size, cp, compact_top);
|
||||
+ compact_top = cp->space->forward(oop(q), size, cp, compact_top, true);
|
||||
assert(compact_top <= end(), "must not write over end of space!");
|
||||
}
|
||||
MarkSweep::_rescued_oops->clear();
|
||||
diff --git a/src/hotspot/share/gc/shared/space.hpp b/src/hotspot/share/gc/shared/space.hpp
|
||||
index 8eb5669fb79..901c89d8a30 100644
|
||||
--- a/src/hotspot/share/gc/shared/space.hpp
|
||||
+++ b/src/hotspot/share/gc/shared/space.hpp
|
||||
@@ -421,7 +421,7 @@ public:
|
||||
virtual void prepare_for_compaction(CompactPoint* cp) = 0;
|
||||
// MarkSweep support phase3
|
||||
DEBUG_ONLY(int space_index(oop obj));
|
||||
- bool must_rescue(oop old_obj, oop new_obj);
|
||||
+ virtual bool must_rescue(oop old_obj, oop new_obj);
|
||||
HeapWord* rescue(HeapWord* old_obj);
|
||||
virtual void adjust_pointers();
|
||||
// MarkSweep support phase4
|
||||
@@ -452,11 +452,11 @@ public:
|
||||
// function of the then-current compaction space, and updates "cp->threshold
|
||||
// accordingly".
|
||||
virtual HeapWord* forward(oop q, size_t size, CompactPoint* cp,
|
||||
- HeapWord* compact_top);
|
||||
+ HeapWord* compact_top, bool force_forward);
|
||||
// (DCEVM) same as forwad, but can rescue objects. Invoked only during
|
||||
// redefinition runs
|
||||
HeapWord* forward_with_rescue(HeapWord* q, size_t size, CompactPoint* cp,
|
||||
- HeapWord* compact_top);
|
||||
+ HeapWord* compact_top, bool force_forward);
|
||||
|
||||
HeapWord* forward_rescued(CompactPoint* cp, HeapWord* compact_top);
|
||||
|
||||
diff --git a/src/hotspot/share/gc/shared/space.inline.hpp b/src/hotspot/share/gc/shared/space.inline.hpp
|
||||
index 6b109fcd2e5..8c255d6d428 100644
|
||||
--- a/src/hotspot/share/gc/shared/space.inline.hpp
|
||||
+++ b/src/hotspot/share/gc/shared/space.inline.hpp
|
||||
@@ -163,6 +163,8 @@ inline void CompactibleSpace::scan_and_forward(SpaceType* space, CompactPoint* c
|
||||
HeapWord* cur_obj = space->bottom();
|
||||
HeapWord* scan_limit = space->scan_limit();
|
||||
|
||||
+ bool force_forward = false;
|
||||
+
|
||||
while (cur_obj < scan_limit) {
|
||||
assert(!space->scanned_block_is_obj(cur_obj) ||
|
||||
oop(cur_obj)->mark_raw()->is_marked() || oop(cur_obj)->mark_raw()->is_unlocked() ||
|
||||
@@ -174,14 +176,15 @@ inline void CompactibleSpace::scan_and_forward(SpaceType* space, CompactPoint* c
|
||||
size_t size = space->scanned_block_size(cur_obj);
|
||||
|
||||
if (redefinition_run) {
|
||||
- compact_top = cp->space->forward_with_rescue(cur_obj, size, cp, compact_top);
|
||||
+ compact_top = cp->space->forward_with_rescue(cur_obj, size, cp, compact_top, force_forward);
|
||||
if (first_dead == NULL && oop(cur_obj)->is_gc_marked()) {
|
||||
/* Was moved (otherwise, forward would reset mark),
|
||||
set first_dead to here */
|
||||
first_dead = cur_obj;
|
||||
+ force_forward = true;
|
||||
}
|
||||
} else {
|
||||
- compact_top = cp->space->forward(oop(cur_obj), size, cp, compact_top);
|
||||
+ compact_top = cp->space->forward(oop(cur_obj), size, cp, compact_top, false);
|
||||
}
|
||||
|
||||
cur_obj += size;
|
||||
@@ -197,9 +200,9 @@ inline void CompactibleSpace::scan_and_forward(SpaceType* space, CompactPoint* c
|
||||
|
||||
// see if we might want to pretend this object is alive so that
|
||||
// we don't have to compact quite as often.
|
||||
- if (cur_obj == compact_top && dead_spacer.insert_deadspace(cur_obj, end)) {
|
||||
+ if (!redefinition_run && cur_obj == compact_top && dead_spacer.insert_deadspace(cur_obj, end)) {
|
||||
oop obj = oop(cur_obj);
|
||||
- compact_top = cp->space->forward(obj, obj->size(), cp, compact_top);
|
||||
+ compact_top = cp->space->forward(obj, obj->size(), cp, compact_top, force_forward);
|
||||
end_of_live = end;
|
||||
} else {
|
||||
// otherwise, it really is a free region.
|
||||
@@ -352,7 +355,7 @@ inline void CompactibleSpace::scan_and_compact(SpaceType* space, bool redefiniti
|
||||
HeapWord* compaction_top = (HeapWord*)oop(cur_obj)->forwardee();
|
||||
|
||||
if (redefinition_run && space->must_rescue(oop(cur_obj), oop(cur_obj)->forwardee())) {
|
||||
- space->rescue(cur_obj);
|
||||
+ space->rescue(cur_obj);
|
||||
debug_only(Copy::fill_to_words(cur_obj, size, 0));
|
||||
cur_obj += size;
|
||||
continue;
|
||||
@@ -362,8 +365,7 @@ inline void CompactibleSpace::scan_and_compact(SpaceType* space, bool redefiniti
|
||||
Prefetch::write(compaction_top, copy_interval);
|
||||
|
||||
// copy object and reinit its mark
|
||||
- assert(cur_obj != compaction_top || oop(cur_obj)->klass()->new_version() != NULL,
|
||||
- "everything in this pass should be moving");
|
||||
+ assert(redefinition_run || cur_obj != compaction_top, "everything in this pass should be moving");
|
||||
if (redefinition_run && oop(cur_obj)->klass()->new_version() != NULL) {
|
||||
Klass* new_version = oop(cur_obj)->klass()->new_version();
|
||||
if (new_version->update_information() == NULL) {
|
||||
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
index 43d761cdbb2..14af1aad21b 100644
|
||||
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
@@ -54,6 +54,7 @@
|
||||
#include "prims/jvmtiThreadState.inline.hpp"
|
||||
#include "utilities/events.hpp"
|
||||
#include "oops/constantPool.inline.hpp"
|
||||
+#include "gc/cms/cmsHeap.hpp"
|
||||
|
||||
Array<Method*>* VM_EnhancedRedefineClasses::_old_methods = NULL;
|
||||
Array<Method*>* VM_EnhancedRedefineClasses::_new_methods = NULL;
|
||||
@@ -416,13 +417,11 @@ public:
|
||||
Klass* new_klass = obj->klass()->new_version();
|
||||
|
||||
if (new_klass->update_information() != NULL) {
|
||||
- int size_diff = obj->size() - obj->size_given_klass(new_klass);
|
||||
-
|
||||
- // Either new size is bigger or gap is to small to be filled
|
||||
- if (size_diff < 0 || (size_diff > 0 && (size_t) size_diff < CollectedHeap::min_fill_size())) {
|
||||
+ if (obj->size() - obj->size_given_klass(new_klass) != 0) {
|
||||
// We need an instance update => set back to old klass
|
||||
_needs_instance_update = true;
|
||||
} else {
|
||||
+ // Either new size is bigger or gap is to small to be filled
|
||||
oop src = obj;
|
||||
if (new_klass->is_copying_backwards()) {
|
||||
copy_to_tmp(obj);
|
||||
@@ -432,11 +431,6 @@ public:
|
||||
// FIXME: instance updates...
|
||||
//guarantee(false, "instance updates!");
|
||||
MarkSweep::update_fields(obj, src, new_klass->update_information());
|
||||
-
|
||||
- if (size_diff > 0) {
|
||||
- HeapWord* dead_space = ((HeapWord *)obj) + obj->size();
|
||||
- CollectedHeap::fill_with_object(dead_space, size_diff);
|
||||
- }
|
||||
}
|
||||
} else {
|
||||
obj->set_klass(obj->klass()->new_version());
|
||||
diff --git a/src/hotspot/share/runtime/arguments.cpp b/src/hotspot/share/runtime/arguments.cpp
|
||||
index 4e2a3ff1083..e3cb44d8690 100644
|
||||
--- a/src/hotspot/share/runtime/arguments.cpp
|
||||
+++ b/src/hotspot/share/runtime/arguments.cpp
|
||||
@@ -2045,14 +2045,14 @@ bool Arguments::check_gc_consistency() {
|
||||
if (AllowEnhancedClassRedefinition) {
|
||||
// Must use serial GC. This limitation applies because the instance size changing GC modifications
|
||||
// are only built into the mark and compact algorithm.
|
||||
- if (!UseSerialGC && i >= 1) {
|
||||
+ if ((!UseSerialGC && !UseConcMarkSweepGC) && i >= 1) {
|
||||
jio_fprintf(defaultStream::error_stream(),
|
||||
- "Must use the serial GC with enhanced class redefinition\n");
|
||||
+ "Must use the serial or concurrent mark sweep GC with enhanced class redefinition.\n");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
- if (i > 1) {
|
||||
+ if (i > 2) {
|
||||
jio_fprintf(defaultStream::error_stream(),
|
||||
"Conflicting collector combinations in option list; "
|
||||
"please refer to the release notes for the combinations "
|
||||
--
|
||||
2.23.0
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
From 89334947f64b857d6ef052e51dc645a0baa9cc65 Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <vladimir.dvorak@mailprofiler.com>
|
||||
Date: Wed, 11 Mar 2020 14:19:34 +0100
|
||||
Subject: [PATCH 04/33] Fix class cast exception on redefinition of class A,
|
||||
that is superclass of B that has anonymous class C
|
||||
|
||||
---
|
||||
src/hotspot/share/oops/instanceKlass.cpp | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/hotspot/share/oops/instanceKlass.cpp b/src/hotspot/share/oops/instanceKlass.cpp
|
||||
index 77708e25aae..76791cdd905 100644
|
||||
--- a/src/hotspot/share/oops/instanceKlass.cpp
|
||||
+++ b/src/hotspot/share/oops/instanceKlass.cpp
|
||||
@@ -788,7 +788,10 @@ bool InstanceKlass::link_class_impl(bool throw_verifyerror, TRAPS) {
|
||||
|
||||
if (!is_linked()) {
|
||||
if (!is_rewritten()) {
|
||||
- {
|
||||
+ // (DCEVM): If class A is being redefined and class B->A (B is extended from A) and B is host class of anonymous class C
|
||||
+ // then second redefinition fails with cannot cast klass exception. So we currently turn off bytecode verification
|
||||
+ // on redefinition.
|
||||
+ if (!AllowEnhancedClassRedefinition || !newest_version()->is_redefining()) {
|
||||
bool verify_ok = verify_code(throw_verifyerror, THREAD);
|
||||
if (!verify_ok) {
|
||||
return false;
|
||||
--
|
||||
2.23.0
|
||||
|
||||
@@ -1,655 +0,0 @@
|
||||
From 9d8b4cee545f9895b77f5f05059cbd519c6c8094 Mon Sep 17 00:00:00 2001
|
||||
From: skybber <lada.dvorak7@gmail.com>
|
||||
Date: Thu, 15 Nov 2018 03:20:08 +0700
|
||||
Subject: [PATCH 05/33] HotswapAgent integration
|
||||
|
||||
It include:
|
||||
|
||||
- option to compile DCEVM only version with -DDCEVM_ONLY added
|
||||
to CFLAGS (bash configure --with-extra-cflags="-DDCEVM_ONLY"), by
|
||||
default compilation goes with HotswapAgent
|
||||
|
||||
Allow ha class initializer calls
|
||||
|
||||
Add --add-opens for necessary modules/packages
|
||||
- java.base/java.lang - for reflection access to Proxy.proxyCache
|
||||
- java.base/jdk.internal.loader - for access proxyCache class
|
||||
- java.desktop/java.beans - for reflection access to Introspector
|
||||
- java.desktop/com.sun.beans
|
||||
- java.base/java.io
|
||||
- com.sun.beans.util
|
||||
|
||||
Open jdk module to access ClassInfo.CACHE
|
||||
|
||||
- be quiet if HotswapAgent is not found in lib/, it is compatible with
|
||||
old DCEVM
|
||||
- disable HotswapAgent for -Xshare:dump
|
||||
- disable HotswapAgent in jvm tools
|
||||
- disable HotswapAgent in keytool
|
||||
---
|
||||
make/launcher/Launcher-java.base.gmk | 1 +
|
||||
make/launcher/Launcher-java.rmi.gmk | 2 +
|
||||
make/launcher/Launcher-java.scripting.gmk | 3 +-
|
||||
make/launcher/Launcher-java.security.jgss.gmk | 3 +
|
||||
make/launcher/Launcher-jdk.aot.gmk | 2 +
|
||||
make/launcher/Launcher-jdk.compiler.gmk | 5 +-
|
||||
make/launcher/Launcher-jdk.hotspot.agent.gmk | 1 +
|
||||
make/launcher/Launcher-jdk.jartool.gmk | 2 +
|
||||
make/launcher/Launcher-jdk.javadoc.gmk | 3 +-
|
||||
make/launcher/Launcher-jdk.jcmd.gmk | 13 +++-
|
||||
make/launcher/Launcher-jdk.jconsole.gmk | 1 +
|
||||
make/launcher/Launcher-jdk.jdeps.gmk | 3 +
|
||||
make/launcher/Launcher-jdk.jdi.gmk | 1 +
|
||||
make/launcher/Launcher-jdk.jlink.gmk | 5 +-
|
||||
make/launcher/Launcher-jdk.jshell.gmk | 1 +
|
||||
make/launcher/Launcher-jdk.jstatd.gmk | 1 +
|
||||
make/launcher/Launcher-jdk.pack.gmk | 1 +
|
||||
make/launcher/Launcher-jdk.rmic.gmk | 1 +
|
||||
.../Launcher-jdk.scripting.nashorn.shell.gmk | 3 +-
|
||||
src/hotspot/share/classfile/vmSymbols.hpp | 1 +
|
||||
.../share/interpreter/linkResolver.cpp | 2 +-
|
||||
src/hotspot/share/runtime/arguments.cpp | 67 +++++++++++++++++++
|
||||
src/hotspot/share/runtime/arguments.hpp | 3 +
|
||||
src/hotspot/share/runtime/globals.hpp | 12 +++-
|
||||
.../sun/beans/introspect/package-info.java | 26 +++++++
|
||||
.../classes/com/sun/beans/package-info.java | 26 +++++++
|
||||
.../com/sun/beans/util/package-info.java | 26 +++++++
|
||||
.../share/classes/module-info.java | 3 +
|
||||
28 files changed, 208 insertions(+), 10 deletions(-)
|
||||
create mode 100644 src/java.desktop/share/classes/com/sun/beans/introspect/package-info.java
|
||||
create mode 100644 src/java.desktop/share/classes/com/sun/beans/package-info.java
|
||||
create mode 100644 src/java.desktop/share/classes/com/sun/beans/util/package-info.java
|
||||
|
||||
diff --git a/make/launcher/Launcher-java.base.gmk b/make/launcher/Launcher-java.base.gmk
|
||||
index f6d4aa28fe6..38ba29530d8 100644
|
||||
--- a/make/launcher/Launcher-java.base.gmk
|
||||
+++ b/make/launcher/Launcher-java.base.gmk
|
||||
@@ -52,6 +52,7 @@ endif
|
||||
|
||||
$(eval $(call SetupBuildLauncher, keytool, \
|
||||
MAIN_CLASS := sun.security.tools.keytool.Main, \
|
||||
+ JAVA_ARGS := -XX:+DisableHotswapAgent, \
|
||||
))
|
||||
|
||||
################################################################################
|
||||
diff --git a/make/launcher/Launcher-java.rmi.gmk b/make/launcher/Launcher-java.rmi.gmk
|
||||
index a69a90bcc81..07046232275 100644
|
||||
--- a/make/launcher/Launcher-java.rmi.gmk
|
||||
+++ b/make/launcher/Launcher-java.rmi.gmk
|
||||
@@ -27,8 +27,10 @@ include LauncherCommon.gmk
|
||||
|
||||
$(eval $(call SetupBuildLauncher, rmid, \
|
||||
MAIN_CLASS := sun.rmi.server.Activation, \
|
||||
+ JAVA_ARGS := -XX:+DisableHotswapAgent, \
|
||||
))
|
||||
|
||||
$(eval $(call SetupBuildLauncher, rmiregistry, \
|
||||
MAIN_CLASS := sun.rmi.registry.RegistryImpl, \
|
||||
+ JAVA_ARGS := -XX:+DisableHotswapAgent, \
|
||||
))
|
||||
diff --git a/make/launcher/Launcher-java.scripting.gmk b/make/launcher/Launcher-java.scripting.gmk
|
||||
index 057d2bf3aca..cf100e20789 100644
|
||||
--- a/make/launcher/Launcher-java.scripting.gmk
|
||||
+++ b/make/launcher/Launcher-java.scripting.gmk
|
||||
@@ -27,5 +27,6 @@ include LauncherCommon.gmk
|
||||
|
||||
$(eval $(call SetupBuildLauncher, jrunscript, \
|
||||
MAIN_CLASS := com.sun.tools.script.shell.Main, \
|
||||
- JAVA_ARGS := --add-modules ALL-DEFAULT, \
|
||||
+ JAVA_ARGS := --add-modules ALL-DEFAULT \
|
||||
+ -XX:+DisableHotswapAgent, \
|
||||
))
|
||||
diff --git a/make/launcher/Launcher-java.security.jgss.gmk b/make/launcher/Launcher-java.security.jgss.gmk
|
||||
index 7411e1a21c4..2b856bfccb4 100644
|
||||
--- a/make/launcher/Launcher-java.security.jgss.gmk
|
||||
+++ b/make/launcher/Launcher-java.security.jgss.gmk
|
||||
@@ -28,13 +28,16 @@ include LauncherCommon.gmk
|
||||
ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
$(eval $(call SetupBuildLauncher, kinit, \
|
||||
MAIN_CLASS := sun.security.krb5.internal.tools.Kinit, \
|
||||
+ JAVA_ARGS := -XX:+DisableHotswapAgent, \
|
||||
))
|
||||
|
||||
$(eval $(call SetupBuildLauncher, klist, \
|
||||
MAIN_CLASS := sun.security.krb5.internal.tools.Klist, \
|
||||
+ JAVA_ARGS := -XX:+DisableHotswapAgent, \
|
||||
))
|
||||
|
||||
$(eval $(call SetupBuildLauncher, ktab, \
|
||||
MAIN_CLASS := sun.security.krb5.internal.tools.Ktab, \
|
||||
+ JAVA_ARGS := -XX:+DisableHotswapAgent, \
|
||||
))
|
||||
endif
|
||||
diff --git a/make/launcher/Launcher-jdk.aot.gmk b/make/launcher/Launcher-jdk.aot.gmk
|
||||
index 10717a5e1c5..2c52c31a555 100644
|
||||
--- a/make/launcher/Launcher-jdk.aot.gmk
|
||||
+++ b/make/launcher/Launcher-jdk.aot.gmk
|
||||
@@ -31,6 +31,7 @@ include LauncherCommon.gmk
|
||||
$(eval $(call SetupBuildLauncher, jaotc, \
|
||||
MAIN_CLASS := jdk.tools.jaotc.Main, \
|
||||
EXTRA_JAVA_ARGS := -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI \
|
||||
+ -XX:+DisableHotswapAgent \
|
||||
--add-exports=jdk.internal.vm.ci/jdk.vm.ci.aarch64=$(call CommaList, jdk.internal.vm.compiler jdk.aot) \
|
||||
--add-exports=jdk.internal.vm.ci/jdk.vm.ci.amd64=$(call CommaList, jdk.internal.vm.compiler jdk.aot) \
|
||||
--add-exports=jdk.internal.vm.ci/jdk.vm.ci.code=$(call CommaList, jdk.internal.vm.compiler jdk.aot) \
|
||||
@@ -40,6 +41,7 @@ $(eval $(call SetupBuildLauncher, jaotc, \
|
||||
--add-exports=jdk.internal.vm.ci/jdk.vm.ci.hotspot=$(call CommaList, jdk.internal.vm.compiler jdk.aot) \
|
||||
, \
|
||||
JAVA_ARGS := --add-exports=jdk.internal.vm.ci/jdk.vm.ci.hotspot.aarch64=$(call CommaList, jdk.internal.vm.compiler jdk.aot) \
|
||||
+ -XX:+DisableHotswapAgent \
|
||||
--add-exports=jdk.internal.vm.ci/jdk.vm.ci.hotspot.amd64=$(call CommaList, jdk.internal.vm.compiler jdk.aot) \
|
||||
--add-exports=jdk.internal.vm.ci/jdk.vm.ci.hotspot.aarch64=$(call CommaList, jdk.internal.vm.compiler jdk.aot) \
|
||||
--add-exports=jdk.internal.vm.ci/jdk.vm.ci.hotspot.sparc=$(call CommaList, jdk.internal.vm.compiler jdk.aot) \
|
||||
diff --git a/make/launcher/Launcher-jdk.compiler.gmk b/make/launcher/Launcher-jdk.compiler.gmk
|
||||
index f71c37adf74..744969546de 100644
|
||||
--- a/make/launcher/Launcher-jdk.compiler.gmk
|
||||
+++ b/make/launcher/Launcher-jdk.compiler.gmk
|
||||
@@ -27,12 +27,14 @@ include LauncherCommon.gmk
|
||||
|
||||
$(eval $(call SetupBuildLauncher, javac, \
|
||||
MAIN_CLASS := com.sun.tools.javac.Main, \
|
||||
- JAVA_ARGS := --add-modules ALL-DEFAULT, \
|
||||
+ JAVA_ARGS := --add-modules ALL-DEFAULT \
|
||||
+ -XX:+DisableHotswapAgent, \
|
||||
CFLAGS := -DEXPAND_CLASSPATH_WILDCARDS, \
|
||||
))
|
||||
|
||||
$(eval $(call SetupBuildLauncher, serialver, \
|
||||
MAIN_CLASS := sun.tools.serialver.SerialVer, \
|
||||
+ JAVA_ARGS := -XX:+DisableHotswapAgent, \
|
||||
CFLAGS := -DEXPAND_CLASSPATH_WILDCARDS, \
|
||||
))
|
||||
|
||||
@@ -41,6 +43,7 @@ ifeq ($(ENABLE_SJAVAC), yes)
|
||||
# into any real images
|
||||
$(eval $(call SetupBuildLauncher, sjavac, \
|
||||
MAIN_CLASS := com.sun.tools.sjavac.Main, \
|
||||
+ JAVA_ARGS := -XX:+DisableHotswapAgent, \
|
||||
CFLAGS := -DEXPAND_CLASSPATH_WILDCARDS, \
|
||||
OUTPUT_DIR := $(JDK_OUTPUTDIR)/bin, \
|
||||
))
|
||||
diff --git a/make/launcher/Launcher-jdk.hotspot.agent.gmk b/make/launcher/Launcher-jdk.hotspot.agent.gmk
|
||||
index 76da3600368..9f12b05b172 100644
|
||||
--- a/make/launcher/Launcher-jdk.hotspot.agent.gmk
|
||||
+++ b/make/launcher/Launcher-jdk.hotspot.agent.gmk
|
||||
@@ -27,5 +27,6 @@ include LauncherCommon.gmk
|
||||
|
||||
$(eval $(call SetupBuildLauncher, jhsdb, \
|
||||
MAIN_CLASS := sun.jvm.hotspot.SALauncher, \
|
||||
+ JAVA_ARGS := -XX:+DisableHotswapAgent, \
|
||||
MACOSX_PRIVILEGED := true, \
|
||||
))
|
||||
diff --git a/make/launcher/Launcher-jdk.jartool.gmk b/make/launcher/Launcher-jdk.jartool.gmk
|
||||
index f74e82bfdae..647d82b65b1 100644
|
||||
--- a/make/launcher/Launcher-jdk.jartool.gmk
|
||||
+++ b/make/launcher/Launcher-jdk.jartool.gmk
|
||||
@@ -27,8 +27,10 @@ include LauncherCommon.gmk
|
||||
|
||||
$(eval $(call SetupBuildLauncher, jar, \
|
||||
MAIN_CLASS := sun.tools.jar.Main, \
|
||||
+ JAVA_ARGS := -XX:+DisableHotswapAgent, \
|
||||
))
|
||||
|
||||
$(eval $(call SetupBuildLauncher, jarsigner, \
|
||||
MAIN_CLASS := sun.security.tools.jarsigner.Main, \
|
||||
+ JAVA_ARGS := -XX:+DisableHotswapAgent, \
|
||||
))
|
||||
diff --git a/make/launcher/Launcher-jdk.javadoc.gmk b/make/launcher/Launcher-jdk.javadoc.gmk
|
||||
index 889028a2b17..c3d2093be04 100644
|
||||
--- a/make/launcher/Launcher-jdk.javadoc.gmk
|
||||
+++ b/make/launcher/Launcher-jdk.javadoc.gmk
|
||||
@@ -27,6 +27,7 @@ include LauncherCommon.gmk
|
||||
|
||||
$(eval $(call SetupBuildLauncher, javadoc, \
|
||||
MAIN_CLASS := jdk.javadoc.internal.tool.Main, \
|
||||
- JAVA_ARGS := --add-modules ALL-DEFAULT, \
|
||||
+ JAVA_ARGS := --add-modules ALL-DEFAULT \
|
||||
+ -XX:+DisableHotswapAgent, \
|
||||
CFLAGS := -DEXPAND_CLASSPATH_WILDCARDS, \
|
||||
))
|
||||
diff --git a/make/launcher/Launcher-jdk.jcmd.gmk b/make/launcher/Launcher-jdk.jcmd.gmk
|
||||
index 7117fa78059..761a52d8466 100644
|
||||
--- a/make/launcher/Launcher-jdk.jcmd.gmk
|
||||
+++ b/make/launcher/Launcher-jdk.jcmd.gmk
|
||||
@@ -30,6 +30,7 @@ $(eval $(call SetupBuildLauncher, jinfo, \
|
||||
JAVA_ARGS := \
|
||||
-Dsun.jvm.hotspot.debugger.useProcDebugger \
|
||||
-Dsun.jvm.hotspot.debugger.useWindbgDebugger, \
|
||||
+ -XX:+DisableHotswapAgent, \
|
||||
MACOSX_PRIVILEGED := true, \
|
||||
))
|
||||
|
||||
@@ -37,28 +38,36 @@ $(eval $(call SetupBuildLauncher, jmap, \
|
||||
MAIN_CLASS := sun.tools.jmap.JMap, \
|
||||
JAVA_ARGS := \
|
||||
-Dsun.jvm.hotspot.debugger.useProcDebugger \
|
||||
- -Dsun.jvm.hotspot.debugger.useWindbgDebugger, \
|
||||
+ -Dsun.jvm.hotspot.debugger.useWindbgDebugger \
|
||||
+ -XX:+DisableHotswapAgent, \
|
||||
MACOSX_PRIVILEGED := true, \
|
||||
))
|
||||
|
||||
$(eval $(call SetupBuildLauncher, jps, \
|
||||
MAIN_CLASS := sun.tools.jps.Jps, \
|
||||
+ JAVA_ARGS := \
|
||||
+ -XX:+DisableHotswapAgent, \
|
||||
))
|
||||
|
||||
$(eval $(call SetupBuildLauncher, jstack, \
|
||||
MAIN_CLASS := sun.tools.jstack.JStack, \
|
||||
JAVA_ARGS := \
|
||||
-Dsun.jvm.hotspot.debugger.useProcDebugger \
|
||||
- -Dsun.jvm.hotspot.debugger.useWindbgDebugger, \
|
||||
+ -Dsun.jvm.hotspot.debugger.useWindbgDebugger \
|
||||
+ -XX:+DisableHotswapAgent, \
|
||||
MACOSX_PRIVILEGED := true, \
|
||||
))
|
||||
|
||||
$(eval $(call SetupBuildLauncher, jstat, \
|
||||
MAIN_CLASS := sun.tools.jstat.Jstat, \
|
||||
+ JAVA_ARGS := \
|
||||
+ -XX:+DisableHotswapAgent, \
|
||||
))
|
||||
|
||||
$(eval $(call SetupBuildLauncher, jcmd, \
|
||||
MAIN_CLASS := sun.tools.jcmd.JCmd, \
|
||||
+ JAVA_ARGS := \
|
||||
+ -XX:+DisableHotswapAgent, \
|
||||
))
|
||||
|
||||
# Hook to include the corresponding custom file, if present.
|
||||
diff --git a/make/launcher/Launcher-jdk.jconsole.gmk b/make/launcher/Launcher-jdk.jconsole.gmk
|
||||
index 575b9e0595b..2f442f69113 100644
|
||||
--- a/make/launcher/Launcher-jdk.jconsole.gmk
|
||||
+++ b/make/launcher/Launcher-jdk.jconsole.gmk
|
||||
@@ -30,6 +30,7 @@ $(eval $(call SetupBuildLauncher, jconsole, \
|
||||
JAVA_ARGS := --add-opens java.base/java.io=jdk.jconsole \
|
||||
-Djconsole.showOutputViewer \
|
||||
-Djdk.attach.allowAttachSelf=true, \
|
||||
+ -XX:+DisableHotswapAgent, \
|
||||
CFLAGS_windows := -DJAVAW, \
|
||||
LIBS_windows := user32.lib, \
|
||||
))
|
||||
diff --git a/make/launcher/Launcher-jdk.jdeps.gmk b/make/launcher/Launcher-jdk.jdeps.gmk
|
||||
index 217523c48cc..5448278dae7 100644
|
||||
--- a/make/launcher/Launcher-jdk.jdeps.gmk
|
||||
+++ b/make/launcher/Launcher-jdk.jdeps.gmk
|
||||
@@ -27,15 +27,18 @@ include LauncherCommon.gmk
|
||||
|
||||
$(eval $(call SetupBuildLauncher, javap, \
|
||||
MAIN_CLASS := com.sun.tools.javap.Main, \
|
||||
+ JAVA_ARGS := -XX:+DisableHotswapAgent, \
|
||||
CFLAGS := -DEXPAND_CLASSPATH_WILDCARDS, \
|
||||
))
|
||||
|
||||
$(eval $(call SetupBuildLauncher, jdeps, \
|
||||
MAIN_CLASS := com.sun.tools.jdeps.Main, \
|
||||
+ JAVA_ARGS := -XX:+DisableHotswapAgent, \
|
||||
CFLAGS := -DEXPAND_CLASSPATH_WILDCARDS, \
|
||||
))
|
||||
|
||||
$(eval $(call SetupBuildLauncher, jdeprscan, \
|
||||
MAIN_CLASS := com.sun.tools.jdeprscan.Main, \
|
||||
+ JAVA_ARGS := -XX:+DisableHotswapAgent, \
|
||||
CFLAGS := -DEXPAND_CLASSPATH_WILDCARDS, \
|
||||
))
|
||||
diff --git a/make/launcher/Launcher-jdk.jdi.gmk b/make/launcher/Launcher-jdk.jdi.gmk
|
||||
index fcce98cf430..27bd448e3ae 100644
|
||||
--- a/make/launcher/Launcher-jdk.jdi.gmk
|
||||
+++ b/make/launcher/Launcher-jdk.jdi.gmk
|
||||
@@ -27,4 +27,5 @@ include LauncherCommon.gmk
|
||||
|
||||
$(eval $(call SetupBuildLauncher, jdb, \
|
||||
MAIN_CLASS := com.sun.tools.example.debug.tty.TTY, \
|
||||
+ JAVA_ARGS := -XX:+DisableHotswapAgent, \
|
||||
))
|
||||
diff --git a/make/launcher/Launcher-jdk.jlink.gmk b/make/launcher/Launcher-jdk.jlink.gmk
|
||||
index df2173996d7..9e61edeb2c8 100644
|
||||
--- a/make/launcher/Launcher-jdk.jlink.gmk
|
||||
+++ b/make/launcher/Launcher-jdk.jlink.gmk
|
||||
@@ -27,18 +27,21 @@ include LauncherCommon.gmk
|
||||
|
||||
$(eval $(call SetupBuildLauncher, jimage,\
|
||||
MAIN_CLASS := jdk.tools.jimage.Main, \
|
||||
+ JAVA_ARGS := -XX:+DisableHotswapAgent, \
|
||||
CFLAGS := -DENABLE_ARG_FILES, \
|
||||
))
|
||||
|
||||
$(eval $(call SetupBuildLauncher, jlink,\
|
||||
MAIN_CLASS := jdk.tools.jlink.internal.Main, \
|
||||
- JAVA_ARGS := --add-modules ALL-DEFAULT, \
|
||||
+ JAVA_ARGS := --add-modules ALL-DEFAULT \
|
||||
+ -XX:+DisableHotswapAgent, \
|
||||
CFLAGS := -DENABLE_ARG_FILES \
|
||||
-DEXPAND_CLASSPATH_WILDCARDS, \
|
||||
))
|
||||
|
||||
$(eval $(call SetupBuildLauncher, jmod,\
|
||||
MAIN_CLASS := jdk.tools.jmod.Main, \
|
||||
+ JAVA_ARGS := -XX:+DisableHotswapAgent, \
|
||||
CFLAGS := -DENABLE_ARG_FILES \
|
||||
-DEXPAND_CLASSPATH_WILDCARDS, \
|
||||
))
|
||||
diff --git a/make/launcher/Launcher-jdk.jshell.gmk b/make/launcher/Launcher-jdk.jshell.gmk
|
||||
index 349eb88e9eb..7287f8f998a 100644
|
||||
--- a/make/launcher/Launcher-jdk.jshell.gmk
|
||||
+++ b/make/launcher/Launcher-jdk.jshell.gmk
|
||||
@@ -27,5 +27,6 @@ include LauncherCommon.gmk
|
||||
|
||||
$(eval $(call SetupBuildLauncher, jshell, \
|
||||
MAIN_CLASS := jdk.internal.jshell.tool.JShellToolProvider, \
|
||||
+ JAVA_ARGS := -XX:+DisableHotswapAgent, \
|
||||
CFLAGS := -DEXPAND_CLASSPATH_WILDCARDS, \
|
||||
))
|
||||
diff --git a/make/launcher/Launcher-jdk.jstatd.gmk b/make/launcher/Launcher-jdk.jstatd.gmk
|
||||
index e9286d63094..e1657910c67 100644
|
||||
--- a/make/launcher/Launcher-jdk.jstatd.gmk
|
||||
+++ b/make/launcher/Launcher-jdk.jstatd.gmk
|
||||
@@ -27,6 +27,7 @@ include LauncherCommon.gmk
|
||||
|
||||
$(eval $(call SetupBuildLauncher, jstatd, \
|
||||
MAIN_CLASS := sun.tools.jstatd.Jstatd, \
|
||||
+ JAVA_ARGS := -XX:+DisableHotswapAgent, \
|
||||
))
|
||||
|
||||
# Hook to include the corresponding custom file, if present.
|
||||
diff --git a/make/launcher/Launcher-jdk.pack.gmk b/make/launcher/Launcher-jdk.pack.gmk
|
||||
index a93fd2a9017..64bbbb7c949 100644
|
||||
--- a/make/launcher/Launcher-jdk.pack.gmk
|
||||
+++ b/make/launcher/Launcher-jdk.pack.gmk
|
||||
@@ -28,6 +28,7 @@ include LauncherCommon.gmk
|
||||
$(eval $(call SetupBuildLauncher, pack200, \
|
||||
MAIN_MODULE := java.base, \
|
||||
MAIN_CLASS := com.sun.java.util.jar.pack.Driver, \
|
||||
+ JAVA_ARGS := -XX:+DisableHotswapAgent, \
|
||||
))
|
||||
|
||||
################################################################################
|
||||
diff --git a/make/launcher/Launcher-jdk.rmic.gmk b/make/launcher/Launcher-jdk.rmic.gmk
|
||||
index d60c3d9b60b..b8a55900b0e 100644
|
||||
--- a/make/launcher/Launcher-jdk.rmic.gmk
|
||||
+++ b/make/launcher/Launcher-jdk.rmic.gmk
|
||||
@@ -27,5 +27,6 @@ include LauncherCommon.gmk
|
||||
|
||||
$(eval $(call SetupBuildLauncher, rmic, \
|
||||
MAIN_CLASS := sun.rmi.rmic.Main, \
|
||||
+ JAVA_ARGS := -XX:+DisableHotswapAgent, \
|
||||
CFLAGS := -DEXPAND_CLASSPATH_WILDCARDS, \
|
||||
))
|
||||
diff --git a/make/launcher/Launcher-jdk.scripting.nashorn.shell.gmk b/make/launcher/Launcher-jdk.scripting.nashorn.shell.gmk
|
||||
index 82311e69fd6..bd39f8595b2 100644
|
||||
--- a/make/launcher/Launcher-jdk.scripting.nashorn.shell.gmk
|
||||
+++ b/make/launcher/Launcher-jdk.scripting.nashorn.shell.gmk
|
||||
@@ -27,6 +27,7 @@ include LauncherCommon.gmk
|
||||
|
||||
$(eval $(call SetupBuildLauncher, jjs, \
|
||||
MAIN_CLASS := jdk.nashorn.tools.jjs.Main, \
|
||||
- JAVA_ARGS := --add-modules ALL-DEFAULT, \
|
||||
+ JAVA_ARGS := --add-modules ALL-DEFAULT \
|
||||
+ -XX:+DisableHotswapAgent, \
|
||||
CFLAGS := -DENABLE_ARG_FILES, \
|
||||
))
|
||||
diff --git a/src/hotspot/share/classfile/vmSymbols.hpp b/src/hotspot/share/classfile/vmSymbols.hpp
|
||||
index 17f7e720c95..0d0badeabd0 100644
|
||||
--- a/src/hotspot/share/classfile/vmSymbols.hpp
|
||||
+++ b/src/hotspot/share/classfile/vmSymbols.hpp
|
||||
@@ -343,6 +343,7 @@
|
||||
/* common method and field names */ \
|
||||
template(object_initializer_name, "<init>") \
|
||||
template(class_initializer_name, "<clinit>") \
|
||||
+ template(ha_class_initializer_name, "$$ha$clinit") \
|
||||
template(println_name, "println") \
|
||||
template(printStackTrace_name, "printStackTrace") \
|
||||
template(main_name, "main") \
|
||||
diff --git a/src/hotspot/share/interpreter/linkResolver.cpp b/src/hotspot/share/interpreter/linkResolver.cpp
|
||||
index 0c24146ff00..9dc184d02f5 100644
|
||||
--- a/src/hotspot/share/interpreter/linkResolver.cpp
|
||||
+++ b/src/hotspot/share/interpreter/linkResolver.cpp
|
||||
@@ -1009,7 +1009,7 @@ void LinkResolver::resolve_field(fieldDescriptor& fd,
|
||||
assert(!m.is_null(), "information about the current method must be available for 'put' bytecodes");
|
||||
bool is_initialized_static_final_update = (byte == Bytecodes::_putstatic &&
|
||||
fd.is_static() &&
|
||||
- !m()->is_static_initializer());
|
||||
+ !(m()->is_static_initializer() || m()->name() == vmSymbols::ha_class_initializer_name()));
|
||||
bool is_initialized_instance_final_update = ((byte == Bytecodes::_putfield || byte == Bytecodes::_nofast_putfield) &&
|
||||
!fd.is_static() &&
|
||||
!m->is_object_initializer());
|
||||
diff --git a/src/hotspot/share/runtime/arguments.cpp b/src/hotspot/share/runtime/arguments.cpp
|
||||
index e3cb44d8690..36276741b5c 100644
|
||||
--- a/src/hotspot/share/runtime/arguments.cpp
|
||||
+++ b/src/hotspot/share/runtime/arguments.cpp
|
||||
@@ -3967,6 +3967,8 @@ jint Arguments::parse(const JavaVMInitArgs* initial_cmd_args) {
|
||||
// Set object alignment values.
|
||||
set_object_alignment();
|
||||
|
||||
+ setup_hotswap_agent();
|
||||
+
|
||||
#if !INCLUDE_CDS
|
||||
if (DumpSharedSpaces || RequireSharedSpaces) {
|
||||
jio_fprintf(defaultStream::error_stream(),
|
||||
@@ -4300,3 +4302,68 @@ bool Arguments::copy_expand_pid(const char* src, size_t srclen,
|
||||
*b = '\0';
|
||||
return (p == src_end); // return false if not all of the source was copied
|
||||
}
|
||||
+
|
||||
+void Arguments::setup_hotswap_agent() {
|
||||
+
|
||||
+ if (DumpSharedSpaces)
|
||||
+ return;
|
||||
+
|
||||
+ if (!AllowEnhancedClassRedefinition)
|
||||
+ return;
|
||||
+
|
||||
+ // Set HotswapAgent
|
||||
+ if (!DisableHotswapAgent) {
|
||||
+
|
||||
+ char ext_path_str[JVM_MAXPATHLEN];
|
||||
+
|
||||
+ os::jvm_path(ext_path_str, sizeof(ext_path_str));
|
||||
+ for (int i = 0; i < 3; i++) {
|
||||
+ char *end = strrchr(ext_path_str, *os::file_separator());
|
||||
+ if (end != NULL) *end = '\0';
|
||||
+ }
|
||||
+ size_t ext_path_length = strlen(ext_path_str);
|
||||
+ if (ext_path_length >= 3) {
|
||||
+ if (strcmp(ext_path_str + ext_path_length - 3, "lib") != 0) {
|
||||
+ if (ext_path_length < JVM_MAXPATHLEN - 4) {
|
||||
+ jio_snprintf(ext_path_str + ext_path_length, sizeof(ext_path_str) - ext_path_length, "%slib", os::file_separator());
|
||||
+ ext_path_length += 4;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ if (ext_path_length < JVM_MAXPATHLEN - 10) {
|
||||
+ jio_snprintf(ext_path_str + ext_path_length, sizeof(ext_path_str) - ext_path_length,
|
||||
+ "%shotswap%shotswap-agent.jar", os::file_separator(), os::file_separator());
|
||||
+ }
|
||||
+
|
||||
+ int fd = ::open(ext_path_str, O_RDONLY);
|
||||
+ if (fd >= 0) {
|
||||
+ os::close(fd);
|
||||
+ size_t length = strlen(ext_path_str) + 1;
|
||||
+ char *options = NEW_C_HEAP_ARRAY(char, length, mtArguments);
|
||||
+ jio_snprintf(options, length, "%s", ext_path_str);
|
||||
+ add_init_agent("instrument", ext_path_str, false);
|
||||
+ jio_fprintf(defaultStream::output_stream(), "Starting HotswapAgent '%s'\n", ext_path_str);
|
||||
+ }
|
||||
+// else
|
||||
+// {
|
||||
+// jio_fprintf(defaultStream::error_stream(), "HotswapAgent not found on path:'%s'\n", ext_path_str);
|
||||
+// }
|
||||
+ }
|
||||
+
|
||||
+ // TODO: open it only for org.hotswap.agent module
|
||||
+ // Use to access java.lang.reflect.Proxy/proxyCache
|
||||
+ create_numbered_property("jdk.module.addopens", "java.base/java.lang=ALL-UNNAMED", addopens_count++);
|
||||
+ // Class of field java.lang.reflect.Proxy/proxyCache
|
||||
+ create_numbered_property("jdk.module.addopens", "java.base/jdk.internal.loader=ALL-UNNAMED", addopens_count++);
|
||||
+ // Use to access java.io.Reader, java.io.InputStream, java.io.FileInputStream
|
||||
+ create_numbered_property("jdk.module.addopens", "java.base/java.io=ALL-UNNAMED", addopens_count++);
|
||||
+ // java.beans.Introspector access
|
||||
+ create_numbered_property("jdk.module.addopens", "java.desktop/java.beans=ALL-UNNAMED", addopens_count++);
|
||||
+ // java.beans.Introspector access
|
||||
+ create_numbered_property("jdk.module.addopens", "java.desktop/com.sun.beans=ALL-UNNAMED", addopens_count++);
|
||||
+ // com.sun.beans.introspect.ClassInfo access
|
||||
+ create_numbered_property("jdk.module.addopens", "java.desktop/com.sun.beans.introspect=ALL-UNNAMED", addopens_count++);
|
||||
+ // com.sun.beans.introspect.util.Cache access
|
||||
+ create_numbered_property("jdk.module.addopens", "java.desktop/com.sun.beans.util=ALL-UNNAMED", addopens_count++);
|
||||
+
|
||||
+}
|
||||
diff --git a/src/hotspot/share/runtime/arguments.hpp b/src/hotspot/share/runtime/arguments.hpp
|
||||
index cc7f71a4404..b2bab2e1f44 100644
|
||||
--- a/src/hotspot/share/runtime/arguments.hpp
|
||||
+++ b/src/hotspot/share/runtime/arguments.hpp
|
||||
@@ -507,6 +507,9 @@ class Arguments : AllStatic {
|
||||
|
||||
static size_t conservative_max_heap_alignment() { return _conservative_max_heap_alignment; }
|
||||
|
||||
+ // Initialize HotswapAgent
|
||||
+ static void setup_hotswap_agent();
|
||||
+
|
||||
// Return the maximum size a heap with compressed oops can take
|
||||
static size_t max_heap_for_compressed_oops();
|
||||
|
||||
diff --git a/src/hotspot/share/runtime/globals.hpp b/src/hotspot/share/runtime/globals.hpp
|
||||
index 194242e4c4b..9c007fc2d82 100644
|
||||
--- a/src/hotspot/share/runtime/globals.hpp
|
||||
+++ b/src/hotspot/share/runtime/globals.hpp
|
||||
@@ -32,6 +32,12 @@
|
||||
|
||||
#include <float.h> // for DBL_MAX
|
||||
|
||||
+#ifdef DCEVM_ONLY
|
||||
+#define DISABLED_HOTSWAP_AGENT true
|
||||
+#else
|
||||
+#define DISABLED_HOTSWAP_AGENT false
|
||||
+#endif
|
||||
+
|
||||
// The larger HeapWordSize for 64bit requires larger heaps
|
||||
// for the same application running in 64bit. See bug 4967770.
|
||||
// The minimum alignment to a heap word size is done. Other
|
||||
@@ -2684,8 +2690,10 @@ define_pd_global(uint64_t,MaxRAM, 1ULL*G);
|
||||
\
|
||||
product(bool, AllowEnhancedClassRedefinition, true, \
|
||||
"Allow enhanced class redefinition beyond swapping method " \
|
||||
- "bodies")
|
||||
-
|
||||
+ "bodies") \
|
||||
+ \
|
||||
+ product(bool, DisableHotswapAgent, DISABLED_HOTSWAP_AGENT, \
|
||||
+ "Disable integrated Hotswap Agent (HotswapVM only)")
|
||||
#define VM_FLAGS(develop, \
|
||||
develop_pd, \
|
||||
product, \
|
||||
diff --git a/src/java.desktop/share/classes/com/sun/beans/introspect/package-info.java b/src/java.desktop/share/classes/com/sun/beans/introspect/package-info.java
|
||||
new file mode 100644
|
||||
index 00000000000..6636e4dd62a
|
||||
--- /dev/null
|
||||
+++ b/src/java.desktop/share/classes/com/sun/beans/introspect/package-info.java
|
||||
@@ -0,0 +1,26 @@
|
||||
+/*
|
||||
+ * Copyright (c) 1998, 2017, 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. Oracle designates this
|
||||
+ * particular file as subject to the "Classpath" exception as provided
|
||||
+ * by Oracle in the LICENSE file that accompanied this code.
|
||||
+ *
|
||||
+ * 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.
|
||||
+ */
|
||||
+
|
||||
+package com.sun.beans.introspect;
|
||||
diff --git a/src/java.desktop/share/classes/com/sun/beans/package-info.java b/src/java.desktop/share/classes/com/sun/beans/package-info.java
|
||||
new file mode 100644
|
||||
index 00000000000..5c097eeaa53
|
||||
--- /dev/null
|
||||
+++ b/src/java.desktop/share/classes/com/sun/beans/package-info.java
|
||||
@@ -0,0 +1,26 @@
|
||||
+/*
|
||||
+ * Copyright (c) 1998, 2017, 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. Oracle designates this
|
||||
+ * particular file as subject to the "Classpath" exception as provided
|
||||
+ * by Oracle in the LICENSE file that accompanied this code.
|
||||
+ *
|
||||
+ * 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.
|
||||
+ */
|
||||
+
|
||||
+package com.sun.beans;
|
||||
diff --git a/src/java.desktop/share/classes/com/sun/beans/util/package-info.java b/src/java.desktop/share/classes/com/sun/beans/util/package-info.java
|
||||
new file mode 100644
|
||||
index 00000000000..2d5d735ffa8
|
||||
--- /dev/null
|
||||
+++ b/src/java.desktop/share/classes/com/sun/beans/util/package-info.java
|
||||
@@ -0,0 +1,26 @@
|
||||
+/*
|
||||
+ * Copyright (c) 1998, 2017, 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. Oracle designates this
|
||||
+ * particular file as subject to the "Classpath" exception as provided
|
||||
+ * by Oracle in the LICENSE file that accompanied this code.
|
||||
+ *
|
||||
+ * 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.
|
||||
+ */
|
||||
+
|
||||
+package com.sun.beans.util;
|
||||
diff --git a/src/java.desktop/share/classes/module-info.java b/src/java.desktop/share/classes/module-info.java
|
||||
index b663b382f52..2a8f0a67d52 100644
|
||||
--- a/src/java.desktop/share/classes/module-info.java
|
||||
+++ b/src/java.desktop/share/classes/module-info.java
|
||||
@@ -104,6 +104,9 @@ module java.desktop {
|
||||
exports javax.swing.text.rtf;
|
||||
exports javax.swing.tree;
|
||||
exports javax.swing.undo;
|
||||
+ exports com.sun.beans;
|
||||
+ exports com.sun.beans.introspect;
|
||||
+ exports com.sun.beans.util;
|
||||
|
||||
// qualified exports may be inserted at build time
|
||||
// see make/GensrcModuleInfo.gmk
|
||||
--
|
||||
2.23.0
|
||||
|
||||
@@ -1,258 +0,0 @@
|
||||
From 4386e1b6a0429a39e390cca3bc66f920bf6dafe5 Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <lada.dvorak7@gmail.com>
|
||||
Date: Sun, 4 Oct 2020 21:12:12 +0200
|
||||
Subject: [PATCH 06/33] Support for Lambda class redefinition
|
||||
|
||||
---
|
||||
.../share/classfile/classLoaderData.cpp | 9 +++
|
||||
.../share/classfile/classLoaderData.hpp | 1 +
|
||||
.../share/classfile/systemDictionary.cpp | 12 +++-
|
||||
.../share/classfile/systemDictionary.hpp | 2 +
|
||||
.../prims/jvmtiEnhancedRedefineClasses.cpp | 65 +++++++++++++++++--
|
||||
.../prims/jvmtiEnhancedRedefineClasses.hpp | 1 +
|
||||
.../share/prims/resolvedMethodTable.cpp | 4 +-
|
||||
src/hotspot/share/prims/unsafe.cpp | 1 +
|
||||
8 files changed, 85 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/src/hotspot/share/classfile/classLoaderData.cpp b/src/hotspot/share/classfile/classLoaderData.cpp
|
||||
index 3f75bffce8a..a901b4309b9 100644
|
||||
--- a/src/hotspot/share/classfile/classLoaderData.cpp
|
||||
+++ b/src/hotspot/share/classfile/classLoaderData.cpp
|
||||
@@ -663,6 +663,15 @@ Dictionary* ClassLoaderData::create_dictionary() {
|
||||
return new Dictionary(this, size, resizable);
|
||||
}
|
||||
|
||||
+void ClassLoaderData::exchange_holders(ClassLoaderData* cld) {
|
||||
+ oop holder_oop = _holder.peek();
|
||||
+ _holder.replace(cld->_holder.peek());
|
||||
+ cld->_holder.replace(holder_oop);
|
||||
+ WeakHandle<vm_class_loader_data> exchange = _holder;
|
||||
+ _holder = cld->_holder;
|
||||
+ cld->_holder = exchange;
|
||||
+}
|
||||
+
|
||||
// Tell the GC to keep this klass alive while iterating ClassLoaderDataGraph
|
||||
oop ClassLoaderData::holder_phantom() const {
|
||||
// A klass that was previously considered dead can be looked up in the
|
||||
diff --git a/src/hotspot/share/classfile/classLoaderData.hpp b/src/hotspot/share/classfile/classLoaderData.hpp
|
||||
index b5a7cf21c85..c4f617ab800 100644
|
||||
--- a/src/hotspot/share/classfile/classLoaderData.hpp
|
||||
+++ b/src/hotspot/share/classfile/classLoaderData.hpp
|
||||
@@ -292,6 +292,7 @@ class ClassLoaderData : public CHeapObj<mtClass> {
|
||||
void accumulate_modified_oops() { if (has_modified_oops()) _accumulated_modified_oops = true; }
|
||||
void clear_accumulated_modified_oops() { _accumulated_modified_oops = false; }
|
||||
bool has_accumulated_modified_oops() { return _accumulated_modified_oops; }
|
||||
+ void exchange_holders(ClassLoaderData* cld);
|
||||
private:
|
||||
|
||||
void unload();
|
||||
diff --git a/src/hotspot/share/classfile/systemDictionary.cpp b/src/hotspot/share/classfile/systemDictionary.cpp
|
||||
index f69167ae53c..42e0fee800f 100644
|
||||
--- a/src/hotspot/share/classfile/systemDictionary.cpp
|
||||
+++ b/src/hotspot/share/classfile/systemDictionary.cpp
|
||||
@@ -971,12 +971,16 @@ InstanceKlass* SystemDictionary::parse_stream(Symbol* class_name,
|
||||
Handle protection_domain,
|
||||
ClassFileStream* st,
|
||||
const InstanceKlass* host_klass,
|
||||
+ InstanceKlass* old_klass,
|
||||
GrowableArray<Handle>* cp_patches,
|
||||
TRAPS) {
|
||||
|
||||
EventClassLoad class_load_start_event;
|
||||
|
||||
ClassLoaderData* loader_data;
|
||||
+
|
||||
+ bool is_redefining = (old_klass != NULL);
|
||||
+
|
||||
if (host_klass != NULL) {
|
||||
// Create a new CLD for anonymous class, that uses the same class loader
|
||||
// as the host_klass
|
||||
@@ -1000,8 +1004,12 @@ InstanceKlass* SystemDictionary::parse_stream(Symbol* class_name,
|
||||
protection_domain,
|
||||
host_klass,
|
||||
cp_patches,
|
||||
- false, // pick_newest
|
||||
+ is_redefining, // pick_newest
|
||||
CHECK_NULL);
|
||||
+ if (is_redefining && k != NULL) {
|
||||
+ k->set_redefining(true);
|
||||
+ k->set_old_version(old_klass);
|
||||
+ }
|
||||
|
||||
if (host_klass != NULL && k != NULL) {
|
||||
// Anonymous classes must update ClassLoaderData holder (was host_klass loader)
|
||||
@@ -1846,7 +1854,7 @@ void SystemDictionary::remove_from_hierarchy(InstanceKlass* k) {
|
||||
k->remove_from_sibling_list();
|
||||
}
|
||||
|
||||
-// (DCEVM)
|
||||
+// (DCEVM)
|
||||
void SystemDictionary::update_constraints_after_redefinition() {
|
||||
constraints()->update_after_redefinition();
|
||||
}
|
||||
diff --git a/src/hotspot/share/classfile/systemDictionary.hpp b/src/hotspot/share/classfile/systemDictionary.hpp
|
||||
index b956c6a7519..a8359143908 100644
|
||||
--- a/src/hotspot/share/classfile/systemDictionary.hpp
|
||||
+++ b/src/hotspot/share/classfile/systemDictionary.hpp
|
||||
@@ -307,6 +307,7 @@ public:
|
||||
protection_domain,
|
||||
st,
|
||||
NULL, // host klass
|
||||
+ NULL, // old class
|
||||
NULL, // cp_patches
|
||||
THREAD);
|
||||
}
|
||||
@@ -315,6 +316,7 @@ public:
|
||||
Handle protection_domain,
|
||||
ClassFileStream* st,
|
||||
const InstanceKlass* host_klass,
|
||||
+ InstanceKlass* old_klass,
|
||||
GrowableArray<Handle>* cp_patches,
|
||||
TRAPS);
|
||||
|
||||
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
index 14af1aad21b..0b239b2ff6d 100644
|
||||
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
@@ -488,6 +488,8 @@ void VM_EnhancedRedefineClasses::doit() {
|
||||
ClassLoaderDataGraph::classes_do(&clear_cpool_cache);
|
||||
|
||||
|
||||
+ // SystemDictionary::methods_do(fix_invoke_method);
|
||||
+
|
||||
// JSR-292 support
|
||||
if (_any_class_has_resolved_methods) {
|
||||
bool trace_name_printed = false;
|
||||
@@ -750,12 +752,34 @@ jvmtiError VM_EnhancedRedefineClasses::load_new_class_versions(TRAPS) {
|
||||
// load hook event.
|
||||
state->set_class_being_redefined(the_class, _class_load_kind);
|
||||
|
||||
- InstanceKlass* k = SystemDictionary::resolve_from_stream(the_class_sym,
|
||||
- the_class_loader,
|
||||
- protection_domain,
|
||||
- &st,
|
||||
- the_class,
|
||||
- THREAD);
|
||||
+ InstanceKlass* k;
|
||||
+
|
||||
+ if (InstanceKlass::cast(the_class)->is_anonymous()) {
|
||||
+ const InstanceKlass* host_class = the_class->host_klass();
|
||||
+
|
||||
+ // Make sure it's the real host class, not another anonymous class.
|
||||
+ while (host_class != NULL && host_class->is_anonymous()) {
|
||||
+ host_class = host_class->host_klass();
|
||||
+ }
|
||||
+
|
||||
+ k = SystemDictionary::parse_stream(the_class_sym,
|
||||
+ the_class_loader,
|
||||
+ protection_domain,
|
||||
+ &st,
|
||||
+ host_class,
|
||||
+ the_class,
|
||||
+ NULL,
|
||||
+ THREAD);
|
||||
+ k->class_loader_data()->exchange_holders(the_class->class_loader_data());
|
||||
+ the_class->class_loader_data()->inc_keep_alive();
|
||||
+ } else {
|
||||
+ k = SystemDictionary::resolve_from_stream(the_class_sym,
|
||||
+ the_class_loader,
|
||||
+ protection_domain,
|
||||
+ &st,
|
||||
+ the_class,
|
||||
+ THREAD);
|
||||
+ }
|
||||
// Clear class_being_redefined just to be sure.
|
||||
state->clear_class_being_redefined();
|
||||
|
||||
@@ -1436,6 +1460,30 @@ void VM_EnhancedRedefineClasses::MethodDataCleaner::do_klass(Klass* k) {
|
||||
}
|
||||
}
|
||||
|
||||
+void VM_EnhancedRedefineClasses::fix_invoke_method(Method* method) {
|
||||
+
|
||||
+ constantPoolHandle other_cp = constantPoolHandle(method->constants());
|
||||
+
|
||||
+ for (int i = 0; i < other_cp->length(); i++) {
|
||||
+ if (other_cp->tag_at(i).is_klass()) {
|
||||
+ Klass* klass = other_cp->resolved_klass_at(i);
|
||||
+ if (klass->new_version() != NULL) {
|
||||
+ // Constant pool entry points to redefined class -- update to the new version
|
||||
+ other_cp->klass_at_put(i, klass->newest_version());
|
||||
+ }
|
||||
+ assert(other_cp->resolved_klass_at(i)->new_version() == NULL, "Must be new klass!");
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ ConstantPoolCache* cp_cache = other_cp->cache();
|
||||
+ if (cp_cache != NULL) {
|
||||
+ cp_cache->clear_entries();
|
||||
+ }
|
||||
+
|
||||
+}
|
||||
+
|
||||
+
|
||||
+
|
||||
void VM_EnhancedRedefineClasses::update_jmethod_ids() {
|
||||
for (int j = 0; j < _matching_methods_length; ++j) {
|
||||
Method* old_method = _matching_old_methods[j];
|
||||
@@ -1973,7 +2021,10 @@ jvmtiError VM_EnhancedRedefineClasses::find_sorted_affected_classes(TRAPS) {
|
||||
// Find classes not directly redefined, but affected by a redefinition (because one of its supertypes is redefined)
|
||||
AffectedKlassClosure closure(_affected_klasses);
|
||||
// Updated in j10, from original SystemDictionary::classes_do
|
||||
- ClassLoaderDataGraph::dictionary_classes_do(&closure);
|
||||
+
|
||||
+ ClassLoaderDataGraph::classes_do(&closure);
|
||||
+ //ClassLoaderDataGraph::dictionary_classes_do(&closure);
|
||||
+
|
||||
log_trace(redefine, class, load)("%d classes affected", _affected_klasses->length());
|
||||
|
||||
// Sort the affected klasses such that a supertype is always on a smaller array index than its subtype.
|
||||
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp
|
||||
index a48e07e3a6a..3551b06ecde 100644
|
||||
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp
|
||||
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp
|
||||
@@ -116,6 +116,7 @@ class VM_EnhancedRedefineClasses: public VM_GC_Operation {
|
||||
void rollback();
|
||||
static void mark_as_scavengable(nmethod* nm);
|
||||
static void unpatch_bytecode(Method* method);
|
||||
+ static void fix_invoke_method(Method* method);
|
||||
|
||||
// Figure out which new methods match old methods in name and signature,
|
||||
// which methods have been added, and which are no longer present
|
||||
diff --git a/src/hotspot/share/prims/resolvedMethodTable.cpp b/src/hotspot/share/prims/resolvedMethodTable.cpp
|
||||
index 8098b80baa6..5a5d5e98623 100644
|
||||
--- a/src/hotspot/share/prims/resolvedMethodTable.cpp
|
||||
+++ b/src/hotspot/share/prims/resolvedMethodTable.cpp
|
||||
@@ -203,7 +203,7 @@ void ResolvedMethodTable::print() {
|
||||
|
||||
void ResolvedMethodTable::adjust_method_entries(bool * trace_name_printed) {
|
||||
assert(SafepointSynchronize::is_at_safepoint(), "only called at safepoint");
|
||||
- // For each entry in RMT, change to new method
|
||||
+ // For each entry in RMT, change to new methodadjust_method_entries_dcevm
|
||||
for (int i = 0; i < _the_table->table_size(); ++i) {
|
||||
for (ResolvedMethodEntry* entry = _the_table->bucket(i);
|
||||
entry != NULL;
|
||||
@@ -274,6 +274,8 @@ void ResolvedMethodTable::adjust_method_entries_dcevm(bool * trace_name_printed)
|
||||
InstanceKlass* newer_klass = InstanceKlass::cast(old_method->method_holder()->new_version());
|
||||
Method* newer_method = newer_klass->method_with_idnum(old_method->orig_method_idnum());
|
||||
|
||||
+ log_info(redefine, class, load, exceptions)("Adjusting method: '%s' of new class %s", newer_method->name_and_sig_as_C_string(), newer_klass->name()->as_C_string());
|
||||
+
|
||||
assert(newer_klass == newer_method->method_holder(), "call after swapping redefined guts");
|
||||
assert(newer_method != NULL, "method_with_idnum() should not be NULL");
|
||||
assert(old_method != newer_method, "sanity check");
|
||||
diff --git a/src/hotspot/share/prims/unsafe.cpp b/src/hotspot/share/prims/unsafe.cpp
|
||||
index 5f9f93c6b4c..c35ef044e65 100644
|
||||
--- a/src/hotspot/share/prims/unsafe.cpp
|
||||
+++ b/src/hotspot/share/prims/unsafe.cpp
|
||||
@@ -820,6 +820,7 @@ Unsafe_DefineAnonymousClass_impl(JNIEnv *env,
|
||||
host_domain,
|
||||
&st,
|
||||
InstanceKlass::cast(host_klass),
|
||||
+ NULL,
|
||||
cp_patches,
|
||||
CHECK_NULL);
|
||||
if (anonk == NULL) {
|
||||
--
|
||||
2.23.0
|
||||
|
||||
@@ -1,135 +0,0 @@
|
||||
From 9e65f8342345df054cc1cb694fb4859e2557401d Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <lada.dvorak7@gmail.com>
|
||||
Date: Sat, 23 May 2020 10:02:15 +0200
|
||||
Subject: [PATCH 07/33] Fix "no original bytecode found" error if method with
|
||||
bkp is missing
|
||||
|
||||
Sometimes IDE can deploy class with erroneous method, such method has
|
||||
n bytecode, but breakpoint position can still exist.
|
||||
---
|
||||
src/hotspot/share/interpreter/bytecodes.cpp | 2 +-
|
||||
.../share/interpreter/interpreterRuntime.cpp | 2 +-
|
||||
src/hotspot/share/oops/method.cpp | 8 ++++----
|
||||
src/hotspot/share/oops/method.hpp | 4 ++--
|
||||
.../prims/jvmtiEnhancedRedefineClasses.cpp | 18 ++++++++++--------
|
||||
5 files changed, 18 insertions(+), 16 deletions(-)
|
||||
|
||||
diff --git a/src/hotspot/share/interpreter/bytecodes.cpp b/src/hotspot/share/interpreter/bytecodes.cpp
|
||||
index e377e36b88c..262ecc021b2 100644
|
||||
--- a/src/hotspot/share/interpreter/bytecodes.cpp
|
||||
+++ b/src/hotspot/share/interpreter/bytecodes.cpp
|
||||
@@ -84,7 +84,7 @@ Bytecodes::Code Bytecodes::code_at(Method* method, int bci) {
|
||||
Bytecodes::Code Bytecodes::non_breakpoint_code_at(const Method* method, address bcp) {
|
||||
assert(method != NULL, "must have the method for breakpoint conversion");
|
||||
assert(method->contains(bcp), "must be valid bcp in method");
|
||||
- return method->orig_bytecode_at(method->bci_from(bcp));
|
||||
+ return method->orig_bytecode_at(method->bci_from(bcp), false);
|
||||
}
|
||||
|
||||
int Bytecodes::special_length_at(Bytecodes::Code code, address bcp, address end) {
|
||||
diff --git a/src/hotspot/share/interpreter/interpreterRuntime.cpp b/src/hotspot/share/interpreter/interpreterRuntime.cpp
|
||||
index aeafba285f0..026fe9234fb 100644
|
||||
--- a/src/hotspot/share/interpreter/interpreterRuntime.cpp
|
||||
+++ b/src/hotspot/share/interpreter/interpreterRuntime.cpp
|
||||
@@ -819,7 +819,7 @@ IRT_END
|
||||
// Invokes
|
||||
|
||||
IRT_ENTRY(Bytecodes::Code, InterpreterRuntime::get_original_bytecode_at(JavaThread* thread, Method* method, address bcp))
|
||||
- return method->orig_bytecode_at(method->bci_from(bcp));
|
||||
+ return method->orig_bytecode_at(method->bci_from(bcp), false);
|
||||
IRT_END
|
||||
|
||||
IRT_ENTRY(void, InterpreterRuntime::set_original_bytecode_at(JavaThread* thread, Method* method, address bcp, Bytecodes::Code new_code))
|
||||
diff --git a/src/hotspot/share/oops/method.cpp b/src/hotspot/share/oops/method.cpp
|
||||
index e47dd223f92..165a2e4de36 100644
|
||||
--- a/src/hotspot/share/oops/method.cpp
|
||||
+++ b/src/hotspot/share/oops/method.cpp
|
||||
@@ -1789,14 +1789,14 @@ bool CompressedLineNumberReadStream::read_pair() {
|
||||
|
||||
#if INCLUDE_JVMTI
|
||||
|
||||
-Bytecodes::Code Method::orig_bytecode_at(int bci) const {
|
||||
+Bytecodes::Code Method::orig_bytecode_at(int bci, bool no_fatal) const {
|
||||
BreakpointInfo* bp = method_holder()->breakpoints();
|
||||
for (; bp != NULL; bp = bp->next()) {
|
||||
if (bp->match(this, bci)) {
|
||||
return bp->orig_bytecode();
|
||||
}
|
||||
}
|
||||
- {
|
||||
+ if (!no_fatal) {
|
||||
ResourceMark rm;
|
||||
fatal("no original bytecode found in %s at bci %d", name_and_sig_as_C_string(), bci);
|
||||
}
|
||||
@@ -1942,7 +1942,7 @@ BreakpointInfo::BreakpointInfo(Method* m, int bci) {
|
||||
_signature_index = m->signature_index();
|
||||
_orig_bytecode = (Bytecodes::Code) *m->bcp_from(_bci);
|
||||
if (_orig_bytecode == Bytecodes::_breakpoint)
|
||||
- _orig_bytecode = m->orig_bytecode_at(_bci);
|
||||
+ _orig_bytecode = m->orig_bytecode_at(_bci, false);
|
||||
_next = NULL;
|
||||
}
|
||||
|
||||
@@ -1951,7 +1951,7 @@ void BreakpointInfo::set(Method* method) {
|
||||
{
|
||||
Bytecodes::Code code = (Bytecodes::Code) *method->bcp_from(_bci);
|
||||
if (code == Bytecodes::_breakpoint)
|
||||
- code = method->orig_bytecode_at(_bci);
|
||||
+ code = method->orig_bytecode_at(_bci, false);
|
||||
assert(orig_bytecode() == code, "original bytecode must be the same");
|
||||
}
|
||||
#endif
|
||||
diff --git a/src/hotspot/share/oops/method.hpp b/src/hotspot/share/oops/method.hpp
|
||||
index 4ac3e6e80de..9ff4f0e8036 100644
|
||||
--- a/src/hotspot/share/oops/method.hpp
|
||||
+++ b/src/hotspot/share/oops/method.hpp
|
||||
@@ -230,7 +230,7 @@ class Method : public Metadata {
|
||||
|
||||
// JVMTI breakpoints
|
||||
#if !INCLUDE_JVMTI
|
||||
- Bytecodes::Code orig_bytecode_at(int bci) const {
|
||||
+ Bytecodes::Code orig_bytecode_at(int bci, bool no_fatal) const {
|
||||
ShouldNotReachHere();
|
||||
return Bytecodes::_shouldnotreachhere;
|
||||
}
|
||||
@@ -239,7 +239,7 @@ class Method : public Metadata {
|
||||
};
|
||||
u2 number_of_breakpoints() const {return 0;}
|
||||
#else // !INCLUDE_JVMTI
|
||||
- Bytecodes::Code orig_bytecode_at(int bci) const;
|
||||
+ Bytecodes::Code orig_bytecode_at(int bci, bool no_fatal) const;
|
||||
void set_orig_bytecode_at(int bci, Bytecodes::Code code);
|
||||
void set_breakpoint(int bci);
|
||||
void clear_breakpoint(int bci);
|
||||
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
index 0b239b2ff6d..aba99bb60fa 100644
|
||||
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
@@ -1356,14 +1356,16 @@ void VM_EnhancedRedefineClasses::unpatch_bytecode(Method* method) {
|
||||
|
||||
if (code == Bytecodes::_breakpoint) {
|
||||
int bci = method->bci_from(bcp);
|
||||
- code = method->orig_bytecode_at(bci);
|
||||
- java_code = Bytecodes::java_code(code);
|
||||
- if (code != java_code &&
|
||||
- (java_code == Bytecodes::_getfield ||
|
||||
- java_code == Bytecodes::_putfield ||
|
||||
- java_code == Bytecodes::_aload_0)) {
|
||||
- // Let breakpoint table handling unpatch bytecode
|
||||
- method->set_orig_bytecode_at(bci, java_code);
|
||||
+ code = method->orig_bytecode_at(bci, true);
|
||||
+ if (code != Bytecodes::_shouldnotreachhere) {
|
||||
+ java_code = Bytecodes::java_code(code);
|
||||
+ if (code != java_code &&
|
||||
+ (java_code == Bytecodes::_getfield ||
|
||||
+ java_code == Bytecodes::_putfield ||
|
||||
+ java_code == Bytecodes::_aload_0)) {
|
||||
+ // Let breakpoint table handling unpatch bytecode
|
||||
+ method->set_orig_bytecode_at(bci, java_code);
|
||||
+ }
|
||||
}
|
||||
} else {
|
||||
java_code = Bytecodes::java_code(code);
|
||||
--
|
||||
2.23.0
|
||||
|
||||
@@ -1,57 +0,0 @@
|
||||
From 08175b2107ccaabcd626ebaf6f154bdd2841a88e Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <lada.dvorak7@gmail.com>
|
||||
Date: Sun, 24 May 2020 12:07:42 +0200
|
||||
Subject: [PATCH 08/33] Replace deleted method with
|
||||
Universe::throw_no_such_method_error
|
||||
|
||||
---
|
||||
.../share/prims/resolvedMethodTable.cpp | 28 +++++++++----------
|
||||
1 file changed, 14 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/src/hotspot/share/prims/resolvedMethodTable.cpp b/src/hotspot/share/prims/resolvedMethodTable.cpp
|
||||
index 5a5d5e98623..c7996df51bc 100644
|
||||
--- a/src/hotspot/share/prims/resolvedMethodTable.cpp
|
||||
+++ b/src/hotspot/share/prims/resolvedMethodTable.cpp
|
||||
@@ -264,25 +264,25 @@ void ResolvedMethodTable::adjust_method_entries_dcevm(bool * trace_name_printed)
|
||||
|
||||
if (old_method->is_old()) {
|
||||
|
||||
+ InstanceKlass* newer_klass = InstanceKlass::cast(old_method->method_holder()->new_version());
|
||||
+ Method* newer_method;
|
||||
+
|
||||
// Method* new_method;
|
||||
if (old_method->is_deleted()) {
|
||||
- // FIXME:(DCEVM) - check if exception can be thrown
|
||||
- // new_method = Universe::throw_no_such_method_error();
|
||||
- continue;
|
||||
- }
|
||||
-
|
||||
- InstanceKlass* newer_klass = InstanceKlass::cast(old_method->method_holder()->new_version());
|
||||
- Method* newer_method = newer_klass->method_with_idnum(old_method->orig_method_idnum());
|
||||
+ newer_method = Universe::throw_no_such_method_error();
|
||||
+ } else {
|
||||
+ newer_method = newer_klass->method_with_idnum(old_method->orig_method_idnum());
|
||||
|
||||
- log_info(redefine, class, load, exceptions)("Adjusting method: '%s' of new class %s", newer_method->name_and_sig_as_C_string(), newer_klass->name()->as_C_string());
|
||||
+ log_info(redefine, class, load, exceptions)("Adjusting method: '%s' of new class %s", newer_method->name_and_sig_as_C_string(), newer_klass->name()->as_C_string());
|
||||
|
||||
- assert(newer_klass == newer_method->method_holder(), "call after swapping redefined guts");
|
||||
- assert(newer_method != NULL, "method_with_idnum() should not be NULL");
|
||||
- assert(old_method != newer_method, "sanity check");
|
||||
+ assert(newer_klass == newer_method->method_holder(), "call after swapping redefined guts");
|
||||
+ assert(newer_method != NULL, "method_with_idnum() should not be NULL");
|
||||
+ assert(old_method != newer_method, "sanity check");
|
||||
|
||||
- if (_the_table->lookup(newer_method) != NULL) {
|
||||
- // old method was already adjusted if new method exists in _the_table
|
||||
- continue;
|
||||
+ if (_the_table->lookup(newer_method) != NULL) {
|
||||
+ // old method was already adjusted if new method exists in _the_table
|
||||
+ continue;
|
||||
+ }
|
||||
}
|
||||
|
||||
java_lang_invoke_ResolvedMethodName::set_vmtarget(mem_name, newer_method);
|
||||
--
|
||||
2.23.0
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,50 +0,0 @@
|
||||
From c7bf974723c6822dca4abc878ee3e59df59d5330 Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <lada.dvorak7@gmail.com>
|
||||
Date: Sat, 13 Jun 2020 18:50:59 +0200
|
||||
Subject: [PATCH 10/33] Change log level in advanced redefinition
|
||||
|
||||
- Change log level for "Comparing different class ver.." to debug
|
||||
- Fix adjust_method_entries_dcevm logging levels and severity
|
||||
---
|
||||
src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp | 2 +-
|
||||
src/hotspot/share/prims/resolvedMethodTable.cpp | 4 ++--
|
||||
2 files changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
index 8b6fad2128e..a8adfa5af47 100644
|
||||
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
@@ -915,7 +915,7 @@ jvmtiError VM_EnhancedRedefineClasses::load_new_class_versions(TRAPS) {
|
||||
// Calculated the difference between new and old class (field change, method change, supertype change, ...).
|
||||
int VM_EnhancedRedefineClasses::calculate_redefinition_flags(InstanceKlass* new_class) {
|
||||
int result = Klass::NoRedefinition;
|
||||
- log_info(redefine, class, load)("Comparing different class versions of class %s",new_class->name()->as_C_string());
|
||||
+ log_debug(redefine, class, load)("Comparing different class versions of class %s",new_class->name()->as_C_string());
|
||||
|
||||
assert(new_class->old_version() != NULL, "must have old version");
|
||||
InstanceKlass* the_class = InstanceKlass::cast(new_class->old_version());
|
||||
diff --git a/src/hotspot/share/prims/resolvedMethodTable.cpp b/src/hotspot/share/prims/resolvedMethodTable.cpp
|
||||
index c7996df51bc..082d3d26c34 100644
|
||||
--- a/src/hotspot/share/prims/resolvedMethodTable.cpp
|
||||
+++ b/src/hotspot/share/prims/resolvedMethodTable.cpp
|
||||
@@ -273,7 +273,7 @@ void ResolvedMethodTable::adjust_method_entries_dcevm(bool * trace_name_printed)
|
||||
} else {
|
||||
newer_method = newer_klass->method_with_idnum(old_method->orig_method_idnum());
|
||||
|
||||
- log_info(redefine, class, load, exceptions)("Adjusting method: '%s' of new class %s", newer_method->name_and_sig_as_C_string(), newer_klass->name()->as_C_string());
|
||||
+ log_debug(redefine, class, update)("Adjusting method: '%s' of new class %s", newer_method->name_and_sig_as_C_string(), newer_klass->name()->as_C_string());
|
||||
|
||||
assert(newer_klass == newer_method->method_holder(), "call after swapping redefined guts");
|
||||
assert(newer_method != NULL, "method_with_idnum() should not be NULL");
|
||||
@@ -293,7 +293,7 @@ void ResolvedMethodTable::adjust_method_entries_dcevm(bool * trace_name_printed)
|
||||
|
||||
ResourceMark rm;
|
||||
if (!(*trace_name_printed)) {
|
||||
- log_info(redefine, class, update)("adjust: name=%s", old_method->method_holder()->external_name());
|
||||
+ log_debug(redefine, class, update)("adjust: name=%s", old_method->method_holder()->external_name());
|
||||
*trace_name_printed = true;
|
||||
}
|
||||
log_debug(redefine, class, update, constantpool)
|
||||
--
|
||||
2.23.0
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
From 3645c65d712993ba5af60e10585dd01c18a7f81f Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <lada.dvorak7@gmail.com>
|
||||
Date: Tue, 6 Oct 2020 22:15:31 +0200
|
||||
Subject: [PATCH 11/33] AllowEnhancedClassRedefinition is false (disabled) by
|
||||
default
|
||||
|
||||
---
|
||||
src/hotspot/share/runtime/globals.hpp | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/hotspot/share/runtime/globals.hpp b/src/hotspot/share/runtime/globals.hpp
|
||||
index 9c007fc2d82..705381825ff 100644
|
||||
--- a/src/hotspot/share/runtime/globals.hpp
|
||||
+++ b/src/hotspot/share/runtime/globals.hpp
|
||||
@@ -2688,7 +2688,7 @@ define_pd_global(uint64_t,MaxRAM, 1ULL*G);
|
||||
experimental(bool, UseFastUnorderedTimeStamps, false, \
|
||||
"Use platform unstable time where supported for timestamps only") \
|
||||
\
|
||||
- product(bool, AllowEnhancedClassRedefinition, true, \
|
||||
+ product(bool, AllowEnhancedClassRedefinition, false, \
|
||||
"Allow enhanced class redefinition beyond swapping method " \
|
||||
"bodies") \
|
||||
\
|
||||
--
|
||||
2.23.0
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
From ee129595faa4dfc3f9c44329a4d6c7a53f5b294d Mon Sep 17 00:00:00 2001
|
||||
From: Artem Khvastunov <artem.khvastunov@jetbrains.com>
|
||||
Date: Tue, 14 Apr 2020 19:11:35 +0200
|
||||
Subject: [PATCH 12/33] add jvmtiEnhancedRedefineClasses.* to CMakeLists.txt
|
||||
|
||||
---
|
||||
jb/project/hotspot-cmake/CMakeLists.txt | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/jb/project/hotspot-cmake/CMakeLists.txt b/jb/project/hotspot-cmake/CMakeLists.txt
|
||||
index 8b552c27206..6516e39058f 100644
|
||||
--- a/jb/project/hotspot-cmake/CMakeLists.txt
|
||||
+++ b/jb/project/hotspot-cmake/CMakeLists.txt
|
||||
@@ -1663,6 +1663,7 @@ set(SOURCE_FILES
|
||||
../../../src/hotspot/share/prims/jvmtiGetLoadedClasses.hpp
|
||||
../../../src/hotspot/share/prims/jvmtiAgentThread.hpp
|
||||
../../../src/hotspot/share/prims/jvmtiCodeBlobEvents.cpp
|
||||
+../../../src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
../../../src/hotspot/share/prims/stackwalk.cpp
|
||||
../../../src/hotspot/share/prims/privilegedStack.hpp
|
||||
../../../src/hotspot/share/prims/jvmtiUtil.hpp
|
||||
@@ -1684,6 +1685,7 @@ set(SOURCE_FILES
|
||||
../../../src/hotspot/share/prims/stackwalk.hpp
|
||||
../../../src/hotspot/share/prims/privilegedStack.cpp
|
||||
../../../src/hotspot/share/prims/jvmtiCodeBlobEvents.hpp
|
||||
+../../../src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp
|
||||
../../../src/hotspot/share/prims/jvmtiUtil.cpp
|
||||
../../../src/hotspot/share/prims/jvmtiEnvBase.cpp
|
||||
../../../src/hotspot/share/prims/methodHandles.cpp
|
||||
--
|
||||
2.23.0
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
From faa30c1c0dc07670641a062b510363c57718e9bf Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <lada.dvorak7@gmail.com>
|
||||
Date: Mon, 19 Oct 2020 20:00:04 +0200
|
||||
Subject: [PATCH 13/33] Set HOTSPOT_VM_DISTRO=Dynamic Code Evolution
|
||||
|
||||
---
|
||||
make/autoconf/version-numbers | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/make/autoconf/version-numbers b/make/autoconf/version-numbers
|
||||
index 0b3247633e3..e1592f4cd3b 100644
|
||||
--- a/make/autoconf/version-numbers
|
||||
+++ b/make/autoconf/version-numbers
|
||||
@@ -44,7 +44,7 @@ PRODUCT_NAME=OpenJDK
|
||||
PRODUCT_SUFFIX="Runtime Environment"
|
||||
JDK_RC_PLATFORM_NAME=Platform
|
||||
COMPANY_NAME=N/A
|
||||
-HOTSPOT_VM_DISTRO="OpenJDK"
|
||||
+HOTSPOT_VM_DISTRO="Dynamic Code Evolution"
|
||||
VENDOR_URL=https://openjdk.java.net/
|
||||
VENDOR_URL_BUG=https://bugreport.java.com/bugreport/
|
||||
VENDOR_URL_VM_BUG=https://bugreport.java.com/bugreport/crash.jsp
|
||||
--
|
||||
2.23.0
|
||||
|
||||
@@ -1,71 +0,0 @@
|
||||
From 8f0ce0a1ae603cb32b2ab39a6bb7d3ad86092c46 Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <lada.dvorak7@gmail.com>
|
||||
Date: Sun, 11 Oct 2020 10:43:28 +0200
|
||||
Subject: [PATCH 14/33] Fix G1 nmethod registration
|
||||
|
||||
---
|
||||
.../prims/jvmtiEnhancedRedefineClasses.cpp | 19 ++++++++++++++++---
|
||||
.../prims/jvmtiEnhancedRedefineClasses.hpp | 3 ++-
|
||||
2 files changed, 18 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
index a8adfa5af47..4ee12b7021f 100644
|
||||
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
@@ -217,7 +217,14 @@ void VM_EnhancedRedefineClasses::mark_as_scavengable(nmethod* nm) {
|
||||
}
|
||||
}
|
||||
|
||||
-void VM_EnhancedRedefineClasses::mark_as_scavengable_g1(nmethod* nm) {
|
||||
+void VM_EnhancedRedefineClasses::unregister_nmethod_g1(nmethod* nm) {
|
||||
+ // It should work not only for G1 but also for another GCs, but this way is safer now
|
||||
+ if (!nm->is_zombie() && !nm->is_unloaded()) {
|
||||
+ Universe::heap()->unregister_nmethod(nm);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+void VM_EnhancedRedefineClasses::register_nmethod_g1(nmethod* nm) {
|
||||
// It should work not only for G1 but also for another GCs, but this way is safer now
|
||||
if (!nm->is_zombie() && !nm->is_unloaded()) {
|
||||
Universe::heap()->register_nmethod(nm);
|
||||
@@ -520,8 +527,9 @@ void VM_EnhancedRedefineClasses::doit() {
|
||||
// For now, mark all nmethod's as scavengable that are not scavengable already
|
||||
if (ScavengeRootsInCode) {
|
||||
if (UseG1GC) {
|
||||
- // this should work also for other GCs
|
||||
- CodeCache::nmethods_do(mark_as_scavengable_g1);
|
||||
+ // G1 holds references to nmethods in regions based on oops values. Since oops in nmethod can be changed in ChangePointers* closures
|
||||
+ // we unregister nmethods from G1 heap, then closures are processed (oops are changed) and finally we register nmethod to G1 again
|
||||
+ CodeCache::nmethods_do(unregister_nmethod_g1);
|
||||
} else {
|
||||
CodeCache::nmethods_do(mark_as_scavengable);
|
||||
}
|
||||
@@ -544,6 +552,11 @@ void VM_EnhancedRedefineClasses::doit() {
|
||||
|
||||
Universe::root_oops_do(&oopClosureNoBarrier);
|
||||
|
||||
+ if (UseG1GC) {
|
||||
+ // this should work also for other GCs
|
||||
+ CodeCache::nmethods_do(register_nmethod_g1);
|
||||
+ }
|
||||
+
|
||||
}
|
||||
log_trace(redefine, class, obsolete, metadata)("After updating instances");
|
||||
|
||||
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp
|
||||
index 62a0fbf54d4..d00109a0b92 100644
|
||||
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp
|
||||
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp
|
||||
@@ -116,7 +116,8 @@ class VM_EnhancedRedefineClasses: public VM_GC_Operation {
|
||||
|
||||
void rollback();
|
||||
static void mark_as_scavengable(nmethod* nm);
|
||||
- static void mark_as_scavengable_g1(nmethod* nm);
|
||||
+ static void unregister_nmethod_g1(nmethod* nm);
|
||||
+ static void register_nmethod_g1(nmethod* nm);
|
||||
static void unpatch_bytecode(Method* method);
|
||||
static void fix_invoke_method(Method* method);
|
||||
|
||||
--
|
||||
2.23.0
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
From 08f455c41f2db7b810c10fa208fc90f55a06fa87 Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <lada.dvorak7@gmail.com>
|
||||
Date: Thu, 22 Oct 2020 20:15:20 +0200
|
||||
Subject: [PATCH 15/33] Initialize method's _new_version/_old_version to NULL
|
||||
|
||||
---
|
||||
src/hotspot/share/oops/method.cpp | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/hotspot/share/oops/method.cpp b/src/hotspot/share/oops/method.cpp
|
||||
index 165a2e4de36..17c08a9dc18 100644
|
||||
--- a/src/hotspot/share/oops/method.cpp
|
||||
+++ b/src/hotspot/share/oops/method.cpp
|
||||
@@ -83,7 +83,8 @@ Method* Method::allocate(ClassLoaderData* loader_data,
|
||||
return new (loader_data, size, MetaspaceObj::MethodType, THREAD) Method(cm, access_flags);
|
||||
}
|
||||
|
||||
-Method::Method(ConstMethod* xconst, AccessFlags access_flags) {
|
||||
+Method::Method(ConstMethod* xconst, AccessFlags access_flags) : _new_version(NULL),
|
||||
+ _old_version(NULL) {
|
||||
NoSafepointVerifier no_safepoint;
|
||||
set_constMethod(xconst);
|
||||
set_access_flags(access_flags);
|
||||
--
|
||||
2.23.0
|
||||
|
||||
@@ -1,191 +0,0 @@
|
||||
From 82bbf38d7385e26f28f47df65b58b1ab7f8c52c3 Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <lada.dvorak7@gmail.com>
|
||||
Date: Fri, 23 Oct 2020 10:20:26 +0200
|
||||
Subject: [PATCH 16/33] Clear dcevm code separation
|
||||
|
||||
---
|
||||
src/hotspot/share/classfile/systemDictionary.cpp | 4 ++--
|
||||
src/hotspot/share/gc/serial/genMarkSweep.cpp | 8 +++++---
|
||||
src/hotspot/share/interpreter/linkResolver.cpp | 14 ++++++++++----
|
||||
.../instrumentation/jfrEventClassTransformer.cpp | 2 +-
|
||||
src/hotspot/share/oops/instanceKlass.cpp | 10 ++++++----
|
||||
src/hotspot/share/oops/method.cpp | 2 +-
|
||||
src/hotspot/share/prims/jvmtiGetLoadedClasses.cpp | 2 +-
|
||||
src/hotspot/share/runtime/reflection.cpp | 2 +-
|
||||
8 files changed, 27 insertions(+), 17 deletions(-)
|
||||
|
||||
diff --git a/src/hotspot/share/classfile/systemDictionary.cpp b/src/hotspot/share/classfile/systemDictionary.cpp
|
||||
index 42e0fee800f..be4d2010c0c 100644
|
||||
--- a/src/hotspot/share/classfile/systemDictionary.cpp
|
||||
+++ b/src/hotspot/share/classfile/systemDictionary.cpp
|
||||
@@ -1152,7 +1152,7 @@ InstanceKlass* SystemDictionary::resolve_from_stream(Symbol* class_name,
|
||||
MutexLocker mu(SystemDictionary_lock, THREAD);
|
||||
|
||||
Klass* check = find_class(h_name, k->class_loader_data());
|
||||
- assert((check == k && !k->is_redefining()) || (k->is_redefining() && check == k->old_version()), "should be present in the dictionary");
|
||||
+ assert(check == k && !k->is_redefining() || k->is_redefining() && check == k->old_version(), "should be present in the dictionary");
|
||||
} );
|
||||
|
||||
return k;
|
||||
@@ -2155,7 +2155,7 @@ void SystemDictionary::check_constraints(unsigned int d_hash,
|
||||
// also hold array classes.
|
||||
|
||||
assert(check->is_instance_klass(), "noninstance in systemdictionary");
|
||||
- if ((defining == true) || ((k != check) && k->old_version() != check)) {
|
||||
+ if ((defining == true) || (k != check && (!AllowEnhancedClassRedefinition || k->old_version() != check))) {
|
||||
throwException = true;
|
||||
ss.print("loader %s", loader_data->loader_name_and_id());
|
||||
ss.print(" attempted duplicate %s definition for %s. (%s)",
|
||||
diff --git a/src/hotspot/share/gc/serial/genMarkSweep.cpp b/src/hotspot/share/gc/serial/genMarkSweep.cpp
|
||||
index b18682f9a12..590b5389b4d 100644
|
||||
--- a/src/hotspot/share/gc/serial/genMarkSweep.cpp
|
||||
+++ b/src/hotspot/share/gc/serial/genMarkSweep.cpp
|
||||
@@ -343,7 +343,9 @@ void GenMarkSweep::mark_sweep_phase4() {
|
||||
|
||||
GenCompactClosure blk;
|
||||
gch->generation_iterate(&blk, true);
|
||||
- DcevmSharedGC::copy_rescued_objects_back(MarkSweep::_rescued_oops, true);
|
||||
- DcevmSharedGC::clear_rescued_objects_resource(MarkSweep::_rescued_oops);
|
||||
- MarkSweep::_rescued_oops = NULL;
|
||||
+ if (AllowEnhancedClassRedefinition) {
|
||||
+ DcevmSharedGC::copy_rescued_objects_back(MarkSweep::_rescued_oops, true);
|
||||
+ DcevmSharedGC::clear_rescued_objects_resource(MarkSweep::_rescued_oops);
|
||||
+ MarkSweep::_rescued_oops = NULL;
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/hotspot/share/interpreter/linkResolver.cpp b/src/hotspot/share/interpreter/linkResolver.cpp
|
||||
index 9dc184d02f5..bff1c3627b0 100644
|
||||
--- a/src/hotspot/share/interpreter/linkResolver.cpp
|
||||
+++ b/src/hotspot/share/interpreter/linkResolver.cpp
|
||||
@@ -295,8 +295,13 @@ void LinkResolver::check_klass_accessability(Klass* ref_klass, Klass* sel_klass,
|
||||
return; // no relevant check to do
|
||||
}
|
||||
}
|
||||
- Reflection::VerifyClassAccessResults vca_result =
|
||||
- Reflection::verify_class_access(ref_klass->newest_version(), InstanceKlass::cast(base_klass->newest_version()), true);
|
||||
+ Klass* refKlassNewest = ref_klass;
|
||||
+ Klass* baseKlassNewest = base_klass;
|
||||
+ if (AllowEnhancedClassRedefinition) {
|
||||
+ refKlassNewest = ref_klass->newest_version();
|
||||
+ baseKlassNewest = base_klass->newest_version();
|
||||
+ }
|
||||
+ Reflection::VerifyClassAccessResults vca_result = Reflection::verify_class_access(refKlassNewest, InstanceKlass::cast(baseKlassNewest), true);
|
||||
if (vca_result != Reflection::ACCESS_OK) {
|
||||
ResourceMark rm(THREAD);
|
||||
char* msg = Reflection::verify_class_access_msg(ref_klass,
|
||||
@@ -572,7 +577,8 @@ void LinkResolver::check_method_accessability(Klass* ref_klass,
|
||||
// We'll check for the method name first, as that's most likely
|
||||
// to be false (so we'll short-circuit out of these tests).
|
||||
if (sel_method->name() == vmSymbols::clone_name() &&
|
||||
- sel_klass->newest_version() == SystemDictionary::Object_klass()->newest_version() &&
|
||||
+ ( !AllowEnhancedClassRedefinition && sel_klass == SystemDictionary::Object_klass() ||
|
||||
+ AllowEnhancedClassRedefinition && sel_klass->newest_version() == SystemDictionary::Object_klass()->newest_version()) &&
|
||||
resolved_klass->is_array_klass()) {
|
||||
// We need to change "protected" to "public".
|
||||
assert(flags.is_protected(), "clone not protected?");
|
||||
@@ -997,7 +1003,7 @@ void LinkResolver::resolve_field(fieldDescriptor& fd,
|
||||
ResourceMark rm(THREAD);
|
||||
stringStream ss;
|
||||
|
||||
- if (sel_klass != current_klass && sel_klass != current_klass->active_version()) {
|
||||
+ if (sel_klass != current_klass && (!AllowEnhancedClassRedefinition || sel_klass != current_klass->active_version())) {
|
||||
ss.print("Update to %s final field %s.%s attempted from a different class (%s) than the field's declaring class",
|
||||
is_static ? "static" : "non-static", resolved_klass->external_name(), fd.name()->as_C_string(),
|
||||
current_klass->external_name());
|
||||
diff --git a/src/hotspot/share/jfr/instrumentation/jfrEventClassTransformer.cpp b/src/hotspot/share/jfr/instrumentation/jfrEventClassTransformer.cpp
|
||||
index 61a406377ee..da9df7a21a2 100644
|
||||
--- a/src/hotspot/share/jfr/instrumentation/jfrEventClassTransformer.cpp
|
||||
+++ b/src/hotspot/share/jfr/instrumentation/jfrEventClassTransformer.cpp
|
||||
@@ -1471,7 +1471,7 @@ static InstanceKlass* create_new_instance_klass(InstanceKlass* ik, ClassFileStre
|
||||
NULL, // host klass
|
||||
NULL, // cp_patches
|
||||
ClassFileParser::INTERNAL, // internal visibility
|
||||
- false,
|
||||
+ false,
|
||||
THREAD);
|
||||
if (HAS_PENDING_EXCEPTION) {
|
||||
log_pending_exception(PENDING_EXCEPTION);
|
||||
diff --git a/src/hotspot/share/oops/instanceKlass.cpp b/src/hotspot/share/oops/instanceKlass.cpp
|
||||
index 76791cdd905..cb448b1b762 100644
|
||||
--- a/src/hotspot/share/oops/instanceKlass.cpp
|
||||
+++ b/src/hotspot/share/oops/instanceKlass.cpp
|
||||
@@ -178,7 +178,9 @@ bool InstanceKlass::has_nest_member(InstanceKlass* k, TRAPS) const {
|
||||
}
|
||||
|
||||
Klass* k2 = _constants->klass_at(cp_index, CHECK_false);
|
||||
- k2 = k2->newest_version();
|
||||
+ if (AllowEnhancedClassRedefinition) {
|
||||
+ k2 = k2->newest_version();
|
||||
+ }
|
||||
if (k2 == k) {
|
||||
log_trace(class, nestmates)("- class is listed as a nest member");
|
||||
return true;
|
||||
@@ -837,7 +839,7 @@ bool InstanceKlass::link_class_impl(bool throw_verifyerror, TRAPS) {
|
||||
#endif
|
||||
set_init_state(linked);
|
||||
// (DCEVM) Must check for old version in order to prevent infinite loops.
|
||||
- if (JvmtiExport::should_post_class_prepare() && old_version() == NULL /* JVMTI deadlock otherwise */) {
|
||||
+ if (JvmtiExport::should_post_class_prepare() && (!AllowEnhancedClassRedefinition || old_version() == NULL) /* JVMTI deadlock otherwise */) {
|
||||
Thread *thread = THREAD;
|
||||
assert(thread->is_Java_thread(), "thread->is_Java_thread()");
|
||||
JvmtiExport::post_class_prepare((JavaThread *) thread, this);
|
||||
@@ -919,7 +921,7 @@ void InstanceKlass::initialize_impl(TRAPS) {
|
||||
// that aren't expected to throw. This would wreak havoc. See 6320309.
|
||||
// (DCEVM) Wait also for the old class version to be fully initialized.
|
||||
while((is_being_initialized() && !is_reentrant_initialization(self))
|
||||
- || (old_version() != NULL && InstanceKlass::cast(old_version())->is_being_initialized())) {
|
||||
+ || (AllowEnhancedClassRedefinition && old_version() != NULL && InstanceKlass::cast(old_version())->is_being_initialized())) {
|
||||
wait = true;
|
||||
ol.waitUninterruptibly(CHECK);
|
||||
}
|
||||
@@ -3629,7 +3631,7 @@ void InstanceKlass::verify_on(outputStream* st) {
|
||||
|
||||
guarantee(sib->is_klass(), "should be klass");
|
||||
// TODO: (DCEVM) explain
|
||||
- guarantee(sib->super() == super || super->newest_version() == SystemDictionary::Object_klass(), "siblings should have same superklass");
|
||||
+ guarantee(sib->super() == super || AllowEnhancedClassRedefinition && super->newest_version() == SystemDictionary::Object_klass(), "siblings should have same superklass");
|
||||
}
|
||||
|
||||
// Verify implementor fields requires the Compile_lock, but this is sometimes
|
||||
diff --git a/src/hotspot/share/oops/method.cpp b/src/hotspot/share/oops/method.cpp
|
||||
index 17c08a9dc18..2596ed7add2 100644
|
||||
--- a/src/hotspot/share/oops/method.cpp
|
||||
+++ b/src/hotspot/share/oops/method.cpp
|
||||
@@ -2145,7 +2145,7 @@ void Method::ensure_jmethod_ids(ClassLoaderData* loader_data, int capacity) {
|
||||
// Add a method id to the jmethod_ids
|
||||
jmethodID Method::make_jmethod_id(ClassLoaderData* loader_data, Method* m) {
|
||||
// FIXME: (DCEVM) ???
|
||||
- if (m != m->newest_version()) {
|
||||
+ if (AllowEnhancedClassRedefinition && m != m->newest_version()) {
|
||||
m = m->newest_version();
|
||||
}
|
||||
ClassLoaderData* cld = loader_data;
|
||||
diff --git a/src/hotspot/share/prims/jvmtiGetLoadedClasses.cpp b/src/hotspot/share/prims/jvmtiGetLoadedClasses.cpp
|
||||
index 60604c645ff..325bffb7ad0 100644
|
||||
--- a/src/hotspot/share/prims/jvmtiGetLoadedClasses.cpp
|
||||
+++ b/src/hotspot/share/prims/jvmtiGetLoadedClasses.cpp
|
||||
@@ -51,7 +51,7 @@ public:
|
||||
// the new version (SystemDictionary stores only new versions). But the LoadedClassesClosure's functionality was
|
||||
// changed in java8 where jvmtiLoadedClasses collects all classes from all classloaders, therefore we
|
||||
// must use new versions only.
|
||||
- if (k->new_version()==NULL) {
|
||||
+ if (AllowEnhancedClassRedefinition && k->new_version()==NULL) {
|
||||
_classStack.push((jclass) _env->jni_reference(Handle(_cur_thread, k->java_mirror())));
|
||||
}
|
||||
}
|
||||
diff --git a/src/hotspot/share/runtime/reflection.cpp b/src/hotspot/share/runtime/reflection.cpp
|
||||
index ac233f3b373..ae0cb65969a 100644
|
||||
--- a/src/hotspot/share/runtime/reflection.cpp
|
||||
+++ b/src/hotspot/share/runtime/reflection.cpp
|
||||
@@ -660,7 +660,7 @@ bool Reflection::verify_member_access(const Klass* current_class,
|
||||
TRAPS) {
|
||||
|
||||
// (DCEVM) Decide accessibility based on active version
|
||||
- if (current_class != NULL) {
|
||||
+ if (AllowEnhancedClassRedefinition && current_class != NULL) {
|
||||
current_class = current_class->active_version();
|
||||
}
|
||||
|
||||
--
|
||||
2.23.0
|
||||
|
||||
@@ -1,160 +0,0 @@
|
||||
From 19981a51c2ea2322f958216fa2c6e83604138d7e Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <lada.dvorak7@gmail.com>
|
||||
Date: Fri, 23 Oct 2020 11:07:40 +0200
|
||||
Subject: [PATCH 17/33] Fix metadataOnStack bug
|
||||
|
||||
---
|
||||
.../share/classfile/classLoaderData.cpp | 7 +-
|
||||
.../share/classfile/metadataOnStackMark.cpp | 67 ++++++++++---------
|
||||
.../share/classfile/metadataOnStackMark.hpp | 3 +-
|
||||
.../share/prims/jvmtiRedefineClasses.cpp | 2 +-
|
||||
4 files changed, 41 insertions(+), 38 deletions(-)
|
||||
|
||||
diff --git a/src/hotspot/share/classfile/classLoaderData.cpp b/src/hotspot/share/classfile/classLoaderData.cpp
|
||||
index a901b4309b9..7b88f6b44d9 100644
|
||||
--- a/src/hotspot/share/classfile/classLoaderData.cpp
|
||||
+++ b/src/hotspot/share/classfile/classLoaderData.cpp
|
||||
@@ -1401,13 +1401,10 @@ bool ClassLoaderDataGraph::do_unloading(bool clean_previous_versions) {
|
||||
// Klassesoto delete.
|
||||
|
||||
// FIXME: dcevm - block asserts in MetadataOnStackMark
|
||||
- bool walk_all_metadata = false;
|
||||
- if (!AllowEnhancedClassRedefinition) {
|
||||
- walk_all_metadata = clean_previous_versions &&
|
||||
+ bool walk_all_metadata = clean_previous_versions &&
|
||||
JvmtiExport::has_redefined_a_class() &&
|
||||
InstanceKlass::has_previous_versions_and_reset();
|
||||
- MetadataOnStackMark md_on_stack(walk_all_metadata);
|
||||
- }
|
||||
+ MetadataOnStackMark md_on_stack(walk_all_metadata, AllowEnhancedClassRedefinition);
|
||||
|
||||
// Save previous _unloading pointer for CMS which may add to unloading list before
|
||||
// purging and we don't want to rewalk the previously unloaded class loader data.
|
||||
diff --git a/src/hotspot/share/classfile/metadataOnStackMark.cpp b/src/hotspot/share/classfile/metadataOnStackMark.cpp
|
||||
index 3a62c789702..9d7bdbde74b 100644
|
||||
--- a/src/hotspot/share/classfile/metadataOnStackMark.cpp
|
||||
+++ b/src/hotspot/share/classfile/metadataOnStackMark.cpp
|
||||
@@ -46,23 +46,25 @@ NOT_PRODUCT(bool MetadataOnStackMark::_is_active = false;)
|
||||
// it. Class unloading only deletes in-error class files, methods created by
|
||||
// the relocator and dummy constant pools. None of these appear anywhere except
|
||||
// in metadata Handles.
|
||||
-MetadataOnStackMark::MetadataOnStackMark(bool redefinition_walk) {
|
||||
+MetadataOnStackMark::MetadataOnStackMark(bool redefinition_walk, bool ignore) : _ignore(ignore) {
|
||||
assert(SafepointSynchronize::is_at_safepoint(), "sanity check");
|
||||
assert(_used_buffers == NULL, "sanity check");
|
||||
assert(!_is_active, "MetadataOnStackMarks do not nest");
|
||||
NOT_PRODUCT(_is_active = true;)
|
||||
|
||||
- Threads::metadata_handles_do(Metadata::mark_on_stack);
|
||||
+ if (!ignore) {
|
||||
+ Threads::metadata_handles_do(Metadata::mark_on_stack);
|
||||
|
||||
- if (redefinition_walk) {
|
||||
- Threads::metadata_do(Metadata::mark_on_stack);
|
||||
- CodeCache::metadata_do(Metadata::mark_on_stack);
|
||||
- CompileBroker::mark_on_stack();
|
||||
- JvmtiCurrentBreakpoints::metadata_do(Metadata::mark_on_stack);
|
||||
- ThreadService::metadata_do(Metadata::mark_on_stack);
|
||||
+ if (redefinition_walk) {
|
||||
+ Threads::metadata_do(Metadata::mark_on_stack);
|
||||
+ CodeCache::metadata_do(Metadata::mark_on_stack);
|
||||
+ CompileBroker::mark_on_stack();
|
||||
+ JvmtiCurrentBreakpoints::metadata_do(Metadata::mark_on_stack);
|
||||
+ ThreadService::metadata_do(Metadata::mark_on_stack);
|
||||
#if INCLUDE_JVMCI
|
||||
- JVMCIRuntime::metadata_do(Metadata::mark_on_stack);
|
||||
+ JVMCIRuntime::metadata_do(Metadata::mark_on_stack);
|
||||
#endif
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -71,32 +73,35 @@ MetadataOnStackMark::~MetadataOnStackMark() {
|
||||
// Unmark everything that was marked. Can't do the same walk because
|
||||
// redefine classes messes up the code cache so the set of methods
|
||||
// might not be the same.
|
||||
- retire_current_buffer();
|
||||
-
|
||||
- MetadataOnStackBuffer* buffer = _used_buffers;
|
||||
- while (buffer != NULL) {
|
||||
- // Clear on stack state for all metadata.
|
||||
- size_t size = buffer->size();
|
||||
- for (size_t i = 0; i < size; i++) {
|
||||
- Metadata* md = buffer->at(i);
|
||||
- md->set_on_stack(false);
|
||||
+ if (!_ignore)
|
||||
+ {
|
||||
+ retire_current_buffer();
|
||||
+
|
||||
+ MetadataOnStackBuffer* buffer = _used_buffers;
|
||||
+ while (buffer != NULL) {
|
||||
+ // Clear on stack state for all metadata.
|
||||
+ size_t size = buffer->size();
|
||||
+ for (size_t i = 0; i < size; i++) {
|
||||
+ Metadata* md = buffer->at(i);
|
||||
+ md->set_on_stack(false);
|
||||
+ }
|
||||
+
|
||||
+ MetadataOnStackBuffer* next = buffer->next_used();
|
||||
+
|
||||
+ // Move the buffer to the free list.
|
||||
+ buffer->clear();
|
||||
+ buffer->set_next_used(NULL);
|
||||
+ buffer->set_next_free(_free_buffers);
|
||||
+ _free_buffers = buffer;
|
||||
+
|
||||
+ // Step to next used buffer.
|
||||
+ buffer = next;
|
||||
}
|
||||
|
||||
- MetadataOnStackBuffer* next = buffer->next_used();
|
||||
-
|
||||
- // Move the buffer to the free list.
|
||||
- buffer->clear();
|
||||
- buffer->set_next_used(NULL);
|
||||
- buffer->set_next_free(_free_buffers);
|
||||
- _free_buffers = buffer;
|
||||
+ _used_buffers = NULL;
|
||||
|
||||
- // Step to next used buffer.
|
||||
- buffer = next;
|
||||
+ NOT_PRODUCT(_is_active = false;)
|
||||
}
|
||||
-
|
||||
- _used_buffers = NULL;
|
||||
-
|
||||
- NOT_PRODUCT(_is_active = false;)
|
||||
}
|
||||
|
||||
void MetadataOnStackMark::retire_buffer(MetadataOnStackBuffer* buffer) {
|
||||
diff --git a/src/hotspot/share/classfile/metadataOnStackMark.hpp b/src/hotspot/share/classfile/metadataOnStackMark.hpp
|
||||
index 8da4ac6f92b..6d327ab98f2 100644
|
||||
--- a/src/hotspot/share/classfile/metadataOnStackMark.hpp
|
||||
+++ b/src/hotspot/share/classfile/metadataOnStackMark.hpp
|
||||
@@ -47,8 +47,9 @@ class MetadataOnStackMark : public StackObj {
|
||||
static MetadataOnStackBuffer* allocate_buffer();
|
||||
static void retire_buffer(MetadataOnStackBuffer* buffer);
|
||||
|
||||
+ bool _ignore;
|
||||
public:
|
||||
- MetadataOnStackMark(bool redefinition_walk);
|
||||
+ MetadataOnStackMark(bool redefinition_walk, bool ignore);
|
||||
~MetadataOnStackMark();
|
||||
|
||||
static void record(Metadata* m);
|
||||
diff --git a/src/hotspot/share/prims/jvmtiRedefineClasses.cpp b/src/hotspot/share/prims/jvmtiRedefineClasses.cpp
|
||||
index fb81189d9c2..18bc7f4eea4 100644
|
||||
--- a/src/hotspot/share/prims/jvmtiRedefineClasses.cpp
|
||||
+++ b/src/hotspot/share/prims/jvmtiRedefineClasses.cpp
|
||||
@@ -199,7 +199,7 @@ void VM_RedefineClasses::doit() {
|
||||
|
||||
// Mark methods seen on stack and everywhere else so old methods are not
|
||||
// cleaned up if they're on the stack.
|
||||
- MetadataOnStackMark md_on_stack(true);
|
||||
+ MetadataOnStackMark md_on_stack(true, false);
|
||||
HandleMark hm(thread); // make sure any handles created are deleted
|
||||
// before the stack walk again.
|
||||
|
||||
--
|
||||
2.23.0
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
From 163cf26017433389041f824c7d8342eb54f4cef8 Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <lada.dvorak7@gmail.com>
|
||||
Date: Sun, 1 Nov 2020 21:19:00 +0100
|
||||
Subject: [PATCH 18/33] Ignore MetadataOnStackMark if redefining_gc_run
|
||||
|
||||
---
|
||||
src/hotspot/share/classfile/classLoaderData.cpp | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/hotspot/share/classfile/classLoaderData.cpp b/src/hotspot/share/classfile/classLoaderData.cpp
|
||||
index 7b88f6b44d9..2f6329f3e4d 100644
|
||||
--- a/src/hotspot/share/classfile/classLoaderData.cpp
|
||||
+++ b/src/hotspot/share/classfile/classLoaderData.cpp
|
||||
@@ -1404,7 +1404,7 @@ bool ClassLoaderDataGraph::do_unloading(bool clean_previous_versions) {
|
||||
bool walk_all_metadata = clean_previous_versions &&
|
||||
JvmtiExport::has_redefined_a_class() &&
|
||||
InstanceKlass::has_previous_versions_and_reset();
|
||||
- MetadataOnStackMark md_on_stack(walk_all_metadata, AllowEnhancedClassRedefinition);
|
||||
+ MetadataOnStackMark md_on_stack(walk_all_metadata, Universe::is_redefining_gc_run());
|
||||
|
||||
// Save previous _unloading pointer for CMS which may add to unloading list before
|
||||
// purging and we don't want to rewalk the previously unloaded class loader data.
|
||||
--
|
||||
2.23.0
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
From 1876c6a039a2b866dd9d2c3dbbcc52e8f7af4d2a Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <lada.dvorak7@gmail.com>
|
||||
Date: Wed, 11 Nov 2020 18:45:15 +0100
|
||||
Subject: [PATCH 19/33] Fix LoadedClassesClosure - fixes problems with remote
|
||||
debugging
|
||||
|
||||
---
|
||||
src/hotspot/share/prims/jvmtiGetLoadedClasses.cpp | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/hotspot/share/prims/jvmtiGetLoadedClasses.cpp b/src/hotspot/share/prims/jvmtiGetLoadedClasses.cpp
|
||||
index 325bffb7ad0..30752e37f1c 100644
|
||||
--- a/src/hotspot/share/prims/jvmtiGetLoadedClasses.cpp
|
||||
+++ b/src/hotspot/share/prims/jvmtiGetLoadedClasses.cpp
|
||||
@@ -51,7 +51,7 @@ public:
|
||||
// the new version (SystemDictionary stores only new versions). But the LoadedClassesClosure's functionality was
|
||||
// changed in java8 where jvmtiLoadedClasses collects all classes from all classloaders, therefore we
|
||||
// must use new versions only.
|
||||
- if (AllowEnhancedClassRedefinition && k->new_version()==NULL) {
|
||||
+ if (!AllowEnhancedClassRedefinition || k->new_version()==NULL) {
|
||||
_classStack.push((jclass) _env->jni_reference(Handle(_cur_thread, k->java_mirror())));
|
||||
}
|
||||
}
|
||||
--
|
||||
2.23.0
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
From ad9db6fe3e625d0b366898c3bdb2589b678f6764 Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <vladimir.dvorak@jetbrains.com>
|
||||
Date: Fri, 5 Feb 2021 23:30:49 +0100
|
||||
Subject: [PATCH 20/33] Disable AllowEnhancedClassRedefinition in flight
|
||||
recorder
|
||||
|
||||
---
|
||||
src/hotspot/share/runtime/arguments.cpp | 7 +++++++
|
||||
1 file changed, 7 insertions(+)
|
||||
|
||||
diff --git a/src/hotspot/share/runtime/arguments.cpp b/src/hotspot/share/runtime/arguments.cpp
|
||||
index 0db55d00bd3..65839b842e2 100644
|
||||
--- a/src/hotspot/share/runtime/arguments.cpp
|
||||
+++ b/src/hotspot/share/runtime/arguments.cpp
|
||||
@@ -3967,6 +3967,13 @@ jint Arguments::parse(const JavaVMInitArgs* initial_cmd_args) {
|
||||
// Set object alignment values.
|
||||
set_object_alignment();
|
||||
|
||||
+ if (FlightRecorder) {
|
||||
+ if (AllowEnhancedClassRedefinition) {
|
||||
+ warning("EnhancedClassRedefinition was disabled, it is not allowed in FlightRecorder.");
|
||||
+ AllowEnhancedClassRedefinition = false;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
setup_hotswap_agent();
|
||||
|
||||
#if !INCLUDE_CDS
|
||||
--
|
||||
2.23.0
|
||||
|
||||
@@ -1,41 +0,0 @@
|
||||
From 4bcccb549465675d13a1f5bb399ca99654465ca5 Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <vladimir.dvorak@jetbrains.com>
|
||||
Date: Fri, 12 Feb 2021 12:33:11 +0100
|
||||
Subject: [PATCH 21/33] JBR-3106 Check InstanceKlass::has_nestmate_access_to
|
||||
with active classes
|
||||
|
||||
Dcevm can leave old host in nested class if nested class is not
|
||||
redefined together with host class
|
||||
---
|
||||
src/hotspot/share/oops/instanceKlass.cpp | 10 ++++++++++
|
||||
1 file changed, 10 insertions(+)
|
||||
|
||||
diff --git a/src/hotspot/share/oops/instanceKlass.cpp b/src/hotspot/share/oops/instanceKlass.cpp
|
||||
index cb448b1b762..234c3e86037 100644
|
||||
--- a/src/hotspot/share/oops/instanceKlass.cpp
|
||||
+++ b/src/hotspot/share/oops/instanceKlass.cpp
|
||||
@@ -327,11 +327,21 @@ bool InstanceKlass::has_nestmate_access_to(InstanceKlass* k, TRAPS) {
|
||||
return false;
|
||||
}
|
||||
|
||||
+ // (DCEVM) cur_host can be old, decide accessibility based on active version
|
||||
+ if (AllowEnhancedClassRedefinition) {
|
||||
+ cur_host = InstanceKlass::cast(cur_host->active_version());
|
||||
+ }
|
||||
+
|
||||
Klass* k_nest_host = k->nest_host(icce, CHECK_false);
|
||||
if (k_nest_host == NULL) {
|
||||
return false;
|
||||
}
|
||||
|
||||
+ // (DCEVM) k_nest_host can be old, decide accessibility based on active version
|
||||
+ if (AllowEnhancedClassRedefinition) {
|
||||
+ k_nest_host = InstanceKlass::cast(k_nest_host->active_version());
|
||||
+ }
|
||||
+
|
||||
bool access = (cur_host == k_nest_host);
|
||||
|
||||
if (log_is_enabled(Trace, class, nestmates)) {
|
||||
--
|
||||
2.23.0
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
From b45056c713cd7f8496bc9fb9528ff8a20c112c76 Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <lada.dvorak7@gmail.com>
|
||||
Date: Sun, 7 Feb 2021 12:08:58 +0100
|
||||
Subject: [PATCH 22/33] JBR-3110 Fix assert in MetadataOnStackMark
|
||||
|
||||
Fixed fastdebug tests crashes in redefine gc run
|
||||
---
|
||||
src/hotspot/share/classfile/metadataOnStackMark.cpp | 5 +++--
|
||||
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/hotspot/share/classfile/metadataOnStackMark.cpp b/src/hotspot/share/classfile/metadataOnStackMark.cpp
|
||||
index 9d7bdbde74b..66049f11629 100644
|
||||
--- a/src/hotspot/share/classfile/metadataOnStackMark.cpp
|
||||
+++ b/src/hotspot/share/classfile/metadataOnStackMark.cpp
|
||||
@@ -49,10 +49,11 @@ NOT_PRODUCT(bool MetadataOnStackMark::_is_active = false;)
|
||||
MetadataOnStackMark::MetadataOnStackMark(bool redefinition_walk, bool ignore) : _ignore(ignore) {
|
||||
assert(SafepointSynchronize::is_at_safepoint(), "sanity check");
|
||||
assert(_used_buffers == NULL, "sanity check");
|
||||
- assert(!_is_active, "MetadataOnStackMarks do not nest");
|
||||
- NOT_PRODUCT(_is_active = true;)
|
||||
|
||||
if (!ignore) {
|
||||
+ assert(!_is_active, "MetadataOnStackMarks do not nest");
|
||||
+ NOT_PRODUCT(_is_active = true;)
|
||||
+
|
||||
Threads::metadata_handles_do(Metadata::mark_on_stack);
|
||||
|
||||
if (redefinition_walk) {
|
||||
--
|
||||
2.23.0
|
||||
|
||||
@@ -1,78 +0,0 @@
|
||||
From ae2b3fba2882b52ec7c5a9ac49d179616fc49e77 Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <lada.dvorak7@gmail.com>
|
||||
Date: Fri, 12 Feb 2021 11:27:39 +0100
|
||||
Subject: [PATCH 23/33] Code cleanup
|
||||
|
||||
- Rename confusing method name old_if_redefined to old_if_redefining
|
||||
- Remove unused is_redefining_gc_run
|
||||
---
|
||||
src/hotspot/share/classfile/dictionary.cpp | 6 +++---
|
||||
src/hotspot/share/classfile/dictionary.hpp | 2 +-
|
||||
src/hotspot/share/memory/universe.hpp | 5 -----
|
||||
3 files changed, 4 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/src/hotspot/share/classfile/dictionary.cpp b/src/hotspot/share/classfile/dictionary.cpp
|
||||
index 86dc1f26933..d347f572350 100644
|
||||
--- a/src/hotspot/share/classfile/dictionary.cpp
|
||||
+++ b/src/hotspot/share/classfile/dictionary.cpp
|
||||
@@ -381,7 +381,7 @@ InstanceKlass* Dictionary::find(unsigned int hash, Symbol* name,
|
||||
int index = hash_to_index(hash);
|
||||
DictionaryEntry* entry = get_entry(index, hash, name);
|
||||
if (entry != NULL && entry->is_valid_protection_domain(protection_domain)) {
|
||||
- return old_if_redefined(entry->instance_klass());
|
||||
+ return old_if_redefining(entry->instance_klass());
|
||||
} else {
|
||||
return NULL;
|
||||
}
|
||||
@@ -394,7 +394,7 @@ InstanceKlass* Dictionary::find_class(int index, unsigned int hash,
|
||||
assert (index == index_for(name), "incorrect index?");
|
||||
|
||||
DictionaryEntry* entry = get_entry(index, hash, name);
|
||||
- return old_if_redefined((entry != NULL) ? entry->instance_klass() : NULL);
|
||||
+ return old_if_redefining((entry != NULL) ? entry->instance_klass() : NULL);
|
||||
}
|
||||
|
||||
|
||||
@@ -406,7 +406,7 @@ InstanceKlass* Dictionary::find_shared_class(int index, unsigned int hash,
|
||||
assert (index == index_for(name), "incorrect index?");
|
||||
|
||||
DictionaryEntry* entry = get_entry(index, hash, name);
|
||||
- return old_if_redefined((entry != NULL) ? entry->instance_klass() : NULL);
|
||||
+ return old_if_redefining((entry != NULL) ? entry->instance_klass() : NULL);
|
||||
}
|
||||
|
||||
|
||||
diff --git a/src/hotspot/share/classfile/dictionary.hpp b/src/hotspot/share/classfile/dictionary.hpp
|
||||
index 5eaa741d500..f6e08e7bfd5 100644
|
||||
--- a/src/hotspot/share/classfile/dictionary.hpp
|
||||
+++ b/src/hotspot/share/classfile/dictionary.hpp
|
||||
@@ -120,7 +120,7 @@ public:
|
||||
void rollback_redefinition();
|
||||
|
||||
// (DCEVM) return old class if redefining in AllowEnhancedClassRedefinition, otherwise return "k"
|
||||
- static InstanceKlass* old_if_redefined(InstanceKlass* k) {
|
||||
+ static InstanceKlass* old_if_redefining(InstanceKlass* k) {
|
||||
return (k != NULL && k->is_redefining()) ? ((InstanceKlass* )k->old_version()) : k;
|
||||
}
|
||||
};
|
||||
diff --git a/src/hotspot/share/memory/universe.hpp b/src/hotspot/share/memory/universe.hpp
|
||||
index b32db16b9cf..742dada0e8f 100644
|
||||
--- a/src/hotspot/share/memory/universe.hpp
|
||||
+++ b/src/hotspot/share/memory/universe.hpp
|
||||
@@ -52,13 +52,8 @@ class LatestMethodCache : public CHeapObj<mtClass> {
|
||||
Klass* _klass;
|
||||
int _method_idnum;
|
||||
|
||||
- static bool _is_redefining_gc_run;
|
||||
-
|
||||
public:
|
||||
|
||||
- static bool is_redefining_gc_run() { return _is_redefining_gc_run; }
|
||||
- static void set_redefining_gc_run(bool b) { _is_redefining_gc_run = b; }
|
||||
-
|
||||
LatestMethodCache() { _klass = NULL; _method_idnum = -1; }
|
||||
~LatestMethodCache() { _klass = NULL; _method_idnum = -1; }
|
||||
|
||||
--
|
||||
2.23.0
|
||||
|
||||
@@ -1,95 +0,0 @@
|
||||
From 3af6608b1808653ad706b447e6e96a039819d03f Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <lada.dvorak7@gmail.com>
|
||||
Date: Sat, 13 Feb 2021 20:47:52 +0100
|
||||
Subject: [PATCH 24/33] JBR-3111 Update class in all dictionaries where it was
|
||||
already defined
|
||||
|
||||
This patch keeps compatibility with std redefinition, that does not
|
||||
create a new Klass, but modifies it, then it is modified in all
|
||||
dictionaries containing this class.
|
||||
---
|
||||
src/hotspot/share/classfile/classLoaderData.cpp | 9 +++++++++
|
||||
src/hotspot/share/classfile/classLoaderData.hpp | 3 +++
|
||||
src/hotspot/share/classfile/dictionary.cpp | 2 +-
|
||||
src/hotspot/share/classfile/dictionary.hpp | 2 +-
|
||||
src/hotspot/share/classfile/systemDictionary.cpp | 4 +++-
|
||||
5 files changed, 17 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/hotspot/share/classfile/classLoaderData.cpp b/src/hotspot/share/classfile/classLoaderData.cpp
|
||||
index 2f6329f3e4d..68df33b6c40 100644
|
||||
--- a/src/hotspot/share/classfile/classLoaderData.cpp
|
||||
+++ b/src/hotspot/share/classfile/classLoaderData.cpp
|
||||
@@ -1277,6 +1277,15 @@ void ClassLoaderDataGraph::rollback_redefinition() {
|
||||
}
|
||||
}
|
||||
|
||||
+// (DCEVM) - iterate over all classes in all dictionaries
|
||||
+bool ClassLoaderDataGraph::dictionary_classes_do_update_klass(Symbol* name, InstanceKlass* k, InstanceKlass* old_klass) {
|
||||
+ bool ok = false;
|
||||
+ FOR_ALL_DICTIONARY(cld) {
|
||||
+ ok = cld->dictionary()->update_klass(name, k, old_klass) || ok;
|
||||
+ }
|
||||
+ return ok;
|
||||
+}
|
||||
+
|
||||
// Walks all entries in the dictionary including entries initiated by this class loader.
|
||||
void ClassLoaderDataGraph::dictionary_all_entries_do(void f(InstanceKlass*, ClassLoaderData*)) {
|
||||
Thread* thread = Thread::current();
|
||||
diff --git a/src/hotspot/share/classfile/classLoaderData.hpp b/src/hotspot/share/classfile/classLoaderData.hpp
|
||||
index c4f617ab800..92f57dac23e 100644
|
||||
--- a/src/hotspot/share/classfile/classLoaderData.hpp
|
||||
+++ b/src/hotspot/share/classfile/classLoaderData.hpp
|
||||
@@ -130,6 +130,9 @@ class ClassLoaderDataGraph : public AllStatic {
|
||||
// Enhanced class redefinition
|
||||
static void rollback_redefinition();
|
||||
|
||||
+ // Enhanced class redefinition
|
||||
+ static bool dictionary_classes_do_update_klass(Symbol* name, InstanceKlass* k, InstanceKlass* old_klass);
|
||||
+
|
||||
// Iterate all classes and their class loaders, including initiating class loaders.
|
||||
static void dictionary_all_entries_do(void f(InstanceKlass*, ClassLoaderData*));
|
||||
|
||||
diff --git a/src/hotspot/share/classfile/dictionary.cpp b/src/hotspot/share/classfile/dictionary.cpp
|
||||
index d347f572350..fd9ef491ba1 100644
|
||||
--- a/src/hotspot/share/classfile/dictionary.cpp
|
||||
+++ b/src/hotspot/share/classfile/dictionary.cpp
|
||||
@@ -345,7 +345,7 @@ DictionaryEntry* Dictionary::get_entry(int index, unsigned int hash,
|
||||
}
|
||||
|
||||
// (DCEVM) replace old_class by new class in dictionary
|
||||
-bool Dictionary::update_klass(unsigned int hash, Symbol* name, ClassLoaderData* loader_data, InstanceKlass* k, InstanceKlass* old_klass) {
|
||||
+bool Dictionary::update_klass(Symbol* name, InstanceKlass* k, InstanceKlass* old_klass) {
|
||||
// There are several entries for the same class in the dictionary: One extra entry for each parent classloader of the classloader of the class.
|
||||
bool found = false;
|
||||
for (int index = 0; index < table_size(); index++) {
|
||||
diff --git a/src/hotspot/share/classfile/dictionary.hpp b/src/hotspot/share/classfile/dictionary.hpp
|
||||
index f6e08e7bfd5..2932cc9c320 100644
|
||||
--- a/src/hotspot/share/classfile/dictionary.hpp
|
||||
+++ b/src/hotspot/share/classfile/dictionary.hpp
|
||||
@@ -115,7 +115,7 @@ public:
|
||||
void free_entry(DictionaryEntry* entry);
|
||||
|
||||
// Enhanced class redefinition
|
||||
- bool update_klass(unsigned int hash, Symbol* name, ClassLoaderData* loader_data, InstanceKlass* k, InstanceKlass* old_klass);
|
||||
+ bool update_klass(Symbol* name, InstanceKlass* k, InstanceKlass* old_klass);
|
||||
|
||||
void rollback_redefinition();
|
||||
|
||||
diff --git a/src/hotspot/share/classfile/systemDictionary.cpp b/src/hotspot/share/classfile/systemDictionary.cpp
|
||||
index be4d2010c0c..d0365162b81 100644
|
||||
--- a/src/hotspot/share/classfile/systemDictionary.cpp
|
||||
+++ b/src/hotspot/share/classfile/systemDictionary.cpp
|
||||
@@ -1608,7 +1608,9 @@ void SystemDictionary::define_instance_class(InstanceKlass* k, InstanceKlass* ol
|
||||
Dictionary* dictionary = loader_data->dictionary();
|
||||
unsigned int d_hash = dictionary->compute_hash(name_h);
|
||||
if (is_redefining) {
|
||||
- bool ok = dictionary->update_klass(d_hash, name_h, loader_data, k, old_klass);
|
||||
+ // Update all dictionaries containing old_class to new_class
|
||||
+ // outcome must be same as result of standard redefinition, that does not create a new Klass
|
||||
+ bool ok = ClassLoaderDataGraph::dictionary_classes_do_update_klass(name_h, k, old_klass);
|
||||
assert (ok, "must have found old class and updated!");
|
||||
}
|
||||
check_constraints(d_hash, k, class_loader_h, !is_redefining, CHECK);
|
||||
--
|
||||
2.23.0
|
||||
|
||||
@@ -1,527 +0,0 @@
|
||||
From 7cbf2af248f33daa6fb5b55a7fb9316b1d2680e0 Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <lada.dvorak7@gmail.com>
|
||||
Date: Thu, 18 Jun 2020 18:40:11 +0200
|
||||
Subject: [PATCH 25/33] JBR-3140 - support for modularized HotswapAgent
|
||||
|
||||
Add -XX:HotswapAgent=[disabled,fatjar.core]
|
||||
---
|
||||
make/launcher/Launcher-java.base.gmk | 1 -
|
||||
make/launcher/Launcher-java.rmi.gmk | 2 -
|
||||
make/launcher/Launcher-java.scripting.gmk | 3 +-
|
||||
make/launcher/Launcher-java.security.jgss.gmk | 3 --
|
||||
make/launcher/Launcher-jdk.aot.gmk | 2 -
|
||||
make/launcher/Launcher-jdk.compiler.gmk | 5 +-
|
||||
make/launcher/Launcher-jdk.hotspot.agent.gmk | 1 -
|
||||
make/launcher/Launcher-jdk.jartool.gmk | 2 -
|
||||
make/launcher/Launcher-jdk.javadoc.gmk | 3 +-
|
||||
make/launcher/Launcher-jdk.jcmd.gmk | 13 +----
|
||||
make/launcher/Launcher-jdk.jdeps.gmk | 3 --
|
||||
make/launcher/Launcher-jdk.jdi.gmk | 1 -
|
||||
make/launcher/Launcher-jdk.jlink.gmk | 5 +-
|
||||
make/launcher/Launcher-jdk.jshell.gmk | 1 -
|
||||
make/launcher/Launcher-jdk.jstatd.gmk | 1 -
|
||||
make/launcher/Launcher-jdk.pack.gmk | 1 -
|
||||
make/launcher/Launcher-jdk.rmic.gmk | 1 -
|
||||
.../Launcher-jdk.scripting.nashorn.shell.gmk | 3 +-
|
||||
src/hotspot/share/runtime/arguments.cpp | 48 +++++++++++--------
|
||||
.../runtime/flags/jvmFlagConstraintList.cpp | 23 +++++++++
|
||||
.../runtime/flags/jvmFlagConstraintList.hpp | 1 +
|
||||
.../flags/jvmFlagConstraintsRuntime.cpp | 10 ++++
|
||||
.../flags/jvmFlagConstraintsRuntime.hpp | 1 +
|
||||
src/hotspot/share/runtime/globals.hpp | 12 ++++-
|
||||
24 files changed, 81 insertions(+), 65 deletions(-)
|
||||
|
||||
diff --git a/make/launcher/Launcher-java.base.gmk b/make/launcher/Launcher-java.base.gmk
|
||||
index 38ba29530d8..f6d4aa28fe6 100644
|
||||
--- a/make/launcher/Launcher-java.base.gmk
|
||||
+++ b/make/launcher/Launcher-java.base.gmk
|
||||
@@ -52,7 +52,6 @@ endif
|
||||
|
||||
$(eval $(call SetupBuildLauncher, keytool, \
|
||||
MAIN_CLASS := sun.security.tools.keytool.Main, \
|
||||
- JAVA_ARGS := -XX:+DisableHotswapAgent, \
|
||||
))
|
||||
|
||||
################################################################################
|
||||
diff --git a/make/launcher/Launcher-java.rmi.gmk b/make/launcher/Launcher-java.rmi.gmk
|
||||
index 07046232275..a69a90bcc81 100644
|
||||
--- a/make/launcher/Launcher-java.rmi.gmk
|
||||
+++ b/make/launcher/Launcher-java.rmi.gmk
|
||||
@@ -27,10 +27,8 @@ include LauncherCommon.gmk
|
||||
|
||||
$(eval $(call SetupBuildLauncher, rmid, \
|
||||
MAIN_CLASS := sun.rmi.server.Activation, \
|
||||
- JAVA_ARGS := -XX:+DisableHotswapAgent, \
|
||||
))
|
||||
|
||||
$(eval $(call SetupBuildLauncher, rmiregistry, \
|
||||
MAIN_CLASS := sun.rmi.registry.RegistryImpl, \
|
||||
- JAVA_ARGS := -XX:+DisableHotswapAgent, \
|
||||
))
|
||||
diff --git a/make/launcher/Launcher-java.scripting.gmk b/make/launcher/Launcher-java.scripting.gmk
|
||||
index cf100e20789..057d2bf3aca 100644
|
||||
--- a/make/launcher/Launcher-java.scripting.gmk
|
||||
+++ b/make/launcher/Launcher-java.scripting.gmk
|
||||
@@ -27,6 +27,5 @@ include LauncherCommon.gmk
|
||||
|
||||
$(eval $(call SetupBuildLauncher, jrunscript, \
|
||||
MAIN_CLASS := com.sun.tools.script.shell.Main, \
|
||||
- JAVA_ARGS := --add-modules ALL-DEFAULT \
|
||||
- -XX:+DisableHotswapAgent, \
|
||||
+ JAVA_ARGS := --add-modules ALL-DEFAULT, \
|
||||
))
|
||||
diff --git a/make/launcher/Launcher-java.security.jgss.gmk b/make/launcher/Launcher-java.security.jgss.gmk
|
||||
index 2b856bfccb4..7411e1a21c4 100644
|
||||
--- a/make/launcher/Launcher-java.security.jgss.gmk
|
||||
+++ b/make/launcher/Launcher-java.security.jgss.gmk
|
||||
@@ -28,16 +28,13 @@ include LauncherCommon.gmk
|
||||
ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
$(eval $(call SetupBuildLauncher, kinit, \
|
||||
MAIN_CLASS := sun.security.krb5.internal.tools.Kinit, \
|
||||
- JAVA_ARGS := -XX:+DisableHotswapAgent, \
|
||||
))
|
||||
|
||||
$(eval $(call SetupBuildLauncher, klist, \
|
||||
MAIN_CLASS := sun.security.krb5.internal.tools.Klist, \
|
||||
- JAVA_ARGS := -XX:+DisableHotswapAgent, \
|
||||
))
|
||||
|
||||
$(eval $(call SetupBuildLauncher, ktab, \
|
||||
MAIN_CLASS := sun.security.krb5.internal.tools.Ktab, \
|
||||
- JAVA_ARGS := -XX:+DisableHotswapAgent, \
|
||||
))
|
||||
endif
|
||||
diff --git a/make/launcher/Launcher-jdk.aot.gmk b/make/launcher/Launcher-jdk.aot.gmk
|
||||
index 2c52c31a555..10717a5e1c5 100644
|
||||
--- a/make/launcher/Launcher-jdk.aot.gmk
|
||||
+++ b/make/launcher/Launcher-jdk.aot.gmk
|
||||
@@ -31,7 +31,6 @@ include LauncherCommon.gmk
|
||||
$(eval $(call SetupBuildLauncher, jaotc, \
|
||||
MAIN_CLASS := jdk.tools.jaotc.Main, \
|
||||
EXTRA_JAVA_ARGS := -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI \
|
||||
- -XX:+DisableHotswapAgent \
|
||||
--add-exports=jdk.internal.vm.ci/jdk.vm.ci.aarch64=$(call CommaList, jdk.internal.vm.compiler jdk.aot) \
|
||||
--add-exports=jdk.internal.vm.ci/jdk.vm.ci.amd64=$(call CommaList, jdk.internal.vm.compiler jdk.aot) \
|
||||
--add-exports=jdk.internal.vm.ci/jdk.vm.ci.code=$(call CommaList, jdk.internal.vm.compiler jdk.aot) \
|
||||
@@ -41,7 +40,6 @@ $(eval $(call SetupBuildLauncher, jaotc, \
|
||||
--add-exports=jdk.internal.vm.ci/jdk.vm.ci.hotspot=$(call CommaList, jdk.internal.vm.compiler jdk.aot) \
|
||||
, \
|
||||
JAVA_ARGS := --add-exports=jdk.internal.vm.ci/jdk.vm.ci.hotspot.aarch64=$(call CommaList, jdk.internal.vm.compiler jdk.aot) \
|
||||
- -XX:+DisableHotswapAgent \
|
||||
--add-exports=jdk.internal.vm.ci/jdk.vm.ci.hotspot.amd64=$(call CommaList, jdk.internal.vm.compiler jdk.aot) \
|
||||
--add-exports=jdk.internal.vm.ci/jdk.vm.ci.hotspot.aarch64=$(call CommaList, jdk.internal.vm.compiler jdk.aot) \
|
||||
--add-exports=jdk.internal.vm.ci/jdk.vm.ci.hotspot.sparc=$(call CommaList, jdk.internal.vm.compiler jdk.aot) \
|
||||
diff --git a/make/launcher/Launcher-jdk.compiler.gmk b/make/launcher/Launcher-jdk.compiler.gmk
|
||||
index 744969546de..f71c37adf74 100644
|
||||
--- a/make/launcher/Launcher-jdk.compiler.gmk
|
||||
+++ b/make/launcher/Launcher-jdk.compiler.gmk
|
||||
@@ -27,14 +27,12 @@ include LauncherCommon.gmk
|
||||
|
||||
$(eval $(call SetupBuildLauncher, javac, \
|
||||
MAIN_CLASS := com.sun.tools.javac.Main, \
|
||||
- JAVA_ARGS := --add-modules ALL-DEFAULT \
|
||||
- -XX:+DisableHotswapAgent, \
|
||||
+ JAVA_ARGS := --add-modules ALL-DEFAULT, \
|
||||
CFLAGS := -DEXPAND_CLASSPATH_WILDCARDS, \
|
||||
))
|
||||
|
||||
$(eval $(call SetupBuildLauncher, serialver, \
|
||||
MAIN_CLASS := sun.tools.serialver.SerialVer, \
|
||||
- JAVA_ARGS := -XX:+DisableHotswapAgent, \
|
||||
CFLAGS := -DEXPAND_CLASSPATH_WILDCARDS, \
|
||||
))
|
||||
|
||||
@@ -43,7 +41,6 @@ ifeq ($(ENABLE_SJAVAC), yes)
|
||||
# into any real images
|
||||
$(eval $(call SetupBuildLauncher, sjavac, \
|
||||
MAIN_CLASS := com.sun.tools.sjavac.Main, \
|
||||
- JAVA_ARGS := -XX:+DisableHotswapAgent, \
|
||||
CFLAGS := -DEXPAND_CLASSPATH_WILDCARDS, \
|
||||
OUTPUT_DIR := $(JDK_OUTPUTDIR)/bin, \
|
||||
))
|
||||
diff --git a/make/launcher/Launcher-jdk.hotspot.agent.gmk b/make/launcher/Launcher-jdk.hotspot.agent.gmk
|
||||
index 9f12b05b172..76da3600368 100644
|
||||
--- a/make/launcher/Launcher-jdk.hotspot.agent.gmk
|
||||
+++ b/make/launcher/Launcher-jdk.hotspot.agent.gmk
|
||||
@@ -27,6 +27,5 @@ include LauncherCommon.gmk
|
||||
|
||||
$(eval $(call SetupBuildLauncher, jhsdb, \
|
||||
MAIN_CLASS := sun.jvm.hotspot.SALauncher, \
|
||||
- JAVA_ARGS := -XX:+DisableHotswapAgent, \
|
||||
MACOSX_PRIVILEGED := true, \
|
||||
))
|
||||
diff --git a/make/launcher/Launcher-jdk.jartool.gmk b/make/launcher/Launcher-jdk.jartool.gmk
|
||||
index 647d82b65b1..f74e82bfdae 100644
|
||||
--- a/make/launcher/Launcher-jdk.jartool.gmk
|
||||
+++ b/make/launcher/Launcher-jdk.jartool.gmk
|
||||
@@ -27,10 +27,8 @@ include LauncherCommon.gmk
|
||||
|
||||
$(eval $(call SetupBuildLauncher, jar, \
|
||||
MAIN_CLASS := sun.tools.jar.Main, \
|
||||
- JAVA_ARGS := -XX:+DisableHotswapAgent, \
|
||||
))
|
||||
|
||||
$(eval $(call SetupBuildLauncher, jarsigner, \
|
||||
MAIN_CLASS := sun.security.tools.jarsigner.Main, \
|
||||
- JAVA_ARGS := -XX:+DisableHotswapAgent, \
|
||||
))
|
||||
diff --git a/make/launcher/Launcher-jdk.javadoc.gmk b/make/launcher/Launcher-jdk.javadoc.gmk
|
||||
index c3d2093be04..889028a2b17 100644
|
||||
--- a/make/launcher/Launcher-jdk.javadoc.gmk
|
||||
+++ b/make/launcher/Launcher-jdk.javadoc.gmk
|
||||
@@ -27,7 +27,6 @@ include LauncherCommon.gmk
|
||||
|
||||
$(eval $(call SetupBuildLauncher, javadoc, \
|
||||
MAIN_CLASS := jdk.javadoc.internal.tool.Main, \
|
||||
- JAVA_ARGS := --add-modules ALL-DEFAULT \
|
||||
- -XX:+DisableHotswapAgent, \
|
||||
+ JAVA_ARGS := --add-modules ALL-DEFAULT, \
|
||||
CFLAGS := -DEXPAND_CLASSPATH_WILDCARDS, \
|
||||
))
|
||||
diff --git a/make/launcher/Launcher-jdk.jcmd.gmk b/make/launcher/Launcher-jdk.jcmd.gmk
|
||||
index 761a52d8466..7117fa78059 100644
|
||||
--- a/make/launcher/Launcher-jdk.jcmd.gmk
|
||||
+++ b/make/launcher/Launcher-jdk.jcmd.gmk
|
||||
@@ -30,7 +30,6 @@ $(eval $(call SetupBuildLauncher, jinfo, \
|
||||
JAVA_ARGS := \
|
||||
-Dsun.jvm.hotspot.debugger.useProcDebugger \
|
||||
-Dsun.jvm.hotspot.debugger.useWindbgDebugger, \
|
||||
- -XX:+DisableHotswapAgent, \
|
||||
MACOSX_PRIVILEGED := true, \
|
||||
))
|
||||
|
||||
@@ -38,36 +37,28 @@ $(eval $(call SetupBuildLauncher, jmap, \
|
||||
MAIN_CLASS := sun.tools.jmap.JMap, \
|
||||
JAVA_ARGS := \
|
||||
-Dsun.jvm.hotspot.debugger.useProcDebugger \
|
||||
- -Dsun.jvm.hotspot.debugger.useWindbgDebugger \
|
||||
- -XX:+DisableHotswapAgent, \
|
||||
+ -Dsun.jvm.hotspot.debugger.useWindbgDebugger, \
|
||||
MACOSX_PRIVILEGED := true, \
|
||||
))
|
||||
|
||||
$(eval $(call SetupBuildLauncher, jps, \
|
||||
MAIN_CLASS := sun.tools.jps.Jps, \
|
||||
- JAVA_ARGS := \
|
||||
- -XX:+DisableHotswapAgent, \
|
||||
))
|
||||
|
||||
$(eval $(call SetupBuildLauncher, jstack, \
|
||||
MAIN_CLASS := sun.tools.jstack.JStack, \
|
||||
JAVA_ARGS := \
|
||||
-Dsun.jvm.hotspot.debugger.useProcDebugger \
|
||||
- -Dsun.jvm.hotspot.debugger.useWindbgDebugger \
|
||||
- -XX:+DisableHotswapAgent, \
|
||||
+ -Dsun.jvm.hotspot.debugger.useWindbgDebugger, \
|
||||
MACOSX_PRIVILEGED := true, \
|
||||
))
|
||||
|
||||
$(eval $(call SetupBuildLauncher, jstat, \
|
||||
MAIN_CLASS := sun.tools.jstat.Jstat, \
|
||||
- JAVA_ARGS := \
|
||||
- -XX:+DisableHotswapAgent, \
|
||||
))
|
||||
|
||||
$(eval $(call SetupBuildLauncher, jcmd, \
|
||||
MAIN_CLASS := sun.tools.jcmd.JCmd, \
|
||||
- JAVA_ARGS := \
|
||||
- -XX:+DisableHotswapAgent, \
|
||||
))
|
||||
|
||||
# Hook to include the corresponding custom file, if present.
|
||||
diff --git a/make/launcher/Launcher-jdk.jdeps.gmk b/make/launcher/Launcher-jdk.jdeps.gmk
|
||||
index 5448278dae7..217523c48cc 100644
|
||||
--- a/make/launcher/Launcher-jdk.jdeps.gmk
|
||||
+++ b/make/launcher/Launcher-jdk.jdeps.gmk
|
||||
@@ -27,18 +27,15 @@ include LauncherCommon.gmk
|
||||
|
||||
$(eval $(call SetupBuildLauncher, javap, \
|
||||
MAIN_CLASS := com.sun.tools.javap.Main, \
|
||||
- JAVA_ARGS := -XX:+DisableHotswapAgent, \
|
||||
CFLAGS := -DEXPAND_CLASSPATH_WILDCARDS, \
|
||||
))
|
||||
|
||||
$(eval $(call SetupBuildLauncher, jdeps, \
|
||||
MAIN_CLASS := com.sun.tools.jdeps.Main, \
|
||||
- JAVA_ARGS := -XX:+DisableHotswapAgent, \
|
||||
CFLAGS := -DEXPAND_CLASSPATH_WILDCARDS, \
|
||||
))
|
||||
|
||||
$(eval $(call SetupBuildLauncher, jdeprscan, \
|
||||
MAIN_CLASS := com.sun.tools.jdeprscan.Main, \
|
||||
- JAVA_ARGS := -XX:+DisableHotswapAgent, \
|
||||
CFLAGS := -DEXPAND_CLASSPATH_WILDCARDS, \
|
||||
))
|
||||
diff --git a/make/launcher/Launcher-jdk.jdi.gmk b/make/launcher/Launcher-jdk.jdi.gmk
|
||||
index 27bd448e3ae..fcce98cf430 100644
|
||||
--- a/make/launcher/Launcher-jdk.jdi.gmk
|
||||
+++ b/make/launcher/Launcher-jdk.jdi.gmk
|
||||
@@ -27,5 +27,4 @@ include LauncherCommon.gmk
|
||||
|
||||
$(eval $(call SetupBuildLauncher, jdb, \
|
||||
MAIN_CLASS := com.sun.tools.example.debug.tty.TTY, \
|
||||
- JAVA_ARGS := -XX:+DisableHotswapAgent, \
|
||||
))
|
||||
diff --git a/make/launcher/Launcher-jdk.jlink.gmk b/make/launcher/Launcher-jdk.jlink.gmk
|
||||
index 9e61edeb2c8..df2173996d7 100644
|
||||
--- a/make/launcher/Launcher-jdk.jlink.gmk
|
||||
+++ b/make/launcher/Launcher-jdk.jlink.gmk
|
||||
@@ -27,21 +27,18 @@ include LauncherCommon.gmk
|
||||
|
||||
$(eval $(call SetupBuildLauncher, jimage,\
|
||||
MAIN_CLASS := jdk.tools.jimage.Main, \
|
||||
- JAVA_ARGS := -XX:+DisableHotswapAgent, \
|
||||
CFLAGS := -DENABLE_ARG_FILES, \
|
||||
))
|
||||
|
||||
$(eval $(call SetupBuildLauncher, jlink,\
|
||||
MAIN_CLASS := jdk.tools.jlink.internal.Main, \
|
||||
- JAVA_ARGS := --add-modules ALL-DEFAULT \
|
||||
- -XX:+DisableHotswapAgent, \
|
||||
+ JAVA_ARGS := --add-modules ALL-DEFAULT, \
|
||||
CFLAGS := -DENABLE_ARG_FILES \
|
||||
-DEXPAND_CLASSPATH_WILDCARDS, \
|
||||
))
|
||||
|
||||
$(eval $(call SetupBuildLauncher, jmod,\
|
||||
MAIN_CLASS := jdk.tools.jmod.Main, \
|
||||
- JAVA_ARGS := -XX:+DisableHotswapAgent, \
|
||||
CFLAGS := -DENABLE_ARG_FILES \
|
||||
-DEXPAND_CLASSPATH_WILDCARDS, \
|
||||
))
|
||||
diff --git a/make/launcher/Launcher-jdk.jshell.gmk b/make/launcher/Launcher-jdk.jshell.gmk
|
||||
index 7287f8f998a..349eb88e9eb 100644
|
||||
--- a/make/launcher/Launcher-jdk.jshell.gmk
|
||||
+++ b/make/launcher/Launcher-jdk.jshell.gmk
|
||||
@@ -27,6 +27,5 @@ include LauncherCommon.gmk
|
||||
|
||||
$(eval $(call SetupBuildLauncher, jshell, \
|
||||
MAIN_CLASS := jdk.internal.jshell.tool.JShellToolProvider, \
|
||||
- JAVA_ARGS := -XX:+DisableHotswapAgent, \
|
||||
CFLAGS := -DEXPAND_CLASSPATH_WILDCARDS, \
|
||||
))
|
||||
diff --git a/make/launcher/Launcher-jdk.jstatd.gmk b/make/launcher/Launcher-jdk.jstatd.gmk
|
||||
index e1657910c67..e9286d63094 100644
|
||||
--- a/make/launcher/Launcher-jdk.jstatd.gmk
|
||||
+++ b/make/launcher/Launcher-jdk.jstatd.gmk
|
||||
@@ -27,7 +27,6 @@ include LauncherCommon.gmk
|
||||
|
||||
$(eval $(call SetupBuildLauncher, jstatd, \
|
||||
MAIN_CLASS := sun.tools.jstatd.Jstatd, \
|
||||
- JAVA_ARGS := -XX:+DisableHotswapAgent, \
|
||||
))
|
||||
|
||||
# Hook to include the corresponding custom file, if present.
|
||||
diff --git a/make/launcher/Launcher-jdk.pack.gmk b/make/launcher/Launcher-jdk.pack.gmk
|
||||
index 64bbbb7c949..a93fd2a9017 100644
|
||||
--- a/make/launcher/Launcher-jdk.pack.gmk
|
||||
+++ b/make/launcher/Launcher-jdk.pack.gmk
|
||||
@@ -28,7 +28,6 @@ include LauncherCommon.gmk
|
||||
$(eval $(call SetupBuildLauncher, pack200, \
|
||||
MAIN_MODULE := java.base, \
|
||||
MAIN_CLASS := com.sun.java.util.jar.pack.Driver, \
|
||||
- JAVA_ARGS := -XX:+DisableHotswapAgent, \
|
||||
))
|
||||
|
||||
################################################################################
|
||||
diff --git a/make/launcher/Launcher-jdk.rmic.gmk b/make/launcher/Launcher-jdk.rmic.gmk
|
||||
index b8a55900b0e..d60c3d9b60b 100644
|
||||
--- a/make/launcher/Launcher-jdk.rmic.gmk
|
||||
+++ b/make/launcher/Launcher-jdk.rmic.gmk
|
||||
@@ -27,6 +27,5 @@ include LauncherCommon.gmk
|
||||
|
||||
$(eval $(call SetupBuildLauncher, rmic, \
|
||||
MAIN_CLASS := sun.rmi.rmic.Main, \
|
||||
- JAVA_ARGS := -XX:+DisableHotswapAgent, \
|
||||
CFLAGS := -DEXPAND_CLASSPATH_WILDCARDS, \
|
||||
))
|
||||
diff --git a/make/launcher/Launcher-jdk.scripting.nashorn.shell.gmk b/make/launcher/Launcher-jdk.scripting.nashorn.shell.gmk
|
||||
index bd39f8595b2..82311e69fd6 100644
|
||||
--- a/make/launcher/Launcher-jdk.scripting.nashorn.shell.gmk
|
||||
+++ b/make/launcher/Launcher-jdk.scripting.nashorn.shell.gmk
|
||||
@@ -27,7 +27,6 @@ include LauncherCommon.gmk
|
||||
|
||||
$(eval $(call SetupBuildLauncher, jjs, \
|
||||
MAIN_CLASS := jdk.nashorn.tools.jjs.Main, \
|
||||
- JAVA_ARGS := --add-modules ALL-DEFAULT \
|
||||
- -XX:+DisableHotswapAgent, \
|
||||
+ JAVA_ARGS := --add-modules ALL-DEFAULT, \
|
||||
CFLAGS := -DENABLE_ARG_FILES, \
|
||||
))
|
||||
diff --git a/src/hotspot/share/runtime/arguments.cpp b/src/hotspot/share/runtime/arguments.cpp
|
||||
index 65839b842e2..dce89a044e9 100644
|
||||
--- a/src/hotspot/share/runtime/arguments.cpp
|
||||
+++ b/src/hotspot/share/runtime/arguments.cpp
|
||||
@@ -4315,11 +4315,17 @@ void Arguments::setup_hotswap_agent() {
|
||||
if (DumpSharedSpaces)
|
||||
return;
|
||||
|
||||
- if (!AllowEnhancedClassRedefinition)
|
||||
+ if (HotswapAgent == NULL || strcmp(HotswapAgent, "disabled") == 0)
|
||||
return;
|
||||
|
||||
+ // Force AllowEnhancedClassRedefinition if HA is enabled
|
||||
+ AllowEnhancedClassRedefinition = true;
|
||||
+
|
||||
+ bool ha_fatjar = strcmp(HotswapAgent, "fatjar") == 0;
|
||||
+ bool ha_core = strcmp(HotswapAgent, "core") == 0;
|
||||
+
|
||||
// Set HotswapAgent
|
||||
- if (!DisableHotswapAgent) {
|
||||
+ if (ha_fatjar || ha_core) {
|
||||
|
||||
char ext_path_str[JVM_MAXPATHLEN];
|
||||
|
||||
@@ -4338,23 +4344,27 @@ void Arguments::setup_hotswap_agent() {
|
||||
}
|
||||
}
|
||||
if (ext_path_length < JVM_MAXPATHLEN - 10) {
|
||||
- jio_snprintf(ext_path_str + ext_path_length, sizeof(ext_path_str) - ext_path_length,
|
||||
- "%shotswap%shotswap-agent.jar", os::file_separator(), os::file_separator());
|
||||
- }
|
||||
-
|
||||
- int fd = ::open(ext_path_str, O_RDONLY);
|
||||
- if (fd >= 0) {
|
||||
- os::close(fd);
|
||||
- size_t length = strlen(ext_path_str) + 1;
|
||||
- char *options = NEW_C_HEAP_ARRAY(char, length, mtArguments);
|
||||
- jio_snprintf(options, length, "%s", ext_path_str);
|
||||
- add_init_agent("instrument", ext_path_str, false);
|
||||
- jio_fprintf(defaultStream::output_stream(), "Starting HotswapAgent '%s'\n", ext_path_str);
|
||||
- }
|
||||
-// else
|
||||
-// {
|
||||
-// jio_fprintf(defaultStream::error_stream(), "HotswapAgent not found on path:'%s'\n", ext_path_str);
|
||||
-// }
|
||||
+ if (ha_fatjar) {
|
||||
+ jio_snprintf(ext_path_str + ext_path_length, sizeof(ext_path_str) - ext_path_length,
|
||||
+ "%shotswap%shotswap-agent.jar", os::file_separator(), os::file_separator());
|
||||
+ } else {
|
||||
+ jio_snprintf(ext_path_str + ext_path_length, sizeof(ext_path_str) - ext_path_length,
|
||||
+ "%shotswap%shotswap-agent-core.jar", os::file_separator(), os::file_separator());
|
||||
+ }
|
||||
+ int fd = ::open(ext_path_str, O_RDONLY);
|
||||
+ if (fd >= 0) {
|
||||
+ os::close(fd);
|
||||
+ size_t length = strlen(ext_path_str) + 1;
|
||||
+ char *options = NEW_C_HEAP_ARRAY(char, length, mtArguments);
|
||||
+ jio_snprintf(options, length, "%s", ext_path_str);
|
||||
+ add_init_agent("instrument", ext_path_str, false);
|
||||
+ jio_fprintf(defaultStream::output_stream(), "Starting HotswapAgent '%s'\n", ext_path_str);
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ jio_fprintf(defaultStream::error_stream(), "HotswapAgent not found on path:'%s'!\n", ext_path_str);
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
|
||||
// TODO: open it only for org.hotswap.agent module
|
||||
diff --git a/src/hotspot/share/runtime/flags/jvmFlagConstraintList.cpp b/src/hotspot/share/runtime/flags/jvmFlagConstraintList.cpp
|
||||
index 16d8030fd1c..94044c4831c 100644
|
||||
--- a/src/hotspot/share/runtime/flags/jvmFlagConstraintList.cpp
|
||||
+++ b/src/hotspot/share/runtime/flags/jvmFlagConstraintList.cpp
|
||||
@@ -199,6 +199,26 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
+class JVMFlagConstraint_ccstr : public JVMFlagConstraint {
|
||||
+ JVMFlagConstraintFunc_ccstr _constraint;
|
||||
+ const ccstr* _ptr;
|
||||
+
|
||||
+public:
|
||||
+ // the "name" argument must be a string literal
|
||||
+ JVMFlagConstraint_ccstr(const char* name, const ccstr* ptr,
|
||||
+ JVMFlagConstraintFunc_ccstr func,
|
||||
+ ConstraintType type) : JVMFlagConstraint(name, type), _constraint(func), _ptr(ptr) {}
|
||||
+
|
||||
+ JVMFlag::Error apply(bool verbose) {
|
||||
+ ccstr value = *_ptr;
|
||||
+ return _constraint(value, verbose);
|
||||
+ }
|
||||
+
|
||||
+ JVMFlag::Error apply_ccstr(ccstr value, bool verbose) {
|
||||
+ return _constraint(value, verbose);
|
||||
+ }
|
||||
+};
|
||||
+
|
||||
// No constraint emitting
|
||||
void emit_constraint_no(...) { /* NOP */ }
|
||||
|
||||
@@ -239,6 +259,9 @@ void emit_constraint_size_t(const char* name, const size_t* ptr, JVMFlagConstrai
|
||||
void emit_constraint_double(const char* name, const double* ptr, JVMFlagConstraintFunc_double func, JVMFlagConstraint::ConstraintType type) {
|
||||
JVMFlagConstraintList::add(new JVMFlagConstraint_double(name, ptr, func, type));
|
||||
}
|
||||
+void emit_constraint_ccstr(const char* name, ccstr* ptr, JVMFlagConstraintFunc_ccstr func, JVMFlagConstraint::ConstraintType type) {
|
||||
+ JVMFlagConstraintList::add(new JVMFlagConstraint_ccstr(name, ptr, func, type));
|
||||
+}
|
||||
|
||||
// Generate code to call emit_constraint_xxx function
|
||||
#define EMIT_CONSTRAINT_PRODUCT_FLAG(type, name, value, doc) ); emit_constraint_##type(#name,&name
|
||||
diff --git a/src/hotspot/share/runtime/flags/jvmFlagConstraintList.hpp b/src/hotspot/share/runtime/flags/jvmFlagConstraintList.hpp
|
||||
index 9c27f1db955..b644f7b817a 100644
|
||||
--- a/src/hotspot/share/runtime/flags/jvmFlagConstraintList.hpp
|
||||
+++ b/src/hotspot/share/runtime/flags/jvmFlagConstraintList.hpp
|
||||
@@ -47,6 +47,7 @@ typedef JVMFlag::Error (*JVMFlagConstraintFunc_uintx)(uintx value, bool verbose)
|
||||
typedef JVMFlag::Error (*JVMFlagConstraintFunc_uint64_t)(uint64_t value, bool verbose);
|
||||
typedef JVMFlag::Error (*JVMFlagConstraintFunc_size_t)(size_t value, bool verbose);
|
||||
typedef JVMFlag::Error (*JVMFlagConstraintFunc_double)(double value, bool verbose);
|
||||
+typedef JVMFlag::Error (*JVMFlagConstraintFunc_ccstr)(ccstr value, bool verbose);
|
||||
|
||||
class JVMFlagConstraint : public CHeapObj<mtArguments> {
|
||||
public:
|
||||
diff --git a/src/hotspot/share/runtime/flags/jvmFlagConstraintsRuntime.cpp b/src/hotspot/share/runtime/flags/jvmFlagConstraintsRuntime.cpp
|
||||
index 6559d4252f0..21afac72a2e 100644
|
||||
--- a/src/hotspot/share/runtime/flags/jvmFlagConstraintsRuntime.cpp
|
||||
+++ b/src/hotspot/share/runtime/flags/jvmFlagConstraintsRuntime.cpp
|
||||
@@ -140,3 +140,13 @@ JVMFlag::Error ThreadLocalHandshakesConstraintFunc(bool value, bool verbose) {
|
||||
}
|
||||
return JVMFlag::SUCCESS;
|
||||
}
|
||||
+
|
||||
+JVMFlag::Error HotswapAgentConstraintFunc(char const* value, bool verbose) {
|
||||
+ if (value != NULL) {
|
||||
+ if (strcmp("disabled", value) != 0 && strcmp("fatjar", value) != 0 && strcmp("core", value) != 0 && strcmp("external", value) != 0) {
|
||||
+ JVMFlag::printError(verbose, "HotswapAgent(%s) must be one of disabled,fatjar,core or external.\n", value);
|
||||
+ return JVMFlag::VIOLATES_CONSTRAINT;
|
||||
+ }
|
||||
+ }
|
||||
+ return JVMFlag::SUCCESS;
|
||||
+}
|
||||
diff --git a/src/hotspot/share/runtime/flags/jvmFlagConstraintsRuntime.hpp b/src/hotspot/share/runtime/flags/jvmFlagConstraintsRuntime.hpp
|
||||
index 8763b83fd37..c9ed15a89e1 100644
|
||||
--- a/src/hotspot/share/runtime/flags/jvmFlagConstraintsRuntime.hpp
|
||||
+++ b/src/hotspot/share/runtime/flags/jvmFlagConstraintsRuntime.hpp
|
||||
@@ -46,5 +46,6 @@ JVMFlag::Error PerfDataSamplingIntervalFunc(intx value, bool verbose);
|
||||
|
||||
JVMFlag::Error ThreadLocalHandshakesConstraintFunc(bool value, bool verbose);
|
||||
|
||||
+JVMFlag::Error HotswapAgentConstraintFunc(char const* value, bool verbose);
|
||||
|
||||
#endif /* SHARE_VM_RUNTIME_JVMFLAGCONSTRAINTSRUNTIME_HPP */
|
||||
diff --git a/src/hotspot/share/runtime/globals.hpp b/src/hotspot/share/runtime/globals.hpp
|
||||
index 705381825ff..eda4eca2451 100644
|
||||
--- a/src/hotspot/share/runtime/globals.hpp
|
||||
+++ b/src/hotspot/share/runtime/globals.hpp
|
||||
@@ -2692,8 +2692,16 @@ define_pd_global(uint64_t,MaxRAM, 1ULL*G);
|
||||
"Allow enhanced class redefinition beyond swapping method " \
|
||||
"bodies") \
|
||||
\
|
||||
- product(bool, DisableHotswapAgent, DISABLED_HOTSWAP_AGENT, \
|
||||
- "Disable integrated Hotswap Agent (HotswapVM only)")
|
||||
+ product(ccstr, HotswapAgent, "disabled", \
|
||||
+ "Specify HotswapAgent image to be used." \
|
||||
+ "disabled: hotswap agent is disabled (default)" \
|
||||
+ "fatjar: full HA. Use integrated hotswap-agent.jar" \
|
||||
+ "core: core HA. Use integrated hotswap-agent-core.jar" \
|
||||
+ "external: external HA. use external HA, open required JDK " \
|
||||
+ "modules.") \
|
||||
+ constraint(HotswapAgentConstraintFunc, AfterErgo)
|
||||
+
|
||||
+
|
||||
#define VM_FLAGS(develop, \
|
||||
develop_pd, \
|
||||
product, \
|
||||
--
|
||||
2.23.0
|
||||
|
||||
@@ -1,333 +0,0 @@
|
||||
From 8dd54d6e012458db96f199550d0f6016537c6d82 Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <vladimir.dvorak@jetbrains.com>
|
||||
Date: Mon, 8 Mar 2021 02:22:54 +0700
|
||||
Subject: [PATCH 26/33] Support for redefinition of Well Known classses
|
||||
(java.*,jdk.*, sun.*)
|
||||
|
||||
---
|
||||
src/hotspot/share/ci/ciKlass.hpp | 1 +
|
||||
src/hotspot/share/ci/ciObjectFactory.cpp | 34 +++++++++++
|
||||
src/hotspot/share/ci/ciObjectFactory.hpp | 6 ++
|
||||
.../share/classfile/systemDictionary.cpp | 10 +++
|
||||
.../share/classfile/systemDictionary.hpp | 2 +
|
||||
src/hotspot/share/classfile/vmSymbols.hpp | 2 +
|
||||
src/hotspot/share/compiler/compileBroker.cpp | 11 ++++
|
||||
src/hotspot/share/memory/universe.cpp | 8 +++
|
||||
src/hotspot/share/memory/universe.hpp | 3 +
|
||||
.../prims/jvmtiEnhancedRedefineClasses.cpp | 61 ++++++++++++++++++-
|
||||
.../prims/jvmtiEnhancedRedefineClasses.hpp | 2 +
|
||||
11 files changed, 139 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/hotspot/share/ci/ciKlass.hpp b/src/hotspot/share/ci/ciKlass.hpp
|
||||
index 896f489453a..c610c365aba 100644
|
||||
--- a/src/hotspot/share/ci/ciKlass.hpp
|
||||
+++ b/src/hotspot/share/ci/ciKlass.hpp
|
||||
@@ -129,6 +129,7 @@ public:
|
||||
void print_name_on(outputStream* st);
|
||||
|
||||
const char* external_name() const;
|
||||
+ Klass* new_version() { return get_Klass()->new_version(); }
|
||||
};
|
||||
|
||||
#endif // SHARE_VM_CI_CIKLASS_HPP
|
||||
diff --git a/src/hotspot/share/ci/ciObjectFactory.cpp b/src/hotspot/share/ci/ciObjectFactory.cpp
|
||||
index c8a03aa9ee9..6b187909943 100644
|
||||
--- a/src/hotspot/share/ci/ciObjectFactory.cpp
|
||||
+++ b/src/hotspot/share/ci/ciObjectFactory.cpp
|
||||
@@ -70,7 +70,10 @@ GrowableArray<ciMetadata*>* ciObjectFactory::_shared_ci_metadata = NULL;
|
||||
ciSymbol* ciObjectFactory::_shared_ci_symbols[vmSymbols::SID_LIMIT];
|
||||
int ciObjectFactory::_shared_ident_limit = 0;
|
||||
volatile bool ciObjectFactory::_initialized = false;
|
||||
+volatile bool ciObjectFactory::_reinitialize_wk_klasses = false;
|
||||
|
||||
+// TODO: review...
|
||||
+Arena* ciObjectFactory::_initial_arena = NULL;
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
// ciObjectFactory::ciObjectFactory
|
||||
@@ -112,6 +115,7 @@ void ciObjectFactory::initialize() {
|
||||
// compiler thread that initializes the initial ciObjectFactory which
|
||||
// creates the shared ciObjects that all later ciObjectFactories use.
|
||||
Arena* arena = new (mtCompiler) Arena(mtCompiler);
|
||||
+ ciObjectFactory::_initial_arena = arena;
|
||||
ciEnv initial(arena);
|
||||
ciEnv* env = ciEnv::current();
|
||||
env->_factory->init_shared_objects();
|
||||
@@ -120,6 +124,36 @@ void ciObjectFactory::initialize() {
|
||||
|
||||
}
|
||||
|
||||
+// (DCEVM) wk classes could be modified
|
||||
+void ciObjectFactory::reinitialize_wk_classes() {
|
||||
+ ASSERT_IN_VM;
|
||||
+ JavaThread* thread = JavaThread::current();
|
||||
+ HandleMark handle_mark(thread);
|
||||
+
|
||||
+ // This Arena is long lived and exists in the resource mark of the
|
||||
+ // compiler thread that initializes the initial ciObjectFactory which
|
||||
+ // creates the shared ciObjects that all later ciObjectFactories use.
|
||||
+ // Arena* arena = new (mtCompiler) Arena(mtCompiler);
|
||||
+ ciEnv initial(ciObjectFactory::_initial_arena);
|
||||
+ ciEnv* env = ciEnv::current();
|
||||
+ env->_factory->do_reinitialize_wk_classes();
|
||||
+ _reinitialize_wk_klasses = false;
|
||||
+}
|
||||
+
|
||||
+// (DCEVM) wk classes could be modified
|
||||
+void ciObjectFactory::do_reinitialize_wk_classes() {
|
||||
+#define WK_KLASS_DEFN(name, ignore_s, opt) \
|
||||
+ if (ciEnv::_##name != NULL && ciEnv::_##name->new_version() != NULL) { \
|
||||
+ int old_ident = ciEnv::_##name->ident(); \
|
||||
+ ciEnv::_##name = get_metadata(SystemDictionary::name())->as_instance_klass(); \
|
||||
+ ciEnv::_##name->compute_nonstatic_fields(); \
|
||||
+ ciEnv::_##name->set_ident(old_ident); \
|
||||
+ }
|
||||
+
|
||||
+ WK_KLASSES_DO(WK_KLASS_DEFN)
|
||||
+#undef WK_KLASS_DEFN
|
||||
+}
|
||||
+
|
||||
void ciObjectFactory::init_shared_objects() {
|
||||
|
||||
_next_ident = 1; // start numbering CI objects at 1
|
||||
diff --git a/src/hotspot/share/ci/ciObjectFactory.hpp b/src/hotspot/share/ci/ciObjectFactory.hpp
|
||||
index 3e9d48c4cdc..79059f6e2e8 100644
|
||||
--- a/src/hotspot/share/ci/ciObjectFactory.hpp
|
||||
+++ b/src/hotspot/share/ci/ciObjectFactory.hpp
|
||||
@@ -41,9 +41,11 @@ class ciObjectFactory : public ResourceObj {
|
||||
|
||||
private:
|
||||
static volatile bool _initialized;
|
||||
+ static volatile bool _reinitialize_wk_klasses;
|
||||
static GrowableArray<ciMetadata*>* _shared_ci_metadata;
|
||||
static ciSymbol* _shared_ci_symbols[];
|
||||
static int _shared_ident_limit;
|
||||
+ static Arena* _initial_arena;
|
||||
|
||||
Arena* _arena;
|
||||
GrowableArray<ciMetadata*>* _ci_metadata;
|
||||
@@ -89,10 +91,14 @@ private:
|
||||
ciInstance* get_unloaded_instance(ciInstanceKlass* klass);
|
||||
|
||||
static int compare_cimetadata(ciMetadata** a, ciMetadata** b);
|
||||
+ void do_reinitialize_wk_classes();
|
||||
public:
|
||||
static bool is_initialized() { return _initialized; }
|
||||
+ static bool is_reinitialize_wk_klasses() { return _reinitialize_wk_klasses; }
|
||||
+ static void set_reinitialize_wk_klasses() { _reinitialize_wk_klasses = true; }
|
||||
|
||||
static void initialize();
|
||||
+ static void reinitialize_wk_classes();
|
||||
void init_shared_objects();
|
||||
void remove_symbols();
|
||||
|
||||
diff --git a/src/hotspot/share/classfile/systemDictionary.cpp b/src/hotspot/share/classfile/systemDictionary.cpp
|
||||
index d0365162b81..74f30524279 100644
|
||||
--- a/src/hotspot/share/classfile/systemDictionary.cpp
|
||||
+++ b/src/hotspot/share/classfile/systemDictionary.cpp
|
||||
@@ -1985,6 +1985,16 @@ bool SystemDictionary::is_well_known_klass(Symbol* class_name) {
|
||||
}
|
||||
#endif
|
||||
|
||||
+bool SystemDictionary::update_well_known_klass(InstanceKlass* old_klass, InstanceKlass* new_klass) {
|
||||
+ for (int id = FIRST_WKID; id < WKID_LIMIT; id++) {
|
||||
+ if (well_known_klass((WKID) id) == old_klass) {
|
||||
+ *well_known_klass_addr((WKID)id) = new_klass;
|
||||
+ return true;
|
||||
+ }
|
||||
+ }
|
||||
+ return false;
|
||||
+}
|
||||
+
|
||||
bool SystemDictionary::resolve_wk_klass(WKID id, int init_opt, TRAPS) {
|
||||
assert(id >= (int)FIRST_WKID && id < (int)WKID_LIMIT, "oob");
|
||||
int info = wk_init_info[id - FIRST_WKID];
|
||||
diff --git a/src/hotspot/share/classfile/systemDictionary.hpp b/src/hotspot/share/classfile/systemDictionary.hpp
|
||||
index a8359143908..aba2780a321 100644
|
||||
--- a/src/hotspot/share/classfile/systemDictionary.hpp
|
||||
+++ b/src/hotspot/share/classfile/systemDictionary.hpp
|
||||
@@ -470,6 +470,8 @@ public:
|
||||
static bool is_well_known_klass(Symbol* class_name);
|
||||
#endif
|
||||
|
||||
+ static bool update_well_known_klass(InstanceKlass* new_klass, InstanceKlass* old_klass);
|
||||
+
|
||||
// Enhanced class redefinition
|
||||
static void remove_from_hierarchy(InstanceKlass* k);
|
||||
static void update_constraints_after_redefinition();
|
||||
diff --git a/src/hotspot/share/classfile/vmSymbols.hpp b/src/hotspot/share/classfile/vmSymbols.hpp
|
||||
index 0d0badeabd0..3477a408cb6 100644
|
||||
--- a/src/hotspot/share/classfile/vmSymbols.hpp
|
||||
+++ b/src/hotspot/share/classfile/vmSymbols.hpp
|
||||
@@ -356,6 +356,8 @@
|
||||
template(exit_method_name, "exit") \
|
||||
template(add_method_name, "add") \
|
||||
template(remove_method_name, "remove") \
|
||||
+ template(registerNatives_method_name, "registerNatives") \
|
||||
+ template(initIDs_method_name, "initIDs") \
|
||||
template(parent_name, "parent") \
|
||||
template(threads_name, "threads") \
|
||||
template(groups_name, "groups") \
|
||||
diff --git a/src/hotspot/share/compiler/compileBroker.cpp b/src/hotspot/share/compiler/compileBroker.cpp
|
||||
index 80a940980a5..5ec54baec96 100644
|
||||
--- a/src/hotspot/share/compiler/compileBroker.cpp
|
||||
+++ b/src/hotspot/share/compiler/compileBroker.cpp
|
||||
@@ -1877,6 +1877,17 @@ void CompileBroker::compiler_thread_loop() {
|
||||
if (method()->number_of_breakpoints() == 0) {
|
||||
// Compile the method.
|
||||
if ((UseCompiler || AlwaysCompileLoopMethods) && CompileBroker::should_compile_new_jobs()) {
|
||||
+
|
||||
+ // TODO: review usage of CompileThread_lock (DCEVM)
|
||||
+ if (ciObjectFactory::is_reinitialize_wk_klasses())
|
||||
+ {
|
||||
+ ASSERT_IN_VM;
|
||||
+ MutexLocker only_one (CompileThread_lock, thread);
|
||||
+ if (ciObjectFactory::is_reinitialize_wk_klasses()) {
|
||||
+ ciObjectFactory::reinitialize_wk_classes();
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
invoke_compiler_on_method(task);
|
||||
thread->start_idle_timer();
|
||||
} else {
|
||||
diff --git a/src/hotspot/share/memory/universe.cpp b/src/hotspot/share/memory/universe.cpp
|
||||
index 2e4f597cf1f..4b2c3e62941 100644
|
||||
--- a/src/hotspot/share/memory/universe.cpp
|
||||
+++ b/src/hotspot/share/memory/universe.cpp
|
||||
@@ -1030,6 +1030,14 @@ void Universe::initialize_known_methods(TRAPS) {
|
||||
vmSymbols::doStackWalk_signature(), false, CHECK);
|
||||
}
|
||||
|
||||
+void Universe::reinitialize_loader_addClass_method(TRAPS) {
|
||||
+ // Set up method for registering loaded classes in class loader vector
|
||||
+ initialize_known_method(_loader_addClass_cache,
|
||||
+ SystemDictionary::ClassLoader_klass(),
|
||||
+ "addClass",
|
||||
+ vmSymbols::class_void_signature(), false, CHECK);
|
||||
+}
|
||||
+
|
||||
void universe2_init() {
|
||||
EXCEPTION_MARK;
|
||||
Universe::genesis(CATCH);
|
||||
diff --git a/src/hotspot/share/memory/universe.hpp b/src/hotspot/share/memory/universe.hpp
|
||||
index 742dada0e8f..d1af82b5fa7 100644
|
||||
--- a/src/hotspot/share/memory/universe.hpp
|
||||
+++ b/src/hotspot/share/memory/universe.hpp
|
||||
@@ -349,6 +349,9 @@ class Universe: AllStatic {
|
||||
// Function to initialize these
|
||||
static void initialize_known_methods(TRAPS);
|
||||
|
||||
+ // Enhanced class redefinition
|
||||
+ static void reinitialize_loader_addClass_method(TRAPS);
|
||||
+
|
||||
static oop null_ptr_exception_instance() { return _null_ptr_exception_instance; }
|
||||
static oop arithmetic_exception_instance() { return _arithmetic_exception_instance; }
|
||||
static oop virtual_machine_error_instance() { return _virtual_machine_error_instance; }
|
||||
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
index 4ee12b7021f..7997b178d22 100644
|
||||
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
@@ -497,6 +497,16 @@ void VM_EnhancedRedefineClasses::doit() {
|
||||
redefine_single_class(_new_classes->at(i), thread);
|
||||
}
|
||||
|
||||
+ // Update possible redefinition of well-known classes (like ClassLoader)
|
||||
+ for (int i = 0; i < _new_classes->length(); i++) {
|
||||
+ InstanceKlass* cur = _new_classes->at(i);
|
||||
+ if (cur->old_version() != NULL && SystemDictionary::update_well_known_klass(InstanceKlass::cast(cur->old_version()), cur))
|
||||
+ {
|
||||
+ log_trace(redefine, class, obsolete, metadata)("Well known class updated %s", cur->external_name());
|
||||
+ ciObjectFactory::set_reinitialize_wk_klasses();
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
// Deoptimize all compiled code that depends on this class (do only once, because it clears whole cache)
|
||||
// if (_max_redefinition_flags > Klass::ModifyClass) {
|
||||
flush_dependent_code(NULL, thread);
|
||||
@@ -672,12 +682,56 @@ void VM_EnhancedRedefineClasses::doit() {
|
||||
_timer_vm_op_doit.stop();
|
||||
}
|
||||
|
||||
+void VM_EnhancedRedefineClasses::reinitializeJDKClasses() {
|
||||
+ if (!_new_classes->is_empty()) {
|
||||
+ ResourceMark rm(Thread::current());
|
||||
+
|
||||
+ for (int i = 0; i < _new_classes->length(); i++) {
|
||||
+ InstanceKlass* cur = _new_classes->at(i);
|
||||
+
|
||||
+ if (cur->name()->starts_with("java/") || cur->name()->starts_with("jdk/") || cur->name()->starts_with("sun/")) {
|
||||
+
|
||||
+ if (cur == SystemDictionary::ClassLoader_klass()) {
|
||||
+ // ClassLoader.addClass method is cached in Universe, we must redefine
|
||||
+ Universe::reinitialize_loader_addClass_method(Thread::current());
|
||||
+ log_trace(redefine, class, obsolete, metadata)("Reinitialize ClassLoade addClass method cache.");
|
||||
+ }
|
||||
+
|
||||
+ // naive assumptions that only JDK classes has native static "registerNative" and "initIDs" methods
|
||||
+ int end;
|
||||
+ Symbol* signature = vmSymbols::registerNatives_method_name();
|
||||
+ int midx = cur->find_method_by_name(signature, &end);
|
||||
+ if (midx == -1) {
|
||||
+ signature = vmSymbols::initIDs_method_name();
|
||||
+ midx = cur->find_method_by_name(signature, &end);
|
||||
+ }
|
||||
+ Method* m = NULL;
|
||||
+ if (midx != -1) {
|
||||
+ m = cur->methods()->at(midx);
|
||||
+ }
|
||||
+ if (m != NULL && m->is_static() && m->is_native()) {
|
||||
+ // call static registerNative if present
|
||||
+ JavaValue result(T_VOID);
|
||||
+ JavaCalls::call_static(&result,
|
||||
+ cur,
|
||||
+ signature,
|
||||
+ vmSymbols::void_method_signature(),
|
||||
+ Thread::current());
|
||||
+ log_trace(redefine, class, obsolete, metadata)("Reregister natives of JDK class %s", cur->external_name());
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
// Cleanup - runs in JVM thread
|
||||
// - free used memory
|
||||
// - end GC
|
||||
void VM_EnhancedRedefineClasses::doit_epilogue() {
|
||||
VM_GC_Operation::doit_epilogue();
|
||||
|
||||
+ reinitializeJDKClasses();
|
||||
+
|
||||
if (_new_classes != NULL) {
|
||||
delete _new_classes;
|
||||
}
|
||||
@@ -1589,7 +1643,12 @@ void VM_EnhancedRedefineClasses::check_methods_and_mark_as_obsolete() {
|
||||
|
||||
// obsolete methods need a unique idnum so they become new entries in
|
||||
// the jmethodID cache in InstanceKlass
|
||||
- assert(old_method->method_idnum() == new_method->method_idnum(), "must match");
|
||||
+ if (old_method->method_idnum() != new_method->method_idnum()) {
|
||||
+ log_error(redefine, class, normalize)
|
||||
+ ("Method not matched: %d != %d old: %s = new: %s", old_method->method_idnum(), new_method->method_idnum(),
|
||||
+ old_method->name_and_sig_as_C_string(), new_method->name_and_sig_as_C_string());
|
||||
+ // assert(old_method->method_idnum() == new_method->method_idnum(), "must match");
|
||||
+ }
|
||||
// u2 num = InstanceKlass::cast(_the_class_oop)->next_method_idnum();
|
||||
// if (num != ConstMethod::UNSET_IDNUM) {
|
||||
// old_method->set_method_idnum(num);
|
||||
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp
|
||||
index d00109a0b92..8c47baa8a74 100644
|
||||
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp
|
||||
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp
|
||||
@@ -141,6 +141,8 @@ class VM_EnhancedRedefineClasses: public VM_GC_Operation {
|
||||
|
||||
void flush_dependent_code(InstanceKlass* k_h, TRAPS);
|
||||
|
||||
+ void reinitializeJDKClasses();
|
||||
+
|
||||
static void check_class(InstanceKlass* k_oop, TRAPS);
|
||||
|
||||
static void dump_methods();
|
||||
--
|
||||
2.23.0
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
From 91cfd6de1aac67a2f096568fda3b5992c19bddfb Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <lada.dvorak7@gmail.com>
|
||||
Date: Fri, 19 Mar 2021 19:13:38 +0100
|
||||
Subject: [PATCH 27/33] JBR-3458: Skip dynamic proxy classes based on
|
||||
com.sun.proxy
|
||||
|
||||
---
|
||||
src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
index 7997b178d22..0d1c68f5cd0 100644
|
||||
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
@@ -689,7 +689,8 @@ void VM_EnhancedRedefineClasses::reinitializeJDKClasses() {
|
||||
for (int i = 0; i < _new_classes->length(); i++) {
|
||||
InstanceKlass* cur = _new_classes->at(i);
|
||||
|
||||
- if (cur->name()->starts_with("java/") || cur->name()->starts_with("jdk/") || cur->name()->starts_with("sun/")) {
|
||||
+ if ((cur->name()->starts_with("java/") || cur->name()->starts_with("jdk/") || cur->name()->starts_with("sun/"))
|
||||
+ && cur->name()->index_of_at(0, "$$") == -1) { // skip dynamic proxies
|
||||
|
||||
if (cur == SystemDictionary::ClassLoader_klass()) {
|
||||
// ClassLoader.addClass method is cached in Universe, we must redefine
|
||||
--
|
||||
2.23.0
|
||||
|
||||
@@ -1,79 +0,0 @@
|
||||
From 33a280c972960380f3627fd178d170b14f0b7995 Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <lada.dvorak7@gmail.com>
|
||||
Date: Sat, 20 Mar 2021 20:51:08 +0100
|
||||
Subject: [PATCH 28/33] JBR-3459: Fix race condition in
|
||||
ClassLoaderDataGraph::classes_do
|
||||
|
||||
InstanceKlass in ClassLoaderData can be uninitialized when
|
||||
ClassLoaderDataGraph::classes_do is called. Using
|
||||
ClassLoaderDataGraph::dictionary_classes_do is safe but problem is still
|
||||
persisting with anonymous classes.
|
||||
---
|
||||
src/hotspot/share/classfile/classLoaderData.cpp | 10 ++++++++++
|
||||
src/hotspot/share/classfile/classLoaderData.hpp | 4 ++++
|
||||
.../share/prims/jvmtiEnhancedRedefineClasses.cpp | 13 +++++++++++--
|
||||
3 files changed, 25 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/hotspot/share/classfile/classLoaderData.cpp b/src/hotspot/share/classfile/classLoaderData.cpp
|
||||
index 68df33b6c40..b12784954af 100644
|
||||
--- a/src/hotspot/share/classfile/classLoaderData.cpp
|
||||
+++ b/src/hotspot/share/classfile/classLoaderData.cpp
|
||||
@@ -1169,6 +1169,16 @@ void ClassLoaderDataGraph::classes_do(KlassClosure* klass_closure) {
|
||||
}
|
||||
}
|
||||
|
||||
+void ClassLoaderDataGraph::anonymous_classes_do(KlassClosure* klass_closure) {
|
||||
+ Thread* thread = Thread::current();
|
||||
+ for (ClassLoaderData* cld = _head; cld != NULL; cld = cld->next()) {
|
||||
+ if (cld->is_anonymous()) {
|
||||
+ Handle holder(thread, cld->holder_phantom());
|
||||
+ cld->classes_do(klass_closure);
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
void ClassLoaderDataGraph::classes_do(void f(Klass* const)) {
|
||||
Thread* thread = Thread::current();
|
||||
for (ClassLoaderData* cld = _head; cld != NULL; cld = cld->next()) {
|
||||
diff --git a/src/hotspot/share/classfile/classLoaderData.hpp b/src/hotspot/share/classfile/classLoaderData.hpp
|
||||
index 92f57dac23e..c4c17112a2d 100644
|
||||
--- a/src/hotspot/share/classfile/classLoaderData.hpp
|
||||
+++ b/src/hotspot/share/classfile/classLoaderData.hpp
|
||||
@@ -108,6 +108,10 @@ class ClassLoaderDataGraph : public AllStatic {
|
||||
// for redefinition. These classes are removed during the next class unloading.
|
||||
// Walking the ClassLoaderDataGraph also includes anonymous classes.
|
||||
static void classes_do(KlassClosure* klass_closure);
|
||||
+
|
||||
+ // Enhanced class redefinition
|
||||
+ static void anonymous_classes_do(KlassClosure* klass_closure);
|
||||
+
|
||||
static void classes_do(void f(Klass* const));
|
||||
static void methods_do(void f(Method*));
|
||||
static void modules_do(void f(ModuleEntry*));
|
||||
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
index 0d1c68f5cd0..745109902af 100644
|
||||
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
@@ -2130,8 +2130,17 @@ jvmtiError VM_EnhancedRedefineClasses::find_sorted_affected_classes(TRAPS) {
|
||||
AffectedKlassClosure closure(_affected_klasses);
|
||||
// Updated in j10, from original SystemDictionary::classes_do
|
||||
|
||||
- ClassLoaderDataGraph::classes_do(&closure);
|
||||
- //ClassLoaderDataGraph::dictionary_classes_do(&closure);
|
||||
+ // 0. we can't use ClassLoaderDataGraph::classes_do since classes can be uninitialized in cld,
|
||||
+ // fully initialized class is in system dictionary
|
||||
+ // ClassLoaderDataGraph::classes_do(&closure);
|
||||
+
|
||||
+ // 1. Scan over dictionaries
|
||||
+ ClassLoaderDataGraph::dictionary_classes_do(&closure);
|
||||
+
|
||||
+ // 2. Anonymous class is not in dictionary, we have to iterate anonymous cld directly, but there is race cond...
|
||||
+ // TODO: review ... anonymous class is added to cld before InstanceKlass initialization,
|
||||
+ // find out how to check if the InstanceKlass is initialized
|
||||
+ ClassLoaderDataGraph::anonymous_classes_do(&closure);
|
||||
|
||||
log_trace(redefine, class, load)("%d classes affected", _affected_klasses->length());
|
||||
|
||||
--
|
||||
2.23.0
|
||||
|
||||
@@ -1,222 +0,0 @@
|
||||
From daa0ca3b718e428ffde26e9633a07a37658beb61 Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <vladimir.dvorak@jetbrains.com>
|
||||
Date: Sun, 10 Oct 2021 20:25:30 +0200
|
||||
Subject: [PATCH 29/33] JBR-3867 - update keys of jvmti TAG map after
|
||||
redefinition
|
||||
|
||||
jdwp keeps relation class_ptr->class_ref in jvmti tag. class_ptr is used
|
||||
as a tag key, tag value is refnode. There are new class_ptrs after
|
||||
redefinition, therefore jdwp redefinition method update all affected
|
||||
keys in the tag map.
|
||||
---
|
||||
src/hotspot/share/prims/jvmtiExtensions.cpp | 24 ++++++++++++++
|
||||
.../share/native/libjdwp/VirtualMachineImpl.c | 20 +++++++++++
|
||||
.../share/native/libjdwp/commonRef.c | 29 ++++++++++++++++
|
||||
.../share/native/libjdwp/commonRef.h | 2 ++
|
||||
.../share/native/libjdwp/util.c | 33 +++++++++++++++++++
|
||||
.../share/native/libjdwp/util.h | 3 ++
|
||||
6 files changed, 111 insertions(+)
|
||||
|
||||
diff --git a/src/hotspot/share/prims/jvmtiExtensions.cpp b/src/hotspot/share/prims/jvmtiExtensions.cpp
|
||||
index 36bc47ad0b5..8a6058fd884 100644
|
||||
--- a/src/hotspot/share/prims/jvmtiExtensions.cpp
|
||||
+++ b/src/hotspot/share/prims/jvmtiExtensions.cpp
|
||||
@@ -49,6 +49,15 @@ static jvmtiError JNICALL IsClassUnloadingEnabled(const jvmtiEnv* env, ...) {
|
||||
return JVMTI_ERROR_NONE;
|
||||
}
|
||||
|
||||
+// extension function
|
||||
+static jvmtiError JNICALL IsEnhancedClassRedefinitionEnabled(const jvmtiEnv* env, jboolean* enabled, ...) {
|
||||
+ if (enabled == NULL) {
|
||||
+ return JVMTI_ERROR_NULL_POINTER;
|
||||
+ }
|
||||
+ *enabled = (jboolean)AllowEnhancedClassRedefinition;
|
||||
+ return JVMTI_ERROR_NONE;
|
||||
+}
|
||||
+
|
||||
// register extension functions and events. In this implementation we
|
||||
// have a single extension function (to prove the API) that tests if class
|
||||
// unloading is enabled or disabled. We also have a single extension event
|
||||
@@ -88,6 +97,21 @@ void JvmtiExtensions::register_extensions() {
|
||||
event_params
|
||||
};
|
||||
_ext_events->append(&ext_event);
|
||||
+
|
||||
+ static jvmtiParamInfo func_params_enh_redef[] = {
|
||||
+ { (char*)"IsEnhancedClassRedefinitionEnabled", JVMTI_KIND_OUT, JVMTI_TYPE_JBOOLEAN, JNI_FALSE }
|
||||
+
|
||||
+ };
|
||||
+ static jvmtiExtensionFunctionInfo ext_func_enh_redef = {
|
||||
+ (jvmtiExtensionFunction)IsEnhancedClassRedefinitionEnabled,
|
||||
+ (char*)"com.sun.hotspot.functions.IsEnhancedClassRedefinitionEnabled",
|
||||
+ (char*)"Tell if enhanced class redefinition is enabled (-noclassgc)",
|
||||
+ sizeof(func_params_enh_redef)/sizeof(func_params_enh_redef[0]),
|
||||
+ func_params_enh_redef,
|
||||
+ 0, // no non-universal errors
|
||||
+ NULL
|
||||
+ };
|
||||
+ _ext_functions->append(&ext_func_enh_redef);
|
||||
}
|
||||
|
||||
|
||||
diff --git a/src/jdk.jdwp.agent/share/native/libjdwp/VirtualMachineImpl.c b/src/jdk.jdwp.agent/share/native/libjdwp/VirtualMachineImpl.c
|
||||
index d7ca956dc57..faa8f55f91f 100644
|
||||
--- a/src/jdk.jdwp.agent/share/native/libjdwp/VirtualMachineImpl.c
|
||||
+++ b/src/jdk.jdwp.agent/share/native/libjdwp/VirtualMachineImpl.c
|
||||
@@ -475,6 +475,14 @@ redefineClasses(PacketInputStream *in, PacketOutputStream *out)
|
||||
if (ok == JNI_TRUE) {
|
||||
jvmtiError error;
|
||||
|
||||
+ jlong classIds[classCount];
|
||||
+
|
||||
+ if (gdata->isEnhancedClassRedefinitionEnabled) {
|
||||
+ for (i = 0; i < classCount; ++i) {
|
||||
+ classIds[i] = commonRef_refToID(env, classDefs[i].klass);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
error = JVMTI_FUNC_PTR(gdata->jvmti,RedefineClasses)
|
||||
(gdata->jvmti, classCount, classDefs);
|
||||
if (error != JVMTI_ERROR_NONE) {
|
||||
@@ -484,6 +492,18 @@ redefineClasses(PacketInputStream *in, PacketOutputStream *out)
|
||||
for ( i = 0 ; i < classCount; i++ ) {
|
||||
eventHandler_freeClassBreakpoints(classDefs[i].klass);
|
||||
}
|
||||
+
|
||||
+ if (gdata->isEnhancedClassRedefinitionEnabled) {
|
||||
+ /* Update tags in jvmti to use new classes */
|
||||
+ for ( i = 0 ; i < classCount; i++ ) {
|
||||
+ /* pointer in classIds[i] is updated by advanced redefinition to a new class */
|
||||
+ error = commonRef_updateTags(env, classIds[i]);
|
||||
+ if (error != JVMTI_ERROR_NONE) {
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/src/jdk.jdwp.agent/share/native/libjdwp/commonRef.c b/src/jdk.jdwp.agent/share/native/libjdwp/commonRef.c
|
||||
index 2a8f55014d9..3f33b423209 100644
|
||||
--- a/src/jdk.jdwp.agent/share/native/libjdwp/commonRef.c
|
||||
+++ b/src/jdk.jdwp.agent/share/native/libjdwp/commonRef.c
|
||||
@@ -618,3 +618,32 @@ commonRef_unlock(void)
|
||||
{
|
||||
debugMonitorExit(gdata->refLock);
|
||||
}
|
||||
+
|
||||
+/*
|
||||
+ * Update JVMTI tags, used from enhanced redefinition
|
||||
+ */
|
||||
+jvmtiError
|
||||
+commonRef_updateTags(JNIEnv *env, jlong id)
|
||||
+{
|
||||
+ jvmtiError error;
|
||||
+
|
||||
+ error = JVMTI_ERROR_NONE;
|
||||
+
|
||||
+ if (id == NULL_OBJECT_ID) {
|
||||
+ return error;
|
||||
+ }
|
||||
+
|
||||
+ debugMonitorEnter(gdata->refLock); {
|
||||
+ RefNode *node;
|
||||
+
|
||||
+ node = findNodeByID(env, id);
|
||||
+ if (node != NULL) {
|
||||
+ error = JVMTI_FUNC_PTR(gdata->jvmti, SetTag)
|
||||
+ (gdata->jvmti, node->ref, ptr_to_jlong(node));
|
||||
+ } else {
|
||||
+ printf("Node not found\n");
|
||||
+ }
|
||||
+ } debugMonitorExit(gdata->refLock);
|
||||
+
|
||||
+ return error;
|
||||
+}
|
||||
diff --git a/src/jdk.jdwp.agent/share/native/libjdwp/commonRef.h b/src/jdk.jdwp.agent/share/native/libjdwp/commonRef.h
|
||||
index 7c76667eb19..d7b01e62a47 100644
|
||||
--- a/src/jdk.jdwp.agent/share/native/libjdwp/commonRef.h
|
||||
+++ b/src/jdk.jdwp.agent/share/native/libjdwp/commonRef.h
|
||||
@@ -41,4 +41,6 @@ void commonRef_compact(void);
|
||||
void commonRef_lock(void);
|
||||
void commonRef_unlock(void);
|
||||
|
||||
+jvmtiError commonRef_updateTags(JNIEnv *env, jlong id);
|
||||
+
|
||||
#endif
|
||||
diff --git a/src/jdk.jdwp.agent/share/native/libjdwp/util.c b/src/jdk.jdwp.agent/share/native/libjdwp/util.c
|
||||
index f4a1d19589d..0642c4a3d7f 100644
|
||||
--- a/src/jdk.jdwp.agent/share/native/libjdwp/util.c
|
||||
+++ b/src/jdk.jdwp.agent/share/native/libjdwp/util.c
|
||||
@@ -41,6 +41,7 @@ BackendGlobalData *gdata = NULL;
|
||||
static jboolean isInterface(jclass clazz);
|
||||
static jboolean isArrayClass(jclass clazz);
|
||||
static char * getPropertyUTF8(JNIEnv *env, char *propertyName);
|
||||
+static jboolean isEnhancedClassRedefinitionEnabled(JNIEnv *env);
|
||||
|
||||
/* Save an object reference for use later (create a NewGlobalRef) */
|
||||
void
|
||||
@@ -281,6 +282,8 @@ util_initialize(JNIEnv *env)
|
||||
}
|
||||
}
|
||||
|
||||
+ gdata->isEnhancedClassRedefinitionEnabled = isEnhancedClassRedefinitionEnabled(env);
|
||||
+
|
||||
} END_WITH_LOCAL_REFS(env);
|
||||
|
||||
}
|
||||
@@ -1739,6 +1742,36 @@ getPropertyUTF8(JNIEnv *env, char *propertyName)
|
||||
return value;
|
||||
}
|
||||
|
||||
+static jboolean
|
||||
+isEnhancedClassRedefinitionEnabled(JNIEnv *env)
|
||||
+{
|
||||
+ jvmtiError error;
|
||||
+ jint count, i;
|
||||
+ jvmtiExtensionFunctionInfo* ext_funcs;
|
||||
+
|
||||
+ error = JVMTI_FUNC_PTR(gdata->jvmti,GetExtensionFunctions)
|
||||
+ (gdata->jvmti, &count, &ext_funcs);
|
||||
+ if (error != JVMTI_ERROR_NONE) {
|
||||
+ return JNI_FALSE;
|
||||
+ }
|
||||
+
|
||||
+ for (i=0; i<count; i++) {
|
||||
+ if (strcmp(ext_funcs[i].id, (char*)"com.sun.hotspot.functions.IsEnhancedClassRedefinitionEnabled") == 0) {
|
||||
+ jboolean enabled;
|
||||
+ error = (*ext_funcs[i].func)(gdata->jvmti, &enabled);
|
||||
+
|
||||
+ if (error != JVMTI_ERROR_NONE) {
|
||||
+ return JNI_FALSE;
|
||||
+ } else {
|
||||
+ return enabled;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ return JNI_FALSE;
|
||||
+}
|
||||
+
|
||||
+
|
||||
jboolean
|
||||
isMethodObsolete(jmethodID method)
|
||||
{
|
||||
diff --git a/src/jdk.jdwp.agent/share/native/libjdwp/util.h b/src/jdk.jdwp.agent/share/native/libjdwp/util.h
|
||||
index bcb59457120..72a365ad3c3 100644
|
||||
--- a/src/jdk.jdwp.agent/share/native/libjdwp/util.h
|
||||
+++ b/src/jdk.jdwp.agent/share/native/libjdwp/util.h
|
||||
@@ -126,6 +126,9 @@ typedef struct {
|
||||
int objectsByIDsize;
|
||||
int objectsByIDcount;
|
||||
|
||||
+ /* true if enhanced class redefinition is enabled */
|
||||
+ jboolean isEnhancedClassRedefinitionEnabled;
|
||||
+
|
||||
/* Indication that the agent has been loaded */
|
||||
jboolean isLoaded;
|
||||
|
||||
--
|
||||
2.23.0
|
||||
|
||||
@@ -1,54 +0,0 @@
|
||||
From d7ea3b028367ca5ac2b622a2282bb4e468442e4b Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <vladimir.dvorak@jetbrains.com>
|
||||
Date: Mon, 11 Oct 2021 20:22:26 +0200
|
||||
Subject: [PATCH 30/33] JBR-3867 - fix msvc compilation issue with non const
|
||||
array on stack
|
||||
|
||||
---
|
||||
.../share/native/libjdwp/VirtualMachineImpl.c | 14 ++++++++++----
|
||||
1 file changed, 10 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/src/jdk.jdwp.agent/share/native/libjdwp/VirtualMachineImpl.c b/src/jdk.jdwp.agent/share/native/libjdwp/VirtualMachineImpl.c
|
||||
index faa8f55f91f..53f7e44f579 100644
|
||||
--- a/src/jdk.jdwp.agent/share/native/libjdwp/VirtualMachineImpl.c
|
||||
+++ b/src/jdk.jdwp.agent/share/native/libjdwp/VirtualMachineImpl.c
|
||||
@@ -475,11 +475,16 @@ redefineClasses(PacketInputStream *in, PacketOutputStream *out)
|
||||
if (ok == JNI_TRUE) {
|
||||
jvmtiError error;
|
||||
|
||||
- jlong classIds[classCount];
|
||||
+ jlong* classIds = NULL;
|
||||
|
||||
if (gdata->isEnhancedClassRedefinitionEnabled) {
|
||||
- for (i = 0; i < classCount; ++i) {
|
||||
- classIds[i] = commonRef_refToID(env, classDefs[i].klass);
|
||||
+ classIds = jvmtiAllocate(classCount*(int)sizeof(jlong));
|
||||
+ if (classIds == NULL) {
|
||||
+ outStream_setError(out, JDWP_ERROR(OUT_OF_MEMORY));
|
||||
+ return JNI_TRUE;
|
||||
+ }
|
||||
+ for (i = 0; i < classCount; i++) {
|
||||
+ classIds[i] = commonRef_refToID(env, classDefs[i].klass);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -493,7 +498,7 @@ redefineClasses(PacketInputStream *in, PacketOutputStream *out)
|
||||
eventHandler_freeClassBreakpoints(classDefs[i].klass);
|
||||
}
|
||||
|
||||
- if (gdata->isEnhancedClassRedefinitionEnabled) {
|
||||
+ if (gdata->isEnhancedClassRedefinitionEnabled && classIds != NULL) {
|
||||
/* Update tags in jvmti to use new classes */
|
||||
for ( i = 0 ; i < classCount; i++ ) {
|
||||
/* pointer in classIds[i] is updated by advanced redefinition to a new class */
|
||||
@@ -502,6 +507,7 @@ redefineClasses(PacketInputStream *in, PacketOutputStream *out)
|
||||
break;
|
||||
}
|
||||
}
|
||||
+ jvmtiDeallocate((void*) classIds);
|
||||
}
|
||||
|
||||
}
|
||||
--
|
||||
2.23.0
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
From 6dc05f05716854367e229d72d5fa03f8f7d0739d Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <vladimir.dvorak@jetbrains.com>
|
||||
Date: Tue, 19 Oct 2021 17:02:35 +0200
|
||||
Subject: [PATCH 31/33] Attempt to fix JBR-3887
|
||||
|
||||
---
|
||||
src/hotspot/share/prims/jvmtiExtensions.cpp | 8 +++++++-
|
||||
1 file changed, 7 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/hotspot/share/prims/jvmtiExtensions.cpp b/src/hotspot/share/prims/jvmtiExtensions.cpp
|
||||
index 8a6058fd884..9c8c98cb70e 100644
|
||||
--- a/src/hotspot/share/prims/jvmtiExtensions.cpp
|
||||
+++ b/src/hotspot/share/prims/jvmtiExtensions.cpp
|
||||
@@ -50,7 +50,13 @@ static jvmtiError JNICALL IsClassUnloadingEnabled(const jvmtiEnv* env, ...) {
|
||||
}
|
||||
|
||||
// extension function
|
||||
-static jvmtiError JNICALL IsEnhancedClassRedefinitionEnabled(const jvmtiEnv* env, jboolean* enabled, ...) {
|
||||
+static jvmtiError JNICALL IsEnhancedClassRedefinitionEnabled(const jvmtiEnv* env, ...) {
|
||||
+ jboolean* enabled = NULL;
|
||||
+ va_list ap;
|
||||
+
|
||||
+ va_start(ap, env);
|
||||
+ enabled = va_arg(ap, jboolean *);
|
||||
+ va_end(ap);
|
||||
if (enabled == NULL) {
|
||||
return JVMTI_ERROR_NULL_POINTER;
|
||||
}
|
||||
--
|
||||
2.23.0
|
||||
|
||||
@@ -1,141 +0,0 @@
|
||||
From 256af0b88776c1ba2afdae760d3220ef48a644aa Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <vladimir.dvorak@jetbrains.com>
|
||||
Date: Mon, 1 Nov 2021 19:00:41 +0100
|
||||
Subject: [PATCH 32/33] JBR-3937 Fix crashes in C1/C2 compilers
|
||||
|
||||
There is a race condition in enhanced redefinition with C1/C2. Therefore
|
||||
the patch stops C1/C2 compilation before redefinition and release after
|
||||
redefinition finishing. There is no performance impact since dcevm
|
||||
flushes all code cache.
|
||||
---
|
||||
src/hotspot/share/compiler/compileBroker.cpp | 39 +++++++++++++++++++-
|
||||
src/hotspot/share/compiler/compileBroker.hpp | 6 +++
|
||||
src/hotspot/share/prims/jvmtiEnv.cpp | 7 ++++
|
||||
3 files changed, 51 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/hotspot/share/compiler/compileBroker.cpp b/src/hotspot/share/compiler/compileBroker.cpp
|
||||
index 5ec54baec96..a72560069e4 100644
|
||||
--- a/src/hotspot/share/compiler/compileBroker.cpp
|
||||
+++ b/src/hotspot/share/compiler/compileBroker.cpp
|
||||
@@ -133,6 +133,8 @@ CompileLog** CompileBroker::_compiler2_logs = NULL;
|
||||
// These counters are used to assign an unique ID to each compilation.
|
||||
volatile jint CompileBroker::_compilation_id = 0;
|
||||
volatile jint CompileBroker::_osr_compilation_id = 0;
|
||||
+volatile bool CompileBroker::_compilation_stopped = false;
|
||||
+volatile int CompileBroker::_active_compilations = 0;
|
||||
|
||||
// Debugging information
|
||||
int CompileBroker::_last_compile_type = no_compile;
|
||||
@@ -2203,7 +2205,22 @@ void CompileBroker::invoke_compiler_on_method(CompileTask* task) {
|
||||
locker.wait(Mutex::_no_safepoint_check_flag);
|
||||
}
|
||||
}
|
||||
- comp->compile_method(&ci_env, target, osr_bci, directive);
|
||||
+
|
||||
+ if (AllowEnhancedClassRedefinition) {
|
||||
+ {
|
||||
+ MonitorLockerEx locker(Compilation_lock, Mutex::_no_safepoint_check_flag);
|
||||
+ while (_compilation_stopped) {
|
||||
+ locker.wait(Mutex::_no_safepoint_check_flag);
|
||||
+ }
|
||||
+ Atomic::add(1, &_active_compilations);
|
||||
+ }
|
||||
+
|
||||
+ comp->compile_method(&ci_env, target, osr_bci, directive);
|
||||
+ Atomic::sub(1, &_active_compilations);
|
||||
+
|
||||
+ } else {
|
||||
+ comp->compile_method(&ci_env, target, osr_bci, directive);
|
||||
+ }
|
||||
}
|
||||
|
||||
if (!ci_env.failing() && task->code() == NULL) {
|
||||
@@ -2865,3 +2882,23 @@ void CompileBroker::print_heapinfo(outputStream* out, const char* function, size
|
||||
}
|
||||
out->print_cr("\n__ CodeHeapStateAnalytics total duration %10.3f seconds _________\n", ts_total.seconds());
|
||||
}
|
||||
+
|
||||
+void CompileBroker::stopCompilationBeforeEnhancedRedefinition() {
|
||||
+ if (AllowEnhancedClassRedefinition) {
|
||||
+ MonitorLockerEx locker(Compilation_lock, Mutex::_no_safepoint_check_flag);
|
||||
+ _compilation_stopped = true;
|
||||
+ while (_active_compilations > 0) {
|
||||
+ VM_ThreadsSuspendJVMTI tsj;
|
||||
+ VMThread::execute(&tsj);
|
||||
+ locker.wait(Mutex::_no_safepoint_check_flag);
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+void CompileBroker::releaseCompilationAfterEnhancedRedefinition() {
|
||||
+ if (AllowEnhancedClassRedefinition) {
|
||||
+ MonitorLockerEx locker(Compilation_lock, Mutex::_no_safepoint_check_flag);
|
||||
+ _compilation_stopped = false;
|
||||
+ locker.notify_all();
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/hotspot/share/compiler/compileBroker.hpp b/src/hotspot/share/compiler/compileBroker.hpp
|
||||
index 53e496cd306..fa50e778d9e 100644
|
||||
--- a/src/hotspot/share/compiler/compileBroker.hpp
|
||||
+++ b/src/hotspot/share/compiler/compileBroker.hpp
|
||||
@@ -173,6 +173,9 @@ class CompileBroker: AllStatic {
|
||||
static volatile jint _compilation_id;
|
||||
static volatile jint _osr_compilation_id;
|
||||
|
||||
+ static volatile bool _compilation_stopped;
|
||||
+ static volatile int _active_compilations;
|
||||
+
|
||||
static int _last_compile_type;
|
||||
static int _last_compile_level;
|
||||
static char _last_method_compiled[name_buffer_length];
|
||||
@@ -421,6 +424,9 @@ public:
|
||||
// CodeHeap State Analytics.
|
||||
static void print_info(outputStream *out);
|
||||
static void print_heapinfo(outputStream *out, const char* function, size_t granularity);
|
||||
+
|
||||
+ static void stopCompilationBeforeEnhancedRedefinition();
|
||||
+ static void releaseCompilationAfterEnhancedRedefinition();
|
||||
};
|
||||
|
||||
#endif // SHARE_VM_COMPILER_COMPILEBROKER_HPP
|
||||
diff --git a/src/hotspot/share/prims/jvmtiEnv.cpp b/src/hotspot/share/prims/jvmtiEnv.cpp
|
||||
index 54617f05b5a..0ca9ec020a9 100644
|
||||
--- a/src/hotspot/share/prims/jvmtiEnv.cpp
|
||||
+++ b/src/hotspot/share/prims/jvmtiEnv.cpp
|
||||
@@ -29,6 +29,7 @@
|
||||
#include "classfile/modules.hpp"
|
||||
#include "classfile/systemDictionary.hpp"
|
||||
#include "classfile/vmSymbols.hpp"
|
||||
+#include "compiler/compileBroker.hpp"
|
||||
#include "interpreter/bytecodeStream.hpp"
|
||||
#include "interpreter/interpreter.hpp"
|
||||
#include "jvmtifiles/jvmtiEnv.hpp"
|
||||
@@ -453,9 +454,12 @@ JvmtiEnv::RetransformClasses(jint class_count, const jclass* classes) {
|
||||
class_definitions[index].klass = jcls;
|
||||
}
|
||||
if (AllowEnhancedClassRedefinition) {
|
||||
+ // Stop compilation to avoid compilator race condition (crashes) with advanced redefinition
|
||||
+ CompileBroker::stopCompilationBeforeEnhancedRedefinition();
|
||||
MutexLocker sd_mutex(EnhancedRedefineClasses_lock);
|
||||
VM_EnhancedRedefineClasses op(class_count, class_definitions, jvmti_class_load_kind_retransform);
|
||||
VMThread::execute(&op);
|
||||
+ CompileBroker::releaseCompilationAfterEnhancedRedefinition();
|
||||
return (op.check_error());
|
||||
}
|
||||
VM_RedefineClasses op(class_count, class_definitions, jvmti_class_load_kind_retransform);
|
||||
@@ -469,9 +473,12 @@ JvmtiEnv::RetransformClasses(jint class_count, const jclass* classes) {
|
||||
jvmtiError
|
||||
JvmtiEnv::RedefineClasses(jint class_count, const jvmtiClassDefinition* class_definitions) {
|
||||
if (AllowEnhancedClassRedefinition) {
|
||||
+ // Stop compilation to avoid compilator race condition (crashes) with advanced redefinition
|
||||
+ CompileBroker::stopCompilationBeforeEnhancedRedefinition();
|
||||
MutexLocker sd_mutex(EnhancedRedefineClasses_lock);
|
||||
VM_EnhancedRedefineClasses op(class_count, class_definitions, jvmti_class_load_kind_redefine);
|
||||
VMThread::execute(&op);
|
||||
+ CompileBroker::releaseCompilationAfterEnhancedRedefinition();
|
||||
return (op.check_error());
|
||||
}
|
||||
VM_RedefineClasses op(class_count, class_definitions, jvmti_class_load_kind_redefine);
|
||||
--
|
||||
2.23.0
|
||||
|
||||
@@ -1,121 +0,0 @@
|
||||
From 81d93376d08058144aa5b2ecf6744d607c516e88 Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <vladimir.dvorak@jetbrains.com>
|
||||
Date: Tue, 2 Nov 2021 01:20:13 +0700
|
||||
Subject: [PATCH 33/33] JBR-3938 - fix race condition in anonymous class
|
||||
loading
|
||||
|
||||
Anonymous class must be checked if it is fully initialized if it is used
|
||||
in ClassLoaderDataGraph closure.
|
||||
---
|
||||
.../prims/jvmtiEnhancedRedefineClasses.cpp | 44 ++++++-------------
|
||||
.../prims/jvmtiEnhancedRedefineClasses.hpp | 1 -
|
||||
2 files changed, 14 insertions(+), 31 deletions(-)
|
||||
|
||||
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
index 745109902af..1e63561064a 100644
|
||||
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
@@ -517,8 +517,6 @@ void VM_EnhancedRedefineClasses::doit() {
|
||||
ClassLoaderDataGraph::classes_do(&clear_cpool_cache);
|
||||
|
||||
|
||||
- // SystemDictionary::methods_do(fix_invoke_method);
|
||||
-
|
||||
// JSR-292 support
|
||||
if (_any_class_has_resolved_methods) {
|
||||
bool trace_name_printed = false;
|
||||
@@ -647,10 +645,6 @@ void VM_EnhancedRedefineClasses::doit() {
|
||||
// TODO: explain...
|
||||
ciObjectFactory::resort_shared_ci_metadata();
|
||||
|
||||
- // FIXME - check if it was in JDK8. Copied from standard JDK9 hotswap.
|
||||
- //MethodDataCleaner clean_weak_method_links;
|
||||
- //ClassLoaderDataGraph::classes_do(&clean_weak_method_links);
|
||||
-
|
||||
// Disable any dependent concurrent compilations
|
||||
SystemDictionary::notice_modification();
|
||||
|
||||
@@ -1568,29 +1562,6 @@ void VM_EnhancedRedefineClasses::MethodDataCleaner::do_klass(Klass* k) {
|
||||
}
|
||||
}
|
||||
|
||||
-void VM_EnhancedRedefineClasses::fix_invoke_method(Method* method) {
|
||||
-
|
||||
- constantPoolHandle other_cp = constantPoolHandle(method->constants());
|
||||
-
|
||||
- for (int i = 0; i < other_cp->length(); i++) {
|
||||
- if (other_cp->tag_at(i).is_klass()) {
|
||||
- Klass* klass = other_cp->resolved_klass_at(i);
|
||||
- if (klass->new_version() != NULL) {
|
||||
- // Constant pool entry points to redefined class -- update to the new version
|
||||
- other_cp->klass_at_put(i, klass->newest_version());
|
||||
- }
|
||||
- assert(other_cp->resolved_klass_at(i)->new_version() == NULL, "Must be new klass!");
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- ConstantPoolCache* cp_cache = other_cp->cache();
|
||||
- if (cp_cache != NULL) {
|
||||
- cp_cache->clear_entries();
|
||||
- }
|
||||
-
|
||||
-}
|
||||
-
|
||||
-
|
||||
|
||||
void VM_EnhancedRedefineClasses::update_jmethod_ids() {
|
||||
for (int j = 0; j < _matching_methods_length; ++j) {
|
||||
@@ -2071,12 +2042,23 @@ void VM_EnhancedRedefineClasses::dump_methods() {
|
||||
class AffectedKlassClosure : public KlassClosure {
|
||||
private:
|
||||
GrowableArray<Klass*>* _affected_klasses;
|
||||
+ bool _is_anonymous;
|
||||
public:
|
||||
- AffectedKlassClosure(GrowableArray<Klass*>* affected_klasses) : _affected_klasses(affected_klasses) {}
|
||||
+ AffectedKlassClosure(GrowableArray<Klass*>* affected_klasses) : _affected_klasses(affected_klasses), _is_anonymous(false) {}
|
||||
+
|
||||
+ bool is_anonymous() { return _is_anonymous; }
|
||||
+ void set_anonymous(bool value) { _is_anonymous = value; }
|
||||
|
||||
void do_klass(Klass* klass) {
|
||||
assert(!_affected_klasses->contains(klass), "must not occur more than once!");
|
||||
|
||||
+ if (_is_anonymous && klass->is_instance_klass()) {
|
||||
+ InstanceKlass *ik = InstanceKlass::cast(klass);
|
||||
+ if (ik->is_not_initialized()) {
|
||||
+ return; // anonymous class does not need to be initialized
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
if (klass->new_version() != NULL) {
|
||||
return;
|
||||
}
|
||||
@@ -2135,11 +2117,13 @@ jvmtiError VM_EnhancedRedefineClasses::find_sorted_affected_classes(TRAPS) {
|
||||
// ClassLoaderDataGraph::classes_do(&closure);
|
||||
|
||||
// 1. Scan over dictionaries
|
||||
+ closure.set_anonymous(false);
|
||||
ClassLoaderDataGraph::dictionary_classes_do(&closure);
|
||||
|
||||
// 2. Anonymous class is not in dictionary, we have to iterate anonymous cld directly, but there is race cond...
|
||||
// TODO: review ... anonymous class is added to cld before InstanceKlass initialization,
|
||||
// find out how to check if the InstanceKlass is initialized
|
||||
+ closure.set_anonymous(true);
|
||||
ClassLoaderDataGraph::anonymous_classes_do(&closure);
|
||||
|
||||
log_trace(redefine, class, load)("%d classes affected", _affected_klasses->length());
|
||||
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp
|
||||
index 8c47baa8a74..c69325ca4ab 100644
|
||||
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp
|
||||
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp
|
||||
@@ -119,7 +119,6 @@ class VM_EnhancedRedefineClasses: public VM_GC_Operation {
|
||||
static void unregister_nmethod_g1(nmethod* nm);
|
||||
static void register_nmethod_g1(nmethod* nm);
|
||||
static void unpatch_bytecode(Method* method);
|
||||
- static void fix_invoke_method(Method* method);
|
||||
|
||||
// Figure out which new methods match old methods in name and signature,
|
||||
// which methods have been added, and which are no longer present
|
||||
--
|
||||
2.23.0
|
||||
|
||||
@@ -1,163 +0,0 @@
|
||||
#!/bin/bash -x
|
||||
|
||||
# The following parameters must be specified:
|
||||
# JBSDK_VERSION - specifies major version of OpenJDK e.g. 11_0_6 (instead of dots '.' underbars "_" are used)
|
||||
# JDK_BUILD_NUMBER - specifies update release of OpenJDK build or the value of --with-version-build argument to configure
|
||||
# build_number - specifies the number of JetBrainsRuntime build
|
||||
# bundle_type - specifies bundle to be built; possible values:
|
||||
# jcef - the release bundles with jcef
|
||||
# dcevm - the release bundles with dcevm patches
|
||||
# nomod - the release bundles without any additional modules (jcef)
|
||||
# fd - the fastdebug bundles which also include the jcef module
|
||||
#
|
||||
# jbrsdk-${JBSDK_VERSION}-windows-aarch64-b${build_number}.tar.gz
|
||||
# jbr-${JBSDK_VERSION}-windows-aarch64-b${build_number}.tar.gz
|
||||
#
|
||||
# $ ./java --version
|
||||
# openjdk 11.0.6 2020-01-14
|
||||
# OpenJDK Runtime Environment (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number})
|
||||
# OpenJDK 64-Bit Server VM (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number}, mixed mode)
|
||||
#
|
||||
# Environment variables:
|
||||
# MODULAR_SDK_PATH - specifies the path to the directory where imported modules are located.
|
||||
# By default imported modules should be located in ./modular-sdk.
|
||||
# JCEF_PATH - specifies the path to the directory with JCEF binaries.
|
||||
# By default JCEF binaries should be located in ./jcef_win_aarch64.
|
||||
# BOOT_JDK - specifies the path to the directory with a ready build of OpenJDK 11 with
|
||||
# the same architecture as the build system. It will be used as the boot jdk.
|
||||
|
||||
while getopts ":i?" o; do
|
||||
case "${o}" in
|
||||
i)
|
||||
i="incremental build"
|
||||
INC_BUILD=1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
shift $((OPTIND-1))
|
||||
|
||||
JBSDK_VERSION=$1
|
||||
JDK_BUILD_NUMBER=$2
|
||||
build_number=$3
|
||||
bundle_type=$4
|
||||
JBSDK_VERSION_WITH_DOTS=$(echo $JBSDK_VERSION | sed 's/_/\./g')
|
||||
WORK_DIR=$(pwd)
|
||||
WITH_IMPORT_MODULES="--with-import-modules=${MODULAR_SDK_PATH:=${WORK_DIR}/modular-sdk}"
|
||||
JCEF_PATH=${JCEF_PATH:=${WORK_DIR}/jcef_win_aarch64}
|
||||
TOOLCHAIN_VERSION=${TOOLCHAIN_VERSION:=2019}
|
||||
|
||||
source jb/project/tools/common.sh
|
||||
|
||||
function do_configure {
|
||||
sh ./configure \
|
||||
--openjdk-target=aarch64-unknown-cygwin \
|
||||
--disable-warnings-as-errors \
|
||||
$WITH_DEBUG_LEVEL \
|
||||
--with-vendor-name="${VENDOR_NAME}" \
|
||||
--with-vendor-version-string="${VENDOR_VERSION_STRING}" \
|
||||
--with-jvm-features=shenandoahgc \
|
||||
--with-version-pre= \
|
||||
--with-version-build=${JDK_BUILD_NUMBER} \
|
||||
--with-version-opt=b${build_number} \
|
||||
$WITH_IMPORT_MODULES \
|
||||
--with-toolchain-version=${TOOLCHAIN_VERSION} \
|
||||
--with-boot-jdk=${BOOT_JDK} \
|
||||
--with-build-jdk=${BOOT_JDK} \
|
||||
--disable-ccache \
|
||||
--enable-cds=yes || do_exit $?
|
||||
}
|
||||
|
||||
function create_jbr {
|
||||
|
||||
JBR_BUNDLE=jbr_${bundle_type}
|
||||
|
||||
case "${bundle_type}" in
|
||||
"jcef" | "dcevm" | "nomod" | "fd")
|
||||
JBR_BASE_NAME=jbr_${bundle_type}-${JBSDK_VERSION}
|
||||
;;
|
||||
*)
|
||||
echo "***ERR*** bundle was not specified" && do_exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
echo "Exclude jdk.internal.vm.compiler and jdk.aot (because aot is not supported yet)"
|
||||
cat modules.list | \
|
||||
grep -v "jdk.internal.vm.compiler\|jdk.aot" \
|
||||
> modules_tmp.list
|
||||
|
||||
rm -rf ${JBR_BUNDLE}
|
||||
|
||||
echo Running jlink....
|
||||
${BOOT_JDK}/bin/jlink \
|
||||
--module-path ${JSDK}/jmods --no-man-pages --compress=2 \
|
||||
--add-modules $(xargs < modules_tmp.list | sed 's/ //g' | sed 's/,\?$//g') --output ${JBR_BUNDLE} || do_exit $?
|
||||
if [[ "${bundle_type}" == *jcef* ]] || [[ "${bundle_type}" == *dcevm* ]] || [[ "${bundle_type}" == fd ]]
|
||||
then
|
||||
rsync -av ${JCEF_PATH}/ ${JBR_BUNDLE}/bin --exclude="modular-sdk" || do_exit $?
|
||||
fi
|
||||
echo Modifying release info ...
|
||||
cat ${JSDK}/release | tr -d '\r' | grep -v 'JAVA_VERSION' | grep -v 'MODULES' >> ${JBR_BUNDLE}/release
|
||||
}
|
||||
|
||||
JBRSDK_BASE_NAME=jbrsdk-${JBSDK_VERSION}
|
||||
WITH_DEBUG_LEVEL="--with-debug-level=release"
|
||||
RELEASE_NAME=windows-aarch64-normal-server-release
|
||||
JBSDK=${JBRSDK_BASE_NAME}-windows-aarch64-b${build_number}
|
||||
case "$bundle_type" in
|
||||
"jcef")
|
||||
git apply -p0 < jb/project/tools/patches/add_jcef_module_winaarch64.patch || do_exit $?
|
||||
do_reset_changes=1
|
||||
;;
|
||||
"dcevm")
|
||||
HEAD_REVISION=$(git rev-parse HEAD)
|
||||
git am jb/project/tools/patches/dcevm/*.patch || do_exit $?
|
||||
do_reset_dcevm=1
|
||||
git apply -p0 < jb/project/tools/patches/add_jcef_module_winaarch64.patch || do_exit $?
|
||||
do_reset_changes=1
|
||||
;;
|
||||
"nomod")
|
||||
WITH_IMPORT_MODULES=""
|
||||
;;
|
||||
"fd")
|
||||
git apply -p0 < jb/project/tools/patches/add_jcef_module_winaarch64.patch || do_exit $?
|
||||
do_reset_changes=1
|
||||
WITH_DEBUG_LEVEL="--with-debug-level=fastdebug"
|
||||
RELEASE_NAME=windows-aarch64-normal-server-fastdebug
|
||||
JBRSDK_BASE_NAME=jbrsdk-${JBSDK_VERSION}-fastdebug
|
||||
JBSDK=${JBRSDK_BASE_NAME}-windows-aarch64-fastdebug-b${build_number}
|
||||
;;
|
||||
*)
|
||||
echo "***ERR*** bundle was not specified" && do_exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -z "$INC_BUILD" ]; then
|
||||
do_configure || do_exit $?
|
||||
if [ "${bundle_type}" == "jcef" ]; then
|
||||
make LOG=info clean images test-image CONF=$RELEASE_NAME || do_exit $?
|
||||
else
|
||||
make LOG=info clean images CONF=$RELEASE_NAME || do_exit $?
|
||||
fi
|
||||
else
|
||||
if [ "${bundle_type}" == "jcef" ]; then
|
||||
make LOG=info images test-image CONF=$RELEASE_NAME || do_exit $?
|
||||
else
|
||||
make LOG=info images CONF=$RELEASE_NAME || do_exit $?
|
||||
fi
|
||||
fi
|
||||
|
||||
JSDK=build/$RELEASE_NAME/images/jdk
|
||||
BASE_DIR=build/$RELEASE_NAME/images
|
||||
JBRSDK_BUNDLE=jbrsdk
|
||||
|
||||
rm -rf ${BASE_DIR}/${JBRSDK_BUNDLE} && rsync -a --exclude demo --exclude sample ${JSDK}/ ${JBRSDK_BUNDLE} || do_exit $?
|
||||
if [[ "${bundle_type}" == *jcef* ]] || [[ "${bundle_type}" == *dcevm* ]] || [[ "${bundle_type}" == fd ]]
|
||||
then
|
||||
rsync -av ${JCEF_PATH}/ ${JBRSDK_BUNDLE}/bin --exclude='modular-sdk' || do_exit $?
|
||||
sed 's/JBR/JBRSDK/g' ${JSDK}/release > release
|
||||
mv release ${JBRSDK_BUNDLE}/release
|
||||
fi
|
||||
|
||||
create_jbr || do_exit $?
|
||||
|
||||
do_exit 0
|
||||
@@ -1,154 +0,0 @@
|
||||
#!/bin/bash -x
|
||||
|
||||
# The following parameters must be specified:
|
||||
# JBSDK_VERSION - specifies major version of OpenJDK e.g. 11_0_6 (instead of dots '.' underbars "_" are used)
|
||||
# JDK_BUILD_NUMBER - specifies update release of OpenJDK build or the value of --with-version-build argument to configure
|
||||
# build_number - specifies the number of JetBrainsRuntime build
|
||||
# bundle_type - specifies bundle to be built; possible values:
|
||||
# jcef - the release bundles with jcef
|
||||
# dcevm - the release bundles with dcevm patches
|
||||
# nomod - the release bundles without any additional modules (jcef)
|
||||
# fd - the fastdebug bundles which also include the jcef module
|
||||
#
|
||||
# jbrsdk-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
|
||||
# jbr-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
|
||||
#
|
||||
# $ ./java --version
|
||||
# openjdk 11.0.6 2020-01-14
|
||||
# OpenJDK Runtime Environment (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number})
|
||||
# OpenJDK 64-Bit Server VM (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number}, mixed mode)
|
||||
#
|
||||
# Environment variables:
|
||||
# MODULAR_SDK_PATH - specifies the path to the directory where imported modules are located.
|
||||
# By default imported modules should be located in ./modular-sdk
|
||||
# JCEF_PATH - specifies the path to the directory with JCEF binaries.
|
||||
# By default JCEF binaries should be located in ./jcef_win_x64
|
||||
|
||||
while getopts ":i?" o; do
|
||||
case "${o}" in
|
||||
i)
|
||||
i="incremental build"
|
||||
INC_BUILD=1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
shift $((OPTIND-1))
|
||||
|
||||
JBSDK_VERSION=$1
|
||||
JDK_BUILD_NUMBER=$2
|
||||
build_number=$3
|
||||
bundle_type=$4
|
||||
JBSDK_VERSION_WITH_DOTS=$(echo $JBSDK_VERSION | sed 's/_/\./g')
|
||||
WORK_DIR=$(pwd)
|
||||
WITH_IMPORT_MODULES="--with-import-modules=${MODULAR_SDK_PATH:=${WORK_DIR}/modular-sdk}"
|
||||
JCEF_PATH=${JCEF_PATH:=${WORK_DIR}/jcef_win_x64}
|
||||
TOOLCHAIN_VERSION=${TOOLCHAIN_VERSION:=2015}
|
||||
|
||||
source jb/project/tools/common.sh
|
||||
|
||||
function do_configure {
|
||||
sh ./configure \
|
||||
--disable-warnings-as-errors \
|
||||
$WITH_DEBUG_LEVEL \
|
||||
--with-vendor-name="${VENDOR_NAME}" \
|
||||
--with-vendor-version-string="${VENDOR_VERSION_STRING}" \
|
||||
--with-jvm-features=shenandoahgc \
|
||||
--with-version-pre= \
|
||||
--with-version-build=${JDK_BUILD_NUMBER} \
|
||||
--with-version-opt=b${build_number} \
|
||||
$WITH_IMPORT_MODULES \
|
||||
--with-toolchain-version=${TOOLCHAIN_VERSION} \
|
||||
--with-boot-jdk=${BOOT_JDK} \
|
||||
--disable-ccache \
|
||||
--enable-cds=yes || do_exit $?
|
||||
}
|
||||
|
||||
function create_jbr {
|
||||
|
||||
JBR_BUNDLE=jbr_${bundle_type}
|
||||
|
||||
case "${bundle_type}" in
|
||||
"jcef" | "dcevm" | "nomod" | "fd")
|
||||
JBR_BASE_NAME=jbr_${bundle_type}-${JBSDK_VERSION}
|
||||
;;
|
||||
*)
|
||||
echo "***ERR*** bundle was not specified" && do_exit 1
|
||||
;;
|
||||
esac
|
||||
cat modules.list > modules_tmp.list
|
||||
rm -rf ${JBR_BUNDLE}
|
||||
|
||||
echo Running jlink....
|
||||
${JSDK}/bin/jlink \
|
||||
--module-path ${JSDK}/jmods --no-man-pages --compress=2 \
|
||||
--add-modules $(xargs < modules_tmp.list | sed s/" "//g) --output ${JBR_BUNDLE} || do_exit $?
|
||||
if [[ "${bundle_type}" == *jcef* ]] || [[ "${bundle_type}" == *dcevm* ]] || [[ "${bundle_type}" == fd ]]
|
||||
then
|
||||
rsync -av ${JCEF_PATH}/ ${JBR_BUNDLE}/bin --exclude="modular-sdk" || do_exit $?
|
||||
fi
|
||||
echo Modifying release info ...
|
||||
cat ${JSDK}/release | tr -d '\r' | grep -v 'JAVA_VERSION' | grep -v 'MODULES' >> ${JBR_BUNDLE}/release
|
||||
}
|
||||
|
||||
JBRSDK_BASE_NAME=jbrsdk-${JBSDK_VERSION}
|
||||
WITH_DEBUG_LEVEL="--with-debug-level=release"
|
||||
RELEASE_NAME=windows-x86_64-normal-server-release
|
||||
JBSDK=${JBRSDK_BASE_NAME}-windows-x64-b${build_number}
|
||||
case "$bundle_type" in
|
||||
"jcef")
|
||||
git apply -p0 < jb/project/tools/patches/add_jcef_module.patch || do_exit $?
|
||||
do_reset_changes=1
|
||||
;;
|
||||
"dcevm")
|
||||
HEAD_REVISION=$(git rev-parse HEAD)
|
||||
git am jb/project/tools/patches/dcevm/*.patch || do_exit $?
|
||||
do_reset_dcevm=1
|
||||
git apply -p0 < jb/project/tools/patches/add_jcef_module.patch || do_exit $?
|
||||
do_reset_changes=1
|
||||
;;
|
||||
"nomod")
|
||||
WITH_IMPORT_MODULES=""
|
||||
;;
|
||||
"fd")
|
||||
git apply -p0 < jb/project/tools/patches/add_jcef_module.patch || do_exit $?
|
||||
do_reset_changes=1
|
||||
WITH_DEBUG_LEVEL="--with-debug-level=fastdebug"
|
||||
RELEASE_NAME=windows-x86_64-normal-server-fastdebug
|
||||
JBRSDK_BASE_NAME=jbrsdk-${JBSDK_VERSION}-fastdebug
|
||||
JBSDK=${JBRSDK_BASE_NAME}-windows-x64-fastdebug-b${build_number}
|
||||
;;
|
||||
*)
|
||||
echo "***ERR*** bundle was not specified" && do_exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -z "$INC_BUILD" ]; then
|
||||
do_configure || do_exit $?
|
||||
if [ "${bundle_type}" == "jcef" ]; then
|
||||
make LOG=info CONF=$RELEASE_NAME clean images test-image || do_exit $?
|
||||
else
|
||||
make LOG=info CONF=$RELEASE_NAME clean images || do_exit $?
|
||||
fi
|
||||
else
|
||||
if [ "${bundle_type}" == "jcef" ]; then
|
||||
make LOG=info CONF=$RELEASE_NAME images test-image || do_exit $?
|
||||
else
|
||||
make LOG=info CONF=$RELEASE_NAME images || do_exit $?
|
||||
fi
|
||||
fi
|
||||
|
||||
JSDK=build/$RELEASE_NAME/images/jdk
|
||||
BASE_DIR=build/$RELEASE_NAME/images
|
||||
JBRSDK_BUNDLE=jbrsdk
|
||||
|
||||
rm -rf ${BASE_DIR}/${JBRSDK_BUNDLE} && rsync -a --exclude demo --exclude sample ${JSDK}/ ${JBRSDK_BUNDLE} || do_exit $?
|
||||
if [[ "${bundle_type}" == *jcef* ]] || [[ "${bundle_type}" == *dcevm* ]] || [[ "${bundle_type}" == fd ]]
|
||||
then
|
||||
rsync -av ${JCEF_PATH}/ ${JBRSDK_BUNDLE}/bin --exclude='modular-sdk' || do_exit $?
|
||||
sed 's/JBR/JBRSDK/g' ${JSDK}/release > release
|
||||
mv release ${JBRSDK_BUNDLE}/release
|
||||
fi
|
||||
|
||||
create_jbr || do_exit $?
|
||||
|
||||
do_exit 0
|
||||
@@ -1,65 +0,0 @@
|
||||
#!/bin/bash -x
|
||||
|
||||
# The following parameters must be specified:
|
||||
# JBSDK_VERSION - specifies the current version of OpenJDK e.g. 11_0_6
|
||||
# JDK_BUILD_NUMBER - specifies the number of OpenJDK build or the value of --with-version-build argument to configure
|
||||
# build_number - specifies the number of JetBrainsRuntime build
|
||||
# bundle_type - specifies bundle to bu built; possible values:
|
||||
# jcef - the bundles 1) jbr with jcef+javafx, 2) jbrsdk and 3) test will be created
|
||||
#
|
||||
# jbrsdk-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
|
||||
# jbr-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
|
||||
#
|
||||
# $ ./java --version
|
||||
# openjdk 11.0.6 2020-01-14
|
||||
# OpenJDK Runtime Environment (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number})
|
||||
# OpenJDK 64-Bit Server VM (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number}, mixed mode)
|
||||
#
|
||||
|
||||
JBSDK_VERSION=$1
|
||||
JDK_BUILD_NUMBER=$2
|
||||
build_number=$3
|
||||
|
||||
JBSDK_VERSION_WITH_DOTS=$(echo $JBSDK_VERSION | sed 's/_/\./g')
|
||||
|
||||
source jb/project/tools/common.sh
|
||||
|
||||
JBRSDK_BASE_NAME=jbrsdk-${JBSDK_VERSION}
|
||||
WORK_DIR=$(pwd)
|
||||
|
||||
PATH="/usr/local/bin:/usr/bin:${PATH}"
|
||||
./configure \
|
||||
--disable-warnings-as-errors \
|
||||
--disable-debug-symbols \
|
||||
--with-target-bits=32 \
|
||||
--with-vendor-name="${VENDOR_NAME}" \
|
||||
--with-vendor-version-string="${VENDOR_VERSION_STRING}" \
|
||||
--with-jvm-features=shenandoahgc \
|
||||
--with-version-pre= \
|
||||
--with-version-build=${JDK_BUILD_NUMBER} \
|
||||
--with-version-opt=b${build_number} \
|
||||
--with-toolchain-version=2015 \
|
||||
--with-boot-jdk=${BOOT_JDK} \
|
||||
--disable-ccache \
|
||||
--enable-cds=yes || exit 1
|
||||
make clean CONF=windows-x86-normal-server-release || exit 1
|
||||
make LOG=info images CONF=windows-x86-normal-server-release test-image || exit 1
|
||||
|
||||
JBSDK=${JBRSDK_BASE_NAME}-windows-x86-b${build_number}
|
||||
BASE_DIR=build/windows-x86-normal-server-release/images
|
||||
JSDK=${BASE_DIR}/jdk
|
||||
JBRSDK_BUNDLE=jbrsdk
|
||||
|
||||
rm -rf ${BASE_DIR}/${JBRSDK_BUNDLE} && rsync -a --exclude demo --exclude sample ${JSDK}/ ${JBRSDK_BUNDLE} || exit 1
|
||||
sed 's/JBR/JBRSDK/g' ${JSDK}/release > release
|
||||
mv release ${JBRSDK_BUNDLE}/release
|
||||
|
||||
JBR_BUNDLE=jbr
|
||||
rm -rf ${JBR_BUNDLE}
|
||||
grep -v javafx modules.list | grep -v "jdk.internal.vm\|jdk.aot\|jcef" > modules.list.x86
|
||||
${JSDK}/bin/jlink \
|
||||
--module-path ${JSDK}/jmods --no-man-pages --compress=2 \
|
||||
--add-modules $(xargs < modules.list.x86 | sed s/" "//g) --output ${JBR_BUNDLE} || exit $?
|
||||
|
||||
echo Modifying release info ...
|
||||
#grep -v \"^JAVA_VERSION\" ${JSDK}/release | grep -v \"^MODULES\" >> ${JBR_BUNDLE}/release
|
||||
@@ -1,83 +0,0 @@
|
||||
#!/bin/bash -x
|
||||
|
||||
# The following parameters must be specified:
|
||||
# JBSDK_VERSION - specifies major version of OpenJDK e.g. 11_0_6 (instead of dots '.' underbars "_" are used)
|
||||
# JDK_BUILD_NUMBER - specifies update release of OpenJDK build or the value of --with-version-build argument to configure
|
||||
# build_number - specifies the number of JetBrainsRuntime build
|
||||
# bundle_type - specifies bundle to be built; possible values:
|
||||
# jcef - the release bundles with jcef
|
||||
# dcevm - the release bundles with dcevm patches
|
||||
# nomod - the release bundles without any additional modules (jcef)
|
||||
# fd - the fastdebug bundles which also include the jcef module
|
||||
#
|
||||
# jbrsdk-${JBSDK_VERSION}-windows-aarch64-b${build_number}.tar.gz
|
||||
# jbr-${JBSDK_VERSION}-windows-aarch64-b${build_number}.tar.gz
|
||||
#
|
||||
# $ ./java --version
|
||||
# openjdk 11.0.6 2020-01-14
|
||||
# OpenJDK Runtime Environment (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number})
|
||||
# OpenJDK 64-Bit Server VM (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number}, mixed mode)
|
||||
#
|
||||
# Environment variables:
|
||||
# MODULAR_SDK_PATH - specifies the path to the directory where imported modules are located.
|
||||
# By default imported modules should be located in ./modular-sdk.
|
||||
# JCEF_PATH - specifies the path to the directory with JCEF binaries.
|
||||
# By default JCEF binaries should be located in ./jcef_win_aarch64.
|
||||
|
||||
JBSDK_VERSION=$1
|
||||
JDK_BUILD_NUMBER=$2
|
||||
build_number=$3
|
||||
bundle_type=$4
|
||||
|
||||
source jb/project/tools/common.sh
|
||||
|
||||
function pack_jbr {
|
||||
|
||||
JBR_BUNDLE=jbr_${bundle_type}
|
||||
|
||||
case "${bundle_type}" in
|
||||
"jcef" | "dcevm" | "nomod" | "fd")
|
||||
JBR_BASE_NAME=jbr_${bundle_type}-${JBSDK_VERSION}
|
||||
;;
|
||||
*)
|
||||
echo "***ERR*** bundle was not specified" && do_exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
JBR=$JBR_BASE_NAME-windows-aarch64-b$build_number
|
||||
echo Creating $JBR.tar.gz ...
|
||||
chmod -R ug+rwx,o+rx ${BASE_DIR}/${JBR_BUNDLE}
|
||||
cp -R ${BASE_DIR}/${JBR_BUNDLE} ${BASE_DIR}/jbr
|
||||
/usr/bin/tar -czf $JBR.tar.gz -C $BASE_DIR jbr || do_exit $?
|
||||
}
|
||||
|
||||
JBRSDK_BASE_NAME=jbrsdk-${JBSDK_VERSION}
|
||||
WITH_DEBUG_LEVEL="--with-debug-level=release"
|
||||
RELEASE_NAME=windows-aarch64-normal-server-release
|
||||
JBSDK=${JBRSDK_BASE_NAME}-windows-aarch64-b${build_number}
|
||||
case "$bundle_type" in
|
||||
"fd")
|
||||
WITH_DEBUG_LEVEL="--with-debug-level=fastdebug"
|
||||
RELEASE_NAME=windows-aarch64-normal-server-fastdebug
|
||||
JBSDK=${JBRSDK_BASE_NAME}-windows-aarch64-fastdebug-b${build_number}
|
||||
;;
|
||||
esac
|
||||
|
||||
IMAGES_DIR=build/$RELEASE_NAME/images
|
||||
JSDK=$IMAGES_DIR/jdk
|
||||
BASE_DIR=.
|
||||
|
||||
if [ "${bundle_type}" == "jcef" ] || [ "${bundle_type}" == "fd" ]; then
|
||||
JBRSDK_BUNDLE=jbrsdk
|
||||
echo Creating $JBSDK.tar.gz ...
|
||||
[ -f "$JBSDK.tar.gz" ] && rm "$JBSDK.tar.gz"
|
||||
/usr/bin/tar -czf $JBSDK.tar.gz $JBRSDK_BUNDLE || do_exit $?
|
||||
fi
|
||||
|
||||
pack_jbr $bundle_type
|
||||
|
||||
if [ "$bundle_type" == "jcef" ]; then
|
||||
JBRSDK_TEST=$JBRSDK_BASE_NAME-windows-test-aarch64-b$build_number
|
||||
echo Creating $JBRSDK_TEST.tar.gz ...
|
||||
/usr/bin/tar -czf $JBRSDK_TEST.tar.gz -C $IMAGES_DIR --exclude='test/jdk/demos' test || do_exit $?
|
||||
fi
|
||||
@@ -1,83 +0,0 @@
|
||||
#!/bin/bash -x
|
||||
|
||||
# The following parameters must be specified:
|
||||
# JBSDK_VERSION - specifies major version of OpenJDK e.g. 11_0_6 (instead of dots '.' underbars "_" are used)
|
||||
# JDK_BUILD_NUMBER - specifies update release of OpenJDK build or the value of --with-version-build argument to configure
|
||||
# build_number - specifies the number of JetBrainsRuntime build
|
||||
# bundle_type - specifies bundle to be built; possible values:
|
||||
# jcef - the release bundles with jcef
|
||||
# dcevm - the release bundles with dcevm patches
|
||||
# nomod - the release bundles without any additional modules (jcef)
|
||||
# fd - the fastdebug bundles which also include the jcef module
|
||||
#
|
||||
# jbrsdk-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
|
||||
# jbr-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
|
||||
#
|
||||
# $ ./java --version
|
||||
# openjdk 11.0.6 2020-01-14
|
||||
# OpenJDK Runtime Environment (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number})
|
||||
# OpenJDK 64-Bit Server VM (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number}, mixed mode)
|
||||
#
|
||||
# Environment variables:
|
||||
# MODULAR_SDK_PATH - specifies the path to the directory where imported modules are located.
|
||||
# By default imported modules should be located in ./modular-sdk
|
||||
# JCEF_PATH - specifies the path to the directory with JCEF binaries.
|
||||
# By default JCEF binaries should be located in ./jcef_win_x64
|
||||
|
||||
JBSDK_VERSION=$1
|
||||
JDK_BUILD_NUMBER=$2
|
||||
build_number=$3
|
||||
bundle_type=$4
|
||||
|
||||
source jb/project/tools/common.sh
|
||||
|
||||
function pack_jbr {
|
||||
|
||||
JBR_BUNDLE=jbr_${bundle_type}
|
||||
|
||||
case "${bundle_type}" in
|
||||
"jcef" | "dcevm" | "nomod" | "fd")
|
||||
JBR_BASE_NAME=jbr_${bundle_type}-${JBSDK_VERSION}
|
||||
;;
|
||||
*)
|
||||
echo "***ERR*** bundle was not specified" && do_exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
JBR=$JBR_BASE_NAME-windows-x64-b$build_number
|
||||
echo Creating $JBR.tar.gz ...
|
||||
chmod -R ug+rwx,o+rx ${BASE_DIR}/${JBR_BUNDLE}
|
||||
cp -R ${BASE_DIR}/${JBR_BUNDLE} ${BASE_DIR}/jbr
|
||||
/usr/bin/tar -czf $JBR.tar.gz -C $BASE_DIR jbr || do_exit $?
|
||||
}
|
||||
|
||||
JBRSDK_BASE_NAME=jbrsdk-${JBSDK_VERSION}
|
||||
WITH_DEBUG_LEVEL="--with-debug-level=release"
|
||||
RELEASE_NAME=windows-x86_64-normal-server-release
|
||||
JBSDK=${JBRSDK_BASE_NAME}-windows-x64-b${build_number}
|
||||
case "$bundle_type" in
|
||||
"fd")
|
||||
WITH_DEBUG_LEVEL="--with-debug-level=fastdebug"
|
||||
RELEASE_NAME=windows-x86_64-normal-server-fastdebug
|
||||
JBSDK=${JBRSDK_BASE_NAME}-windows-x64-fastdebug-b${build_number}
|
||||
;;
|
||||
esac
|
||||
|
||||
IMAGES_DIR=build/$RELEASE_NAME/images
|
||||
JSDK=$IMAGES_DIR/jdk
|
||||
BASE_DIR=.
|
||||
|
||||
if [ "${bundle_type}" == "jcef" ] || [ "${bundle_type}" == "fd" ]; then
|
||||
JBRSDK_BUNDLE=jbrsdk
|
||||
echo Creating $JBSDK.tar.gz ...
|
||||
[ -f "$JBSDK.tar.gz" ] && rm "$JBSDK.tar.gz"
|
||||
/usr/bin/tar -czf $JBSDK.tar.gz $JBRSDK_BUNDLE || do_exit $?
|
||||
fi
|
||||
|
||||
pack_jbr $bundle_type
|
||||
|
||||
if [ "$bundle_type" == "jcef" ]; then
|
||||
JBRSDK_TEST=$JBRSDK_BASE_NAME-windows-test-x64-b$build_number
|
||||
echo Creating $JBRSDK_TEST.tar.gz ...
|
||||
/usr/bin/tar -czf $JBRSDK_TEST.tar.gz -C $IMAGES_DIR --exclude='test/jdk/demos' test || do_exit $?
|
||||
fi
|
||||
@@ -1,44 +0,0 @@
|
||||
#!/bin/bash -x
|
||||
|
||||
# The following parameters must be specified:
|
||||
# JBSDK_VERSION - specifies the current version of OpenJDK e.g. 11_0_6
|
||||
# JDK_BUILD_NUMBER - specifies the number of OpenJDK build or the value of --with-version-build argument to configure
|
||||
# build_number - specifies the number of JetBrainsRuntime build
|
||||
# bundle_type - specifies bundle to bu built; possible values:
|
||||
# jcef - the bundles 1) jbr with jcef+javafx, 2) jbrsdk and 3) test will be created
|
||||
#
|
||||
# jbrsdk-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
|
||||
# jbr-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
|
||||
#
|
||||
# $ ./java --version
|
||||
# openjdk 11.0.6 2020-01-14
|
||||
# OpenJDK Runtime Environment (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number})
|
||||
# OpenJDK 64-Bit Server VM (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number}, mixed mode)
|
||||
#
|
||||
|
||||
JBSDK_VERSION=$1
|
||||
JDK_BUILD_NUMBER=$2
|
||||
build_number=$3
|
||||
|
||||
JBRSDK_BASE_NAME=jbrsdk-$JBSDK_VERSION
|
||||
JBR_BASE_NAME=jbr-$JBSDK_VERSION
|
||||
|
||||
IMAGES_DIR=build/windows-x86-normal-server-release/images
|
||||
JSDK=$IMAGES_DIR/jdk
|
||||
JBSDK=$JBRSDK_BASE_NAME-windows-x86-b$build_number
|
||||
BASE_DIR=.
|
||||
|
||||
JBRSDK_BUNDLE=jbrsdk
|
||||
echo Creating $JBSDK.tar.gz ...
|
||||
/usr/bin/tar -czf $JBSDK.tar.gz $JBRSDK_BUNDLE || exit 1
|
||||
|
||||
JBR_BUNDLE=jbr
|
||||
JBR_BASE_NAME=jbr-${JBSDK_VERSION}
|
||||
|
||||
JBR=$JBR_BASE_NAME-windows-x86-b$build_number
|
||||
echo Creating $JBR.tar.gz ...
|
||||
/usr/bin/tar -czf $JBR.tar.gz -C $BASE_DIR ${JBR_BUNDLE} || exit 1
|
||||
|
||||
JBRSDK_TEST=$JBRSDK_BASE_NAME-windows-test-x86-b$build_number
|
||||
echo Creating $JBRSDK_TEST.tar.gz ...
|
||||
/usr/bin/tar -czf $JBRSDK_TEST.tar.gz -C $IMAGES_DIR --exclude='test/jdk/demos' test || exit 1
|
||||
246
make/Bundles.gmk
246
make/Bundles.gmk
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2016, 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
|
||||
@@ -50,7 +50,6 @@ $(eval $(call IncludeCustomExtension, Bundles-pre.gmk))
|
||||
# files or directories may contain spaces.
|
||||
# BASE_DIRS : Base directories for the root dir in the bundle.
|
||||
# SUBDIR : Optional name of root dir in bundle.
|
||||
# OUTPUTDIR : Optionally override output dir
|
||||
SetupBundleFile = $(NamedParamsMacroTemplate)
|
||||
define SetupBundleFileBody
|
||||
|
||||
@@ -71,11 +70,8 @@ define SetupBundleFileBody
|
||||
|
||||
$$(call SetIfEmpty, $1_UNZIP_DEBUGINFO, false)
|
||||
|
||||
$$(call SetIfEmpty, $1_OUTPUTDIR, $$(BUNDLES_OUTPUTDIR))
|
||||
|
||||
$$($1_OUTPUTDIR)/$$($1_BUNDLE_NAME): $$($1_FILES)
|
||||
$$(call LogWarn, Creating $$($1_BUNDLE_NAME))
|
||||
# If any of the files contain a space in the file name, FindFiles
|
||||
$(BUNDLES_OUTPUTDIR)/$$($1_BUNDLE_NAME): $$($1_FILES)
|
||||
# If any of the files contain a space in the file name, CacheFind
|
||||
# will have replaced it with ?. Tar does not accept that so need to
|
||||
# switch it back.
|
||||
$$(foreach d, $$($1_BASE_DIRS), \
|
||||
@@ -125,13 +121,6 @@ define SetupBundleFileBody
|
||||
&& $(TAR) cf - -$(TAR_INCLUDE_PARAM) $$($1_$$d_LIST_FILE) \
|
||||
$(TAR_IGNORE_EXIT_VALUE) ) \
|
||||
| ( $(CD) $(SUPPORT_OUTPUTDIR)/bundles/$1/$$($1_SUBDIR) && $(TAR) xf - )$$(NEWLINE) )
|
||||
# Rename stripped pdb files
|
||||
ifeq ($(OPENJDK_TARGET_OS)+$(SHIP_DEBUG_SYMBOLS), windows+public)
|
||||
for f in `$(FIND) $(SUPPORT_OUTPUTDIR)/bundles/$1/$$($1_SUBDIR) -name "*.stripped.pdb"`; do \
|
||||
$(ECHO) Renaming $$$${f} to $$$${f%stripped.pdb}pdb $(LOG_INFO); \
|
||||
$(MV) $$$${f} $$$${f%stripped.pdb}pdb; \
|
||||
done
|
||||
endif
|
||||
# Unzip any zipped debuginfo files
|
||||
ifeq ($$($1_UNZIP_DEBUGINFO), true)
|
||||
for f in `$(FIND) $(SUPPORT_OUTPUTDIR)/bundles/$1/$$($1_SUBDIR) -name "*.diz"`; do \
|
||||
@@ -148,7 +137,7 @@ define SetupBundleFileBody
|
||||
endif
|
||||
endif
|
||||
|
||||
$1 += $$($1_OUTPUTDIR)/$$($1_BUNDLE_NAME)
|
||||
$1 += $(BUNDLES_OUTPUTDIR)/$$($1_BUNDLE_NAME)
|
||||
|
||||
endef
|
||||
|
||||
@@ -163,12 +152,6 @@ ifeq ($(OPENJDK_TARGET_OS)-$(DEBUG_LEVEL), macosx-release)
|
||||
JRE_IMAGE_HOMEDIR := $(JRE_MACOSX_CONTENTS_DIR)/Home
|
||||
JDK_BUNDLE_SUBDIR :=
|
||||
JRE_BUNDLE_SUBDIR :=
|
||||
# In certain situations, the JDK_IMAGE_DIR points to an image without the
|
||||
# the symbols and demos. If so, the symobls and demos can be found in a
|
||||
# separate image. These variables allow for overriding from a custom makefile.
|
||||
JDK_SYMBOLS_IMAGE_DIR ?= $(JDK_IMAGE_DIR)
|
||||
JDK_DEMOS_IMAGE_DIR ?= $(JDK_IMAGE_DIR)
|
||||
JDK_DEMOS_IMAGE_HOMEDIR ?= $(JDK_DEMOS_IMAGE_DIR)/$(JDK_MACOSX_CONTENTS_SUBDIR)/Home
|
||||
else
|
||||
JDK_IMAGE_HOMEDIR := $(JDK_IMAGE_DIR)
|
||||
JRE_IMAGE_HOMEDIR := $(JRE_IMAGE_DIR)
|
||||
@@ -178,56 +161,23 @@ else
|
||||
JDK_BUNDLE_SUBDIR := $(JDK_BUNDLE_SUBDIR)/$(DEBUG_LEVEL)
|
||||
JRE_BUNDLE_SUBDIR := $(JRE_BUNDLE_SUBDIR)/$(DEBUG_LEVEL)
|
||||
endif
|
||||
# In certain situations, the JDK_IMAGE_DIR points to an image without the
|
||||
# the symbols and demos. If so, the symobls and demos can be found in a
|
||||
# separate image. These variables allow for overriding from a custom makefile.
|
||||
JDK_SYMBOLS_IMAGE_DIR ?= $(JDK_IMAGE_DIR)
|
||||
JDK_DEMOS_IMAGE_DIR ?= $(JDK_IMAGE_DIR)
|
||||
JDK_DEMOS_IMAGE_HOMEDIR ?= $(JDK_DEMOS_IMAGE_DIR)
|
||||
endif
|
||||
|
||||
################################################################################
|
||||
|
||||
ifneq ($(filter product-bundles% legacy-bundles, $(MAKECMDGOALS)), )
|
||||
ifneq ($(filter product-bundles legacy-bundles, $(MAKECMDGOALS)), )
|
||||
$(eval $(call FillCacheFind, $(IMAGES_OUTPUTDIR)))
|
||||
|
||||
SYMBOLS_EXCLUDE_PATTERN := %.debuginfo %.diz %.map
|
||||
SYMBOLS_EXCLUDE_PATTERN := %.debuginfo %.diz %.pdb %.map
|
||||
|
||||
# There may be files with spaces in the names, so use ShellFindFiles
|
||||
# explicitly.
|
||||
ALL_JDK_FILES := $(call ShellFindFiles, $(JDK_IMAGE_DIR))
|
||||
ifneq ($(JDK_IMAGE_DIR), $(JDK_SYMBOLS_IMAGE_DIR))
|
||||
ALL_JDK_SYMBOLS_FILES := $(call ShellFindFiles, $(JDK_SYMBOLS_IMAGE_DIR))
|
||||
else
|
||||
ALL_JDK_SYMBOLS_FILES := $(ALL_JDK_FILES)
|
||||
endif
|
||||
ifneq ($(JDK_IMAGE_DIR), $(JDK_DEMOS_IMAGE_DIR))
|
||||
ALL_JDK_DEMOS_FILES := $(call ShellFindFiles, $(JDK_DEMOS_IMAGE_DIR))
|
||||
else
|
||||
ALL_JDK_DEMOS_FILES := $(ALL_JDK_FILES)
|
||||
endif
|
||||
ALL_JDK_FILES := $(call CacheFind, $(JDK_IMAGE_DIR))
|
||||
|
||||
# Create special filter rules when dealing with unzipped .dSYM directories on
|
||||
# macosx
|
||||
ifeq ($(OPENJDK_TARGET_OS), macosx)
|
||||
ifeq ($(ZIP_EXTERNAL_DEBUG_SYMBOLS), false)
|
||||
JDK_SYMBOLS_EXCLUDE_PATTERN := $(addprefix %, \
|
||||
$(call containing, .dSYM/, $(patsubst $(JDK_IMAGE_DIR)/%, %, \
|
||||
$(ALL_JDK_SYMBOLS_FILES))))
|
||||
endif
|
||||
endif
|
||||
|
||||
# Create special filter rules when dealing with debug symbols on windows
|
||||
ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
ifeq ($(SHIP_DEBUG_SYMBOLS), )
|
||||
JDK_SYMBOLS_EXCLUDE_PATTERN := %.pdb
|
||||
else
|
||||
ifeq ($(SHIP_DEBUG_SYMBOLS), public)
|
||||
JDK_SYMBOLS_EXCLUDE_PATTERN := \
|
||||
$(filter-out \
|
||||
%.stripped.pdb, \
|
||||
$(filter %.pdb, $(ALL_JDK_FILES)) \
|
||||
)
|
||||
endif
|
||||
$(call containing, .dSYM/, $(patsubst $(JDK_IMAGE_DIR)/%, %, $(ALL_JDK_FILES))))
|
||||
endif
|
||||
endif
|
||||
|
||||
@@ -240,24 +190,22 @@ ifneq ($(filter product-bundles% legacy-bundles, $(MAKECMDGOALS)), )
|
||||
, \
|
||||
$(ALL_JDK_FILES) \
|
||||
)
|
||||
|
||||
JDK_SYMBOLS_BUNDLE_FILES := \
|
||||
$(filter \
|
||||
$(JDK_SYMBOLS_EXCLUDE_PATTERN) \
|
||||
$(SYMBOLS_EXCLUDE_PATTERN) \
|
||||
, \
|
||||
$(filter-out \
|
||||
$(JDK_IMAGE_HOMEDIR)/demo/% %.stripped.pdb \
|
||||
$(JDK_IMAGE_HOMEDIR)/demo/% \
|
||||
, \
|
||||
$(ALL_JDK_SYMBOLS_FILES) \
|
||||
$(ALL_JDK_FILES) \
|
||||
) \
|
||||
) \
|
||||
$(call FindFiles, $(SYMBOLS_IMAGE_DIR))
|
||||
$(call CacheFind, $(SYMBOLS_IMAGE_DIR))
|
||||
|
||||
TEST_DEMOS_BUNDLE_FILES := $(filter $(JDK_DEMOS_IMAGE_HOMEDIR)/demo/%, \
|
||||
$(ALL_JDK_DEMOS_FILES))
|
||||
TEST_DEMOS_BUNDLE_FILES := $(filter $(JDK_IMAGE_HOMEDIR)/demo/%, $(ALL_JDK_FILES))
|
||||
|
||||
ALL_JRE_FILES := $(call ShellFindFiles, $(JRE_IMAGE_DIR))
|
||||
ALL_JRE_FILES := $(call CacheFind, $(JRE_IMAGE_DIR))
|
||||
|
||||
# Create special filter rules when dealing with unzipped .dSYM directories on
|
||||
# macosx
|
||||
@@ -268,128 +216,39 @@ ifneq ($(filter product-bundles% legacy-bundles, $(MAKECMDGOALS)), )
|
||||
endif
|
||||
endif
|
||||
|
||||
# Create special filter rules when dealing with debug symbols on windows
|
||||
ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
ifeq ($(SHIP_DEBUG_SYMBOLS), )
|
||||
JRE_SYMBOLS_EXCLUDE_PATTERN := %.pdb
|
||||
else
|
||||
ifeq ($(SHIP_DEBUG_SYMBOLS), public)
|
||||
JRE_SYMBOLS_EXCLUDE_PATTERN := \
|
||||
$(filter-out \
|
||||
%.stripped.pdb, \
|
||||
$(filter %.pdb, $(ALL_JRE_FILES)) \
|
||||
)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
JRE_BUNDLE_FILES := $(filter-out \
|
||||
$(JRE_SYMBOLS_EXCLUDE_PATTERN) \
|
||||
$(SYMBOLS_EXCLUDE_PATTERN), \
|
||||
$(ALL_JRE_FILES))
|
||||
|
||||
# On Macosx release builds, when there is a code signing certificate available,
|
||||
# the final bundle layout can be signed.
|
||||
SIGN_BUNDLE := false
|
||||
ifeq ($(OPENJDK_TARGET_OS)-$(DEBUG_LEVEL), macosx-release)
|
||||
ifneq ($(CODESIGN), )
|
||||
SIGN_BUNDLE := true
|
||||
endif
|
||||
endif
|
||||
$(eval $(call SetupBundleFile, BUILD_JDK_BUNDLE, \
|
||||
BUNDLE_NAME := $(JDK_BUNDLE_NAME), \
|
||||
FILES := $(JDK_BUNDLE_FILES), \
|
||||
SPECIAL_INCLUDES := $(JDK_SPECIAL_INCLUDES), \
|
||||
BASE_DIRS := $(JDK_IMAGE_DIR), \
|
||||
SUBDIR := $(JDK_BUNDLE_SUBDIR), \
|
||||
))
|
||||
|
||||
ifeq ($(SIGN_BUNDLE), true)
|
||||
# Macosx release build and code signing available.
|
||||
PRODUCT_TARGETS += $(BUILD_JDK_BUNDLE)
|
||||
|
||||
################################################################################
|
||||
# JDK bundle
|
||||
$(eval $(call SetupCopyFiles, CREATE_JDK_BUNDLE_DIR_SIGNED, \
|
||||
SRC := $(JDK_IMAGE_DIR), \
|
||||
FILES := $(JDK_BUNDLE_FILES), \
|
||||
DEST := $(JDK_MACOSX_BUNDLE_DIR_SIGNED), \
|
||||
))
|
||||
$(eval $(call SetupBundleFile, BUILD_JRE_BUNDLE, \
|
||||
BUNDLE_NAME := $(JRE_BUNDLE_NAME), \
|
||||
FILES := $(JRE_BUNDLE_FILES), \
|
||||
BASE_DIRS := $(JRE_IMAGE_DIR), \
|
||||
SUBDIR := $(JRE_BUNDLE_SUBDIR), \
|
||||
))
|
||||
|
||||
JDK_SIGNED_CODE_RESOURCES := \
|
||||
$(JDK_MACOSX_BUNDLE_DIR_SIGNED)/$(JDK_MACOSX_CONTENTS_SUBDIR)/_CodeSignature/CodeResources
|
||||
LEGACY_TARGETS += $(BUILD_JRE_BUNDLE)
|
||||
|
||||
$(JDK_SIGNED_CODE_RESOURCES): $(CREATE_JDK_BUNDLE_DIR_SIGNED)
|
||||
$(call LogWarn, Signing $(JDK_BUNDLE_NAME))
|
||||
$(CODESIGN) -s "$(MACOSX_CODESIGN_IDENTITY)" \
|
||||
--timestamp --options runtime --deep --force \
|
||||
$(JDK_MACOSX_BUNDLE_DIR_SIGNED)/$(JDK_MACOSX_BUNDLE_TOP_DIR) $(LOG_DEBUG)
|
||||
$(TOUCH) $@
|
||||
$(eval $(call SetupBundleFile, BUILD_JDK_SYMBOLS_BUNDLE, \
|
||||
BUNDLE_NAME := $(JDK_SYMBOLS_BUNDLE_NAME), \
|
||||
FILES := $(JDK_SYMBOLS_BUNDLE_FILES), \
|
||||
BASE_DIRS := $(JDK_IMAGE_DIR) $(wildcard $(SYMBOLS_IMAGE_DIR)), \
|
||||
SUBDIR := $(JDK_BUNDLE_SUBDIR), \
|
||||
UNZIP_DEBUGINFO := true, \
|
||||
))
|
||||
|
||||
$(eval $(call SetupBundleFile, BUILD_JDK_BUNDLE, \
|
||||
BUNDLE_NAME := $(JDK_BUNDLE_NAME), \
|
||||
FILES := \
|
||||
$(CREATE_JDK_BUNDLE_DIR_SIGNED) \
|
||||
$(JDK_SIGNED_CODE_RESOURCES), \
|
||||
BASE_DIRS := $(JDK_MACOSX_BUNDLE_DIR_SIGNED), \
|
||||
SUBDIR := $(JDK_BUNDLE_SUBDIR), \
|
||||
))
|
||||
|
||||
PRODUCT_TARGETS += $(BUILD_JDK_BUNDLE)
|
||||
|
||||
################################################################################
|
||||
# JRE bundle
|
||||
$(eval $(call SetupCopyFiles, CREATE_JRE_BUNDLE_DIR_SIGNED, \
|
||||
SRC := $(JRE_IMAGE_DIR), \
|
||||
FILES := $(JRE_BUNDLE_FILES), \
|
||||
DEST := $(JRE_MACOSX_BUNDLE_DIR_SIGNED), \
|
||||
))
|
||||
|
||||
JRE_SIGNED_CODE_RESOURCES := \
|
||||
$(JRE_MACOSX_BUNDLE_DIR_SIGNED)/$(JRE_MACOSX_CONTENTS_SUBDIR)/_CodeSignature/CodeResources
|
||||
|
||||
$(JRE_SIGNED_CODE_RESOURCES): $(CREATE_JRE_BUNDLE_DIR_SIGNED)
|
||||
$(call LogWarn, Signing $(JRE_BUNDLE_NAME))
|
||||
$(CODESIGN) -s "$(MACOSX_CODESIGN_IDENTITY)" \
|
||||
--timestamp --options runtime --deep --force \
|
||||
$(JRE_MACOSX_BUNDLE_DIR_SIGNED)/$(JRE_MACOSX_BUNDLE_TOP_DIR) $(LOG_DEBUG)
|
||||
$(TOUCH) $@
|
||||
|
||||
$(eval $(call SetupBundleFile, BUILD_JRE_BUNDLE, \
|
||||
BUNDLE_NAME := $(JRE_BUNDLE_NAME), \
|
||||
FILES := \
|
||||
$(CREATE_JRE_BUNDLE_DIR_SIGNED) \
|
||||
$(JRE_SIGNED_CODE_RESOURCES), \
|
||||
BASE_DIRS := $(JRE_MACOSX_BUNDLE_DIR_SIGNED), \
|
||||
SUBDIR := $(JRE_BUNDLE_SUBDIR), \
|
||||
))
|
||||
|
||||
LEGACY_TARGETS += $(BUILD_JRE_BUNDLE)
|
||||
else
|
||||
# Not a Macosx release build or code signing not available.
|
||||
$(eval $(call SetupBundleFile, BUILD_JDK_BUNDLE, \
|
||||
BUNDLE_NAME := $(JDK_BUNDLE_NAME), \
|
||||
FILES := $(JDK_BUNDLE_FILES), \
|
||||
SPECIAL_INCLUDES := $(JDK_SPECIAL_INCLUDES), \
|
||||
BASE_DIRS := $(JDK_IMAGE_DIR), \
|
||||
SUBDIR := $(JDK_BUNDLE_SUBDIR), \
|
||||
))
|
||||
|
||||
PRODUCT_TARGETS += $(BUILD_JDK_BUNDLE)
|
||||
|
||||
$(eval $(call SetupBundleFile, BUILD_JRE_BUNDLE, \
|
||||
BUNDLE_NAME := $(JRE_BUNDLE_NAME), \
|
||||
FILES := $(JRE_BUNDLE_FILES), \
|
||||
BASE_DIRS := $(JRE_IMAGE_DIR), \
|
||||
SUBDIR := $(JRE_BUNDLE_SUBDIR), \
|
||||
))
|
||||
|
||||
LEGACY_TARGETS += $(BUILD_JRE_BUNDLE)
|
||||
endif
|
||||
|
||||
ifeq ($(COPY_DEBUG_SYMBOLS), true)
|
||||
$(eval $(call SetupBundleFile, BUILD_JDK_SYMBOLS_BUNDLE, \
|
||||
BUNDLE_NAME := $(JDK_SYMBOLS_BUNDLE_NAME), \
|
||||
FILES := $(JDK_SYMBOLS_BUNDLE_FILES), \
|
||||
BASE_DIRS := $(JDK_SYMBOLS_IMAGE_DIR) $(wildcard $(SYMBOLS_IMAGE_DIR)), \
|
||||
SUBDIR := $(JDK_BUNDLE_SUBDIR), \
|
||||
UNZIP_DEBUGINFO := true, \
|
||||
))
|
||||
|
||||
PRODUCT_TARGETS += $(BUILD_JDK_SYMBOLS_BUNDLE)
|
||||
endif
|
||||
PRODUCT_TARGETS += $(BUILD_JDK_SYMBOLS_BUNDLE)
|
||||
|
||||
# The demo bundle is only created to support client tests. Ideally it should
|
||||
# be built with the main test bundle, but since the prerequisites match
|
||||
@@ -397,7 +256,7 @@ ifneq ($(filter product-bundles% legacy-bundles, $(MAKECMDGOALS)), )
|
||||
$(eval $(call SetupBundleFile, BUILD_TEST_DEMOS_BUNDLE, \
|
||||
BUNDLE_NAME := $(TEST_DEMOS_BUNDLE_NAME), \
|
||||
FILES := $(TEST_DEMOS_BUNDLE_FILES), \
|
||||
BASE_DIRS := $(JDK_DEMOS_IMAGE_DIR), \
|
||||
BASE_DIRS := $(JDK_IMAGE_DIR), \
|
||||
SUBDIR := $(JDK_BUNDLE_SUBDIR), \
|
||||
))
|
||||
|
||||
@@ -407,7 +266,7 @@ endif
|
||||
################################################################################
|
||||
|
||||
ifneq ($(filter test-bundles, $(MAKECMDGOALS)), )
|
||||
TEST_BUNDLE_FILES := $(call FindFiles, $(TEST_IMAGE_DIR))
|
||||
TEST_BUNDLE_FILES := $(call CacheFind, $(TEST_IMAGE_DIR))
|
||||
|
||||
$(eval $(call SetupBundleFile, BUILD_TEST_BUNDLE, \
|
||||
BUNDLE_NAME := $(TEST_BUNDLE_NAME), \
|
||||
@@ -421,7 +280,7 @@ endif
|
||||
################################################################################
|
||||
|
||||
ifneq ($(filter docs-bundles, $(MAKECMDGOALS)), )
|
||||
DOCS_BUNDLE_FILES := $(call FindFiles, $(DOCS_IMAGE_DIR))
|
||||
DOCS_BUNDLE_FILES := $(call CacheFind, $(DOCS_IMAGE_DIR))
|
||||
|
||||
$(eval $(call SetupBundleFile, BUILD_DOCS_BUNDLE, \
|
||||
BUNDLE_NAME := $(DOCS_BUNDLE_NAME), \
|
||||
@@ -435,27 +294,6 @@ endif
|
||||
|
||||
################################################################################
|
||||
|
||||
ifneq ($(filter static-libs-bundles, $(MAKECMDGOALS)), )
|
||||
STATIC_LIBS_BUNDLE_FILES := $(call FindFiles, $(STATIC_LIBS_IMAGE_DIR))
|
||||
|
||||
ifeq ($(OPENJDK_TARGET_OS)-$(DEBUG_LEVEL), macosx-release)
|
||||
STATIC_LIBS_BUNDLE_SUBDIR := $(JDK_MACOSX_CONTENTS_SUBDIR)/Home
|
||||
else
|
||||
STATIC_LIBS_BUNDLE_SUBDIR := $(JDK_BUNDLE_SUBDIR)
|
||||
endif
|
||||
|
||||
$(eval $(call SetupBundleFile, BUILD_STATIC_LIBS_BUNDLE, \
|
||||
BUNDLE_NAME := $(STATIC_LIBS_BUNDLE_NAME), \
|
||||
FILES := $(STATIC_LIBS_BUNDLE_FILES), \
|
||||
BASE_DIRS := $(STATIC_LIBS_IMAGE_DIR), \
|
||||
SUBDIR := $(STATIC_LIBS_BUNDLE_SUBDIR), \
|
||||
))
|
||||
|
||||
STATIC_LIBS_TARGETS += $(BUILD_STATIC_LIBS_BUNDLE)
|
||||
endif
|
||||
|
||||
################################################################################
|
||||
|
||||
# Hook to include the corresponding custom file, if present.
|
||||
$(eval $(call IncludeCustomExtension, Bundles.gmk))
|
||||
|
||||
@@ -465,7 +303,5 @@ product-bundles: $(PRODUCT_TARGETS)
|
||||
legacy-bundles: $(LEGACY_TARGETS)
|
||||
test-bundles: $(TEST_TARGETS)
|
||||
docs-bundles: $(DOCS_TARGETS)
|
||||
static-libs-bundles: $(STATIC_LIBS_TARGETS)
|
||||
|
||||
.PHONY: all default product-bundles test-bundles docs-bundles \
|
||||
static-libs-bundles
|
||||
.PHONY: all default product-bundles test-bundles docs-bundles
|
||||
|
||||
@@ -1,60 +0,0 @@
|
||||
#
|
||||
# Copyright (c) 2018, 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. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
default: all
|
||||
|
||||
include $(SPEC)
|
||||
include MakeBase.gmk
|
||||
|
||||
# When FIXPATH is set, let it process the file to make sure all paths are usable
|
||||
# by system native tools. The FIXPATH tool assumes arguments preceeded by an @
|
||||
# character points to a text file containing further arguments (similar to a
|
||||
# linker). It replaces any such arguments with a different temporary filename,
|
||||
# whose contents has been processed to make any paths native. To obtain a
|
||||
# properly processed compile_commands.json, FIXPATH is then made to invoke an
|
||||
# AWK script with the unprocessed json file as the only argument, prepended with
|
||||
# an @ character. The AWK script simply copies the contents of this processed
|
||||
# file.
|
||||
#
|
||||
# The sed command encloses the fragments inside brackets and removes the final
|
||||
# trailing comma.
|
||||
$(OUTPUTDIR)/compile_commands.json: $(wildcard $(MAKESUPPORT_OUTPUTDIR)/compile-commands/*.json)
|
||||
$(call LogWarn, Updating compile_commands.json)
|
||||
$(RM) $@
|
||||
$(FIND) $(MAKESUPPORT_OUTPUTDIR)/compile-commands/ -name \*.json | \
|
||||
$(SORT) | $(XARGS) $(CAT) >> $@.tmp
|
||||
$(if $(FIXPATH),$(FIXPATH) $(AWK) 'BEGIN { \
|
||||
tmpfile = substr(ARGV[2],2); \
|
||||
cmd = "$(CP) " "\047" tmpfile "\047" " $@.tmp"; \
|
||||
system(cmd); \
|
||||
}' -- @$@.tmp)
|
||||
$(SED) -e '1s/^/[\$(NEWLINE)/' -e '$(DOLLAR)s/,\s\{0,\}$(DOLLAR)/\$(NEWLINE)]/' $@.tmp > $@
|
||||
$(RM) $@.tmp
|
||||
|
||||
TARGETS += $(OUTPUTDIR)/compile_commands.json
|
||||
|
||||
all: $(TARGETS)
|
||||
|
||||
.PHONY: all
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2016, 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
|
||||
@@ -43,7 +43,7 @@ $(eval $(call IncludeCustomExtension, CompileDemos-pre.gmk))
|
||||
# Prepare the find cache.
|
||||
DEMO_SRC_DIRS += $(TOPDIR)/src/demo
|
||||
|
||||
$(call FillFindCache, $(DEMO_SRC_DIRS))
|
||||
$(eval $(call FillCacheFind, $(wildcard $(DEMO_SRC_DIRS))))
|
||||
|
||||
# Append demo goals to this variable.
|
||||
TARGETS =
|
||||
@@ -237,11 +237,11 @@ $(SUPPORT_OUTPUTDIR)/demos/image/nbproject/%: $(DEMO_SHARE_SRC)/nbproject/%
|
||||
ifeq ($(OPENJDK_TARGET_OS), solaris)
|
||||
TARGETS += $(patsubst $(DEMO_SHARE_SRC)/nbproject/%, \
|
||||
$(SUPPORT_OUTPUTDIR)/demos/image/nbproject/%, \
|
||||
$(call FindFiles, $(DEMO_SHARE_SRC)/nbproject))
|
||||
$(call CacheFind, $(DEMO_SHARE_SRC)/nbproject))
|
||||
else
|
||||
TARGETS += $(patsubst $(DEMO_SHARE_SRC)/nbproject/%, \
|
||||
$(SUPPORT_OUTPUTDIR)/demos/image/nbproject/%, \
|
||||
$(call FindFiles, $(DEMO_SHARE_SRC)/nbproject))
|
||||
$(call CacheFind, $(DEMO_SHARE_SRC)/nbproject))
|
||||
endif
|
||||
|
||||
################################################################################
|
||||
@@ -250,7 +250,7 @@ ifneq ($(filter images, $(MAKECMDGOALS)), )
|
||||
$(eval $(call SetupCopyFiles, COPY_TO_TEST_IMAGE, \
|
||||
SRC := $(SUPPORT_OUTPUTDIR)/demos/image, \
|
||||
DEST := $(TEST_IMAGE_DIR)/jdk/demos, \
|
||||
FILES := $(call FindFiles, $(SUPPORT_OUTPUTDIR)/demos/image), \
|
||||
FILES := $(call CacheFind, $(SUPPORT_OUTPUTDIR)/demos/image), \
|
||||
))
|
||||
|
||||
IMAGES_TARGETS := $(COPY_TO_TEST_IMAGE)
|
||||
|
||||
@@ -321,7 +321,7 @@ jdk.jshell_COPY += .jsh .properties
|
||||
|
||||
################################################################################
|
||||
|
||||
jdk.internal.le_COPY += .properties .caps .txt
|
||||
jdk.internal.le_COPY += .properties
|
||||
|
||||
################################################################################
|
||||
|
||||
@@ -644,7 +644,7 @@ endif
|
||||
|
||||
ifneq ($(wildcard $(IMPORT_MODULES_CLASSES)/$(MODULE)), )
|
||||
$(JDK_OUTPUTDIR)/modules/$(MODULE)/_imported.marker: \
|
||||
$(call FindFiles, $(IMPORT_MODULES_CLASSES)/$(MODULE))
|
||||
$(call CacheFind, $(IMPORT_MODULES_CLASSES)/$(MODULE))
|
||||
$(call MakeDir, $(@D))
|
||||
# Do not delete marker and build meta data files
|
||||
$(RM) -r $(filter-out $(@D)/_%, $(wildcard $(@D)/*))
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2018, 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
|
||||
@@ -39,6 +39,7 @@ $(eval $(call IncludeCustomExtension, CompileTools.gmk))
|
||||
# Use += to be able to add to this from a custom extension
|
||||
BUILD_TOOLS_SRC_DIRS += \
|
||||
$(TOPDIR)/make/jdk/src/classes \
|
||||
$(BUILDTOOLS_OUTPUTDIR)/interim_cldrconverter_classes \
|
||||
$(BUILDTOOLS_OUTPUTDIR)/interim_tzdb_classes \
|
||||
#
|
||||
|
||||
@@ -55,7 +56,6 @@ $(eval $(call SetupJavaCompilation,BUILD_TOOLS_JDK, \
|
||||
ADD_JAVAC_FLAGS := \
|
||||
--add-exports java.desktop/sun.awt=ALL-UNNAMED \
|
||||
--add-exports java.base/sun.text=ALL-UNNAMED \
|
||||
--add-exports java.base/sun.security.util=ALL-UNNAMED \
|
||||
, \
|
||||
))
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2015, 2016, 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
|
||||
@@ -35,7 +35,7 @@ LIBS_DIR := $(wildcard $(addsuffix /$(MODULE), $(IMPORT_MODULES_LIBS)))
|
||||
CMDS_DIR := $(wildcard $(addsuffix /$(MODULE), $(IMPORT_MODULES_CMDS)))
|
||||
CONF_DIR := $(wildcard $(addsuffix /$(MODULE), $(IMPORT_MODULES_CONF)))
|
||||
|
||||
$(call FillFindCache, $(LIBS_DIR) $(CMDS_DIR) $(CONF_DIR))
|
||||
$(eval $(call FillCacheFind, $(LIBS_DIR) $(CMDS_DIR) $(CONF_DIR)))
|
||||
|
||||
ifneq ($(LIBS_DIR), )
|
||||
ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
@@ -45,21 +45,21 @@ ifneq ($(LIBS_DIR), )
|
||||
SRC := $(LIBS_DIR), \
|
||||
DEST := $(JDK_OUTPUTDIR)/bin, \
|
||||
FILES := $(filter $(TO_BIN_FILTER), \
|
||||
$(call FindFiles, $(LIBS_DIR))) \
|
||||
$(call CacheFind, $(LIBS_DIR))) \
|
||||
))
|
||||
|
||||
$(eval $(call SetupCopyFiles, COPY_LIBS_TO_LIB, \
|
||||
SRC := $(LIBS_DIR), \
|
||||
DEST := $(JDK_OUTPUTDIR)/lib, \
|
||||
FILES := $(filter-out $(TO_BIN_FILTER), \
|
||||
$(call FindFiles, $(LIBS_DIR))) \
|
||||
$(call CacheFind, $(LIBS_DIR))) \
|
||||
))
|
||||
TARGETS += $(COPY_LIBS_TO_BIN) $(COPY_LIBS_TO_LIB)
|
||||
else
|
||||
$(eval $(call SetupCopyFiles, COPY_LIBS, \
|
||||
SRC := $(LIBS_DIR), \
|
||||
DEST := $(JDK_OUTPUTDIR)/lib, \
|
||||
FILES := $(filter %$(SHARED_LIBRARY_SUFFIX), $(call FindFiles, $(LIBS_DIR))), \
|
||||
FILES := $(filter %$(SHARED_LIBRARY_SUFFIX), $(call CacheFind, $(LIBS_DIR))), \
|
||||
))
|
||||
|
||||
# Use relative links if the import dir is inside the OUTPUTDIR, otherwise
|
||||
@@ -75,7 +75,7 @@ ifneq ($(LIBS_DIR), )
|
||||
$(eval $(call SetupCopyFiles, LINK_LIBS, \
|
||||
SRC := $(LIBS_DIR), \
|
||||
DEST := $(JDK_OUTPUTDIR)/lib, \
|
||||
FILES := $(filter-out %$(SHARED_LIBRARY_SUFFIX), $(call FindFiles, $(LIBS_DIR))), \
|
||||
FILES := $(filter-out %$(SHARED_LIBRARY_SUFFIX), $(call CacheFind, $(LIBS_DIR))), \
|
||||
MACRO := $(LINK_MACRO), \
|
||||
LOG_ACTION := $(LOG_ACTION), \
|
||||
))
|
||||
@@ -87,7 +87,7 @@ ifneq ($(CMDS_DIR), )
|
||||
$(eval $(call SetupCopyFiles, COPY_CMDS, \
|
||||
SRC := $(CMDS_DIR), \
|
||||
DEST := $(JDK_OUTPUTDIR)/bin, \
|
||||
FILES := $(call FindFiles, $(CMDS_DIR)), \
|
||||
FILES := $(call CacheFind, $(CMDS_DIR)), \
|
||||
))
|
||||
TARGETS += $(COPY_CMDS)
|
||||
endif
|
||||
@@ -96,7 +96,7 @@ ifneq ($(CONF_DIR), )
|
||||
$(eval $(call SetupCopyFiles, COPY_CONF, \
|
||||
SRC := $(CONF_DIR), \
|
||||
DEST := $(JDK_OUTPUTDIR)/lib, \
|
||||
FILES := $(call FindFiles, $(CONF_DIR)), \
|
||||
FILES := $(call CacheFind, $(CONF_DIR)), \
|
||||
))
|
||||
TARGETS += $(COPY_CONF)
|
||||
endif
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2015, 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
|
||||
@@ -23,34 +23,30 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
# This makefile creates an image of the optional static versions of certain JDK
|
||||
# libraries.
|
||||
|
||||
default: all
|
||||
|
||||
include $(SPEC)
|
||||
include MakeBase.gmk
|
||||
include Modules.gmk
|
||||
|
||||
ALL_MODULES = $(call FindAllModules)
|
||||
##########################################################################################
|
||||
|
||||
################################################################################
|
||||
### CLDRConverter needs the JRE time zone names from the java.base source.
|
||||
|
||||
TARGETS :=
|
||||
define cldrconverter_copytznames
|
||||
$(MKDIR) -p '$(@D)'
|
||||
$(RM) '$@'
|
||||
$(SED) -e "s/package sun.util.resources/package build.tools.cldrconverter/" \
|
||||
-e "s/extends TimeZoneNamesBundle//" \
|
||||
-e "s/protected final/static final/" \
|
||||
< $(<) > $@
|
||||
endef
|
||||
|
||||
$(foreach m, $(ALL_MODULES), \
|
||||
$(eval $(call SetupCopyFiles, COPY_STATIC_LIBS_$m, \
|
||||
FLATTEN := true, \
|
||||
SRC := $(SUPPORT_OUTPUTDIR)/native/$m, \
|
||||
DEST := $(STATIC_LIBS_IMAGE_DIR)/lib, \
|
||||
FILES := $(filter %$(STATIC_LIBRARY_SUFFIX), \
|
||||
$(call FindFiles, $(SUPPORT_OUTPUTDIR)/native/$m/*/static)), \
|
||||
)) \
|
||||
$(eval TARGETS += $$(COPY_STATIC_LIBS_$m)) \
|
||||
)
|
||||
$(eval $(call SetupCopyFiles,COPY_INTERIM_CLDRCONVERTER, \
|
||||
SRC := $(TOPDIR)/src/java.base/share/classes/sun/util/resources, \
|
||||
DEST := $(BUILDTOOLS_OUTPUTDIR)/interim_cldrconverter_classes/build/tools/cldrconverter, \
|
||||
FILES := TimeZoneNames.java, \
|
||||
MACRO := cldrconverter_copytznames))
|
||||
|
||||
##########################################################################################
|
||||
|
||||
################################################################################
|
||||
|
||||
all: $(TARGETS)
|
||||
|
||||
.PHONY: all
|
||||
all: $(COPY_INTERIM_CLDRCONVERTER)
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2015, 2016, 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
|
||||
@@ -39,7 +39,7 @@ MODULES_TO_COPY := $(sort \
|
||||
|
||||
COPY_CLASSES_TARGET := $(BUILDJDK_OUTPUTDIR)/jdk/modules/java.base/_the.buildjdk-copy-marker
|
||||
|
||||
$(COPY_CLASSES_TARGET): $(call FindFiles, $(wildcard \
|
||||
$(COPY_CLASSES_TARGET): $(call CacheFind, $(wildcard \
|
||||
$(addprefix $(JDK_OUTPUTDIR)/modules/, $(MODULES_TO_COPY))))
|
||||
$(ECHO) $(LOG_INFO) "Copying java modules to buildjdk: $(MODULES_TO_COPY)"
|
||||
$(RM) -r $(BUILDJDK_OUTPUTDIR)/jdk/modules
|
||||
@@ -56,7 +56,7 @@ TARGETS += $(COPY_CLASSES_TARGET)
|
||||
$(eval $(call SetupCopyFiles, COPY_SUPPORT_HEADERS, \
|
||||
SRC := $(OUTPUTDIR), \
|
||||
DEST := $(BUILDJDK_OUTPUTDIR), \
|
||||
FILES := $(call FindFiles, $(wildcard \
|
||||
FILES := $(call CacheFind, $(wildcard \
|
||||
$(addprefix $(SUPPORT_OUTPUTDIR)/headers/, $(MODULES_TO_COPY)))), \
|
||||
))
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#
|
||||
# Copyright (c) 2014, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2014, 2017, 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
|
||||
@@ -52,79 +51,33 @@ INCLUDE_HEADERS_DIR ?= $(firstword $(wildcard $(addsuffix /$(MODULE), \
|
||||
MAN_DIR ?= $(firstword $(wildcard $(addsuffix /$(MODULE), \
|
||||
$(SUPPORT_OUTPUTDIR)/modules_man $(IMPORT_MODULES_MAN))))
|
||||
|
||||
$(call FillFindCache, \
|
||||
$(eval $(call FillCacheFind, \
|
||||
$(LIBS_DIR) $(CMDS_DIR) $(CONF_DIR) $(CLASSES_DIR) \
|
||||
)
|
||||
))
|
||||
|
||||
ifneq ($(LIBS_DIR), )
|
||||
DEPS += $(call FindFiles, $(LIBS_DIR))
|
||||
ifeq ($(OPENJDK_TARGET_OS)+$(SHIP_DEBUG_SYMBOLS), windows+public)
|
||||
# For public debug symbols on Windows, we have to use stripped pdbs and rename them
|
||||
rename_stripped = $(patsubst %.stripped.pdb,%.pdb,$1)
|
||||
LIBS_DIR_FILTERED := $(subst modules_libs,modules_libs_filtered, $(LIBS_DIR))
|
||||
FILES_LIBS := $(filter-out %.pdb, $(call FindFiles, $(LIBS_DIR))) \
|
||||
$(filter %.stripped.pdb, $(call FindFiles, $(LIBS_DIR)))
|
||||
$(eval $(call SetupCopyFiles, COPY_FILTERED_LIBS, \
|
||||
SRC := $(LIBS_DIR), \
|
||||
DEST := $(LIBS_DIR_FILTERED), \
|
||||
FILES := $(FILES_LIBS), \
|
||||
NAME_MACRO := rename_stripped, \
|
||||
))
|
||||
DEPS += $(COPY_FILTERED_LIBS)
|
||||
JMOD_FLAGS += --libs $(LIBS_DIR_FILTERED)
|
||||
else
|
||||
JMOD_FLAGS += --libs $(LIBS_DIR)
|
||||
endif
|
||||
JMOD_FLAGS += --libs $(LIBS_DIR)
|
||||
DEPS += $(call CacheFind, $(LIBS_DIR))
|
||||
endif
|
||||
ifneq ($(CMDS_DIR), )
|
||||
DEPS += $(call FindFiles, $(CMDS_DIR))
|
||||
ifeq ($(OPENJDK_TARGET_OS)+$(SHIP_DEBUG_SYMBOLS), windows+public)
|
||||
# For public debug symbols on Windows, we have to use stripped pdbs, rename them
|
||||
# and filter out a few launcher pdbs where there's a lib that goes by the same name
|
||||
rename_stripped = $(patsubst %.stripped.pdb,%.pdb,$1)
|
||||
CMDS_DIR_FILTERED := $(subst modules_cmds,modules_cmds_filtered, $(CMDS_DIR))
|
||||
FILES_CMDS := $(filter-out %.pdb, $(call FindFiles, $(CMDS_DIR))) \
|
||||
$(filter-out %jimage.stripped.pdb %jpackage.stripped.pdb %java.stripped.pdb, \
|
||||
$(filter %.stripped.pdb, $(call FindFiles, $(CMDS_DIR))))
|
||||
$(eval $(call SetupCopyFiles, COPY_FILTERED_CMDS, \
|
||||
SRC := $(CMDS_DIR), \
|
||||
DEST := $(CMDS_DIR_FILTERED), \
|
||||
FILES := $(FILES_CMDS), \
|
||||
NAME_MACRO := rename_stripped, \
|
||||
))
|
||||
DEPS += $(COPY_FILTERED_CMDS)
|
||||
JMOD_FLAGS += --cmds $(CMDS_DIR_FILTERED)
|
||||
else ifeq ($(OPENJDK_TARGET_OS)+$(SHIP_DEBUG_SYMBOLS), windows+full)
|
||||
# For full debug symbols on Windows, we have to filter out a few launcher pdbs
|
||||
# where there's a lib that goes by the same name
|
||||
CMDS_DIR_FILTERED := $(subst modules_cmds,modules_cmds_filtered, $(CMDS_DIR))
|
||||
$(eval $(call SetupCopyFiles, COPY_FILTERED_CMDS, \
|
||||
SRC := $(CMDS_DIR), \
|
||||
DEST := $(CMDS_DIR_FILTERED), \
|
||||
FILES := $(filter-out %jimage.pdb %jpackage.pdb %java.pdb, \
|
||||
$(call FindFiles, $(CMDS_DIR))), \
|
||||
))
|
||||
DEPS += $(COPY_FILTERED_CMDS)
|
||||
JMOD_FLAGS += --cmds $(CMDS_DIR_FILTERED)
|
||||
else
|
||||
JMOD_FLAGS += --cmds $(CMDS_DIR)
|
||||
endif
|
||||
JMOD_FLAGS += --cmds $(CMDS_DIR)
|
||||
DEPS += $(call CacheFind, $(CMDS_DIR))
|
||||
endif
|
||||
ifneq ($(CONF_DIR), )
|
||||
JMOD_FLAGS += --config $(CONF_DIR)
|
||||
DEPS += $(call FindFiles, $(CONF_DIR))
|
||||
DEPS += $(call CacheFind, $(CONF_DIR))
|
||||
endif
|
||||
ifneq ($(CLASSES_DIR), )
|
||||
JMOD_FLAGS += --class-path $(CLASSES_DIR)
|
||||
DEPS += $(call FindFiles, $(CLASSES_DIR))
|
||||
DEPS += $(call CacheFind, $(CLASSES_DIR))
|
||||
endif
|
||||
ifneq ($(INCLUDE_HEADERS_DIR), )
|
||||
JMOD_FLAGS += --header-files $(INCLUDE_HEADERS_DIR)
|
||||
DEPS += $(call FindFiles, $(INCLUDE_HEADERS_DIR))
|
||||
DEPS += $(call CacheFind, $(INCLUDE_HEADERS_DIR))
|
||||
endif
|
||||
ifneq ($(MAN_DIR), )
|
||||
JMOD_FLAGS += --man-pages $(MAN_DIR)
|
||||
DEPS += $(call FindFiles, $(MAN_DIR))
|
||||
DEPS += $(call CacheFind, $(MAN_DIR))
|
||||
endif
|
||||
|
||||
# If a specific modules_legal dir exists for this module, only pick up files
|
||||
@@ -138,7 +91,7 @@ LEGAL_NOTICES := \
|
||||
)
|
||||
|
||||
LEGAL_NOTICES_PATH := $(call PathList, $(LEGAL_NOTICES))
|
||||
DEPS += $(call FindFiles, $(LEGAL_NOTICES))
|
||||
DEPS += $(call CacheFind, $(LEGAL_NOTICES))
|
||||
|
||||
JMOD_FLAGS += --legal-notices $(LEGAL_NOTICES_PATH)
|
||||
|
||||
@@ -192,7 +145,7 @@ endif
|
||||
# the actual command. Filter that out using wildcard before adding to DEPS.
|
||||
DEPS += $(wildcard $(JMOD_CMD))
|
||||
ifeq ($(EXTERNAL_BUILDJDK), false)
|
||||
DEPS += $(call FindFiles, $(JDK_OUTPUTDIR)/modules/jdk.jlink/jdk/tools/jmod)
|
||||
DEPS += $(call CacheFind, $(JDK_OUTPUTDIR)/modules/jdk.jlink/jdk/tools/jmod)
|
||||
endif
|
||||
|
||||
# If creating interim versions of jmods, certain files need to be filtered out
|
||||
@@ -201,15 +154,7 @@ ifeq ($(INTERIM_JMOD), true)
|
||||
DEPS := $(filter-out $(SUPPORT_OUTPUTDIR)/modules_libs/java.base/classlist, $(DEPS))
|
||||
endif
|
||||
|
||||
ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
ifeq ($(SHIP_DEBUG_SYMBOLS), )
|
||||
JMOD_FLAGS += --exclude '**{_the.*,_*.marker,*.diz,*.pdb,*.map}'
|
||||
else
|
||||
JMOD_FLAGS += --exclude '**{_the.*,_*.marker,*.diz,*.map}'
|
||||
endif
|
||||
else
|
||||
JMOD_FLAGS += --exclude '**{_the.*,_*.marker,*.diz,*.debuginfo,*.dSYM/**,*.dSYM}'
|
||||
endif
|
||||
JMOD_FLAGS += --exclude '**{_the.*,_*.marker,*.diz,*.debuginfo,*.dSYM/**,*.dSYM,*.pdb,*.map}'
|
||||
|
||||
# Create jmods in a temp dir and then move them into place to keep the
|
||||
# module path in $(IMAGES_OUTPUTDIR)/jmods valid at all times.
|
||||
|
||||
@@ -168,6 +168,14 @@ JAVADOC_TOP := \
|
||||
font-family: DejaVu Sans, Arial, Helvetica, sans-serif; \
|
||||
font-weight: normal;">$(DRAFT_TEXT)</div>
|
||||
|
||||
JDK_INDEX_CONTENT := \
|
||||
<!DOCTYPE html> \
|
||||
<html lang="en"> \
|
||||
<head> \
|
||||
<meta http-equiv="refresh" content="0;url=api/index.html"> \
|
||||
</head> \
|
||||
</html>
|
||||
|
||||
################################################################################
|
||||
# JDK javadoc titles/text snippets
|
||||
|
||||
@@ -333,7 +341,7 @@ define SetupApiDocsGenerationBody
|
||||
$$(SUPPORT_OUTPUTDIR)/docs/$1.vardeps)
|
||||
|
||||
# Get a list of all files in all the source dirs for all included modules
|
||||
$1_SOURCE_DEPS := $$(call FindFiles, $$(wildcard $$(foreach module, \
|
||||
$1_SOURCE_DEPS := $$(call CacheFind, $$(wildcard $$(foreach module, \
|
||||
$$($1_ALL_MODULES), $$(call FindModuleSrcDirs, $$(module)))))
|
||||
|
||||
# Javadoc creates a lot of files but use index.html as a marker
|
||||
@@ -477,11 +485,18 @@ $(eval $(call SetupApiDocsGeneration, REFERENCE_API, \
|
||||
|
||||
################################################################################
|
||||
|
||||
# Copy the global resources, including the top-level redirect index.html
|
||||
JDK_INDEX_HTML := $(DOCS_OUTPUTDIR)/index.html
|
||||
|
||||
$(JDK_INDEX_HTML):
|
||||
$(ECHO) '$(JDK_INDEX_CONTENT)' > $@
|
||||
|
||||
JDK_INDEX_TARGETS += $(JDK_INDEX_HTML)
|
||||
|
||||
# Copy the global resources
|
||||
GLOBAL_SPECS_RESOURCES_DIR := $(TOPDIR)/make/data/docs-resources/
|
||||
$(eval $(call SetupCopyFiles, COPY_GLOBAL_RESOURCES, \
|
||||
SRC := $(GLOBAL_SPECS_RESOURCES_DIR), \
|
||||
FILES := $(call FindFiles, $(GLOBAL_SPECS_RESOURCES_DIR)), \
|
||||
FILES := $(call CacheFind, $(GLOBAL_SPECS_RESOURCES_DIR)), \
|
||||
DEST := $(DOCS_OUTPUTDIR), \
|
||||
))
|
||||
JDK_INDEX_TARGETS += $(COPY_GLOBAL_RESOURCES)
|
||||
@@ -506,10 +521,10 @@ COPY_SPEC_FILTER := %.html %.gif %.jpg %.mib %.css
|
||||
$(foreach m, $(ALL_MODULES), \
|
||||
$(eval SPECS_$m := $(call FindModuleSpecsDirs, $m)) \
|
||||
$(foreach d, $(SPECS_$m), \
|
||||
$(if $(filter $(COPY_SPEC_FILTER), $(call FindFiles, $d)), \
|
||||
$(if $(filter $(COPY_SPEC_FILTER), $(call CacheFind, $d)), \
|
||||
$(eval $(call SetupCopyFiles, COPY_$m, \
|
||||
SRC := $d, \
|
||||
FILES := $(filter $(COPY_SPEC_FILTER), $(call FindFiles, $d)), \
|
||||
FILES := $(filter $(COPY_SPEC_FILTER), $(call CacheFind, $d)), \
|
||||
DEST := $(DOCS_OUTPUTDIR)/specs/, \
|
||||
)) \
|
||||
$(eval JDK_SPECS_TARGETS += $(COPY_$m)) \
|
||||
@@ -526,11 +541,11 @@ ifeq ($(ENABLE_FULL_DOCS), true)
|
||||
$(foreach m, $(ALL_MODULES), \
|
||||
$(eval SPECS_$m := $(call FindModuleSpecsDirs, $m)) \
|
||||
$(foreach d, $(SPECS_$m), \
|
||||
$(if $(filter %.md, $(call FindFiles, $d)), \
|
||||
$(if $(filter %.md, $(call CacheFind, $d)), \
|
||||
$(eval $m_$d_NAME := CONVERT_MARKDOWN_$m_$(strip $(call RelativePath, $d, $(TOPDIR)))) \
|
||||
$(eval $(call SetupProcessMarkdown, $($m_$d_NAME), \
|
||||
SRC := $d, \
|
||||
FILES := $(filter %.md, $(call FindFiles, $d)), \
|
||||
FILES := $(filter %.md, $(call CacheFind, $d)), \
|
||||
DEST := $(DOCS_OUTPUTDIR)/specs/, \
|
||||
CSS := $(GLOBAL_SPECS_DEFAULT_CSS_FILE), \
|
||||
)) \
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2016, 2018, 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
|
||||
@@ -84,17 +84,6 @@ $(eval $(call SetupCopyFiles, COPY_CLASSLIST, \
|
||||
|
||||
TARGETS += $(COPY_CLASSLIST)
|
||||
|
||||
# In case of shipping public debug symbols on windows, there is another temporary
|
||||
# location from where jmods are compiled - need to deploy classlist there, too.
|
||||
ifeq ($(OPENJDK_TARGET_OS)+$(SHIP_DEBUG_SYMBOLS), windows+public)
|
||||
$(eval $(call SetupCopyFiles, COPY_CLASSLIST_TO_FILTERED, \
|
||||
FILES := $(CLASSLIST_FILE), \
|
||||
DEST := $(SUPPORT_OUTPUTDIR)/modules_libs_filtered/java.base, \
|
||||
))
|
||||
|
||||
TARGETS += $(COPY_CLASSLIST_TO_FILTERED)
|
||||
endif
|
||||
|
||||
# Copy the default_jli_trace.txt file into jdk.jlink
|
||||
$(eval $(call SetupCopyFiles, COPY_JLI_TRACE, \
|
||||
FILES := $(JLI_TRACE_FILE), \
|
||||
|
||||
@@ -81,9 +81,7 @@ ifneq ($(MOD_FILES), )
|
||||
$(call DependOnVariable, ALL_MODULES)
|
||||
$(MKDIR) -p $(@D)
|
||||
$(RM) $@ $@.tmp
|
||||
$(TOOL_GENMODULEINFOSOURCE) \
|
||||
$(if $(call equals, $(ALLOW_ABSOLUTE_PATHS_IN_OUTPUT), true), -d) \
|
||||
-o $@.tmp \
|
||||
$(TOOL_GENMODULEINFOSOURCE) -o $@.tmp \
|
||||
--source-file $< \
|
||||
--modules $(call CommaList, $(ALL_MODULES)) \
|
||||
$(MOD_FILES)
|
||||
@@ -1,57 +0,0 @@
|
||||
#
|
||||
# Copyright (c) 2020, Red Hat Inc.
|
||||
# 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. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
# This makefile creates a jdk image overlayed with statically linked core
|
||||
# libraries.
|
||||
|
||||
default: all
|
||||
|
||||
include $(SPEC)
|
||||
include MakeBase.gmk
|
||||
|
||||
################################################################################
|
||||
|
||||
TARGETS :=
|
||||
|
||||
$(eval $(call SetupCopyFiles, COPY_JDK_IMG, \
|
||||
SRC := $(JDK_IMAGE_DIR)/, \
|
||||
DEST := $(GRAAL_BUILDER_IMAGE_DIR)/, \
|
||||
FILES := $(call FindFiles, $(JDK_IMAGE_DIR)/), \
|
||||
))
|
||||
TARGETS += $(COPY_JDK_IMG)
|
||||
|
||||
$(eval $(call SetupCopyFiles, COPY_STATIC_LIBS, \
|
||||
SRC := $(STATIC_LIBS_IMAGE_DIR)/lib, \
|
||||
DEST := $(GRAAL_BUILDER_IMAGE_DIR)/lib, \
|
||||
FILES := $(filter %$(STATIC_LIBRARY_SUFFIX), \
|
||||
$(call FindFiles, $(STATIC_LIBS_IMAGE_DIR)/lib)), \
|
||||
))
|
||||
TARGETS += $(COPY_STATIC_LIBS)
|
||||
|
||||
################################################################################
|
||||
|
||||
all: $(TARGETS)
|
||||
|
||||
.PHONY: all
|
||||
@@ -43,7 +43,7 @@ help:
|
||||
$(info $(_) make images # Create a complete jdk image)
|
||||
$(info $(_) # (alias for product-images))
|
||||
$(info $(_) make <name>-image # Build just the image for any of: )
|
||||
$(info $(_) # jdk, test, docs, symbols, legacy-jre, static-libs)
|
||||
$(info $(_) # jdk, test, docs, symbols, legacy-jre)
|
||||
$(info $(_) make <phase> # Build the specified phase and everything it depends on)
|
||||
$(info $(_) # (gensrc, java, copy, libs, launchers, gendata, rmic))
|
||||
$(info $(_) make *-only # Applies to most targets and disables building the)
|
||||
@@ -119,7 +119,7 @@ print-configurations:
|
||||
run-test-prebuilt:
|
||||
@( cd $(topdir) && \
|
||||
$(MAKE) --no-print-directory -r -R -I make/common/ -f make/RunTestsPrebuilt.gmk \
|
||||
run-test-prebuilt CUSTOM_MAKE_DIR=$(CUSTOM_MAKE_DIR) TEST="$(TEST)" )
|
||||
run-test-prebuilt TEST="$(TEST)" )
|
||||
|
||||
ALL_GLOBAL_TARGETS := help print-configurations run-test-prebuilt
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2014, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2014, 2018, 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
|
||||
@@ -276,14 +276,21 @@ endif
|
||||
|
||||
ifeq ($(GCOV_ENABLED), true)
|
||||
|
||||
$(eval $(call SetupCopyFiles,COPY_GCOV_GCNO, \
|
||||
GCOV_FIND_EXPR := -type f -name "*.gcno"
|
||||
|
||||
$(eval $(call SetupCopyFiles,COPY_HOTSPOT_GCOV_GCNO, \
|
||||
SRC := $(OUTPUTDIR), \
|
||||
DEST := $(SYMBOLS_IMAGE_DIR)/gcov, \
|
||||
FILES := $(call FindFiles, $(HOTSPOT_OUTPUTDIR) \
|
||||
$(SUPPORT_OUTPUTDIR)/native, *.gcno) \
|
||||
))
|
||||
FILES := $(shell $(FIND) $(HOTSPOT_OUTPUTDIR) $(GCOV_FIND_EXPR))))
|
||||
|
||||
SYMBOLS_TARGETS += $(COPY_GCOV_GCNO)
|
||||
SYMBOLS_TARGETS += $(COPY_HOTSPOT_GCOV_GCNO)
|
||||
|
||||
$(eval $(call SetupCopyFiles,COPY_JDK_GCOV_GCNO, \
|
||||
SRC := $(OUTPUTDIR), \
|
||||
DEST := $(SYMBOLS_IMAGE_DIR)/gcov, \
|
||||
FILES := $(shell $(FIND) $(SUPPORT_OUTPUTDIR)/native $(GCOV_FIND_EXPR))))
|
||||
|
||||
SYMBOLS_TARGETS += $(COPY_JDK_GCOV_GCNO)
|
||||
|
||||
endif
|
||||
|
||||
@@ -301,7 +308,6 @@ ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
else
|
||||
LIBS_TARGET_SUBDIR := lib
|
||||
endif
|
||||
CMDS_TARGET_SUBDIR := bin
|
||||
|
||||
# Param 1 - dir to find debuginfo files in
|
||||
FindDebuginfoFiles = \
|
||||
@@ -317,16 +323,13 @@ else
|
||||
# On Macosx, if debug symbols have not been zipped, find all files inside *.dSYM
|
||||
# dirs.
|
||||
ifeq ($(OPENJDK_TARGET_OS), macosx)
|
||||
$(call FillFindCache, \
|
||||
$(SUPPORT_OUTPUTDIR)/modules_libs $(SUPPORT_OUTPUTDIR)/modules_cmds)
|
||||
$(eval $(call FillCacheFind, \
|
||||
$(SUPPORT_OUTPUTDIR)/modules_cmds $(SUPPORT_OUTPUTDIR)/modules_libs))
|
||||
FindDebuginfoFiles = \
|
||||
$(if $(wildcard $1), $(call containing, .dSYM/, $(call FindFiles, $1)))
|
||||
$(if $(wildcard $1), $(call containing, .dSYM/, $(call CacheFind, $1)))
|
||||
endif
|
||||
endif
|
||||
|
||||
FILTERED_PDBS := %jimage.stripped.pdb %jpackage.stripped.pdb %java.stripped.pdb \
|
||||
%jimage.pdb %jpackage.pdb %java.pdb %jimage.map %jpackage.map %java.map
|
||||
|
||||
# Param 1 - either JDK or JRE
|
||||
SetupCopyDebuginfo = \
|
||||
$(foreach m, $(ALL_$1_MODULES), \
|
||||
@@ -337,13 +340,6 @@ SetupCopyDebuginfo = \
|
||||
$(SUPPORT_OUTPUTDIR)/modules_libs/$m), \
|
||||
)) \
|
||||
$(eval $1_TARGETS += $$(COPY_$1_LIBS_DEBUGINFO_$m)) \
|
||||
$(eval $(call SetupCopyFiles, COPY_$1_CMDS_DEBUGINFO_$m, \
|
||||
SRC := $(SUPPORT_OUTPUTDIR)/modules_cmds/$m, \
|
||||
DEST := $($1_IMAGE_DIR)/$(CMDS_TARGET_SUBDIR), \
|
||||
FILES := $(filter-out $(FILTERED_PDBS), $(call FindDebuginfoFiles, \
|
||||
$(SUPPORT_OUTPUTDIR)/modules_cmds/$m)), \
|
||||
)) \
|
||||
$(eval $1_TARGETS += $$(COPY_$1_CMDS_DEBUGINFO_$m)) \
|
||||
)
|
||||
|
||||
# No space before argument to avoid having to put $(strip ) everywhere in
|
||||
|
||||
@@ -1,80 +0,0 @@
|
||||
#
|
||||
# Copyright 2000-2021 JetBrains s.r.o.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
include $(SPEC)
|
||||
include MakeBase.gmk
|
||||
include JavaCompilation.gmk
|
||||
include SetupJavaCompilers.gmk
|
||||
|
||||
JBR_API_ROOT_DIR := $(TOPDIR)/src/jetbrains.api
|
||||
JBR_API_GENSRC_TEMPLATES := $(JBR_API_ROOT_DIR)/templates
|
||||
JBR_API_SRC_DIR := $(JBR_API_ROOT_DIR)/src
|
||||
JBR_API_OUTPUT_DIR := $(OUTPUTDIR)/jbr-api
|
||||
JBR_API_GENSRC_DIR := $(JBR_API_OUTPUT_DIR)/gensrc
|
||||
JBR_API_BIN_DIR := $(JBR_API_OUTPUT_DIR)/bin
|
||||
JBR_API_VERSION_PROPERTIES := $(JBR_API_ROOT_DIR)/version.properties
|
||||
|
||||
JBR_API_GENSRC_SOURCES := $(call FindFiles, $(JBR_API_GENSRC_TEMPLATES))
|
||||
JBR_API_GENSRC_FILES := $(JBR_API_GENSRC_DIR)/com/jetbrains/JBR.java
|
||||
JBR_API_SRC_FILES := $(call FindFiles, $(JBR_API_SRC_DIR))
|
||||
|
||||
ifeq ($(JBR_API_JBR_VERSION),)
|
||||
JBR_API_JBR_VERSION := <DEVELOPMENT>
|
||||
JBR_API_FAIL_ON_HASH_MISMATCH := false
|
||||
else
|
||||
.PHONY: $(JBR_API_VERSION_PROPERTIES)
|
||||
JBR_API_FAIL_ON_HASH_MISMATCH := true
|
||||
endif
|
||||
|
||||
ARCHIVE_BUILD_JBR_API_BIN := $(JBR_API_BIN_DIR)
|
||||
$(eval $(call SetupJavaCompilation, BUILD_JBR_API, \
|
||||
SETUP := BOOT_JAVAC, \
|
||||
SRC := $(JBR_API_GENSRC_DIR) $(JBR_API_SRC_DIR), \
|
||||
EXTRA_FILES := $(JBR_API_GENSRC_FILES), \
|
||||
DEPENDS := $(JBR_API_GENSRC_FILES), \
|
||||
BIN := $(JBR_API_BIN_DIR), \
|
||||
JAR := $(JBR_API_OUTPUT_DIR)/jbr-api.jar, \
|
||||
))
|
||||
|
||||
$(eval $(call SetupJarArchive, BUILD_JBR_API_SOURCES_JAR, \
|
||||
DEPENDENCIES := $(JBR_API_GENSRC_FILES) $(JBR_API_SRC_FILES), \
|
||||
SRCS := $(JBR_API_GENSRC_DIR) $(JBR_API_SRC_DIR), \
|
||||
JAR := $(JBR_API_OUTPUT_DIR)/jbr-api-sources.jar, \
|
||||
SUFFIXES := .java, \
|
||||
BIN := $(JBR_API_BIN_DIR), \
|
||||
))
|
||||
|
||||
$(JBR_API_GENSRC_FILES): $(JBR_API_GENSRC_SOURCES) $(JBR_API_SRC_FILES) $(JBR_API_VERSION_PROPERTIES)
|
||||
$(ECHO) Generating sources for JBR API
|
||||
$(JAVA_CMD) $(JAVA_FLAGS_SMALL) "$(JBR_API_GENSRC_TEMPLATES)/Gensrc.java" \
|
||||
"$(TOPDIR)/src" "$(JBR_API_OUTPUT_DIR)" "$(JBR_API_JBR_VERSION)"
|
||||
|
||||
jbr-api-check-version: $(JBR_API_GENSRC_FILES) $(JBR_API_SRC_FILES) $(JBR_API_VERSION_PROPERTIES)
|
||||
$(JAVA_CMD) $(JAVA_FLAGS_SMALL) "$(JBR_API_GENSRC_TEMPLATES)/CheckVersion.java" \
|
||||
"$(JBR_API_ROOT_DIR)" "$(JBR_API_GENSRC_DIR)" "$(JBR_API_FAIL_ON_HASH_MISMATCH)"
|
||||
|
||||
jbr-api: $(BUILD_JBR_API) $(BUILD_JBR_API_SOURCES_JAR) jbr-api-check-version
|
||||
|
||||
.PHONY: jbr-api jbr-api-check-version
|
||||
|
||||
ifneq ($(JBR_API_CONF_FILE),)
|
||||
$(JBR_API_CONF_FILE): $(JBR_API_GENSRC_FILES)
|
||||
$(ECHO) "VERSION=`$(CAT) $(JBR_API_OUTPUT_DIR)/jbr-api.version`" > $(JBR_API_CONF_FILE)
|
||||
$(ECHO) "JAR=$(JBR_API_OUTPUT_DIR)/jbr-api.jar" >> $(JBR_API_CONF_FILE)
|
||||
$(ECHO) "SOURCES_JAR=$(JBR_API_OUTPUT_DIR)/jbr-api-sources.jar" >> $(JBR_API_CONF_FILE)
|
||||
jbr-api: $(JBR_API_CONF_FILE)
|
||||
.PHONY: $(JBR_API_CONF_FILE)
|
||||
endif
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2017, 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
|
||||
@@ -52,24 +52,26 @@ ifeq ($(OPENJDK_TARGET_OS), macosx)
|
||||
$(eval $(call SetupCopyFiles, COPY_JDK_IMAGE, \
|
||||
SRC := $(JDK_IMAGE_DIR), \
|
||||
DEST := $(JDK_MACOSX_CONTENTS_DIR)/Home, \
|
||||
FILES := $(call FindFiles, $(JDK_IMAGE_DIR)), \
|
||||
FILES := $(call CacheFind, $(JDK_IMAGE_DIR)), \
|
||||
))
|
||||
|
||||
$(eval $(call SetupCopyFiles, COPY_JRE_IMAGE, \
|
||||
SRC := $(JRE_IMAGE_DIR), \
|
||||
DEST := $(JRE_MACOSX_CONTENTS_DIR)/Home, \
|
||||
FILES := $(call FindFiles, $(JRE_IMAGE_DIR)), \
|
||||
FILES := $(call CacheFind, $(JRE_IMAGE_DIR)), \
|
||||
))
|
||||
|
||||
$(eval $(call SetupCopyFiles, COPY_LIBJLI_JDK, \
|
||||
FILES := $(JDK_IMAGE_DIR)/lib/jli/libjli.dylib, \
|
||||
DEST := $(JDK_MACOSX_CONTENTS_DIR)/MacOS, \
|
||||
))
|
||||
$(JDK_MACOSX_CONTENTS_DIR)/MacOS/libjli.dylib:
|
||||
$(call LogInfo, Creating link $(patsubst $(OUTPUTDIR)/%,%,$@))
|
||||
$(MKDIR) -p $(@D)
|
||||
$(RM) $@
|
||||
$(LN) -s ../Home/lib/jli/libjli.dylib $@
|
||||
|
||||
$(eval $(call SetupCopyFiles, COPY_LIBJLI_JRE, \
|
||||
FILES := $(JRE_IMAGE_DIR)/lib/jli/libjli.dylib, \
|
||||
DEST := $(JRE_MACOSX_CONTENTS_DIR)/MacOS, \
|
||||
))
|
||||
$(JRE_MACOSX_CONTENTS_DIR)/MacOS/libjli.dylib:
|
||||
$(call LogInfo, Creating link $(patsubst $(OUTPUTDIR)/%,%,$@))
|
||||
$(MKDIR) -p $(@D)
|
||||
$(RM) $@
|
||||
$(LN) -s ../Home/lib/jli/libjli.dylib $@
|
||||
|
||||
$(eval $(call SetupTextFileProcessing, BUILD_JDK_PLIST, \
|
||||
SOURCE_FILES := $(MACOSX_PLIST_SRC)/JDK-Info.plist, \
|
||||
@@ -95,19 +97,13 @@ ifeq ($(OPENJDK_TARGET_OS), macosx)
|
||||
@@VENDOR@@ => $(BUNDLE_VENDOR) , \
|
||||
))
|
||||
|
||||
$(SUPPORT_OUTPUTDIR)/images/_jdk_bundle_attribute_set: $(COPY_JDK_IMAGE)
|
||||
jdk-bundle: $(COPY_JDK_IMAGE) $(JDK_MACOSX_CONTENTS_DIR)/MacOS/libjli.dylib \
|
||||
$(BUILD_JDK_PLIST)
|
||||
$(SETFILE) -a B $(dir $(JDK_MACOSX_CONTENTS_DIR))
|
||||
$(TOUCH) $@
|
||||
|
||||
$(SUPPORT_OUTPUTDIR)/images/_jre_bundle_attribute_set: $(COPY_JRE_IMAGE)
|
||||
jre-bundle: $(COPY_JRE_IMAGE) $(JRE_MACOSX_CONTENTS_DIR)/MacOS/libjli.dylib \
|
||||
$(BUILD_JRE_PLIST)
|
||||
$(SETFILE) -a B $(dir $(JRE_MACOSX_CONTENTS_DIR))
|
||||
$(TOUCH) $@
|
||||
|
||||
jdk-bundle: $(COPY_JDK_IMAGE) $(COPY_LIBJLI_JDK) \
|
||||
$(BUILD_JDK_PLIST) $(SUPPORT_OUTPUTDIR)/images/_jdk_bundle_attribute_set
|
||||
|
||||
jre-bundle: $(COPY_JRE_IMAGE) $(COPY_LIBJLI_JRE) \
|
||||
$(BUILD_JRE_PLIST) $(SUPPORT_OUTPUTDIR)/images/_jre_bundle_attribute_set
|
||||
|
||||
else # Not macosx
|
||||
|
||||
|
||||
177
make/Main.gmk
177
make/Main.gmk
@@ -1,5 +1,5 @@
|
||||
|
||||
# Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
#
|
||||
# Copyright (c) 2011, 2018, 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
|
||||
@@ -78,9 +78,13 @@ ifneq ($(CREATING_BUILDJDK), true)
|
||||
interim-rmic:
|
||||
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CompileInterimRmic.gmk)
|
||||
|
||||
interim-tzdb:
|
||||
interim-cldrconverter:
|
||||
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CopyInterimCLDRConverter.gmk)
|
||||
|
||||
interim-tzdb:
|
||||
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CopyInterimTZDB.gmk)
|
||||
|
||||
|
||||
buildtools-jdk:
|
||||
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CompileToolsJdk.gmk)
|
||||
|
||||
@@ -92,7 +96,7 @@ ifneq ($(CREATING_BUILDJDK), true)
|
||||
endif
|
||||
|
||||
ALL_TARGETS += buildtools-langtools interim-langtools \
|
||||
interim-rmic interim-tzdb buildtools-jdk buildtools-modules \
|
||||
interim-rmic interim-cldrconverter interim-tzdb buildtools-jdk buildtools-modules \
|
||||
buildtools-hotspot
|
||||
|
||||
################################################################################
|
||||
@@ -136,7 +140,7 @@ ifneq ($(CREATING_BUILDJDK), true)
|
||||
define DeclareModuleInfoRecipe
|
||||
$1-gensrc-moduleinfo:
|
||||
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) \
|
||||
-f gensrc/GensrcModuleInfo.gmk MODULE=$1)
|
||||
-f GensrcModuleInfo.gmk MODULE=$1)
|
||||
|
||||
$1-gensrc: $1-gensrc-moduleinfo
|
||||
endef
|
||||
@@ -221,21 +225,6 @@ $(eval $(call DeclareRecipesForPhase, LIBS, \
|
||||
|
||||
ALL_TARGETS += $(LIBS_TARGETS)
|
||||
|
||||
################################################################################
|
||||
# Targets for compiling static versions of certain native libraries. These do
|
||||
# not end up in the jmods or the normal JDK image, but are instead bundled into
|
||||
# a special deliverable.
|
||||
$(eval $(call DeclareRecipesForPhase, STATIC_LIBS, \
|
||||
TARGET_SUFFIX := static-libs, \
|
||||
FILE_PREFIX := Lib, \
|
||||
MAKE_SUBDIR := lib, \
|
||||
CHECK_MODULES := $(ALL_MODULES), \
|
||||
USE_WRAPPER := true, \
|
||||
EXTRA_ARGS := STATIC_LIBS=true, \
|
||||
))
|
||||
|
||||
ALL_TARGETS += $(STATIC_LIBS_TARGETS)
|
||||
|
||||
################################################################################
|
||||
# Targets for compiling native executables
|
||||
$(eval $(call DeclareRecipesForPhase, LAUNCHER, \
|
||||
@@ -277,52 +266,6 @@ hotspot-ide-project:
|
||||
ALL_TARGETS += $(HOTSPOT_VARIANT_TARGETS) $(HOTSPOT_VARIANT_GENSRC_TARGETS) \
|
||||
$(HOTSPOT_VARIANT_LIBS_TARGETS) hotspot-ide-project
|
||||
|
||||
################################################################################
|
||||
# Generate libs and launcher targets for creating compile_commands.json fragments
|
||||
define DeclareCompileCommandsRecipe
|
||||
$1-compile-commands:
|
||||
$$(call LogInfo, Generating compile_commands.json fragments for $1)
|
||||
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f Main.gmk $1-only \
|
||||
GENERATE_COMPILE_COMMANDS_ONLY=true)
|
||||
|
||||
COMPILE_COMMANDS_TARGETS_$2 += $1-compile-commands
|
||||
endef
|
||||
|
||||
$(foreach t, $(HOTSPOT_VARIANT_LIBS_TARGETS), \
|
||||
$(eval $(call DeclareCompileCommandsRecipe,$t,HOTSPOT)) \
|
||||
)
|
||||
|
||||
$(foreach t, $(LIBS_TARGETS) $(LAUNCHER_TARGETS), \
|
||||
$(eval $(call DeclareCompileCommandsRecipe,$t,JDK)) \
|
||||
)
|
||||
|
||||
compile-commands compile-commands-hotspot:
|
||||
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CompileCommands.gmk)
|
||||
|
||||
ALL_TARGETS += $(COMPILE_COMMANDS_TARGETS_HOTSPOT) $(COMPILE_COMMANDS_TARGETS_JDK)
|
||||
ALL_TARGETS += compile-commands compile-commands-hotspot
|
||||
|
||||
################################################################################
|
||||
# VS Code projects
|
||||
vscode-project:
|
||||
+($(CD) $(TOPDIR)/make/vscode && $(MAKE) $(MAKE_ARGS) -f CreateVSCodeProject.gmk \
|
||||
VSCODE_INDEXER=cpptools)
|
||||
|
||||
vscode-project-clangd:
|
||||
+($(CD) $(TOPDIR)/make/vscode && $(MAKE) $(MAKE_ARGS) -f CreateVSCodeProject.gmk \
|
||||
VSCODE_INDEXER=clangd)
|
||||
|
||||
vscode-project-rtags:
|
||||
+($(CD) $(TOPDIR)/make/vscode && $(MAKE) $(MAKE_ARGS) -f CreateVSCodeProject.gmk \
|
||||
VSCODE_INDEXER=rtags)
|
||||
|
||||
vscode-project-ccls:
|
||||
+($(CD) $(TOPDIR)/make/vscode && $(MAKE) $(MAKE_ARGS) -f CreateVSCodeProject.gmk \
|
||||
VSCODE_INDEXER=ccls)
|
||||
|
||||
ALL_TARGETS += vscode-project vscode-project-clangd vscode-project-rtags \
|
||||
vscode-project-ccls
|
||||
|
||||
################################################################################
|
||||
# Build demos targets
|
||||
|
||||
@@ -395,9 +338,6 @@ legacy-jre-image:
|
||||
symbols-image:
|
||||
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f Images.gmk symbols)
|
||||
|
||||
static-libs-image:
|
||||
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f StaticLibsImage.gmk)
|
||||
|
||||
mac-jdk-bundle:
|
||||
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f MacBundles.gmk jdk-bundle)
|
||||
|
||||
@@ -410,13 +350,10 @@ release-file:
|
||||
exploded-image-optimize:
|
||||
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f ExplodedImageOptimize.gmk)
|
||||
|
||||
graal-builder-image:
|
||||
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f GraalBuilderImage.gmk)
|
||||
|
||||
ALL_TARGETS += store-source-revision create-source-revision-tracker bootcycle-images zip-security \
|
||||
zip-source jrtfs-jar jdk-image legacy-jre-image \
|
||||
symbols-image static-libs-image mac-jdk-bundle mac-legacy-jre-bundle \
|
||||
release-file exploded-image-optimize graal-builder-image
|
||||
symbols-image mac-jdk-bundle mac-legacy-jre-bundle \
|
||||
release-file exploded-image-optimize
|
||||
|
||||
################################################################################
|
||||
# Docs targets
|
||||
@@ -626,12 +563,8 @@ test-jdk-jtreg-native:
|
||||
test-make:
|
||||
($(CD) $(TOPDIR)/test/make && $(MAKE) $(MAKE_ARGS) -f TestMake.gmk $(TEST_TARGET))
|
||||
|
||||
test-compile-commands:
|
||||
($(CD) $(TOPDIR)/test/make && $(MAKE) $(MAKE_ARGS) -f TestMake.gmk test-compile-commands)
|
||||
|
||||
ALL_TARGETS += test test-hotspot-jtreg test-hotspot-jtreg-native \
|
||||
test-hotspot-internal test-hotspot-gtest test-jdk-jtreg-native test-make \
|
||||
test-compile-commands
|
||||
test-hotspot-internal test-hotspot-gtest test-jdk-jtreg-native test-make
|
||||
|
||||
################################################################################
|
||||
# Bundles
|
||||
@@ -648,11 +581,7 @@ test-bundles:
|
||||
docs-bundles:
|
||||
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f Bundles.gmk docs-bundles)
|
||||
|
||||
static-libs-bundles:
|
||||
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f Bundles.gmk static-libs-bundles)
|
||||
|
||||
ALL_TARGETS += product-bundles legacy-bundles test-bundles docs-bundles \
|
||||
static-libs-bundles
|
||||
ALL_TARGETS += product-bundles legacy-bundles test-bundles docs-bundles
|
||||
|
||||
################################################################################
|
||||
# Install targets
|
||||
@@ -685,7 +614,7 @@ else
|
||||
|
||||
interim-langtools: $(INTERIM_LANGTOOLS_GENSRC_TARGETS)
|
||||
|
||||
buildtools-jdk: interim-langtools interim-tzdb
|
||||
buildtools-jdk: interim-langtools interim-cldrconverter interim-tzdb
|
||||
|
||||
buildtools-hotspot: interim-langtools
|
||||
|
||||
@@ -707,7 +636,7 @@ else
|
||||
|
||||
# Declare dependencies between hotspot-<variant>* targets
|
||||
$(foreach v, $(JVM_VARIANTS), \
|
||||
$(eval hotspot-$v-gensrc: java.base-copy) \
|
||||
$(eval hotspot-$v: hotspot-$v-gensrc hotspot-$v-libs) \
|
||||
$(eval hotspot-$v-libs: hotspot-$v-gensrc java.base-copy) \
|
||||
)
|
||||
|
||||
@@ -717,14 +646,10 @@ else
|
||||
|
||||
# If not already set, set the JVM variant target so that the JVM will be built.
|
||||
JVM_MAIN_LIB_TARGETS ?= hotspot-$(JVM_VARIANT_MAIN)-libs
|
||||
JVM_MAIN_GENSRC_TARGETS ?= hotspot-$(JVM_VARIANT_MAIN)-gensrc
|
||||
|
||||
# Building one JVM variant is enough to start building the other libs
|
||||
$(LIBS_TARGETS): $(JVM_MAIN_LIB_TARGETS)
|
||||
|
||||
# Static libs depend on hotspot gensrc
|
||||
$(STATIC_LIBS_TARGETS): $(JVM_MAIN_GENSRC_TARGETS)
|
||||
|
||||
$(LAUNCHER_TARGETS): java.base-libs
|
||||
|
||||
ifeq ($(STATIC_BUILD), true)
|
||||
@@ -773,17 +698,16 @@ else
|
||||
# copied and processed.
|
||||
java.desktop-gensrc-src: java.base-gensrc java.base-copy
|
||||
|
||||
# The annotation processing for jdk.internal.vm.compiler
|
||||
# and jdk.internal.vm.compiler.management needs classes from the current JDK.
|
||||
# The annotation processing for jdk.internal.vm.ci and jdk.internal.vm.compiler
|
||||
# needs classes from the current JDK.
|
||||
jdk.internal.vm.ci-gensrc-src: $(addsuffix -java, \
|
||||
$(call FindTransitiveDepsForModule, jdk.internal.vm.ci))
|
||||
jdk.internal.vm.compiler-gensrc-src: $(addsuffix -java, \
|
||||
$(call FindTransitiveDepsForModule, jdk.internal.vm.compiler))
|
||||
jdk.internal.vm.compiler.management-gensrc-src: $(addsuffix -java, \
|
||||
$(call FindTransitiveDepsForModule, jdk.internal.vm.compiler.management))
|
||||
|
||||
# For these modules, the gensrc step is generating a module-info.java.extra
|
||||
# For jdk.internal.vm.compiler, the gensrc step is generating a module-info.java.extra
|
||||
# file to be processed by the gensrc-moduleinfo target.
|
||||
jdk.internal.vm.compiler-gensrc-moduleinfo: jdk.internal.vm.compiler-gensrc-src
|
||||
jdk.internal.vm.compiler.management-gensrc-moduleinfo: jdk.internal.vm.compiler.management-gensrc-src
|
||||
|
||||
jdk.jdeps-gendata: java rmic
|
||||
|
||||
@@ -818,31 +742,6 @@ else
|
||||
$(foreach m, $(ALL_MODULES), $(eval $m-jmod: $($(m)_JMOD_DEPS)))
|
||||
$(foreach m, $(INTERIM_IMAGE_MODULES), $(eval $m-interim-jmod: $($(m)_JMOD_DEPS)))
|
||||
|
||||
# Setup the minimal set of generated native source dependencies for hotspot
|
||||
$(foreach v, $(JVM_VARIANTS), \
|
||||
$(eval hotspot-$v-libs-compile-commands: hotspot-$v-gensrc) \
|
||||
$(foreach m, $(filter java.desktop jdk.hotspot.agent, $(GENSRC_MODULES)), \
|
||||
$(eval hotspot-$v-libs-compile-commands: $m-gensrc)) \
|
||||
)
|
||||
|
||||
# For the full JDK compile commands, create all possible generated sources
|
||||
$(foreach m, $(GENSRC_MODULES), $(eval $m-libs-compile-commands: $m-gensrc))
|
||||
$(foreach m, $(filter $(JAVA_MODULES), $(LIBS_MODULES)), $(eval $m-libs-compile-commands: $m-java))
|
||||
|
||||
$(COMPILE_COMMANDS_TARGETS_HOTSPOT): clean-compile-commands
|
||||
$(COMPILE_COMMANDS_TARGETS_JDK): clean-compile-commands
|
||||
compile-commands-hotspot: $(COMPILE_COMMANDS_TARGETS_HOTSPOT)
|
||||
compile-commands: $(COMPILE_COMMANDS_TARGETS_HOTSPOT) $(COMPILE_COMMANDS_TARGETS_JDK)
|
||||
|
||||
# The -static-libs targets depend on -java as well as java.base-copy.
|
||||
$(foreach m, $(filter $(JAVA_MODULES), $(STATIC_LIBS_MODULES)), \
|
||||
$(eval $m-static-libs: $m-java java.base-copy))
|
||||
|
||||
vscode-project: compile-commands
|
||||
vscode-project-clangd: compile-commands
|
||||
vscode-project-rtags: compile-commands
|
||||
vscode-project-ccls: compile-commands
|
||||
|
||||
# Jmods cannot be created until we have the jmod tool ready to run. During
|
||||
# a normal build we run it from the exploded image, but when cross compiling
|
||||
# it's run from the buildjdk, which is either created at build time or user
|
||||
@@ -905,10 +804,6 @@ else
|
||||
legacy-jre-image: jmods release-file
|
||||
symbols-image: $(LIBS_TARGETS) $(LAUNCHER_TARGETS)
|
||||
|
||||
static-libs-image: $(STATIC_LIBS_TARGETS)
|
||||
|
||||
graal-builder-image: jdk-image static-libs-image
|
||||
|
||||
mac-jdk-bundle: jdk-image
|
||||
mac-legacy-jre-bundle: legacy-jre-image
|
||||
|
||||
@@ -961,8 +856,6 @@ else
|
||||
|
||||
test-make: clean-test-make
|
||||
|
||||
test-compile-commands: compile-commands
|
||||
|
||||
build-test-lib: exploded-image-optimize
|
||||
|
||||
build-test-failure-handler: interim-langtools
|
||||
@@ -1002,8 +895,6 @@ else
|
||||
|
||||
docs-bundles: docs-image
|
||||
|
||||
static-libs-bundles: static-libs-image
|
||||
|
||||
generate-summary: jmods buildtools-modules
|
||||
|
||||
update-x11wrappers: java.base-copy buildtools-jdk
|
||||
@@ -1018,10 +909,6 @@ JVM_TOOLS_TARGETS ?= buildtools-hotspot
|
||||
buildtools: buildtools-langtools interim-langtools interim-rmic \
|
||||
buildtools-jdk $(JVM_TOOLS_TARGETS)
|
||||
|
||||
# Declare dependencies from hotspot-<variant> targets
|
||||
$(foreach v, $(JVM_VARIANTS), \
|
||||
$(eval hotspot-$v: hotspot-$v-gensrc hotspot-$v-libs) \
|
||||
)
|
||||
hotspot: $(HOTSPOT_VARIANT_TARGETS)
|
||||
|
||||
# Create targets hotspot-libs and hotspot-gensrc.
|
||||
@@ -1042,8 +929,6 @@ rmic: $(RMIC_TARGETS)
|
||||
|
||||
libs: $(LIBS_TARGETS)
|
||||
|
||||
static-libs: $(STATIC_LIBS_TARGETS)
|
||||
|
||||
launchers: $(LAUNCHER_TARGETS)
|
||||
|
||||
jmods: $(JMOD_TARGETS)
|
||||
@@ -1150,10 +1035,10 @@ test-image: prepare-test-image \
|
||||
all-images: product-images test-image docs-image
|
||||
|
||||
# all-bundles packages all our deliverables as tar.gz bundles.
|
||||
all-bundles: product-bundles test-bundles docs-bundles static-libs-bundles
|
||||
all-bundles: product-bundles test-bundles docs-bundles
|
||||
|
||||
ALL_TARGETS += buildtools hotspot hotspot-libs hotspot-gensrc gensrc gendata \
|
||||
copy java rmic libs static-libs launchers jmods \
|
||||
copy java rmic libs launchers jmods \
|
||||
jdk.jdwp.agent-gensrc $(ALL_MODULES) demos \
|
||||
exploded-image-base exploded-image \
|
||||
create-buildjdk docs-jdk-api docs-javase-api docs-reference-api docs-jdk \
|
||||
@@ -1200,15 +1085,12 @@ CLEAN_MODULE_PHASE_TARGETS := $(addprefix clean-, $(foreach m, $(ALL_MODULES), \
|
||||
|
||||
# Remove everything, except the output from configure.
|
||||
clean: $(CLEAN_DIR_TARGETS)
|
||||
($(CD) $(OUTPUTDIR) && $(RM) -r build*.log* compile_commands.json)
|
||||
($(CD) $(OUTPUTDIR) && $(RM) -r build*.log*)
|
||||
$(ECHO) Cleaned all build artifacts.
|
||||
|
||||
clean-docs:
|
||||
$(call CleanDocs)
|
||||
|
||||
clean-compile-commands:
|
||||
$(call CleanMakeSupportDir,compile-commands)
|
||||
|
||||
$(CLEAN_DIR_TARGETS):
|
||||
$(call CleanDir,$(patsubst clean-%, %, $@))
|
||||
|
||||
@@ -1250,16 +1132,9 @@ dist-clean: clean
|
||||
)
|
||||
$(ECHO) Cleaned everything, you will have to re-run configure.
|
||||
|
||||
ALL_TARGETS += clean clean-docs clean-compile-commands dist-clean $(CLEAN_DIR_TARGETS) \
|
||||
$(CLEAN_SUPPORT_DIR_TARGETS) $(CLEAN_TEST_TARGETS) $(CLEAN_PHASE_TARGETS) \
|
||||
$(CLEAN_MODULE_TARGETS) $(CLEAN_MODULE_PHASE_TARGETS)
|
||||
|
||||
################################################################################
|
||||
# JBR API
|
||||
|
||||
jbr-api:
|
||||
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f JBRApi.gmk jbr-api)
|
||||
ALL_TARGETS += jbr-api
|
||||
ALL_TARGETS += clean clean-docs dist-clean $(CLEAN_DIR_TARGETS) $(CLEAN_SUPPORT_DIR_TARGETS) \
|
||||
$(CLEAN_TEST_TARGETS) $(CLEAN_PHASE_TARGETS) $(CLEAN_MODULE_TARGETS) \
|
||||
$(CLEAN_MODULE_PHASE_TARGETS)
|
||||
|
||||
################################################################################
|
||||
# Declare *-only targets for each normal target
|
||||
|
||||
@@ -65,13 +65,6 @@ define CleanSupportDir
|
||||
@$(PRINTF) " done\n"
|
||||
endef
|
||||
|
||||
define CleanMakeSupportDir
|
||||
@$(PRINTF) "Cleaning $(strip $1) make support artifacts ..."
|
||||
@$(PRINTF) "\n" $(LOG_DEBUG)
|
||||
$(RM) -r $(MAKESUPPORT_OUTPUTDIR)/$(strip $1)
|
||||
@$(PRINTF) " done\n"
|
||||
endef
|
||||
|
||||
define CleanTest
|
||||
@$(PRINTF) "Cleaning test $(strip $1) ..."
|
||||
@$(PRINTF) "\n" $(LOG_DEBUG)
|
||||
@@ -144,7 +137,7 @@ define DeclareRecipeForModuleMakefile
|
||||
$$(addprefix -I, $$(PHASE_MAKEDIRS) \
|
||||
$$(addsuffix /$$($1_MAKE_SUBDIR), $$(PHASE_MAKEDIRS)) \
|
||||
) \
|
||||
MODULE=$2 MAKEFILE_PREFIX=$$($1_FILE_PREFIX) $$($1_EXTRA_ARGS))
|
||||
MODULE=$2 MAKEFILE_PREFIX=$$($1_FILE_PREFIX))
|
||||
else
|
||||
+($(CD) $$(dir $$(firstword $$(wildcard $$(addsuffix \
|
||||
/$$($1_MAKE_SUBDIR)/$$($1_FILE_PREFIX)-$2.gmk, $$(PHASE_MAKEDIRS))))) \
|
||||
@@ -153,7 +146,7 @@ define DeclareRecipeForModuleMakefile
|
||||
$$(addprefix -I, $$(PHASE_MAKEDIRS) \
|
||||
$$(addsuffix /$$($1_MAKE_SUBDIR), $$(PHASE_MAKEDIRS)) \
|
||||
) \
|
||||
MODULE=$2 $$($1_EXTRA_ARGS) \
|
||||
MODULE=$2 \
|
||||
)
|
||||
endif
|
||||
|
||||
@@ -193,13 +186,12 @@ endef
|
||||
# CHECK_MODULES : List of modules to try
|
||||
# MULTIPLE_MAKEFILES : Set to true to handle makefiles for the same module and
|
||||
# phase in multiple repos
|
||||
# EXTRA_ARGS : Add extra make args to each makefile call
|
||||
# Exported variables:
|
||||
# $1_MODULES : All modules that had rules generated
|
||||
# $1_TARGETS : All targets generated
|
||||
define DeclareRecipesForPhase
|
||||
$(foreach i,2 3 4 5 6 7 8, $(if $(strip $($i)),$(strip $1)_$(strip $($i)))$(NEWLINE))
|
||||
$(if $(9),$(error Internal makefile error: Too many arguments to \
|
||||
$(foreach i,2 3 4 5 6 7, $(if $(strip $($i)),$(strip $1)_$(strip $($i)))$(NEWLINE))
|
||||
$(if $(8),$(error Internal makefile error: Too many arguments to \
|
||||
DeclareRecipesForPhase, please update MakeHelper.gmk))
|
||||
|
||||
$$(foreach m, $$($(strip $1)_CHECK_MODULES), \
|
||||
|
||||
@@ -100,9 +100,5 @@ $(eval $(call SetupCopyFiles, COPY_CONF, \
|
||||
$(TARGETS)), \
|
||||
))
|
||||
|
||||
ifeq ($(GENERATE_COMPILE_COMMANDS_ONLY), true)
|
||||
all: $(filter $(MAKESUPPORT_OUTPUTDIR)/compile-commands/%, $(TARGETS))
|
||||
else
|
||||
all: $(TARGETS) $(COPY_LIBS_TO_BIN) $(COPY_LIBS_TO_LIB) \
|
||||
$(COPY_INCLUDE) $(COPY_CMDS) $(COPY_CONF) $(LINK_LIBS_TO_LIB)
|
||||
endif
|
||||
all: $(TARGETS) $(COPY_LIBS_TO_BIN) $(COPY_LIBS_TO_LIB) \
|
||||
$(COPY_INCLUDE) $(COPY_CMDS) $(COPY_CONF) $(LINK_LIBS_TO_LIB)
|
||||
|
||||
@@ -82,8 +82,8 @@ ifneq ($(TEST_VM_OPTS), )
|
||||
endif
|
||||
|
||||
$(eval $(call ParseKeywordVariable, TEST_OPTS, \
|
||||
SINGLE_KEYWORDS := JOBS TIMEOUT_FACTOR, \
|
||||
STRING_KEYWORDS := VM_OPTIONS JAVA_OPTIONS AOT_MODULES, \
|
||||
KEYWORDS := JOBS TIMEOUT, \
|
||||
STRING_KEYWORDS := VM_OPTIONS, \
|
||||
))
|
||||
|
||||
# Helper function to propagate TEST_OPTS values.
|
||||
@@ -102,14 +102,10 @@ ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
ifndef _NT_SYMBOL_PATH
|
||||
# Can't use PathList here as it adds quotes around the value.
|
||||
_NT_SYMBOL_PATH := \
|
||||
$(subst $(SPACE),;,$(strip \
|
||||
$(foreach p, $(sort $(dir $(wildcard \
|
||||
$(addprefix $(SYMBOLS_IMAGE_DIR)/bin/, *.pdb */*.pdb)))), \
|
||||
$(call FixPath, $p) \
|
||||
) \
|
||||
))
|
||||
$(subst $(SPACE),;, $(foreach p, $(sort $(dir $(wildcard \
|
||||
$(addprefix $(SYMBOLS_IMAGE_DIR)/bin/, *.pdb */*.pdb)))), $(call FixPath, $p)))
|
||||
export _NT_SYMBOL_PATH
|
||||
$(info _NT_SYMBOL_PATH=$(_NT_SYMBOL_PATH))
|
||||
$(info _NT_SYMBOL_PATH $(_NT_SYMBOL_PATH))
|
||||
endif
|
||||
endif
|
||||
|
||||
@@ -141,118 +137,8 @@ ifneq ($(wildcard $(JTREG_FAILURE_HANDLER)), )
|
||||
-timeoutHandlerTimeout:0
|
||||
endif
|
||||
|
||||
GTEST_LAUNCHER_DIRS := $(patsubst %/gtestLauncher, %, \
|
||||
$(wildcard $(TEST_IMAGE_DIR)/hotspot/gtest/*/gtestLauncher))
|
||||
GTEST_VARIANTS := $(strip $(patsubst $(TEST_IMAGE_DIR)/hotspot/gtest/%, %, \
|
||||
$(GTEST_LAUNCHER_DIRS)))
|
||||
|
||||
################################################################################
|
||||
# Optionally create AOT libraries for specified modules before running tests.
|
||||
# Note, this could not be done during JDK build time.
|
||||
################################################################################
|
||||
|
||||
# Note, this could not be done during JDK build time.
|
||||
|
||||
# Parameter 1 is the name of the rule.
|
||||
#
|
||||
# Remaining parameters are named arguments.
|
||||
# MODULE The module to generate a library for
|
||||
# BIN Output directory in which to put the library
|
||||
# VM_OPTIONS List of JVM arguments to use when creating library
|
||||
# OPTIONS_VAR Name of variable to put AOT java options in
|
||||
# PREREQS_VAR Name of variable to put all AOT prerequisite rule targets in
|
||||
# for test rules to depend on
|
||||
#
|
||||
SetupAotModule = $(NamedParamsMacroTemplate)
|
||||
define SetupAotModuleBody
|
||||
$1_AOT_LIB := $$($1_BIN)/$$(call SHARED_LIBRARY,$$($1_MODULE))
|
||||
$1_AOT_CCLIST := $$(wildcard $$(TOPDIR)/test/hotspot/jtreg/compiler/aot/scripts/$$($1_MODULE)-list.txt)
|
||||
|
||||
# Create jaotc flags.
|
||||
# VM flags which don't affect AOT code generation are filtered out:
|
||||
# -Xcomp, -XX:+-TieredCompilation
|
||||
$1_JAOTC_OPTS := \
|
||||
-J-Xmx4g --info \
|
||||
$$(addprefix -J, $$(filter-out -Xcomp %TieredCompilation, $$($1_VM_OPTIONS))) \
|
||||
$$(addprefix --compile-commands$(SPACE), $$($1_AOT_CCLIST)) \
|
||||
--linker-path $$(LD_JAOTC) \
|
||||
#
|
||||
|
||||
ifneq ($$(filter -ea, $$($1_VM_OPTIONS)), )
|
||||
$1_JAOTC_OPTS += --compile-with-assertions
|
||||
endif
|
||||
|
||||
$$($1_AOT_LIB): $$(JDK_IMAGE_DIR)/release \
|
||||
$$(call DependOnVariable, $1_JAOTC_OPTS) \
|
||||
$$(call DependOnVariable, JDK_IMAGE_DIR)
|
||||
$$(call LogWarn, Generating $$(patsubst $$(OUTPUTDIR)/%, %, $$@))
|
||||
$$(call MakeTargetDir)
|
||||
$$(call ExecuteWithLog, $$@, ( \
|
||||
$$(FIXPATH) $$(JDK_IMAGE_DIR)/bin/jaotc \
|
||||
$$($1_JAOTC_OPTS) --output $$@ --module $$($1_MODULE) \
|
||||
))
|
||||
$$(call ExecuteWithLog, $$@.check, ( \
|
||||
$$(FIXPATH) $$(JDK_IMAGE_DIR)/bin/java \
|
||||
$$($1_VM_OPTIONS) -XX:+UnlockDiagnosticVMOptions \
|
||||
-XX:+PrintAOT -XX:+UseAOTStrictLoading \
|
||||
-XX:AOTLibrary=$$@ -version \
|
||||
> $$@.verify-aot \
|
||||
))
|
||||
|
||||
$1_AOT_OPTIONS += -XX:AOTLibrary=$$($1_AOT_LIB)
|
||||
$1_AOT_TARGETS += $$($1_AOT_LIB)
|
||||
endef
|
||||
|
||||
# Parameter 1 is the name of the rule.
|
||||
#
|
||||
# Remaining parameters are named arguments.
|
||||
# MODULES The modules to generate a library for
|
||||
# VM_OPTIONS List of JVM arguments to use when creating libraries
|
||||
#
|
||||
# After calling this, the following variables are defined
|
||||
# $1_AOT_OPTIONS List of all java options needed to use the AOT libraries
|
||||
# $1_AOT_TARGETS List of all targets that the test rule will need to depend on
|
||||
#
|
||||
SetupAot = $(NamedParamsMacroTemplate)
|
||||
define SetupAotBody
|
||||
$$(info Running with AOTd libraries for $$($1_MODULES))
|
||||
# Put aot libraries in a separate directory so they are not deleted between
|
||||
# test runs and may be reused between make invocations.
|
||||
$$(foreach m, $$($1_MODULES), \
|
||||
$$(eval $$(call SetupAotModule, $1_$$m, \
|
||||
MODULE := $$m, \
|
||||
BIN := $$(TEST_SUPPORT_DIR)/aot/$1, \
|
||||
VM_OPTIONS := $$($1_VM_OPTIONS), \
|
||||
)) \
|
||||
$$(eval $1_AOT_OPTIONS += $$($1_$$m_AOT_OPTIONS)) \
|
||||
$$(eval $1_AOT_TARGETS += $$($1_$$m_AOT_TARGETS)) \
|
||||
)
|
||||
endef
|
||||
|
||||
################################################################################
|
||||
# Setup global test running parameters
|
||||
################################################################################
|
||||
|
||||
# Each factor variable comes in 3 variants. The first one is reserved for users
|
||||
# to use on command line. The other two are for predifined configurations in JDL
|
||||
# and for machine specific configurations respectively.
|
||||
TEST_JOBS_FACTOR ?= 1
|
||||
TEST_JOBS_FACTOR_JDL ?= 1
|
||||
TEST_JOBS_FACTOR_MACHINE ?= 1
|
||||
|
||||
ifeq ($(TEST_JOBS), 0)
|
||||
# Concurrency based on min(cores / 2, 12) * TEST_JOBS_FACTOR
|
||||
TEST_JOBS := $(shell $(AWK) \
|
||||
'BEGIN { \
|
||||
c = $(NUM_CORES) / 2; \
|
||||
if (c > 12) c = 12; \
|
||||
c = c * $(TEST_JOBS_FACTOR); \
|
||||
c = c * $(TEST_JOBS_FACTOR_JDL); \
|
||||
c = c * $(TEST_JOBS_FACTOR_MACHINE); \
|
||||
if (c < 1) c = 1; \
|
||||
printf "%.0f", c; \
|
||||
}')
|
||||
endif
|
||||
GTEST_LAUNCHER_DIRS := $(patsubst %/gtestLauncher, %, $(wildcard $(TEST_IMAGE_DIR)/hotspot/gtest/*/gtestLauncher))
|
||||
GTEST_VARIANTS := $(strip $(patsubst $(TEST_IMAGE_DIR)/hotspot/gtest/%, %, $(GTEST_LAUNCHER_DIRS)))
|
||||
|
||||
################################################################################
|
||||
# Parse control variables
|
||||
@@ -261,24 +147,17 @@ endif
|
||||
ifneq ($(TEST_OPTS), )
|
||||
# Inform the user
|
||||
$(info Running tests using TEST_OPTS control variable '$(TEST_OPTS)')
|
||||
|
||||
$(eval $(call SetTestOpt,VM_OPTIONS,JTREG))
|
||||
$(eval $(call SetTestOpt,VM_OPTIONS,GTEST))
|
||||
|
||||
$(eval $(call SetTestOpt,JOBS,JTREG))
|
||||
$(eval $(call SetTestOpt,TIMEOUT,JTREG))
|
||||
endif
|
||||
|
||||
$(eval $(call SetTestOpt,VM_OPTIONS,JTREG))
|
||||
$(eval $(call SetTestOpt,JAVA_OPTIONS,JTREG))
|
||||
$(eval $(call SetTestOpt,VM_OPTIONS,GTEST))
|
||||
$(eval $(call SetTestOpt,JAVA_OPTIONS,GTEST))
|
||||
|
||||
$(eval $(call SetTestOpt,AOT_MODULES,JTREG))
|
||||
$(eval $(call SetTestOpt,AOT_MODULES,GTEST))
|
||||
|
||||
$(eval $(call SetTestOpt,JOBS,JTREG))
|
||||
$(eval $(call SetTestOpt,TIMEOUT_FACTOR,JTREG))
|
||||
|
||||
$(eval $(call ParseKeywordVariable, JTREG, \
|
||||
SINGLE_KEYWORDS := JOBS TIMEOUT_FACTOR TEST_MODE ASSERT VERBOSE RETAIN \
|
||||
MAX_MEM, \
|
||||
STRING_KEYWORDS := OPTIONS JAVA_OPTIONS VM_OPTIONS KEYWORDS \
|
||||
EXTRA_PROBLEM_LISTS AOT_MODULES, \
|
||||
KEYWORDS := JOBS TIMEOUT TEST_MODE ASSERT VERBOSE RETAIN MAX_MEM, \
|
||||
STRING_KEYWORDS := OPTIONS JAVA_OPTIONS VM_OPTIONS, \
|
||||
))
|
||||
|
||||
ifneq ($(JTREG), )
|
||||
@@ -287,8 +166,8 @@ ifneq ($(JTREG), )
|
||||
endif
|
||||
|
||||
$(eval $(call ParseKeywordVariable, GTEST, \
|
||||
SINGLE_KEYWORDS := REPEAT, \
|
||||
STRING_KEYWORDS := OPTIONS VM_OPTIONS JAVA_OPTIONS AOT_MODULES, \
|
||||
KEYWORDS := REPEAT, \
|
||||
STRING_KEYWORDS := OPTIONS VM_OPTIONS, \
|
||||
))
|
||||
|
||||
ifneq ($(GTEST), )
|
||||
@@ -426,7 +305,7 @@ endef
|
||||
|
||||
# Helper function to determine if a test specification is a special test
|
||||
#
|
||||
# It is a special test if it is "special:" followed by a test name,
|
||||
# It is a special test if it is "special:" followed by a test name.
|
||||
define ParseSpecialTestSelection
|
||||
$(if $(filter special:%, $1), \
|
||||
$1 \
|
||||
@@ -517,28 +396,19 @@ define SetupRunGtestTestBody
|
||||
$1_GTEST_REPEAT :=--gtest_repeat=$$(GTEST_REPEAT)
|
||||
endif
|
||||
|
||||
ifneq ($$(GTEST_AOT_MODULES), )
|
||||
$$(eval $$(call SetupAot, $1, \
|
||||
MODULES := $$(GTEST_AOT_MODULES), \
|
||||
VM_OPTIONS := $$(GTEST_VM_OPTIONS) $$(GTEST_JAVA_OPTIONS), \
|
||||
))
|
||||
endif
|
||||
|
||||
run-test-$1: $$($1_AOT_TARGETS)
|
||||
run-test-$1:
|
||||
$$(call LogWarn)
|
||||
$$(call LogWarn, Running test '$$($1_TEST)')
|
||||
$$(call MakeDir, $$($1_TEST_RESULTS_DIR) $$($1_TEST_SUPPORT_DIR))
|
||||
$$(call ExecuteWithLog, $$($1_TEST_SUPPORT_DIR)/gtest, ( \
|
||||
$$(call ExecuteWithLog, $$($1_TEST_SUPPORT_DIR)/gtest, \
|
||||
$$(FIXPATH) $$(TEST_IMAGE_DIR)/hotspot/gtest/$$($1_VARIANT)/gtestLauncher \
|
||||
-jdk $(JDK_IMAGE_DIR) $$($1_GTEST_FILTER) \
|
||||
--gtest_output=xml:$$($1_TEST_RESULTS_DIR)/gtest.xml \
|
||||
--gtest_catch_exceptions=0 \
|
||||
$$($1_GTEST_REPEAT) $$(GTEST_OPTIONS) $$(GTEST_VM_OPTIONS) \
|
||||
$$(GTEST_JAVA_OPTIONS) $$($1_AOT_OPTIONS) \
|
||||
-jdk $(JDK_IMAGE_DIR) $$($1_GTEST_FILTER) \
|
||||
--gtest_output=xml:$$($1_TEST_RESULTS_DIR)/gtest.xml \
|
||||
$$($1_GTEST_REPEAT) $$(GTEST_OPTIONS) $$(GTEST_VM_OPTIONS) \
|
||||
> >($(TEE) $$($1_TEST_RESULTS_DIR)/gtest.txt) \
|
||||
&& $$(ECHO) $$$$? > $$($1_EXITCODE) \
|
||||
|| $$(ECHO) $$$$? > $$($1_EXITCODE) \
|
||||
))
|
||||
)
|
||||
|
||||
$1_RESULT_FILE := $$($1_TEST_RESULTS_DIR)/gtest.txt
|
||||
|
||||
@@ -605,11 +475,12 @@ define SetupRunJtregTestBody
|
||||
|
||||
$1_TEST_NAME := $$(strip $$(patsubst jtreg:%, %, $$($1_TEST)))
|
||||
|
||||
$1_TEST_ROOT := \
|
||||
$1_COMPONENT := \
|
||||
$$(strip $$(foreach root, $$(JTREG_TESTROOTS), \
|
||||
$$(if $$(filter $$(root)%, $$(JTREG_TOPDIR)/$$($1_TEST_NAME)), $$(root)) \
|
||||
$$(if $$(filter $$(root)%, $$(JTREG_TOPDIR)/$$($1_TEST_NAME)), \
|
||||
$$(lastword $$(subst /, $$(SPACE), $$(root))) \
|
||||
) \
|
||||
))
|
||||
$1_COMPONENT := $$(lastword $$(subst /, $$(SPACE), $$($1_TEST_ROOT)))
|
||||
# This will work only as long as just hotspot has the additional "jtreg" directory
|
||||
ifeq ($$($1_COMPONENT), jtreg)
|
||||
$1_COMPONENT := hotspot
|
||||
@@ -632,9 +503,6 @@ define SetupRunJtregTestBody
|
||||
$$(eval $$(call SetJtregValue,$1,JTREG_BASIC_OPTIONS))
|
||||
$$(eval $$(call SetJtregValue,$1,JTREG_PROBLEM_LIST))
|
||||
|
||||
# Only the problem list for the current test root should be used.
|
||||
$1_JTREG_PROBLEM_LIST := $$(filter $$($1_TEST_ROOT)%, $$($1_JTREG_PROBLEM_LIST))
|
||||
|
||||
ifneq ($(TEST_JOBS), 0)
|
||||
$$(eval $$(call SetJtregValue,$1,JTREG_JOBS,$$(TEST_JOBS)))
|
||||
else
|
||||
@@ -647,9 +515,9 @@ define SetupRunJtregTestBody
|
||||
|
||||
# SPARC is in general slower per core so need to scale up timeouts a bit.
|
||||
ifeq ($(OPENJDK_TARGET_CPU_ARCH), sparc)
|
||||
JTREG_TIMEOUT_FACTOR ?= 8
|
||||
JTREG_TIMEOUT ?= 8
|
||||
else
|
||||
JTREG_TIMEOUT_FACTOR ?= 4
|
||||
JTREG_TIMEOUT ?= 4
|
||||
endif
|
||||
JTREG_VERBOSE ?= fail,error,summary
|
||||
JTREG_RETAIN ?= fail,error
|
||||
@@ -659,16 +527,12 @@ define SetupRunJtregTestBody
|
||||
$1_JTREG_LAUNCHER_OPTIONS += -Xmx$$($1_JTREG_MAX_MEM)
|
||||
endif
|
||||
|
||||
# Make sure the tmp dir is normalized as some tests will react badly otherwise
|
||||
$1_TEST_TMP_DIR := $$(abspath $$($1_TEST_SUPPORT_DIR)/tmp)
|
||||
|
||||
$1_JTREG_BASIC_OPTIONS += -$$($1_JTREG_TEST_MODE) \
|
||||
-verbose:$$(JTREG_VERBOSE) -retain:$$(JTREG_RETAIN) \
|
||||
-concurrency:$$($1_JTREG_JOBS) -timeoutFactor:$$(JTREG_TIMEOUT_FACTOR) \
|
||||
-vmoption:-XX:MaxRAMPercentage=$$($1_JTREG_MAX_RAM_PERCENTAGE) \
|
||||
-vmoption:-Djava.io.tmpdir="$$($1_TEST_TMP_DIR)"
|
||||
-concurrency:$$($1_JTREG_JOBS) -timeoutFactor:$$(JTREG_TIMEOUT) \
|
||||
-vmoption:-XX:MaxRAMPercentage=$$($1_JTREG_MAX_RAM_PERCENTAGE)
|
||||
|
||||
$1_JTREG_BASIC_OPTIONS += -automatic -ignore:quiet
|
||||
$1_JTREG_BASIC_OPTIONS += -automatic -keywords:\!ignore -ignore:quiet
|
||||
|
||||
# Make it possible to specify the JIB_DATA_DIR for tests using the
|
||||
# JIB Artifact resolver
|
||||
@@ -698,56 +562,24 @@ define SetupRunJtregTestBody
|
||||
$1_JTREG_BASIC_OPTIONS += $$(addprefix -exclude:, $$($1_JTREG_PROBLEM_LIST))
|
||||
endif
|
||||
|
||||
ifneq ($$(JTREG_EXTRA_PROBLEM_LISTS), )
|
||||
# Accept both absolute paths as well as relative to the current test root.
|
||||
$1_JTREG_BASIC_OPTIONS += $$(addprefix -exclude:, $$(wildcard \
|
||||
$$(JTREG_EXTRA_PROBLEM_LISTS) \
|
||||
$$(addprefix $$($1_TEST_ROOT)/, $$(JTREG_EXTRA_PROBLEM_LISTS)) \
|
||||
))
|
||||
ifneq ($$(JIB_JAR), )
|
||||
$1_JTREG_BASIC_OPTIONS += -cpa:$$(JIB_JAR)
|
||||
endif
|
||||
|
||||
ifneq ($$(JIB_HOME), )
|
||||
$1_JTREG_BASIC_OPTIONS += -e:JIB_HOME=$$(JIB_HOME)
|
||||
endif
|
||||
|
||||
$1_JTREG_BASIC_OPTIONS += -e:TEST_IMAGE_DIR=$(TEST_IMAGE_DIR)
|
||||
$1_JTREG_BASIC_OPTIONS += -e:TEST_IMAGE_GRAAL_DIR=$(TEST_IMAGE_DIR)/hotspot/jtreg/graal
|
||||
$1_JTREG_BASIC_OPTIONS += -e:TEST_IMAGE_GRAAL_DIR=${TEST_IMAGE_DIR}/hotspot/jtreg/graal
|
||||
|
||||
ifneq ($$(JTREG_FAILURE_HANDLER_OPTIONS), )
|
||||
$1_JTREG_LAUNCHER_OPTIONS += -Djava.library.path="$(JTREG_FAILURE_HANDLER_DIR)"
|
||||
endif
|
||||
|
||||
ifneq ($$(JTREG_KEYWORDS), )
|
||||
# The keywords string may contain problematic characters and may be quoted
|
||||
# already when it arrives here. Remove any existing quotes and replace them
|
||||
# with one set of single quotes.
|
||||
$1_JTREG_KEYWORDS := \
|
||||
$$(strip $$(subst $$(SQUOTE),,$$(subst $$(DQUOTE),,$$(JTREG_KEYWORDS))))
|
||||
ifneq ($$($1_JTREG_KEYWORDS), )
|
||||
$1_JTREG_BASIC_OPTIONS += -k:'$$($1_JTREG_KEYWORDS)'
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq ($$(JTREG_AOT_MODULES), )
|
||||
$$(eval $$(call SetupAot, $1, \
|
||||
MODULES := $$(JTREG_AOT_MODULES), \
|
||||
VM_OPTIONS := $$(JTREG_VM_OPTIONS) $$(JTREG_JAVA_OPTIONS), \
|
||||
))
|
||||
endif
|
||||
|
||||
ifneq ($$($1_AOT_OPTIONS), )
|
||||
$1_JTREG_BASIC_OPTIONS += -vmoptions:"$$($1_AOT_OPTIONS)"
|
||||
endif
|
||||
|
||||
clean-workdir-$1:
|
||||
$$(RM) -r $$($1_TEST_SUPPORT_DIR)
|
||||
|
||||
run-test-$1: clean-workdir-$1 $$($1_AOT_TARGETS)
|
||||
run-test-$1: clean-workdir-$1
|
||||
$$(call LogWarn)
|
||||
$$(call LogWarn, Running test '$$($1_TEST)')
|
||||
$$(call MakeDir, $$($1_TEST_RESULTS_DIR) $$($1_TEST_SUPPORT_DIR) \
|
||||
$$($1_TEST_TMP_DIR))
|
||||
$$(call ExecuteWithLog, $$($1_TEST_SUPPORT_DIR)/jtreg, ( \
|
||||
$$(call MakeDir, $$($1_TEST_RESULTS_DIR) $$($1_TEST_SUPPORT_DIR))
|
||||
$$(call ExecuteWithLog, $$($1_TEST_SUPPORT_DIR)/jtreg, \
|
||||
$$(JAVA) $$($1_JTREG_LAUNCHER_OPTIONS) \
|
||||
-Dprogram=jtreg -jar $$(JT_HOME)/lib/jtreg.jar \
|
||||
$$($1_JTREG_BASIC_OPTIONS) \
|
||||
@@ -760,7 +592,7 @@ define SetupRunJtregTestBody
|
||||
$$($1_TEST_NAME) \
|
||||
&& $$(ECHO) $$$$? > $$($1_EXITCODE) \
|
||||
|| $$(ECHO) $$$$? > $$($1_EXITCODE) \
|
||||
))
|
||||
)
|
||||
|
||||
$1_RESULT_FILE := $$($1_TEST_RESULTS_DIR)/text/stats.txt
|
||||
|
||||
@@ -830,16 +662,16 @@ define SetupRunSpecialTestBody
|
||||
$$(error Invalid special test specification: $$($1_TEST_NAME))
|
||||
endif
|
||||
|
||||
run-test-$1: $(TEST_PREREQS)
|
||||
run-test-$1:
|
||||
$$(call LogWarn)
|
||||
$$(call LogWarn, Running test '$$($1_TEST)')
|
||||
$$(call MakeDir, $$($1_TEST_RESULTS_DIR) $$($1_TEST_SUPPORT_DIR))
|
||||
$$(call ExecuteWithLog, $$($1_TEST_SUPPORT_DIR)/test-execution, ( \
|
||||
$$(call ExecuteWithLog, $$($1_TEST_SUPPORT_DIR)/test-execution, \
|
||||
$$($1_TEST_COMMAND_LINE) \
|
||||
> >($(TEE) $$($1_TEST_RESULTS_DIR)/test-output.txt) \
|
||||
&& $$(ECHO) $$$$? > $$($1_EXITCODE) \
|
||||
|| $$(ECHO) $$$$? > $$($1_EXITCODE) \
|
||||
))
|
||||
)
|
||||
|
||||
$1_RESULT_FILE := $$($1_TEST_RESULTS_DIR)/gtest.txt
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2017, 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
|
||||
@@ -49,11 +49,10 @@ TOPDIR := $(strip $(patsubst %/make/, %, $(dir $(makefile_path))))
|
||||
# given.
|
||||
# Note: No spaces are allowed around the arguments.
|
||||
#
|
||||
# $1: The name of the variable
|
||||
# $1: The name of the argument
|
||||
# $2: The default value, if any, or OPTIONAL (do not provide a default but
|
||||
# do not exit if it is missing)
|
||||
# $3: If NO_CHECK, disable checking for target file/directory existence
|
||||
# If MKDIR, create the default directory
|
||||
define SetupVariable
|
||||
ifeq ($$($1), )
|
||||
ifeq ($2, )
|
||||
@@ -76,17 +75,10 @@ define SetupVariable
|
||||
endif
|
||||
# If $1 has a value (is not optional), and $3 is not set (to NO_CHECK),
|
||||
# and if wildcard is empty, then complain that the file is missing.
|
||||
ifeq ($3, MKDIR)
|
||||
ifneq ($$(findstring $$(LOG), info debug trace), )
|
||||
$$(info Creating directory for $1)
|
||||
endif
|
||||
$$(shell mkdir -p $$($1))
|
||||
else ifneq ($3, NO_CHECK)
|
||||
ifeq ($$(strip $$(if $$($1), , OPTIONAL) $$(wildcard $$($1))), )
|
||||
$$(info Error: Prebuilt variable $1 points to missing file/directory:)
|
||||
$$(info '$$($1)')
|
||||
$$(error Cannot continue.)
|
||||
endif
|
||||
ifeq ($$(strip $$(if $$($1), , OPTIONAL) $$(wildcard $$($1)) $3), )
|
||||
$$(info Error: Prebuilt variable $1 points to missing file/directory:)
|
||||
$$(info '$$($1)')
|
||||
$$(error Cannot continue.)
|
||||
endif
|
||||
endef
|
||||
|
||||
@@ -95,12 +87,12 @@ endef
|
||||
# $1: The output file name
|
||||
# $2..$N: The lines to output to the file
|
||||
define CreateNewSpec
|
||||
$(if $(strip $(31)), \
|
||||
$(if $(strip $(27)), \
|
||||
$(error Internal makefile error: \
|
||||
Too many arguments to macro, please update CreateNewSpec in RunTestsPrebuilt.gmk) \
|
||||
) \
|
||||
$(shell $(RM) $1) \
|
||||
$(foreach i, $(call sequence, 2, 30), \
|
||||
$(foreach i, $(call sequence, 2, 26), \
|
||||
$(if $(strip $($i)), \
|
||||
$(call AppendFile, $(strip $($i)), $1) \
|
||||
) \
|
||||
@@ -114,14 +106,14 @@ endef
|
||||
# Verify that user has given correct additional input.
|
||||
|
||||
# These variables are absolutely necessary
|
||||
$(eval $(call SetupVariable,OUTPUTDIR,$(TOPDIR)/build/run-test-prebuilt,MKDIR))
|
||||
$(eval $(call SetupVariable,OUTPUTDIR))
|
||||
$(eval $(call SetupVariable,BOOT_JDK))
|
||||
$(eval $(call SetupVariable,JT_HOME))
|
||||
|
||||
# These can have default values based on the ones above
|
||||
$(eval $(call SetupVariable,JDK_IMAGE_DIR,$(OUTPUTDIR)/images/jdk))
|
||||
$(eval $(call SetupVariable,TEST_IMAGE_DIR,$(OUTPUTDIR)/images/test))
|
||||
$(eval $(call SetupVariable,SYMBOLS_IMAGE_DIR,$(OUTPUTDIR)/images/symbols,NO_CHECK))
|
||||
$(eval $(call SetupVariable,SYMBOLS_IMAGE_DIR,$(OUTPUTDIR)/images/symbols))
|
||||
|
||||
# Provide default values for tools that we need
|
||||
$(eval $(call SetupVariable,MAKE,make,NO_CHECK))
|
||||
@@ -210,8 +202,8 @@ endif
|
||||
|
||||
ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
ifeq ($(wildcard $(TEST_IMAGE_DIR)/bin/fixpath.exe), )
|
||||
$(info Error: fixpath is missing from test image '$(TEST_IMAGE_DIR)')
|
||||
$(error Cannot continue.)
|
||||
$$(info Error: fixpath is missing from test image '$(TEST_IMAGE_DIR)')
|
||||
$$(error Cannot continue.)
|
||||
endif
|
||||
FIXPATH := $(TEST_IMAGE_DIR)/bin/fixpath.exe -c
|
||||
PATH_SEP:=;
|
||||
@@ -222,57 +214,27 @@ endif
|
||||
|
||||
# Check number of cores and memory in MB
|
||||
ifeq ($(OPENJDK_TARGET_OS), linux)
|
||||
NUM_CORES := $(shell $(CAT) /proc/cpuinfo | $(GREP) -c processor)
|
||||
MEMORY_SIZE := $(shell \
|
||||
NUM_CORES := $(shell $(CAT) /proc/cpuinfo | $(GREP) -c processor)
|
||||
MEMORY_SIZE := $(shell \
|
||||
$(EXPR) `$(CAT) /proc/meminfo | $(GREP) MemTotal | $(AWK) '{print $$2}'` / 1024 \
|
||||
)
|
||||
)
|
||||
else ifeq ($(OPENJDK_TARGET_OS), macosx)
|
||||
NUM_CORES := $(shell /usr/sbin/sysctl -n hw.ncpu)
|
||||
MEMORY_SIZE := $(shell $(EXPR) `/usr/sbin/sysctl -n hw.memsize` / 1024 / 1024)
|
||||
NUM_CORES := $(shell /usr/sbin/sysctl -n hw.ncpu)
|
||||
MEMORY_SIZE := $(shell $(EXPR) `/usr/sbin/sysctl -n hw.memsize` / 1024 / 1024)
|
||||
else ifeq ($(OPENJDK_TARGET_OS), solaris)
|
||||
NUM_CORES := $(shell LC_MESSAGES=C /usr/sbin/psrinfo -v | $(GREP) -c on-line)
|
||||
MEMORY_SIZE := $(shell \
|
||||
NUM_CORES := $(shell LC_MESSAGES=C /usr/sbin/psrinfo -v | $(GREP) -c on-line)
|
||||
MEMORY_SIZE := $(shell \
|
||||
/usr/sbin/prtconf 2> /dev/null | $(GREP) "^Memory [Ss]ize" | $(AWK) '{print $$3}' \
|
||||
)
|
||||
)
|
||||
else ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
NUM_CORES := $(NUMBER_OF_PROCESSORS)
|
||||
MEMORY_SIZE := $(shell \
|
||||
$(EXPR) `wmic computersystem get totalphysicalmemory -value \
|
||||
| $(GREP) = | $(SED) 's/\\r//g' \
|
||||
NUM_CORES := $(NUMBER_OF_PROCESSORS)
|
||||
MEMORY_SIZE := $(shell \
|
||||
$(EXPR) `wmic computersystem get totalphysicalmemory -value | $(GREP) = \
|
||||
| $(CUT) -d "=" -f 2-` / 1024 / 1024 \
|
||||
)
|
||||
endif
|
||||
ifeq ($(NUM_CORES), )
|
||||
$(warn Could not find number of CPUs, assuming 1)
|
||||
NUM_CORES := 1
|
||||
endif
|
||||
ifeq ($(MEMORY_SIZE), )
|
||||
$(warn Could not find memory size, assuming 1024 MB)
|
||||
MEMORY_SIZE := 1024
|
||||
endif
|
||||
|
||||
# Setup LD for AOT support
|
||||
ifneq ($(DEVKIT_HOME), )
|
||||
ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
LD_JAOTC := $(DEVKIT_HOME)/VC/bin/x64/link.exe
|
||||
LIBRARY_PREFIX :=
|
||||
SHARED_LIBRARY_SUFFIX := .dll
|
||||
else ifeq ($(OPENJDK_TARGET_OS), linux)
|
||||
LD_JAOTC := $(DEVKIT_HOME)/bin/ld
|
||||
LIBRARY_PREFIX := lib
|
||||
SHARED_LIBRARY_SUFFIX := .so
|
||||
else ifeq ($(OPENJDK_TARGET_OS), macosx)
|
||||
LD_JAOTC := $(DEVKIT_HOME)/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
|
||||
LIBRARY_PREFIX := lib
|
||||
SHARED_LIBRARY_SUFFIX := .dylib
|
||||
else ifeq ($(OPENJDK_TARGET_OS), solaris)
|
||||
# Prefer system linker for AOT on Solaris.
|
||||
LD_JAOTC := ld
|
||||
LIBRARY_PREFIX := lib
|
||||
SHARED_LIBRARY_SUFFIX := .so
|
||||
endif
|
||||
)
|
||||
else
|
||||
LD := ld
|
||||
NUM_CORES := 1
|
||||
MEMORY_SIZE := 1024
|
||||
endif
|
||||
|
||||
################################################################################
|
||||
@@ -311,9 +273,6 @@ $(call CreateNewSpec, $(NEW_SPEC), \
|
||||
OPENJDK_TARGET_CPU_ENDIAN := $(OPENJDK_TARGET_CPU_ENDIAN), \
|
||||
NUM_CORES := $(NUM_CORES), \
|
||||
MEMORY_SIZE := $(MEMORY_SIZE), \
|
||||
LD_JAOTC := $(LD_JAOTC), \
|
||||
LIBRARY_PREFIX := $(LIBRARY_PREFIX), \
|
||||
SHARED_LIBRARY_SUFFIX := $(SHARED_LIBRARY_SUFFIX), \
|
||||
include $(TOPDIR)/make/RunTestsPrebuiltSpec.gmk, \
|
||||
$(CUSTOM_NEW_SPEC_LINE), \
|
||||
)
|
||||
@@ -330,6 +289,9 @@ run-test-prebuilt:
|
||||
@$(RM) -f $(MAKESUPPORT_OUTPUTDIR)/exit-with-error
|
||||
@cd $(TOPDIR) && $(MAKE) $(MAKE_ARGS) -f make/RunTests.gmk run-test \
|
||||
TEST="$(TEST)"
|
||||
@if test -f $(MAKESUPPORT_OUTPUTDIR)/exit-with-error ; then \
|
||||
exit 1 ; \
|
||||
fi
|
||||
|
||||
all: run-test-prebuilt
|
||||
|
||||
|
||||
@@ -124,7 +124,7 @@ JLINK := $(FIXPATH) $(JLINK_CMD)
|
||||
JMOD := $(FIXPATH) $(JMOD_CMD)
|
||||
JARSIGNER := $(FIXPATH) $(JARSIGNER_CMD)
|
||||
|
||||
BUILD_JAVA := $(JDK_IMAGE_DIR)/bin/JAVA
|
||||
BUILD_JAVA := $(JAVA)
|
||||
################################################################################
|
||||
# Some common tools. Assume most common name and no path.
|
||||
AWK := awk
|
||||
@@ -172,21 +172,3 @@ UNZIP := unzip
|
||||
EXPR := expr
|
||||
FILE := file
|
||||
HG := hg
|
||||
|
||||
# On Solaris gnu versions of some tools are required.
|
||||
ifeq ($(OPENJDK_BUILD_OS), solaris)
|
||||
AWK := gawk
|
||||
GREP := ggrep
|
||||
EGREP := ggrep -E
|
||||
FGREP := grep -F
|
||||
SED := gsed
|
||||
TAR := gtar
|
||||
endif
|
||||
|
||||
ifeq ($(OPENJDK_BUILD_OS), windows)
|
||||
CYGPATH := cygpath
|
||||
endif
|
||||
|
||||
################################################################################
|
||||
# Simple macros from spec.gmk.in
|
||||
SHARED_LIBRARY=$(LIBRARY_PREFIX)$1$(SHARED_LIBRARY_SUFFIX)
|
||||
|
||||
@@ -37,22 +37,10 @@ ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
$(call install-file)
|
||||
endif
|
||||
|
||||
BUILD_INFO_PROPERTIES := $(TEST_IMAGE_DIR)/build-info.properties
|
||||
|
||||
FIXPATH_ECHO := $(FIXPATH) $(call FixPath, $(ECHO))
|
||||
|
||||
$(BUILD_INFO_PROPERTIES):
|
||||
$(call MakeTargetDir)
|
||||
$(ECHO) "# Build info properties for JDK tests" > $@
|
||||
$(FIXPATH_ECHO) "build.workspace.root=$(WORKSPACE_ROOT)" >> $@
|
||||
$(FIXPATH_ECHO) "build.output.root=$(OUTPUTDIR)" >> $@
|
||||
|
||||
prepare-test-image: $(FIXPATH_COPY) $(BUILD_INFO_PROPERTIES)
|
||||
prepare-test-image: $(FIXPATH_COPY)
|
||||
$(call MakeDir, $(TEST_IMAGE_DIR))
|
||||
$(ECHO) > $(TEST_IMAGE_DIR)/Readme.txt 'JDK test image'
|
||||
|
||||
################################################################################
|
||||
|
||||
all: prepare-test-image
|
||||
|
||||
.PHONY: default all prepare-test-image
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2018, 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
|
||||
@@ -74,15 +74,11 @@ TOOL_TZDB = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \
|
||||
build.tools.tzdb.TzdbZoneRulesCompiler
|
||||
|
||||
TOOL_BLACKLISTED_CERTS = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \
|
||||
--add-exports java.base/sun.security.util=ALL-UNNAMED \
|
||||
build.tools.blacklistedcertsconverter.BlacklistedCertsConverter
|
||||
|
||||
TOOL_MAKEJAVASECURITY = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \
|
||||
build.tools.makejavasecurity.MakeJavaSecurity
|
||||
|
||||
TOOL_GENERATECACERTS = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \
|
||||
build.tools.generatecacerts.GenerateCacerts
|
||||
|
||||
|
||||
# TODO: There are references to the jdwpgen.jar in jdk/make/netbeans/jdwpgen/build.xml
|
||||
# and nbproject/project.properties in the same dir. Needs to be looked at.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2017, 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
|
||||
@@ -45,13 +45,21 @@ GLOBAL_SPECS_DEFAULT_CSS_FILE := $(TOPDIR)/make/data/docs-resources/resources/jd
|
||||
|
||||
DOCS_DIR := $(TOPDIR)/doc
|
||||
|
||||
$(eval $(call SetupProcessMarkdown, md_docs, \
|
||||
FILES := $(call FindFiles, $(DOCS_DIR), *.md), \
|
||||
$(eval $(call SetupProcessMarkdown, building, \
|
||||
FILES := $(DOCS_DIR)/building.md, \
|
||||
DEST := $(DOCS_DIR), \
|
||||
CSS := $(GLOBAL_SPECS_DEFAULT_CSS_FILE), \
|
||||
OPTIONS := --toc, \
|
||||
))
|
||||
TARGETS += $(md_docs)
|
||||
TARGETS += $(building)
|
||||
|
||||
$(eval $(call SetupProcessMarkdown, testing, \
|
||||
FILES := $(DOCS_DIR)/testing.md, \
|
||||
DEST := $(DOCS_DIR), \
|
||||
CSS := $(GLOBAL_SPECS_DEFAULT_CSS_FILE), \
|
||||
OPTIONS := --toc, \
|
||||
))
|
||||
TARGETS += $(testing)
|
||||
|
||||
################################################################################
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2014, 2016, 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
|
||||
@@ -87,7 +87,6 @@ ifeq ($(SRC_GENERATED), true)
|
||||
EXCLUDE_FILES := $(SRC_ZIP_EXCLUDE_FILES), \
|
||||
SUFFIXES := .java, \
|
||||
ZIP := $(SUPPORT_OUTPUTDIR)/src.zip, \
|
||||
FOLLOW_SYMLINKS := true, \
|
||||
))
|
||||
|
||||
do-zip: $(BUILD_SRC_ZIP)
|
||||
|
||||
@@ -645,14 +645,6 @@ AC_DEFUN_ONCE([BASIC_SETUP_PATHS],
|
||||
BASIC_FIXUP_PATH(CURDIR)
|
||||
BASIC_FIXUP_PATH(TOPDIR)
|
||||
|
||||
if test "x$CUSTOM_ROOT" != x; then
|
||||
BASIC_FIXUP_PATH(CUSTOM_ROOT)
|
||||
WORKSPACE_ROOT="${CUSTOM_ROOT}"
|
||||
else
|
||||
WORKSPACE_ROOT="${TOPDIR}"
|
||||
fi
|
||||
AC_SUBST(WORKSPACE_ROOT)
|
||||
|
||||
# Locate the directory of this script.
|
||||
AUTOCONF_DIR=$TOPDIR/make/autoconf
|
||||
|
||||
@@ -672,16 +664,6 @@ AC_DEFUN([BASIC_EVAL_DEVKIT_VARIABLE],
|
||||
fi
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Evaluates platform specific overrides for build devkit variables.
|
||||
# $1: Name of variable
|
||||
AC_DEFUN([BASIC_EVAL_BUILD_DEVKIT_VARIABLE],
|
||||
[
|
||||
if test "x[$]$1" = x; then
|
||||
eval $1="\${$1_${OPENJDK_BUILD_CPU}}"
|
||||
fi
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
AC_DEFUN_ONCE([BASIC_SETUP_DEVKIT],
|
||||
[
|
||||
@@ -885,7 +867,11 @@ AC_DEFUN_ONCE([BASIC_SETUP_OUTPUT_DIR],
|
||||
AC_MSG_RESULT([in build directory with custom name])
|
||||
fi
|
||||
|
||||
OUTPUTDIR="${WORKSPACE_ROOT}/build/${CONF_NAME}"
|
||||
if test "x$CUSTOM_ROOT" != x; then
|
||||
OUTPUTDIR="${CUSTOM_ROOT}/build/${CONF_NAME}"
|
||||
else
|
||||
OUTPUTDIR="${TOPDIR}/build/${CONF_NAME}"
|
||||
fi
|
||||
$MKDIR -p "$OUTPUTDIR"
|
||||
if test ! -d "$OUTPUTDIR"; then
|
||||
AC_MSG_ERROR([Could not create build directory $OUTPUTDIR])
|
||||
@@ -1226,41 +1212,17 @@ AC_DEFUN_ONCE([BASIC_SETUP_COMPLEX_TOOLS],
|
||||
BASIC_REQUIRE_PROGS(MIG, mig)
|
||||
BASIC_REQUIRE_PROGS(XATTR, xattr)
|
||||
BASIC_PATH_PROGS(CODESIGN, codesign)
|
||||
|
||||
if test "x$CODESIGN" != "x"; then
|
||||
# Check for user provided code signing identity.
|
||||
# If no identity was provided, fall back to "openjdk_codesign".
|
||||
AC_ARG_WITH([macosx-codesign-identity], [AS_HELP_STRING([--with-macosx-codesign-identity],
|
||||
[specify the code signing identity])],
|
||||
[MACOSX_CODESIGN_IDENTITY=$with_macosx_codesign_identity],
|
||||
[MACOSX_CODESIGN_IDENTITY=openjdk_codesign]
|
||||
)
|
||||
|
||||
AC_SUBST(MACOSX_CODESIGN_IDENTITY)
|
||||
|
||||
# Verify that the codesign certificate is present
|
||||
AC_MSG_CHECKING([if codesign certificate is present])
|
||||
# Verify that the openjdk_codesign certificate is present
|
||||
AC_MSG_CHECKING([if openjdk_codesign certificate is present])
|
||||
$RM codesign-testfile
|
||||
$TOUCH codesign-testfile
|
||||
$CODESIGN -s "$MACOSX_CODESIGN_IDENTITY" codesign-testfile 2>&AS_MESSAGE_LOG_FD \
|
||||
>&AS_MESSAGE_LOG_FD || CODESIGN=
|
||||
$CODESIGN -s openjdk_codesign codesign-testfile 2>&AS_MESSAGE_LOG_FD >&AS_MESSAGE_LOG_FD || CODESIGN=
|
||||
$RM codesign-testfile
|
||||
if test "x$CODESIGN" = x; then
|
||||
AC_MSG_RESULT([no])
|
||||
else
|
||||
AC_MSG_RESULT([yes])
|
||||
# Verify that the codesign has --option runtime
|
||||
AC_MSG_CHECKING([if codesign has --option runtime])
|
||||
$RM codesign-testfile
|
||||
$TOUCH codesign-testfile
|
||||
$CODESIGN --option runtime -s "$MACOSX_CODESIGN_IDENTITY" codesign-testfile \
|
||||
2>&AS_MESSAGE_LOG_FD >&AS_MESSAGE_LOG_FD || CODESIGN=
|
||||
$RM codesign-testfile
|
||||
if test "x$CODESIGN" = x; then
|
||||
AC_MSG_ERROR([codesign does not have --option runtime. macOS 10.13.6 and above is required.])
|
||||
else
|
||||
AC_MSG_RESULT([yes])
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
BASIC_REQUIRE_PROGS(SETFILE, SetFile)
|
||||
|
||||
@@ -112,6 +112,7 @@ AC_DEFUN([BASIC_FIXUP_PATH_CYGWIN],
|
||||
# unix format.
|
||||
path="[$]$1"
|
||||
new_path=`$CYGPATH -u "$path"`
|
||||
|
||||
# Cygwin tries to hide some aspects of the Windows file system, such that binaries are
|
||||
# named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
|
||||
# the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
|
||||
@@ -401,19 +402,8 @@ AC_DEFUN_ONCE([BASIC_COMPILE_FIXPATH],
|
||||
BASIC_WINDOWS_REWRITE_AS_WINDOWS_MIXED_PATH([FIXPATH_BIN_W])
|
||||
$RM -rf $FIXPATH_BIN $FIXPATH_DIR
|
||||
$MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
|
||||
# simple cross compilation solution for fixpath for aarch64
|
||||
# Final solution should be backport of 8257679
|
||||
if test "x$COMPILE_TYPE-$OPENJDK_TARGET_CPU" = xcross-aarch64; then
|
||||
FIXPATH_CC=`$ECHO "$CC"|$SED 's|/arm64/cl|/x64/cl|I'`
|
||||
FIXPATH_LIB=`$ECHO "$LIB"|$SED 's|arm64|x64|gI'`
|
||||
else
|
||||
FIXPATH_CC=$CC
|
||||
FIXPATH_LIB=$LIB
|
||||
fi
|
||||
OLDLIB=$LIB
|
||||
export LIB="$FIXPATH_LIB"
|
||||
cd $FIXPATH_DIR
|
||||
$FIXPATH_CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
|
||||
$CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
|
||||
cd $CURDIR
|
||||
|
||||
if test ! -x $FIXPATH_BIN; then
|
||||
@@ -424,10 +414,9 @@ AC_DEFUN_ONCE([BASIC_COMPILE_FIXPATH],
|
||||
AC_MSG_RESULT([yes])
|
||||
AC_MSG_CHECKING([if fixpath.exe works])
|
||||
cd $FIXPATH_DIR
|
||||
$FIXPATH $FIXPATH_CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
|
||||
$FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
|
||||
> $FIXPATH_DIR/fixpath2.log 2>&1
|
||||
cd $CURDIR
|
||||
export LIB="$OLDLIB"
|
||||
if test ! -x $FIXPATH_DIR/fixpath2.exe; then
|
||||
AC_MSG_RESULT([no])
|
||||
cat $FIXPATH_DIR/fixpath2.log
|
||||
|
||||
@@ -30,13 +30,13 @@
|
||||
# First include the real base spec.gmk file
|
||||
include @SPEC@
|
||||
|
||||
CC := @FIXPATH@ @BUILD_CC@
|
||||
CXX := @FIXPATH@ @BUILD_CXX@
|
||||
LD := @FIXPATH@ @BUILD_LD@
|
||||
LDCXX := @FIXPATH@ @BUILD_LDCXX@
|
||||
AS := @FIXPATH@ @BUILD_AS@
|
||||
CC := @BUILD_CC@
|
||||
CXX := @BUILD_CXX@
|
||||
LD := @BUILD_LD@
|
||||
LDCXX := @BUILD_LDCXX@
|
||||
AS := @BUILD_AS@
|
||||
NM := @BUILD_NM@
|
||||
AR := @FIXPATH@ @BUILD_AR@
|
||||
AR := @BUILD_AR@
|
||||
OBJCOPY := @BUILD_OBJCOPY@
|
||||
STRIP := @BUILD_STRIP@
|
||||
SYSROOT_CFLAGS := @BUILD_SYSROOT_CFLAGS@
|
||||
@@ -75,8 +75,6 @@ JVM_LDFLAGS := @OPENJDK_BUILD_JVM_LDFLAGS@
|
||||
JVM_ASFLAGS := @OPENJDK_BUILD_JVM_ASFLAGS@
|
||||
JVM_LIBS := @OPENJDK_BUILD_JVM_LIBS@
|
||||
|
||||
FDLIBM_CFLAGS := @OPENJDK_BUILD_FDLIBM_CFLAGS@
|
||||
|
||||
# The compiler for the build platform is likely not warning compatible with the official
|
||||
# compiler.
|
||||
WARNINGS_AS_ERRORS := false
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
SRC#
|
||||
# Copyright (c) 2011, 2018, 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
|
||||
@@ -98,9 +98,6 @@ HOTSPOT_SETUP_JVM_VARIANTS
|
||||
# With basic setup done, call the custom early hook.
|
||||
CUSTOM_EARLY_HOOK
|
||||
|
||||
# This only needs debug level to be setup
|
||||
JDKOPT_ALLOW_ABSOLUTE_PATHS_IN_OUTPUT
|
||||
|
||||
# Check if we have devkits, extra paths or sysroot set.
|
||||
BASIC_SETUP_DEVKIT
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user