mirror of
https://github.com/JetBrains/JetBrainsRuntime.git
synced 2025-12-07 09:59:37 +01:00
Compare commits
5 Commits
openjdk
...
vpr/win_bu
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e19b381386 | ||
|
|
05e5825e91 | ||
|
|
af2c3fb0bb | ||
|
|
d1f108da17 | ||
|
|
5a5356aaed |
274
jb/branchdiff.py
Executable file
274
jb/branchdiff.py
Executable file
@@ -0,0 +1,274 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import argparse
|
||||
import os.path
|
||||
import sys
|
||||
import subprocess
|
||||
|
||||
errors_count = 0
|
||||
|
||||
|
||||
def fatal(msg):
|
||||
sys.stderr.write(f"[fatal] {msg}\n")
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
def error(msg):
|
||||
global errors_count
|
||||
errors_count += 1
|
||||
sys.stderr.write(f"[error] {msg}\n")
|
||||
|
||||
|
||||
def verbose(options, *msg):
|
||||
if options.verbose:
|
||||
sys.stderr.write(f"[verbose] ")
|
||||
sys.stderr.write(*msg)
|
||||
sys.stderr.write('\n')
|
||||
|
||||
|
||||
def first_line(str):
|
||||
return "" if not str else str.splitlines()[0]
|
||||
|
||||
|
||||
class Options:
|
||||
def __init__(self):
|
||||
ap = argparse.ArgumentParser(description="Show commit differences between branches of JBR git repos",
|
||||
epilog="Example: %(prog)s --from origin/jbr17 --to jbr17.b469 --path "
|
||||
"src/hotspot --limit 200")
|
||||
ap.add_argument('--jbr', dest='jbrpath', help='path to JBR git root', required=True)
|
||||
ap.add_argument('--from', dest='frombranch', help='branch to take commits from', required=True)
|
||||
ap.add_argument('--to', dest='tobranch', help='branch to apply new commits to', required=True)
|
||||
ap.add_argument('--path', dest='path', help='limit to changes in this path (relative to git root)')
|
||||
ap.add_argument('--limit', dest='limit', help='limit to this many log entries in --jdk repo', type=int,
|
||||
default=-1)
|
||||
ap.add_argument('--html', dest="ishtml", help="print out HTML rather than plain text", action='store_true')
|
||||
ap.add_argument('-o', dest="output", help="print the list of missing commits to this file"
|
||||
" to be used as exclude list later")
|
||||
ap.add_argument('--exclude', dest='exclude', help='exclude commits listed in the given file '
|
||||
'(can use edited -o output file as input here)')
|
||||
ap.add_argument('-v', dest='verbose', help="verbose output", default=False, action='store_true')
|
||||
args = ap.parse_args()
|
||||
|
||||
if not os.path.isdir(args.jbrpath):
|
||||
fatal(f"{args.jbrpath} not a directory")
|
||||
|
||||
if not git_is_available():
|
||||
fatal("can't run git commands; make sure git is in PATH")
|
||||
|
||||
self.frombranch = args.frombranch
|
||||
self.tobranch = args.tobranch
|
||||
self.jbrpath = args.jbrpath
|
||||
self.path = args.path
|
||||
self.limit = args.limit
|
||||
self.exclude = args.exclude
|
||||
self.output = args.output
|
||||
self.ishtml = args.ishtml
|
||||
self.verbose = args.verbose
|
||||
|
||||
|
||||
class GitRepo:
|
||||
def __init__(self, rootpath):
|
||||
self.rootpath = rootpath
|
||||
|
||||
def run_git_cmd(self, git_args):
|
||||
args = ["git", "-C", self.rootpath]
|
||||
args.extend(git_args)
|
||||
# print(f"Runnig git cmd '{' '.join(args)}'")
|
||||
p = subprocess.run(args, capture_output=True, text=True)
|
||||
if p.returncode != 0:
|
||||
fatal(f"git returned non-zero code in {self.rootpath} ({first_line(p.stderr)})")
|
||||
return p.stdout
|
||||
|
||||
def save_git_cmd(self, fname, git_args):
|
||||
args = ["git", "-C", self.rootpath]
|
||||
args.extend(git_args)
|
||||
# print(f"Runnig git cmd '{' '.join(args)}'")
|
||||
with open(fname, "w") as stdout_file:
|
||||
p = subprocess.run(args, stdout=stdout_file)
|
||||
if p.returncode != 0:
|
||||
fatal(f"git returned non-zero code in {self.rootpath} ({first_line(p.stderr)})")
|
||||
|
||||
def current_branch(self):
|
||||
branch_name = self.run_git_cmd(["branch", "--show-current"]).strip()
|
||||
return branch_name
|
||||
|
||||
def log(self, branch, path=None, limit=None):
|
||||
cmds = ["log", "--no-decorate", branch]
|
||||
if limit:
|
||||
cmds.extend(["-n", str(limit)])
|
||||
if path:
|
||||
cmds.append(path)
|
||||
full_log = self.run_git_cmd(cmds)
|
||||
return full_log
|
||||
|
||||
|
||||
class Commit:
|
||||
def __init__(self, lines):
|
||||
self.sha = lines[0].split()[1]
|
||||
self.message = ""
|
||||
self.fullmessage = ""
|
||||
self.bugid = ""
|
||||
|
||||
# Commit message starts after one blank line
|
||||
read_message = False
|
||||
for l in lines:
|
||||
if read_message:
|
||||
self.fullmessage += l.strip() + "\n"
|
||||
if not read_message and l == "":
|
||||
read_message = True
|
||||
|
||||
if len(self.fullmessage) > 0:
|
||||
self.message = first_line(self.fullmessage).strip()
|
||||
t = self.message.split(' ')
|
||||
if len(t) > 1:
|
||||
bugid = t[0]
|
||||
if bugid.startswith("fixup"):
|
||||
bugid = t[1]
|
||||
bugid = bugid.strip(":")
|
||||
if bugid.startswith("JBR-") or bugid.isnumeric():
|
||||
self.bugid = bugid
|
||||
|
||||
|
||||
class History:
|
||||
def __init__(self, log):
|
||||
log_itr = iter(log.splitlines())
|
||||
self.commits = []
|
||||
self.unique_fullmessages = set()
|
||||
self.duplicates = set()
|
||||
commit_lines = []
|
||||
for line in log_itr:
|
||||
if line.startswith("commit ") and len(commit_lines) > 0:
|
||||
commit = Commit(commit_lines)
|
||||
self.add_commit(commit)
|
||||
commit_lines = []
|
||||
commit_lines.append(line)
|
||||
|
||||
if len(commit_lines) > 0:
|
||||
commit = Commit(commit_lines)
|
||||
self.add_commit(commit)
|
||||
|
||||
def add_commit(self, commit):
|
||||
self.commits.append(commit)
|
||||
if commit.fullmessage in self.unique_fullmessages:
|
||||
self.duplicates.add(commit.fullmessage)
|
||||
else:
|
||||
self.unique_fullmessages.add(commit.fullmessage)
|
||||
|
||||
def appears_more_than_once(self, commit):
|
||||
return commit.fullmessage in self.duplicates
|
||||
|
||||
def contains(self, commit):
|
||||
return commit.fullmessage in self.unique_fullmessages
|
||||
|
||||
def size(self):
|
||||
return len(self.commits)
|
||||
|
||||
|
||||
def print_explanation(options, jbr):
|
||||
verbose(options, f"Reading history from '{jbr.rootpath}'")
|
||||
if options.path:
|
||||
verbose(options, f"\t(only under '{options.path}')")
|
||||
if options.limit > 0:
|
||||
verbose(options, f"\t(up to '{options.limit}' commits)")
|
||||
verbose(options, f"Searching for missing fixes in '{options.tobranch}' compared with '{options.frombranch}'")
|
||||
|
||||
|
||||
def git_is_available():
|
||||
p = None
|
||||
try:
|
||||
p = subprocess.run(["git", "--help"], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
|
||||
except:
|
||||
pass
|
||||
return p is not None and p.returncode == 0
|
||||
|
||||
|
||||
def main():
|
||||
check_python_min_requirements()
|
||||
options = Options()
|
||||
jbr = GitRepo(options.jbrpath)
|
||||
print_explanation(options, jbr)
|
||||
|
||||
commits_to_save = []
|
||||
try:
|
||||
log_from = jbr.log(options.frombranch, options.path, options.limit)
|
||||
log_to = jbr.log(options.tobranch, options.path, options.limit)
|
||||
history_from = History(log_from)
|
||||
history_to = History(log_to)
|
||||
|
||||
verbose(options,
|
||||
f"Read {history_from.size()} commits from '{options.frombranch}', {history_to.size()} from {options.tobranch}")
|
||||
|
||||
exclude_list = []
|
||||
if options.exclude:
|
||||
with open(options.exclude, "r") as exclude_file:
|
||||
l = exclude_file.read().split('\n')
|
||||
exclude_list = list(filter(lambda line: not line.startswith("#"), l))
|
||||
|
||||
warned = set()
|
||||
for c in history_from.commits:
|
||||
if c.message:
|
||||
verbose(options, f"Looking for commit '{c.message}'")
|
||||
if c.message in exclude_list:
|
||||
verbose(options, "...nope, in exclude list")
|
||||
continue
|
||||
|
||||
if not history_to.contains(c):
|
||||
commits_to_save.append(c)
|
||||
else:
|
||||
if history_from.appears_more_than_once(c) and c.fullmessage not in warned:
|
||||
# Not sure which of those seemingly identical commits are present in the target branch
|
||||
error(f"Commit '{c.message}' appears more than once in branch '{options.frombranch}'. ")
|
||||
warned.add(c.fullmessage)
|
||||
except KeyboardInterrupt:
|
||||
fatal("Interrupted")
|
||||
|
||||
print_out_commits(options, commits_to_save)
|
||||
save_commits_to_file(commits_to_save, options)
|
||||
if errors_count > 0:
|
||||
error(f"{errors_count} error(s) generated to stderr. MANUAL CHECK OF COMMITS IS REQUIRED.")
|
||||
|
||||
|
||||
def save_commits_to_file(commits_to_save, options):
|
||||
if len(commits_to_save) > 0 and options.output:
|
||||
print()
|
||||
with open(options.output, "w") as out:
|
||||
for i, c in enumerate(reversed(commits_to_save)):
|
||||
print(f"# {c.sha}", file=out)
|
||||
print(c.message, file=out)
|
||||
|
||||
|
||||
def print_out_commits(options, commits_to_save):
|
||||
if options.ishtml:
|
||||
print("<html><body>")
|
||||
print(f"<p><b>Commits on <code>{options.frombranch}</code>"
|
||||
f" missing from <code>{options.tobranch}</code></b></p></h1>")
|
||||
if len(commits_to_save) > 0:
|
||||
for c in sorted(commits_to_save, key=lambda commit: commit.bugid):
|
||||
if options.ishtml:
|
||||
msg = c.message
|
||||
bugurl = ""
|
||||
if c.bugid:
|
||||
if c.bugid.isnumeric():
|
||||
bugurl = f"https://bugs.openjdk.org/browse/JDK-{c.bugid}"
|
||||
elif c.bugid.startswith("JBR-"):
|
||||
bugurl = f"https://youtrack.jetbrains.com/issue/{c.bugid}"
|
||||
|
||||
if len(bugurl) > 0:
|
||||
msg = msg.replace(c.bugid, f"<a href='{bugurl}'>{c.bugid}</a>")
|
||||
|
||||
sha = f"<a href='https://jetbrains.team/p/jbre/repositories/jbr/commits?commits={c.sha}'>" \
|
||||
f"{c.sha[0:8]}</a>"
|
||||
print(f"<li>{msg} ({sha})</li>")
|
||||
else:
|
||||
print(f"{c.message} ({c.sha[0:8]})")
|
||||
if options.ishtml:
|
||||
print("</body></html>")
|
||||
|
||||
|
||||
def check_python_min_requirements():
|
||||
if sys.version_info < (3, 6):
|
||||
fatal("Minimum version 3.6 is required to run this script")
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
12
jb/generate-wakefield.sh
Executable file
12
jb/generate-wakefield.sh
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [[ -z "$1" ]]; then
|
||||
SCANNER=wayland-scanner
|
||||
else
|
||||
SCANNER="$1"
|
||||
fi
|
||||
|
||||
set -ex
|
||||
|
||||
"$SCANNER" client-header src/java.desktop/share/native/libwakefield/protocol/wakefield.xml src/java.desktop/unix/native/libawt_wlawt/wakefield-client-protocol.h
|
||||
"$SCANNER" private-code src/java.desktop/share/native/libwakefield/protocol/wakefield.xml src/java.desktop/unix/native/libawt_wlawt/wakefield-client-protocol.c
|
||||
1
jb/jbr-api.version
Normal file
1
jb/jbr-api.version
Normal file
@@ -0,0 +1 @@
|
||||
1.0.2
|
||||
230
jb/jdkdiff.py
Executable file
230
jb/jdkdiff.py
Executable file
@@ -0,0 +1,230 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import argparse
|
||||
import math
|
||||
import os.path
|
||||
import sys
|
||||
import subprocess
|
||||
|
||||
|
||||
def fatal(msg):
|
||||
sys.stderr.write(f"[fatal] {msg}\n")
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
def verbose(options, *msg):
|
||||
if options.verbose:
|
||||
sys.stdout.write(f"[verbose] ")
|
||||
sys.stdout.write(*msg)
|
||||
sys.stdout.write('\n')
|
||||
|
||||
|
||||
def first_line(str):
|
||||
return "" if not str else str.splitlines()[0]
|
||||
|
||||
|
||||
class Options:
|
||||
def __init__(self):
|
||||
ap = argparse.ArgumentParser(description="Show bugfixes differences between JBR and OpenJDK git repos",
|
||||
epilog="Example: %(prog)s --jdk ./jdk11u/ --jbr ./JetBrainsRuntime/ --path src/hotspot --limit 200")
|
||||
ap.add_argument('--jdk', dest='jdkpath', help='path to OpenJDK git repo', required=True)
|
||||
ap.add_argument('--jbr', dest='jbrpath', help='path to JBR git repo', required=True)
|
||||
ap.add_argument('--path', dest='path', help='limit to changes in this path (relative to git root)')
|
||||
ap.add_argument('--limit', dest='limit', help='limit to this many log entries in --jdk repo', type=int, default=-1)
|
||||
ap.add_argument('-o', dest="output_dir", help="save patches to this directory (created if necessary)")
|
||||
ap.add_argument('-v', dest='verbose', help="verbose output", default=False, action='store_true')
|
||||
args = ap.parse_args()
|
||||
|
||||
if not os.path.isdir(args.jdkpath):
|
||||
fatal(f"{args.jdkpath} not a directory")
|
||||
|
||||
if not os.path.isdir(args.jbrpath):
|
||||
fatal(f"{args.jbrpath} not a directory")
|
||||
|
||||
if not git_is_available():
|
||||
fatal("can't run git commands; make sure git is in PATH")
|
||||
|
||||
self.jdkpath = args.jdkpath
|
||||
self.jbrpath = args.jbrpath
|
||||
self.path = args.path
|
||||
self.limit = args.limit
|
||||
self.output_dir = args.output_dir
|
||||
self.verbose = args.verbose
|
||||
|
||||
|
||||
class GitRepo:
|
||||
def __init__(self, rootpath):
|
||||
self.rootpath = rootpath
|
||||
|
||||
def run_git_cmd(self, git_args):
|
||||
args = ["git", "-C", self.rootpath]
|
||||
args.extend(git_args)
|
||||
# print(f"Runnig git cmd '{' '.join(args)}'")
|
||||
p = subprocess.run(args, capture_output=True, text=True)
|
||||
if p.returncode != 0:
|
||||
fatal(f"git returned non-zero code in {self.rootpath} ({first_line(p.stderr)})")
|
||||
return p.stdout
|
||||
|
||||
def save_git_cmd(self, fname, git_args):
|
||||
args = ["git", "-C", self.rootpath]
|
||||
args.extend(git_args)
|
||||
# print(f"Runnig git cmd '{' '.join(args)}'")
|
||||
with open(fname, "w") as stdout_file:
|
||||
p = subprocess.run(args, stdout=stdout_file)
|
||||
if p.returncode != 0:
|
||||
fatal(f"git returned non-zero code in {self.rootpath} ({first_line(p.stderr)})")
|
||||
|
||||
def current_branch(self):
|
||||
branch_name = self.run_git_cmd(["branch", "--show-current"]).strip()
|
||||
return branch_name
|
||||
|
||||
def log(self, path=None, limit=None):
|
||||
cmds = ["log", "--no-decorate"]
|
||||
if limit:
|
||||
cmds.extend(["-n", str(limit)])
|
||||
if path:
|
||||
cmds.append(path)
|
||||
full_log = self.run_git_cmd(cmds)
|
||||
return full_log
|
||||
|
||||
|
||||
class Commit:
|
||||
def __init__(self, lines):
|
||||
self.sha = lines[0].split()[1]
|
||||
self.message = ""
|
||||
self.bugid = None
|
||||
|
||||
# Commit message starts after one blank line
|
||||
read_message = False
|
||||
for l in lines:
|
||||
if read_message:
|
||||
self.message += l + "\n"
|
||||
if not read_message and l == "":
|
||||
read_message = True
|
||||
|
||||
if self.message and self.message != "" and ":" in self.message:
|
||||
maybe_bugid = self.message.split(":")[0].strip()
|
||||
if 10 >= len(maybe_bugid) >= 4:
|
||||
self.bugid = maybe_bugid
|
||||
|
||||
|
||||
class History:
|
||||
def __init__(self, log):
|
||||
log_itr = iter(log.splitlines())
|
||||
self.commits = []
|
||||
commit_lines = []
|
||||
for line in log_itr:
|
||||
if line.startswith("commit ") and len(commit_lines) > 0:
|
||||
commit = Commit(commit_lines)
|
||||
self.commits.append(commit)
|
||||
commit_lines = []
|
||||
commit_lines.append(line)
|
||||
|
||||
if len(commit_lines) > 0:
|
||||
commit = Commit(commit_lines)
|
||||
self.commits.append(commit)
|
||||
|
||||
def contains(self, str):
|
||||
return any(str in commit.message for commit in self.commits)
|
||||
|
||||
def size(self):
|
||||
return len(self.commits)
|
||||
|
||||
|
||||
def print_explanation(options, jdk, jbr):
|
||||
verbose(options, f"Reading history from '{jdk.rootpath}' on branch '{jdk.current_branch()}'")
|
||||
if options.path:
|
||||
verbose(options, f"\t(only under '{options.path}')")
|
||||
verbose(options, f"Searching for same fixes in '{jbr.rootpath}' on branch '{jbr.current_branch()}'")
|
||||
|
||||
|
||||
def git_is_available():
|
||||
p = None
|
||||
try:
|
||||
p = subprocess.run(["git", "--help"], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
|
||||
except:
|
||||
pass
|
||||
return p is not None and p.returncode == 0
|
||||
|
||||
|
||||
def main():
|
||||
check_python_min_requirements()
|
||||
|
||||
options = Options()
|
||||
|
||||
jdk = GitRepo(options.jdkpath)
|
||||
jbr = GitRepo(options.jbrpath)
|
||||
|
||||
print_explanation(options, jdk, jbr)
|
||||
|
||||
commits_to_save = []
|
||||
try:
|
||||
jdk_log = jdk.log(options.path, options.limit)
|
||||
jdk_history = History(jdk_log)
|
||||
|
||||
jbr_log = jbr.log(options.path)
|
||||
jbr_history = History(jbr_log)
|
||||
|
||||
verbose(options, f"Read {jdk_history.size()} commits in JDK, {jbr_history.size()} in JBR")
|
||||
|
||||
for c in jdk_history.commits:
|
||||
if c.bugid:
|
||||
verbose(options, f"Looking for bugfix for {c.bugid}")
|
||||
if not jbr_history.contains(c.bugid):
|
||||
commits_to_save.append(c)
|
||||
print(f"[note] Fix for {c.bugid} not found in JBR ({jbr.rootpath})")
|
||||
print(f" commit {c.sha}")
|
||||
print(f" {first_line(c.message).strip()}")
|
||||
except KeyboardInterrupt:
|
||||
fatal("Interrupted")
|
||||
|
||||
if len(commits_to_save) > 0 and options.output_dir:
|
||||
print()
|
||||
if not os.path.exists(options.output_dir):
|
||||
verbose(options, f"Creating output directory {options.output_dir}")
|
||||
os.makedirs(options.output_dir)
|
||||
nzeroes = len(str(len(commits_to_save)))
|
||||
for i, c in enumerate(reversed(commits_to_save)):
|
||||
fname = os.path.join(options.output_dir, f"{str(i).zfill(nzeroes)}-{c.bugid}.patch")
|
||||
print(f"[note] {c.bugid} saved as {fname}")
|
||||
fname = os.path.abspath(fname)
|
||||
jdk.save_git_cmd(fname, ["format-patch", "-1", c.sha, "--stdout"])
|
||||
|
||||
script_fname = os.path.join(options.output_dir, "apply.sh")
|
||||
with open(script_fname, "w") as script_file:
|
||||
print(apply_script_code.format(os.path.abspath(jbr.rootpath), os.path.abspath(options.output_dir)),
|
||||
file=script_file)
|
||||
print(f"[note] Execute 'bash {script_fname}' to apply patches to {jbr.rootpath}")
|
||||
|
||||
|
||||
def check_python_min_requirements():
|
||||
if sys.version_info < (3, 6):
|
||||
fatal("Minimum version 3.6 is required to run this script")
|
||||
|
||||
|
||||
apply_script_code = """
|
||||
#!/bin/bash
|
||||
|
||||
GITROOT={0}
|
||||
PATCHROOT={1}
|
||||
|
||||
cd $PATCHROOT || exit 1
|
||||
PATCHES=$(find $PATCHROOT -name '*.patch' | sort -n)
|
||||
|
||||
for P in $PATCHES; do
|
||||
git -C $GITROOT am $P
|
||||
if [ $? != 0 ]; then
|
||||
mv "$P" "$P.failed"
|
||||
echo "[ERROR] Patch $P did not apply cleanly. Try applying it manually."
|
||||
echo "[NOTE] Execute this script to apply the remaining patches."
|
||||
exit 1
|
||||
else
|
||||
mv "$P" "$P.done"
|
||||
fi
|
||||
done
|
||||
|
||||
echo "[NOTE] Done applying patches; check $PATCHROOT for .patch and .patch.failed to see if all have been applied."
|
||||
"""
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
1
jb/project/idea-project-files/jdk-clion/.idea/.name
generated
Normal file
1
jb/project/idea-project-files/jdk-clion/.idea/.name
generated
Normal file
@@ -0,0 +1 @@
|
||||
JetBrainsRuntime
|
||||
20
jb/project/idea-project-files/jdk-clion/.idea/vcs.xml
generated
Normal file
20
jb/project/idea-project-files/jdk-clion/.idea/vcs.xml
generated
Normal file
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="IssueNavigationConfiguration">
|
||||
<option name="links">
|
||||
<list>
|
||||
<IssueNavigationLink>
|
||||
<option name="issueRegexp" value="(?:^|\s|\p{Punct})([A-Z]+\-\d+)(?=$|\s|\p{Punct})" />
|
||||
<option name="linkRegexp" value="https://youtrack.jetbrains.com/issue/$1" />
|
||||
</IssueNavigationLink>
|
||||
<IssueNavigationLink>
|
||||
<option name="issueRegexp" value="(?:^|\s|\p{Punct})(?:JDK-)?(\d{7})(?=$|\s|\p{Punct})" />
|
||||
<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>
|
||||
</project>
|
||||
11
jb/project/idea-project-files/modules.xml
Normal file
11
jb/project/idea-project-files/modules.xml
Normal file
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/jdk.iml" filepath="$PROJECT_DIR$/.idea/jdk.iml" />
|
||||
###MODULE_IMLS###
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/test.iml" filepath="$PROJECT_DIR$/.idea/test.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
||||
|
||||
20
jb/project/idea-project-files/vcs.xml
Normal file
20
jb/project/idea-project-files/vcs.xml
Normal file
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="IssueNavigationConfiguration">
|
||||
<option name="links">
|
||||
<list>
|
||||
<IssueNavigationLink>
|
||||
<option name="issueRegexp" value="(?:^|\s|\p{Punct})([A-Z]+\-\d+)(?=$|\s|\p{Punct})" />
|
||||
<option name="linkRegexp" value="https://youtrack.jetbrains.com/issue/$1" />
|
||||
</IssueNavigationLink>
|
||||
<IssueNavigationLink>
|
||||
<option name="issueRegexp" value="(?:^|\s|\p{Punct})(?:JDK-)?(\d{7})(?=$|\s|\p{Punct})" />
|
||||
<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>
|
||||
</project>
|
||||
135
jb/project/java-gradle/build.gradle
Normal file
135
jb/project/java-gradle/build.gradle
Normal file
@@ -0,0 +1,135 @@
|
||||
apply plugin: 'java'
|
||||
import org.gradle.internal.os.OperatingSystem
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
def test_jvm = {
|
||||
if (project.hasProperty('jbsdkhome')) {
|
||||
file(jbsdkhome + (OperatingSystem.current().isWindows()?"/bin/java.exe" : "/bin/java")).absolutePath
|
||||
} else {
|
||||
if (OperatingSystem.current().isMacOsX()) {
|
||||
file('../../../build/macosx-x86_64-normal-server-release/images/jdk-bundle/jdk-11.0.4.jdk/Contents/Home/bin/java').absolutePath
|
||||
} else if (OperatingSystem.current().isLinux()) {
|
||||
file('../../../build/linux-x86_64-normal-server-release/images/jdk/bin/java').absolutePath
|
||||
} else {
|
||||
file('../../../build/windows-x86_64-normal-server-release/images/jdk/bin/java.exe').absolutePath
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
testCompile('junit:junit:4.12'){
|
||||
exclude group: 'org.hamcrest'
|
||||
}
|
||||
testCompile 'org.hamcrest:hamcrest-library:1.3'
|
||||
testCompile 'net.java.dev.jna:jna:4.4.0'
|
||||
testCompile 'com.twelvemonkeys.imageio:imageio-tiff:3.3.2'
|
||||
testCompile 'org.apache.commons:commons-lang3:3.0'
|
||||
}
|
||||
|
||||
def jdk_modules = ["java.base", "java.logging", "java.prefs",
|
||||
"java.se.ee", "java.sql", "java.datatransfer",
|
||||
"java.management", "java.rmi", "java.security.jgss",
|
||||
"java.sql.rowset", "java.desktop", "java.management.rmi",
|
||||
"java.scripting", "java.security.sasl", "java.transaction",
|
||||
"java.instrument", "java.naming", "java.se",
|
||||
"java.smartcardio", "java.xml.crypto"]
|
||||
|
||||
def jdk_class_dirs = []
|
||||
|
||||
jdk_modules.collect(jdk_class_dirs) {
|
||||
new File("../../../src/" + it + "/share/classes")
|
||||
}
|
||||
|
||||
if (OperatingSystem.current().isMacOsX())
|
||||
jdk_modules.collect(jdk_class_dirs) {
|
||||
"../../../src/" + it + "/macosx/classes"
|
||||
}
|
||||
else if (OperatingSystem.current().isLinux()) {
|
||||
jdk_modules.collect(jdk_class_dirs) {
|
||||
"../../../src/" + it + "/solaris/classes"
|
||||
}
|
||||
jdk_modules.collect(jdk_class_dirs) {
|
||||
"../../../src/" + it + "/unix/classes"
|
||||
}
|
||||
} else
|
||||
jdk_modules.collect(jdk_class_dirs) {
|
||||
"../../../src/" + it + "/windows/classes"
|
||||
}
|
||||
|
||||
sourceSets.main.java.srcDirs = jdk_class_dirs
|
||||
|
||||
sourceSets {
|
||||
test {
|
||||
java {
|
||||
srcDir "../../../test/jdk/jbu"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
test.dependsOn.clear()
|
||||
|
||||
test.dependsOn tasks.compileTestJava
|
||||
|
||||
test {
|
||||
systemProperty "jb.java2d.metal", "true"
|
||||
systemProperty "testdata", file('../../../test/jdk/jbu/testdata').absolutePath
|
||||
|
||||
// Generate golden images for DroidFontTest and MixedTextTest
|
||||
// systemProperty "gentestdata", ""
|
||||
|
||||
// Enable Java2D logging (https://confluence.jetbrains.com/display/JRE/Java2D+Rendering+Logging)
|
||||
// systemProperty "sun.java2d.trace", "log"
|
||||
// systemProperty "sun.java2d.trace", "log,pimpl"
|
||||
|
||||
outputs.upToDateWhen { false }
|
||||
executable = test_jvm()
|
||||
|
||||
// Enable async/dtrace profiler
|
||||
jvmArgs "-XX:+PreserveFramePointer"
|
||||
// Enable native J2D logging (only in debug build)
|
||||
// Can be turned on for J2D by adding "#define DEBUG 1" into jdk/src/share/native/sun/java2d/Trace.h
|
||||
|
||||
// environment 'J2D_TRACE_LEVEL', '4'
|
||||
}
|
||||
|
||||
def buildDir = project.buildscript.sourceFile.parentFile.parentFile.parentFile.parentFile
|
||||
|
||||
def make_cmd = "make"
|
||||
if (OperatingSystem.current().isWindows()) {
|
||||
def cyg_make_cmd = new File("c:/cygwin64/bin/make.exe")
|
||||
if (cyg_make_cmd.exists()) make_cmd = cyg_make_cmd.absolutePath
|
||||
}
|
||||
def test_run = false
|
||||
task make_images {
|
||||
doLast {
|
||||
if (!test_run) {
|
||||
def pb = new ProcessBuilder().command(make_cmd.toString(), "-C", buildDir.absolutePath, "images")
|
||||
def proc = pb.redirectErrorStream(true).start()
|
||||
proc.inputStream.eachLine { println it }
|
||||
assert proc.waitFor() == 0
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
task make_clean {
|
||||
doLast {
|
||||
def pb = new ProcessBuilder().command(make_cmd.toString(), "-C", buildDir.absolutePath, "clean")
|
||||
def proc = pb.redirectErrorStream(true).start()
|
||||
proc.inputStream.eachLine { println it }
|
||||
assert proc.waitFor() == 0
|
||||
}
|
||||
}
|
||||
|
||||
task run_test {
|
||||
doLast {
|
||||
test_run = true
|
||||
}
|
||||
}
|
||||
|
||||
tasks.cleanTest.dependsOn tasks.run_test
|
||||
classes.dependsOn.clear()
|
||||
classes.dependsOn tasks.make_images
|
||||
tasks.cleanClasses.dependsOn tasks.make_clean
|
||||
52
jb/project/tools/common/modules.list
Normal file
52
jb/project/tools/common/modules.list
Normal file
@@ -0,0 +1,52 @@
|
||||
java.base,
|
||||
java.datatransfer,
|
||||
java.desktop,
|
||||
java.instrument,
|
||||
java.logging,
|
||||
java.management,
|
||||
java.management.rmi,
|
||||
java.naming,
|
||||
java.net.http,
|
||||
java.prefs,
|
||||
java.rmi,
|
||||
java.scripting,
|
||||
java.se,
|
||||
java.security.jgss,
|
||||
java.security.sasl,
|
||||
java.smartcardio,
|
||||
java.sql,
|
||||
java.sql.rowset,
|
||||
java.transaction.xa,
|
||||
java.xml,
|
||||
java.xml.crypto,
|
||||
jdk.accessibility,
|
||||
jdk.attach,
|
||||
jdk.charsets,
|
||||
jdk.crypto.cryptoki,
|
||||
jdk.crypto.ec,
|
||||
jdk.dynalink,
|
||||
jdk.httpserver,
|
||||
jdk.internal.ed,
|
||||
jdk.internal.le,
|
||||
jdk.internal.vm.ci,
|
||||
jdk.javadoc,
|
||||
jdk.jdi,
|
||||
jdk.jdwp.agent,
|
||||
jdk.jfr,
|
||||
jdk.jsobject,
|
||||
jdk.localedata,
|
||||
jdk.management,
|
||||
jdk.management.agent,
|
||||
jdk.management.jfr,
|
||||
jdk.naming.dns,
|
||||
jdk.naming.rmi,
|
||||
jdk.net,
|
||||
jdk.sctp,
|
||||
jdk.security.auth,
|
||||
jdk.security.jgss,
|
||||
jdk.unsupported,
|
||||
jdk.unsupported.desktop,
|
||||
jdk.xml.dom,
|
||||
jdk.zipfs,
|
||||
jdk.hotspot.agent,
|
||||
jdk.jcmd
|
||||
188
jb/project/tools/common/scripts/common.sh
Normal file
188
jb/project/tools/common/scripts/common.sh
Normal file
@@ -0,0 +1,188 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
set -x
|
||||
|
||||
function check_bundle_type_maketest() {
|
||||
# check whether last char is 't', if so remove it
|
||||
if [ "${bundle_type: -1}" == "t" ] && [ "${bundle_type: -2}" != "ft" ]; then
|
||||
bundle_type="${bundle_type%?}"
|
||||
do_maketest=1
|
||||
else
|
||||
do_maketest=0
|
||||
fi
|
||||
}
|
||||
|
||||
function getVersionProp() {
|
||||
grep "^${1}" make/conf/version-numbers.conf | cut -d'=' -f2
|
||||
}
|
||||
|
||||
DISABLE_WARNINGS_AS_ERRORS=""
|
||||
while getopts ":iw?" o; do
|
||||
case "${o}" in
|
||||
i) INC_BUILD=1 ;;
|
||||
w) DISABLE_WARNINGS_AS_ERRORS="--disable-warnings-as-errors" ;;
|
||||
esac
|
||||
done
|
||||
shift $((OPTIND-1))
|
||||
|
||||
if [[ $# -lt 2 ]]; then
|
||||
echo "Required at least two arguments: build_number bundle_type"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
build_number=$1
|
||||
bundle_type=$2
|
||||
# shellcheck disable=SC2034
|
||||
architecture=${3:-x64} # aarch64 or x64
|
||||
|
||||
check_bundle_type_maketest
|
||||
|
||||
tag_prefix="jdk-"
|
||||
VERSION_FEATURE=$(getVersionProp "DEFAULT_VERSION_FEATURE")
|
||||
VERSION_INTERIM=$(getVersionProp "DEFAULT_VERSION_INTERIM")
|
||||
VERSION_UPDATE=$(getVersionProp "DEFAULT_VERSION_UPDATE")
|
||||
VERSION_PATCH=$(getVersionProp "DEFAULT_VERSION_PATCH")
|
||||
[[ $VERSION_UPDATE = 0 ]] && JBSDK_VERSION="$VERSION_FEATURE" || JBSDK_VERSION="${VERSION_FEATURE}.${VERSION_INTERIM}.${VERSION_UPDATE}"
|
||||
[[ $VERSION_PATCH = 0 ]] || JBSDK_VERSION="${VERSION_FEATURE}.${VERSION_INTERIM}.${VERSION_UPDATE}.${VERSION_PATCH}"
|
||||
echo "##teamcity[setParameter name='env.JBSDK_VERSION' value='${JBSDK_VERSION}']"
|
||||
OPENJDK_TAG=$(git tag -l | grep "$tag_prefix$JBSDK_VERSION" | grep -v ga | sort -t "-" -k 2 -g | tail -n 1)
|
||||
JDK_BUILD_NUMBER=${JDK_BUILD_NUMBER:=$(echo $OPENJDK_TAG | awk -F "-|[+]" '{print $3}')}
|
||||
[ -z $JDK_BUILD_NUMBER ] && JDK_BUILD_NUMBER=1
|
||||
re='^[0-9]+$'
|
||||
if ! [[ $JDK_BUILD_NUMBER =~ $re ]] ; then
|
||||
echo "error: JDK_BUILD_NUMBER Not a number: $JDK_BUILD_NUMBER"
|
||||
JDK_BUILD_NUMBER=1
|
||||
fi
|
||||
echo "##teamcity[setParameter name='env.JDK_UPDATE_NUMBER' value='${JDK_BUILD_NUMBER}']"
|
||||
|
||||
VENDOR_NAME="JetBrains s.r.o."
|
||||
VENDOR_VERSION_STRING="JBR-${JBSDK_VERSION}+${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
|
||||
|
||||
STATIC_CONF_ARGS=""
|
||||
common_conf_props_file="jb/project/tools/common/static_conf_args.txt"
|
||||
if [[ -f "$common_conf_props_file" ]]; then
|
||||
STATIC_CONF_ARGS=$(<$common_conf_props_file)
|
||||
fi
|
||||
OS_NAME=$(uname -s)
|
||||
# Enable reproducible builds
|
||||
TZ=UTC
|
||||
export TZ
|
||||
SOURCE_DATE_EPOCH="$(git log -1 --pretty=%ct)"
|
||||
export SOURCE_DATE_EPOCH
|
||||
|
||||
COPYRIGHT_YEAR=""
|
||||
BUILD_TIME=""
|
||||
TOUCH_TIME=""
|
||||
REPRODUCIBLE_TAR_OPTS=""
|
||||
case "$OS_NAME" in
|
||||
Linux)
|
||||
COPYRIGHT_YEAR="$(date --utc --date=@$SOURCE_DATE_EPOCH +%Y)"
|
||||
BUILD_TIME="$(date --utc --date=@$SOURCE_DATE_EPOCH +%F)"
|
||||
REPRODUCIBLE_TAR_OPTS="--mtime=@$SOURCE_DATE_EPOCH --owner=0 --group=0 --numeric-owner --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=atime,delete=ctime"
|
||||
;;
|
||||
CYGWIN*)
|
||||
COPYRIGHT_YEAR="$(date --utc --date=@$SOURCE_DATE_EPOCH +%Y)"
|
||||
BUILD_TIME="$(date --utc --date=@$SOURCE_DATE_EPOCH +%F)"
|
||||
REPRODUCIBLE_TAR_OPTS="--mtime=@$SOURCE_DATE_EPOCH --owner=0 --group=0 --numeric-owner --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=atime,delete=ctime"
|
||||
;;
|
||||
Darwin)
|
||||
COPYRIGHT_YEAR="$(date -u -r $SOURCE_DATE_EPOCH +%Y)"
|
||||
BUILD_TIME="$(date -u -r $SOURCE_DATE_EPOCH +%F)"
|
||||
TOUCH_TIME="$(date -u -r $SOURCE_DATE_EPOCH +%Y%m%d%H%M.%S)"
|
||||
REPRODUCIBLE_TAR_OPTS="--uid 0 --gid 0 --numeric-owner"
|
||||
;;
|
||||
esac
|
||||
|
||||
WITH_ZIPPED_NATIVE_DEBUG_SYMBOLS="--with-native-debug-symbols=zipped"
|
||||
|
||||
if [ "$bundle_type" == "nomodft" ]; then
|
||||
WITH_BUNDLED_FREETYPE="--with-freetype=bundled"
|
||||
else
|
||||
WITH_BUNDLED_FREETYPE=""
|
||||
fi
|
||||
|
||||
REPRODUCIBLE_BUILD_OPTS="--with-source-date=$SOURCE_DATE_EPOCH
|
||||
--with-hotspot-build-time=$BUILD_TIME
|
||||
--with-copyright-year=$COPYRIGHT_YEAR
|
||||
--disable-absolute-paths-in-output
|
||||
--with-build-user=builduser"
|
||||
|
||||
function zip_native_debug_symbols() {
|
||||
image_bundle_path=$(echo $1 | cut -d"/" -f-4)
|
||||
jdk_name=$(echo $1 | cut -d"/" -f5)
|
||||
jbr_diz_name=$2
|
||||
|
||||
[ -d "dizfiles" ] && rm -rf dizfiles
|
||||
mkdir dizfiles
|
||||
|
||||
rsync_target="../../../../dizfiles"
|
||||
[ -z "$jdk_name" ] && rsync_target=$rsync_target"/"$jbr_diz_name
|
||||
(cd $image_bundle_path && find . -name '*.diz' -exec rsync -R {} $rsync_target \;)
|
||||
[ ! -z "$jdk_name" ] && mv dizfiles/$jdk_name dizfiles/$jbr_diz_name
|
||||
|
||||
(cd dizfiles && find $jbr_diz_name -print0 | COPYFILE_DISABLE=1 \
|
||||
tar --no-recursion --null -T - -czf ../"$jbr_diz_name".tar.gz) || do_exit $?
|
||||
}
|
||||
|
||||
function do_exit() {
|
||||
exit_code=$1
|
||||
[ $do_reset_changes -eq 1 ] && git checkout HEAD jb/project/tools/common/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"
|
||||
}
|
||||
|
||||
function update_jsdk_mods() {
|
||||
__jsdk=$1
|
||||
__jcef_mods=$2
|
||||
__orig_jsdk_mods=$3
|
||||
__updated_jsdk_mods=$4
|
||||
|
||||
# re-create java.desktop.jmod with updated module-info.class
|
||||
tmp=.java.desktop.$$.tmp
|
||||
mkdir "$tmp" || exit $?
|
||||
"$__jsdk"/bin/jmod extract --dir "$tmp" "$__orig_jsdk_mods"/java.desktop.jmod || exit $?
|
||||
"$__jsdk"/bin/javac \
|
||||
--patch-module java.desktop="$__orig_jsdk_mods"/java.desktop.jmod \
|
||||
--module-path "$__jcef_mods" -d "$tmp"/classes src/java.desktop/share/classes/module-info.java || exit $?
|
||||
"$__jsdk"/bin/jmod \
|
||||
create --class-path "$tmp"/classes --config "$tmp"/conf --header-files "$tmp"/include --legal-notice "$tmp"/legal --libs "$tmp"/lib \
|
||||
java.desktop.jmod || exit $?
|
||||
mv java.desktop.jmod "$__updated_jsdk_mods" || exit $?
|
||||
rm -rf "$tmp"
|
||||
|
||||
# re-create java.base.jmod with updated hashes
|
||||
tmp=.java.base.$$.tmp
|
||||
mkdir "$tmp" || exit $?
|
||||
hash_modules=$("$__jsdk"/bin/jmod describe "$__orig_jsdk_mods"/java.base.jmod | grep hashes | awk '{print $2}' | tr '\n' '|' | sed s/\|$//) || exit $?
|
||||
"$__jsdk"/bin/jmod extract --dir "$tmp" "$__orig_jsdk_mods"/java.base.jmod || exit $?
|
||||
rm "$__updated_jsdk_mods"/java.base.jmod || exit $? # temp exclude from path
|
||||
"$__jsdk"/bin/jmod \
|
||||
create --module-path "$__updated_jsdk_mods" --hash-modules "$hash_modules" \
|
||||
--class-path "$tmp"/classes --cmds "$tmp"/bin --config "$tmp"/conf --header-files "$tmp"/include --legal-notice "$tmp"/legal --libs "$tmp"/lib \
|
||||
java.base.jmod || exit $?
|
||||
mv java.base.jmod "$__updated_jsdk_mods" || exit $?
|
||||
rm -rf "$tmp"
|
||||
}
|
||||
|
||||
function get_mods_list() {
|
||||
__mods=$1
|
||||
echo $(ls $__mods) | sed s/\.jmod/,/g | sed s/,$//g | sed s/' '//g
|
||||
}
|
||||
|
||||
function copy_jmods() {
|
||||
__mods_list=$1
|
||||
__jmods_from=$2
|
||||
__jmods_to=$3
|
||||
|
||||
mkdir -p $__jmods_to
|
||||
|
||||
echo "${__mods_list}," | while read -d, mod; do cp $__jmods_from/$mod.jmod $__jmods_to/; done
|
||||
}
|
||||
4
jb/project/tools/common/static_conf_args.txt
Normal file
4
jb/project/tools/common/static_conf_args.txt
Normal file
@@ -0,0 +1,4 @@
|
||||
--with-vendor-url=https://www.jetbrains.com/
|
||||
--with-vendor-bug-url=https://youtrack.jetbrains.com/issues/JBR
|
||||
--with-vendor-vm-bug-url=https://youtrack.jetbrains.com/issues/JBR
|
||||
|
||||
173
jb/project/tools/linux/scripts/mkimages_aarch64.sh
Executable file
173
jb/project/tools/linux/scripts/mkimages_aarch64.sh
Executable file
@@ -0,0 +1,173 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
set -x
|
||||
|
||||
# The following parameters must be specified:
|
||||
# build_number - specifies the number of JetBrainsRuntime build
|
||||
# bundle_type - specifies bundle to be built;possible values:
|
||||
# <empty> or nomod - the release bundles without any additional modules (jcef)
|
||||
# jcef - the release bundles with jcef
|
||||
# fd - the fastdebug bundles which also include the jcef module
|
||||
#
|
||||
# This script makes test-image along with JDK images when bundle_type is set to "jcef".
|
||||
# If the character 't' is added at the end of bundle_type then it also makes test-image along with JDK images.
|
||||
#
|
||||
# Environment variables:
|
||||
# JDK_BUILD_NUMBER - specifies update release of OpenJDK build or the value of --with-version-build argument
|
||||
# to configure
|
||||
# By default JDK_BUILD_NUMBER is set zero
|
||||
# JCEF_PATH - specifies the path to the directory with JCEF binaries.
|
||||
# By default JCEF binaries should be located in ./jcef_linux_aarch64
|
||||
|
||||
source jb/project/tools/common/scripts/common.sh
|
||||
|
||||
JCEF_PATH=${JCEF_PATH:=./jcef_linux_aarch64}
|
||||
|
||||
function do_configure {
|
||||
sh configure \
|
||||
$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-boot-jdk="$BOOT_JDK" \
|
||||
--enable-cds=yes \
|
||||
--with-gtk-shell1-protocol=/gtk-shell.xml \
|
||||
--with-vulkan \
|
||||
$DISABLE_WARNINGS_AS_ERRORS \
|
||||
$STATIC_CONF_ARGS \
|
||||
$REPRODUCIBLE_BUILD_OPTS \
|
||||
$WITH_ZIPPED_NATIVE_DEBUG_SYMBOLS \
|
||||
$WITH_BUNDLED_FREETYPE \
|
||||
|| do_exit $?
|
||||
}
|
||||
|
||||
function is_musl {
|
||||
libc=$(ldd /bin/ls | grep 'musl' | head -1 | cut -d ' ' -f1)
|
||||
if [ -z $libc ]; then
|
||||
# This is not Musl, return 1 == false
|
||||
return 1
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
|
||||
function create_image_bundle {
|
||||
__bundle_name=$1
|
||||
__arch_name=$2
|
||||
__modules_path=$3
|
||||
__modules=$4
|
||||
|
||||
libc_type_suffix=''
|
||||
fastdebug_infix=''
|
||||
__cds_opt=''
|
||||
|
||||
if is_musl; then libc_type_suffix='musl-' ; fi
|
||||
__cds_opt="--generate-cds-archive"
|
||||
|
||||
[ "$bundle_type" == "fd" ] && [ "$__arch_name" == "$JBRSDK_BUNDLE" ] && __bundle_name=$__arch_name && fastdebug_infix="fastdebug-"
|
||||
JBR=${__bundle_name}-${JBSDK_VERSION}-linux-${libc_type_suffix}aarch64-${fastdebug_infix}b${build_number}
|
||||
__root_dir=${__bundle_name}-${JBSDK_VERSION}-linux-${libc_type_suffix}aarch64-${fastdebug_infix:-}b${build_number}
|
||||
|
||||
echo Running jlink....
|
||||
[ -d "$IMAGES_DIR"/"$__root_dir" ] && rm -rf "${IMAGES_DIR:?}"/"$__root_dir"
|
||||
$JSDK/bin/jlink \
|
||||
--module-path "$__modules_path" --no-man-pages --compress=2 \
|
||||
$__cds_opt --add-modules "$__modules" --output "$IMAGES_DIR"/"$__root_dir"
|
||||
|
||||
grep -v "^JAVA_VERSION" "$JSDK"/release | grep -v "^MODULES" >> "$IMAGES_DIR"/"$__root_dir"/release
|
||||
if [ "$__arch_name" == "$JBRSDK_BUNDLE" ]; then
|
||||
sed 's/JBR/JBRSDK/g' "$IMAGES_DIR"/"$__root_dir"/release > release
|
||||
mv release "$IMAGES_DIR"/"$__root_dir"/release
|
||||
cp $IMAGES_DIR/jdk/lib/src.zip "$IMAGES_DIR"/"$__root_dir"/lib
|
||||
copy_jmods "$__modules" "$__modules_path" "$IMAGES_DIR"/"$__root_dir"/jmods
|
||||
zip_native_debug_symbols $IMAGES_DIR/jdk "${JBR}_diz"
|
||||
fi
|
||||
|
||||
# jmod does not preserve file permissions (JDK-8173610)
|
||||
[ -f "$IMAGES_DIR"/"$__root_dir"/lib/jcef_helper ] && chmod a+x "$IMAGES_DIR"/"$__root_dir"/lib/jcef_helper
|
||||
[ -f "$IMAGES_DIR"/"$__root_dir"/lib/cef_server ] && chmod a+x "$IMAGES_DIR"/"$__root_dir"/lib/cef_server
|
||||
|
||||
echo Creating "$JBR".tar.gz ...
|
||||
|
||||
(cd "$IMAGES_DIR" &&
|
||||
find "$__root_dir" -print0 | LC_ALL=C sort -z | \
|
||||
tar $REPRODUCIBLE_TAR_OPTS \
|
||||
--no-recursion --null -T - -cf "$JBR".tar) || do_exit $?
|
||||
mv "$IMAGES_DIR"/"$JBR".tar ./"$JBR".tar
|
||||
[ -f "$JBR".tar.gz ] && rm "$JBR.tar.gz"
|
||||
touch -c -d "@$SOURCE_DATE_EPOCH" "$JBR".tar
|
||||
gzip "$JBR".tar || do_exit $?
|
||||
rm -rf "${IMAGES_DIR:?}"/"$__root_dir"
|
||||
}
|
||||
|
||||
WITH_DEBUG_LEVEL="--with-debug-level=release"
|
||||
RELEASE_NAME=linux-aarch64-server-release
|
||||
|
||||
jbr_name_postfix=""
|
||||
|
||||
case "$bundle_type" in
|
||||
"jcef")
|
||||
do_reset_changes=1
|
||||
jbr_name_postfix="_${bundle_type}"
|
||||
do_maketest=1
|
||||
;;
|
||||
"nomod" | "")
|
||||
bundle_type=""
|
||||
;;
|
||||
"nomodft" | "")
|
||||
jbr_name_postfix="_ft"
|
||||
;;
|
||||
"fd")
|
||||
do_reset_changes=1
|
||||
jbr_name_postfix="_${bundle_type}"
|
||||
WITH_DEBUG_LEVEL="--with-debug-level=fastdebug"
|
||||
RELEASE_NAME=linux-aarch64-server-fastdebug
|
||||
;;
|
||||
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 $?
|
||||
|
||||
IMAGES_DIR=build/$RELEASE_NAME/images
|
||||
JSDK=$IMAGES_DIR/jdk
|
||||
JSDK_MODS_DIR=$IMAGES_DIR/jmods
|
||||
JBRSDK_BUNDLE=jbrsdk
|
||||
|
||||
echo Fixing permissions
|
||||
chmod -R a+r $JSDK
|
||||
|
||||
if [ "$bundle_type" == "jcef" ]; then
|
||||
git apply -p0 < jb/project/tools/patches/add_jcef_module_aarch64.patch || do_exit $?
|
||||
update_jsdk_mods $JSDK $JCEF_PATH/jmods $JSDK/jmods $JSDK_MODS_DIR || do_exit $?
|
||||
cp $JCEF_PATH/jmods/* $JSDK_MODS_DIR # $JSDK/jmods is not changed
|
||||
cat $JCEF_PATH/jcef.version >> $JSDK/release
|
||||
fi
|
||||
|
||||
# create runtime image bundle
|
||||
modules=$(xargs < jb/project/tools/common/modules.list | sed s/" "//g) || do_exit $?
|
||||
create_image_bundle "jbr${jbr_name_postfix}" "jbr" $JSDK_MODS_DIR "$modules" || do_exit $?
|
||||
|
||||
# create sdk image bundle
|
||||
modules=$(cat $JSDK/release | grep MODULES | sed s/MODULES=//g | sed s/' '/','/g | sed s/\"//g | sed s/\\n//g) || do_exit $?
|
||||
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "$JBRSDK_BUNDLE" ]; then
|
||||
modules=${modules},$(get_mods_list "$JCEF_PATH"/jmods)
|
||||
fi
|
||||
create_image_bundle "$JBRSDK_BUNDLE${jbr_name_postfix}" $JBRSDK_BUNDLE $JSDK_MODS_DIR "$modules" || do_exit $?
|
||||
|
||||
if [ $do_maketest -eq 1 ]; then
|
||||
JBRSDK_TEST=${JBRSDK_BUNDLE}-${JBSDK_VERSION}-linux-${libc_type_suffix}test-aarch64-b${build_number}
|
||||
echo Creating "$JBRSDK_TEST" ...
|
||||
[ $do_reset_changes -eq 1 ] && git checkout HEAD jb/project/tools/common/modules.list src/java.desktop/share/classes/module-info.java
|
||||
make test-image CONF=$RELEASE_NAME JBR_API_JBR_VERSION=TEST || do_exit $?
|
||||
tar -pcf "$JBRSDK_TEST".tar -C $IMAGES_DIR --exclude='test/jdk/demos' test || do_exit $?
|
||||
[ -f "$JBRSDK_TEST.tar.gz" ] && rm "$JBRSDK_TEST.tar.gz"
|
||||
gzip "$JBRSDK_TEST".tar || do_exit $?
|
||||
fi
|
||||
|
||||
do_exit 0
|
||||
190
jb/project/tools/linux/scripts/mkimages_x64.sh
Executable file
190
jb/project/tools/linux/scripts/mkimages_x64.sh
Executable file
@@ -0,0 +1,190 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
set -x
|
||||
|
||||
# The following parameters must be specified:
|
||||
# build_number - specifies the number of JetBrainsRuntime build
|
||||
# bundle_type - specifies bundle to be built;possible values:
|
||||
# <empty> or nomod - the release bundles without any additional modules (jcef)
|
||||
# jcef - the release bundles with jcef
|
||||
# fd - the fastdebug bundles which also include the jcef module
|
||||
#
|
||||
# This script makes test-image along with JDK images when bundle_type is set to "jcef".
|
||||
# If the character 't' is added at the end of bundle_type then it also makes test-image along with JDK images.
|
||||
#
|
||||
# Environment variables:
|
||||
# JDK_BUILD_NUMBER - specifies update release of OpenJDK build or the value of --with-version-build argument
|
||||
# to configure
|
||||
# By default JDK_BUILD_NUMBER is set zero
|
||||
# JCEF_PATH - specifies the path to the directory with JCEF binaries.
|
||||
# By default JCEF binaries should be located in ./jcef_linux_x64
|
||||
|
||||
source jb/project/tools/common/scripts/common.sh
|
||||
|
||||
JCEF_PATH=${JCEF_PATH:=./jcef_linux_x64}
|
||||
|
||||
function do_configure {
|
||||
if is_musl; then
|
||||
LINUX_TARGET=""
|
||||
else
|
||||
LINUX_TARGET="\
|
||||
--build=x86_64-unknown-linux-gnu \
|
||||
--openjdk-target=x86_64-unknown-linux-gnu"
|
||||
fi
|
||||
sh configure \
|
||||
$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-boot-jdk="$BOOT_JDK" \
|
||||
--enable-cds=yes \
|
||||
--with-gtk-shell1-protocol=/gtk-shell.xml \
|
||||
--with-vulkan \
|
||||
$LINUX_TARGET \
|
||||
$DISABLE_WARNINGS_AS_ERRORS \
|
||||
$STATIC_CONF_ARGS \
|
||||
$REPRODUCIBLE_BUILD_OPTS \
|
||||
$WITH_ZIPPED_NATIVE_DEBUG_SYMBOLS \
|
||||
$WITH_BUNDLED_FREETYPE \
|
||||
|| do_exit $?
|
||||
}
|
||||
|
||||
function is_musl {
|
||||
libc=$(ldd /bin/ls | grep 'musl' | head -1 | cut -d ' ' -f1)
|
||||
if [ -z $libc ]; then
|
||||
# This is not Musl, return 1 == false
|
||||
return 1
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
|
||||
function create_image_bundle {
|
||||
__bundle_name=$1
|
||||
__arch_name=$2
|
||||
__modules_path=$3
|
||||
__modules=$4
|
||||
|
||||
libc_type_suffix=''
|
||||
fastdebug_infix=''
|
||||
__cds_opt=''
|
||||
|
||||
if is_musl; then
|
||||
libc_type_suffix='musl-'
|
||||
else
|
||||
LINUX_TARGET="\
|
||||
--build=x86_64-unknown-linux-gnu \
|
||||
--openjdk-target=x86_64-unknown-linux-gnu"
|
||||
fi
|
||||
__cds_opt="--generate-cds-archive"
|
||||
|
||||
[ "$bundle_type" == "fd" ] && [ "$__arch_name" == "$JBRSDK_BUNDLE" ] && __bundle_name=$__arch_name && fastdebug_infix="fastdebug-"
|
||||
JBR=${__bundle_name}-${JBSDK_VERSION}-linux-${libc_type_suffix}x64-${fastdebug_infix}b${build_number}
|
||||
__root_dir=${__bundle_name}-${JBSDK_VERSION}-linux-${libc_type_suffix}x64-${fastdebug_infix:-}b${build_number}
|
||||
|
||||
echo Running jlink....
|
||||
[ -d "$IMAGES_DIR"/"$__root_dir" ] && rm -rf "${IMAGES_DIR:?}"/"$__root_dir"
|
||||
$JSDK/bin/jlink \
|
||||
--module-path "$__modules_path" --no-man-pages --compress=2 \
|
||||
$__cds_opt --add-modules "$__modules" --output "$IMAGES_DIR"/"$__root_dir"
|
||||
|
||||
grep -v "^JAVA_VERSION" "$JSDK"/release | grep -v "^MODULES" >> "$IMAGES_DIR"/"$__root_dir"/release
|
||||
if [ "$__arch_name" == "$JBRSDK_BUNDLE" ]; then
|
||||
sed 's/JBR/JBRSDK/g' "$IMAGES_DIR"/"$__root_dir"/release > release
|
||||
mv release "$IMAGES_DIR"/"$__root_dir"/release
|
||||
cp $IMAGES_DIR/jdk/lib/src.zip "$IMAGES_DIR"/"$__root_dir"/lib
|
||||
copy_jmods "$__modules" "$__modules_path" "$IMAGES_DIR"/"$__root_dir"/jmods
|
||||
zip_native_debug_symbols $IMAGES_DIR/jdk "${JBR}_diz"
|
||||
fi
|
||||
|
||||
# jmod does not preserve file permissions (JDK-8173610)
|
||||
[ -f "$IMAGES_DIR"/"$__root_dir"/lib/jcef_helper ] && chmod a+x "$IMAGES_DIR"/"$__root_dir"/lib/jcef_helper
|
||||
[ -f "$IMAGES_DIR"/"$__root_dir"/lib/cef_server ] && chmod a+x "$IMAGES_DIR"/"$__root_dir"/lib/cef_server
|
||||
|
||||
echo Creating "$JBR".tar.gz ...
|
||||
|
||||
(cd "$IMAGES_DIR" &&
|
||||
find "$__root_dir" -print0 | LC_ALL=C sort -z | \
|
||||
tar $REPRODUCIBLE_TAR_OPTS \
|
||||
--no-recursion --null -T - -cf "$JBR".tar) || do_exit $?
|
||||
mv "$IMAGES_DIR"/"$JBR".tar ./"$JBR".tar
|
||||
[ -f "$JBR".tar.gz ] && rm "$JBR.tar.gz"
|
||||
touch -c -d "@$SOURCE_DATE_EPOCH" "$JBR".tar
|
||||
gzip "$JBR".tar || do_exit $?
|
||||
rm -rf "${IMAGES_DIR:?}"/"$__root_dir"
|
||||
}
|
||||
|
||||
WITH_DEBUG_LEVEL="--with-debug-level=release"
|
||||
RELEASE_NAME=linux-x86_64-server-release
|
||||
|
||||
jbr_name_postfix=""
|
||||
|
||||
case "$bundle_type" in
|
||||
"jcef")
|
||||
do_reset_changes=1
|
||||
jbr_name_postfix="_${bundle_type}"
|
||||
jbrsdk_name_postfix="_${bundle_type}"
|
||||
do_maketest=1
|
||||
;;
|
||||
"nomod" | "")
|
||||
bundle_type=""
|
||||
jbrsdk_name_postfix="_${bundle_type}"
|
||||
;;
|
||||
"nomodft" | "")
|
||||
jbr_name_postfix="_ft"
|
||||
jbrsdk_name_postfix="_ft"
|
||||
;;
|
||||
"fd")
|
||||
do_reset_changes=1
|
||||
jbr_name_postfix="_${bundle_type}"
|
||||
WITH_DEBUG_LEVEL="--with-debug-level=fastdebug"
|
||||
RELEASE_NAME=linux-x86_64-server-fastdebug
|
||||
;;
|
||||
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 $?
|
||||
|
||||
IMAGES_DIR=build/$RELEASE_NAME/images
|
||||
JSDK=$IMAGES_DIR/jdk
|
||||
JSDK_MODS_DIR=$IMAGES_DIR/jmods
|
||||
JBRSDK_BUNDLE=jbrsdk
|
||||
|
||||
echo Fixing permissions
|
||||
chmod -R a+r $JSDK
|
||||
|
||||
if [ "$bundle_type" == "jcef" ]; then
|
||||
git apply -p0 < jb/project/tools/patches/add_jcef_module.patch || do_exit $?
|
||||
update_jsdk_mods $JSDK $JCEF_PATH/jmods $JSDK/jmods $JSDK_MODS_DIR || do_exit $?
|
||||
cp $JCEF_PATH/jmods/* $JSDK_MODS_DIR # $JSDK/jmods is not changed
|
||||
cat $JCEF_PATH/jcef.version >> $JSDK/release
|
||||
fi
|
||||
|
||||
# create runtime image bundle
|
||||
modules=$(xargs < jb/project/tools/common/modules.list | sed s/" "//g) || do_exit $?
|
||||
create_image_bundle "jbr${jbr_name_postfix}" "jbr" $JSDK_MODS_DIR "$modules" || do_exit $?
|
||||
|
||||
# create sdk image bundle
|
||||
modules=$(cat $JSDK/release | grep MODULES | sed s/MODULES=//g | sed s/' '/','/g | sed s/\"//g | sed s/\\n//g) || do_exit $?
|
||||
if [ "$bundle_type" == "jcef" ]|| [ "$bundle_type" == "$JBRSDK_BUNDLE" ]; then
|
||||
modules=${modules},$(get_mods_list "$JCEF_PATH"/jmods)
|
||||
fi
|
||||
create_image_bundle "$JBRSDK_BUNDLE${jbr_name_postfix}" $JBRSDK_BUNDLE $JSDK_MODS_DIR "$modules" || do_exit $?
|
||||
|
||||
if [ $do_maketest -eq 1 ]; then
|
||||
JBRSDK_TEST=${JBRSDK_BUNDLE}-${JBSDK_VERSION}-linux-${libc_type_suffix}test-x64-b${build_number}
|
||||
echo Creating "$JBRSDK_TEST" ...
|
||||
[ $do_reset_changes -eq 1 ] && git checkout HEAD jb/project/tools/common/modules.list src/java.desktop/share/classes/module-info.java
|
||||
make test-image CONF=$RELEASE_NAME JBR_API_JBR_VERSION=TEST || do_exit $?
|
||||
tar -pcf "$JBRSDK_TEST".tar -C $IMAGES_DIR --exclude='test/jdk/demos' test || do_exit $?
|
||||
[ -f "$JBRSDK_TEST.tar.gz" ] && rm "$JBRSDK_TEST.tar.gz"
|
||||
gzip "$JBRSDK_TEST".tar || do_exit $?
|
||||
fi
|
||||
|
||||
do_exit 0
|
||||
146
jb/project/tools/linux/scripts/mkimages_x86.sh
Executable file
146
jb/project/tools/linux/scripts/mkimages_x86.sh
Executable file
@@ -0,0 +1,146 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
set -x
|
||||
|
||||
# The following parameters must be specified:
|
||||
# build_number - specifies the number of JetBrainsRuntime build
|
||||
# bundle_type - specifies bundle to be built;possible values:
|
||||
# <empty> or nomod - the release bundles without any additional modules (jcef)
|
||||
# jcef - the release bundles with jcef
|
||||
# fd - the fastdebug bundles which also include the jcef module
|
||||
#
|
||||
|
||||
source jb/project/tools/common/scripts/common.sh
|
||||
|
||||
function do_configure {
|
||||
linux32 bash configure \
|
||||
$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-boot-jdk="$BOOT_JDK" \
|
||||
$STATIC_CONF_ARGS \
|
||||
--enable-cds=yes \
|
||||
$DISABLE_WARNINGS_AS_ERRORS \
|
||||
$REPRODUCIBLE_BUILD_OPTS \
|
||||
$WITH_ZIPPED_NATIVE_DEBUG_SYMBOLS \
|
||||
|| do_exit $?
|
||||
}
|
||||
|
||||
function is_musl {
|
||||
libc=$(ldd /bin/ls | grep 'musl' | head -1 | cut -d ' ' -f1)
|
||||
if [ -z $libc ]; then
|
||||
# This is not Musl, return 1 == false
|
||||
return 1
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
|
||||
function create_image_bundle {
|
||||
__bundle_name=$1
|
||||
__arch_name=$2
|
||||
__modules_path=$3
|
||||
__modules=$4
|
||||
|
||||
libc_type_suffix=''
|
||||
fastdebug_infix=''
|
||||
__cds_opt=''
|
||||
|
||||
if is_musl; then libc_type_suffix='musl-' ; fi
|
||||
__cds_opt="--generate-cds-archive"
|
||||
|
||||
[ "$bundle_type" == "fd" ] && [ "$__arch_name" == "$JBRSDK_BUNDLE" ] && __bundle_name=$__arch_name && fastdebug_infix="fastdebug-"
|
||||
JBR=${__bundle_name}-${JBSDK_VERSION}-linux-${libc_type_suffix}x86-${fastdebug_infix}b${build_number}
|
||||
__root_dir=${__bundle_name}-${JBSDK_VERSION}-linux-${libc_type_suffix}x86-${fastdebug_infix:-}b${build_number}
|
||||
|
||||
echo Running jlink....
|
||||
[ -d "$IMAGES_DIR"/"$__root_dir" ] && rm -rf "${IMAGES_DIR:?}"/"$__root_dir"
|
||||
$JSDK/bin/jlink \
|
||||
--module-path "$__modules_path" --no-man-pages --compress=2 \
|
||||
$__cds_opt --add-modules "$__modules" --output "$IMAGES_DIR"/"$__root_dir"
|
||||
|
||||
grep -v "^JAVA_VERSION" "$JSDK"/release | grep -v "^MODULES" >> "$IMAGES_DIR"/"$__root_dir"/release
|
||||
if [ "$__arch_name" == "$JBRSDK_BUNDLE" ]; then
|
||||
sed 's/JBR/JBRSDK/g' "$IMAGES_DIR"/"$__root_dir"/release > release
|
||||
mv release "$IMAGES_DIR"/"$__root_dir"/release
|
||||
cp $IMAGES_DIR/jdk/lib/src.zip "$IMAGES_DIR"/"$__root_dir"/lib
|
||||
copy_jmods "$__modules" "$__modules_path" "$IMAGES_DIR"/"$__root_dir"/jmods
|
||||
zip_native_debug_symbols $IMAGES_DIR/jdk "${JBR}_diz"
|
||||
fi
|
||||
|
||||
# jmod does not preserve file permissions (JDK-8173610)
|
||||
[ -f "$IMAGES_DIR"/"$__root_dir"/lib/jcef_helper ] && chmod a+x "$IMAGES_DIR"/"$__root_dir"/lib/jcef_helper
|
||||
|
||||
echo Creating "$JBR".tar.gz ...
|
||||
|
||||
(cd "$IMAGES_DIR" &&
|
||||
find "$__root_dir" -print0 | LC_ALL=C sort -z | \
|
||||
tar $REPRODUCIBLE_TAR_OPTS \
|
||||
--no-recursion --null -T - -cf "$JBR".tar) || do_exit $?
|
||||
mv "$IMAGES_DIR"/"$JBR".tar ./"$JBR".tar
|
||||
[ -f "$JBR".tar.gz ] && rm "$JBR.tar.gz"
|
||||
touch -c -d "@$SOURCE_DATE_EPOCH" "$JBR".tar
|
||||
gzip "$JBR".tar || do_exit $?
|
||||
rm -rf "${IMAGES_DIR:?}"/"$__root_dir"
|
||||
}
|
||||
|
||||
WITH_DEBUG_LEVEL="--with-debug-level=release"
|
||||
RELEASE_NAME=linux-x86-server-release
|
||||
|
||||
case "$bundle_type" in
|
||||
"jcef")
|
||||
echo "not implemented" && do_exit 1
|
||||
;;
|
||||
"nomod" | "")
|
||||
bundle_type=""
|
||||
;;
|
||||
"fd")
|
||||
do_reset_changes=1
|
||||
WITH_DEBUG_LEVEL="--with-debug-level=fastdebug"
|
||||
RELEASE_NAME=linux-x86-server-fastdebug
|
||||
;;
|
||||
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 $?
|
||||
|
||||
IMAGES_DIR=build/$RELEASE_NAME/images
|
||||
JSDK=$IMAGES_DIR/jdk
|
||||
JSDK_MODS_DIR=$IMAGES_DIR/jmods
|
||||
JBRSDK_BUNDLE=jbrsdk
|
||||
|
||||
echo Fixing permissions
|
||||
chmod -R a+r $JSDK
|
||||
|
||||
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "fd" ]; then
|
||||
jbr_name_postfix="_${bundle_type}"
|
||||
else
|
||||
jbr_name_postfix=""
|
||||
fi
|
||||
|
||||
# create runtime image bundle
|
||||
modules=$(grep -v "jdk.internal.vm" jb/project/tools/common/modules.list | xargs | sed s/" "//g) || do_exit $?
|
||||
create_image_bundle "jbr${jbr_name_postfix}" "jbr" $JSDK_MODS_DIR "$modules" || do_exit $?
|
||||
|
||||
# create sdk image bundle
|
||||
modules=$(cat $JSDK/release | grep MODULES | sed s/MODULES=//g | sed s/' '/','/g | sed s/\"//g | sed s/\\n//g) || do_exit $?
|
||||
create_image_bundle "$JBRSDK_BUNDLE${jbr_name_postfix}" $JBRSDK_BUNDLE $JSDK_MODS_DIR "$modules" || do_exit $?
|
||||
|
||||
if [ $do_maketest -eq 1 ]; then
|
||||
JBRSDK_TEST=${JBRSDK_BUNDLE}-${JBSDK_VERSION}-linux-${libc_type_suffix}test-x86-b${build_number}
|
||||
echo Creating "$JBRSDK_TEST" ...
|
||||
[ $do_reset_changes -eq 1 ] && git checkout HEAD jb/project/tools/common/modules.list src/java.desktop/share/classes/module-info.java
|
||||
make test-image CONF=$RELEASE_NAME JBR_API_JBR_VERSION=TEST || do_exit $?
|
||||
tar -pcf "$JBRSDK_TEST".tar -C $IMAGES_DIR --exclude='test/jdk/demos' test || do_exit $?
|
||||
[ -f "$JBRSDK_TEST.tar.gz" ] && rm "$JBRSDK_TEST.tar.gz"
|
||||
gzip "$JBRSDK_TEST".tar || do_exit $?
|
||||
fi
|
||||
|
||||
do_exit 0
|
||||
63
jb/project/tools/mac/scripts/codesign.sh
Executable file
63
jb/project/tools/mac/scripts/codesign.sh
Executable file
@@ -0,0 +1,63 @@
|
||||
#!/bin/bash
|
||||
SCRIPT_DIR="$(cd "$(dirname "$0")" >/dev/null && pwd)"
|
||||
|
||||
source "$SCRIPT_DIR/jetsign-common.sh" || exit 1
|
||||
|
||||
function isMacOsBinary() {
|
||||
file "$1" | grep -q 'Mach-O'
|
||||
}
|
||||
|
||||
function isSigned() {
|
||||
codesign --verify "$1" >/dev/null 2>&1 && ! grep -q Signature=adhoc < <(codesign --display --verbose "$1" 2>&1)
|
||||
}
|
||||
|
||||
# last argument is a path to be signed
|
||||
pathToBeSigned="$(pwd)/${*: -1}"
|
||||
jetSignArgs=("${@:1:$#-1}")
|
||||
if [[ ! -f "$pathToBeSigned" ]]; then
|
||||
echo "$pathToBeSigned is missing or not a file"
|
||||
exit 1
|
||||
elif isSigned "$pathToBeSigned" && ! isForced "${jetSignArgs[@]}" ; then
|
||||
echo "Already signed: $pathToBeSigned"
|
||||
elif [[ "$JETSIGN_CLIENT" == "null" ]]; then
|
||||
echo "JetSign client is missing, cannot proceed with signing"
|
||||
exit 1
|
||||
elif ! isMacOsBinary "$pathToBeSigned" && [[ "$pathToBeSigned" != *.sit ]] && [[ "$pathToBeSigned" != *.tar.gz ]]; then
|
||||
echo "$pathToBeSigned won't be signed, assumed not to be a macOS executable"
|
||||
else
|
||||
if isMacOsBinary "$pathToBeSigned" && ! isSigned "$pathToBeSigned" ; then
|
||||
echo "Unsigned macOS binary: $pathToBeSigned"
|
||||
fi
|
||||
workDir=$(dirname "$pathToBeSigned")
|
||||
pathSigned="$workDir/signed/${pathToBeSigned##*/}"
|
||||
jetSignExtensions=$(jetSignExtensions "${jetSignArgs[@]}")
|
||||
contentType=$(jetSignContentType "$pathToBeSigned")
|
||||
(
|
||||
cd "$workDir" || exit 1
|
||||
|
||||
max_attempts=3
|
||||
attempt=1
|
||||
while [ $attempt -le $max_attempts ]; do
|
||||
if "$JETSIGN_CLIENT" -log-format text -max-wait 1m -denoted-content-type "$contentType" -extensions "$jetSignExtensions" "$pathToBeSigned"; then
|
||||
break
|
||||
else
|
||||
if [ $attempt -eq $max_attempts ]; then
|
||||
echo "Failed to sign after $max_attempts attempts"
|
||||
exit 1
|
||||
fi
|
||||
echo "Attempt $attempt failed, retrying in 5 seconds..."
|
||||
sleep 5
|
||||
((attempt++))
|
||||
fi
|
||||
done
|
||||
|
||||
# SRE-1223 (Codesign removes execute bits in executable files) workaround
|
||||
chmod "$(stat -f %A "$pathToBeSigned")" "$pathSigned"
|
||||
if isMacOsBinary "$pathSigned"; then
|
||||
isSigned "$pathSigned"
|
||||
fi
|
||||
rm "$pathToBeSigned"
|
||||
mv "$pathSigned" "$pathToBeSigned"
|
||||
rm -rf "$workDir/signed"
|
||||
)
|
||||
fi
|
||||
16
jb/project/tools/mac/scripts/entitlements.xml
Normal file
16
jb/project/tools/mac/scripts/entitlements.xml
Normal file
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>com.apple.security.cs.allow-jit</key>
|
||||
<true/>
|
||||
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
|
||||
<true/>
|
||||
<key>com.apple.security.cs.allow-dyld-environment-variables</key>
|
||||
<true/>
|
||||
<key>com.apple.security.cs.disable-library-validation</key>
|
||||
<true/>
|
||||
<key>com.apple.security.cs.disable-executable-page-protection</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
63
jb/project/tools/mac/scripts/jetsign-common.sh
Executable file
63
jb/project/tools/mac/scripts/jetsign-common.sh
Executable file
@@ -0,0 +1,63 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
function isForced() {
|
||||
for arg in "$@"; do
|
||||
if [[ "$arg" == --force ]]; then
|
||||
return 0
|
||||
fi
|
||||
done
|
||||
return 1
|
||||
}
|
||||
|
||||
function jetSignExtensions() {
|
||||
args=("$@")
|
||||
((lastElementIndex=${#args[@]}-1))
|
||||
for index in "${!args[@]}"; do
|
||||
arg=${args[$index]}
|
||||
case "$arg" in
|
||||
--sign | -s)
|
||||
echo -n 'mac_codesign_identity='
|
||||
continue
|
||||
;;
|
||||
--entitlements)
|
||||
echo -n 'mac_codesign_entitlements='
|
||||
continue
|
||||
;;
|
||||
--options=runtime)
|
||||
echo -n 'mac_codesign_options=runtime'
|
||||
;;
|
||||
--force)
|
||||
echo -n 'mac_codesign_force=true'
|
||||
;;
|
||||
--timestamp | --verbose | -v)
|
||||
continue
|
||||
;;
|
||||
*)
|
||||
echo -n "$arg"
|
||||
;;
|
||||
esac
|
||||
if [[ $index != "$lastElementIndex" ]]; then
|
||||
echo -n ","
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
# See jetbrains.sign.util.FileUtil.contentType
|
||||
function jetSignContentType() {
|
||||
case "${1##*/}" in
|
||||
*.sit)
|
||||
echo -n 'application/x-mac-app-zip'
|
||||
;;
|
||||
*.tar.gz)
|
||||
echo -n 'application/x-mac-app-targz'
|
||||
;;
|
||||
*.pkg)
|
||||
echo -n 'application/x-mac-pkg'
|
||||
;;
|
||||
*)
|
||||
echo -n 'application/x-mac-app-bin'
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
172
jb/project/tools/mac/scripts/mkimages.sh
Executable file
172
jb/project/tools/mac/scripts/mkimages.sh
Executable file
@@ -0,0 +1,172 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
set -x
|
||||
|
||||
# The following parameters must be specified:
|
||||
# build_number - specifies the number of JetBrainsRuntime build
|
||||
# bundle_type - specifies bundle to be built;possible values:
|
||||
# <empty> or nomod - the release bundles without any additional modules (jcef)
|
||||
# jcef - the release bundles with jcef
|
||||
# fd - the fastdebug bundles which also include the jcef module
|
||||
#
|
||||
# This script makes test-image along with JDK images when bundle_type is set to "jcef".
|
||||
# If the character 't' is added at the end of bundle_type then it also makes test-image along with JDK images.
|
||||
#
|
||||
# Environment variables:
|
||||
# JDK_BUILD_NUMBER - specifies update release of OpenJDK build or the value of --with-version-build argument
|
||||
# to configure
|
||||
# By default JDK_BUILD_NUMBER is set zero
|
||||
# JCEF_PATH - specifies the path to the directory with JCEF binaries.
|
||||
# By default JCEF binaries should be located in ./jcef_mac
|
||||
|
||||
source jb/project/tools/common/scripts/common.sh
|
||||
|
||||
JCEF_PATH=${JCEF_PATH:=./jcef_mac}
|
||||
BOOT_JDK=${BOOT_JDK:=$(/usr/libexec/java_home -v 17)}
|
||||
|
||||
function do_configure {
|
||||
sh configure \
|
||||
$WITH_DEBUG_LEVEL \
|
||||
--with-vendor-name="$VENDOR_NAME" \
|
||||
--with-vendor-version-string="$VENDOR_VERSION_STRING" \
|
||||
--with-macosx-bundle-name-base=${VENDOR_VERSION_STRING} \
|
||||
--with-macosx-bundle-id-base="com.jetbrains.jbr" \
|
||||
--with-jvm-features=shenandoahgc \
|
||||
--with-version-pre= \
|
||||
--with-version-build="$JDK_BUILD_NUMBER" \
|
||||
--with-version-opt=b"$build_number" \
|
||||
--with-boot-jdk="$BOOT_JDK" \
|
||||
--enable-cds=yes \
|
||||
$DISABLE_WARNINGS_AS_ERRORS \
|
||||
$STATIC_CONF_ARGS \
|
||||
$REPRODUCIBLE_BUILD_OPTS \
|
||||
$WITH_ZIPPED_NATIVE_DEBUG_SYMBOLS \
|
||||
|| do_exit $?
|
||||
}
|
||||
|
||||
function create_image_bundle {
|
||||
__bundle_name=$1
|
||||
__arch_name=$2
|
||||
__modules_path=$3
|
||||
__modules=$4
|
||||
|
||||
fastdebug_infix=''
|
||||
__cds_opt=''
|
||||
__cds_opt="--generate-cds-archive"
|
||||
|
||||
tmp=.bundle.$$.tmp
|
||||
mkdir "$tmp" || do_exit $?
|
||||
|
||||
[ "$bundle_type" == "fd" ] && [ "$__arch_name" == "$JBRSDK_BUNDLE" ] && __bundle_name=$__arch_name && fastdebug_infix="fastdebug-"
|
||||
JBR=${__bundle_name}-${JBSDK_VERSION}-osx-${architecture}-${fastdebug_infix:-}b${build_number}
|
||||
__root_dir=${__bundle_name}-${JBSDK_VERSION}-osx-${architecture}-${fastdebug_infix:-}b${build_number}
|
||||
|
||||
JRE_CONTENTS=$tmp/$__root_dir/Contents
|
||||
mkdir -p "$JRE_CONTENTS" || do_exit $?
|
||||
|
||||
echo Running jlink...
|
||||
"$JSDK"/bin/jlink \
|
||||
--module-path "$__modules_path" --no-man-pages --compress=2 \
|
||||
$__cds_opt --add-modules "$__modules" --output "$JRE_CONTENTS/Home" || do_exit $?
|
||||
|
||||
grep -v "^JAVA_VERSION" "$JSDK"/release | grep -v "^MODULES" >> "$JRE_CONTENTS/Home/release"
|
||||
if [ "$__arch_name" == "$JBRSDK_BUNDLE" ]; then
|
||||
sed 's/JBR/JBRSDK/g' $JRE_CONTENTS/Home/release > release
|
||||
mv release $JRE_CONTENTS/Home/release
|
||||
cp $IMAGES_DIR/jdk-bundle/jdk-$JBSDK_VERSION.jdk/Contents/Home/lib/src.zip $JRE_CONTENTS/Home/lib
|
||||
copy_jmods "$__modules" "$__modules_path" "$JRE_CONTENTS"/Home/jmods
|
||||
zip_native_debug_symbols $IMAGES_DIR/jdk-bundle/jdk-$JBSDK_VERSION.jdk "${JBR}_diz"
|
||||
fi
|
||||
|
||||
if [ "$bundle_type" == "jcef" ]; then
|
||||
cat $JCEF_PATH/jcef.version >> "$JRE_CONTENTS/Home/release"
|
||||
fi
|
||||
|
||||
cp -R "$JSDK"/../MacOS "$JRE_CONTENTS"
|
||||
cp "$JSDK"/../Info.plist "$JRE_CONTENTS"
|
||||
|
||||
[ -n "$bundle_type" ] && (cp -a $JCEF_PATH/Frameworks "$JRE_CONTENTS" || do_exit $?)
|
||||
|
||||
echo Creating "$JBR".tar.gz ...
|
||||
# Normalize timestamp
|
||||
find "$tmp"/"$__root_dir" -print0 | xargs -0 touch -c -h -t "$TOUCH_TIME"
|
||||
|
||||
(cd "$tmp" &&
|
||||
find "$__root_dir" -print0 | LC_ALL=C sort -z | \
|
||||
COPYFILE_DISABLE=1 tar $REPRODUCIBLE_TAR_OPTS --no-recursion --null -T - \
|
||||
-czf "$JBR".tar.gz --exclude='*.dSYM' --exclude='man') || do_exit $?
|
||||
mv "$tmp"/"$JBR".tar.gz "$JBR".tar.gz
|
||||
rm -rf "$tmp"
|
||||
}
|
||||
|
||||
WITH_DEBUG_LEVEL="--with-debug-level=release"
|
||||
CONF_ARCHITECTURE=x86_64
|
||||
if [[ "${architecture}" == *aarch64* ]]; then
|
||||
CONF_ARCHITECTURE=aarch64
|
||||
fi
|
||||
RELEASE_NAME=macosx-${CONF_ARCHITECTURE}-server-release
|
||||
|
||||
case "$bundle_type" in
|
||||
"jcef")
|
||||
do_reset_changes=1
|
||||
do_maketest=1
|
||||
;;
|
||||
"nomod" | "")
|
||||
bundle_type=""
|
||||
;;
|
||||
"fd")
|
||||
do_reset_changes=1
|
||||
WITH_DEBUG_LEVEL="--with-debug-level=fastdebug"
|
||||
RELEASE_NAME=macosx-${CONF_ARCHITECTURE}-server-fastdebug
|
||||
JBSDK=macosx-${architecture}-server-release
|
||||
;;
|
||||
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 $?
|
||||
|
||||
IMAGES_DIR=build/$RELEASE_NAME/images
|
||||
|
||||
JSDK=$IMAGES_DIR/jdk-bundle/jdk-$JBSDK_VERSION.jdk/Contents/Home
|
||||
JSDK_MODS_DIR=$IMAGES_DIR/jmods
|
||||
JBRSDK_BUNDLE=jbrsdk
|
||||
|
||||
# test/jdk/jb/java/awt/Focus/FullScreenFocusStealing.java test/jdk/java/awt/color/ICC_ColorSpace/MTTransformReplacedProfile.java test/jdk/java/awt/datatransfer/DataFlavor/DataFlavorRemoteTest.java test/jdk/java/awt/Robot/NonEmptyErrorStream.java
|
||||
|
||||
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "fd" ]; then
|
||||
if [ "$bundle_type" == "jcef" ]; then
|
||||
git apply -p0 < jb/project/tools/patches/add_jcef_module.patch || do_exit $?
|
||||
update_jsdk_mods "$JSDK" "$JCEF_PATH"/jmods "$JSDK"/jmods "$JSDK_MODS_DIR" || do_exit $?
|
||||
cp $JCEF_PATH/jmods/* $JSDK_MODS_DIR # $JSDK/jmods is not changed
|
||||
fi
|
||||
|
||||
jbr_name_postfix="_${bundle_type}"
|
||||
else
|
||||
jbr_name_postfix=""
|
||||
fi
|
||||
|
||||
# create runtime image bundle
|
||||
modules=$(xargs < jb/project/tools/common/modules.list | sed s/" "//g) || do_exit $?
|
||||
create_image_bundle "jbr${jbr_name_postfix}" "jbr" $JSDK_MODS_DIR "$modules" || do_exit $?
|
||||
|
||||
# create sdk image bundle
|
||||
modules=$(cat "$JSDK"/release | grep MODULES | sed s/MODULES=//g | sed s/' '/','/g | sed s/\"//g | sed s/\\n//g) || do_exit $?
|
||||
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "$JBRSDK_BUNDLE" ]; then
|
||||
modules=${modules},$(get_mods_list "$JCEF_PATH"/jmods)
|
||||
fi
|
||||
create_image_bundle "$JBRSDK_BUNDLE${jbr_name_postfix}" "$JBRSDK_BUNDLE" "$JSDK_MODS_DIR" "$modules" || do_exit $?
|
||||
|
||||
if [ $do_maketest -eq 1 ]; then
|
||||
JBRSDK_TEST=${JBRSDK_BUNDLE}-${JBSDK_VERSION}-osx-test-${architecture}-b${build_number}
|
||||
echo Creating "$JBRSDK_TEST" ...
|
||||
[ $do_reset_changes -eq 1 ] && git checkout HEAD jb/project/tools/common/modules.list src/java.desktop/share/classes/module-info.java
|
||||
make test-image CONF=$RELEASE_NAME JBR_API_JBR_VERSION=TEST || do_exit $?
|
||||
[ -f "$JBRSDK_TEST.tar.gz" ] && rm "$JBRSDK_TEST.tar.gz"
|
||||
COPYFILE_DISABLE=1 tar -pczf "$JBRSDK_TEST".tar.gz -C $IMAGES_DIR --exclude='test/jdk/demos' test || do_exit $?
|
||||
fi
|
||||
|
||||
do_exit 0
|
||||
63
jb/project/tools/mac/scripts/notarize.sh
Executable file
63
jb/project/tools/mac/scripts/notarize.sh
Executable file
@@ -0,0 +1,63 @@
|
||||
#!/bin/bash
|
||||
|
||||
#immediately exit script with an error if a command fails
|
||||
set -euo pipefail
|
||||
[[ "${SCRIPT_VERBOSE:-}" == "1" ]] && set -x
|
||||
|
||||
APP_PATH=$1
|
||||
|
||||
if [[ -z "$APP_PATH" ]]; then
|
||||
echo "Usage: $0 AppPath"
|
||||
exit 1
|
||||
fi
|
||||
if [[ ! -f "$APP_PATH" ]]; then
|
||||
echo "AppName '$APP_PATH' does not exist or not a file"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
function log() {
|
||||
echo "$(date '+[%H:%M:%S]') $*"
|
||||
}
|
||||
|
||||
|
||||
# check required parameters
|
||||
: "${APPLE_ISSUER_ID}"
|
||||
: "${APPLE_KEY_ID}"
|
||||
: "${APPLE_PRIVATE_KEY}"
|
||||
|
||||
# shellcheck disable=SC2064
|
||||
trap "rm -f \"$PWD/tmp_key\"" INT EXIT RETURN
|
||||
echo -n "${APPLE_PRIVATE_KEY}" > tmp_key
|
||||
|
||||
log "Notarizing $APP_PATH..."
|
||||
xcrun notarytool submit --key tmp_key --key-id "${APPLE_KEY_ID}" --issuer "${APPLE_ISSUER_ID}" "$APP_PATH" 2>&1 --wait| tee "notarytool.submit.out"
|
||||
REQUEST_ID="$(grep -e " id: " "notarytool.submit.out" | grep -oE '([0-9a-f-]{36})'| head -n1)"
|
||||
|
||||
waitOutput=$(xcrun notarytool wait "$REQUEST_ID" --key tmp_key --key-id "${APPLE_KEY_ID}" --issuer "${APPLE_ISSUER_ID}" --timeout 6h)
|
||||
if [ $? -ne 0 ]; then
|
||||
log "Notarizing failed (wait command)"
|
||||
echo "$waitOutput"
|
||||
exit 1
|
||||
else
|
||||
echo "$waitOutput"
|
||||
fi
|
||||
|
||||
logOutout=$(xcrun notarytool log "$REQUEST_ID" --key tmp_key --key-id "${APPLE_KEY_ID}" --issuer "${APPLE_ISSUER_ID}" developer_log.json)
|
||||
if [ $? -ne 0 ]; then
|
||||
log "Notarizing failed (log command)"
|
||||
echo "$logOutout"
|
||||
exit 1
|
||||
else
|
||||
echo "$logOutout"
|
||||
fi
|
||||
|
||||
infoOUtput=$(xcrun notarytool info "$REQUEST_ID" --key tmp_key --key-id "${APPLE_KEY_ID}" --issuer "${APPLE_ISSUER_ID}")
|
||||
if [ $? -ne 0 ]; then
|
||||
log "Notarizing failed (info command)"
|
||||
echo "$infoOUtput"
|
||||
exit 1
|
||||
else
|
||||
echo "$infoOUtput"
|
||||
fi
|
||||
|
||||
log "Notarizing finished"
|
||||
41
jb/project/tools/mac/scripts/productsign.sh
Executable file
41
jb/project/tools/mac/scripts/productsign.sh
Executable file
@@ -0,0 +1,41 @@
|
||||
#!/bin/bash
|
||||
SCRIPT_DIR="$(cd "$(dirname "$0")" >/dev/null && pwd)"
|
||||
|
||||
source "$SCRIPT_DIR/jetsign-common.sh" || exit 1
|
||||
|
||||
function isSigned() {
|
||||
pkgutil --check-signature "$1" >/dev/null 2>&1 && grep -q "signed by a developer certificate" < <(pkgutil --check-signature "$1" 2>&1)
|
||||
}
|
||||
|
||||
# second last argument is a path to be signed
|
||||
pathToBeSigned="$(pwd)/${*:(-2):1}"
|
||||
# last argument is a path to signed file
|
||||
pathOut="$(pwd)/${*:(-1)}"
|
||||
jetSignArgs=("${@:1:$#-2}")
|
||||
if [[ ! -f "$pathToBeSigned" ]]; then
|
||||
echo "$pathToBeSigned is missing or not a file"
|
||||
exit 1
|
||||
elif isSigned "$pathToBeSigned" && ! isForced "${jetSignArgs[@]}" ; then
|
||||
echo "Already signed: $pathToBeSigned"
|
||||
elif [[ "$JETSIGN_CLIENT" == "null" ]]; then
|
||||
echo "JetSign client is missing, cannot proceed with signing"
|
||||
exit 1
|
||||
elif [[ "$pathToBeSigned" != *.pkg ]]; then
|
||||
echo "$pathToBeSigned won't be signed, assumed not to be a macOS package"
|
||||
else
|
||||
if ! isSigned "$pathToBeSigned" ; then
|
||||
echo "Unsigned macOS package: $pathToBeSigned"
|
||||
fi
|
||||
workDir=$(dirname "$pathToBeSigned")
|
||||
pathSigned="$workDir/signed/${pathToBeSigned##*/}"
|
||||
jetSignExtensions=$(jetSignExtensions "${jetSignArgs[@]}")
|
||||
contentType=$(jetSignContentType "$pathToBeSigned")
|
||||
(
|
||||
cd "$workDir" || exit 1
|
||||
"$JETSIGN_CLIENT" -log-format text -denoted-content-type "$contentType" -extensions "$jetSignExtensions" "$pathToBeSigned"
|
||||
isSigned "$pathSigned"
|
||||
rm -f "$pathOut"
|
||||
mv "$pathSigned" "$pathOut"
|
||||
rm -rf "$workDir/signed"
|
||||
)
|
||||
fi
|
||||
238
jb/project/tools/mac/scripts/sign.sh
Executable file
238
jb/project/tools/mac/scripts/sign.sh
Executable file
@@ -0,0 +1,238 @@
|
||||
#!/bin/bash
|
||||
|
||||
#immediately exit script with an error if a command fails
|
||||
set -euo pipefail
|
||||
[[ "${SCRIPT_VERBOSE:-}" == "1" ]] && set -x
|
||||
|
||||
if [[ $# -lt 5 ]]; then
|
||||
echo "Usage: $0 AppDirectory AppName BundleId CertificateID InstallerCertificateID"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
APPLICATION_PATH=$1
|
||||
PKG_NAME=$2
|
||||
BUNDLE_ID=$3
|
||||
JB_DEVELOPER_CERT=$4
|
||||
JB_INSTALLER_CERT=$5
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "$0")" >/dev/null && pwd)"
|
||||
|
||||
# Use JetBrains sign utility if it's available
|
||||
if [[ "${JETSIGN_CLIENT:=}" == "null" ]] || [[ "$JETSIGN_CLIENT" == "" ]]; then
|
||||
JB_SIGN=false
|
||||
SIGN_UTILITY="codesign"
|
||||
PRODUCTSIGN_UTILITY="productsign"
|
||||
else
|
||||
JB_SIGN=true
|
||||
SIGN_UTILITY="$SCRIPT_DIR/codesign.sh"
|
||||
PRODUCTSIGN_UTILITY="$SCRIPT_DIR/productsign.sh"
|
||||
fi
|
||||
|
||||
if [[ ! -d "$APPLICATION_PATH" ]]; then
|
||||
echo "AppDirectory '$APPLICATION_PATH' does not exist or not a directory"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
function log() {
|
||||
echo "$(date '+[%H:%M:%S]') $*"
|
||||
}
|
||||
|
||||
# Cleanup files left from previous sign attempt (if any)
|
||||
find "$APPLICATION_PATH" -name '*.cstemp' -exec rm '{}' \;
|
||||
|
||||
log "Signing libraries and executables..."
|
||||
# -perm +111 searches for executables
|
||||
for f in \
|
||||
"Contents/Home/lib" "Contents/MacOS" \
|
||||
"Contents/Home/Frameworks" \
|
||||
"Contents/Frameworks"; do
|
||||
if [ -d "$APPLICATION_PATH/$f" ]; then
|
||||
find "$APPLICATION_PATH/$f" \
|
||||
-type f \( -name "*.jnilib" -o -name "*.dylib" -o -name "*.so" -o -name "*.tbd" -o -name "*.node" -o -perm +111 \) \
|
||||
-exec sh -c '"$1" --timestamp -v -s "$2" --options=runtime --force --entitlements "$3" "$4" || exit 1' sh "$SIGN_UTILITY" "$JB_DEVELOPER_CERT" "$SCRIPT_DIR/entitlements.xml" {} \;
|
||||
fi
|
||||
done
|
||||
|
||||
log "Signing jmod files"
|
||||
JMODS_DIR="$APPLICATION_PATH/Contents/Home/jmods"
|
||||
JMOD_EXE="$BOOT_JDK/bin/jmod"
|
||||
if [ -d "$JMODS_DIR" ]; then
|
||||
log "processing jmods"
|
||||
|
||||
for jmod_file in "$JMODS_DIR"/*.jmod; do
|
||||
log "Processing $jmod_file"
|
||||
|
||||
TMP_DIR="$JMODS_DIR/tmp"
|
||||
rm -rf "$TMP_DIR"
|
||||
mkdir "$TMP_DIR"
|
||||
|
||||
log "Unzipping $jmod_file"
|
||||
$JMOD_EXE extract --dir "$TMP_DIR" "$jmod_file" >/dev/null
|
||||
|
||||
log "Signing dylibs in $TMP_DIR"
|
||||
find "$TMP_DIR" \
|
||||
-type f \( -name "*.dylib" -o -name "*.so"-o -perm +111 -o -name jarsigner -o -name jnativescan -o -name jdeps -o -name jpackageapplauncher -o -name jspawnhelper -o -name jar -o -name javap -o -name jdeprscan -o -name jfr -o -name rmiregistry -o -name java -o -name jhsdb -o -name jstatd -o -name jstatd -o -name jpackage -o -name keytool -o -name jmod -o -name jlink -o -name jimage -o -name jstack -o -name jcmd -o -name jps -o -name jmap -o -name jstat -o -name jinfo -o -name jshell -o -name jwebserver -o -name javac -o -name serialver -o -name jrunscript -o -name jdb -o -name jconsole -o -name javadoc \) \
|
||||
-exec sh -c '"$1" --timestamp -v -s "$2" --options=runtime --force --entitlements "$3" "$4" || exit 1' sh "$SIGN_UTILITY" "$JB_DEVELOPER_CERT" "$SCRIPT_DIR/entitlements.xml" {} \;
|
||||
|
||||
log "Removing $jmod_file"
|
||||
rm -f "$jmod_file"
|
||||
cmd="$JMOD_EXE create --class-path $TMP_DIR/classes"
|
||||
|
||||
# Check each directory and add to the command if it exists
|
||||
[ -d "$TMP_DIR/bin" ] && cmd="$cmd --cmds $TMP_DIR/bin"
|
||||
[ -d "$TMP_DIR/conf" ] && cmd="$cmd --config $TMP_DIR/conf"
|
||||
[ -d "$TMP_DIR/lib" ] && cmd="$cmd --libs $TMP_DIR/lib"
|
||||
[ -d "$TMP_DIR/include" ] && cmd="$cmd --header-files $TMP_DIR/include"
|
||||
[ -d "$TMP_DIR/legal" ] && cmd="$cmd --legal-notices $TMP_DIR/legal"
|
||||
[ -d "$TMP_DIR/man" ] && cmd="$cmd --man-pages $TMP_DIR/man"
|
||||
|
||||
log "Creating jmod file"
|
||||
log "$cmd"
|
||||
# Add the output file
|
||||
cmd="$cmd $jmod_file"
|
||||
|
||||
# Execute the command
|
||||
eval $cmd
|
||||
|
||||
log "Removing $TMP_DIR"
|
||||
rm -rf "$TMP_DIR"
|
||||
done
|
||||
|
||||
log "Repack java.base.jmod with new hashes of modules"
|
||||
hash_modules=$($JMOD_EXE describe $JMODS_DIR/java.base.jmod | grep hashes | awk '{print $2}' | tr '\n' '|' | sed s/\|$//) || exit $?
|
||||
|
||||
TMP_DIR="$JMODS_DIR/tmp"
|
||||
rm -rf "$TMP_DIR"
|
||||
mkdir "$TMP_DIR"
|
||||
|
||||
jmod_file="$JMODS_DIR/java.base.jmod"
|
||||
log "Unzipping $jmod_file"
|
||||
$JMOD_EXE extract --dir "$TMP_DIR" "$jmod_file" >/dev/null
|
||||
|
||||
log "Removing java.base.jmod"
|
||||
rm -f "$jmod_file"
|
||||
|
||||
cmd="$JMOD_EXE create --class-path $TMP_DIR/classes --hash-modules \"$hash_modules\" --module-path $JMODS_DIR"
|
||||
|
||||
# Check each directory and add to the command if it exists
|
||||
[ -d "$TMP_DIR/bin" ] && cmd="$cmd --cmds $TMP_DIR/bin"
|
||||
[ -d "$TMP_DIR/conf" ] && cmd="$cmd --config $TMP_DIR/conf"
|
||||
[ -d "$TMP_DIR/lib" ] && cmd="$cmd --libs $TMP_DIR/lib"
|
||||
[ -d "$TMP_DIR/include" ] && cmd="$cmd --header-files $TMP_DIR/include"
|
||||
[ -d "$TMP_DIR/legal" ] && cmd="$cmd --legal-notices $TMP_DIR/legal"
|
||||
[ -d "$TMP_DIR/man" ] && cmd="$cmd --man-pages $TMP_DIR/man"
|
||||
|
||||
log "Creating jmod file"
|
||||
log "$cmd"
|
||||
# Add the output file
|
||||
cmd="$cmd $jmod_file"
|
||||
|
||||
# Execute the command
|
||||
eval $cmd
|
||||
|
||||
log "Removing $TMP_DIR"
|
||||
rm -rf "$TMP_DIR"
|
||||
else
|
||||
echo "Directory '$JMODS_DIR' does not exist. Skipping signing of jmod files."
|
||||
fi
|
||||
|
||||
log "Signing libraries in jars in $APPLICATION_PATH"
|
||||
|
||||
# todo: add set -euo pipefail; into the inner sh -c
|
||||
# `-e` prevents `grep -q && printf` loginc
|
||||
# with `-o pipefail` there's no input for 'while' loop
|
||||
find "$APPLICATION_PATH" -name '*.jar' \
|
||||
-exec sh -c "set -u; unzip -l \"\$0\" | grep -q -e '\.dylib\$' -e '\.jnilib\$' -e '\.so\$' -e '\.tbd\$' -e '^jattach\$' && printf \"\$0\0\" " {} \; |
|
||||
while IFS= read -r -d $'\0' file; do
|
||||
log "Processing libraries in $file"
|
||||
|
||||
rm -rf jarfolder jar.jar
|
||||
mkdir jarfolder
|
||||
filename="${file##*/}"
|
||||
log "Filename: $filename"
|
||||
cp "$file" jarfolder && (cd jarfolder && jar xf "$filename" && rm "$filename")
|
||||
|
||||
find jarfolder \
|
||||
-type f \( -name "*.jnilib" -o -name "*.dylib" -o -name "*.so" -o -name "*.tbd" -o -name "jattach" \) \
|
||||
-exec sh -c '"$1" --timestamp --force -v -s "$2" --options=runtime --entitlements "$3" "$4" || exit 1' sh "$SIGN_UTILITY" "$JB_DEVELOPER_CERT" "$SCRIPT_DIR/entitlements.xml" {} \;
|
||||
|
||||
(cd jarfolder; zip -q -r -o -0 ../jar.jar .)
|
||||
mv jar.jar "$file"
|
||||
done
|
||||
|
||||
rm -rf jarfolder jar.jar
|
||||
|
||||
log "Signing other files..."
|
||||
# shellcheck disable=SC2043
|
||||
for f in \
|
||||
"Contents/Home/bin"; do
|
||||
if [ -d "$APPLICATION_PATH/$f" ]; then
|
||||
find "$APPLICATION_PATH/$f" \
|
||||
-type f \( -name "*.jnilib" -o -name "*.dylib" -o -name "*.so" -o -name "*.tbd" -o -perm +111 \) \
|
||||
-exec sh -c '"$1" --timestamp -v -s "$2" --options=runtime --force --entitlements "$3" "$4" || exit 1' sh "$SIGN_UTILITY" "$JB_DEVELOPER_CERT" "$SCRIPT_DIR/entitlements.xml" {} \;
|
||||
fi
|
||||
done
|
||||
|
||||
log "Signing whole frameworks..."
|
||||
# shellcheck disable=SC2043
|
||||
if [ "$JB_SIGN" = true ]; then for f in \
|
||||
"Contents/Frameworks/cef_server.app/Contents/Frameworks" "Contents/Home/Frameworks" "Contents/Frameworks"; do
|
||||
if [ -d "$APPLICATION_PATH/$f" ]; then
|
||||
find "$APPLICATION_PATH/$f" \( -name '*.framework' -o -name '*.app' \) -maxdepth 1 | while read -r line
|
||||
do
|
||||
log "Signing '$line':"
|
||||
tar -pczf tmp-to-sign.tar.gz -C "$(dirname "$line")" "$(basename "$line")"
|
||||
"$SIGN_UTILITY" --timestamp \
|
||||
-v -s "$JB_DEVELOPER_CERT" --options=runtime \
|
||||
--force \
|
||||
--entitlements "$SCRIPT_DIR/entitlements.xml" tmp-to-sign.tar.gz || exit 1
|
||||
rm -rf "$line"
|
||||
tar -xzf tmp-to-sign.tar.gz --directory "$(dirname "$line")"
|
||||
rm -f tmp-to-sign.tar.gz
|
||||
done
|
||||
fi
|
||||
done; fi
|
||||
|
||||
log "Checking framework signatures..."
|
||||
for f in \
|
||||
"Contents/Home/Frameworks" "Contents/Frameworks"; do
|
||||
if [ -d "$APPLICATION_PATH/$f" ]; then
|
||||
find "$APPLICATION_PATH/$f" -name '*.framework' -maxdepth 1 | while read -r line
|
||||
do
|
||||
log "Checking '$line':"
|
||||
codesign --verify --deep --strict --verbose=4 "$line"
|
||||
done
|
||||
fi
|
||||
done
|
||||
|
||||
log "Signing whole app..."
|
||||
if [ "$JB_SIGN" = true ]; then
|
||||
tar -pczf tmp-to-sign.tar.gz --exclude='man' -C "$(dirname "$APPLICATION_PATH")" "$(basename "$APPLICATION_PATH")"
|
||||
"$SIGN_UTILITY" --timestamp \
|
||||
-v -s "$JB_DEVELOPER_CERT" --options=runtime \
|
||||
--force \
|
||||
--entitlements "$SCRIPT_DIR/entitlements.xml" tmp-to-sign.tar.gz || exit 1
|
||||
rm -rf "$APPLICATION_PATH"
|
||||
tar -xzf tmp-to-sign.tar.gz --directory "$(dirname "$APPLICATION_PATH")"
|
||||
rm -f tmp-to-sign.tar.gz
|
||||
else
|
||||
"$SIGN_UTILITY" --timestamp \
|
||||
-v -s "$JB_DEVELOPER_CERT" --options=runtime \
|
||||
--force \
|
||||
--entitlements "$SCRIPT_DIR/entitlements.xml" "$APPLICATION_PATH" || exit 1
|
||||
fi
|
||||
|
||||
BUILD_NAME="$(basename "$APPLICATION_PATH")"
|
||||
|
||||
log "Creating $PKG_NAME..."
|
||||
rm -rf "$PKG_NAME"
|
||||
|
||||
mkdir -p unsigned
|
||||
pkgbuild --identifier $BUNDLE_ID --root $APPLICATION_PATH \
|
||||
--install-location /Library/Java/JavaVirtualMachines/${BUILD_NAME} unsigned/${PKG_NAME}
|
||||
log "Signing $PKG_NAME..."
|
||||
"$PRODUCTSIGN_UTILITY" --timestamp --sign "$JB_INSTALLER_CERT" unsigned/${PKG_NAME} ${PKG_NAME}
|
||||
|
||||
log "Verifying java is not broken"
|
||||
find "$APPLICATION_PATH" \
|
||||
-type f -name 'java' -perm +111 -exec {} -version \;
|
||||
153
jb/project/tools/mac/scripts/signapp.sh
Executable file
153
jb/project/tools/mac/scripts/signapp.sh
Executable file
@@ -0,0 +1,153 @@
|
||||
#!/bin/bash
|
||||
|
||||
#immediately exit script with an error if a command fails
|
||||
set -euo pipefail
|
||||
[[ "${SCRIPT_VERBOSE:-}" == "1" ]] && set -x
|
||||
|
||||
export COPY_EXTENDED_ATTRIBUTES_DISABLE=true
|
||||
export COPYFILE_DISABLE=true
|
||||
|
||||
INPUT_FILE=$1
|
||||
EXPLODED=$2.exploded
|
||||
USERNAME=$3
|
||||
PASSWORD=$4
|
||||
CODESIGN_STRING=$5
|
||||
JB_INSTALLER_CERT=$6
|
||||
NOTARIZE=$7
|
||||
BUNDLE_ID=$8
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "$0")" >/dev/null && pwd)"
|
||||
|
||||
function log() {
|
||||
echo "$(date '+[%H:%M:%S]') $*"
|
||||
}
|
||||
|
||||
log "Deleting $EXPLODED ..."
|
||||
if test -d "$EXPLODED"; then
|
||||
find "$EXPLODED" -mindepth 1 -maxdepth 1 -exec chmod -R u+wx '{}' \;
|
||||
fi
|
||||
rm -rf "$EXPLODED"
|
||||
mkdir "$EXPLODED"
|
||||
|
||||
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"
|
||||
|
||||
log "$INPUT_FILE extracted and removed"
|
||||
|
||||
APP_NAME=$(basename "$INPUT_FILE" | awk -F".tar" '{ print $1 }')
|
||||
PKG_NAME="$APP_NAME.pkg"
|
||||
APPLICATION_PATH=$EXPLODED/$(ls $EXPLODED)
|
||||
|
||||
find "$APPLICATION_PATH/Contents/Home/bin" \
|
||||
-maxdepth 1 -type f -name '*.jnilib' -print0 |
|
||||
while IFS= read -r -d $'\0' file; do
|
||||
if [ -f "$file" ]; then
|
||||
log "Linking $file"
|
||||
b="$(basename "$file" .jnilib)"
|
||||
ln -sf "$b.jnilib" "$(dirname "$file")/$b.dylib"
|
||||
fi
|
||||
done
|
||||
|
||||
find "$APPLICATION_PATH/Contents/" \
|
||||
-maxdepth 1 -type f -name '*.txt' -print0 |
|
||||
while IFS= read -r -d $'\0' file; do
|
||||
if [ -f "$file" ]; then
|
||||
log "Moving $file"
|
||||
mv "$file" "$APPLICATION_PATH/Contents/Resources"
|
||||
fi
|
||||
done
|
||||
|
||||
non_plist=$(find "$APPLICATION_PATH/Contents/" -maxdepth 1 -type f -and -not -name 'Info.plist' | wc -l)
|
||||
if [[ $non_plist -gt 0 ]]; then
|
||||
log "Only Info.plist file is allowed in Contents directory but found $non_plist file(s):"
|
||||
log "$(find "$APPLICATION_PATH/Contents/" -maxdepth 1 -type f -and -not -name 'Info.plist')"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ "${JETSIGN_CLIENT:=}" == "null" ]] || [[ "$JETSIGN_CLIENT" == "" ]]; then
|
||||
log "Unlocking keychain..."
|
||||
# Make sure *.p12 is imported into local KeyChain
|
||||
security unlock-keychain -p "$PASSWORD" "/Users/$USERNAME/Library/Keychains/login.keychain"
|
||||
fi
|
||||
|
||||
attempt=1
|
||||
limit=3
|
||||
set +e
|
||||
while [[ $attempt -le $limit ]]; do
|
||||
log "Signing (attempt $attempt) $APPLICATION_PATH ..."
|
||||
"$SCRIPT_DIR/sign.sh" "$APPLICATION_PATH" "$PKG_NAME" "$BUNDLE_ID" "$CODESIGN_STRING" "$JB_INSTALLER_CERT"
|
||||
ec=$?
|
||||
if [[ $ec -ne 0 ]]; then
|
||||
((attempt += 1))
|
||||
if [ $attempt -eq $limit ]; then
|
||||
set -e
|
||||
fi
|
||||
log "Signing failed, wait for 30 sec and try to sign again"
|
||||
sleep 30
|
||||
else
|
||||
log "Signing done"
|
||||
codesign -v "$APPLICATION_PATH" -vvvvv
|
||||
log "Check sign done"
|
||||
spctl -a -v $APPLICATION_PATH
|
||||
((attempt += limit))
|
||||
fi
|
||||
done
|
||||
|
||||
set -e
|
||||
|
||||
if [ "$NOTARIZE" = "yes" ]; then
|
||||
log "Notarizing..."
|
||||
"$SCRIPT_DIR/notarize.sh" "$PKG_NAME"
|
||||
|
||||
log "Stapling..."
|
||||
appStaplerOutput=$(xcrun stapler staple "$APPLICATION_PATH")
|
||||
if [ $? -ne 0 ]; then
|
||||
log "Stapling application failed"
|
||||
echo "$appStaplerOutput"
|
||||
exit 1
|
||||
else
|
||||
echo "$appStaplerOutput"
|
||||
fi
|
||||
|
||||
log "Stapling package..."
|
||||
pkgStaplerOutput=$(xcrun stapler staple "$PKG_NAME")
|
||||
if [ $? -ne 0 ]; then
|
||||
log "Stapling package failed"
|
||||
echo "$pkgStaplerOutput"
|
||||
exit 1
|
||||
else
|
||||
echo "$pkgStaplerOutput"
|
||||
fi
|
||||
|
||||
# Verify stapling
|
||||
log "Verifying stapling..."
|
||||
if ! stapler validate "$APPLICATION_PATH"; then
|
||||
log "Stapling verification failed for application"
|
||||
exit 1
|
||||
fi
|
||||
if ! stapler validate "$PKG_NAME"; then
|
||||
log "Stapling verification failed for package"
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
log "Notarization disabled"
|
||||
log "Stapling disabled"
|
||||
fi
|
||||
|
||||
log "Zipping $BUILD_NAME to $INPUT_FILE ..."
|
||||
(
|
||||
if [[ "$APPLICATION_PATH" != "$EXPLODED/$BUILD_NAME" ]]; then
|
||||
mv $APPLICATION_PATH $EXPLODED/$BUILD_NAME
|
||||
else
|
||||
echo "No move, source == destination: $APPLICATION_PATH"
|
||||
fi
|
||||
|
||||
tar -pczvf $INPUT_FILE --exclude='man' -C $EXPLODED $BUILD_NAME
|
||||
log "Finished zipping"
|
||||
)
|
||||
rm -rf "$EXPLODED"
|
||||
log "Done"
|
||||
30
jb/project/tools/patches/add_jcef_module.patch
Normal file
30
jb/project/tools/patches/add_jcef_module.patch
Normal file
@@ -0,0 +1,30 @@
|
||||
diff --git jb/project/tools/common/modules.list jb/project/tools/common/modules.list
|
||||
index 522acb7cb43..c40e689d5de 100644
|
||||
--- jb/project/tools/common/modules.list
|
||||
+++ jb/project/tools/common/modules.list
|
||||
@@ -51,4 +51,7 @@ jdk.unsupported.desktop,
|
||||
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 897647ee368..781d1809493 100644
|
||||
--- src/java.desktop/share/classes/module-info.java
|
||||
+++ src/java.desktop/share/classes/module-info.java
|
||||
@@ -116,7 +116,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;
|
||||
30
jb/project/tools/patches/add_jcef_module_aarch64.patch
Normal file
30
jb/project/tools/patches/add_jcef_module_aarch64.patch
Normal file
@@ -0,0 +1,30 @@
|
||||
diff --git jb/project/tools/common/modules.list jb/project/tools/common/modules.list
|
||||
index 522acb7..c40e689 100644
|
||||
--- jb/project/tools/common/modules.list
|
||||
+++ jb/project/tools/common/modules.list
|
||||
@@ -51,4 +51,7 @@ jdk.unsupported.desktop,
|
||||
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 897647e..781d180 100644
|
||||
--- src/java.desktop/share/classes/module-info.java
|
||||
+++ src/java.desktop/share/classes/module-info.java
|
||||
@@ -116,7 +116,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;
|
||||
267
jb/project/tools/perf/j2dbopts_poly250-AA-rand_col.txt
Normal file
267
jb/project/tools/perf/j2dbopts_poly250-AA-rand_col.txt
Normal file
@@ -0,0 +1,267 @@
|
||||
prog.verbose=disabled
|
||||
prog.printresults=enabled
|
||||
global.env.outputwidth=640
|
||||
global.env.outputheight=480
|
||||
global.env.runcount=5
|
||||
global.env.repcount=0
|
||||
global.env.testtime=2500
|
||||
global.results.workunits=units
|
||||
global.results.timeunits=sec
|
||||
global.results.ratio=unitspersec
|
||||
global.dest.offscreen=disabled
|
||||
global.dest.frame.defaultframe=enabled
|
||||
global.dest.frame.transframe=disabled
|
||||
global.dest.frame.shapedframe=disabled
|
||||
global.dest.frame.shapedtransframe=disabled
|
||||
global.dest.compatimg.compatimg=disabled
|
||||
global.dest.compatimg.opqcompatimg=disabled
|
||||
global.dest.compatimg.bmcompatimg=disabled
|
||||
global.dest.compatimg.transcompatimg=disabled
|
||||
global.dest.volimg.volimg=disabled
|
||||
global.dest.volimg.opqvolimg=disabled
|
||||
global.dest.volimg.bmvolimg=disabled
|
||||
global.dest.volimg.transvolimg=disabled
|
||||
global.dest.bufimg.IntXrgb=disabled
|
||||
global.dest.bufimg.IntArgb=disabled
|
||||
global.dest.bufimg.IntArgbPre=disabled
|
||||
global.dest.bufimg.3ByteBgr=disabled
|
||||
global.dest.bufimg.ByteIndexed=disabled
|
||||
global.dest.bufimg.ByteGray=disabled
|
||||
global.dest.bufimg.4ByteAbgr=disabled
|
||||
global.dest.bufimg.4ByteAbgrPre=disabled
|
||||
global.dest.bufimg.custom=disabled
|
||||
graphics.opts.anim=2
|
||||
graphics.opts.sizes=250
|
||||
graphics.opts.alpharule=SrcOver
|
||||
graphics.opts.transform=ident
|
||||
graphics.opts.extraalpha=Off
|
||||
graphics.opts.xormode=Off
|
||||
graphics.opts.clip=Off
|
||||
graphics.opts.renderhint=Default
|
||||
graphics.render.opts.paint=random
|
||||
graphics.render.opts.alphacolor=Off
|
||||
graphics.render.opts.antialias=On
|
||||
graphics.render.opts.stroke=width1
|
||||
graphics.render.tests.drawLine=disabled
|
||||
graphics.render.tests.drawLineHoriz=disabled
|
||||
graphics.render.tests.drawLineVert=disabled
|
||||
graphics.render.tests.fillRect=disabled
|
||||
graphics.render.tests.drawRect=disabled
|
||||
graphics.render.tests.fillOval=disabled
|
||||
graphics.render.tests.drawOval=disabled
|
||||
graphics.render.tests.fillPoly=disabled
|
||||
graphics.render.tests.drawPoly=enabled
|
||||
graphics.render.tests.shape.fillCubic=disabled
|
||||
graphics.render.tests.shape.drawCubic=disabled
|
||||
graphics.render.tests.shape.fillEllipse2D=disabled
|
||||
graphics.render.tests.shape.drawEllipse2D=disabled
|
||||
graphics.imaging.src.offscr.opaque=disabled
|
||||
graphics.imaging.src.offscr.bitmask=disabled
|
||||
graphics.imaging.src.offscr.translucent=disabled
|
||||
graphics.imaging.src.opqcompatimg.opaque=disabled
|
||||
graphics.imaging.src.opqcompatimg.bitmask=disabled
|
||||
graphics.imaging.src.opqcompatimg.translucent=disabled
|
||||
graphics.imaging.src.bmcompatimg.opaque=disabled
|
||||
graphics.imaging.src.bmcompatimg.bitmask=disabled
|
||||
graphics.imaging.src.bmcompatimg.translucent=disabled
|
||||
graphics.imaging.src.transcompatimg.opaque=disabled
|
||||
graphics.imaging.src.transcompatimg.bitmask=disabled
|
||||
graphics.imaging.src.transcompatimg.translucent=disabled
|
||||
graphics.imaging.src.opqvolimg.opaque=disabled
|
||||
graphics.imaging.src.opqvolimg.bitmask=disabled
|
||||
graphics.imaging.src.opqvolimg.translucent=disabled
|
||||
graphics.imaging.src.bmvolimg.opaque=disabled
|
||||
graphics.imaging.src.bmvolimg.bitmask=disabled
|
||||
graphics.imaging.src.bmvolimg.translucent=disabled
|
||||
graphics.imaging.src.transvolimg.opaque=disabled
|
||||
graphics.imaging.src.transvolimg.bitmask=disabled
|
||||
graphics.imaging.src.transvolimg.translucent=disabled
|
||||
graphics.imaging.src.bufimg.IntXrgb.opaque=disabled
|
||||
graphics.imaging.src.bufimg.IntXrgb.bitmask=disabled
|
||||
graphics.imaging.src.bufimg.IntXrgb.translucent=disabled
|
||||
graphics.imaging.src.bufimg.IntArgb.opaque=disabled
|
||||
graphics.imaging.src.bufimg.IntArgb.bitmask=disabled
|
||||
graphics.imaging.src.bufimg.IntArgb.translucent=disabled
|
||||
graphics.imaging.src.bufimg.IntArgbPre.opaque=disabled
|
||||
graphics.imaging.src.bufimg.IntArgbPre.bitmask=disabled
|
||||
graphics.imaging.src.bufimg.IntArgbPre.translucent=disabled
|
||||
graphics.imaging.src.bufimg.ByteGray.opaque=disabled
|
||||
graphics.imaging.src.bufimg.ByteGray.bitmask=disabled
|
||||
graphics.imaging.src.bufimg.ByteGray.translucent=disabled
|
||||
graphics.imaging.src.bufimg.3ByteBgr.opaque=disabled
|
||||
graphics.imaging.src.bufimg.3ByteBgr.bitmask=disabled
|
||||
graphics.imaging.src.bufimg.3ByteBgr.translucent=disabled
|
||||
graphics.imaging.src.bufimg.4ByteAbgr.opaque=disabled
|
||||
graphics.imaging.src.bufimg.4ByteAbgr.bitmask=disabled
|
||||
graphics.imaging.src.bufimg.4ByteAbgr.translucent=disabled
|
||||
graphics.imaging.src.bufimg.4ByteAbgrPre.opaque=disabled
|
||||
graphics.imaging.src.bufimg.4ByteAbgrPre.bitmask=disabled
|
||||
graphics.imaging.src.bufimg.4ByteAbgrPre.translucent=disabled
|
||||
graphics.imaging.src.bufimg.ByteIndexedBm.opaque=disabled
|
||||
graphics.imaging.src.bufimg.ByteIndexedBm.bitmask=disabled
|
||||
graphics.imaging.src.bufimg.ByteIndexedBm.translucent=disabled
|
||||
graphics.imaging.src.bufimg.unmanagedIntXrgb.opaque=disabled
|
||||
graphics.imaging.src.bufimg.unmanagedIntXrgb.bitmask=disabled
|
||||
graphics.imaging.src.bufimg.unmanagedIntXrgb.translucent=disabled
|
||||
graphics.imaging.src.bufimg.unmanagedIntArgb.opaque=disabled
|
||||
graphics.imaging.src.bufimg.unmanagedIntArgb.bitmask=disabled
|
||||
graphics.imaging.src.bufimg.unmanagedIntArgb.translucent=disabled
|
||||
graphics.imaging.src.bufimg.unmanagedIntArgbPre.opaque=disabled
|
||||
graphics.imaging.src.bufimg.unmanagedIntArgbPre.bitmask=disabled
|
||||
graphics.imaging.src.bufimg.unmanagedIntArgbPre.translucent=disabled
|
||||
graphics.imaging.src.bufimg.unmanaged3ByteBgr.opaque=disabled
|
||||
graphics.imaging.src.bufimg.unmanaged3ByteBgr.bitmask=disabled
|
||||
graphics.imaging.src.bufimg.unmanaged3ByteBgr.translucent=disabled
|
||||
graphics.imaging.benchmarks.opts.interpolation=Nearest neighbor
|
||||
graphics.imaging.benchmarks.opts.touchsrc=Off
|
||||
graphics.imaging.benchmarks.tests.drawimage=disabled
|
||||
graphics.imaging.benchmarks.tests.drawimagebg=disabled
|
||||
graphics.imaging.benchmarks.tests.drawimagescaleup=disabled
|
||||
graphics.imaging.benchmarks.tests.drawimagescaledown=disabled
|
||||
graphics.imaging.benchmarks.tests.drawimagescalesplit=disabled
|
||||
graphics.imaging.benchmarks.tests.drawimagetxform=disabled
|
||||
graphics.imaging.imageops.opts.op=convolve3x3zero
|
||||
graphics.imaging.imageops.tests.graphics2d.drawimageop=disabled
|
||||
graphics.imaging.imageops.tests.bufimgop.filternull=disabled
|
||||
graphics.imaging.imageops.tests.bufimgop.filtercached=disabled
|
||||
graphics.imaging.imageops.tests.rasterop.filternull=disabled
|
||||
graphics.imaging.imageops.tests.rasterop.filtercached=disabled
|
||||
graphics.misc.copytests.copyAreaVert=disabled
|
||||
graphics.misc.copytests.copyAreaHoriz=disabled
|
||||
graphics.misc.copytests.copyAreaDiag=disabled
|
||||
pixel.opts.renderto=Off
|
||||
pixel.opts.renderfrom=Off
|
||||
pixel.src.1BitBinary=disabled
|
||||
pixel.src.2BitBinary=disabled
|
||||
pixel.src.4BitBinary=disabled
|
||||
pixel.src.ByteIndexed=disabled
|
||||
pixel.src.ByteGray=disabled
|
||||
pixel.src.Short555=disabled
|
||||
pixel.src.Short565=disabled
|
||||
pixel.src.ShortGray=disabled
|
||||
pixel.src.3ByteBgr=disabled
|
||||
pixel.src.4ByteAbgr=disabled
|
||||
pixel.src.IntXrgb=disabled
|
||||
pixel.src.IntXbgr=disabled
|
||||
pixel.src.IntArgb=disabled
|
||||
pixel.bimgtests.getrgb=disabled
|
||||
pixel.bimgtests.setrgb=disabled
|
||||
pixel.rastests.getdataelem=disabled
|
||||
pixel.rastests.setdataelem=disabled
|
||||
pixel.rastests.getpixel=disabled
|
||||
pixel.rastests.setpixel=disabled
|
||||
pixel.dbtests.getelem=disabled
|
||||
pixel.dbtests.setelem=disabled
|
||||
text.opts.data.tlength=16
|
||||
text.opts.data.tscript=english
|
||||
text.opts.font.fname=serif,physical
|
||||
text.opts.font.fstyle=0
|
||||
text.opts.font.fsize=13.0
|
||||
text.opts.font.ftx=Identity
|
||||
text.opts.graphics.textaa=Off
|
||||
text.opts.graphics.tfm=Off
|
||||
text.opts.graphics.gaa=Off
|
||||
text.opts.graphics.gtx=Identity
|
||||
text.opts.advopts.gvstyle=0
|
||||
text.opts.advopts.tlruns=1
|
||||
text.opts.advopts.maptype=FONT
|
||||
text.Rendering.tests.drawString=disabled
|
||||
text.Rendering.tests.drawChars=disabled
|
||||
text.Rendering.tests.drawBytes=disabled
|
||||
text.Rendering.tests.drawGlyphVectors=disabled
|
||||
text.Rendering.tests.drawTextLayout=disabled
|
||||
text.Measuring.tests.stringWidth=disabled
|
||||
text.Measuring.tests.stringBounds=disabled
|
||||
text.Measuring.tests.charsWidth=disabled
|
||||
text.Measuring.tests.charsBounds=disabled
|
||||
text.Measuring.tests.fontcandisplay=disabled
|
||||
text.Measuring.tests.gvWidth=disabled
|
||||
text.Measuring.tests.gvLogicalBounds=disabled
|
||||
text.Measuring.tests.gvVisualBounds=disabled
|
||||
text.Measuring.tests.gvPixelBounds=disabled
|
||||
text.Measuring.tests.gvOutline=disabled
|
||||
text.Measuring.tests.gvGlyphLogicalBounds=disabled
|
||||
text.Measuring.tests.gvGlyphVisualBounds=disabled
|
||||
text.Measuring.tests.gvGlyphPixelBounds=disabled
|
||||
text.Measuring.tests.gvGlyphOutline=disabled
|
||||
text.Measuring.tests.gvGlyphTransform=disabled
|
||||
text.Measuring.tests.gvGlyphMetrics=disabled
|
||||
text.Measuring.tests.tlAdvance=disabled
|
||||
text.Measuring.tests.tlAscent=disabled
|
||||
text.Measuring.tests.tlBounds=disabled
|
||||
text.Measuring.tests.tlGetCaretInfo=disabled
|
||||
text.Measuring.tests.tlGetNextHit=disabled
|
||||
text.Measuring.tests.tlGetCaretShape=disabled
|
||||
text.Measuring.tests.tlGetLogicalHighlightShape=disabled
|
||||
text.Measuring.tests.tlHitTest=disabled
|
||||
text.Measuring.tests.tlOutline=disabled
|
||||
text.construction.tests.gvfromfontstring=disabled
|
||||
text.construction.tests.gvfromfontchars=disabled
|
||||
text.construction.tests.gvfromfontci=disabled
|
||||
text.construction.tests.gvfromfontglyphs=disabled
|
||||
text.construction.tests.gvfromfontlayout=disabled
|
||||
text.construction.tests.tlfromfont=disabled
|
||||
text.construction.tests.tlfrommap=disabled
|
||||
imageio.opts.size=250
|
||||
imageio.opts.content=photo
|
||||
imageio.input.opts.general.source.file=disabled
|
||||
imageio.input.opts.general.source.url=disabled
|
||||
imageio.input.opts.general.source.byteArray=disabled
|
||||
imageio.input.opts.imageio.useCache=Off
|
||||
imageio.input.image.toolkit.opts.format=
|
||||
imageio.input.image.toolkit.tests.createImage=disabled
|
||||
imageio.input.image.imageio.opts.format=
|
||||
imageio.input.image.imageio.tests.imageioRead=disabled
|
||||
imageio.input.image.imageio.reader.opts.seekForwardOnly=On
|
||||
imageio.input.image.imageio.reader.opts.ignoreMetadata=On
|
||||
imageio.input.image.imageio.reader.opts.installListener=Off
|
||||
imageio.input.image.imageio.reader.tests.read=disabled
|
||||
imageio.input.image.imageio.reader.tests.getImageMetadata=disabled
|
||||
imageio.input.stream.tests.construct=disabled
|
||||
imageio.input.stream.tests.read=disabled
|
||||
imageio.input.stream.tests.readByteArray=disabled
|
||||
imageio.input.stream.tests.readFullyByteArray=disabled
|
||||
imageio.input.stream.tests.readBit=disabled
|
||||
imageio.input.stream.tests.readByte=disabled
|
||||
imageio.input.stream.tests.readUnsignedByte=disabled
|
||||
imageio.input.stream.tests.readShort=disabled
|
||||
imageio.input.stream.tests.readUnsignedShort=disabled
|
||||
imageio.input.stream.tests.readInt=disabled
|
||||
imageio.input.stream.tests.readUnsignedInt=disabled
|
||||
imageio.input.stream.tests.readFloat=disabled
|
||||
imageio.input.stream.tests.readLong=disabled
|
||||
imageio.input.stream.tests.readDouble=disabled
|
||||
imageio.input.stream.tests.skipBytes=disabled
|
||||
imageio.output.opts.general.dest.file=disabled
|
||||
imageio.output.opts.general.dest.byteArray=disabled
|
||||
imageio.output.opts.imageio.useCache=Off
|
||||
imageio.output.image.imageio.opts.format=
|
||||
imageio.output.image.imageio.tests.imageioWrite=disabled
|
||||
imageio.output.image.imageio.writer.opts.installListener=Off
|
||||
imageio.output.image.imageio.writer.tests.write=disabled
|
||||
imageio.output.stream.tests.construct=disabled
|
||||
imageio.output.stream.tests.write=disabled
|
||||
imageio.output.stream.tests.writeByteArray=disabled
|
||||
imageio.output.stream.tests.writeBit=disabled
|
||||
imageio.output.stream.tests.writeByte=disabled
|
||||
imageio.output.stream.tests.writeShort=disabled
|
||||
imageio.output.stream.tests.writeInt=disabled
|
||||
imageio.output.stream.tests.writeFloat=disabled
|
||||
imageio.output.stream.tests.writeLong=disabled
|
||||
imageio.output.stream.tests.writeDouble=disabled
|
||||
cmm.opts.profiles=1001
|
||||
cmm.colorconv.data.fromRGB=disabled
|
||||
cmm.colorconv.data.toRGB=disabled
|
||||
cmm.colorconv.data.fromCIEXYZ=disabled
|
||||
cmm.colorconv.data.toCIEXYZ=disabled
|
||||
cmm.colorconv.ccop.ccopOptions.size=250
|
||||
cmm.colorconv.ccop.ccopOptions.content=photo
|
||||
cmm.colorconv.ccop.ccopOptions.srcType=INT_RGB
|
||||
cmm.colorconv.ccop.ccopOptions.dstType=INT_RGB
|
||||
cmm.colorconv.ccop.op_img=disabled
|
||||
cmm.colorconv.ccop.op_rst=disabled
|
||||
cmm.colorconv.ccop.op_draw=disabled
|
||||
cmm.colorconv.embed.embedOptions.Images=512x512
|
||||
cmm.colorconv.embed.embd_img_read=disabled
|
||||
cmm.profiles.getHeader=disabled
|
||||
cmm.profiles.getNumComponents=disabled
|
||||
267
jb/project/tools/perf/j2dbopts_poly250-rand_col.txt
Normal file
267
jb/project/tools/perf/j2dbopts_poly250-rand_col.txt
Normal file
@@ -0,0 +1,267 @@
|
||||
prog.verbose=disabled
|
||||
prog.printresults=enabled
|
||||
global.env.outputwidth=640
|
||||
global.env.outputheight=480
|
||||
global.env.runcount=5
|
||||
global.env.repcount=0
|
||||
global.env.testtime=2500
|
||||
global.results.workunits=units
|
||||
global.results.timeunits=sec
|
||||
global.results.ratio=unitspersec
|
||||
global.dest.offscreen=disabled
|
||||
global.dest.frame.defaultframe=enabled
|
||||
global.dest.frame.transframe=disabled
|
||||
global.dest.frame.shapedframe=disabled
|
||||
global.dest.frame.shapedtransframe=disabled
|
||||
global.dest.compatimg.compatimg=disabled
|
||||
global.dest.compatimg.opqcompatimg=disabled
|
||||
global.dest.compatimg.bmcompatimg=disabled
|
||||
global.dest.compatimg.transcompatimg=disabled
|
||||
global.dest.volimg.volimg=disabled
|
||||
global.dest.volimg.opqvolimg=disabled
|
||||
global.dest.volimg.bmvolimg=disabled
|
||||
global.dest.volimg.transvolimg=disabled
|
||||
global.dest.bufimg.IntXrgb=disabled
|
||||
global.dest.bufimg.IntArgb=disabled
|
||||
global.dest.bufimg.IntArgbPre=disabled
|
||||
global.dest.bufimg.3ByteBgr=disabled
|
||||
global.dest.bufimg.ByteIndexed=disabled
|
||||
global.dest.bufimg.ByteGray=disabled
|
||||
global.dest.bufimg.4ByteAbgr=disabled
|
||||
global.dest.bufimg.4ByteAbgrPre=disabled
|
||||
global.dest.bufimg.custom=disabled
|
||||
graphics.opts.anim=2
|
||||
graphics.opts.sizes=250
|
||||
graphics.opts.alpharule=SrcOver
|
||||
graphics.opts.transform=ident
|
||||
graphics.opts.extraalpha=Off
|
||||
graphics.opts.xormode=Off
|
||||
graphics.opts.clip=Off
|
||||
graphics.opts.renderhint=Default
|
||||
graphics.render.opts.paint=random
|
||||
graphics.render.opts.alphacolor=Off
|
||||
graphics.render.opts.antialias=Off
|
||||
graphics.render.opts.stroke=width1
|
||||
graphics.render.tests.drawLine=disabled
|
||||
graphics.render.tests.drawLineHoriz=disabled
|
||||
graphics.render.tests.drawLineVert=disabled
|
||||
graphics.render.tests.fillRect=disabled
|
||||
graphics.render.tests.drawRect=disabled
|
||||
graphics.render.tests.fillOval=disabled
|
||||
graphics.render.tests.drawOval=disabled
|
||||
graphics.render.tests.fillPoly=disabled
|
||||
graphics.render.tests.drawPoly=enabled
|
||||
graphics.render.tests.shape.fillCubic=disabled
|
||||
graphics.render.tests.shape.drawCubic=disabled
|
||||
graphics.render.tests.shape.fillEllipse2D=disabled
|
||||
graphics.render.tests.shape.drawEllipse2D=disabled
|
||||
graphics.imaging.src.offscr.opaque=disabled
|
||||
graphics.imaging.src.offscr.bitmask=disabled
|
||||
graphics.imaging.src.offscr.translucent=disabled
|
||||
graphics.imaging.src.opqcompatimg.opaque=disabled
|
||||
graphics.imaging.src.opqcompatimg.bitmask=disabled
|
||||
graphics.imaging.src.opqcompatimg.translucent=disabled
|
||||
graphics.imaging.src.bmcompatimg.opaque=disabled
|
||||
graphics.imaging.src.bmcompatimg.bitmask=disabled
|
||||
graphics.imaging.src.bmcompatimg.translucent=disabled
|
||||
graphics.imaging.src.transcompatimg.opaque=disabled
|
||||
graphics.imaging.src.transcompatimg.bitmask=disabled
|
||||
graphics.imaging.src.transcompatimg.translucent=disabled
|
||||
graphics.imaging.src.opqvolimg.opaque=disabled
|
||||
graphics.imaging.src.opqvolimg.bitmask=disabled
|
||||
graphics.imaging.src.opqvolimg.translucent=disabled
|
||||
graphics.imaging.src.bmvolimg.opaque=disabled
|
||||
graphics.imaging.src.bmvolimg.bitmask=disabled
|
||||
graphics.imaging.src.bmvolimg.translucent=disabled
|
||||
graphics.imaging.src.transvolimg.opaque=disabled
|
||||
graphics.imaging.src.transvolimg.bitmask=disabled
|
||||
graphics.imaging.src.transvolimg.translucent=disabled
|
||||
graphics.imaging.src.bufimg.IntXrgb.opaque=disabled
|
||||
graphics.imaging.src.bufimg.IntXrgb.bitmask=disabled
|
||||
graphics.imaging.src.bufimg.IntXrgb.translucent=disabled
|
||||
graphics.imaging.src.bufimg.IntArgb.opaque=disabled
|
||||
graphics.imaging.src.bufimg.IntArgb.bitmask=disabled
|
||||
graphics.imaging.src.bufimg.IntArgb.translucent=disabled
|
||||
graphics.imaging.src.bufimg.IntArgbPre.opaque=disabled
|
||||
graphics.imaging.src.bufimg.IntArgbPre.bitmask=disabled
|
||||
graphics.imaging.src.bufimg.IntArgbPre.translucent=disabled
|
||||
graphics.imaging.src.bufimg.ByteGray.opaque=disabled
|
||||
graphics.imaging.src.bufimg.ByteGray.bitmask=disabled
|
||||
graphics.imaging.src.bufimg.ByteGray.translucent=disabled
|
||||
graphics.imaging.src.bufimg.3ByteBgr.opaque=disabled
|
||||
graphics.imaging.src.bufimg.3ByteBgr.bitmask=disabled
|
||||
graphics.imaging.src.bufimg.3ByteBgr.translucent=disabled
|
||||
graphics.imaging.src.bufimg.4ByteAbgr.opaque=disabled
|
||||
graphics.imaging.src.bufimg.4ByteAbgr.bitmask=disabled
|
||||
graphics.imaging.src.bufimg.4ByteAbgr.translucent=disabled
|
||||
graphics.imaging.src.bufimg.4ByteAbgrPre.opaque=disabled
|
||||
graphics.imaging.src.bufimg.4ByteAbgrPre.bitmask=disabled
|
||||
graphics.imaging.src.bufimg.4ByteAbgrPre.translucent=disabled
|
||||
graphics.imaging.src.bufimg.ByteIndexedBm.opaque=disabled
|
||||
graphics.imaging.src.bufimg.ByteIndexedBm.bitmask=disabled
|
||||
graphics.imaging.src.bufimg.ByteIndexedBm.translucent=disabled
|
||||
graphics.imaging.src.bufimg.unmanagedIntXrgb.opaque=disabled
|
||||
graphics.imaging.src.bufimg.unmanagedIntXrgb.bitmask=disabled
|
||||
graphics.imaging.src.bufimg.unmanagedIntXrgb.translucent=disabled
|
||||
graphics.imaging.src.bufimg.unmanagedIntArgb.opaque=disabled
|
||||
graphics.imaging.src.bufimg.unmanagedIntArgb.bitmask=disabled
|
||||
graphics.imaging.src.bufimg.unmanagedIntArgb.translucent=disabled
|
||||
graphics.imaging.src.bufimg.unmanagedIntArgbPre.opaque=disabled
|
||||
graphics.imaging.src.bufimg.unmanagedIntArgbPre.bitmask=disabled
|
||||
graphics.imaging.src.bufimg.unmanagedIntArgbPre.translucent=disabled
|
||||
graphics.imaging.src.bufimg.unmanaged3ByteBgr.opaque=disabled
|
||||
graphics.imaging.src.bufimg.unmanaged3ByteBgr.bitmask=disabled
|
||||
graphics.imaging.src.bufimg.unmanaged3ByteBgr.translucent=disabled
|
||||
graphics.imaging.benchmarks.opts.interpolation=Nearest neighbor
|
||||
graphics.imaging.benchmarks.opts.touchsrc=Off
|
||||
graphics.imaging.benchmarks.tests.drawimage=disabled
|
||||
graphics.imaging.benchmarks.tests.drawimagebg=disabled
|
||||
graphics.imaging.benchmarks.tests.drawimagescaleup=disabled
|
||||
graphics.imaging.benchmarks.tests.drawimagescaledown=disabled
|
||||
graphics.imaging.benchmarks.tests.drawimagescalesplit=disabled
|
||||
graphics.imaging.benchmarks.tests.drawimagetxform=disabled
|
||||
graphics.imaging.imageops.opts.op=convolve3x3zero
|
||||
graphics.imaging.imageops.tests.graphics2d.drawimageop=disabled
|
||||
graphics.imaging.imageops.tests.bufimgop.filternull=disabled
|
||||
graphics.imaging.imageops.tests.bufimgop.filtercached=disabled
|
||||
graphics.imaging.imageops.tests.rasterop.filternull=disabled
|
||||
graphics.imaging.imageops.tests.rasterop.filtercached=disabled
|
||||
graphics.misc.copytests.copyAreaVert=disabled
|
||||
graphics.misc.copytests.copyAreaHoriz=disabled
|
||||
graphics.misc.copytests.copyAreaDiag=disabled
|
||||
pixel.opts.renderto=Off
|
||||
pixel.opts.renderfrom=Off
|
||||
pixel.src.1BitBinary=disabled
|
||||
pixel.src.2BitBinary=disabled
|
||||
pixel.src.4BitBinary=disabled
|
||||
pixel.src.ByteIndexed=disabled
|
||||
pixel.src.ByteGray=disabled
|
||||
pixel.src.Short555=disabled
|
||||
pixel.src.Short565=disabled
|
||||
pixel.src.ShortGray=disabled
|
||||
pixel.src.3ByteBgr=disabled
|
||||
pixel.src.4ByteAbgr=disabled
|
||||
pixel.src.IntXrgb=disabled
|
||||
pixel.src.IntXbgr=disabled
|
||||
pixel.src.IntArgb=disabled
|
||||
pixel.bimgtests.getrgb=disabled
|
||||
pixel.bimgtests.setrgb=disabled
|
||||
pixel.rastests.getdataelem=disabled
|
||||
pixel.rastests.setdataelem=disabled
|
||||
pixel.rastests.getpixel=disabled
|
||||
pixel.rastests.setpixel=disabled
|
||||
pixel.dbtests.getelem=disabled
|
||||
pixel.dbtests.setelem=disabled
|
||||
text.opts.data.tlength=16
|
||||
text.opts.data.tscript=english
|
||||
text.opts.font.fname=serif,physical
|
||||
text.opts.font.fstyle=0
|
||||
text.opts.font.fsize=13.0
|
||||
text.opts.font.ftx=Identity
|
||||
text.opts.graphics.textaa=Off
|
||||
text.opts.graphics.tfm=Off
|
||||
text.opts.graphics.gaa=Off
|
||||
text.opts.graphics.gtx=Identity
|
||||
text.opts.advopts.gvstyle=0
|
||||
text.opts.advopts.tlruns=1
|
||||
text.opts.advopts.maptype=FONT
|
||||
text.Rendering.tests.drawString=disabled
|
||||
text.Rendering.tests.drawChars=disabled
|
||||
text.Rendering.tests.drawBytes=disabled
|
||||
text.Rendering.tests.drawGlyphVectors=disabled
|
||||
text.Rendering.tests.drawTextLayout=disabled
|
||||
text.Measuring.tests.stringWidth=disabled
|
||||
text.Measuring.tests.stringBounds=disabled
|
||||
text.Measuring.tests.charsWidth=disabled
|
||||
text.Measuring.tests.charsBounds=disabled
|
||||
text.Measuring.tests.fontcandisplay=disabled
|
||||
text.Measuring.tests.gvWidth=disabled
|
||||
text.Measuring.tests.gvLogicalBounds=disabled
|
||||
text.Measuring.tests.gvVisualBounds=disabled
|
||||
text.Measuring.tests.gvPixelBounds=disabled
|
||||
text.Measuring.tests.gvOutline=disabled
|
||||
text.Measuring.tests.gvGlyphLogicalBounds=disabled
|
||||
text.Measuring.tests.gvGlyphVisualBounds=disabled
|
||||
text.Measuring.tests.gvGlyphPixelBounds=disabled
|
||||
text.Measuring.tests.gvGlyphOutline=disabled
|
||||
text.Measuring.tests.gvGlyphTransform=disabled
|
||||
text.Measuring.tests.gvGlyphMetrics=disabled
|
||||
text.Measuring.tests.tlAdvance=disabled
|
||||
text.Measuring.tests.tlAscent=disabled
|
||||
text.Measuring.tests.tlBounds=disabled
|
||||
text.Measuring.tests.tlGetCaretInfo=disabled
|
||||
text.Measuring.tests.tlGetNextHit=disabled
|
||||
text.Measuring.tests.tlGetCaretShape=disabled
|
||||
text.Measuring.tests.tlGetLogicalHighlightShape=disabled
|
||||
text.Measuring.tests.tlHitTest=disabled
|
||||
text.Measuring.tests.tlOutline=disabled
|
||||
text.construction.tests.gvfromfontstring=disabled
|
||||
text.construction.tests.gvfromfontchars=disabled
|
||||
text.construction.tests.gvfromfontci=disabled
|
||||
text.construction.tests.gvfromfontglyphs=disabled
|
||||
text.construction.tests.gvfromfontlayout=disabled
|
||||
text.construction.tests.tlfromfont=disabled
|
||||
text.construction.tests.tlfrommap=disabled
|
||||
imageio.opts.size=250
|
||||
imageio.opts.content=photo
|
||||
imageio.input.opts.general.source.file=disabled
|
||||
imageio.input.opts.general.source.url=disabled
|
||||
imageio.input.opts.general.source.byteArray=disabled
|
||||
imageio.input.opts.imageio.useCache=Off
|
||||
imageio.input.image.toolkit.opts.format=
|
||||
imageio.input.image.toolkit.tests.createImage=disabled
|
||||
imageio.input.image.imageio.opts.format=
|
||||
imageio.input.image.imageio.tests.imageioRead=disabled
|
||||
imageio.input.image.imageio.reader.opts.seekForwardOnly=On
|
||||
imageio.input.image.imageio.reader.opts.ignoreMetadata=On
|
||||
imageio.input.image.imageio.reader.opts.installListener=Off
|
||||
imageio.input.image.imageio.reader.tests.read=disabled
|
||||
imageio.input.image.imageio.reader.tests.getImageMetadata=disabled
|
||||
imageio.input.stream.tests.construct=disabled
|
||||
imageio.input.stream.tests.read=disabled
|
||||
imageio.input.stream.tests.readByteArray=disabled
|
||||
imageio.input.stream.tests.readFullyByteArray=disabled
|
||||
imageio.input.stream.tests.readBit=disabled
|
||||
imageio.input.stream.tests.readByte=disabled
|
||||
imageio.input.stream.tests.readUnsignedByte=disabled
|
||||
imageio.input.stream.tests.readShort=disabled
|
||||
imageio.input.stream.tests.readUnsignedShort=disabled
|
||||
imageio.input.stream.tests.readInt=disabled
|
||||
imageio.input.stream.tests.readUnsignedInt=disabled
|
||||
imageio.input.stream.tests.readFloat=disabled
|
||||
imageio.input.stream.tests.readLong=disabled
|
||||
imageio.input.stream.tests.readDouble=disabled
|
||||
imageio.input.stream.tests.skipBytes=disabled
|
||||
imageio.output.opts.general.dest.file=disabled
|
||||
imageio.output.opts.general.dest.byteArray=disabled
|
||||
imageio.output.opts.imageio.useCache=Off
|
||||
imageio.output.image.imageio.opts.format=
|
||||
imageio.output.image.imageio.tests.imageioWrite=disabled
|
||||
imageio.output.image.imageio.writer.opts.installListener=Off
|
||||
imageio.output.image.imageio.writer.tests.write=disabled
|
||||
imageio.output.stream.tests.construct=disabled
|
||||
imageio.output.stream.tests.write=disabled
|
||||
imageio.output.stream.tests.writeByteArray=disabled
|
||||
imageio.output.stream.tests.writeBit=disabled
|
||||
imageio.output.stream.tests.writeByte=disabled
|
||||
imageio.output.stream.tests.writeShort=disabled
|
||||
imageio.output.stream.tests.writeInt=disabled
|
||||
imageio.output.stream.tests.writeFloat=disabled
|
||||
imageio.output.stream.tests.writeLong=disabled
|
||||
imageio.output.stream.tests.writeDouble=disabled
|
||||
cmm.opts.profiles=1001
|
||||
cmm.colorconv.data.fromRGB=disabled
|
||||
cmm.colorconv.data.toRGB=disabled
|
||||
cmm.colorconv.data.fromCIEXYZ=disabled
|
||||
cmm.colorconv.data.toCIEXYZ=disabled
|
||||
cmm.colorconv.ccop.ccopOptions.size=250
|
||||
cmm.colorconv.ccop.ccopOptions.content=photo
|
||||
cmm.colorconv.ccop.ccopOptions.srcType=INT_RGB
|
||||
cmm.colorconv.ccop.ccopOptions.dstType=INT_RGB
|
||||
cmm.colorconv.ccop.op_img=disabled
|
||||
cmm.colorconv.ccop.op_rst=disabled
|
||||
cmm.colorconv.ccop.op_draw=disabled
|
||||
cmm.colorconv.embed.embedOptions.Images=512x512
|
||||
cmm.colorconv.embed.embd_img_read=disabled
|
||||
cmm.profiles.getHeader=disabled
|
||||
cmm.profiles.getNumComponents=disabled
|
||||
267
jb/project/tools/perf/j2dbopts_poly250.txt
Normal file
267
jb/project/tools/perf/j2dbopts_poly250.txt
Normal file
@@ -0,0 +1,267 @@
|
||||
prog.verbose=disabled
|
||||
prog.printresults=enabled
|
||||
global.env.outputwidth=640
|
||||
global.env.outputheight=480
|
||||
global.env.runcount=5
|
||||
global.env.repcount=0
|
||||
global.env.testtime=2500
|
||||
global.results.workunits=units
|
||||
global.results.timeunits=sec
|
||||
global.results.ratio=unitspersec
|
||||
global.dest.offscreen=disabled
|
||||
global.dest.frame.defaultframe=enabled
|
||||
global.dest.frame.transframe=disabled
|
||||
global.dest.frame.shapedframe=disabled
|
||||
global.dest.frame.shapedtransframe=disabled
|
||||
global.dest.compatimg.compatimg=disabled
|
||||
global.dest.compatimg.opqcompatimg=disabled
|
||||
global.dest.compatimg.bmcompatimg=disabled
|
||||
global.dest.compatimg.transcompatimg=disabled
|
||||
global.dest.volimg.volimg=disabled
|
||||
global.dest.volimg.opqvolimg=disabled
|
||||
global.dest.volimg.bmvolimg=disabled
|
||||
global.dest.volimg.transvolimg=disabled
|
||||
global.dest.bufimg.IntXrgb=disabled
|
||||
global.dest.bufimg.IntArgb=disabled
|
||||
global.dest.bufimg.IntArgbPre=disabled
|
||||
global.dest.bufimg.3ByteBgr=disabled
|
||||
global.dest.bufimg.ByteIndexed=disabled
|
||||
global.dest.bufimg.ByteGray=disabled
|
||||
global.dest.bufimg.4ByteAbgr=disabled
|
||||
global.dest.bufimg.4ByteAbgrPre=disabled
|
||||
global.dest.bufimg.custom=disabled
|
||||
graphics.opts.anim=2
|
||||
graphics.opts.sizes=250
|
||||
graphics.opts.alpharule=SrcOver
|
||||
graphics.opts.transform=ident
|
||||
graphics.opts.extraalpha=Off
|
||||
graphics.opts.xormode=Off
|
||||
graphics.opts.clip=Off
|
||||
graphics.opts.renderhint=Default
|
||||
graphics.render.opts.paint=single
|
||||
graphics.render.opts.alphacolor=Off
|
||||
graphics.render.opts.antialias=Off
|
||||
graphics.render.opts.stroke=width1
|
||||
graphics.render.tests.drawLine=disabled
|
||||
graphics.render.tests.drawLineHoriz=disabled
|
||||
graphics.render.tests.drawLineVert=disabled
|
||||
graphics.render.tests.fillRect=disabled
|
||||
graphics.render.tests.drawRect=disabled
|
||||
graphics.render.tests.fillOval=disabled
|
||||
graphics.render.tests.drawOval=disabled
|
||||
graphics.render.tests.fillPoly=disabled
|
||||
graphics.render.tests.drawPoly=enabled
|
||||
graphics.render.tests.shape.fillCubic=disabled
|
||||
graphics.render.tests.shape.drawCubic=disabled
|
||||
graphics.render.tests.shape.fillEllipse2D=disabled
|
||||
graphics.render.tests.shape.drawEllipse2D=disabled
|
||||
graphics.imaging.src.offscr.opaque=disabled
|
||||
graphics.imaging.src.offscr.bitmask=disabled
|
||||
graphics.imaging.src.offscr.translucent=disabled
|
||||
graphics.imaging.src.opqcompatimg.opaque=disabled
|
||||
graphics.imaging.src.opqcompatimg.bitmask=disabled
|
||||
graphics.imaging.src.opqcompatimg.translucent=disabled
|
||||
graphics.imaging.src.bmcompatimg.opaque=disabled
|
||||
graphics.imaging.src.bmcompatimg.bitmask=disabled
|
||||
graphics.imaging.src.bmcompatimg.translucent=disabled
|
||||
graphics.imaging.src.transcompatimg.opaque=disabled
|
||||
graphics.imaging.src.transcompatimg.bitmask=disabled
|
||||
graphics.imaging.src.transcompatimg.translucent=disabled
|
||||
graphics.imaging.src.opqvolimg.opaque=disabled
|
||||
graphics.imaging.src.opqvolimg.bitmask=disabled
|
||||
graphics.imaging.src.opqvolimg.translucent=disabled
|
||||
graphics.imaging.src.bmvolimg.opaque=disabled
|
||||
graphics.imaging.src.bmvolimg.bitmask=disabled
|
||||
graphics.imaging.src.bmvolimg.translucent=disabled
|
||||
graphics.imaging.src.transvolimg.opaque=disabled
|
||||
graphics.imaging.src.transvolimg.bitmask=disabled
|
||||
graphics.imaging.src.transvolimg.translucent=disabled
|
||||
graphics.imaging.src.bufimg.IntXrgb.opaque=disabled
|
||||
graphics.imaging.src.bufimg.IntXrgb.bitmask=disabled
|
||||
graphics.imaging.src.bufimg.IntXrgb.translucent=disabled
|
||||
graphics.imaging.src.bufimg.IntArgb.opaque=disabled
|
||||
graphics.imaging.src.bufimg.IntArgb.bitmask=disabled
|
||||
graphics.imaging.src.bufimg.IntArgb.translucent=disabled
|
||||
graphics.imaging.src.bufimg.IntArgbPre.opaque=disabled
|
||||
graphics.imaging.src.bufimg.IntArgbPre.bitmask=disabled
|
||||
graphics.imaging.src.bufimg.IntArgbPre.translucent=disabled
|
||||
graphics.imaging.src.bufimg.ByteGray.opaque=disabled
|
||||
graphics.imaging.src.bufimg.ByteGray.bitmask=disabled
|
||||
graphics.imaging.src.bufimg.ByteGray.translucent=disabled
|
||||
graphics.imaging.src.bufimg.3ByteBgr.opaque=disabled
|
||||
graphics.imaging.src.bufimg.3ByteBgr.bitmask=disabled
|
||||
graphics.imaging.src.bufimg.3ByteBgr.translucent=disabled
|
||||
graphics.imaging.src.bufimg.4ByteAbgr.opaque=disabled
|
||||
graphics.imaging.src.bufimg.4ByteAbgr.bitmask=disabled
|
||||
graphics.imaging.src.bufimg.4ByteAbgr.translucent=disabled
|
||||
graphics.imaging.src.bufimg.4ByteAbgrPre.opaque=disabled
|
||||
graphics.imaging.src.bufimg.4ByteAbgrPre.bitmask=disabled
|
||||
graphics.imaging.src.bufimg.4ByteAbgrPre.translucent=disabled
|
||||
graphics.imaging.src.bufimg.ByteIndexedBm.opaque=disabled
|
||||
graphics.imaging.src.bufimg.ByteIndexedBm.bitmask=disabled
|
||||
graphics.imaging.src.bufimg.ByteIndexedBm.translucent=disabled
|
||||
graphics.imaging.src.bufimg.unmanagedIntXrgb.opaque=disabled
|
||||
graphics.imaging.src.bufimg.unmanagedIntXrgb.bitmask=disabled
|
||||
graphics.imaging.src.bufimg.unmanagedIntXrgb.translucent=disabled
|
||||
graphics.imaging.src.bufimg.unmanagedIntArgb.opaque=disabled
|
||||
graphics.imaging.src.bufimg.unmanagedIntArgb.bitmask=disabled
|
||||
graphics.imaging.src.bufimg.unmanagedIntArgb.translucent=disabled
|
||||
graphics.imaging.src.bufimg.unmanagedIntArgbPre.opaque=disabled
|
||||
graphics.imaging.src.bufimg.unmanagedIntArgbPre.bitmask=disabled
|
||||
graphics.imaging.src.bufimg.unmanagedIntArgbPre.translucent=disabled
|
||||
graphics.imaging.src.bufimg.unmanaged3ByteBgr.opaque=disabled
|
||||
graphics.imaging.src.bufimg.unmanaged3ByteBgr.bitmask=disabled
|
||||
graphics.imaging.src.bufimg.unmanaged3ByteBgr.translucent=disabled
|
||||
graphics.imaging.benchmarks.opts.interpolation=Nearest neighbor
|
||||
graphics.imaging.benchmarks.opts.touchsrc=Off
|
||||
graphics.imaging.benchmarks.tests.drawimage=disabled
|
||||
graphics.imaging.benchmarks.tests.drawimagebg=disabled
|
||||
graphics.imaging.benchmarks.tests.drawimagescaleup=disabled
|
||||
graphics.imaging.benchmarks.tests.drawimagescaledown=disabled
|
||||
graphics.imaging.benchmarks.tests.drawimagescalesplit=disabled
|
||||
graphics.imaging.benchmarks.tests.drawimagetxform=disabled
|
||||
graphics.imaging.imageops.opts.op=convolve3x3zero
|
||||
graphics.imaging.imageops.tests.graphics2d.drawimageop=disabled
|
||||
graphics.imaging.imageops.tests.bufimgop.filternull=disabled
|
||||
graphics.imaging.imageops.tests.bufimgop.filtercached=disabled
|
||||
graphics.imaging.imageops.tests.rasterop.filternull=disabled
|
||||
graphics.imaging.imageops.tests.rasterop.filtercached=disabled
|
||||
graphics.misc.copytests.copyAreaVert=disabled
|
||||
graphics.misc.copytests.copyAreaHoriz=disabled
|
||||
graphics.misc.copytests.copyAreaDiag=disabled
|
||||
pixel.opts.renderto=Off
|
||||
pixel.opts.renderfrom=Off
|
||||
pixel.src.1BitBinary=disabled
|
||||
pixel.src.2BitBinary=disabled
|
||||
pixel.src.4BitBinary=disabled
|
||||
pixel.src.ByteIndexed=disabled
|
||||
pixel.src.ByteGray=disabled
|
||||
pixel.src.Short555=disabled
|
||||
pixel.src.Short565=disabled
|
||||
pixel.src.ShortGray=disabled
|
||||
pixel.src.3ByteBgr=disabled
|
||||
pixel.src.4ByteAbgr=disabled
|
||||
pixel.src.IntXrgb=disabled
|
||||
pixel.src.IntXbgr=disabled
|
||||
pixel.src.IntArgb=disabled
|
||||
pixel.bimgtests.getrgb=disabled
|
||||
pixel.bimgtests.setrgb=disabled
|
||||
pixel.rastests.getdataelem=disabled
|
||||
pixel.rastests.setdataelem=disabled
|
||||
pixel.rastests.getpixel=disabled
|
||||
pixel.rastests.setpixel=disabled
|
||||
pixel.dbtests.getelem=disabled
|
||||
pixel.dbtests.setelem=disabled
|
||||
text.opts.data.tlength=16
|
||||
text.opts.data.tscript=english
|
||||
text.opts.font.fname=serif,physical
|
||||
text.opts.font.fstyle=0
|
||||
text.opts.font.fsize=13.0
|
||||
text.opts.font.ftx=Identity
|
||||
text.opts.graphics.textaa=Off
|
||||
text.opts.graphics.tfm=Off
|
||||
text.opts.graphics.gaa=Off
|
||||
text.opts.graphics.gtx=Identity
|
||||
text.opts.advopts.gvstyle=0
|
||||
text.opts.advopts.tlruns=1
|
||||
text.opts.advopts.maptype=FONT
|
||||
text.Rendering.tests.drawString=disabled
|
||||
text.Rendering.tests.drawChars=disabled
|
||||
text.Rendering.tests.drawBytes=disabled
|
||||
text.Rendering.tests.drawGlyphVectors=disabled
|
||||
text.Rendering.tests.drawTextLayout=disabled
|
||||
text.Measuring.tests.stringWidth=disabled
|
||||
text.Measuring.tests.stringBounds=disabled
|
||||
text.Measuring.tests.charsWidth=disabled
|
||||
text.Measuring.tests.charsBounds=disabled
|
||||
text.Measuring.tests.fontcandisplay=disabled
|
||||
text.Measuring.tests.gvWidth=disabled
|
||||
text.Measuring.tests.gvLogicalBounds=disabled
|
||||
text.Measuring.tests.gvVisualBounds=disabled
|
||||
text.Measuring.tests.gvPixelBounds=disabled
|
||||
text.Measuring.tests.gvOutline=disabled
|
||||
text.Measuring.tests.gvGlyphLogicalBounds=disabled
|
||||
text.Measuring.tests.gvGlyphVisualBounds=disabled
|
||||
text.Measuring.tests.gvGlyphPixelBounds=disabled
|
||||
text.Measuring.tests.gvGlyphOutline=disabled
|
||||
text.Measuring.tests.gvGlyphTransform=disabled
|
||||
text.Measuring.tests.gvGlyphMetrics=disabled
|
||||
text.Measuring.tests.tlAdvance=disabled
|
||||
text.Measuring.tests.tlAscent=disabled
|
||||
text.Measuring.tests.tlBounds=disabled
|
||||
text.Measuring.tests.tlGetCaretInfo=disabled
|
||||
text.Measuring.tests.tlGetNextHit=disabled
|
||||
text.Measuring.tests.tlGetCaretShape=disabled
|
||||
text.Measuring.tests.tlGetLogicalHighlightShape=disabled
|
||||
text.Measuring.tests.tlHitTest=disabled
|
||||
text.Measuring.tests.tlOutline=disabled
|
||||
text.construction.tests.gvfromfontstring=disabled
|
||||
text.construction.tests.gvfromfontchars=disabled
|
||||
text.construction.tests.gvfromfontci=disabled
|
||||
text.construction.tests.gvfromfontglyphs=disabled
|
||||
text.construction.tests.gvfromfontlayout=disabled
|
||||
text.construction.tests.tlfromfont=disabled
|
||||
text.construction.tests.tlfrommap=disabled
|
||||
imageio.opts.size=250
|
||||
imageio.opts.content=photo
|
||||
imageio.input.opts.general.source.file=disabled
|
||||
imageio.input.opts.general.source.url=disabled
|
||||
imageio.input.opts.general.source.byteArray=disabled
|
||||
imageio.input.opts.imageio.useCache=Off
|
||||
imageio.input.image.toolkit.opts.format=
|
||||
imageio.input.image.toolkit.tests.createImage=disabled
|
||||
imageio.input.image.imageio.opts.format=
|
||||
imageio.input.image.imageio.tests.imageioRead=disabled
|
||||
imageio.input.image.imageio.reader.opts.seekForwardOnly=On
|
||||
imageio.input.image.imageio.reader.opts.ignoreMetadata=On
|
||||
imageio.input.image.imageio.reader.opts.installListener=Off
|
||||
imageio.input.image.imageio.reader.tests.read=disabled
|
||||
imageio.input.image.imageio.reader.tests.getImageMetadata=disabled
|
||||
imageio.input.stream.tests.construct=disabled
|
||||
imageio.input.stream.tests.read=disabled
|
||||
imageio.input.stream.tests.readByteArray=disabled
|
||||
imageio.input.stream.tests.readFullyByteArray=disabled
|
||||
imageio.input.stream.tests.readBit=disabled
|
||||
imageio.input.stream.tests.readByte=disabled
|
||||
imageio.input.stream.tests.readUnsignedByte=disabled
|
||||
imageio.input.stream.tests.readShort=disabled
|
||||
imageio.input.stream.tests.readUnsignedShort=disabled
|
||||
imageio.input.stream.tests.readInt=disabled
|
||||
imageio.input.stream.tests.readUnsignedInt=disabled
|
||||
imageio.input.stream.tests.readFloat=disabled
|
||||
imageio.input.stream.tests.readLong=disabled
|
||||
imageio.input.stream.tests.readDouble=disabled
|
||||
imageio.input.stream.tests.skipBytes=disabled
|
||||
imageio.output.opts.general.dest.file=disabled
|
||||
imageio.output.opts.general.dest.byteArray=disabled
|
||||
imageio.output.opts.imageio.useCache=Off
|
||||
imageio.output.image.imageio.opts.format=
|
||||
imageio.output.image.imageio.tests.imageioWrite=disabled
|
||||
imageio.output.image.imageio.writer.opts.installListener=Off
|
||||
imageio.output.image.imageio.writer.tests.write=disabled
|
||||
imageio.output.stream.tests.construct=disabled
|
||||
imageio.output.stream.tests.write=disabled
|
||||
imageio.output.stream.tests.writeByteArray=disabled
|
||||
imageio.output.stream.tests.writeBit=disabled
|
||||
imageio.output.stream.tests.writeByte=disabled
|
||||
imageio.output.stream.tests.writeShort=disabled
|
||||
imageio.output.stream.tests.writeInt=disabled
|
||||
imageio.output.stream.tests.writeFloat=disabled
|
||||
imageio.output.stream.tests.writeLong=disabled
|
||||
imageio.output.stream.tests.writeDouble=disabled
|
||||
cmm.opts.profiles=1001
|
||||
cmm.colorconv.data.fromRGB=disabled
|
||||
cmm.colorconv.data.toRGB=disabled
|
||||
cmm.colorconv.data.fromCIEXYZ=disabled
|
||||
cmm.colorconv.data.toCIEXYZ=disabled
|
||||
cmm.colorconv.ccop.ccopOptions.size=250
|
||||
cmm.colorconv.ccop.ccopOptions.content=photo
|
||||
cmm.colorconv.ccop.ccopOptions.srcType=INT_RGB
|
||||
cmm.colorconv.ccop.ccopOptions.dstType=INT_RGB
|
||||
cmm.colorconv.ccop.op_img=disabled
|
||||
cmm.colorconv.ccop.op_rst=disabled
|
||||
cmm.colorconv.ccop.op_draw=disabled
|
||||
cmm.colorconv.embed.embedOptions.Images=512x512
|
||||
cmm.colorconv.embed.embd_img_read=disabled
|
||||
cmm.profiles.getHeader=disabled
|
||||
cmm.profiles.getNumComponents=disabled
|
||||
49
jb/project/tools/perf/run_dc.sh
Executable file
49
jb/project/tools/perf/run_dc.sh
Executable file
@@ -0,0 +1,49 @@
|
||||
#!/bin/bash
|
||||
|
||||
#set -euo pipefail
|
||||
set -x
|
||||
|
||||
BASE_DIR=$(dirname "$0")
|
||||
source $BASE_DIR/run_inc.sh
|
||||
|
||||
if [ -z "$DACAPOTEST_DIR" ]; then
|
||||
DACAPOTEST_DIR="./"
|
||||
fi
|
||||
|
||||
DACAPOTEST=${DACAPOTEST:='dacapo-9.12-bach.jar'}
|
||||
if [ -z "$DACAPOTEST" ]; then
|
||||
if [ ! -f "$DACAPOTEST_DIR/$DACAPOTEST" ]; then
|
||||
echo "ERR### cannot find $DACAPOTEST_DIR/$DACAPOTEST"
|
||||
exit 2
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
TRACE=false
|
||||
|
||||
if [[ ($# -eq 1 && "$1" == "-help") ]] ; then
|
||||
echo "Usage: run_dc.sh [rendering_options]"
|
||||
echo "$RENDER_OPS_DOC"
|
||||
exit 3
|
||||
fi
|
||||
|
||||
OPTS=""
|
||||
# use time + repeat
|
||||
OPTS="$OPTS -no-validation $1"
|
||||
|
||||
echo "OPTS: $OPTS"
|
||||
|
||||
echo "Unit: Milliseconds (not FPS), lower is better"
|
||||
|
||||
for i in `seq $N` ; do
|
||||
if [ $i -eq 1 ]; then
|
||||
echo x
|
||||
fi
|
||||
|
||||
$JAVA \
|
||||
-jar $DACAPOTEST $OPTS 2>&1 | tee dacapo_$1$MODE_$i.log | grep "PASSED" | awk '{print $7 }'
|
||||
|
||||
if [ $i -ne $N ]; then
|
||||
sleep $ST
|
||||
fi
|
||||
done | $DATAMASH_CMD | expand -t12 > dacapo_$1.log
|
||||
102
jb/project/tools/perf/run_inc.sh
Normal file
102
jb/project/tools/perf/run_inc.sh
Normal file
@@ -0,0 +1,102 @@
|
||||
ST=1 # sleep between iterations
|
||||
|
||||
# number of iterations (jvm spawned)
|
||||
N=5
|
||||
# number of repeats (within jvm)
|
||||
R=3
|
||||
|
||||
type datamash 2>&1 > /dev/null ; ec=$?
|
||||
if [ $ec -ne 0 ] ; then
|
||||
echo "Missing datamash utility"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
DATAMASH_CMD="datamash --format=%.2f -H count x min x q1 x median x q3 x max x mad x"
|
||||
|
||||
J2D_OPTS=""
|
||||
OS=""
|
||||
case "$OSTYPE" in
|
||||
linux*) echo "Linux"
|
||||
;;
|
||||
darwin*) echo "OSX"
|
||||
;;
|
||||
*) echo "unknown: $OSTYPE"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
read -r -d '' RENDER_OPS_DOC << EOM
|
||||
rendering_options:
|
||||
-opengl # OpenGL pipeline (windows, linux, macOS)
|
||||
-metal # Metal pipeline (macOS)
|
||||
-vulkan # Vulkan pipeline (WLToolkit)
|
||||
-tk tk_name # AWT toolkit (linux: WLToolkit|XToolkit)
|
||||
-scale # UI scale
|
||||
EOM
|
||||
|
||||
while [ $# -ge 1 ] ; do
|
||||
case "$1" in
|
||||
-opengl) J2D_OPTS=$J2D_OPTS" -Dsun.java2d.opengl=true"
|
||||
shift
|
||||
;;
|
||||
-metal) J2D_OPTS=$J2D_OPTS" -Dsun.java2d.metal=true"
|
||||
shift
|
||||
;;
|
||||
-vulkan) J2D_OPTS=$J2D_OPTS" -Dsun.java2d.vulkan=true"
|
||||
shift
|
||||
;;
|
||||
-tk) shift
|
||||
if [ $# -ge 1 ] ; then
|
||||
J2D_OPTS=$J2D_OPTS" -Dawt.toolkit.name="$1
|
||||
shift
|
||||
else
|
||||
echo "Invalid parameters for -tk option. Use: -tk tkname"
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
-scale) shift
|
||||
if [ $# -ge 1 ] ; then
|
||||
J2D_OPTS=$J2D_OPTS" -Dsun.java2d.uiScale="$1
|
||||
shift
|
||||
else
|
||||
echo "Invalid parameters for -scale option. Use: -scale scale"
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
-dSync) shift
|
||||
if [ $# -ge 1 ] ; then
|
||||
J2D_OPTS=$J2D_OPTS" -Dsun.java2d.metal.displaySync="$1
|
||||
shift
|
||||
else
|
||||
echo "Invalid parameters for -dSync option. Use: -dSync [true|false]"
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
-jdk) shift
|
||||
if [ $# -ge 1 ] ; then
|
||||
JAVA=$1/bin/java
|
||||
shift
|
||||
else
|
||||
echo "Invalid parameters for -jdk option"
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
*) break
|
||||
;;
|
||||
esac
|
||||
done
|
||||
if [ -z "$JAVA" ] ; then
|
||||
BUILD_DIR=`find $BASE_DIR/../../../../build -name '*-release' -type d | head -n 1`
|
||||
JAVA=`find $BUILD_DIR/images/jdk -name java -type f | head -n 1`
|
||||
fi
|
||||
|
||||
JAVA_HOME=`dirname $JAVA`/../
|
||||
"$JAVA" -version
|
||||
|
||||
LANG=C
|
||||
|
||||
WS_ROOT=$BASE_DIR/../../../..
|
||||
|
||||
echo "N: $N"
|
||||
echo "R: $R"
|
||||
echo "J2D_OPTS: $J2D_OPTS"
|
||||
53
jb/project/tools/perf/run_j2b.sh
Executable file
53
jb/project/tools/perf/run_j2b.sh
Executable file
@@ -0,0 +1,53 @@
|
||||
#!/bin/bash
|
||||
|
||||
BASE_DIR=$(dirname "$0")
|
||||
source $BASE_DIR/run_inc.sh
|
||||
|
||||
J2DBENCH_DIR=$WS_ROOT/src/demo/share/java2d/J2DBench
|
||||
|
||||
if [ -z "$J2DBENCH" ]; then
|
||||
if [ ! -f "$J2DBENCH_DIR/dist/J2DBench.jar" ]; then
|
||||
PATH=$JAVA_HOME/bin:$PATH make -C $J2DBENCH_DIR
|
||||
fi
|
||||
if [ ! -f "$J2DBENCH_DIR/dist/J2DBench.jar" ]; then
|
||||
echo "Cannot build J2DBench. You may use J2DBench env variable instead pointing to the J2DBench.jar."
|
||||
exit 1
|
||||
fi
|
||||
J2DBENCH=$J2DBENCH_DIR/dist/J2DBench.jar
|
||||
fi
|
||||
|
||||
if [ $# -ne 1 ] ; then
|
||||
echo "Usage: run_j2b.sh [rendering_options] bench_name"
|
||||
echo
|
||||
echo "bench_name: poly250 poly250-rand_col poly250-AA-rand_col"
|
||||
echo ""
|
||||
echo "$RENDER_OPS_DOC"
|
||||
exit 2
|
||||
fi
|
||||
|
||||
if [ ! -f "$BASE_DIR/j2dbopts_$1.txt" ]; then
|
||||
echo "Unknown test: $1"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
|
||||
OPTS="j2dbopts_$1.txt"
|
||||
#OPTS=j2dbopts_poly250.txt
|
||||
#OPTS=j2dbopts_poly250-rand_col.txt
|
||||
#OPTS=j2dbopts_poly250-AA-rand_col.txt
|
||||
|
||||
echo "OPTS: $OPTS"
|
||||
|
||||
for i in `seq $N`; do
|
||||
if [ $i -eq 1 ]; then
|
||||
echo x
|
||||
fi
|
||||
echo `$JAVA $J2D_OPTS -jar $J2DBENCH \
|
||||
-batch -loadopts $BASE_DIR/$OPTS -saveres pl.res \
|
||||
-title pl -desc pl | awk '/averaged/{print $3}' | head -n1`
|
||||
|
||||
if [ $i -ne $N ]; then
|
||||
sleep $ST
|
||||
fi
|
||||
done | $DATAMASH_CMD | expand -t12
|
||||
90
jb/project/tools/perf/run_rp.sh
Executable file
90
jb/project/tools/perf/run_rp.sh
Executable file
@@ -0,0 +1,90 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
set -x
|
||||
|
||||
BASE_DIR=$(dirname "$0")
|
||||
source $BASE_DIR/run_inc.sh
|
||||
|
||||
RENDERPERFTEST_DIR=$WS_ROOT/test/jdk/performance/client/RenderPerfTest
|
||||
RENDERPERFTEST=""
|
||||
if [ -z "$RENDERPERFTEST" ]; then
|
||||
if [ ! -f "$RENDERPERFTEST_DIR/dist/RenderPerfTest.jar" ]; then
|
||||
PATH=$JAVA_HOME/bin:$PATH make -C $RENDERPERFTEST_DIR
|
||||
fi
|
||||
if [ ! -f "$RENDERPERFTEST_DIR/dist/RenderPerfTest.jar" ]; then
|
||||
echo "Cannot build RenderPerfTest. You may use RENDERPERFTEST env variable instead pointing to the RenderPerfTest.jar."
|
||||
exit 1
|
||||
fi
|
||||
RENDERPERFTEST=$RENDERPERFTEST_DIR/dist/RenderPerfTest.jar
|
||||
fi
|
||||
|
||||
|
||||
TRACE=false
|
||||
|
||||
# removes leading hyphen
|
||||
mode_param="${1/-}"
|
||||
|
||||
while [ $# -ge 1 ] ; do
|
||||
case "$1" in
|
||||
-onscreen) MODE="Robot"
|
||||
shift
|
||||
;;
|
||||
-volatile) MODE="Volatile"
|
||||
shift
|
||||
;;
|
||||
-buffer) MODE="Buffer"
|
||||
shift
|
||||
;;
|
||||
*) break
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [[ ($# -eq 1 && "$1" == "-help") || ($# -eq 0) ]] ; then
|
||||
echo "Usage: run_rp.sh [rp_rendering_mode] [rendering_options] bench_name"
|
||||
echo
|
||||
echo "bench_name: ArgbSurfaceBlitImage ArgbSwBlitImage BgrSurfaceBlitImage BgrSwBlitImage"
|
||||
echo " Image ImageAA Image_XOR VolImage VolImageAA"
|
||||
echo " ClipFlatBox ClipFlatBoxAA ClipFlatOval ClipFlatOvalAA"
|
||||
echo " FlatBox FlatBoxAA FlatOval FlatOvalAA FlatOval_XOR FlatQuad FlatQuadAA"
|
||||
echo " RotatedBox RotatedBoxAA RotatedBox_XOR RotatedOval RotatedOvalAA"
|
||||
echo " WiredBox WiredBoxAA WiredBubbles WiredBubblesAA WiredQuad WiredQuadAA"
|
||||
echo " Lines LinesAA Lines_XOR"
|
||||
echo " TextGray TextLCD TextLCD_XOR TextNoAA TextNoAA_XOR"
|
||||
echo " LargeTextGray LargeTextLCD LargeTextNoAA WhiteTextGray WhiteTextLCD WhiteTextNoAA"
|
||||
echo " LinGrad3RotatedOval LinGrad3RotatedOvalAA LinGradRotatedOval LinGradRotatedOvalAA"
|
||||
echo " RadGrad3RotatedOval RadGrad3RotatedOvalAA"
|
||||
echo ""
|
||||
echo "rp_rendering_mode: "
|
||||
echo " -onscreen : rendering to the window and check it using Robot"
|
||||
echo " -volatile : rendering to volatile image (default)"
|
||||
echo " -buffer : rendering to buffered image"
|
||||
echo "$RENDER_OPS_DOC"
|
||||
exit 2
|
||||
fi
|
||||
|
||||
OPTS=""
|
||||
# use time + repeat
|
||||
OPTS="$OPTS -r=$R -t -e$MODE $1"
|
||||
|
||||
echo "OPTS: $OPTS"
|
||||
|
||||
echo "Unit: Milliseconds (not FPS), lower is better"
|
||||
|
||||
for i in `seq $N` ; do
|
||||
if [ $i -eq 1 ]; then
|
||||
echo x
|
||||
fi
|
||||
|
||||
# echo "[debug] " + "test run"
|
||||
# $JAVA $J2D_OPTS -DTRACE=$TRACE \
|
||||
# -jar $RENDERPERFTEST $OPTS 2>&1 | awk '/'$1'/{print $3 }' | tee test_run.log
|
||||
|
||||
$JAVA $J2D_OPTS -DTRACE=$TRACE \
|
||||
-jar $RENDERPERFTEST $OPTS -v 2>&1 | tee render_$1_${mode_param}_$i.log | grep -v "^#" | tail -n 2 | \
|
||||
awk '{print $3 }'
|
||||
if [ $i -ne $N ]; then
|
||||
sleep $ST
|
||||
fi
|
||||
done | $DATAMASH_CMD | expand -t12 > render_$1_${mode_param}.log
|
||||
39
jb/project/tools/perf/run_sm.sh
Executable file
39
jb/project/tools/perf/run_sm.sh
Executable file
@@ -0,0 +1,39 @@
|
||||
#!/bin/bash
|
||||
|
||||
BASE_DIR=$(dirname "$0")
|
||||
source $BASE_DIR/run_inc.sh
|
||||
|
||||
SWINGMARK_DIR=$WS_ROOT/test/jdk/performance/client/SwingMark
|
||||
|
||||
if [ -z "$SWINGMARK" ]; then
|
||||
if [ ! -f "$SWINGMARK_DIR/dist/SwingMark.jar" ]; then
|
||||
PATH=$JAVA_HOME/bin:$PATH make -C $SWINGMARK_DIR
|
||||
fi
|
||||
if [ ! -f "$SWINGMARK_DIR/dist/SwingMark.jar" ]; then
|
||||
echo "Cannot build SwingMark. You may use SWINGMARK env variable instead pointing to the SwingMark.jar."
|
||||
exit 1
|
||||
fi
|
||||
SWINGMARK=$SWINGMARK_DIR/dist/SwingMark.jar
|
||||
fi
|
||||
|
||||
if [ $# -eq 1 -a "$1" == "--help" ] ; then
|
||||
shift
|
||||
echo "Usage: run_sm [rendering_options]"
|
||||
echo ""
|
||||
echo "$RENDER_OPS_DOC"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
for i in `seq $N` ; do
|
||||
if [ $i -eq 1 ]; then
|
||||
echo x
|
||||
fi
|
||||
|
||||
# SwingMark gives 1 global 'Score: <value>'
|
||||
echo `$JAVA $J2D_OPTS -jar $BASE_DIR/../../../../test/jdk/performance/client/SwingMark/dist/SwingMark.jar \
|
||||
-r $R -q -lf javax.swing.plaf.metal.MetalLookAndFeel | awk '/Score/{print $2}'`
|
||||
|
||||
if [ $i -ne $N ]; then
|
||||
sleep $ST
|
||||
fi
|
||||
done | $DATAMASH_CMD | expand -t12
|
||||
162
jb/project/tools/test/check_jbr_size.sh
Normal file
162
jb/project/tools/test/check_jbr_size.sh
Normal file
@@ -0,0 +1,162 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
TC_PRINT=0
|
||||
# Always print TeamCity service messages if running under TeamCity
|
||||
[[ -n "${TEAMCITY_VERSION:-}" ]] && TC_PRINT=1
|
||||
|
||||
while getopts ":t" o; do
|
||||
case "${o}" in
|
||||
t) TC_PRINT=1 ;;
|
||||
*);;
|
||||
esac
|
||||
done
|
||||
shift $((OPTIND-1))
|
||||
|
||||
NEWFILEPATH="$1"
|
||||
CONFIGID="$2"
|
||||
BUILDID="$3"
|
||||
TOKEN="$4"
|
||||
|
||||
if [ ! -f "$NEWFILEPATH" ]; then
|
||||
echo "File not found: $NEWFILEPATH"
|
||||
exit 1
|
||||
fi
|
||||
#
|
||||
# Get the size of new artifact
|
||||
#
|
||||
|
||||
unameOut="$(uname -s)"
|
||||
case "${unameOut}" in
|
||||
Linux*)
|
||||
NEWFILESIZE=$(stat -c%s "$NEWFILEPATH")
|
||||
;;
|
||||
Darwin*)
|
||||
NEWFILESIZE=$(stat -f%z "$NEWFILEPATH")
|
||||
;;
|
||||
CYGWIN*)
|
||||
NEWFILESIZE=$(stat -c%s "$NEWFILEPATH")
|
||||
;;
|
||||
MINGW*)
|
||||
NEWFILESIZE=$(stat -c%s "$NEWFILEPATH")
|
||||
;;
|
||||
*)
|
||||
echo "Unknown machine: ${unameOut}"
|
||||
exit 1
|
||||
esac
|
||||
FILENAME=$(basename "${NEWFILEPATH}")
|
||||
|
||||
#
|
||||
# Get pattern of artifact name
|
||||
# Base filename pattern: <BUNDLE_TYPE>-<JDK_VERSION>-<OS>-<ARCH>-b<BUILD>.tar.gz: jbr_dcevm-17.0.2-osx-x64-b1234.tar.gz
|
||||
# BUNDLE_TYPE: jbr, jbrsdk, jbr_dcevm, jbrsdk_jcef etc.
|
||||
# OS_ARCH_PATTERN - <os_architecture>: osx-x64, linux-aarch64, linux-musl-x64, windows-x64 etc.
|
||||
|
||||
BUNDLE_TYPE=jbrsdk
|
||||
OS_ARCH_PATTERN=""
|
||||
FILE_EXTENSION=tar.gz
|
||||
|
||||
re='(jbr[a-z_]*).*-[0-9_\.]+-(.+)-b[0-9]+(.+)'
|
||||
if [[ $FILENAME =~ $re ]]; then
|
||||
BUNDLE_TYPE=${BASH_REMATCH[1]}
|
||||
OS_ARCH_PATTERN=${BASH_REMATCH[2]}
|
||||
FILE_EXTENSION=${BASH_REMATCH[3]}
|
||||
else
|
||||
echo "File name $FILENAME does not match regex $re"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
function test_started_msg() {
|
||||
if [ $TC_PRINT -eq 1 ]; then
|
||||
echo "##teamcity[testStarted name='$1']"
|
||||
fi
|
||||
}
|
||||
|
||||
function test_failed_msg() {
|
||||
if [ $TC_PRINT -eq 1 ]; then
|
||||
echo "##teamcity[testFailed name='$1' message='$2']"
|
||||
fi
|
||||
}
|
||||
|
||||
function test_finished_msg() {
|
||||
if [ $TC_PRINT -eq 1 ]; then
|
||||
echo "##teamcity[testFinished name='$1']"
|
||||
fi
|
||||
}
|
||||
|
||||
test_name="${BUNDLE_TYPE}_${OS_ARCH_PATTERN//\-/_}${FILE_EXTENSION//\./_}"
|
||||
test_started_msg "$test_name"
|
||||
|
||||
echo "BUNDLE_TYPE: $BUNDLE_TYPE"
|
||||
echo "OS_ARCH_PATTERN: $OS_ARCH_PATTERN"
|
||||
echo "FILE_EXTENSION: $FILE_EXTENSION"
|
||||
echo "Size of $FILENAME is $NEWFILESIZE bytes"
|
||||
|
||||
#
|
||||
# Get previous successful build ID
|
||||
# Example:
|
||||
# CONFIGID=IntellijCustomJdk_Jdk17_Master_LinuxX64jcef
|
||||
# BUILDID=12345678
|
||||
#
|
||||
# expected return value
|
||||
# id="123".number="567"
|
||||
#
|
||||
CURL_RESPONSE=$(curl -sSL --header "Authorization: Bearer $TOKEN" "https://buildserver.labs.intellij.net/app/rest/builds/?locator=buildType:(id:$CONFIGID),status:success,count:1,finishDate:(build:$BUILDID,condition:before)")
|
||||
re='id=\"([0-9]+)\".+number=\"([0-9\.]+)\"'
|
||||
|
||||
# ID: Previous successful build id
|
||||
ID=0
|
||||
if [[ $CURL_RESPONSE =~ $re ]]; then
|
||||
ID=${BASH_REMATCH[1]}
|
||||
echo "Previous build ID: $ID"
|
||||
echo "Previous build number: ${BASH_REMATCH[2]}"
|
||||
else
|
||||
msg="ERROR: cannot find previous build"
|
||||
echo "$msg"
|
||||
echo "$CURL_RESPONSE"
|
||||
test_failed_msg "$test_name" "$msg"
|
||||
test_finished_msg "$test_name"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
#
|
||||
# Get artifacts from previous successful build
|
||||
#
|
||||
# expected return value
|
||||
# name="jbrsdk_jcef*.tar.gz size="123'
|
||||
#
|
||||
CURL_RESPONSE=$(curl -sSL --header "Authorization: Bearer $TOKEN" "https://buildserver.labs.intellij.net/app/rest/builds/$ID?fields=id,number,artifacts(file(name,size))")
|
||||
echo "Artifacts of the previous build:"
|
||||
echo "$CURL_RESPONSE"
|
||||
|
||||
# Find binary size (in response) with reg exp
|
||||
re="name=\"(${BUNDLE_TYPE}[^\"]+${OS_ARCH_PATTERN}[^\"]+${FILE_EXTENSION})\" size=\"([0-9]+)\""
|
||||
|
||||
if [[ $CURL_RESPONSE =~ $re ]]; then
|
||||
prevFileName=${BASH_REMATCH[1]}
|
||||
echo "Previous artifact name: $prevFileName"
|
||||
prevFileSize=${BASH_REMATCH[2]}
|
||||
echo "Previous artifact size: $prevFileSize"
|
||||
|
||||
((allowedSize=prevFileSize+prevFileSize/20)) # use 5% threshold
|
||||
echo "Allowed size: $allowedSize"
|
||||
if [[ "$NEWFILESIZE" -gt "$allowedSize" ]]; then
|
||||
msg="ERROR: new size is significantly greater than previous size (need to investigate)"
|
||||
echo "$msg"
|
||||
test_failed_msg "$test_name" "$msg"
|
||||
test_finished_msg "$test_name"
|
||||
exit 1
|
||||
else
|
||||
echo "PASSED"
|
||||
test_finished_msg "$test_name"
|
||||
fi
|
||||
else
|
||||
msg="ERROR: cannot find string with size in xml response:"
|
||||
echo "Regex: $re"
|
||||
echo "$msg"
|
||||
echo "$CURL_RESPONSE"
|
||||
test_failed_msg "$test_name" "$msg"
|
||||
test_finished_msg "$test_name"
|
||||
exit 1
|
||||
fi
|
||||
93
jb/project/tools/test/perfcmp.sh
Executable file
93
jb/project/tools/test/perfcmp.sh
Executable file
@@ -0,0 +1,93 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
set -x
|
||||
|
||||
usage ()
|
||||
{
|
||||
echo "Usage: perfcmp.sh [options] <test_results_cur> <test_results_ref> <results> <test_prefix> <noHeaders>"
|
||||
echo "Options:"
|
||||
echo -e " -h, --help\tdisplay this help"
|
||||
echo -e " -tc\tprint teacmity statistic"
|
||||
echo -e "test_results_cur - the file with metrics values for the current measuring"
|
||||
echo -e "test_results_ref - the file with metrics values for the reference measuring"
|
||||
echo -e "results - results of comaprison"
|
||||
echo -e "test_prefix - specifys measuring type, makes sense for enabled -tc, by default no prefixes"
|
||||
echo -e "noHeaders - by default 1-st line contains headers"
|
||||
echo -e ""
|
||||
echo -e "test_results_* files content should be in csv format with header and tab separator:"
|
||||
echo -e "The 1-st column is the test name"
|
||||
echo -e "The 2-st column is the test value"
|
||||
echo -e ""
|
||||
echo -e "Example:"
|
||||
echo -e "Test Value"
|
||||
echo -e "Testname 51.54"
|
||||
}
|
||||
|
||||
while [ -n "$1" ]
|
||||
do
|
||||
case "$1" in
|
||||
-h | --help) usage
|
||||
exit 1 ;;
|
||||
-tc) tc=1
|
||||
shift
|
||||
break ;;
|
||||
*) break;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [[ "$#" < "3" ]]; then
|
||||
echo "Error: Invalid arguments"
|
||||
usage
|
||||
exit 1
|
||||
fi
|
||||
|
||||
curFile=$1
|
||||
refFile=$2
|
||||
resFile=$3
|
||||
testNamePrefix=$4
|
||||
noHeaders=$5
|
||||
echo $curFile
|
||||
echo $refFile
|
||||
echo $resFile
|
||||
|
||||
curValues=`cat "$curFile" | cut -f 2 | tr -d '\t'`
|
||||
if [ -z $noHeaders ]; then
|
||||
curValuesHeader=`echo "$curValues" | head -n +1`_cur
|
||||
header=`cat "$refFile" | head -n +1 | awk -F'\t' -v x=$curValuesHeader '{print " "$1"\t"$2"_ref\t"x"\tratio"}'`
|
||||
testContent=`paste -d '\t' $refFile <(echo "$curValues") | tail -n +2`
|
||||
else
|
||||
testContent=`paste -d '\t' $refFile <(echo "$curValues") | tail -n +1`
|
||||
fi
|
||||
|
||||
testContent=`echo "$testContent" | tr "," "." | awk -F'\t' '{
|
||||
if ($3>$2+$2*0.1) {
|
||||
print "* "$1"\t"$2"\t"$3"\t"(($2>0)?$3/$2:"-")
|
||||
} else {
|
||||
print " "$1"\t"$2"\t"$3"\t"(($2>0)?$3/$2:"-")
|
||||
}
|
||||
}'`
|
||||
if [ -z $noHeaders ]; then
|
||||
echo "$header" > $resFile
|
||||
fi
|
||||
echo "$testContent" >> $resFile
|
||||
cat "$resFile" | tr '\t' ';' | column -t -s ';' | tee $resFile
|
||||
|
||||
if [ -z $tc ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
failed=0
|
||||
echo "$testContent" 2>&1 | (
|
||||
while read -r s; do
|
||||
testname=`echo "$s" | cut -f 1 | tr -d "[:space:]" | tr -d "*"`
|
||||
duration=`echo "$s" | cut -f 3`
|
||||
echo "$s" | cut -c1 | grep -c "*" && failed=1
|
||||
echo \#\#teamcity[testStarted name=\'$testNamePrefix$testname\']
|
||||
echo "===>$s"
|
||||
echo \#\#teamcity[buildStatisticValue key=\'$testNamePrefix$testname\' value=\'$duration\']
|
||||
[ $failed -eq 1 ] && echo \#\#teamcity[testFailed name=\'$testNamePrefix$testname\' message=\'$s\']
|
||||
echo \#\#teamcity[testFinished name=\'$testNamePrefix$testname\' duration=\'$duration\']
|
||||
failed=0
|
||||
done
|
||||
)
|
||||
152
jb/project/tools/windows/scripts/mkimages_aarch64.sh
Normal file
152
jb/project/tools/windows/scripts/mkimages_aarch64.sh
Normal file
@@ -0,0 +1,152 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
set -x
|
||||
|
||||
# The following parameters must be specified:
|
||||
# build_number - specifies the number of JetBrainsRuntime build
|
||||
# bundle_type - specifies bundle to be built;possible values:
|
||||
# <empty> or nomod - the release bundles without any additional modules (jcef)
|
||||
# jcef - the release bundles with jcef
|
||||
# fd - the fastdebug bundles which also include the jcef module
|
||||
#
|
||||
# This script makes test-image along with JDK images when bundle_type is set to "jcef".
|
||||
# If the character 't' is added at the end of bundle_type then it also makes test-image along with JDK images.
|
||||
#
|
||||
# Environment variables:
|
||||
# JDK_BUILD_NUMBER - specifies update release of OpenJDK build or the value of --with-version-build argument
|
||||
# to configure
|
||||
# By default JDK_BUILD_NUMBER is set zero
|
||||
# JCEF_PATH - specifies the path to the directory with JCEF binaries.
|
||||
# By default JCEF binaries should be located in ./jcef_win_aarch64
|
||||
|
||||
if [ -z "$BUILD_JDK" ]; then
|
||||
echo "BUILD_JDK environment variable must be specified and point to a JDK built from the current sources" \
|
||||
" and is able to run on the build system. See OpenJDK documentation for --with-build-jdk for more info."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
source jb/project/tools/common/scripts/common.sh
|
||||
|
||||
WORK_DIR=$(pwd)
|
||||
JCEF_PATH=${JCEF_PATH:=$WORK_DIR/jcef_win_aarch64}
|
||||
NVDA_PATH=${NVDA_PATH:=$WORK_DIR/nvda_controllerClient}
|
||||
|
||||
function do_configure {
|
||||
sh ./configure \
|
||||
--enable-option-checking=fatal \
|
||||
--openjdk-target=aarch64-unknown-cygwin \
|
||||
$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-toolchain-version=$TOOLCHAIN_VERSION \
|
||||
--with-boot-jdk=$BOOT_JDK \
|
||||
--with-build-jdk=$BUILD_JDK \
|
||||
--disable-ccache \
|
||||
--enable-cds=yes \
|
||||
$DISABLE_WARNINGS_AS_ERRORS \
|
||||
$STATIC_CONF_ARGS \
|
||||
$REPRODUCIBLE_BUILD_OPTS \
|
||||
|| do_exit $?
|
||||
}
|
||||
|
||||
function create_image_bundle {
|
||||
__bundle_name=$1
|
||||
__arch_name=$2
|
||||
__modules_path=$3
|
||||
__modules=$4
|
||||
|
||||
fastdebug_infix=''
|
||||
|
||||
[ "$bundle_type" == "fd" ] && [ "$__arch_name" == "$JBRSDK_BUNDLE" ] && __bundle_name=$__arch_name && fastdebug_infix="fastdebug-"
|
||||
__root_dir=${__bundle_name}-${JBSDK_VERSION}-windows-aarch64-${fastdebug_infix}b${build_number}
|
||||
|
||||
echo Running jlink ...
|
||||
${BUILD_JDK}/bin/jlink \
|
||||
--module-path $__modules_path --no-man-pages --compress=2 \
|
||||
--add-modules $__modules --output $__root_dir || do_exit $?
|
||||
|
||||
grep -v "^JAVA_VERSION" "$JSDK"/release | grep -v "^MODULES" >> $__root_dir/release
|
||||
if [ "$__arch_name" == "$JBRSDK_BUNDLE" ]; then
|
||||
sed 's/JBR/JBRSDK/g' $__root_dir/release > release
|
||||
mv release $__root_dir/release
|
||||
cp $IMAGES_DIR/jdk/lib/src.zip $__root_dir/lib
|
||||
for dir in $(ls -d $IMAGES_DIR/jdk/*); do
|
||||
rsync -amv --include="*/" --include="*.pdb" --exclude="*" $dir $__root_dir
|
||||
done
|
||||
copy_jmods "$__modules" "$__modules_path" "$__root_dir"/jmods
|
||||
fi
|
||||
}
|
||||
|
||||
WITH_DEBUG_LEVEL="--with-debug-level=release"
|
||||
RELEASE_NAME=windows-aarch64-server-release
|
||||
|
||||
case "$bundle_type" in
|
||||
"jcef")
|
||||
do_reset_changes=0
|
||||
do_maketest=1
|
||||
;;
|
||||
"nomod" | "")
|
||||
bundle_type=""
|
||||
;;
|
||||
"fd")
|
||||
do_reset_changes=0
|
||||
WITH_DEBUG_LEVEL="--with-debug-level=fastdebug"
|
||||
RELEASE_NAME=windows-aarch64-server-fastdebug
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -z "${INC_BUILD:-}" ]; then
|
||||
do_configure || do_exit $?
|
||||
if [ $do_maketest -eq 1 ]; then
|
||||
make LOG=info CONF=$RELEASE_NAME clean images test-image JBR_API_JBR_VERSION=TEST || do_exit $?
|
||||
else
|
||||
make LOG=info CONF=$RELEASE_NAME clean images || do_exit $?
|
||||
fi
|
||||
else
|
||||
if [ $do_maketest -eq 1 ]; then
|
||||
make LOG=info CONF=$RELEASE_NAME images test-image JBR_API_JBR_VERSION=TEST || do_exit $?
|
||||
else
|
||||
make LOG=info CONF=$RELEASE_NAME images || do_exit $?
|
||||
fi
|
||||
fi
|
||||
|
||||
IMAGES_DIR=build/$RELEASE_NAME/images
|
||||
JSDK=$IMAGES_DIR/jdk
|
||||
JSDK_MODS_DIR=$IMAGES_DIR/jmods
|
||||
JBRSDK_BUNDLE=jbrsdk
|
||||
|
||||
where cygpath
|
||||
if [ $? -eq 0 ]; then
|
||||
JCEF_PATH="$(cygpath -w $JCEF_PATH | sed 's/\\/\//g')"
|
||||
fi
|
||||
|
||||
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "fd" ]; then
|
||||
if [ "$bundle_type" == "jcef" ]; then
|
||||
git apply -p0 < jb/project/tools/patches/add_jcef_module_aarch64.patch || do_exit $?
|
||||
update_jsdk_mods "$BUILD_JDK" "$JCEF_PATH"/jmods "$JSDK"/jmods "$JSDK_MODS_DIR" || do_exit $?
|
||||
cp $JCEF_PATH/jmods/* $JSDK_MODS_DIR # $JSDK/jmods is not unchanged
|
||||
cat $JCEF_PATH/jcef.version >> $JSDK/release
|
||||
fi
|
||||
jbr_name_postfix="_${bundle_type}"
|
||||
else
|
||||
jbr_name_postfix=""
|
||||
fi
|
||||
|
||||
# create runtime image bundle
|
||||
modules=$(xargs < jb/project/tools/common/modules.list | sed s/" "//g) || do_exit $?
|
||||
modules+=",jdk.crypto.mscapi"
|
||||
create_image_bundle "jbr${jbr_name_postfix}" "jbr" $JSDK_MODS_DIR "$modules" || do_exit $?
|
||||
|
||||
# create sdk image bundle
|
||||
modules=$(cat ${JSDK}/release | grep MODULES | sed s/MODULES=//g | sed s/' '/','/g | sed s/\"//g | sed s/\\r//g | sed s/\\n//g) || do_exit $?
|
||||
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "$JBRSDK_BUNDLE" ]; then
|
||||
modules=${modules},$(get_mods_list "$JCEF_PATH"/jmods)
|
||||
fi
|
||||
create_image_bundle "$JBRSDK_BUNDLE${jbr_name_postfix}" "$JBRSDK_BUNDLE" "$JSDK_MODS_DIR" "$modules" || do_exit $?
|
||||
|
||||
do_exit 0
|
||||
145
jb/project/tools/windows/scripts/mkimages_x64.sh
Executable file
145
jb/project/tools/windows/scripts/mkimages_x64.sh
Executable file
@@ -0,0 +1,145 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
set -x
|
||||
|
||||
# The following parameters must be specified:
|
||||
# build_number - specifies the number of JetBrainsRuntime build
|
||||
# bundle_type - specifies bundle to be built;possible values:
|
||||
# <empty> or nomod - the release bundles without any additional modules (jcef)
|
||||
# jcef - the release bundles with jcef
|
||||
# fd - the fastdebug bundles which also include the jcef module
|
||||
#
|
||||
# This script makes test-image along with JDK images when bundle_type is set to "jcef".
|
||||
# If the character 't' is added at the end of bundle_type then it also makes test-image along with JDK images.
|
||||
#
|
||||
# Environment variables:
|
||||
# JDK_BUILD_NUMBER - specifies update release of OpenJDK build or the value of --with-version-build argument
|
||||
# to configure
|
||||
# By default JDK_BUILD_NUMBER is set zero
|
||||
# JCEF_PATH - specifies the path to the directory with JCEF binaries.
|
||||
# By default JCEF binaries should be located in ./jcef_win_x64
|
||||
|
||||
source jb/project/tools/common/scripts/common.sh
|
||||
|
||||
WORK_DIR=$(pwd)
|
||||
JCEF_PATH=${JCEF_PATH:=$WORK_DIR/jcef_win_x64}
|
||||
NVDA_PATH=${NVDA_PATH:=$WORK_DIR/nvda_controllerClient}
|
||||
|
||||
function do_configure {
|
||||
sh ./configure \
|
||||
$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-toolchain-version=$TOOLCHAIN_VERSION \
|
||||
--with-boot-jdk=$BOOT_JDK \
|
||||
--disable-ccache \
|
||||
--enable-cds=yes \
|
||||
$DISABLE_WARNINGS_AS_ERRORS \
|
||||
$STATIC_CONF_ARGS \
|
||||
$REPRODUCIBLE_BUILD_OPTS \
|
||||
|| do_exit $?
|
||||
}
|
||||
|
||||
function create_image_bundle {
|
||||
__bundle_name=$1
|
||||
__arch_name=$2
|
||||
__modules_path=$3
|
||||
__modules=$4
|
||||
|
||||
fastdebug_infix=''
|
||||
__cds_opt=''
|
||||
__cds_opt="--generate-cds-archive"
|
||||
|
||||
[ "$bundle_type" == "fd" ] && [ "$__arch_name" == "$JBRSDK_BUNDLE" ] && __bundle_name=$__arch_name && fastdebug_infix="fastdebug-"
|
||||
__root_dir=${__bundle_name}-${JBSDK_VERSION}-windows-x64-${fastdebug_infix}b${build_number}
|
||||
|
||||
echo Running jlink ...
|
||||
${JSDK}/bin/jlink \
|
||||
--module-path $__modules_path --no-man-pages --compress=2 \
|
||||
$__cds_opt --add-modules $__modules --output $__root_dir || do_exit $?
|
||||
|
||||
grep -v "^JAVA_VERSION" "$JSDK"/release | grep -v "^MODULES" >> $__root_dir/release
|
||||
if [ "$__arch_name" == "$JBRSDK_BUNDLE" ]; then
|
||||
sed 's/JBR/JBRSDK/g' $__root_dir/release > release
|
||||
mv release $__root_dir/release
|
||||
cp $IMAGES_DIR/jdk/lib/src.zip $__root_dir/lib
|
||||
for dir in $(ls -d $IMAGES_DIR/jdk/*); do
|
||||
rsync -amv --include="*/" --include="*.pdb" --exclude="*" $dir $__root_dir
|
||||
done
|
||||
copy_jmods "$__modules" "$__modules_path" "$__root_dir"/jmods
|
||||
fi
|
||||
}
|
||||
|
||||
WITH_DEBUG_LEVEL="--with-debug-level=release"
|
||||
RELEASE_NAME=windows-x86_64-server-release
|
||||
|
||||
case "$bundle_type" in
|
||||
"jcef")
|
||||
do_reset_changes=0
|
||||
do_maketest=1
|
||||
;;
|
||||
"nomod" | "")
|
||||
bundle_type=""
|
||||
;;
|
||||
"fd")
|
||||
do_reset_changes=0
|
||||
WITH_DEBUG_LEVEL="--with-debug-level=fastdebug"
|
||||
RELEASE_NAME=windows-x86_64-server-fastdebug
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -z "${INC_BUILD:-}" ]; then
|
||||
do_configure || do_exit $?
|
||||
if [ $do_maketest -eq 1 ]; then
|
||||
make LOG=info CONF=$RELEASE_NAME clean images test-image JBR_API_JBR_VERSION=TEST || do_exit $?
|
||||
else
|
||||
make LOG=info CONF=$RELEASE_NAME clean images || do_exit $?
|
||||
fi
|
||||
else
|
||||
if [ $do_maketest -eq 1 ]; then
|
||||
make LOG=info CONF=$RELEASE_NAME images test-image JBR_API_JBR_VERSION=TEST || do_exit $?
|
||||
else
|
||||
make LOG=info CONF=$RELEASE_NAME images || do_exit $?
|
||||
fi
|
||||
fi
|
||||
|
||||
IMAGES_DIR=build/$RELEASE_NAME/images
|
||||
JSDK=$IMAGES_DIR/jdk
|
||||
JSDK_MODS_DIR=$IMAGES_DIR/jmods
|
||||
JBRSDK_BUNDLE=jbrsdk
|
||||
|
||||
where cygpath
|
||||
if [ $? -eq 0 ]; then
|
||||
JCEF_PATH="$(cygpath -w $JCEF_PATH | sed 's/\\/\//g')"
|
||||
fi
|
||||
|
||||
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "fd" ]; then
|
||||
if [ "$bundle_type" == "jcef" ]; then
|
||||
git apply -p0 < jb/project/tools/patches/add_jcef_module.patch || do_exit $?
|
||||
update_jsdk_mods "$JSDK" "$JCEF_PATH"/jmods "$JSDK"/jmods "$JSDK_MODS_DIR" || do_exit $?
|
||||
cp $JCEF_PATH/jmods/* ${JSDK_MODS_DIR} # $JSDK/jmods is not unchanged
|
||||
cat $JCEF_PATH/jcef.version >> $JSDK/release
|
||||
fi
|
||||
jbr_name_postfix="_${bundle_type}"
|
||||
else
|
||||
jbr_name_postfix=""
|
||||
fi
|
||||
|
||||
# create runtime image bundle
|
||||
modules=$(xargs < jb/project/tools/common/modules.list | sed s/" "//g) || do_exit $?
|
||||
modules+=",jdk.crypto.mscapi"
|
||||
create_image_bundle "jbr${jbr_name_postfix}" "jbr" $JSDK_MODS_DIR "$modules" || do_exit $?
|
||||
|
||||
# create sdk image bundle
|
||||
modules=$(cat ${JSDK}/release | grep MODULES | sed s/MODULES=//g | sed s/' '/','/g | sed s/\"//g | sed s/\\r//g | sed s/\\n//g)
|
||||
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "$JBRSDK_BUNDLE" ]; then
|
||||
modules=${modules},$(get_mods_list "$JCEF_PATH"/jmods)
|
||||
fi
|
||||
create_image_bundle "$JBRSDK_BUNDLE${jbr_name_postfix}" "$JBRSDK_BUNDLE" "$JSDK_MODS_DIR" "$modules" || do_exit $?
|
||||
|
||||
do_exit 0
|
||||
135
jb/project/tools/windows/scripts/mkimages_x86.sh
Executable file
135
jb/project/tools/windows/scripts/mkimages_x86.sh
Executable file
@@ -0,0 +1,135 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
set -x
|
||||
|
||||
# The following parameters must be specified:
|
||||
# build_number - specifies the number of JetBrainsRuntime build
|
||||
# bundle_type - specifies bundle to be built;possible values:
|
||||
# <empty> or nomod - the release bundles without any additional modules (jcef)
|
||||
# jcef - the release bundles with jcef
|
||||
# fd - the fastdebug bundles which also include the jcef module
|
||||
#
|
||||
# $ ./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)
|
||||
#
|
||||
|
||||
source jb/project/tools/common/scripts/common.sh
|
||||
|
||||
WORK_DIR=$(pwd)
|
||||
NVDA_PATH=${NVDA_PATH:=$WORK_DIR/nvda_controllerClient}
|
||||
|
||||
|
||||
function do_configure {
|
||||
sh ./configure \
|
||||
$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-toolchain-version=$TOOLCHAIN_VERSION \
|
||||
--with-boot-jdk=$BOOT_JDK \
|
||||
--disable-ccache \
|
||||
--enable-cds=yes \
|
||||
$DISABLE_WARNINGS_AS_ERRORS \
|
||||
$STATIC_CONF_ARGS \
|
||||
$REPRODUCIBLE_BUILD_OPTS \
|
||||
|| do_exit $?
|
||||
}
|
||||
|
||||
function create_image_bundle {
|
||||
__bundle_name=$1
|
||||
__arch_name=$2
|
||||
__modules_path=$3
|
||||
__modules=$4
|
||||
|
||||
fastdebug_infix=''
|
||||
__cds_opt=''
|
||||
__cds_opt="--generate-cds-archive"
|
||||
|
||||
[ "$bundle_type" == "fd" ] && [ "$__arch_name" == "$JBRSDK_BUNDLE" ] && __bundle_name=$__arch_name && fastdebug_infix="fastdebug-"
|
||||
__root_dir=${__bundle_name}-${JBSDK_VERSION}-windows-x86-${fastdebug_infix}b${build_number}
|
||||
|
||||
echo Running jlink ...
|
||||
${JSDK}/bin/jlink \
|
||||
--module-path $__modules_path --no-man-pages --compress=2 \
|
||||
$__cds_opt --add-modules $__modules --output $__root_dir || do_exit $?
|
||||
|
||||
grep -v "^JAVA_VERSION" "$JSDK"/release | grep -v "^MODULES" >> $__root_dir/release
|
||||
if [ "$__arch_name" == "$JBRSDK_BUNDLE" ]; then
|
||||
sed 's/JBR/JBRSDK/g' $__root_dir/release > release
|
||||
mv release $__root_dir/release
|
||||
cp $IMAGES_DIR/jdk/lib/src.zip $__root_dir/lib
|
||||
for dir in $(ls -d $IMAGES_DIR/jdk/*); do
|
||||
rsync -amv --include="*/" --include="*.pdb" --exclude="*" $dir $__root_dir
|
||||
done
|
||||
copy_jmods "$__modules" "$__modules_path" "$__root_dir"/jmods
|
||||
fi
|
||||
}
|
||||
|
||||
WITH_DEBUG_LEVEL="--with-debug-level=release"
|
||||
RELEASE_NAME=windows-x86_64-server-release
|
||||
|
||||
case "$bundle_type" in
|
||||
"jcef")
|
||||
echo "not implemented" && do_exit 1
|
||||
;;
|
||||
"nomod" | "")
|
||||
bundle_type=""
|
||||
;;
|
||||
"fd")
|
||||
do_reset_changes=0
|
||||
WITH_DEBUG_LEVEL="--with-debug-level=fastdebug"
|
||||
RELEASE_NAME=windows-x86_64-server-fastdebug
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -z "${INC_BUILD:-}" ]; then
|
||||
do_configure || do_exit $?
|
||||
if [ $do_maketest -eq 1 ]; then
|
||||
make LOG=info CONF=$RELEASE_NAME clean images test-image JBR_API_JBR_VERSION=TEST || do_exit $?
|
||||
else
|
||||
make LOG=info CONF=$RELEASE_NAME clean images || do_exit $?
|
||||
fi
|
||||
else
|
||||
if [ $do_maketest -eq 1 ]; then
|
||||
make LOG=info CONF=$RELEASE_NAME images test-image JBR_API_JBR_VERSION=TEST || do_exit $?
|
||||
else
|
||||
make LOG=info CONF=$RELEASE_NAME images || do_exit $?
|
||||
fi
|
||||
fi
|
||||
|
||||
IMAGES_DIR=build/$RELEASE_NAME/images
|
||||
JSDK=$IMAGES_DIR/jdk
|
||||
JSDK_MODS_DIR=$IMAGES_DIR/jmods
|
||||
JBRSDK_BUNDLE=jbrsdk
|
||||
|
||||
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "fd" ]; then
|
||||
if [ "$bundle_type" == "jcef" ]; then
|
||||
git apply -p0 < jb/project/tools/patches/add_jcef_module.patch || do_exit $?
|
||||
update_jsdk_mods "$JSDK" "$JCEF_PATH"/jmods "$JSDK"/jmods "$JSDK_MODS_DIR" || do_exit $?
|
||||
cp $JCEF_PATH/jmods/* ${JSDK_MODS_DIR} # $JSDK/jmods is not unchanged
|
||||
fi
|
||||
|
||||
jbr_name_postfix="_${bundle_type}"
|
||||
else
|
||||
jbr_name_postfix=""
|
||||
fi
|
||||
|
||||
# create runtime image bundle
|
||||
modules=$(grep -v "jdk.internal.vm" jb/project/tools/common/modules.list | xargs | sed s/" "//g) || do_exit $?
|
||||
modules+=",jdk.crypto.mscapi"
|
||||
create_image_bundle "jbr${jbr_name_postfix}" "jbr" $JSDK_MODS_DIR "$modules" || do_exit $?
|
||||
|
||||
# create sdk image bundle
|
||||
modules=$(cat ${JSDK}/release | grep MODULES | sed s/MODULES=//g | sed s/' '/','/g | sed s/\"//g | sed s/\\r//g | sed s/\\n//g)
|
||||
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "fd" ] || [ "$bundle_type" == "$JBRSDK_BUNDLE" ]; then
|
||||
modules=${modules},$(get_mods_list "$JCEF_PATH"/jmods)
|
||||
fi
|
||||
create_image_bundle "$JBRSDK_BUNDLE${jbr_name_postfix}" "$JBRSDK_BUNDLE" "$JSDK_MODS_DIR" "$modules" || do_exit $?
|
||||
|
||||
do_exit 0
|
||||
59
jb/project/tools/windows/scripts/pack_aarch64.sh
Normal file
59
jb/project/tools/windows/scripts/pack_aarch64.sh
Normal file
@@ -0,0 +1,59 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
set -x
|
||||
|
||||
# The following parameters must be specified:
|
||||
# build_number - specifies the number of JetBrainsRuntime build
|
||||
# bundle_type - specifies bundle to be built;possible values:
|
||||
# <empty> or nomod - the release bundles without any additional modules (jcef)
|
||||
# jcef - the release bundles with jcef
|
||||
# fd - the fastdebug bundles which also include the jcef module
|
||||
#
|
||||
# This script packs test-image along with JDK images when bundle_type is set to "jcef".
|
||||
# If the character 't' is added at the end of bundle_type then it also makes test-image along with JDK images.
|
||||
#
|
||||
|
||||
source jb/project/tools/common/scripts/common.sh
|
||||
|
||||
[ "$bundle_type" == "jcef" ] && do_maketest=1
|
||||
|
||||
function pack_jbr {
|
||||
__bundle_name=$1
|
||||
__arch_name=$2
|
||||
|
||||
fastdebug_infix=''
|
||||
|
||||
[ "$bundle_type" == "fd" ] && [ "$__arch_name" == "$JBRSDK_BUNDLE" ] && __bundle_name=$__arch_name && fastdebug_infix="fastdebug-"
|
||||
JBR=${__bundle_name}-${JBSDK_VERSION}-windows-aarch64-${fastdebug_infix}b${build_number}
|
||||
__root_dir=${__bundle_name}-${JBSDK_VERSION}-windows-aarch64-${fastdebug_infix}b${build_number}
|
||||
|
||||
echo Creating $JBR.tar.gz ...
|
||||
chmod -R ug+rwx,o+rx ${BASE_DIR}/$__root_dir
|
||||
/usr/bin/tar -czf $JBR.tar.gz -C $BASE_DIR $__root_dir || do_exit $?
|
||||
|
||||
echo Creating $JBR.zip ...
|
||||
/usr/bin/zip -r $JBR.zip $__root_dir || do_exit $?
|
||||
}
|
||||
|
||||
[ "$bundle_type" == "nomod" ] && bundle_type=""
|
||||
|
||||
JBRSDK_BUNDLE=jbrsdk
|
||||
RELEASE_NAME=windows-aarch64-server-release
|
||||
IMAGES_DIR=build/$RELEASE_NAME/images
|
||||
BASE_DIR=.
|
||||
|
||||
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "dcevm" ] || [ "$bundle_type" == "fd" ]; then
|
||||
jbr_name_postfix="_${bundle_type}"
|
||||
else
|
||||
jbr_name_postfix=""
|
||||
fi
|
||||
|
||||
pack_jbr jbr${jbr_name_postfix} jbr
|
||||
pack_jbr jbrsdk${jbr_name_postfix} jbrsdk
|
||||
|
||||
if [ $do_maketest -eq 1 ]; then
|
||||
JBRSDK_TEST=$JBRSDK_BUNDLE-$JBSDK_VERSION-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
|
||||
59
jb/project/tools/windows/scripts/pack_x64.sh
Executable file
59
jb/project/tools/windows/scripts/pack_x64.sh
Executable file
@@ -0,0 +1,59 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
set -x
|
||||
|
||||
# The following parameters must be specified:
|
||||
# build_number - specifies the number of JetBrainsRuntime build
|
||||
# bundle_type - specifies bundle to be built;possible values:
|
||||
# <empty> or nomod - the release bundles without any additional modules (jcef)
|
||||
# jcef - the release bundles with jcef
|
||||
# fd - the fastdebug bundles which also include the jcef module
|
||||
#
|
||||
# This script packs test-image along with JDK images when bundle_type is set to "jcef".
|
||||
# If the character 't' is added at the end of bundle_type then it also makes test-image along with JDK images.
|
||||
#
|
||||
|
||||
source jb/project/tools/common/scripts/common.sh
|
||||
|
||||
[ "$bundle_type" == "jcef" ] && do_maketest=1
|
||||
|
||||
function pack_jbr {
|
||||
__bundle_name=$1
|
||||
__arch_name=$2
|
||||
|
||||
fastdebug_infix=''
|
||||
|
||||
[ "$bundle_type" == "fd" ] && [ "$__arch_name" == "$JBRSDK_BUNDLE" ] && __bundle_name=$__arch_name && fastdebug_infix="fastdebug-"
|
||||
JBR=${__bundle_name}-${JBSDK_VERSION}-windows-x64-${fastdebug_infix}b${build_number}
|
||||
__root_dir=${__bundle_name}-${JBSDK_VERSION}-windows-x64-${fastdebug_infix}b${build_number}
|
||||
|
||||
echo Creating $JBR.tar.gz ...
|
||||
chmod -R ug+rwx,o+rx ${BASE_DIR}/$__root_dir
|
||||
/usr/bin/tar -czf $JBR.tar.gz -C $BASE_DIR $__root_dir || do_exit $?
|
||||
|
||||
echo Creating $JBR.zip ...
|
||||
/usr/bin/zip -r $JBR.zip $__root_dir || do_exit $?
|
||||
}
|
||||
|
||||
[ "$bundle_type" == "nomod" ] && bundle_type=""
|
||||
|
||||
JBRSDK_BUNDLE=jbrsdk
|
||||
RELEASE_NAME=windows-x86_64-server-release
|
||||
IMAGES_DIR=build/$RELEASE_NAME/images
|
||||
BASE_DIR=.
|
||||
|
||||
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "dcevm" ] || [ "$bundle_type" == "fd" ]; then
|
||||
jbr_name_postfix="_${bundle_type}"
|
||||
else
|
||||
jbr_name_postfix=""
|
||||
fi
|
||||
|
||||
pack_jbr jbr${jbr_name_postfix} jbr
|
||||
pack_jbr jbrsdk${jbr_name_postfix} jbrsdk
|
||||
|
||||
if [ $do_maketest -eq 1 ]; then
|
||||
JBRSDK_TEST=$JBRSDK_BUNDLE-$JBSDK_VERSION-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
|
||||
55
jb/project/tools/windows/scripts/pack_x86.sh
Executable file
55
jb/project/tools/windows/scripts/pack_x86.sh
Executable file
@@ -0,0 +1,55 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
set -x
|
||||
|
||||
# The following parameters must be specified:
|
||||
# build_number - specifies the number of JetBrainsRuntime build
|
||||
# bundle_type - specifies bundle to be built;possible values:
|
||||
# <empty> or nomod - the release bundles without any additional modules (jcef)
|
||||
# fd - the fastdebug bundles which also include the jcef module
|
||||
#
|
||||
|
||||
source jb/project/tools/common/scripts/common.sh
|
||||
|
||||
[ "$bundle_type" == "jcef" ] && echo "not implemented" && do_exit 1
|
||||
|
||||
function pack_jbr {
|
||||
__bundle_name=$1
|
||||
__arch_name=$2
|
||||
|
||||
fastdebug_infix=''
|
||||
|
||||
[ "$bundle_type" == "fd" ] && [ "$__arch_name" == "$JBRSDK_BUNDLE" ] && __bundle_name=$__arch_name && fastdebug_infix="fastdebug-"
|
||||
JBR=${__bundle_name}-${JBSDK_VERSION}-windows-x86-${fastdebug_infix}b${build_number}
|
||||
__root_dir=${__bundle_name}-${JBSDK_VERSION}-windows-x86-${fastdebug_infix}b${build_number}
|
||||
|
||||
echo Creating $JBR.tar.gz ...
|
||||
chmod -R ug+rwx,o+rx ${BASE_DIR}/$__root_dir
|
||||
/usr/bin/tar -czf $JBR.tar.gz -C $BASE_DIR $__root_dir || do_exit $?
|
||||
|
||||
echo Creating $JBR.zip ...
|
||||
/usr/bin/zip -r $JBR.zip $__root_dir || do_exit $?
|
||||
}
|
||||
|
||||
[ "$bundle_type" == "nomod" ] && bundle_type=""
|
||||
|
||||
JBRSDK_BUNDLE=jbrsdk
|
||||
RELEASE_NAME=windows-x86_64-server-release
|
||||
IMAGES_DIR=build/$RELEASE_NAME/images
|
||||
BASE_DIR=.
|
||||
|
||||
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "dcevm" ] || [ "$bundle_type" == "fd" ]; then
|
||||
jbr_name_postfix="_${bundle_type}"
|
||||
else
|
||||
jbr_name_postfix=""
|
||||
fi
|
||||
|
||||
pack_jbr jbr${jbr_name_postfix} jbr
|
||||
pack_jbr jbrsdk${jbr_name_postfix} jbrsdk
|
||||
|
||||
if [ $do_maketest -eq 1 ]; then
|
||||
JBRSDK_TEST=$JBRSDK_BUNDLE-$JBSDK_VERSION-windows-test-x86-b$build_number
|
||||
echo Creating $JBRSDK_TEST.tar.gz ...
|
||||
/usr/bin/tar -czf $JBRSDK_TEST.tar.gz -C $BASE_DIR --exclude='test/jdk/demos' test || do_exit $?
|
||||
fi
|
||||
@@ -57,6 +57,7 @@
|
||||
#include "services/threadService.hpp"
|
||||
#include "utilities/debug.hpp"
|
||||
#include "utilities/dtrace.hpp"
|
||||
#include "utilities/globalCounter.inline.hpp"
|
||||
#include "utilities/globalDefinitions.hpp"
|
||||
#include "utilities/macros.hpp"
|
||||
#include "utilities/preserveException.hpp"
|
||||
@@ -944,9 +945,9 @@ void ObjectMonitor::EnterI(JavaThread* current) {
|
||||
// Note that the counter is not protected by a lock or updated by atomics.
|
||||
// That is by design - we trade "lossy" counters which are exposed to
|
||||
// races during updates for a lower probe effect.
|
||||
// This PerfData object can be used in parallel with a safepoint.
|
||||
// See the work around in PerfDataManager::destroy().
|
||||
OM_PERFDATA_OP(FutileWakeups, inc());
|
||||
// We are in safepoint safe state, so shutdown can remove the counter
|
||||
// under our feet. Make sure we make this access safely.
|
||||
OM_PERFDATA_SAFE_OP(FutileWakeups, inc());
|
||||
|
||||
// Assuming this is not a spurious wakeup we'll normally find _succ == current.
|
||||
// We can defer clearing _succ until after the spin completes
|
||||
@@ -1073,8 +1074,6 @@ void ObjectMonitor::ReenterI(JavaThread* current, ObjectWaiter* currentNode) {
|
||||
// Note that the counter is not protected by a lock or updated by atomics.
|
||||
// That is by design - we trade "lossy" counters which are exposed to
|
||||
// races during updates for a lower probe effect.
|
||||
// This PerfData object can be used in parallel with a safepoint.
|
||||
// See the work around in PerfDataManager::destroy().
|
||||
OM_PERFDATA_OP(FutileWakeups, inc());
|
||||
}
|
||||
|
||||
|
||||
@@ -204,13 +204,31 @@ class ObjectMonitor : public CHeapObj<mtObjectMonitor> {
|
||||
|
||||
// Only perform a PerfData operation if the PerfData object has been
|
||||
// allocated and if the PerfDataManager has not freed the PerfData
|
||||
// objects which can happen at normal VM shutdown.
|
||||
//
|
||||
// objects which can happen at normal VM shutdown. This operation is
|
||||
// only safe when thread is not in safepoint-safe code, i.e. PerfDataManager
|
||||
// could not reach the safepoint and free the counter while we are using it.
|
||||
// If this is not guaranteed, use OM_PERFDATA_SAFE_OP instead.
|
||||
#define OM_PERFDATA_OP(f, op_str) \
|
||||
do { \
|
||||
if (ObjectMonitor::_sync_ ## f != nullptr && \
|
||||
PerfDataManager::has_PerfData()) { \
|
||||
ObjectMonitor::_sync_ ## f->op_str; \
|
||||
if (ObjectMonitor::_sync_ ## f != nullptr) { \
|
||||
if (PerfDataManager::has_PerfData()) { \
|
||||
ObjectMonitor::_sync_ ## f->op_str; \
|
||||
} \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
// Only perform a PerfData operation if the PerfData object has been
|
||||
// allocated and if the PerfDataManager has not freed the PerfData
|
||||
// objects which can happen at normal VM shutdown. Additionally, we
|
||||
// enter the critical section to resolve the race against PerfDataManager
|
||||
// entering the safepoint and deleting the counter during shutdown.
|
||||
#define OM_PERFDATA_SAFE_OP(f, op_str) \
|
||||
do { \
|
||||
if (ObjectMonitor::_sync_ ## f != nullptr) { \
|
||||
GlobalCounter::CriticalSection cs(Thread::current()); \
|
||||
if (PerfDataManager::has_PerfData()) { \
|
||||
ObjectMonitor::_sync_ ## f->op_str; \
|
||||
} \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
#include "runtime/os.hpp"
|
||||
#include "runtime/perfData.inline.hpp"
|
||||
#include "utilities/exceptions.hpp"
|
||||
#include "utilities/globalCounter.inline.hpp"
|
||||
#include "utilities/globalDefinitions.hpp"
|
||||
|
||||
PerfDataList* PerfDataManager::_all = nullptr;
|
||||
@@ -257,15 +258,13 @@ void PerfDataManager::destroy() {
|
||||
// destroy already called, or initialization never happened
|
||||
return;
|
||||
|
||||
// Clear the flag before we free the PerfData counters. Thus begins
|
||||
// the race between this thread and another thread that has just
|
||||
// queried PerfDataManager::has_PerfData() and gotten back 'true'.
|
||||
// The hope is that the other thread will finish its PerfData
|
||||
// manipulation before we free the memory. The two alternatives are
|
||||
// 1) leak the PerfData memory or 2) do some form of synchronized
|
||||
// access or check before every PerfData operation.
|
||||
_has_PerfData = false;
|
||||
os::naked_short_sleep(1); // 1ms sleep to let other thread(s) run
|
||||
// About to delete the counters than might still be accessed by other threads.
|
||||
// The shutdown is performed in two stages: a) clear the flag to notify future
|
||||
// counter users that we are at shutdown; b) sync up with current users, waiting
|
||||
// for them to finish with counters.
|
||||
//
|
||||
Atomic::store(&_has_PerfData, false);
|
||||
GlobalCounter::write_synchronize();
|
||||
|
||||
log_debug(perf, datacreation)("Total = %d, Sampled = %d, Constants = %d",
|
||||
_all->length(), _sampled == nullptr ? 0 : _sampled->length(),
|
||||
@@ -292,7 +291,7 @@ void PerfDataManager::add_item(PerfData* p, bool sampled) {
|
||||
// Default sizes determined using -Xlog:perf+datacreation=debug
|
||||
if (_all == nullptr) {
|
||||
_all = new PerfDataList(191);
|
||||
_has_PerfData = true;
|
||||
Atomic::release_store(&_has_PerfData, true);
|
||||
}
|
||||
|
||||
assert(!_all->contains(p->name()), "duplicate name added: %s", p->name());
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2001, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2001, 2025, 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
|
||||
@@ -26,6 +26,7 @@
|
||||
#define SHARE_RUNTIME_PERFDATA_HPP
|
||||
|
||||
#include "memory/allocation.hpp"
|
||||
#include "runtime/atomic.hpp"
|
||||
#include "runtime/perfDataTypes.hpp"
|
||||
#include "runtime/perfMemory.hpp"
|
||||
#include "runtime/timer.hpp"
|
||||
@@ -244,6 +245,18 @@ enum CounterNS {
|
||||
* UsePerfData, a product flag set to true by default. This flag may
|
||||
* be removed from the product in the future.
|
||||
*
|
||||
* There are possible shutdown races between counter uses and counter
|
||||
* destruction code. Normal shutdown happens with taking VM_Exit safepoint
|
||||
* operation, so in the vast majority of uses this is not an issue. On the
|
||||
* paths where a concurrent access can still happen when VM is at safepoint,
|
||||
* use the following pattern to coordinate with shutdown:
|
||||
*
|
||||
* {
|
||||
* GlobalCounter::CriticalSection cs(Thread::current());
|
||||
* if (PerfDataManager::has_PerfData()) {
|
||||
* <update-counter>
|
||||
* }
|
||||
* }
|
||||
*/
|
||||
class PerfData : public CHeapObj<mtInternal> {
|
||||
|
||||
@@ -788,7 +801,7 @@ class PerfDataManager : AllStatic {
|
||||
}
|
||||
|
||||
static void destroy();
|
||||
static bool has_PerfData() { return _has_PerfData; }
|
||||
static bool has_PerfData() { return Atomic::load_acquire(&_has_PerfData); }
|
||||
};
|
||||
|
||||
// Useful macros to create the performance counters
|
||||
|
||||
@@ -62,6 +62,7 @@
|
||||
#include "utilities/align.hpp"
|
||||
#include "utilities/dtrace.hpp"
|
||||
#include "utilities/events.hpp"
|
||||
#include "utilities/globalCounter.inline.hpp"
|
||||
#include "utilities/globalDefinitions.hpp"
|
||||
#include "utilities/linkedlist.hpp"
|
||||
#include "utilities/preserveException.hpp"
|
||||
|
||||
Reference in New Issue
Block a user