Merge
This commit is contained in:
commit
f0b476a981
@ -5,7 +5,7 @@
|
||||
<meta name="generator" content="pandoc" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
|
||||
<title>Testing the JDK</title>
|
||||
<style type="text/css">
|
||||
<style>
|
||||
code{white-space: pre-wrap;}
|
||||
span.smallcaps{font-variant: small-caps;}
|
||||
span.underline{text-decoration: underline;}
|
||||
@ -21,9 +21,9 @@
|
||||
<header id="title-block-header">
|
||||
<h1 class="title">Testing the JDK</h1>
|
||||
</header>
|
||||
<nav id="TOC">
|
||||
<nav id="TOC" role="doc-toc">
|
||||
<ul>
|
||||
<li><a href="#using-make-test-the-run-test-framework">Using "make test" (the run-test framework)</a><ul>
|
||||
<li><a href="#using-make-test-the-run-test-framework">Using "make test" (the run-test framework)</a><ul>
|
||||
<li><a href="#configuration">Configuration</a></li>
|
||||
</ul></li>
|
||||
<li><a href="#test-selection">Test selection</a><ul>
|
||||
@ -42,10 +42,11 @@
|
||||
<li><a href="#notes-for-specific-tests">Notes for Specific Tests</a><ul>
|
||||
<li><a href="#docker-tests">Docker Tests</a></li>
|
||||
<li><a href="#non-us-locale">Non-US locale</a></li>
|
||||
<li><a href="#pkcs11-tests">PKCS11 Tests</a></li>
|
||||
</ul></li>
|
||||
</ul>
|
||||
</nav>
|
||||
<h2 id="using-make-test-the-run-test-framework">Using "make test" (the run-test framework)</h2>
|
||||
<h2 id="using-make-test-the-run-test-framework">Using "make test" (the run-test framework)</h2>
|
||||
<p>This new way of running tests is developer-centric. It assumes that you have built a JDK locally and want to test it. Running common test targets is simple, and more complex ad-hoc combination of tests is possible. The user interface is forgiving, and clearly report errors it cannot resolve.</p>
|
||||
<p>The main target <code>test</code> uses the jdk-image as the tested product. There is also an alternate target <code>exploded-test</code> that uses the exploded image instead. Not all tests will run successfully on the exploded image, but using this target can greatly improve rebuild times for certain workflows.</p>
|
||||
<p>Previously, <code>make test</code> was used to invoke an old system for running tests, and <code>make run-test</code> was used for the new test framework. For backward compatibility with scripts and muscle memory, <code>run-test</code> (and variants like <code>exploded-run-test</code> or <code>run-test-tier1</code>) are kept as aliases.</p>
|
||||
@ -63,7 +64,7 @@ $ make exploded-test TEST=tier2</code></pre>
|
||||
<p>To be able to run microbenchmarks, <code>configure</code> needs to know where to find the JMH dependency. Use <code>--with-jmh=<path to JMH jars></code> to point to a directory containing the core JMH and transitive dependencies. The recommended dependencies can be retrieved by running <code>sh make/devkit/createJMHBundle.sh</code>, after which <code>--with-jmh=build/jmh/jars</code> should work.</p>
|
||||
<h2 id="test-selection">Test selection</h2>
|
||||
<p>All functionality is available using the <code>test</code> make target. In this use case, the test or tests to be executed is controlled using the <code>TEST</code> variable. To speed up subsequent test runs with no source code changes, <code>test-only</code> can be used instead, which do not depend on the source and test image build.</p>
|
||||
<p>For some common top-level tests, direct make targets have been generated. This includes all JTReg test groups, the hotspot gtest, and custom tests (if present). This means that <code>make test-tier1</code> is equivalent to <code>make test TEST="tier1"</code>, but the latter is more tab-completion friendly. For more complex test runs, the <code>test TEST="x"</code> solution needs to be used.</p>
|
||||
<p>For some common top-level tests, direct make targets have been generated. This includes all JTReg test groups, the hotspot gtest, and custom tests (if present). This means that <code>make test-tier1</code> is equivalent to <code>make test TEST="tier1"</code>, but the latter is more tab-completion friendly. For more complex test runs, the <code>test TEST="x"</code> solution needs to be used.</p>
|
||||
<p>The test specifications given in <code>TEST</code> is parsed into fully qualified test descriptors, which clearly and unambigously show which tests will be run. As an example, <code>:tier1</code> will expand to <code>jtreg:$(TOPDIR)/test/hotspot/jtreg:tier1 jtreg:$(TOPDIR)/test/jdk:tier1 jtreg:$(TOPDIR)/test/langtools:tier1 jtreg:$(TOPDIR)/test/nashorn:tier1 jtreg:$(TOPDIR)/test/jaxp:tier1</code>. You can always submit a list of fully qualified test descriptors in the <code>TEST</code> variable if you want to shortcut the parser.</p>
|
||||
<h3 id="jtreg">JTReg</h3>
|
||||
<p>JTReg tests can be selected either by picking a JTReg test group, or a selection of files or directories containing JTReg tests.</p>
|
||||
@ -103,8 +104,8 @@ TEST FAILURE</code></pre>
|
||||
<p>Additional work data is stored in <code>build/$BUILD/test-support/$TEST_ID</code>. For some frameworks, this directory might contain information that is useful in determining the cause of a failed test.</p>
|
||||
<h2 id="test-suite-control">Test suite control</h2>
|
||||
<p>It is possible to control various aspects of the test suites using make control variables.</p>
|
||||
<p>These variables use a keyword=value approach to allow multiple values to be set. So, for instance, <code>JTREG="JOBS=1;TIMEOUT_FACTOR=8"</code> will set the JTReg concurrency level to 1 and the timeout factor to 8. This is equivalent to setting <code>JTREG_JOBS=1 JTREG_TIMEOUT_FACTOR=8</code>, but using the keyword format means that the <code>JTREG</code> variable is parsed and verified for correctness, so <code>JTREG="TMIEOUT_FACTOR=8"</code> would give an error, while <code>JTREG_TMIEOUT_FACTOR=8</code> would just pass unnoticed.</p>
|
||||
<p>To separate multiple keyword=value pairs, use <code>;</code> (semicolon). Since the shell normally eats <code>;</code>, the recommended usage is to write the assignment inside qoutes, e.g. <code>JTREG="...;..."</code>. This will also make sure spaces are preserved, as in <code>JTREG="VM_OPTIONS=-XshowSettings -Xlog:gc+ref=debug"</code>.</p>
|
||||
<p>These variables use a keyword=value approach to allow multiple values to be set. So, for instance, <code>JTREG="JOBS=1;TIMEOUT_FACTOR=8"</code> will set the JTReg concurrency level to 1 and the timeout factor to 8. This is equivalent to setting <code>JTREG_JOBS=1 JTREG_TIMEOUT_FACTOR=8</code>, but using the keyword format means that the <code>JTREG</code> variable is parsed and verified for correctness, so <code>JTREG="TMIEOUT_FACTOR=8"</code> would give an error, while <code>JTREG_TMIEOUT_FACTOR=8</code> would just pass unnoticed.</p>
|
||||
<p>To separate multiple keyword=value pairs, use <code>;</code> (semicolon). Since the shell normally eats <code>;</code>, the recommended usage is to write the assignment inside qoutes, e.g. <code>JTREG="...;..."</code>. This will also make sure spaces are preserved, as in <code>JTREG="VM_OPTIONS=-XshowSettings -Xlog:gc+ref=debug"</code>.</p>
|
||||
<p>(Other ways are possible, e.g. using backslash: <code>JTREG=JOBS=1\;TIMEOUT_FACTOR=8</code>. Also, as a special technique, the string <code>%20</code> will be replaced with space for certain options, e.g. <code>JTREG=VM_OPTIONS=-XshowSettings%20-Xlog:gc+ref=debug</code>. This can be useful if you have layers of scripts and have trouble getting proper quoting of command line arguments through.)</p>
|
||||
<p>As far as possible, the names of the keywords have been standardized between test suites.</p>
|
||||
<h3 id="general-keywords-test_opts">General keywords (TEST_OPTS)</h3>
|
||||
@ -159,7 +160,7 @@ TEST FAILURE</code></pre>
|
||||
<p>Set to <code>true</code> or <code>false</code>. If <code>true</code>, JTReg will use <code>-match:</code> option, otherwise <code>-exclude:</code> will be used. Default is <code>false</code>.</p>
|
||||
<h4 id="options">OPTIONS</h4>
|
||||
<p>Additional options to the JTReg test framework.</p>
|
||||
<p>Use <code>JTREG="OPTIONS=--help all"</code> to see all available JTReg options.</p>
|
||||
<p>Use <code>JTREG="OPTIONS=--help all"</code> to see all available JTReg options.</p>
|
||||
<h4 id="java_options-1">JAVA_OPTIONS</h4>
|
||||
<p>Additional Java options to JTReg (<code>-javaoption</code>).</p>
|
||||
<h4 id="vm_options-1">VM_OPTIONS</h4>
|
||||
@ -172,7 +173,7 @@ TEST FAILURE</code></pre>
|
||||
<p>Default is 1. Set to -1 to repeat indefinitely. This can be especially useful combined with <code>OPTIONS=--gtest_break_on_failure</code> to reproduce an intermittent problem.</p>
|
||||
<h4 id="options-1">OPTIONS</h4>
|
||||
<p>Additional options to the Gtest test framework.</p>
|
||||
<p>Use <code>GTEST="OPTIONS=--help"</code> to see all available Gtest options.</p>
|
||||
<p>Use <code>GTEST="OPTIONS=--help"</code> to see all available Gtest options.</p>
|
||||
<h4 id="aot_modules-2">AOT_MODULES</h4>
|
||||
<p>Generate AOT modules before testing for the specified module, or set of modules. If multiple modules are specified, they should be separated by space (or, to help avoid quoting issues, the special value <code>%20</code>).</p>
|
||||
<h3 id="microbenchmark-keywords">Microbenchmark keywords</h3>
|
||||
@ -199,8 +200,12 @@ TEST FAILURE</code></pre>
|
||||
<p>To run these tests correctly, additional parameters for the correct docker image are required on Ubuntu 18.04 by using <code>JAVA_OPTIONS</code>.</p>
|
||||
<pre><code>$ make test TEST="jtreg:test/hotspot/jtreg/containers/docker" JTREG="JAVA_OPTIONS=-Djdk.test.docker.image.name=ubuntu -Djdk.test.docker.image.version=latest"</code></pre>
|
||||
<h3 id="non-us-locale">Non-US locale</h3>
|
||||
<p>If your locale is non-US, some tests are likely to fail. To work around this you can set the locale to US. On Unix platforms simply setting <code>LANG="en_US"</code> in the environment before running tests should work. On Windows, setting <code>JTREG="VM_OPTIONS=-Duser.language=en -Duser.country=US"</code> helps for most, but not all test cases. For example:</p>
|
||||
<p>If your locale is non-US, some tests are likely to fail. To work around this you can set the locale to US. On Unix platforms simply setting <code>LANG="en_US"</code> in the environment before running tests should work. On Windows, setting <code>JTREG="VM_OPTIONS=-Duser.language=en -Duser.country=US"</code> helps for most, but not all test cases. For example:</p>
|
||||
<pre><code>$ export LANG="en_US" && make test TEST=...
|
||||
$ make test JTREG="VM_OPTIONS=-Duser.language=en -Duser.country=US" TEST=...</code></pre>
|
||||
<h3 id="pkcs11-tests">PKCS11 Tests</h3>
|
||||
<p>It is highly recommended to use the latest NSS version when running PKCS11 tests. Improper NSS version may lead to unexpected failures which are hard to diagnose. For example, sun/security/pkcs11/Secmod/AddTrustedCert.java may fail on Ubuntu 18.04 with the default NSS version in the system. To run these tests correctly, the system property <code>test.nss.lib.paths</code> is required on Ubuntu 18.04 to specify the alternative NSS lib directories. For example:</p>
|
||||
<pre><code>$ make test TEST="jtreg:sun/security/pkcs11/Secmod/AddTrustedCert.java" JTREG="JAVA_OPTIONS=-Dtest.nss.lib.paths=/path/to/your/latest/NSS-libs"</code></pre>
|
||||
<p>For more notes about the PKCS11 tests, please refer to test/jdk/sun/security/pkcs11/README.</p>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -407,6 +407,20 @@ For example:
|
||||
$ export LANG="en_US" && make test TEST=...
|
||||
$ make test JTREG="VM_OPTIONS=-Duser.language=en -Duser.country=US" TEST=...
|
||||
|
||||
### PKCS11 Tests
|
||||
|
||||
It is highly recommended to use the latest NSS version when running PKCS11 tests.
|
||||
Improper NSS version may lead to unexpected failures which are hard to diagnose.
|
||||
For example, sun/security/pkcs11/Secmod/AddTrustedCert.java may fail on Ubuntu
|
||||
18.04 with the default NSS version in the system.
|
||||
To run these tests correctly, the system property `test.nss.lib.paths` is required
|
||||
on Ubuntu 18.04 to specify the alternative NSS lib directories.
|
||||
For example:
|
||||
|
||||
$ make test TEST="jtreg:sun/security/pkcs11/Secmod/AddTrustedCert.java" JTREG="JAVA_OPTIONS=-Dtest.nss.lib.paths=/path/to/your/latest/NSS-libs"
|
||||
|
||||
For more notes about the PKCS11 tests, please refer to test/jdk/sun/security/pkcs11/README.
|
||||
|
||||
---
|
||||
# Override some definitions in the global css file that are not optimal for
|
||||
# this document.
|
||||
|
@ -707,6 +707,8 @@ else
|
||||
$(foreach m, $(JAVA_MODULES), \
|
||||
$(eval $m-java: $(addsuffix -java, $(filter $(JAVA_MODULES), \
|
||||
$(call FindDepsForModule,$m)))))
|
||||
# Declare dependencies between the module meta targets
|
||||
$(foreach m, $(ALL_MODULES), $(eval $m: $(call FindDepsForModule,$m)))
|
||||
|
||||
# Declare dependencies between <module>-rmic to <module>-java
|
||||
$(foreach m, $(RMIC_MODULES), $(eval $m-rmic: $m-java))
|
||||
|
@ -205,6 +205,32 @@ AC_DEFUN([BASIC_PREPEND_TO_PATH],
|
||||
fi
|
||||
])
|
||||
|
||||
################################################################################
|
||||
# This will make a path absolute. Assumes it's already a unix path. Also
|
||||
# resolves ~ to homedir.
|
||||
AC_DEFUN([BASIC_ABSOLUTE_PATH],
|
||||
[
|
||||
if test "x[$]$1" != x; then
|
||||
new_path="[$]$1"
|
||||
|
||||
if [ [[ "$new_path" = ~* ]] ]; then
|
||||
# Use eval to expand a potential ~
|
||||
eval new_path="$new_path"
|
||||
if test ! -f "$new_path" && test ! -d "$new_path"; then
|
||||
AC_MSG_ERROR([The new_path of $1, which resolves as "$new_path", is not found.])
|
||||
fi
|
||||
fi
|
||||
|
||||
if test -d "$new_path"; then
|
||||
$1="`cd "$new_path"; $THEPWDCMD -L`"
|
||||
else
|
||||
dir="`$DIRNAME "$new_path"`"
|
||||
base="`$BASENAME "$new_path"`"
|
||||
$1="`cd "$dir"; $THEPWDCMD -L`/$base"
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# This will make sure the given variable points to a full and proper
|
||||
# path. This means:
|
||||
@ -217,7 +243,6 @@ AC_DEFUN([BASIC_PREPEND_TO_PATH],
|
||||
AC_DEFUN([BASIC_FIXUP_PATH],
|
||||
[
|
||||
# Only process if variable expands to non-empty
|
||||
|
||||
if test "x[$]$1" != x; then
|
||||
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
|
||||
BASIC_FIXUP_PATH_CYGWIN($1)
|
||||
@ -234,19 +259,8 @@ AC_DEFUN([BASIC_FIXUP_PATH],
|
||||
AC_MSG_ERROR([Spaces are not allowed in this path.])
|
||||
fi
|
||||
|
||||
# Use eval to expand a potential ~
|
||||
eval path="$path"
|
||||
if test ! -f "$path" && test ! -d "$path"; then
|
||||
AC_MSG_ERROR([The path of $1, which resolves as "$path", is not found.])
|
||||
fi
|
||||
|
||||
if test -d "$path"; then
|
||||
$1="`cd "$path"; $THEPWDCMD -L`"
|
||||
else
|
||||
dir="`$DIRNAME "$path"`"
|
||||
base="`$BASENAME "$path"`"
|
||||
$1="`cd "$dir"; $THEPWDCMD -L`/$base"
|
||||
fi
|
||||
BASIC_ABSOLUTE_PATH(path)
|
||||
$1="$path"
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
@ -148,6 +148,8 @@ AC_DEFUN([BASIC_FIXUP_PATH_CYGWIN],
|
||||
path="[$]$1"
|
||||
new_path=`$CYGPATH -u "$path"`
|
||||
|
||||
BASIC_ABSOLUTE_PATH(new_path)
|
||||
|
||||
# Cygwin tries to hide some aspects of the Windows file system, such that binaries are
|
||||
# named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
|
||||
# the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
|
||||
@ -181,6 +183,8 @@ AC_DEFUN([BASIC_FIXUP_PATH_MSYS],
|
||||
new_path=`cmd //c echo $path`
|
||||
fi
|
||||
|
||||
BASIC_ABSOLUTE_PATH(new_path)
|
||||
|
||||
BASIC_MAKE_WINDOWS_SPACE_SAFE_MSYS([$new_path])
|
||||
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(new_path)
|
||||
if test "x$path" != "x$new_path"; then
|
||||
@ -199,6 +203,8 @@ AC_DEFUN([BASIC_FIXUP_PATH_WSL],
|
||||
new_path="[$]$1"
|
||||
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH([new_path])
|
||||
|
||||
BASIC_ABSOLUTE_PATH(new_path)
|
||||
|
||||
# Call helper function which possibly converts this using DOS-style short mode.
|
||||
# If so, the updated path is stored in $new_path.
|
||||
BASIC_MAKE_WINDOWS_SPACE_SAFE_WSL([$new_path])
|
||||
|
@ -62,7 +62,7 @@ define SetupTestFilesCompilationBody
|
||||
$1_OUTPUT_SUBDIR := lib
|
||||
$1_BASE_CFLAGS := $(CFLAGS_JDKLIB)
|
||||
$1_BASE_CXXFLAGS := $(CXXFLAGS_JDKLIB)
|
||||
$1_LDFLAGS := $(LDFLAGS_JDKLIB) $(call SET_SHARED_LIBRARY_ORIGIN)
|
||||
$1_LDFLAGS := $(LDFLAGS_JDKLIB) $$(call SET_SHARED_LIBRARY_ORIGIN)
|
||||
$1_COMPILATION_TYPE := LIBRARY
|
||||
else ifeq ($$($1_TYPE), PROGRAM)
|
||||
$1_PREFIX = exe
|
||||
|
@ -21,4 +21,4 @@
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
tzdata2019b
|
||||
tzdata2019c
|
||||
|
@ -31,7 +31,7 @@
|
||||
# tz@iana.org for general use in the future). For more, please see
|
||||
# the file CONTRIBUTING in the tz distribution.
|
||||
|
||||
# From Paul Eggert (2018-06-19):
|
||||
# From Paul Eggert (2019-07-11):
|
||||
#
|
||||
# Unless otherwise specified, the source for data through 1990 is:
|
||||
# Thomas G. Shanks and Rique Pottenger, The International Atlas (6th edition),
|
||||
@ -70,13 +70,13 @@
|
||||
# 7:00 WIB west Indonesia (Waktu Indonesia Barat)
|
||||
# 8:00 WITA central Indonesia (Waktu Indonesia Tengah)
|
||||
# 8:00 CST China
|
||||
# 8:00 PST PDT* Philippine Standard Time
|
||||
# 8:00 HKT HKST Hong Kong (HKWT* for Winter Time in late 1941)
|
||||
# 8:00 PST PDT* Philippines
|
||||
# 8:30 KST KDT Korea when at +0830
|
||||
# 9:00 WIT east Indonesia (Waktu Indonesia Timur)
|
||||
# 9:00 JST JDT Japan
|
||||
# 9:00 KST KDT Korea when at +09
|
||||
# 9:30 ACST Australian Central Standard Time
|
||||
# *I invented the abbreviation PDT; see "Philippines" below.
|
||||
# *I invented the abbreviations HKWT and PDT; see below.
|
||||
# Otherwise, these tables typically use numeric abbreviations like +03
|
||||
# and +0330 for integer hour and minute UT offsets. Although earlier
|
||||
# editions invented alphabetic time zone abbreviations for every
|
||||
@ -676,6 +676,15 @@ Zone Asia/Urumqi 5:50:20 - LMT 1928
|
||||
# * 1941-09-30, Hong Kong Daily Press, Winter Time Warning.
|
||||
# https://i.imgur.com/dge4kFJ.png
|
||||
|
||||
# From Paul Eggert (2019-07-11):
|
||||
# "Hong Kong winter time" is considered to be daylight saving.
|
||||
# "Hong Kong had adopted daylight saving on June 15 as a wartime measure,
|
||||
# clocks moving forward one hour until October 1, when they would be put back
|
||||
# by just half an hour for 'Hong Kong Winter time', so that daylight saving
|
||||
# operated year round." -- Low Z. The longest day: when wartime Hong Kong
|
||||
# introduced daylight saving. South China Morning Post. 2019-06-28.
|
||||
# https://www.scmp.com/magazines/post-magazine/short-reads/article/3016281/longest-day-when-wartime-hong-kong-introduced
|
||||
|
||||
# From P Chan (2018-12-31):
|
||||
# * According to the Hong Kong Daylight-Saving Regulations, 1941, the
|
||||
# 1941 spring-forward transition was at 03:00.
|
||||
@ -777,7 +786,7 @@ Rule HK 1979 only - Oct 21 3:30 0 -
|
||||
Zone Asia/Hong_Kong 7:36:42 - LMT 1904 Oct 30 0:36:42
|
||||
8:00 - HKT 1941 Jun 15 3:00
|
||||
8:00 1:00 HKST 1941 Oct 1 4:00
|
||||
8:30 - HKT 1941 Dec 25
|
||||
8:00 0:30 HKWT 1941 Dec 25
|
||||
9:00 - JST 1945 Nov 18 2:00
|
||||
8:00 HK HK%sT
|
||||
|
||||
@ -2442,7 +2451,7 @@ Rule ROK 1987 1988 - Oct Sun>=8 3:00 0 S
|
||||
Zone Asia/Seoul 8:27:52 - LMT 1908 Apr 1
|
||||
8:30 - KST 1912 Jan 1
|
||||
9:00 - JST 1945 Sep 8
|
||||
9:00 - KST 1954 Mar 21
|
||||
9:00 ROK K%sT 1954 Mar 21
|
||||
8:30 ROK K%sT 1961 Aug 10
|
||||
9:00 ROK K%sT
|
||||
Zone Asia/Pyongyang 8:23:00 - LMT 1908 Apr 1
|
||||
@ -3627,7 +3636,7 @@ Zone Asia/Tashkent 4:37:11 - LMT 1924 May 2
|
||||
# and in South Vietnam in particular (after 1954):
|
||||
# To 07:00 on 1911-05-01.
|
||||
# To 08:00 on 1942-12-31 at 23:00.
|
||||
# To 09:00 in 1945-03-14 at 23:00.
|
||||
# To 09:00 on 1945-03-14 at 23:00.
|
||||
# To 07:00 on 1945-09-02 in Vietnam.
|
||||
# To 08:00 on 1947-04-01 in French-controlled Indochina.
|
||||
# To 07:00 on 1955-07-01 in South Vietnam.
|
||||
|
@ -390,13 +390,18 @@ Zone Indian/Cocos 6:27:40 - LMT 1900
|
||||
# From Raymond Kumar (2018-07-13):
|
||||
# http://www.fijitimes.com/government-approves-2018-daylight-saving/
|
||||
# ... The daylight saving period will end at 3am on Sunday January 13, 2019.
|
||||
#
|
||||
# From Paul Eggert (2018-07-15):
|
||||
# For now, guess DST from 02:00 the first Sunday in November to 03:00
|
||||
# the first Sunday on or after January 13. January transitions reportedly
|
||||
|
||||
# From Paul Eggert (2019-08-06):
|
||||
# Today Raymond Kumar reported the Government of Fiji Gazette Supplement No. 27
|
||||
# (2019-08-02) said that Fiji observes DST "commencing at 2.00 am on
|
||||
# Sunday, 10 November 2019 and ending at 3.00 am on Sunday, 12 January 2020."
|
||||
# For now, guess DST from 02:00 the second Sunday in November to 03:00
|
||||
# the first Sunday on or after January 12. January transitions reportedly
|
||||
# depend on when school terms start. Although the guess is ad hoc, it matches
|
||||
# transitions since late 2014 and seems more likely to match future
|
||||
# practice than guessing no DST.
|
||||
# transitions planned this year and seems more likely to match future practice
|
||||
# than guessing no DST.
|
||||
# From Michael Deckers (2019-08-06):
|
||||
# https://www.laws.gov.fj/LawsAsMade/downloadfile/848
|
||||
|
||||
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
|
||||
Rule Fiji 1998 1999 - Nov Sun>=1 2:00 1:00 -
|
||||
@ -407,8 +412,9 @@ Rule Fiji 2010 2013 - Oct Sun>=21 2:00 1:00 -
|
||||
Rule Fiji 2011 only - Mar Sun>=1 3:00 0 -
|
||||
Rule Fiji 2012 2013 - Jan Sun>=18 3:00 0 -
|
||||
Rule Fiji 2014 only - Jan Sun>=18 2:00 0 -
|
||||
Rule Fiji 2014 max - Nov Sun>=1 2:00 1:00 -
|
||||
Rule Fiji 2015 max - Jan Sun>=13 3:00 0 -
|
||||
Rule Fiji 2014 2018 - Nov Sun>=1 2:00 1:00 -
|
||||
Rule Fiji 2015 max - Jan Sun>=12 3:00 0 -
|
||||
Rule Fiji 2019 max - Nov Sun>=8 2:00 1:00 -
|
||||
# Zone NAME STDOFF RULES FORMAT [UNTIL]
|
||||
Zone Pacific/Fiji 11:55:44 - LMT 1915 Oct 26 # Suva
|
||||
12:00 Fiji +12/+13
|
||||
@ -627,10 +633,11 @@ Zone Pacific/Niue -11:19:40 - LMT 1901 # Alofi
|
||||
# Zone NAME STDOFF RULES FORMAT [UNTIL]
|
||||
Zone Pacific/Norfolk 11:11:52 - LMT 1901 # Kingston
|
||||
11:12 - +1112 1951
|
||||
11:30 - +1130 1974 Oct 27 02:00
|
||||
11:30 1:00 +1230 1975 Mar 2 02:00
|
||||
11:30 - +1130 2015 Oct 4 02:00
|
||||
11:00 - +11
|
||||
11:30 - +1130 1974 Oct 27 02:00s
|
||||
11:30 1:00 +1230 1975 Mar 2 02:00s
|
||||
11:30 - +1130 2015 Oct 4 02:00s
|
||||
11:00 - +11 2019 Jul
|
||||
11:00 AN +11/+12
|
||||
|
||||
# Palau (Belau)
|
||||
# Zone NAME STDOFF RULES FORMAT [UNTIL]
|
||||
@ -1898,12 +1905,21 @@ Zone Pacific/Wallis 12:15:20 - LMT 1901
|
||||
# ... at 12.30 am (by legal time in New South Wales) on 4 October 2015.
|
||||
# http://www.norfolkisland.gov.nf/nia/MediaRelease/Media%20Release%20Norfolk%20Island%20Standard%20Time%20Change.pdf
|
||||
|
||||
# From Paul Eggert (2015-09-23):
|
||||
# From Paul Eggert (2019-08-28):
|
||||
# Transitions before 2015 are from timeanddate.com, which consulted
|
||||
# the Norfolk Island Museum and the Australian Bureau of Meteorology's
|
||||
# Norfolk Island station, and found no record of Norfolk observing DST
|
||||
# other than in 1974/5. See:
|
||||
# https://www.timeanddate.com/time/australia/norfolk-island.html
|
||||
# However, disagree with timeanddate about the 1975-03-02 transition;
|
||||
# timeanddate has 02:00 but 02:00s corresponds to what the NSW law said
|
||||
# (thanks to Michael Deckers).
|
||||
|
||||
# Norfolk started observing Australian DST in spring 2019.
|
||||
# From Kyle Czech (2019-08-13):
|
||||
# https://www.legislation.gov.au/Details/F2018L01702
|
||||
# From Michael Deckers (2019-08-14):
|
||||
# https://www.legislation.gov.au/Details/F2019C00010
|
||||
|
||||
# Palau
|
||||
# See commentary for Micronesia.
|
||||
|
@ -844,11 +844,16 @@ Zone Europe/Andorra 0:06:04 - LMT 1901
|
||||
# Shanks & Pottenger give 02:00, the BEV 00:00. Go with the BEV,
|
||||
# and guess 02:00 for 1945-04-12.
|
||||
|
||||
# From Alois Triendl (2019-07-22):
|
||||
# In 1946 the end of DST was on Monday, 7 October 1946, at 3:00 am.
|
||||
# Shanks had this right. Source: Die Weltpresse, 5. Oktober 1946, page 5.
|
||||
|
||||
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
|
||||
Rule Austria 1920 only - Apr 5 2:00s 1:00 S
|
||||
Rule Austria 1920 only - Sep 13 2:00s 0 -
|
||||
Rule Austria 1946 only - Apr 14 2:00s 1:00 S
|
||||
Rule Austria 1946 1948 - Oct Sun>=1 2:00s 0 -
|
||||
Rule Austria 1946 only - Oct 7 2:00s 0 -
|
||||
Rule Austria 1947 1948 - Oct Sun>=1 2:00s 0 -
|
||||
Rule Austria 1947 only - Apr 6 2:00s 1:00 S
|
||||
Rule Austria 1948 only - Apr 18 2:00s 1:00 S
|
||||
Rule Austria 1980 only - Apr 6 0:00 1:00 S
|
||||
@ -898,15 +903,35 @@ Zone Europe/Minsk 1:50:16 - LMT 1880
|
||||
|
||||
# Belgium
|
||||
#
|
||||
# From Paul Eggert (1997-07-02):
|
||||
# From Michael Deckers (2019-08-25):
|
||||
# The exposition in the web page
|
||||
# https://www.bestor.be/wiki/index.php/Voyager_dans_le_temps._L%E2%80%99introduction_de_la_norme_de_Greenwich_en_Belgique
|
||||
# gives several contemporary sources from which one can conclude that
|
||||
# the switch in Europe/Brussels on 1892-05-01 was from 00:17:30 to 00:00:00.
|
||||
#
|
||||
# From Paul Eggert (2019-08-28):
|
||||
# This quote helps explain the late-1914 situation:
|
||||
# In early November 1914, the Germans imposed the time zone used in central
|
||||
# Europe and forced the inhabitants to set their watches and public clocks
|
||||
# sixty minutes ahead. Many were reluctant to accept "German time" and
|
||||
# continued to use "Belgian time" among themselves. Reflecting the spirit of
|
||||
# resistance that arose in the population, a song made fun of this change....
|
||||
# The song ended:
|
||||
# Putting your clock forward
|
||||
# Will but hasten the happy hour
|
||||
# When we kick out the Boches!
|
||||
# See: Pluvinage G. Brussels on German time. Cahiers Bruxellois -
|
||||
# Brusselse Cahiers. 2014;XLVI(1E):15-38.
|
||||
# https://www.cairn.info/revue-cahiers-bruxellois-2014-1E-page-15.htm
|
||||
#
|
||||
# Entries from 1914 through 1917 are taken from "De tijd in België"
|
||||
# <https://www.astro.oma.be/GENERAL/INFO/nli001a.html>.
|
||||
# Entries from 1918 through 1991 are taken from:
|
||||
# Annuaire de L'Observatoire Royal de Belgique,
|
||||
# Avenue Circulaire, 3, B-1180 BRUXELLES, CLVIIe année, 1991
|
||||
# (Imprimerie HAYEZ, s.p.r.l., Rue Fin, 4, 1080 BRUXELLES, MCMXC),
|
||||
# pp 8-9.
|
||||
# LMT before 1892 was 0:17:30, according to the official journal of Belgium:
|
||||
# Moniteur Belge, Samedi 30 Avril 1892, N.121.
|
||||
# Thanks to Pascal Delmoitie for these references.
|
||||
# Thanks to Pascal Delmoitie for the 1918/1991 references.
|
||||
# The 1918 rules are listed for completeness; they apply to unoccupied Belgium.
|
||||
# Assume Brussels switched to WET in 1918 when the armistice took effect.
|
||||
#
|
||||
@ -951,7 +976,7 @@ Rule Belgium 1946 only - May 19 2:00s 1:00 S
|
||||
Rule Belgium 1946 only - Oct 7 2:00s 0 -
|
||||
# Zone NAME STDOFF RULES FORMAT [UNTIL]
|
||||
Zone Europe/Brussels 0:17:30 - LMT 1880
|
||||
0:17:30 - BMT 1892 May 1 12:00 # Brussels MT
|
||||
0:17:30 - BMT 1892 May 1 00:17:30
|
||||
0:00 - WET 1914 Nov 8
|
||||
1:00 - CET 1916 May 1 0:00
|
||||
1:00 C-Eur CE%sT 1918 Nov 11 11:00u
|
||||
@ -1650,6 +1675,13 @@ Zone Atlantic/Reykjavik -1:28 - LMT 1908
|
||||
# advanced to sixty minutes later starting at hour two on 1944-04-02; ...
|
||||
# Starting at hour three on the date 1944-09-17 standard time will be resumed.
|
||||
#
|
||||
# From Alois Triendl (2019-07-02):
|
||||
# I spent 6 Euros to buy two archive copies of Il Messaggero, a Roman paper,
|
||||
# for 1 and 2 April 1944. The edition of 2 April has this note: "Tonight at 2
|
||||
# am, put forward the clock by one hour. Remember that in the night between
|
||||
# today and Monday the 'ora legale' will come in force again." That makes it
|
||||
# clear that in Rome the change was on Monday, 3 April 1944 at 2 am.
|
||||
#
|
||||
# From Paul Eggert (2016-10-27):
|
||||
# Go with INRiM for DST rules, except as corrected by Inglis for 1944
|
||||
# for the Kingdom of Italy. This is consistent with Renzo Baldini.
|
||||
@ -1797,15 +1829,10 @@ Zone Europe/Riga 1:36:34 - LMT 1880
|
||||
# From Paul Eggert (2013-09-09):
|
||||
# Shanks & Pottenger say Vaduz is like Zurich.
|
||||
|
||||
# From Alois Treindl (2013-09-18):
|
||||
# http://www.eliechtensteinensia.li/LIJ/1978/1938-1978/1941.pdf
|
||||
# ... confirms on p. 6 that Liechtenstein followed Switzerland in 1941 and 1942.
|
||||
# I ... translate only the last two paragraphs:
|
||||
# ... during second world war, in the years 1941 and 1942, Liechtenstein
|
||||
# introduced daylight saving time, adapting to Switzerland. From 1943 on
|
||||
# central European time was in force throughout the year.
|
||||
# From a report of the duke's government to the high council,
|
||||
# regarding the introduction of a time law, of 31 May 1977.
|
||||
# From Alois Treindl (2019-07-04):
|
||||
# I was able to access the online archive of the Vaduz paper Vaterland ...
|
||||
# I could confirm from the paper that Liechtenstein did in fact follow
|
||||
# the same DST in 1941 and 1942 as Switzerland did.
|
||||
|
||||
Link Europe/Zurich Europe/Vaduz
|
||||
|
||||
@ -2513,6 +2540,12 @@ Zone Europe/Bucharest 1:44:24 - LMT 1891 Oct
|
||||
# Europe/Kaliningrad covers...
|
||||
# 39 RU-KGD Kaliningrad Oblast
|
||||
|
||||
# From Paul Eggert (2019-07-25):
|
||||
# Although Shanks lists 1945-01-01 as the date for transition from
|
||||
# +01/+02 to +02/+03, more likely this is a placeholder. Guess that
|
||||
# the transition occurred at 1945-04-10 00:00, which is about when
|
||||
# Königsberg surrendered to Soviet troops. (Thanks to Alois Triendl.)
|
||||
|
||||
# From Paul Eggert (2016-03-18):
|
||||
# The 1989 transition is from USSR act No. 227 (1989-03-14).
|
||||
|
||||
@ -2529,8 +2562,8 @@ Zone Europe/Bucharest 1:44:24 - LMT 1891 Oct
|
||||
# Moscow on 1991-11-03, switched to Moscow-1 on 1992-01-19.
|
||||
|
||||
Zone Europe/Kaliningrad 1:22:00 - LMT 1893 Apr
|
||||
1:00 C-Eur CE%sT 1945
|
||||
2:00 Poland CE%sT 1946
|
||||
1:00 C-Eur CE%sT 1945 Apr 10
|
||||
2:00 Poland EE%sT 1946 Apr 7
|
||||
3:00 Russia MSK/MSD 1989 Mar 26 2:00s
|
||||
2:00 Russia EE%sT 2011 Mar 27 2:00s
|
||||
3:00 - +03 2014 Oct 26 2:00s
|
||||
@ -3673,20 +3706,75 @@ Zone Europe/Zurich 0:34:08 - LMT 1853 Jul 16 # See above comment.
|
||||
|
||||
# Turkey
|
||||
|
||||
# From Alois Treindl (2019-08-12):
|
||||
# http://www.astrolojidergisi.com/yazsaati.htm has researched the time zone
|
||||
# history of Turkey, based on newspaper archives and official documents.
|
||||
# From Paul Eggert (2019-08-28):
|
||||
# That source (Oya Vulaş, "Türkiye'de Yaz Saati Uygulamaları")
|
||||
# is used for 1940/1972, where it seems more reliable than our other
|
||||
# sources.
|
||||
|
||||
# From Kıvanç Yazan (2019-08-12):
|
||||
# http://www.resmigazete.gov.tr/arsiv/14539.pdf#page=24
|
||||
# 1973-06-03 01:00 -> 02:00, 1973-11-04 02:00 -> 01:00
|
||||
#
|
||||
# http://www.resmigazete.gov.tr/arsiv/14829.pdf#page=1
|
||||
# 1974-03-31 02:00 -> 03:00, 1974-11-03 02:00 -> 01:00
|
||||
#
|
||||
# http://www.resmigazete.gov.tr/arsiv/15161.pdf#page=1
|
||||
# 1975-03-22 02:00 -> 03:00, 1975-11-02 02:00 -> 01:00
|
||||
#
|
||||
# http://www.resmigazete.gov.tr/arsiv/15535_1.pdf#page=1
|
||||
# 1976-03-21 02:00 -> 03:00, 1976-10-31 02:00 -> 01:00
|
||||
#
|
||||
# http://www.resmigazete.gov.tr/arsiv/15778.pdf#page=5
|
||||
# 1977-04-03 02:00 -> 03:00, 1977-10-16 02:00 -> 01:00,
|
||||
# 1978-04-02 02:00 -> 03:00 (not applied, see below)
|
||||
# 1978-10-15 02:00 -> 01:00 (not applied, see below)
|
||||
# 1979-04-01 02:00 -> 03:00 (not applied, see below)
|
||||
# 1979-10-14 02:00 -> 01:00 (not applied, see below)
|
||||
#
|
||||
# http://www.resmigazete.gov.tr/arsiv/16245.pdf#page=17
|
||||
# This cancels the previous decision, and repeats it only for 1978.
|
||||
# 1978-04-02 02:00 -> 03:00, 1978-10-15 02:00 -> 01:00
|
||||
# (not applied due to standard TZ change below)
|
||||
#
|
||||
# http://www.resmigazete.gov.tr/arsiv/16331.pdf#page=3
|
||||
# This decision changes the default longitude for Turkish time zone from 30
|
||||
# degrees East to 45 degrees East. This means a standard TZ change, from +2
|
||||
# to +3. This is published & applied on 1978-06-29. At that time, Turkey was
|
||||
# already on summer time (already on 45E). Hence, this new law just meant an
|
||||
# "continuous summer time". Note that this was reversed in a few years.
|
||||
#
|
||||
# http://www.resmigazete.gov.tr/arsiv/18119_1.pdf#page=1
|
||||
# 1983-07-31 02:00 -> 03:00 (note that this jumps TZ to +4)
|
||||
# 1983-10-02 02:00 -> 01:00 (back to +3)
|
||||
#
|
||||
# http://www.resmigazete.gov.tr/arsiv/18561.pdf (page 1 and 34)
|
||||
# At this time, Turkey is still on +3 with no spring-forward on early
|
||||
# 1984. This decision is published on 10/31/1984. Page 1 declares
|
||||
# the decision of reverting the "default longitude change". So the
|
||||
# standard time should go back to +3 (30E). And page 34 explains when
|
||||
# that will happen: 1984-11-01 02:00 -> 01:00. You can think of this
|
||||
# as "end of continuous summer time, change of standard time zone".
|
||||
#
|
||||
# http://www.resmigazete.gov.tr/arsiv/18713.pdf#page=1
|
||||
# 1985-04-20 01:00 -> 02:00, 1985-09-28 02:00 -> 01:00
|
||||
|
||||
# From Kıvanç Yazan (2016-09-25):
|
||||
# 1) For 1986-2006, DST started at 01:00 local and ended at 02:00 local, with
|
||||
# no exceptions.
|
||||
# 2) 1994's lastSun was overridden with Mar 20 ...
|
||||
# Here are official papers:
|
||||
# http://www.resmigazete.gov.tr/arsiv/19032.pdf - page 2 for 1986
|
||||
# http://www.resmigazete.gov.tr/arsiv/19400.pdf - page 4 for 1987
|
||||
# http://www.resmigazete.gov.tr/arsiv/19752.pdf - page 15 for 1988
|
||||
# http://www.resmigazete.gov.tr/arsiv/20102.pdf - page 6 for 1989
|
||||
# http://www.resmigazete.gov.tr/arsiv/20464.pdf - page 1 for 1990 - 1992
|
||||
# http://www.resmigazete.gov.tr/arsiv/21531.pdf - page 15 for 1993 - 1995
|
||||
# http://www.resmigazete.gov.tr/arsiv/21879.pdf - page 1 for overriding 1994
|
||||
# http://www.resmigazete.gov.tr/arsiv/22588.pdf - page 1 for 1996, 1997
|
||||
# http://www.resmigazete.gov.tr/arsiv/23286.pdf - page 10 for 1998 - 2000
|
||||
# http://www.resmigazete.gov.tr/arsiv/19032.pdf#page=2 for 1986
|
||||
# http://www.resmigazete.gov.tr/arsiv/19400.pdf#page=4 for 1987
|
||||
# http://www.resmigazete.gov.tr/arsiv/19752.pdf#page=15 for 1988
|
||||
# http://www.resmigazete.gov.tr/arsiv/20102.pdf#page=6 for 1989
|
||||
# http://www.resmigazete.gov.tr/arsiv/20464.pdf#page=1 for 1990 - 1992
|
||||
# http://www.resmigazete.gov.tr/arsiv/21531.pdf#page=15 for 1993 - 1995
|
||||
# http://www.resmigazete.gov.tr/arsiv/21879.pdf#page=1 for overriding 1994
|
||||
# http://www.resmigazete.gov.tr/arsiv/22588.pdf#page=1 for 1996, 1997
|
||||
# http://www.resmigazete.gov.tr/arsiv/23286.pdf#page=10 for 1998 - 2000
|
||||
# http://www.resmigazete.gov.tr/eskiler/2001/03/20010324.htm#2 - for 2001
|
||||
# http://www.resmigazete.gov.tr/eskiler/2002/03/20020316.htm#2 - for 2002-2006
|
||||
# From Paul Eggert (2016-09-25):
|
||||
@ -3770,46 +3858,36 @@ Rule Turkey 1922 only - Oct 8 0:00 0 -
|
||||
Rule Turkey 1924 only - May 13 0:00 1:00 S
|
||||
Rule Turkey 1924 1925 - Oct 1 0:00 0 -
|
||||
Rule Turkey 1925 only - May 1 0:00 1:00 S
|
||||
Rule Turkey 1940 only - Jun 30 0:00 1:00 S
|
||||
Rule Turkey 1940 only - Oct 5 0:00 0 -
|
||||
Rule Turkey 1940 only - Jul 1 0:00 1:00 S
|
||||
Rule Turkey 1940 only - Oct 6 0:00 0 -
|
||||
Rule Turkey 1940 only - Dec 1 0:00 1:00 S
|
||||
Rule Turkey 1941 only - Sep 21 0:00 0 -
|
||||
Rule Turkey 1942 only - Apr 1 0:00 1:00 S
|
||||
# Whitman omits the next two transition and gives 1945 Oct 1;
|
||||
# go with Shanks & Pottenger.
|
||||
Rule Turkey 1942 only - Nov 1 0:00 0 -
|
||||
Rule Turkey 1945 only - Apr 2 0:00 1:00 S
|
||||
Rule Turkey 1945 only - Oct 8 0:00 0 -
|
||||
Rule Turkey 1946 only - Jun 1 0:00 1:00 S
|
||||
Rule Turkey 1946 only - Oct 1 0:00 0 -
|
||||
Rule Turkey 1947 1948 - Apr Sun>=16 0:00 1:00 S
|
||||
Rule Turkey 1947 1950 - Oct Sun>=2 0:00 0 -
|
||||
Rule Turkey 1947 1951 - Oct Sun>=2 0:00 0 -
|
||||
Rule Turkey 1949 only - Apr 10 0:00 1:00 S
|
||||
Rule Turkey 1950 only - Apr 19 0:00 1:00 S
|
||||
Rule Turkey 1950 only - Apr 16 0:00 1:00 S
|
||||
Rule Turkey 1951 only - Apr 22 0:00 1:00 S
|
||||
Rule Turkey 1951 only - Oct 8 0:00 0 -
|
||||
# DST for 15 months; unusual but we'll let it pass.
|
||||
Rule Turkey 1962 only - Jul 15 0:00 1:00 S
|
||||
Rule Turkey 1962 only - Oct 8 0:00 0 -
|
||||
Rule Turkey 1963 only - Oct 30 0:00 0 -
|
||||
Rule Turkey 1964 only - May 15 0:00 1:00 S
|
||||
Rule Turkey 1964 only - Oct 1 0:00 0 -
|
||||
Rule Turkey 1970 1972 - May Sun>=2 0:00 1:00 S
|
||||
Rule Turkey 1970 1972 - Oct Sun>=2 0:00 0 -
|
||||
Rule Turkey 1973 only - Jun 3 1:00 1:00 S
|
||||
Rule Turkey 1973 only - Nov 4 3:00 0 -
|
||||
Rule Turkey 1973 1976 - Oct Sun>=31 2:00 0 -
|
||||
Rule Turkey 1974 only - Mar 31 2:00 1:00 S
|
||||
Rule Turkey 1974 only - Nov 3 5:00 0 -
|
||||
Rule Turkey 1975 only - Mar 30 0:00 1:00 S
|
||||
Rule Turkey 1975 1976 - Oct lastSun 0:00 0 -
|
||||
Rule Turkey 1976 only - Jun 1 0:00 1:00 S
|
||||
Rule Turkey 1977 1978 - Apr Sun>=1 0:00 1:00 S
|
||||
Rule Turkey 1977 only - Oct 16 0:00 0 -
|
||||
Rule Turkey 1979 1980 - Apr Sun>=1 3:00 1:00 S
|
||||
Rule Turkey 1979 1982 - Oct Mon>=11 0:00 0 -
|
||||
Rule Turkey 1981 1982 - Mar lastSun 3:00 1:00 S
|
||||
Rule Turkey 1983 only - Jul 31 0:00 1:00 S
|
||||
Rule Turkey 1983 only - Oct 2 0:00 0 -
|
||||
Rule Turkey 1985 only - Apr 20 0:00 1:00 S
|
||||
Rule Turkey 1985 only - Sep 28 0:00 0 -
|
||||
Rule Turkey 1975 only - Mar 22 2:00 1:00 S
|
||||
Rule Turkey 1976 only - Mar 21 2:00 1:00 S
|
||||
Rule Turkey 1977 1978 - Apr Sun>=1 2:00 1:00 S
|
||||
Rule Turkey 1977 1978 - Oct Sun>=15 2:00 0 -
|
||||
Rule Turkey 1978 only - Jun 29 0:00 0 -
|
||||
Rule Turkey 1983 only - Jul 31 2:00 1:00 S
|
||||
Rule Turkey 1983 only - Oct 2 2:00 0 -
|
||||
Rule Turkey 1985 only - Apr 20 1:00s 1:00 S
|
||||
Rule Turkey 1985 only - Sep 28 1:00s 0 -
|
||||
Rule Turkey 1986 1993 - Mar lastSun 1:00s 1:00 S
|
||||
Rule Turkey 1986 1995 - Sep lastSun 1:00s 0 -
|
||||
Rule Turkey 1994 only - Mar 20 1:00s 1:00 S
|
||||
@ -3818,8 +3896,8 @@ Rule Turkey 1996 2006 - Oct lastSun 1:00s 0 -
|
||||
# Zone NAME STDOFF RULES FORMAT [UNTIL]
|
||||
Zone Europe/Istanbul 1:55:52 - LMT 1880
|
||||
1:56:56 - IMT 1910 Oct # Istanbul Mean Time?
|
||||
2:00 Turkey EE%sT 1978 Oct 15
|
||||
3:00 Turkey +03/+04 1985 Apr 20
|
||||
2:00 Turkey EE%sT 1978 Jun 29
|
||||
3:00 Turkey +03/+04 1984 Nov 1 2:00
|
||||
2:00 Turkey EE%sT 2007
|
||||
2:00 EU EE%sT 2011 Mar 27 1:00u
|
||||
2:00 - EET 2011 Mar 28 1:00u
|
||||
|
@ -26,36 +26,39 @@
|
||||
# This file is in the public domain.
|
||||
|
||||
# This file is generated automatically from the data in the public-domain
|
||||
# leap-seconds.list file, which can be copied from
|
||||
# NIST format leap-seconds.list file, which can be copied from
|
||||
# <ftp://ftp.nist.gov/pub/time/leap-seconds.list>
|
||||
# or <ftp://ftp.boulder.nist.gov/pub/time/leap-seconds.list>
|
||||
# or <ftp://tycho.usno.navy.mil/pub/ntp/leap-seconds.list>.
|
||||
# or <ftp://ftp.boulder.nist.gov/pub/time/leap-seconds.list>.
|
||||
# For more about leap-seconds.list, please see
|
||||
# The NTP Timescale and Leap Seconds
|
||||
# <https://www.eecis.udel.edu/~mills/leap.html>.
|
||||
|
||||
# The International Earth Rotation and Reference Systems Service
|
||||
# The rules for leap seconds are specified in Annex 1 (Time scales) of:
|
||||
# Standard-frequency and time-signal emissions.
|
||||
# International Telecommunication Union - Radiocommunication Sector
|
||||
# (ITU-R) Recommendation TF.460-6 (02/2002)
|
||||
# <https://www.itu.int/rec/R-REC-TF.460-6-200202-I/>.
|
||||
# The International Earth Rotation and Reference Systems Service (IERS)
|
||||
# periodically uses leap seconds to keep UTC to within 0.9 s of UT1
|
||||
# (which measures the true angular orientation of the earth in space)
|
||||
# (a proxy for Earth's angle in space as measured by astronomers)
|
||||
# and publishes leap second data in a copyrighted file
|
||||
# <https://hpiers.obspm.fr/iers/bul/bulc/Leap_Second.dat>.
|
||||
# See: Levine J. Coordinated Universal Time and the leap second.
|
||||
# URSI Radio Sci Bull. 2016;89(4):30-6. doi:10.23919/URSIRSB.2016.7909995
|
||||
# <https://ieeexplore.ieee.org/document/7909995>.
|
||||
|
||||
# There were no leap seconds before 1972, because the official mechanism
|
||||
# accounting for the discrepancy between atomic time and the earth's rotation
|
||||
# did not exist. The first ("1 Jan 1972") data line in leap-seconds.list
|
||||
# There were no leap seconds before 1972, as no official mechanism
|
||||
# accounted for the discrepancy between atomic time (TAI) and the earth's
|
||||
# rotation. The first ("1 Jan 1972") data line in leap-seconds.list
|
||||
# does not denote a leap second; it denotes the start of the current definition
|
||||
# of UTC.
|
||||
|
||||
# The correction (+ or -) is made at the given time, so lines
|
||||
# will typically look like:
|
||||
# Leap YEAR MON DAY 23:59:60 + R/S
|
||||
# or
|
||||
# Leap YEAR MON DAY 23:59:59 - R/S
|
||||
|
||||
# If the leap second is Rolling (R) the given time is local time (unused here).
|
||||
# All leap-seconds are Stationary (S) at the given UTC time.
|
||||
# The correction (+ or -) is made at the given time, so in the unlikely
|
||||
# event of a negative leap second, a line would look like this:
|
||||
# Leap YEAR MON DAY 23:59:59 - S
|
||||
# Typical lines look like this:
|
||||
# Leap YEAR MON DAY 23:59:60 + S
|
||||
Leap 1972 Jun 30 23:59:60 + S
|
||||
Leap 1972 Dec 31 23:59:60 + S
|
||||
Leap 1973 Dec 31 23:59:60 + S
|
||||
@ -85,8 +88,8 @@ Leap 2015 Jun 30 23:59:60 + S
|
||||
Leap 2016 Dec 31 23:59:60 + S
|
||||
|
||||
# POSIX timestamps for the data in this file:
|
||||
#updated 1467936000
|
||||
#expires 1577491200
|
||||
#updated 1467936000 (2016-07-08 00:00:00 UTC)
|
||||
#expires 1593302400 (2020-06-28 00:00:00 UTC)
|
||||
|
||||
# Updated through IERS Bulletin C57
|
||||
# File expires on: 28 December 2019
|
||||
# Updated through IERS Bulletin C58
|
||||
# File expires on: 28 June 2020
|
||||
|
@ -429,6 +429,31 @@ Zone America/New_York -4:56:02 - LMT 1883 Nov 18 12:03:58
|
||||
# From Paul Eggert (2015-12-25):
|
||||
# Assume this practice predates 1970, so Fort Pierre can use America/Chicago.
|
||||
|
||||
# From Paul Eggert (2015-04-06):
|
||||
# In 1950s Nashville a public clock had dueling faces, one for conservatives
|
||||
# and the other for liberals; the two sides didn't agree about the time of day.
|
||||
# I haven't found a photo of this clock, nor have I tracked down the TIME
|
||||
# magazine report cited below, but here's the story as told by the late
|
||||
# American journalist John Seigenthaler, who was there:
|
||||
#
|
||||
# "The two [newspaper] owners held strongly contrasting political and
|
||||
# ideological views. Evans was a New South liberal, Stahlman an Old South
|
||||
# conservative, and their two papers frequently clashed editorially, often on
|
||||
# the same day.... In the 1950s as the state legislature was grappling with
|
||||
# the question of whether to approve daylight saving time for the entire state,
|
||||
# TIME magazine reported:
|
||||
#
|
||||
# "'The Nashville Banner and The Nashville Tennessean rarely agree on anything
|
||||
# but the time of day - and last week they couldn't agree on that.'
|
||||
#
|
||||
# "It was all too true. The clock on the front of the building had two faces -
|
||||
# The Tennessean side of the building facing west, the other, east. When it
|
||||
# was high noon Banner time, it was 11 a.m. Tennessean time."
|
||||
#
|
||||
# Seigenthaler J. For 100 years, Tennessean had it covered.
|
||||
# The Tennessean 2007-05-11, republished 2015-04-06.
|
||||
# https://www.tennessean.com/story/insider/extras/2015/04/06/archives-seigenthaler-for-100-years-the-tennessean-had-it-covered/25348545/
|
||||
|
||||
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER
|
||||
Rule Chicago 1920 only - Jun 13 2:00 1:00 D
|
||||
Rule Chicago 1920 1921 - Oct lastSun 2:00 0 S
|
||||
@ -968,21 +993,21 @@ Zone America/Indiana/Vincennes -5:50:07 - LMT 1883 Nov 18 12:09:53
|
||||
-5:00 US E%sT
|
||||
#
|
||||
# Perry County, Indiana, switched from eastern to central time in April 2006.
|
||||
# From Alois Triendl (2019-07-09):
|
||||
# The Indianapolis News, Friday 27 October 1967 states that Perry County
|
||||
# returned to CST. It went again to EST on 27 April 1969, as documented by the
|
||||
# Indianapolis star of Saturday 26 April.
|
||||
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER
|
||||
Rule Perry 1946 only - Apr lastSun 2:00 1:00 D
|
||||
Rule Perry 1946 only - Sep lastSun 2:00 0 S
|
||||
Rule Perry 1953 1954 - Apr lastSun 2:00 1:00 D
|
||||
Rule Perry 1953 1959 - Sep lastSun 2:00 0 S
|
||||
Rule Perry 1955 only - May 1 0:00 1:00 D
|
||||
Rule Perry 1955 1960 - Sep lastSun 2:00 0 S
|
||||
Rule Perry 1956 1963 - Apr lastSun 2:00 1:00 D
|
||||
Rule Perry 1960 only - Oct lastSun 2:00 0 S
|
||||
Rule Perry 1961 only - Sep lastSun 2:00 0 S
|
||||
Rule Perry 1962 1963 - Oct lastSun 2:00 0 S
|
||||
Rule Perry 1961 1963 - Oct lastSun 2:00 0 S
|
||||
# Zone NAME STDOFF RULES FORMAT [UNTIL]
|
||||
Zone America/Indiana/Tell_City -5:47:03 - LMT 1883 Nov 18 12:12:57
|
||||
-6:00 US C%sT 1946
|
||||
-6:00 Perry C%sT 1964 Apr 26 2:00
|
||||
-5:00 - EST 1969
|
||||
-5:00 - EST 1967 Oct 29 2:00
|
||||
-6:00 US C%sT 1969 Apr 27 2:00
|
||||
-5:00 US E%sT 1971
|
||||
-5:00 - EST 2006 Apr 2 2:00
|
||||
-6:00 US C%sT
|
||||
@ -1058,16 +1083,27 @@ Zone America/Indiana/Vevay -5:40:16 - LMT 1883 Nov 18 12:19:44
|
||||
# clear how this matched civil time in Louisville, so for now continue
|
||||
# to assume Louisville switched at noon new local time, like New York.
|
||||
#
|
||||
# From Michael Deckers (2019-08-06):
|
||||
# From the contemporary source given by Alois Treindl,
|
||||
# the switch in Louisville on 1946-04-28 was on 00:01
|
||||
# From Paul Eggert (2019-08-26):
|
||||
# That source was the Louisville Courier-Journal, 1946-04-27, p 4.
|
||||
# Shanks gives 02:00 for all 20th-century transition times in Louisville.
|
||||
# Evidently this is wrong for spring 1946. Although also likely wrong
|
||||
# for other dates, we have no data.
|
||||
#
|
||||
# Part of Kentucky left its clocks alone in 1974.
|
||||
# This also includes Clark, Floyd, and Harrison counties in Indiana.
|
||||
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER
|
||||
Rule Louisville 1921 only - May 1 2:00 1:00 D
|
||||
Rule Louisville 1921 only - Sep 1 2:00 0 S
|
||||
Rule Louisville 1941 1961 - Apr lastSun 2:00 1:00 D
|
||||
Rule Louisville 1941 only - Apr lastSun 2:00 1:00 D
|
||||
Rule Louisville 1941 only - Sep lastSun 2:00 0 S
|
||||
Rule Louisville 1946 only - Apr lastSun 0:01 1:00 D
|
||||
Rule Louisville 1946 only - Jun 2 2:00 0 S
|
||||
Rule Louisville 1950 1961 - Apr lastSun 2:00 1:00 D
|
||||
Rule Louisville 1950 1955 - Sep lastSun 2:00 0 S
|
||||
Rule Louisville 1956 1960 - Oct lastSun 2:00 0 S
|
||||
Rule Louisville 1956 1961 - Oct lastSun 2:00 0 S
|
||||
# Zone NAME STDOFF RULES FORMAT [UNTIL]
|
||||
Zone America/Kentucky/Louisville -5:43:02 - LMT 1883 Nov 18 12:16:58
|
||||
-6:00 US C%sT 1921
|
||||
@ -1157,18 +1193,19 @@ Zone America/Kentucky/Monticello -5:39:24 - LMT 1883 Nov 18 12:20:36
|
||||
# one hour in 1914." This change is not in Shanks. We have no more
|
||||
# info, so omit this for now.
|
||||
#
|
||||
# From Paul Eggert (2017-07-26):
|
||||
# Although Shanks says Detroit observed DST in 1967 from 06-14 00:01
|
||||
# until 10-29 00:01, I now see multiple reports that this is incorrect.
|
||||
# For example, according to a 50-year anniversary report about the 1967
|
||||
# Detroit riots and a major-league doubleheader on 1967-07-23, "By the time
|
||||
# the last fly ball of the doubleheader settled into the glove of leftfielder
|
||||
# Lenny Green, it was after 7 p.m. Detroit did not observe daylight saving
|
||||
# time, so light was already starting to fail. Twilight was made even deeper
|
||||
# by billowing columns of smoke that ascended in an unbroken wall north of the
|
||||
# ballpark." See: Dow B. Detroit '67: As violence unfolded, Tigers played two
|
||||
# at home vs. Yankees. Detroit Free Press 2017-07-23.
|
||||
# https://www.freep.com/story/sports/mlb/tigers/2017/07/23/detroit-tigers-1967-riot-new-york-yankees/499951001/
|
||||
# From Paul Eggert (2019-07-06):
|
||||
# Due to a complicated set of legal maneuvers, in 1967 Michigan did
|
||||
# not start daylight saving time when the rest of the US did.
|
||||
# Instead, it began DST on Jun 14 at 00:01. This was big news:
|
||||
# the Detroit Free Press reported it at the top of Page 1 on
|
||||
# 1967-06-14, in an article "State Adjusting to Switch to Fast Time"
|
||||
# by Gary Blonston, above an article about Thurgood Marshall's
|
||||
# confirmation to the US Supreme Court. Although Shanks says Detroit
|
||||
# observed DST until 1967-10-29 00:01, that time of day seems to be
|
||||
# incorrect, as the Free Press later said DST ended in Michigan at the
|
||||
# same time as the rest of the US. Also, although Shanks reports no DST in
|
||||
# Detroit in 1968, it did observe DST that year; in the November 1968
|
||||
# election Michigan voters narrowly repealed DST, effective 1969.
|
||||
#
|
||||
# Most of Michigan observed DST from 1973 on, but was a bit late in 1975.
|
||||
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER
|
||||
@ -1179,7 +1216,9 @@ Zone America/Detroit -5:32:11 - LMT 1905
|
||||
-6:00 - CST 1915 May 15 2:00
|
||||
-5:00 - EST 1942
|
||||
-5:00 US E%sT 1946
|
||||
-5:00 Detroit E%sT 1973
|
||||
-5:00 Detroit E%sT 1967 Jun 14 0:01
|
||||
-5:00 US E%sT 1969
|
||||
-5:00 - EST 1973
|
||||
-5:00 US E%sT 1975
|
||||
-5:00 - EST 1975 Apr 27 2:00
|
||||
-5:00 US E%sT
|
||||
@ -1228,6 +1267,12 @@ Zone America/Menominee -5:50:27 - LMT 1885 Sep 18 12:00
|
||||
#
|
||||
# Other sources occasionally used include:
|
||||
#
|
||||
# Milne J. Civil time. Geogr J. 1899 Feb;13(2):173-94
|
||||
# <https://www.jstor.org/stable/1774359>.
|
||||
#
|
||||
# Pearce C. The Great Daylight Saving Time Controversy.
|
||||
# Australian Ebook Publisher. 2017. ISBN 978-1-925516-96-8.
|
||||
#
|
||||
# Edward W. Whitman, World Time Differences,
|
||||
# Whitman Publishing Co, 2 Niagara Av, Ealing, London (undated),
|
||||
# which I found in the UCLA library.
|
||||
@ -1236,9 +1281,6 @@ Zone America/Menominee -5:50:27 - LMT 1885 Sep 18 12:00
|
||||
# <http://cs.ucla.edu/~eggert/The-Waste-of-Daylight-19th.pdf>
|
||||
# [PDF] (1914-03)
|
||||
#
|
||||
# Milne J. Civil time. Geogr J. 1899 Feb;13(2):173-94
|
||||
# <https://www.jstor.org/stable/1774359>.
|
||||
#
|
||||
# See the 'europe' file for Greenland.
|
||||
|
||||
# Canada
|
||||
@ -1880,9 +1922,8 @@ Zone America/Winnipeg -6:28:36 - LMT 1887 Jul 16
|
||||
# Willett (1914-03) notes that DST "has been in operation ... in the
|
||||
# City of Moose Jaw, Saskatchewan, for one year."
|
||||
|
||||
# From Paul Eggert (2019-04-26):
|
||||
# Chris Pearce's book "The Great Daylight Saving Time Controversy" (2017)
|
||||
# says that Regina observed DST in 1914-1917. No dates and times,
|
||||
# From Paul Eggert (2019-07-25):
|
||||
# Pearce's book says Regina observed DST in 1914-1917. No dates and times,
|
||||
# unfortunately. It also says that in 1914 Saskatoon observed DST
|
||||
# from 1 June to 6 July, and that DST was also tried out in Davidson,
|
||||
# Melfort, and Prince Albert.
|
||||
@ -1962,6 +2003,19 @@ Zone America/Swift_Current -7:11:20 - LMT 1905 Sep
|
||||
|
||||
# Alberta
|
||||
|
||||
# From Alois Triendl (2019-07-19):
|
||||
# There was no DST in Alberta in 1967... Calgary Herald, 29 April 1967.
|
||||
# 1969, no DST, from Edmonton Journal 18 April 1969
|
||||
#
|
||||
# From Paul Eggert (2019-07-25):
|
||||
# Pearce's book says that Alberta's 1948 Daylight Saving Act required
|
||||
# Mountain Standard Time without DST, and that "anyone who broke that law
|
||||
# could be fined up to $25 and costs". There seems to be no record of
|
||||
# anybody paying the fine. The law was not changed until an August 1971
|
||||
# plebiscite reinstituted DST in 1972. This story is also mentioned in:
|
||||
# Boyer JP. Forcing Choice: The Risky Reward of Referendums. Dundum. 2017.
|
||||
# ISBN 978-1459739123.
|
||||
|
||||
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
|
||||
Rule Edm 1918 1919 - Apr Sun>=8 2:00 1:00 D
|
||||
Rule Edm 1918 only - Oct 27 2:00 0 S
|
||||
@ -1974,10 +2028,6 @@ Rule Edm 1945 only - Aug 14 23:00u 1:00 P # Peace
|
||||
Rule Edm 1945 only - Sep lastSun 2:00 0 S
|
||||
Rule Edm 1947 only - Apr lastSun 2:00 1:00 D
|
||||
Rule Edm 1947 only - Sep lastSun 2:00 0 S
|
||||
Rule Edm 1967 only - Apr lastSun 2:00 1:00 D
|
||||
Rule Edm 1967 only - Oct lastSun 2:00 0 S
|
||||
Rule Edm 1969 only - Apr lastSun 2:00 1:00 D
|
||||
Rule Edm 1969 only - Oct lastSun 2:00 0 S
|
||||
Rule Edm 1972 1986 - Apr lastSun 2:00 1:00 D
|
||||
Rule Edm 1972 2006 - Oct lastSun 2:00 0 S
|
||||
# Zone NAME STDOFF RULES FORMAT [UNTIL]
|
||||
@ -2060,8 +2110,20 @@ Zone America/Edmonton -7:33:52 - LMT 1906 Sep
|
||||
# been on MST (-0700) like Dawson Creek since it advanced its clocks on
|
||||
# 2015-03-08.
|
||||
#
|
||||
# From Paul Eggert (2015-09-23):
|
||||
# From Paul Eggert (2019-07-25):
|
||||
# Shanks says Fort Nelson did not observe DST in 1946, unlike Vancouver.
|
||||
# Alois Triendl confirmed this on 07-22, citing the 1946-04-27 Vancouver Daily
|
||||
# Province. He also cited the 1946-09-28 Victoria Daily Times, which said
|
||||
# that Vancouver, Victoria, etc. "change at midnight Saturday"; for now,
|
||||
# guess they meant 02:00 Sunday since 02:00 was common practice in Vancouver.
|
||||
#
|
||||
# Early Vancouver, Volume Four, by Major J.S. Matthews, V.D., 2011 edition
|
||||
# says that a 1922 plebiscite adopted DST, but a 1923 plebiscite rejected it.
|
||||
# http://former.vancouver.ca/ctyclerk/archives/digitized/EarlyVan/SearchEarlyVan/Vol4pdf/MatthewsEarlyVancouverVol4_DaylightSavings.pdf
|
||||
# A catalog entry for a newspaper clipping seems to indicate that Vancouver
|
||||
# observed DST in 1941 from 07-07 through 09-27; see
|
||||
# https://searcharchives.vancouver.ca/daylight-saving-1918-starts-again-july-7-1941-start-d-s-sept-27-end-of-d-s-1941
|
||||
# We have no further details, so omit them for now.
|
||||
|
||||
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
|
||||
Rule Vanc 1918 only - Apr 14 2:00 1:00 D
|
||||
@ -2070,7 +2132,7 @@ Rule Vanc 1942 only - Feb 9 2:00 1:00 W # War
|
||||
Rule Vanc 1945 only - Aug 14 23:00u 1:00 P # Peace
|
||||
Rule Vanc 1945 only - Sep 30 2:00 0 S
|
||||
Rule Vanc 1946 1986 - Apr lastSun 2:00 1:00 D
|
||||
Rule Vanc 1946 only - Oct 13 2:00 0 S
|
||||
Rule Vanc 1946 only - Sep 29 2:00 0 S
|
||||
Rule Vanc 1947 1961 - Sep lastSun 2:00 0 S
|
||||
Rule Vanc 1962 2006 - Oct lastSun 2:00 0 S
|
||||
# Zone NAME STDOFF RULES FORMAT [UNTIL]
|
||||
|
@ -1253,14 +1253,8 @@ Zone America/Rio_Branco -4:31:12 - LMT 1914
|
||||
# From Juan Correa (2016-12-04):
|
||||
# Magallanes region ... will keep DST (UTC -3) all year round....
|
||||
# http://www.soychile.cl/Santiago/Sociedad/2016/12/04/433428/Bachelet-firmo-el-decreto-para-establecer-un-horario-unico-para-la-Region-de-Magallanes.aspx
|
||||
#
|
||||
# From Deborah Goldsmith (2017-01-19):
|
||||
# http://www.diariooficial.interior.gob.cl/publicaciones/2017/01/17/41660/01/1169626.pdf
|
||||
# From Paul Eggert (2017-01-19):
|
||||
# The above says the Magallanes change expires 2019-05-11 at 24:00,
|
||||
# so in theory, they will revert to -04/-03 after that, which means
|
||||
# they will switch from -03 to -04 one hour after Santiago does that day.
|
||||
# For now, assume that they will not revert.
|
||||
|
||||
# From Juan Correa (2018-08-13):
|
||||
# As of moments ago, the Ministry of Energy in Chile has announced the new
|
||||
@ -1281,6 +1275,11 @@ Zone America/Rio_Branco -4:31:12 - LMT 1914
|
||||
# So we extend the new rules on Saturdays at 24:00 mainland time indefinitely.
|
||||
# From Juan Correa (2019-02-04):
|
||||
# http://www.diariooficial.interior.gob.cl/publicaciones/2018/11/23/42212/01/1498738.pdf
|
||||
# From Paul Eggert (2019-09-01):
|
||||
# The above says the Magallanes exception expires 2022-04-02 at 24:00,
|
||||
# so in theory, they will revert to -04/-03 after that.
|
||||
# For now, assume that they will not revert,
|
||||
# since they have extended the expiration date once already.
|
||||
|
||||
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
|
||||
Rule Chile 1927 1931 - Sep 1 0:00 1:00 -
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, Red Hat Inc. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
@ -45,7 +45,7 @@ LIR_Opr FrameMap::map_to_opr(BasicType type, VMRegPair* reg, bool) {
|
||||
Register reg2 = r_2->as_Register();
|
||||
assert(reg2 == reg, "must be same register");
|
||||
opr = as_long_opr(reg);
|
||||
} else if (type == T_OBJECT || type == T_ARRAY) {
|
||||
} else if (is_reference_type(type)) {
|
||||
opr = as_oop_opr(reg);
|
||||
} else if (type == T_METADATA) {
|
||||
opr = as_metadata_opr(reg);
|
||||
|
@ -728,7 +728,7 @@ void LIR_Assembler::reg2reg(LIR_Opr src, LIR_Opr dest) {
|
||||
move_regs(src->as_register(), dest->as_register());
|
||||
|
||||
} else if (dest->is_double_cpu()) {
|
||||
if (src->type() == T_OBJECT || src->type() == T_ARRAY) {
|
||||
if (is_reference_type(src->type())) {
|
||||
// Surprising to me but we can see move of a long to t_object
|
||||
__ verify_oop(src->as_register());
|
||||
move_regs(src->as_register(), dest->as_register_lo());
|
||||
@ -756,7 +756,7 @@ void LIR_Assembler::reg2reg(LIR_Opr src, LIR_Opr dest) {
|
||||
|
||||
void LIR_Assembler::reg2stack(LIR_Opr src, LIR_Opr dest, BasicType type, bool pop_fpu_stack) {
|
||||
if (src->is_single_cpu()) {
|
||||
if (type == T_ARRAY || type == T_OBJECT) {
|
||||
if (is_reference_type(type)) {
|
||||
__ str(src->as_register(), frame_map()->address_for_slot(dest->single_stack_ix()));
|
||||
__ verify_oop(src->as_register());
|
||||
} else if (type == T_METADATA || type == T_DOUBLE) {
|
||||
@ -794,7 +794,7 @@ void LIR_Assembler::reg2mem(LIR_Opr src, LIR_Opr dest, BasicType type, LIR_Patch
|
||||
return;
|
||||
}
|
||||
|
||||
if (type == T_ARRAY || type == T_OBJECT) {
|
||||
if (is_reference_type(type)) {
|
||||
__ verify_oop(src->as_register());
|
||||
|
||||
if (UseCompressedOops && !wide) {
|
||||
@ -869,7 +869,7 @@ void LIR_Assembler::stack2reg(LIR_Opr src, LIR_Opr dest, BasicType type) {
|
||||
assert(dest->is_register(), "should not call otherwise");
|
||||
|
||||
if (dest->is_single_cpu()) {
|
||||
if (type == T_ARRAY || type == T_OBJECT) {
|
||||
if (is_reference_type(type)) {
|
||||
__ ldr(dest->as_register(), frame_map()->address_for_slot(src->single_stack_ix()));
|
||||
__ verify_oop(dest->as_register());
|
||||
} else if (type == T_METADATA) {
|
||||
@ -1019,7 +1019,7 @@ void LIR_Assembler::mem2reg(LIR_Opr src, LIR_Opr dest, BasicType type, LIR_Patch
|
||||
ShouldNotReachHere();
|
||||
}
|
||||
|
||||
if (type == T_ARRAY || type == T_OBJECT) {
|
||||
if (is_reference_type(type)) {
|
||||
if (UseCompressedOops && !wide) {
|
||||
__ decode_heap_oop(dest->as_register());
|
||||
}
|
||||
@ -1227,8 +1227,8 @@ void LIR_Assembler::emit_alloc_array(LIR_OpAllocArray* op) {
|
||||
__ uxtw(len, len);
|
||||
|
||||
if (UseSlowPath ||
|
||||
(!UseFastNewObjectArray && (op->type() == T_OBJECT || op->type() == T_ARRAY)) ||
|
||||
(!UseFastNewTypeArray && (op->type() != T_OBJECT && op->type() != T_ARRAY))) {
|
||||
(!UseFastNewObjectArray && is_reference_type(op->type())) ||
|
||||
(!UseFastNewTypeArray && !is_reference_type(op->type()))) {
|
||||
__ b(*op->stub()->entry());
|
||||
} else {
|
||||
Register tmp1 = op->tmp1()->as_register();
|
||||
@ -1948,10 +1948,10 @@ void LIR_Assembler::comp_op(LIR_Condition condition, LIR_Opr opr1, LIR_Opr opr2,
|
||||
if (opr2->is_single_cpu()) {
|
||||
// cpu register - cpu register
|
||||
Register reg2 = opr2->as_register();
|
||||
if (opr1->type() == T_OBJECT || opr1->type() == T_ARRAY) {
|
||||
if (is_reference_type(opr1->type())) {
|
||||
__ cmpoop(reg1, reg2);
|
||||
} else {
|
||||
assert(opr2->type() != T_OBJECT && opr2->type() != T_ARRAY, "cmp int, oop?");
|
||||
assert(!is_reference_type(opr2->type()), "cmp int, oop?");
|
||||
__ cmpw(reg1, reg2);
|
||||
}
|
||||
return;
|
||||
@ -2243,7 +2243,7 @@ void LIR_Assembler::emit_arraycopy(LIR_OpArrayCopy* op) {
|
||||
CodeStub* stub = op->stub();
|
||||
int flags = op->flags();
|
||||
BasicType basic_type = default_type != NULL ? default_type->element_type()->basic_type() : T_ILLEGAL;
|
||||
if (basic_type == T_ARRAY) basic_type = T_OBJECT;
|
||||
if (is_reference_type(basic_type)) basic_type = T_OBJECT;
|
||||
|
||||
// if we don't know anything, just go through the generic arraycopy
|
||||
if (default_type == NULL // || basic_type == T_OBJECT
|
||||
@ -3131,7 +3131,7 @@ void LIR_Assembler::peephole(LIR_List *lir) {
|
||||
void LIR_Assembler::atomic_op(LIR_Code code, LIR_Opr src, LIR_Opr data, LIR_Opr dest, LIR_Opr tmp_op) {
|
||||
Address addr = as_Address(src->as_address_ptr());
|
||||
BasicType type = src->type();
|
||||
bool is_oop = type == T_OBJECT || type == T_ARRAY;
|
||||
bool is_oop = is_reference_type(type);
|
||||
|
||||
void (MacroAssembler::* add)(Register prev, RegisterOrConstant incr, Register addr);
|
||||
void (MacroAssembler::* xchg)(Register prev, Register newv, Register addr);
|
||||
|
@ -733,7 +733,7 @@ LIR_Opr LIRGenerator::atomic_cmpxchg(BasicType type, LIR_Opr addr, LIRItem& cmp_
|
||||
new_value.load_item();
|
||||
cmp_value.load_item();
|
||||
LIR_Opr result = new_register(T_INT);
|
||||
if (type == T_OBJECT || type == T_ARRAY) {
|
||||
if (is_reference_type(type)) {
|
||||
__ cas_obj(addr, cmp_value.result(), new_value.result(), new_register(T_INT), new_register(T_INT), result);
|
||||
} else if (type == T_INT) {
|
||||
__ cas_int(addr->as_address_ptr()->base(), cmp_value.result(), new_value.result(), ill, ill);
|
||||
@ -748,7 +748,7 @@ LIR_Opr LIRGenerator::atomic_cmpxchg(BasicType type, LIR_Opr addr, LIRItem& cmp_
|
||||
}
|
||||
|
||||
LIR_Opr LIRGenerator::atomic_xchg(BasicType type, LIR_Opr addr, LIRItem& value) {
|
||||
bool is_oop = type == T_OBJECT || type == T_ARRAY;
|
||||
bool is_oop = is_reference_type(type);
|
||||
LIR_Opr result = new_register(type);
|
||||
value.load_item();
|
||||
assert(type == T_INT || is_oop LP64_ONLY( || type == T_LONG ), "unexpected type");
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -251,7 +251,7 @@ void G1BarrierSetAssembler::g1_write_barrier_post(MacroAssembler* masm,
|
||||
|
||||
void G1BarrierSetAssembler::load_at(MacroAssembler* masm, DecoratorSet decorators, BasicType type,
|
||||
Register dst, Address src, Register tmp1, Register tmp_thread) {
|
||||
bool on_oop = type == T_OBJECT || type == T_ARRAY;
|
||||
bool on_oop = is_reference_type(type);
|
||||
bool on_weak = (decorators & ON_WEAK_OOP_REF) != 0;
|
||||
bool on_phantom = (decorators & ON_PHANTOM_OOP_REF) != 0;
|
||||
bool on_reference = on_weak || on_phantom;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -46,7 +46,7 @@ void ModRefBarrierSetAssembler::arraycopy_epilogue(MacroAssembler* masm, Decorat
|
||||
|
||||
void ModRefBarrierSetAssembler::store_at(MacroAssembler* masm, DecoratorSet decorators, BasicType type,
|
||||
Address dst, Register val, Register tmp1, Register tmp2) {
|
||||
if (type == T_OBJECT || type == T_ARRAY) {
|
||||
if (is_reference_type(type)) {
|
||||
oop_store_at(masm, decorators, type, dst, val, tmp1, tmp2);
|
||||
} else {
|
||||
BarrierSetAssembler::store_at(masm, decorators, type, dst, val, tmp1, tmp2);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2018, Red Hat, Inc. All rights reserved.
|
||||
* Copyright (c) 2018, 2019, Red Hat, Inc. All rights reserved.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
@ -94,7 +94,7 @@ LIR_Opr ShenandoahBarrierSetC1::atomic_xchg_at_resolved(LIRAccess& access, LIRIt
|
||||
value_opr = storeval_barrier(access.gen(), value_opr, access.access_emit_info(), access.decorators());
|
||||
}
|
||||
|
||||
assert(type == T_INT || type == T_OBJECT || type == T_ARRAY LP64_ONLY( || type == T_LONG ), "unexpected type");
|
||||
assert(type == T_INT || is_reference_type(type) LP64_ONLY( || type == T_LONG ), "unexpected type");
|
||||
LIR_Opr tmp = gen->new_register(T_INT);
|
||||
__ xchg(access.resolved_addr(), value_opr, result, tmp);
|
||||
|
||||
|
@ -317,7 +317,7 @@ void ShenandoahBarrierSetAssembler::load_reference_barrier(MacroAssembler* masm,
|
||||
|
||||
void ShenandoahBarrierSetAssembler::load_at(MacroAssembler* masm, DecoratorSet decorators, BasicType type,
|
||||
Register dst, Address src, Register tmp1, Register tmp_thread) {
|
||||
bool on_oop = type == T_OBJECT || type == T_ARRAY;
|
||||
bool on_oop = is_reference_type(type);
|
||||
bool not_in_heap = (decorators & IN_NATIVE) != 0;
|
||||
bool on_weak = (decorators & ON_WEAK_OOP_REF) != 0;
|
||||
bool on_phantom = (decorators & ON_PHANTOM_OOP_REF) != 0;
|
||||
@ -352,7 +352,7 @@ void ShenandoahBarrierSetAssembler::load_at(MacroAssembler* masm, DecoratorSet d
|
||||
|
||||
void ShenandoahBarrierSetAssembler::store_at(MacroAssembler* masm, DecoratorSet decorators, BasicType type,
|
||||
Address dst, Register val, Register tmp1, Register tmp2) {
|
||||
bool on_oop = type == T_OBJECT || type == T_ARRAY;
|
||||
bool on_oop = is_reference_type(type);
|
||||
if (!on_oop) {
|
||||
BarrierSetAssembler::store_at(masm, decorators, type, dst, val, tmp1, tmp2);
|
||||
return;
|
||||
|
@ -127,7 +127,7 @@ void ZBarrierSetAssembler::store_at(MacroAssembler* masm,
|
||||
Register tmp1,
|
||||
Register tmp2) {
|
||||
// Verify value
|
||||
if (type == T_OBJECT || type == T_ARRAY) {
|
||||
if (is_reference_type(type)) {
|
||||
// Note that src could be noreg, which means we
|
||||
// are storing null and can skip verification.
|
||||
if (val != noreg) {
|
||||
|
@ -135,26 +135,6 @@
|
||||
// * 63-48 Fixed (16-bits, always zero)
|
||||
//
|
||||
|
||||
uintptr_t ZPlatformAddressSpaceStart() {
|
||||
const uintptr_t first_heap_view_address = (uintptr_t)1 << (ZPlatformAddressMetadataShift() + 0);
|
||||
const size_t min_address_offset = 0;
|
||||
return first_heap_view_address + min_address_offset;
|
||||
}
|
||||
|
||||
uintptr_t ZPlatformAddressSpaceEnd() {
|
||||
const uintptr_t last_heap_view_address = (uintptr_t)1 << (ZPlatformAddressMetadataShift() + 2);
|
||||
const size_t max_address_offset = (size_t)1 << ZPlatformAddressOffsetBits();
|
||||
return last_heap_view_address + max_address_offset;
|
||||
}
|
||||
|
||||
uintptr_t ZPlatformAddressReservedStart() {
|
||||
return ZPlatformAddressSpaceStart();
|
||||
}
|
||||
|
||||
uintptr_t ZPlatformAddressReservedEnd() {
|
||||
return ZPlatformAddressSpaceEnd();
|
||||
}
|
||||
|
||||
uintptr_t ZPlatformAddressBase() {
|
||||
return 0;
|
||||
}
|
||||
|
@ -40,10 +40,6 @@ const size_t ZPlatformMaxHeapSizeShift = 46; // 16TB
|
||||
const size_t ZPlatformNMethodDisarmedOffset = 4;
|
||||
const size_t ZPlatformCacheLineSize = 64;
|
||||
|
||||
uintptr_t ZPlatformAddressSpaceStart();
|
||||
uintptr_t ZPlatformAddressSpaceEnd();
|
||||
uintptr_t ZPlatformAddressReservedStart();
|
||||
uintptr_t ZPlatformAddressReservedEnd();
|
||||
uintptr_t ZPlatformAddressBase();
|
||||
size_t ZPlatformAddressOffsetBits();
|
||||
size_t ZPlatformAddressMetadataShift();
|
||||
|
@ -1952,7 +1952,7 @@ nmethod* SharedRuntime::generate_native_wrapper(MacroAssembler* masm,
|
||||
__ reset_last_Java_frame(false);
|
||||
|
||||
// Unbox oop result, e.g. JNIHandles::resolve result.
|
||||
if (ret_type == T_OBJECT || ret_type == T_ARRAY) {
|
||||
if (is_reference_type(ret_type)) {
|
||||
__ resolve_jobject(r0, rthread, rscratch2);
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -51,7 +51,7 @@ LIR_Opr FrameMap::map_to_opr(BasicType type, VMRegPair* reg, bool outgoing) {
|
||||
}
|
||||
if (r_2->is_Register() && (type == T_LONG || type == T_DOUBLE)) {
|
||||
opr = as_long_opr(reg);
|
||||
} else if (type == T_OBJECT || type == T_ARRAY) {
|
||||
} else if (is_reference_type(type)) {
|
||||
opr = as_oop_opr(reg);
|
||||
} else if (type == T_METADATA) {
|
||||
opr = as_metadata_opr(reg);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -107,8 +107,8 @@ bool LIR_Assembler::is_single_instruction(LIR_Op* op) {
|
||||
}
|
||||
|
||||
if (UseCompressedOops) {
|
||||
if (dst->is_address() && !dst->is_stack() && (dst->type() == T_OBJECT || dst->type() == T_ARRAY)) return false;
|
||||
if (src->is_address() && !src->is_stack() && (src->type() == T_OBJECT || src->type() == T_ARRAY)) return false;
|
||||
if (dst->is_address() && !dst->is_stack() && is_reference_type(dst->type())) return false;
|
||||
if (src->is_address() && !src->is_stack() && is_reference_type(src->type())) return false;
|
||||
}
|
||||
|
||||
if (UseCompressedClassPointers) {
|
||||
@ -728,7 +728,7 @@ int LIR_Assembler::store(LIR_Opr from_reg, Register base, int offset, BasicType
|
||||
__ set(offset, O7);
|
||||
store_offset = store(from_reg, base, O7, type, wide);
|
||||
} else {
|
||||
if (type == T_ARRAY || type == T_OBJECT) {
|
||||
if (is_reference_type(type)) {
|
||||
__ verify_oop(from_reg->as_register());
|
||||
}
|
||||
store_offset = code_offset();
|
||||
@ -789,7 +789,7 @@ int LIR_Assembler::store(LIR_Opr from_reg, Register base, int offset, BasicType
|
||||
|
||||
|
||||
int LIR_Assembler::store(LIR_Opr from_reg, Register base, Register disp, BasicType type, bool wide) {
|
||||
if (type == T_ARRAY || type == T_OBJECT) {
|
||||
if (is_reference_type(type)) {
|
||||
__ verify_oop(from_reg->as_register());
|
||||
}
|
||||
int store_offset = code_offset();
|
||||
@ -889,7 +889,7 @@ int LIR_Assembler::load(Register base, int offset, LIR_Opr to_reg, BasicType typ
|
||||
}
|
||||
default : ShouldNotReachHere();
|
||||
}
|
||||
if (type == T_ARRAY || type == T_OBJECT) {
|
||||
if (is_reference_type(type)) {
|
||||
__ verify_oop(to_reg->as_register());
|
||||
}
|
||||
}
|
||||
@ -924,7 +924,7 @@ int LIR_Assembler::load(Register base, Register disp, LIR_Opr to_reg, BasicType
|
||||
break;
|
||||
default : ShouldNotReachHere();
|
||||
}
|
||||
if (type == T_ARRAY || type == T_OBJECT) {
|
||||
if (is_reference_type(type)) {
|
||||
__ verify_oop(to_reg->as_register());
|
||||
}
|
||||
return load_offset;
|
||||
@ -1359,7 +1359,7 @@ void LIR_Assembler::reg2reg(LIR_Opr from_reg, LIR_Opr to_reg) {
|
||||
} else {
|
||||
ShouldNotReachHere();
|
||||
}
|
||||
if (to_reg->type() == T_OBJECT || to_reg->type() == T_ARRAY) {
|
||||
if (is_reference_type(to_reg->type())) {
|
||||
__ verify_oop(to_reg->as_register());
|
||||
}
|
||||
}
|
||||
@ -2295,8 +2295,8 @@ void LIR_Assembler::emit_alloc_array(LIR_OpAllocArray* op) {
|
||||
|
||||
__ signx(op->len()->as_register());
|
||||
if (UseSlowPath ||
|
||||
(!UseFastNewObjectArray && (op->type() == T_OBJECT || op->type() == T_ARRAY)) ||
|
||||
(!UseFastNewTypeArray && (op->type() != T_OBJECT && op->type() != T_ARRAY))) {
|
||||
(!UseFastNewObjectArray && is_reference_type(op->type())) ||
|
||||
(!UseFastNewTypeArray && !is_reference_type(op->type()))) {
|
||||
__ br(Assembler::always, false, Assembler::pt, *op->stub()->entry());
|
||||
__ delayed()->nop();
|
||||
} else {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -568,7 +568,7 @@ LIR_Opr LIRGenerator::atomic_cmpxchg(BasicType type, LIR_Opr addr, LIRItem& cmp_
|
||||
LIR_Opr t2 = FrameMap::G3_opr;
|
||||
cmp_value.load_item();
|
||||
new_value.load_item();
|
||||
if (type == T_OBJECT || type == T_ARRAY) {
|
||||
if (is_reference_type(type)) {
|
||||
__ cas_obj(addr->as_address_ptr()->base(), cmp_value.result(), new_value.result(), t1, t2);
|
||||
} else if (type == T_INT) {
|
||||
__ cas_int(addr->as_address_ptr()->base(), cmp_value.result(), new_value.result(), t1, t2);
|
||||
@ -583,7 +583,7 @@ LIR_Opr LIRGenerator::atomic_cmpxchg(BasicType type, LIR_Opr addr, LIRItem& cmp_
|
||||
}
|
||||
|
||||
LIR_Opr LIRGenerator::atomic_xchg(BasicType type, LIR_Opr addr, LIRItem& value) {
|
||||
bool is_obj = type == T_OBJECT || type == T_ARRAY;
|
||||
bool is_obj = is_reference_type(type);
|
||||
LIR_Opr result = new_register(type);
|
||||
LIR_Opr tmp = LIR_OprFact::illegalOpr;
|
||||
|
||||
|
@ -450,7 +450,7 @@ void G1BarrierSetAssembler::oop_store_at(MacroAssembler* masm, DecoratorSet deco
|
||||
|
||||
void G1BarrierSetAssembler::load_at(MacroAssembler* masm, DecoratorSet decorators, BasicType type,
|
||||
Address src, Register dst, Register tmp) {
|
||||
bool on_oop = type == T_OBJECT || type == T_ARRAY;
|
||||
bool on_oop = is_reference_type(type);
|
||||
bool on_weak = (decorators & ON_WEAK_OOP_REF) != 0;
|
||||
bool on_phantom = (decorators & ON_PHANTOM_OOP_REF) != 0;
|
||||
bool on_reference = on_weak || on_phantom;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -58,7 +58,7 @@ void ModRefBarrierSetAssembler::arraycopy_epilogue(MacroAssembler* masm, Decorat
|
||||
|
||||
void ModRefBarrierSetAssembler::store_at(MacroAssembler* masm, DecoratorSet decorators, BasicType type,
|
||||
Register val, Address dst, Register tmp) {
|
||||
if (type == T_OBJECT || type == T_ARRAY) {
|
||||
if (is_reference_type(type)) {
|
||||
oop_store_at(masm, decorators, type, val, dst, tmp);
|
||||
} else {
|
||||
BarrierSetAssembler::store_at(masm, decorators, type, val, dst, tmp);
|
||||
|
@ -561,7 +561,7 @@ void AdapterGenerator::gen_c2i_adapter(
|
||||
|
||||
if (r_1->is_Register()) {
|
||||
Register r = r_1->as_Register()->after_restore();
|
||||
if (sig_bt[i] == T_OBJECT || sig_bt[i] == T_ARRAY) {
|
||||
if (is_reference_type(sig_bt[i])) {
|
||||
store_c2i_object(r, base, st_off);
|
||||
} else if (sig_bt[i] == T_LONG || sig_bt[i] == T_DOUBLE) {
|
||||
store_c2i_long(r, base, st_off, r_2->is_stack());
|
||||
@ -1637,8 +1637,7 @@ static void verify_oop_args(MacroAssembler* masm,
|
||||
Register temp_reg = G5_method; // not part of any compiled calling seq
|
||||
if (VerifyOops) {
|
||||
for (int i = 0; i < method->size_of_parameters(); i++) {
|
||||
if (sig_bt[i] == T_OBJECT ||
|
||||
sig_bt[i] == T_ARRAY) {
|
||||
if (is_reference_type(sig_bt[i])) {
|
||||
VMReg r = regs[i].first();
|
||||
assert(r->is_valid(), "bad oop arg");
|
||||
if (r->is_stack()) {
|
||||
@ -2507,7 +2506,7 @@ nmethod* SharedRuntime::generate_native_wrapper(MacroAssembler* masm,
|
||||
__ reset_last_Java_frame();
|
||||
|
||||
// Unbox oop result, e.g. JNIHandles::resolve value in I0.
|
||||
if (ret_type == T_OBJECT || ret_type == T_ARRAY) {
|
||||
if (is_reference_type(ret_type)) {
|
||||
__ resolve_jobject(I0, G3_scratch);
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -50,7 +50,7 @@ LIR_Opr FrameMap::map_to_opr(BasicType type, VMRegPair* reg, bool) {
|
||||
#else
|
||||
opr = as_long_opr(reg2, reg);
|
||||
#endif // _LP64
|
||||
} else if (type == T_OBJECT || type == T_ARRAY) {
|
||||
} else if (is_reference_type(type)) {
|
||||
opr = as_oop_opr(reg);
|
||||
} else if (type == T_METADATA) {
|
||||
opr = as_metadata_opr(reg);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -861,7 +861,7 @@ void LIR_Assembler::reg2reg(LIR_Opr src, LIR_Opr dest) {
|
||||
|
||||
} else if (dest->is_double_cpu()) {
|
||||
#ifdef _LP64
|
||||
if (src->type() == T_OBJECT || src->type() == T_ARRAY) {
|
||||
if (is_reference_type(src->type())) {
|
||||
// Surprising to me but we can see move of a long to t_object
|
||||
__ verify_oop(src->as_register());
|
||||
move_regs(src->as_register(), dest->as_register_lo());
|
||||
@ -932,7 +932,7 @@ void LIR_Assembler::reg2stack(LIR_Opr src, LIR_Opr dest, BasicType type, bool po
|
||||
|
||||
if (src->is_single_cpu()) {
|
||||
Address dst = frame_map()->address_for_slot(dest->single_stack_ix());
|
||||
if (type == T_OBJECT || type == T_ARRAY) {
|
||||
if (is_reference_type(type)) {
|
||||
__ verify_oop(src->as_register());
|
||||
__ movptr (dst, src->as_register());
|
||||
} else if (type == T_METADATA) {
|
||||
@ -978,7 +978,7 @@ void LIR_Assembler::reg2mem(LIR_Opr src, LIR_Opr dest, BasicType type, LIR_Patch
|
||||
PatchingStub* patch = NULL;
|
||||
Register compressed_src = rscratch1;
|
||||
|
||||
if (type == T_ARRAY || type == T_OBJECT) {
|
||||
if (is_reference_type(type)) {
|
||||
__ verify_oop(src->as_register());
|
||||
#ifdef _LP64
|
||||
if (UseCompressedOops && !wide) {
|
||||
@ -1113,7 +1113,7 @@ void LIR_Assembler::stack2reg(LIR_Opr src, LIR_Opr dest, BasicType type) {
|
||||
assert(dest->is_register(), "should not call otherwise");
|
||||
|
||||
if (dest->is_single_cpu()) {
|
||||
if (type == T_ARRAY || type == T_OBJECT) {
|
||||
if (is_reference_type(type)) {
|
||||
__ movptr(dest->as_register(), frame_map()->address_for_slot(src->single_stack_ix()));
|
||||
__ verify_oop(dest->as_register());
|
||||
} else if (type == T_METADATA) {
|
||||
@ -1154,7 +1154,7 @@ void LIR_Assembler::stack2reg(LIR_Opr src, LIR_Opr dest, BasicType type) {
|
||||
|
||||
void LIR_Assembler::stack2stack(LIR_Opr src, LIR_Opr dest, BasicType type) {
|
||||
if (src->is_single_stack()) {
|
||||
if (type == T_OBJECT || type == T_ARRAY) {
|
||||
if (is_reference_type(type)) {
|
||||
__ pushptr(frame_map()->address_for_slot(src ->single_stack_ix()));
|
||||
__ popptr (frame_map()->address_for_slot(dest->single_stack_ix()));
|
||||
} else {
|
||||
@ -1355,7 +1355,7 @@ void LIR_Assembler::mem2reg(LIR_Opr src, LIR_Opr dest, BasicType type, LIR_Patch
|
||||
patching_epilog(patch, patch_code, addr->base()->as_register(), info);
|
||||
}
|
||||
|
||||
if (type == T_ARRAY || type == T_OBJECT) {
|
||||
if (is_reference_type(type)) {
|
||||
#ifdef _LP64
|
||||
if (UseCompressedOops && !wide) {
|
||||
__ decode_heap_oop(dest->as_register());
|
||||
@ -1593,8 +1593,8 @@ void LIR_Assembler::emit_alloc_array(LIR_OpAllocArray* op) {
|
||||
LP64_ONLY( __ movslq(len, len); )
|
||||
|
||||
if (UseSlowPath ||
|
||||
(!UseFastNewObjectArray && (op->type() == T_OBJECT || op->type() == T_ARRAY)) ||
|
||||
(!UseFastNewTypeArray && (op->type() != T_OBJECT && op->type() != T_ARRAY))) {
|
||||
(!UseFastNewObjectArray && is_reference_type(op->type())) ||
|
||||
(!UseFastNewTypeArray && !is_reference_type(op->type()))) {
|
||||
__ jmp(*op->stub()->entry());
|
||||
} else {
|
||||
Register tmp1 = op->tmp1()->as_register();
|
||||
@ -2510,7 +2510,7 @@ void LIR_Assembler::logic_op(LIR_Code code, LIR_Opr left, LIR_Opr right, LIR_Opr
|
||||
} else {
|
||||
#ifdef _LP64
|
||||
Register r_lo;
|
||||
if (right->type() == T_OBJECT || right->type() == T_ARRAY) {
|
||||
if (is_reference_type(right->type())) {
|
||||
r_lo = right->as_register();
|
||||
} else {
|
||||
r_lo = right->as_register_lo();
|
||||
@ -2623,15 +2623,15 @@ void LIR_Assembler::comp_op(LIR_Condition condition, LIR_Opr opr1, LIR_Opr opr2,
|
||||
Register reg1 = opr1->as_register();
|
||||
if (opr2->is_single_cpu()) {
|
||||
// cpu register - cpu register
|
||||
if (opr1->type() == T_OBJECT || opr1->type() == T_ARRAY) {
|
||||
if (is_reference_type(opr1->type())) {
|
||||
__ cmpoop(reg1, opr2->as_register());
|
||||
} else {
|
||||
assert(opr2->type() != T_OBJECT && opr2->type() != T_ARRAY, "cmp int, oop?");
|
||||
assert(!is_reference_type(opr2->type()), "cmp int, oop?");
|
||||
__ cmpl(reg1, opr2->as_register());
|
||||
}
|
||||
} else if (opr2->is_stack()) {
|
||||
// cpu register - stack
|
||||
if (opr1->type() == T_OBJECT || opr1->type() == T_ARRAY) {
|
||||
if (is_reference_type(opr1->type())) {
|
||||
__ cmpoop(reg1, frame_map()->address_for_slot(opr2->single_stack_ix()));
|
||||
} else {
|
||||
__ cmpl(reg1, frame_map()->address_for_slot(opr2->single_stack_ix()));
|
||||
@ -2641,7 +2641,7 @@ void LIR_Assembler::comp_op(LIR_Condition condition, LIR_Opr opr1, LIR_Opr opr2,
|
||||
LIR_Const* c = opr2->as_constant_ptr();
|
||||
if (c->type() == T_INT) {
|
||||
__ cmpl(reg1, c->as_jint());
|
||||
} else if (c->type() == T_OBJECT || c->type() == T_ARRAY) {
|
||||
} else if (is_reference_type(c->type())) {
|
||||
// In 64bit oops are single register
|
||||
jobject o = c->as_jobject();
|
||||
if (o == NULL) {
|
||||
@ -2741,7 +2741,7 @@ void LIR_Assembler::comp_op(LIR_Condition condition, LIR_Opr opr1, LIR_Opr opr2,
|
||||
} else if (opr1->is_address() && opr2->is_constant()) {
|
||||
LIR_Const* c = opr2->as_constant_ptr();
|
||||
#ifdef _LP64
|
||||
if (c->type() == T_OBJECT || c->type() == T_ARRAY) {
|
||||
if (is_reference_type(c->type())) {
|
||||
assert(condition == lir_cond_equal || condition == lir_cond_notEqual, "need to reverse");
|
||||
__ movoop(rscratch1, c->as_jobject());
|
||||
}
|
||||
@ -2753,7 +2753,7 @@ void LIR_Assembler::comp_op(LIR_Condition condition, LIR_Opr opr1, LIR_Opr opr2,
|
||||
LIR_Address* addr = opr1->as_address_ptr();
|
||||
if (c->type() == T_INT) {
|
||||
__ cmpl(as_Address(addr), c->as_jint());
|
||||
} else if (c->type() == T_OBJECT || c->type() == T_ARRAY) {
|
||||
} else if (is_reference_type(c->type())) {
|
||||
#ifdef _LP64
|
||||
// %%% Make this explode if addr isn't reachable until we figure out a
|
||||
// better strategy by giving noreg as the temp for as_Address
|
||||
@ -3052,7 +3052,7 @@ void LIR_Assembler::emit_arraycopy(LIR_OpArrayCopy* op) {
|
||||
CodeStub* stub = op->stub();
|
||||
int flags = op->flags();
|
||||
BasicType basic_type = default_type != NULL ? default_type->element_type()->basic_type() : T_ILLEGAL;
|
||||
if (basic_type == T_ARRAY) basic_type = T_OBJECT;
|
||||
if (is_reference_type(basic_type)) basic_type = T_OBJECT;
|
||||
|
||||
// if we don't know anything, just go through the generic arraycopy
|
||||
if (default_type == NULL) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -671,7 +671,7 @@ void LIRGenerator::do_CompareOp(CompareOp* x) {
|
||||
|
||||
LIR_Opr LIRGenerator::atomic_cmpxchg(BasicType type, LIR_Opr addr, LIRItem& cmp_value, LIRItem& new_value) {
|
||||
LIR_Opr ill = LIR_OprFact::illegalOpr; // for convenience
|
||||
if (type == T_OBJECT || type == T_ARRAY) {
|
||||
if (is_reference_type(type)) {
|
||||
cmp_value.load_item_force(FrameMap::rax_oop_opr);
|
||||
new_value.load_item();
|
||||
__ cas_obj(addr->as_address_ptr()->base(), cmp_value.result(), new_value.result(), ill, ill);
|
||||
@ -693,7 +693,7 @@ LIR_Opr LIRGenerator::atomic_cmpxchg(BasicType type, LIR_Opr addr, LIRItem& cmp_
|
||||
}
|
||||
|
||||
LIR_Opr LIRGenerator::atomic_xchg(BasicType type, LIR_Opr addr, LIRItem& value) {
|
||||
bool is_oop = type == T_OBJECT || type == T_ARRAY;
|
||||
bool is_oop = is_reference_type(type);
|
||||
LIR_Opr result = new_register(type);
|
||||
value.load_item();
|
||||
// Because we want a 2-arg form of xchg and xadd
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -118,7 +118,7 @@ void G1BarrierSetAssembler::gen_write_ref_array_post_barrier(MacroAssembler* mas
|
||||
|
||||
void G1BarrierSetAssembler::load_at(MacroAssembler* masm, DecoratorSet decorators, BasicType type,
|
||||
Register dst, Address src, Register tmp1, Register tmp_thread) {
|
||||
bool on_oop = type == T_OBJECT || type == T_ARRAY;
|
||||
bool on_oop = is_reference_type(type);
|
||||
bool on_weak = (decorators & ON_WEAK_OOP_REF) != 0;
|
||||
bool on_phantom = (decorators & ON_PHANTOM_OOP_REF) != 0;
|
||||
bool on_reference = on_weak || on_phantom;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -34,7 +34,7 @@ void ModRefBarrierSetAssembler::arraycopy_prologue(MacroAssembler* masm, Decorat
|
||||
bool disjoint = (decorators & ARRAYCOPY_DISJOINT) != 0;
|
||||
bool obj_int = type == T_OBJECT LP64_ONLY(&& UseCompressedOops);
|
||||
|
||||
if (type == T_OBJECT || type == T_ARRAY) {
|
||||
if (is_reference_type(type)) {
|
||||
#ifdef _LP64
|
||||
if (!checkcast) {
|
||||
if (!obj_int) {
|
||||
@ -61,7 +61,7 @@ void ModRefBarrierSetAssembler::arraycopy_epilogue(MacroAssembler* masm, Decorat
|
||||
bool obj_int = type == T_OBJECT LP64_ONLY(&& UseCompressedOops);
|
||||
Register tmp = rax;
|
||||
|
||||
if (type == T_OBJECT || type == T_ARRAY) {
|
||||
if (is_reference_type(type)) {
|
||||
#ifdef _LP64
|
||||
if (!checkcast) {
|
||||
if (!obj_int) {
|
||||
@ -85,7 +85,7 @@ void ModRefBarrierSetAssembler::arraycopy_epilogue(MacroAssembler* masm, Decorat
|
||||
|
||||
void ModRefBarrierSetAssembler::store_at(MacroAssembler* masm, DecoratorSet decorators, BasicType type,
|
||||
Address dst, Register val, Register tmp1, Register tmp2) {
|
||||
if (type == T_OBJECT || type == T_ARRAY) {
|
||||
if (is_reference_type(type)) {
|
||||
oop_store_at(masm, decorators, type, dst, val, tmp1, tmp2);
|
||||
} else {
|
||||
BarrierSetAssembler::store_at(masm, decorators, type, dst, val, tmp1, tmp2);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2018, Red Hat, Inc. All rights reserved.
|
||||
* Copyright (c) 2018, 2019, Red Hat, Inc. All rights reserved.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
@ -106,7 +106,7 @@ LIR_Opr ShenandoahBarrierSetC1::atomic_xchg_at_resolved(LIRAccess& access, LIRIt
|
||||
// Because we want a 2-arg form of xchg and xadd
|
||||
__ move(value_opr, result);
|
||||
|
||||
assert(type == T_INT || type == T_OBJECT || type == T_ARRAY LP64_ONLY( || type == T_LONG ), "unexpected type");
|
||||
assert(type == T_INT || is_reference_type(type) LP64_ONLY( || type == T_LONG ), "unexpected type");
|
||||
__ xchg(access.resolved_addr(), result, result, LIR_OprFact::illegalOpr);
|
||||
|
||||
if (access.is_oop()) {
|
||||
|
@ -49,7 +49,7 @@ void ShenandoahBarrierSetAssembler::arraycopy_prologue(MacroAssembler* masm, Dec
|
||||
|
||||
bool dest_uninitialized = (decorators & IS_DEST_UNINITIALIZED) != 0;
|
||||
|
||||
if (type == T_OBJECT || type == T_ARRAY) {
|
||||
if (is_reference_type(type)) {
|
||||
|
||||
if ((ShenandoahSATBBarrier && !dest_uninitialized) || ShenandoahLoadRefBarrier) {
|
||||
#ifdef _LP64
|
||||
@ -461,22 +461,18 @@ void ShenandoahBarrierSetAssembler::load_reference_barrier(MacroAssembler* masm,
|
||||
|
||||
void ShenandoahBarrierSetAssembler::load_at(MacroAssembler* masm, DecoratorSet decorators, BasicType type,
|
||||
Register dst, Address src, Register tmp1, Register tmp_thread) {
|
||||
bool on_oop = type == T_OBJECT || type == T_ARRAY;
|
||||
bool on_oop = is_reference_type(type);
|
||||
bool on_weak = (decorators & ON_WEAK_OOP_REF) != 0;
|
||||
bool on_phantom = (decorators & ON_PHANTOM_OOP_REF) != 0;
|
||||
bool not_in_heap = (decorators & IN_NATIVE) != 0;
|
||||
bool on_reference = on_weak || on_phantom;
|
||||
bool keep_alive = (decorators & AS_NO_KEEPALIVE) == 0;
|
||||
bool is_traversal_mode = ShenandoahHeap::heap()->is_traversal_mode();
|
||||
bool keep_alive = ((decorators & AS_NO_KEEPALIVE) == 0) || is_traversal_mode;
|
||||
|
||||
BarrierSetAssembler::load_at(masm, decorators, type, dst, src, tmp1, tmp_thread);
|
||||
if (on_oop) {
|
||||
if (not_in_heap) {
|
||||
if (ShenandoahHeap::heap()->is_traversal_mode()) {
|
||||
load_reference_barrier(masm, dst);
|
||||
keep_alive = true;
|
||||
} else {
|
||||
load_reference_barrier_native(masm, dst);
|
||||
}
|
||||
if (not_in_heap && !is_traversal_mode) {
|
||||
load_reference_barrier_native(masm, dst);
|
||||
} else {
|
||||
load_reference_barrier(masm, dst);
|
||||
}
|
||||
@ -501,7 +497,7 @@ void ShenandoahBarrierSetAssembler::load_at(MacroAssembler* masm, DecoratorSet d
|
||||
void ShenandoahBarrierSetAssembler::store_at(MacroAssembler* masm, DecoratorSet decorators, BasicType type,
|
||||
Address dst, Register val, Register tmp1, Register tmp2) {
|
||||
|
||||
bool on_oop = type == T_OBJECT || type == T_ARRAY;
|
||||
bool on_oop = is_reference_type(type);
|
||||
bool in_heap = (decorators & IN_HEAP) != 0;
|
||||
bool as_normal = (decorators & AS_NORMAL) != 0;
|
||||
if (on_oop && in_heap) {
|
||||
|
@ -198,7 +198,7 @@ void ZBarrierSetAssembler::store_at(MacroAssembler* masm,
|
||||
BLOCK_COMMENT("ZBarrierSetAssembler::store_at {");
|
||||
|
||||
// Verify oop store
|
||||
if (type == T_OBJECT || type == T_ARRAY) {
|
||||
if (is_reference_type(type)) {
|
||||
// Note that src could be noreg, which means we
|
||||
// are storing null and can skip verification.
|
||||
if (src != noreg) {
|
||||
|
@ -135,26 +135,6 @@
|
||||
// * 63-48 Fixed (16-bits, always zero)
|
||||
//
|
||||
|
||||
uintptr_t ZPlatformAddressSpaceStart() {
|
||||
const uintptr_t first_heap_view_address = (uintptr_t)1 << (ZPlatformAddressMetadataShift() + 0);
|
||||
const size_t min_address_offset = 0;
|
||||
return first_heap_view_address + min_address_offset;
|
||||
}
|
||||
|
||||
uintptr_t ZPlatformAddressSpaceEnd() {
|
||||
const uintptr_t last_heap_view_address = (uintptr_t)1 << (ZPlatformAddressMetadataShift() + 2);
|
||||
const size_t max_address_offset = (size_t)1 << ZPlatformAddressOffsetBits();
|
||||
return last_heap_view_address + max_address_offset;
|
||||
}
|
||||
|
||||
uintptr_t ZPlatformAddressReservedStart() {
|
||||
return ZPlatformAddressSpaceStart();
|
||||
}
|
||||
|
||||
uintptr_t ZPlatformAddressReservedEnd() {
|
||||
return ZPlatformAddressSpaceEnd();
|
||||
}
|
||||
|
||||
uintptr_t ZPlatformAddressBase() {
|
||||
return 0;
|
||||
}
|
||||
|
@ -40,10 +40,6 @@ const size_t ZPlatformMaxHeapSizeShift = 46; // 16TB
|
||||
const size_t ZPlatformNMethodDisarmedOffset = 4;
|
||||
const size_t ZPlatformCacheLineSize = 64;
|
||||
|
||||
uintptr_t ZPlatformAddressSpaceStart();
|
||||
uintptr_t ZPlatformAddressSpaceEnd();
|
||||
uintptr_t ZPlatformAddressReservedStart();
|
||||
uintptr_t ZPlatformAddressReservedEnd();
|
||||
uintptr_t ZPlatformAddressBase();
|
||||
size_t ZPlatformAddressOffsetBits();
|
||||
size_t ZPlatformAddressMetadataShift();
|
||||
|
@ -1416,8 +1416,7 @@ static void verify_oop_args(MacroAssembler* masm,
|
||||
Register temp_reg = rbx; // not part of any compiled calling seq
|
||||
if (VerifyOops) {
|
||||
for (int i = 0; i < method->size_of_parameters(); i++) {
|
||||
if (sig_bt[i] == T_OBJECT ||
|
||||
sig_bt[i] == T_ARRAY) {
|
||||
if (is_reference_type(sig_bt[i])) {
|
||||
VMReg r = regs[i].first();
|
||||
assert(r->is_valid(), "bad oop arg");
|
||||
if (r->is_stack()) {
|
||||
@ -2218,7 +2217,7 @@ nmethod* SharedRuntime::generate_native_wrapper(MacroAssembler* masm,
|
||||
__ reset_last_Java_frame(thread, false);
|
||||
|
||||
// Unbox oop result, e.g. JNIHandles::resolve value.
|
||||
if (ret_type == T_OBJECT || ret_type == T_ARRAY) {
|
||||
if (is_reference_type(ret_type)) {
|
||||
__ resolve_jobject(rax /* value */,
|
||||
thread /* thread */,
|
||||
rcx /* tmp */);
|
||||
|
@ -1816,8 +1816,7 @@ static void verify_oop_args(MacroAssembler* masm,
|
||||
Register temp_reg = rbx; // not part of any compiled calling seq
|
||||
if (VerifyOops) {
|
||||
for (int i = 0; i < method->size_of_parameters(); i++) {
|
||||
if (sig_bt[i] == T_OBJECT ||
|
||||
sig_bt[i] == T_ARRAY) {
|
||||
if (is_reference_type(sig_bt[i])) {
|
||||
VMReg r = regs[i].first();
|
||||
assert(r->is_valid(), "bad oop arg");
|
||||
if (r->is_stack()) {
|
||||
@ -2717,7 +2716,7 @@ nmethod* SharedRuntime::generate_native_wrapper(MacroAssembler* masm,
|
||||
__ reset_last_Java_frame(false);
|
||||
|
||||
// Unbox oop result, e.g. JNIHandles::resolve value.
|
||||
if (ret_type == T_OBJECT || ret_type == T_ARRAY) {
|
||||
if (is_reference_type(ret_type)) {
|
||||
__ resolve_jobject(rax /* value */,
|
||||
r15_thread /* thread */,
|
||||
rcx /* tmp */);
|
||||
|
@ -445,9 +445,6 @@ CPUPerformanceInterface::CPUPerformance::CPUPerformance() {
|
||||
bool CPUPerformanceInterface::CPUPerformance::initialize() {
|
||||
size_t array_entry_count = _counters.nProcs + 1;
|
||||
_counters.cpus = NEW_C_HEAP_ARRAY(CPUPerfTicks, array_entry_count, mtInternal);
|
||||
if (NULL == _counters.cpus) {
|
||||
return false;
|
||||
}
|
||||
memset(_counters.cpus, 0, array_entry_count * sizeof(*_counters.cpus));
|
||||
|
||||
// For the CPU load total
|
||||
@ -535,7 +532,7 @@ CPUPerformanceInterface::CPUPerformanceInterface() {
|
||||
|
||||
bool CPUPerformanceInterface::initialize() {
|
||||
_impl = new CPUPerformanceInterface::CPUPerformance();
|
||||
return NULL == _impl ? false : _impl->initialize();
|
||||
return _impl->initialize();
|
||||
}
|
||||
|
||||
CPUPerformanceInterface::~CPUPerformanceInterface() {
|
||||
@ -688,19 +685,17 @@ char* SystemProcessInterface::SystemProcesses::ProcessIterator::get_cmdline() {
|
||||
}
|
||||
if (size > 0) {
|
||||
cmdline = NEW_C_HEAP_ARRAY(char, size + 1, mtInternal);
|
||||
if (cmdline != NULL) {
|
||||
cmdline[0] = '\0';
|
||||
if (fseek(fp, 0, SEEK_SET) == 0) {
|
||||
if (fread(cmdline, 1, size, fp) == size) {
|
||||
// the file has the arguments separated by '\0',
|
||||
// so we translate '\0' to ' '
|
||||
for (size_t i = 0; i < size; i++) {
|
||||
if (cmdline[i] == '\0') {
|
||||
cmdline[i] = ' ';
|
||||
}
|
||||
cmdline[0] = '\0';
|
||||
if (fseek(fp, 0, SEEK_SET) == 0) {
|
||||
if (fread(cmdline, 1, size, fp) == size) {
|
||||
// the file has the arguments separated by '\0',
|
||||
// so we translate '\0' to ' '
|
||||
for (size_t i = 0; i < size; i++) {
|
||||
if (cmdline[i] == '\0') {
|
||||
cmdline[i] = ' ';
|
||||
}
|
||||
cmdline[size] = '\0';
|
||||
}
|
||||
cmdline[size] = '\0';
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -790,7 +785,7 @@ SystemProcessInterface::SystemProcesses::SystemProcesses() {
|
||||
|
||||
bool SystemProcessInterface::SystemProcesses::initialize() {
|
||||
_iterator = new SystemProcessInterface::SystemProcesses::ProcessIterator();
|
||||
return NULL == _iterator ? false : _iterator->initialize();
|
||||
return _iterator->initialize();
|
||||
}
|
||||
|
||||
SystemProcessInterface::SystemProcesses::~SystemProcesses() {
|
||||
@ -837,7 +832,7 @@ SystemProcessInterface::SystemProcessInterface() {
|
||||
|
||||
bool SystemProcessInterface::initialize() {
|
||||
_impl = new SystemProcessInterface::SystemProcesses();
|
||||
return NULL == _impl ? false : _impl->initialize();
|
||||
return _impl->initialize();
|
||||
}
|
||||
|
||||
SystemProcessInterface::~SystemProcessInterface() {
|
||||
@ -852,15 +847,11 @@ CPUInformationInterface::CPUInformationInterface() {
|
||||
|
||||
bool CPUInformationInterface::initialize() {
|
||||
_cpu_info = new CPUInformation();
|
||||
if (NULL == _cpu_info) {
|
||||
return false;
|
||||
}
|
||||
_cpu_info->set_number_of_hardware_threads(VM_Version_Ext::number_of_threads());
|
||||
_cpu_info->set_number_of_cores(VM_Version_Ext::number_of_cores());
|
||||
_cpu_info->set_number_of_sockets(VM_Version_Ext::number_of_sockets());
|
||||
_cpu_info->set_cpu_name(VM_Version_Ext::cpu_name());
|
||||
_cpu_info->set_cpu_description(VM_Version_Ext::cpu_description());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -928,7 +919,7 @@ NetworkPerformanceInterface::~NetworkPerformanceInterface() {
|
||||
|
||||
bool NetworkPerformanceInterface::initialize() {
|
||||
_impl = new NetworkPerformanceInterface::NetworkPerformance();
|
||||
return _impl != NULL && _impl->initialize();
|
||||
return _impl->initialize();
|
||||
}
|
||||
|
||||
int NetworkPerformanceInterface::network_utilization(NetworkInterface** network_interfaces) const {
|
||||
|
@ -136,8 +136,6 @@ static int clock_tics_per_sec = 100;
|
||||
static sigset_t check_signal_done;
|
||||
static bool check_signals = true;
|
||||
|
||||
static pid_t _initial_pid = 0;
|
||||
|
||||
// Signal number used to suspend/resume a thread
|
||||
|
||||
// do not use any signal number less than SIGSEGV, see 4355769
|
||||
@ -1124,24 +1122,7 @@ intx os::current_thread_id() {
|
||||
}
|
||||
|
||||
int os::current_process_id() {
|
||||
|
||||
// Under the old bsd thread library, bsd gives each thread
|
||||
// its own process id. Because of this each thread will return
|
||||
// a different pid if this method were to return the result
|
||||
// of getpid(2). Bsd provides no api that returns the pid
|
||||
// of the launcher thread for the vm. This implementation
|
||||
// returns a unique pid, the pid of the launcher thread
|
||||
// that starts the vm 'process'.
|
||||
|
||||
// Under the NPTL, getpid() returns the same pid as the
|
||||
// launcher thread rather than a unique pid per thread.
|
||||
// Use gettid() if you want the old pre NPTL behaviour.
|
||||
|
||||
// if you are looking for the result of a call to getpid() that
|
||||
// returns a unique pid for the calling thread, then look at the
|
||||
// OSThread::thread_id() method in osThread_bsd.hpp file
|
||||
|
||||
return (int)(_initial_pid ? _initial_pid : getpid());
|
||||
return (int)(getpid());
|
||||
}
|
||||
|
||||
// DLL functions
|
||||
@ -3087,16 +3068,6 @@ extern void report_error(char* file_name, int line_no, char* title,
|
||||
void os::init(void) {
|
||||
char dummy; // used to get a guess on initial stack address
|
||||
|
||||
// With BsdThreads the JavaMain thread pid (primordial thread)
|
||||
// is different than the pid of the java launcher thread.
|
||||
// So, on Bsd, the launcher thread pid is passed to the VM
|
||||
// via the sun.java.launcher.pid property.
|
||||
// Use this property instead of getpid() if it was correctly passed.
|
||||
// See bug 6351349.
|
||||
pid_t java_launcher_pid = (pid_t) Arguments::sun_java_launcher_pid();
|
||||
|
||||
_initial_pid = (java_launcher_pid > 0) ? java_launcher_pid : getpid();
|
||||
|
||||
clock_tics_per_sec = CLK_TCK;
|
||||
|
||||
init_random(1234567);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -234,7 +234,7 @@ CPUPerformanceInterface::CPUPerformanceInterface() {
|
||||
|
||||
bool CPUPerformanceInterface::initialize() {
|
||||
_impl = new CPUPerformanceInterface::CPUPerformance();
|
||||
return _impl != NULL && _impl->initialize();
|
||||
return _impl->initialize();
|
||||
}
|
||||
|
||||
CPUPerformanceInterface::~CPUPerformanceInterface() {
|
||||
@ -355,7 +355,7 @@ SystemProcessInterface::SystemProcessInterface() {
|
||||
|
||||
bool SystemProcessInterface::initialize() {
|
||||
_impl = new SystemProcessInterface::SystemProcesses();
|
||||
return _impl != NULL && _impl->initialize();
|
||||
return _impl->initialize();
|
||||
}
|
||||
|
||||
SystemProcessInterface::~SystemProcessInterface() {
|
||||
@ -370,16 +370,11 @@ CPUInformationInterface::CPUInformationInterface() {
|
||||
|
||||
bool CPUInformationInterface::initialize() {
|
||||
_cpu_info = new CPUInformation();
|
||||
|
||||
if (NULL == _cpu_info) {
|
||||
return false;
|
||||
}
|
||||
_cpu_info->set_number_of_hardware_threads(VM_Version_Ext::number_of_threads());
|
||||
_cpu_info->set_number_of_cores(VM_Version_Ext::number_of_cores());
|
||||
_cpu_info->set_number_of_sockets(VM_Version_Ext::number_of_sockets());
|
||||
_cpu_info->set_cpu_name(VM_Version_Ext::cpu_name());
|
||||
_cpu_info->set_cpu_description(VM_Version_Ext::cpu_description());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -483,7 +478,7 @@ NetworkPerformanceInterface::~NetworkPerformanceInterface() {
|
||||
|
||||
bool NetworkPerformanceInterface::initialize() {
|
||||
_impl = new NetworkPerformanceInterface::NetworkPerformance();
|
||||
return _impl != NULL && _impl->initialize();
|
||||
return _impl->initialize();
|
||||
}
|
||||
|
||||
int NetworkPerformanceInterface::network_utilization(NetworkInterface** network_interfaces) const {
|
||||
|
@ -505,9 +505,6 @@ CPUPerformanceInterface::CPUPerformance::CPUPerformance() {
|
||||
bool CPUPerformanceInterface::CPUPerformance::initialize() {
|
||||
size_t array_entry_count = _counters.nProcs + 1;
|
||||
_counters.cpus = NEW_C_HEAP_ARRAY(os::Linux::CPUPerfTicks, array_entry_count, mtInternal);
|
||||
if (NULL == _counters.cpus) {
|
||||
return false;
|
||||
}
|
||||
memset(_counters.cpus, 0, array_entry_count * sizeof(*_counters.cpus));
|
||||
|
||||
// For the CPU load total
|
||||
@ -595,7 +592,7 @@ CPUPerformanceInterface::CPUPerformanceInterface() {
|
||||
|
||||
bool CPUPerformanceInterface::initialize() {
|
||||
_impl = new CPUPerformanceInterface::CPUPerformance();
|
||||
return NULL == _impl ? false : _impl->initialize();
|
||||
return _impl->initialize();
|
||||
}
|
||||
|
||||
CPUPerformanceInterface::~CPUPerformanceInterface() {
|
||||
@ -748,19 +745,17 @@ char* SystemProcessInterface::SystemProcesses::ProcessIterator::get_cmdline() {
|
||||
}
|
||||
if (size > 0) {
|
||||
cmdline = NEW_C_HEAP_ARRAY(char, size + 1, mtInternal);
|
||||
if (cmdline != NULL) {
|
||||
cmdline[0] = '\0';
|
||||
if (fseek(fp, 0, SEEK_SET) == 0) {
|
||||
if (fread(cmdline, 1, size, fp) == size) {
|
||||
// the file has the arguments separated by '\0',
|
||||
// so we translate '\0' to ' '
|
||||
for (size_t i = 0; i < size; i++) {
|
||||
if (cmdline[i] == '\0') {
|
||||
cmdline[i] = ' ';
|
||||
}
|
||||
cmdline[0] = '\0';
|
||||
if (fseek(fp, 0, SEEK_SET) == 0) {
|
||||
if (fread(cmdline, 1, size, fp) == size) {
|
||||
// the file has the arguments separated by '\0',
|
||||
// so we translate '\0' to ' '
|
||||
for (size_t i = 0; i < size; i++) {
|
||||
if (cmdline[i] == '\0') {
|
||||
cmdline[i] = ' ';
|
||||
}
|
||||
cmdline[size] = '\0';
|
||||
}
|
||||
cmdline[size] = '\0';
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -854,7 +849,7 @@ SystemProcessInterface::SystemProcesses::SystemProcesses() {
|
||||
|
||||
bool SystemProcessInterface::SystemProcesses::initialize() {
|
||||
_iterator = new SystemProcessInterface::SystemProcesses::ProcessIterator();
|
||||
return NULL == _iterator ? false : _iterator->initialize();
|
||||
return _iterator->initialize();
|
||||
}
|
||||
|
||||
SystemProcessInterface::SystemProcesses::~SystemProcesses() {
|
||||
@ -901,7 +896,7 @@ SystemProcessInterface::SystemProcessInterface() {
|
||||
|
||||
bool SystemProcessInterface::initialize() {
|
||||
_impl = new SystemProcessInterface::SystemProcesses();
|
||||
return NULL == _impl ? false : _impl->initialize();
|
||||
return _impl->initialize();
|
||||
}
|
||||
|
||||
SystemProcessInterface::~SystemProcessInterface() {
|
||||
@ -916,15 +911,11 @@ CPUInformationInterface::CPUInformationInterface() {
|
||||
|
||||
bool CPUInformationInterface::initialize() {
|
||||
_cpu_info = new CPUInformation();
|
||||
if (NULL == _cpu_info) {
|
||||
return false;
|
||||
}
|
||||
_cpu_info->set_number_of_hardware_threads(VM_Version_Ext::number_of_threads());
|
||||
_cpu_info->set_number_of_cores(VM_Version_Ext::number_of_cores());
|
||||
_cpu_info->set_number_of_sockets(VM_Version_Ext::number_of_sockets());
|
||||
_cpu_info->set_cpu_name(VM_Version_Ext::cpu_name());
|
||||
_cpu_info->set_cpu_description(VM_Version_Ext::cpu_description());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -1038,7 +1029,7 @@ NetworkPerformanceInterface::~NetworkPerformanceInterface() {
|
||||
|
||||
bool NetworkPerformanceInterface::initialize() {
|
||||
_impl = new NetworkPerformanceInterface::NetworkPerformance();
|
||||
return _impl != NULL && _impl->initialize();
|
||||
return _impl->initialize();
|
||||
}
|
||||
|
||||
int NetworkPerformanceInterface::network_utilization(NetworkInterface** network_interfaces) const {
|
||||
|
81
src/hotspot/os/posix/gc/z/zVirtualMemory_posix.cpp
Normal file
81
src/hotspot/os/posix/gc/z/zVirtualMemory_posix.cpp
Normal file
@ -0,0 +1,81 @@
|
||||
/*
|
||||
* Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
#include "precompiled.hpp"
|
||||
#include "gc/z/zAddress.inline.hpp"
|
||||
#include "gc/z/zVirtualMemory.hpp"
|
||||
#include "logging/log.hpp"
|
||||
|
||||
#include <sys/mman.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
static void unmap(uintptr_t start, size_t size) {
|
||||
const int res = munmap((void*)start, size);
|
||||
assert(res == 0, "Failed to unmap memory");
|
||||
}
|
||||
|
||||
static bool map(uintptr_t start, size_t size) {
|
||||
const void* const res = mmap((void*)start, size, PROT_NONE, MAP_ANONYMOUS|MAP_PRIVATE|MAP_NORESERVE, -1, 0);
|
||||
if (res == MAP_FAILED) {
|
||||
// Failed to reserve memory
|
||||
return false;
|
||||
}
|
||||
|
||||
if ((uintptr_t)res != start) {
|
||||
// Failed to reserve memory at the requested address
|
||||
unmap(start, size);
|
||||
return false;
|
||||
}
|
||||
|
||||
// Success
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ZVirtualMemoryManager::reserve_platform(uintptr_t start, size_t size) {
|
||||
// Reserve address views
|
||||
const uintptr_t marked0 = ZAddress::marked0(start);
|
||||
const uintptr_t marked1 = ZAddress::marked1(start);
|
||||
const uintptr_t remapped = ZAddress::remapped(start);
|
||||
|
||||
if (!map(marked0, size)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!map(marked1, size)) {
|
||||
unmap(marked0, size);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!map(remapped, size)) {
|
||||
unmap(marked0, size);
|
||||
unmap(marked1, size);
|
||||
return false;
|
||||
}
|
||||
|
||||
// Register address views with native memory tracker
|
||||
nmt_reserve(marked0, size);
|
||||
nmt_reserve(marked1, size);
|
||||
nmt_reserve(remapped, size);
|
||||
|
||||
return true;
|
||||
}
|
@ -302,9 +302,6 @@ bool CPUPerformanceInterface::CPUPerformance::initialize() {
|
||||
// Data structure(s) for saving CPU load (one per CPU)
|
||||
size_t array_entry_count = _counters.nProcs;
|
||||
_counters.jvmTicks = NEW_C_HEAP_ARRAY(CPUPerfTicks, array_entry_count, mtInternal);
|
||||
if (NULL == _counters.jvmTicks) {
|
||||
return false;
|
||||
}
|
||||
memset(_counters.jvmTicks, 0, array_entry_count * sizeof(*_counters.jvmTicks));
|
||||
|
||||
// Get kstat cpu_stat counters for every CPU
|
||||
@ -432,7 +429,7 @@ CPUPerformanceInterface::CPUPerformanceInterface() {
|
||||
|
||||
bool CPUPerformanceInterface::initialize() {
|
||||
_impl = new CPUPerformanceInterface::CPUPerformance();
|
||||
return _impl != NULL && _impl->initialize();
|
||||
return _impl->initialize();
|
||||
}
|
||||
|
||||
CPUPerformanceInterface::~CPUPerformanceInterface(void) {
|
||||
@ -574,10 +571,8 @@ int SystemProcessInterface::SystemProcesses::ProcessIterator::current(SystemProc
|
||||
if (path_substring != NULL) {
|
||||
int len = path_substring - psinfo_data.pr_psargs;
|
||||
exe_path = NEW_C_HEAP_ARRAY(char, len+1, mtInternal);
|
||||
if (exe_path != NULL) {
|
||||
jio_snprintf(exe_path, len, "%s", psinfo_data.pr_psargs);
|
||||
exe_path[len] = '\0';
|
||||
}
|
||||
jio_snprintf(exe_path, len, "%s", psinfo_data.pr_psargs);
|
||||
exe_path[len] = '\0';
|
||||
}
|
||||
}
|
||||
|
||||
@ -642,7 +637,7 @@ SystemProcessInterface::SystemProcesses::SystemProcesses() {
|
||||
|
||||
bool SystemProcessInterface::SystemProcesses::initialize() {
|
||||
_iterator = new SystemProcessInterface::SystemProcesses::ProcessIterator();
|
||||
return _iterator != NULL && _iterator->initialize();
|
||||
return _iterator->initialize();
|
||||
}
|
||||
|
||||
SystemProcessInterface::SystemProcesses::~SystemProcesses() {
|
||||
@ -689,7 +684,7 @@ SystemProcessInterface::SystemProcessInterface() {
|
||||
|
||||
bool SystemProcessInterface::initialize() {
|
||||
_impl = new SystemProcessInterface::SystemProcesses();
|
||||
return _impl != NULL && _impl->initialize();
|
||||
return _impl->initialize();
|
||||
|
||||
}
|
||||
|
||||
@ -705,9 +700,6 @@ CPUInformationInterface::CPUInformationInterface() {
|
||||
|
||||
bool CPUInformationInterface::initialize() {
|
||||
_cpu_info = new CPUInformation();
|
||||
if (_cpu_info == NULL) {
|
||||
return false;
|
||||
}
|
||||
_cpu_info->set_number_of_hardware_threads(VM_Version_Ext::number_of_threads());
|
||||
_cpu_info->set_number_of_cores(VM_Version_Ext::number_of_cores());
|
||||
_cpu_info->set_number_of_sockets(VM_Version_Ext::number_of_sockets());
|
||||
@ -820,7 +812,7 @@ NetworkPerformanceInterface::~NetworkPerformanceInterface() {
|
||||
|
||||
bool NetworkPerformanceInterface::initialize() {
|
||||
_impl = new NetworkPerformanceInterface::NetworkPerformance();
|
||||
return _impl != NULL && _impl->initialize();
|
||||
return _impl->initialize();
|
||||
}
|
||||
|
||||
int NetworkPerformanceInterface::network_utilization(NetworkInterface** network_interfaces) const {
|
||||
|
@ -194,34 +194,27 @@ static int open_query(QueryP query) {
|
||||
return open_query(&query->query);
|
||||
}
|
||||
|
||||
static int allocate_counters(MultiCounterQueryP query, size_t nofCounters) {
|
||||
static void allocate_counters(MultiCounterQueryP query, size_t nofCounters) {
|
||||
assert(query != NULL, "invariant");
|
||||
assert(!query->initialized, "invariant");
|
||||
assert(0 == query->noOfCounters, "invariant");
|
||||
assert(query->counters == NULL, "invariant");
|
||||
query->counters = NEW_C_HEAP_ARRAY(HCOUNTER, nofCounters, mtInternal);
|
||||
if (query->counters == NULL) {
|
||||
return OS_ERR;
|
||||
}
|
||||
memset(query->counters, 0, nofCounters * sizeof(HCOUNTER));
|
||||
query->noOfCounters = (int)nofCounters;
|
||||
return OS_OK;
|
||||
}
|
||||
|
||||
static int allocate_counters(MultiCounterQuerySetP query_set, size_t nofCounters) {
|
||||
static void allocate_counters(MultiCounterQuerySetP query_set, size_t nofCounters) {
|
||||
assert(query_set != NULL, "invariant");
|
||||
assert(!query_set->initialized, "invariant");
|
||||
for (int i = 0; i < query_set->size; ++i) {
|
||||
if (allocate_counters(&query_set->queries[i], nofCounters) != OS_OK) {
|
||||
return OS_ERR;
|
||||
}
|
||||
allocate_counters(&query_set->queries[i], nofCounters);
|
||||
}
|
||||
return OS_OK;
|
||||
}
|
||||
|
||||
static int allocate_counters(ProcessQueryP process_query, size_t nofCounters) {
|
||||
static void allocate_counters(ProcessQueryP process_query, size_t nofCounters) {
|
||||
assert(process_query != NULL, "invariant");
|
||||
return allocate_counters(&process_query->set, nofCounters);
|
||||
allocate_counters(&process_query->set, nofCounters);
|
||||
}
|
||||
|
||||
static void deallocate_counters(MultiCounterQueryP query) {
|
||||
@ -600,7 +593,7 @@ static OSReturn lookup_name_by_index(DWORD index, char** p_string) {
|
||||
static const char* copy_string_to_c_heap(const char* string) {
|
||||
assert(string != NULL, "invariant");
|
||||
const size_t len = strlen(string);
|
||||
char* const cheap_allocated_string = NEW_C_HEAP_ARRAY(char, len + 1, mtInternal);
|
||||
char* const cheap_allocated_string = NEW_C_HEAP_ARRAY_RETURN_NULL(char, len + 1, mtInternal);
|
||||
if (NULL == cheap_allocated_string) {
|
||||
return NULL;
|
||||
}
|
||||
@ -849,9 +842,7 @@ static int initialize_cpu_query(MultiCounterQueryP cpu_query, DWORD pdh_counter_
|
||||
const int logical_cpu_count = number_of_logical_cpus();
|
||||
assert(logical_cpu_count >= os::processor_count(), "invariant");
|
||||
// we also add another counter for instance "_Total"
|
||||
if (allocate_counters(cpu_query, logical_cpu_count + 1) != OS_OK) {
|
||||
return OS_ERR;
|
||||
}
|
||||
allocate_counters(cpu_query, logical_cpu_count + 1);
|
||||
assert(cpu_query->noOfCounters == logical_cpu_count + 1, "invariant");
|
||||
return initialize_cpu_query_counters(cpu_query, pdh_counter_idx);
|
||||
}
|
||||
@ -1017,9 +1008,7 @@ bool CPUPerformanceInterface::CPUPerformance::initialize() {
|
||||
if (_process_cpu_load == NULL) {
|
||||
return true;
|
||||
}
|
||||
if (allocate_counters(_process_cpu_load, 2) != OS_OK) {
|
||||
return true;
|
||||
}
|
||||
allocate_counters(_process_cpu_load, 2);
|
||||
if (initialize_process_counter(_process_cpu_load, 0, PDH_PROCESSOR_TIME_IDX) != OS_OK) {
|
||||
return true;
|
||||
}
|
||||
@ -1057,7 +1046,7 @@ CPUPerformanceInterface::CPUPerformanceInterface() {
|
||||
|
||||
bool CPUPerformanceInterface::initialize() {
|
||||
_impl = new CPUPerformanceInterface::CPUPerformance();
|
||||
return _impl != NULL && _impl->initialize();
|
||||
return _impl->initialize();
|
||||
}
|
||||
|
||||
CPUPerformanceInterface::~CPUPerformanceInterface() {
|
||||
@ -1263,7 +1252,7 @@ SystemProcessInterface::SystemProcesses::SystemProcesses() {
|
||||
|
||||
bool SystemProcessInterface::SystemProcesses::initialize() {
|
||||
_iterator = new SystemProcessInterface::SystemProcesses::ProcessIterator();
|
||||
return _iterator != NULL && _iterator->initialize();
|
||||
return _iterator->initialize();
|
||||
}
|
||||
|
||||
SystemProcessInterface::SystemProcesses::~SystemProcesses() {
|
||||
@ -1318,7 +1307,7 @@ SystemProcessInterface::SystemProcessInterface() {
|
||||
|
||||
bool SystemProcessInterface::initialize() {
|
||||
_impl = new SystemProcessInterface::SystemProcesses();
|
||||
return _impl != NULL && _impl->initialize();
|
||||
return _impl->initialize();
|
||||
}
|
||||
|
||||
SystemProcessInterface::~SystemProcessInterface() {
|
||||
@ -1333,9 +1322,6 @@ CPUInformationInterface::CPUInformationInterface() {
|
||||
|
||||
bool CPUInformationInterface::initialize() {
|
||||
_cpu_info = new CPUInformation();
|
||||
if (NULL == _cpu_info) {
|
||||
return false;
|
||||
}
|
||||
_cpu_info->set_number_of_hardware_threads(VM_Version_Ext::number_of_threads());
|
||||
_cpu_info->set_number_of_cores(VM_Version_Ext::number_of_cores());
|
||||
_cpu_info->set_number_of_sockets(VM_Version_Ext::number_of_sockets());
|
||||
@ -1431,7 +1417,7 @@ NetworkPerformanceInterface::~NetworkPerformanceInterface() {
|
||||
|
||||
bool NetworkPerformanceInterface::initialize() {
|
||||
_impl = new NetworkPerformanceInterface::NetworkPerformance();
|
||||
return _impl != NULL && _impl->initialize();
|
||||
return _impl->initialize();
|
||||
}
|
||||
|
||||
int NetworkPerformanceInterface::network_utilization(NetworkInterface** network_interfaces) const {
|
||||
|
@ -224,18 +224,12 @@ void os::init_system_properties_values() {
|
||||
}
|
||||
|
||||
home_path = NEW_C_HEAP_ARRAY(char, strlen(home_dir) + 1, mtInternal);
|
||||
if (home_path == NULL) {
|
||||
return;
|
||||
}
|
||||
strcpy(home_path, home_dir);
|
||||
Arguments::set_java_home(home_path);
|
||||
FREE_C_HEAP_ARRAY(char, home_path);
|
||||
|
||||
dll_path = NEW_C_HEAP_ARRAY(char, strlen(home_dir) + strlen(bin) + 1,
|
||||
mtInternal);
|
||||
if (dll_path == NULL) {
|
||||
return;
|
||||
}
|
||||
strcpy(dll_path, home_dir);
|
||||
strcat(dll_path, bin);
|
||||
Arguments::set_dll_dir(dll_path);
|
||||
|
@ -401,9 +401,6 @@ void AOTCodeHeap::register_stubs() {
|
||||
int len = Bytes::get_Java_u2((address)stub_name);
|
||||
stub_name += 2;
|
||||
char* full_name = NEW_C_HEAP_ARRAY(char, len+5, mtCode);
|
||||
if (full_name == NULL) { // No memory?
|
||||
break;
|
||||
}
|
||||
memcpy(full_name, "AOT ", 4);
|
||||
memcpy(full_name+4, stub_name, len);
|
||||
full_name[len+4] = 0;
|
||||
|
@ -151,17 +151,15 @@ void AOTLoader::initialize() {
|
||||
if (AOTLibrary != NULL) {
|
||||
const int len = (int)strlen(AOTLibrary);
|
||||
char* cp = NEW_C_HEAP_ARRAY(char, len+1, mtCode);
|
||||
if (cp != NULL) { // No memory?
|
||||
memcpy(cp, AOTLibrary, len);
|
||||
cp[len] = '\0';
|
||||
char* end = cp + len;
|
||||
while (cp < end) {
|
||||
const char* name = cp;
|
||||
while ((*cp) != '\0' && (*cp) != '\n' && (*cp) != ',' && (*cp) != pathSep) cp++;
|
||||
cp[0] = '\0'; // Terminate name
|
||||
cp++;
|
||||
load_library(name, true);
|
||||
}
|
||||
memcpy(cp, AOTLibrary, len);
|
||||
cp[len] = '\0';
|
||||
char* end = cp + len;
|
||||
while (cp < end) {
|
||||
const char* name = cp;
|
||||
while ((*cp) != '\0' && (*cp) != '\n' && (*cp) != ',' && (*cp) != pathSep) cp++;
|
||||
cp[0] = '\0'; // Terminate name
|
||||
cp++;
|
||||
load_library(name, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1104,7 +1104,7 @@ CodeString* CodeStrings::find(intptr_t offset) const {
|
||||
// Convenience for add_comment.
|
||||
CodeString* CodeStrings::find_last(intptr_t offset) const {
|
||||
CodeString* a = _strings_last;
|
||||
while (a != NULL && !a->is_comment() && a->offset() > offset) {
|
||||
while (a != NULL && !(a->is_comment() && a->offset() == offset)) {
|
||||
a = a->_prev;
|
||||
}
|
||||
return a;
|
||||
|
@ -3168,7 +3168,7 @@ ValueStack* GraphBuilder::state_at_entry() {
|
||||
ciType* type = sig->type_at(i);
|
||||
BasicType basic_type = type->basic_type();
|
||||
// don't allow T_ARRAY to propagate into locals types
|
||||
if (basic_type == T_ARRAY) basic_type = T_OBJECT;
|
||||
if (is_reference_type(basic_type)) basic_type = T_OBJECT;
|
||||
ValueType* vt = as_ValueType(basic_type);
|
||||
state->store_local(idx, new Local(type, vt, idx, false));
|
||||
idx += type->size();
|
||||
|
@ -1546,7 +1546,7 @@ void LIRGenerator::do_StoreIndexed(StoreIndexed* x) {
|
||||
assert(x->is_pinned(),"");
|
||||
bool needs_range_check = x->compute_needs_range_check();
|
||||
bool use_length = x->length() != NULL;
|
||||
bool obj_store = x->elt_type() == T_ARRAY || x->elt_type() == T_OBJECT;
|
||||
bool obj_store = is_reference_type(x->elt_type());
|
||||
bool needs_store_check = obj_store && (x->value()->as_Constant() == NULL ||
|
||||
!get_jobject_constant(x->value())->is_null_object() ||
|
||||
x->should_profile());
|
||||
@ -2163,7 +2163,7 @@ void LIRGenerator::do_UnsafeGetObject(UnsafeGetObject* x) {
|
||||
if (type == T_BOOLEAN) {
|
||||
decorators |= C1_MASK_BOOLEAN;
|
||||
}
|
||||
if (type == T_ARRAY || type == T_OBJECT) {
|
||||
if (is_reference_type(type)) {
|
||||
decorators |= ON_UNKNOWN_OOP_REF;
|
||||
}
|
||||
|
||||
@ -2190,7 +2190,7 @@ void LIRGenerator::do_UnsafePutObject(UnsafePutObject* x) {
|
||||
set_no_result(x);
|
||||
|
||||
DecoratorSet decorators = IN_HEAP | C1_UNSAFE_ACCESS;
|
||||
if (type == T_ARRAY || type == T_OBJECT) {
|
||||
if (is_reference_type(type)) {
|
||||
decorators |= ON_UNKNOWN_OOP_REF;
|
||||
}
|
||||
if (x->is_volatile()) {
|
||||
@ -2207,7 +2207,7 @@ void LIRGenerator::do_UnsafeGetAndSetObject(UnsafeGetAndSetObject* x) {
|
||||
|
||||
DecoratorSet decorators = IN_HEAP | C1_UNSAFE_ACCESS | MO_SEQ_CST;
|
||||
|
||||
if (type == T_ARRAY || type == T_OBJECT) {
|
||||
if (is_reference_type(type)) {
|
||||
decorators |= ON_UNKNOWN_OOP_REF;
|
||||
}
|
||||
|
||||
@ -2600,7 +2600,7 @@ void LIRGenerator::profile_parameters(Base* x) {
|
||||
LIR_Opr src = args->at(i);
|
||||
assert(!src->is_illegal(), "check");
|
||||
BasicType t = src->type();
|
||||
if (t == T_OBJECT || t == T_ARRAY) {
|
||||
if (is_reference_type(t)) {
|
||||
intptr_t profiled_k = parameters->type(j);
|
||||
Local* local = x->state()->local_at(java_index)->as_Local();
|
||||
ciKlass* exact = profile_type(md, md->byte_offset_of_slot(parameters_type_data, ParametersTypeData::type_offset(0)),
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -868,7 +868,7 @@ void NullCheckEliminator::handle_AccessField(AccessField* x) {
|
||||
if (field->is_constant()) {
|
||||
ciConstant field_val = field->constant_value();
|
||||
BasicType field_type = field_val.basic_type();
|
||||
if (field_type == T_OBJECT || field_type == T_ARRAY) {
|
||||
if (is_reference_type(field_type)) {
|
||||
ciObject* obj_val = field_val.as_object();
|
||||
if (!obj_val->is_null_object()) {
|
||||
if (PrintNullCheckElimination) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -859,7 +859,7 @@ void BCEscapeAnalyzer::iterate_one_block(ciBlock *blk, StateInfo &state, Growabl
|
||||
if (s.cur_bc() != Bytecodes::_getstatic) {
|
||||
set_method_escape(state.apop());
|
||||
}
|
||||
if (field_type == T_OBJECT || field_type == T_ARRAY) {
|
||||
if (is_reference_type(field_type)) {
|
||||
state.apush(unknown_obj);
|
||||
} else if (type2size[field_type] == 1) {
|
||||
state.spush();
|
||||
@ -873,7 +873,7 @@ void BCEscapeAnalyzer::iterate_one_block(ciBlock *blk, StateInfo &state, Growabl
|
||||
{ bool will_link;
|
||||
ciField* field = s.get_field(will_link);
|
||||
BasicType field_type = field->type()->basic_type();
|
||||
if (field_type == T_OBJECT || field_type == T_ARRAY) {
|
||||
if (is_reference_type(field_type)) {
|
||||
set_global_escape(state.apop());
|
||||
} else if (type2size[field_type] == 1) {
|
||||
state.spop();
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -37,7 +37,7 @@
|
||||
// This class represents an arrayOop in the HotSpot virtual
|
||||
// machine.
|
||||
static BasicType fixup_element_type(BasicType bt) {
|
||||
if (bt == T_ARRAY) return T_OBJECT;
|
||||
if (is_reference_type(bt)) return T_OBJECT;
|
||||
if (bt == T_BOOLEAN) return T_BYTE;
|
||||
return bt;
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -56,12 +56,12 @@ void ciConstant::print() {
|
||||
case T_DOUBLE:
|
||||
tty->print("%lf", _value._double);
|
||||
break;
|
||||
case T_OBJECT:
|
||||
case T_ARRAY:
|
||||
_value._object->print();
|
||||
break;
|
||||
default:
|
||||
tty->print("ILLEGAL");
|
||||
if (is_reference_type(basic_type())) {
|
||||
_value._object->print();
|
||||
} else {
|
||||
tty->print("ILLEGAL");
|
||||
}
|
||||
break;
|
||||
}
|
||||
tty->print(">");
|
||||
|
@ -106,7 +106,7 @@ public:
|
||||
return _value._double;
|
||||
}
|
||||
ciObject* as_object() const {
|
||||
assert(basic_type() == T_OBJECT || basic_type() == T_ARRAY, "wrong type");
|
||||
assert(is_reference_type(basic_type()), "wrong type");
|
||||
return _value._object;
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -90,7 +90,7 @@ ciField::ciField(ciInstanceKlass* klass, int index) :
|
||||
|
||||
// If the field is a pointer type, get the klass of the
|
||||
// field.
|
||||
if (field_type == T_OBJECT || field_type == T_ARRAY) {
|
||||
if (is_reference_type(field_type)) {
|
||||
bool ignore;
|
||||
// This is not really a class reference; the index always refers to the
|
||||
// field's type signature, as a symbol. Linkage checks do not apply.
|
||||
@ -199,7 +199,7 @@ ciField::ciField(fieldDescriptor *fd) :
|
||||
|
||||
// If the field is a pointer type, get the klass of the
|
||||
// field.
|
||||
if (field_type == T_OBJECT || field_type == T_ARRAY) {
|
||||
if (is_reference_type(field_type)) {
|
||||
_type = NULL; // must call compute_type on first access
|
||||
} else {
|
||||
_type = ciType::make(field_type);
|
||||
|
@ -1454,8 +1454,8 @@ void ciMethod::print_impl(outputStream* st) {
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
static BasicType erase_to_word_type(BasicType bt) {
|
||||
if (is_subword_type(bt)) return T_INT;
|
||||
if (bt == T_ARRAY) return T_OBJECT;
|
||||
if (is_subword_type(bt)) return T_INT;
|
||||
if (is_reference_type(bt)) return T_OBJECT;
|
||||
return bt;
|
||||
}
|
||||
|
||||
|
@ -149,7 +149,8 @@ void ciObjectFactory::init_shared_objects() {
|
||||
|
||||
for (int i = T_BOOLEAN; i <= T_CONFLICT; i++) {
|
||||
BasicType t = (BasicType)i;
|
||||
if (type2name(t) != NULL && t != T_OBJECT && t != T_ARRAY && t != T_NARROWOOP && t != T_NARROWKLASS) {
|
||||
if (type2name(t) != NULL && !is_reference_type(t) &&
|
||||
t != T_NARROWOOP && t != T_NARROWKLASS) {
|
||||
ciType::_basic_types[t] = new (_arena) ciType(t);
|
||||
init_ident_of(ciType::_basic_types[t]);
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -35,8 +35,7 @@ ciType* ciType::_basic_types[T_CONFLICT+1];
|
||||
|
||||
// ciType
|
||||
//
|
||||
// This class represents either a class (T_OBJECT), array (T_ARRAY),
|
||||
// or one of the primitive types such as T_INT.
|
||||
// This class represents a Java reference or primitive type.
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
// ciType::ciType
|
||||
|
@ -29,8 +29,8 @@
|
||||
|
||||
// ciType
|
||||
//
|
||||
// This class represents either a class (T_OBJECT), array (T_ARRAY),
|
||||
// or one of the primitive types such as T_INT.
|
||||
// This class represents a Java reference or primitive type.
|
||||
|
||||
class ciType : public ciMetadata {
|
||||
CI_PACKAGE_ACCESS
|
||||
friend class ciKlass;
|
||||
@ -67,7 +67,7 @@ public:
|
||||
ciKlass* box_klass();
|
||||
|
||||
// Returns true if this is not a klass or array (i.e., not a reference type).
|
||||
bool is_primitive_type() const { return basic_type() != T_OBJECT && basic_type() != T_ARRAY; }
|
||||
bool is_primitive_type() const { return !is_reference_type(basic_type()); }
|
||||
int size() const { return type2size[basic_type()]; }
|
||||
bool is_void() const { return basic_type() == T_VOID; }
|
||||
bool is_one_word() const { return size() == 1; }
|
||||
|
@ -729,7 +729,7 @@ void ciTypeFlow::StateVector::do_ldc(ciBytecodeStream* str) {
|
||||
outer()->record_failure("ldc did not link");
|
||||
return;
|
||||
}
|
||||
if (basic_type == T_OBJECT || basic_type == T_ARRAY) {
|
||||
if (is_reference_type(basic_type)) {
|
||||
ciObject* obj = con.as_object();
|
||||
if (obj->is_null_object()) {
|
||||
push_null();
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2012, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -187,9 +187,11 @@ void BytecodeAssembler::load(BasicType bt, u4 index) {
|
||||
case T_FLOAT: fload(index); break;
|
||||
case T_DOUBLE: dload(index); break;
|
||||
case T_LONG: lload(index); break;
|
||||
case T_OBJECT:
|
||||
case T_ARRAY: aload(index); break;
|
||||
default:
|
||||
if (is_reference_type(bt)) {
|
||||
aload(index);
|
||||
break;
|
||||
}
|
||||
ShouldNotReachHere();
|
||||
}
|
||||
}
|
||||
@ -254,10 +256,12 @@ void BytecodeAssembler::_return(BasicType bt) {
|
||||
case T_FLOAT: freturn(); break;
|
||||
case T_DOUBLE: dreturn(); break;
|
||||
case T_LONG: lreturn(); break;
|
||||
case T_OBJECT:
|
||||
case T_ARRAY: areturn(); break;
|
||||
case T_VOID: _return(); break;
|
||||
default:
|
||||
if (is_reference_type(bt)) {
|
||||
areturn();
|
||||
break;
|
||||
}
|
||||
ShouldNotReachHere();
|
||||
}
|
||||
}
|
||||
|
@ -285,17 +285,27 @@ void ClassLoaderDataGraph::always_strong_cld_do(CLDClosure* cl) {
|
||||
}
|
||||
}
|
||||
|
||||
// Closure for locking and iterating through classes.
|
||||
LockedClassesDo::LockedClassesDo(classes_do_func_t f) : _function(f) {
|
||||
ClassLoaderDataGraph_lock->lock();
|
||||
// Closure for locking and iterating through classes. Only lock outside of safepoint.
|
||||
LockedClassesDo::LockedClassesDo(classes_do_func_t f) : _function(f),
|
||||
_do_lock(!SafepointSynchronize::is_at_safepoint()) {
|
||||
if (_do_lock) {
|
||||
ClassLoaderDataGraph_lock->lock();
|
||||
}
|
||||
}
|
||||
|
||||
LockedClassesDo::LockedClassesDo() : _function(NULL) {
|
||||
LockedClassesDo::LockedClassesDo() : _function(NULL),
|
||||
_do_lock(!SafepointSynchronize::is_at_safepoint()) {
|
||||
// callers provide their own do_klass
|
||||
ClassLoaderDataGraph_lock->lock();
|
||||
if (_do_lock) {
|
||||
ClassLoaderDataGraph_lock->lock();
|
||||
}
|
||||
}
|
||||
|
||||
LockedClassesDo::~LockedClassesDo() { ClassLoaderDataGraph_lock->unlock(); }
|
||||
LockedClassesDo::~LockedClassesDo() {
|
||||
if (_do_lock) {
|
||||
ClassLoaderDataGraph_lock->unlock();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Iterating over the CLDG needs to be locked because
|
||||
|
@ -156,6 +156,7 @@ class ClassLoaderDataGraph : public AllStatic {
|
||||
class LockedClassesDo : public KlassClosure {
|
||||
typedef void (*classes_do_func_t)(Klass*);
|
||||
classes_do_func_t _function;
|
||||
bool _do_lock;
|
||||
public:
|
||||
LockedClassesDo(); // For callers who provide their own do_klass
|
||||
LockedClassesDo(classes_do_func_t function);
|
||||
|
@ -132,7 +132,7 @@ class RedirtyLoggedCardTableEntryClosure : public G1CardTableEntryClosure {
|
||||
RedirtyLoggedCardTableEntryClosure(G1CollectedHeap* g1h) : G1CardTableEntryClosure(),
|
||||
_num_dirtied(0), _g1h(g1h), _g1_ct(g1h->card_table()) { }
|
||||
|
||||
void do_card_ptr(CardValue* card_ptr, uint worker_i) {
|
||||
void do_card_ptr(CardValue* card_ptr, uint worker_id) {
|
||||
HeapRegion* hr = region_for_card(card_ptr);
|
||||
|
||||
// Should only dirty cards in regions that won't be freed.
|
||||
@ -1938,8 +1938,8 @@ size_t G1CollectedHeap::unused_committed_regions_in_bytes() const {
|
||||
return _hrm->total_free_bytes();
|
||||
}
|
||||
|
||||
void G1CollectedHeap::iterate_hcc_closure(G1CardTableEntryClosure* cl, uint worker_i) {
|
||||
_hot_card_cache->drain(cl, worker_i);
|
||||
void G1CollectedHeap::iterate_hcc_closure(G1CardTableEntryClosure* cl, uint worker_id) {
|
||||
_hot_card_cache->drain(cl, worker_id);
|
||||
}
|
||||
|
||||
// Computes the sum of the storage used by the various regions.
|
||||
|
@ -991,7 +991,7 @@ public:
|
||||
void scrub_rem_set();
|
||||
|
||||
// Apply the given closure on all cards in the Hot Card Cache, emptying it.
|
||||
void iterate_hcc_closure(G1CardTableEntryClosure* cl, uint worker_i);
|
||||
void iterate_hcc_closure(G1CardTableEntryClosure* cl, uint worker_id);
|
||||
|
||||
// The shared block offset table array.
|
||||
G1BlockOffsetTable* bot() const { return _bot; }
|
||||
|
@ -198,10 +198,10 @@ inline size_t deactivation_level(const Thresholds& t) { return t.second; }
|
||||
|
||||
static Thresholds calc_thresholds(size_t green_zone,
|
||||
size_t yellow_zone,
|
||||
uint worker_i) {
|
||||
uint worker_id) {
|
||||
double yellow_size = yellow_zone - green_zone;
|
||||
double step = yellow_size / G1ConcurrentRefine::max_num_threads();
|
||||
if (worker_i == 0) {
|
||||
if (worker_id == 0) {
|
||||
// Potentially activate worker 0 more aggressively, to keep
|
||||
// available buffers near green_zone value. When yellow_size is
|
||||
// large we don't want to allow a full step to accumulate before
|
||||
@ -209,8 +209,8 @@ static Thresholds calc_thresholds(size_t green_zone,
|
||||
// than green_zone buffers to be processed during scanning.
|
||||
step = MIN2(step, ParallelGCThreads / 2.0);
|
||||
}
|
||||
size_t activate_offset = static_cast<size_t>(ceil(step * (worker_i + 1)));
|
||||
size_t deactivate_offset = static_cast<size_t>(floor(step * worker_i));
|
||||
size_t activate_offset = static_cast<size_t>(ceil(step * (worker_id + 1)));
|
||||
size_t deactivate_offset = static_cast<size_t>(floor(step * worker_id));
|
||||
return Thresholds(green_zone + activate_offset,
|
||||
green_zone + deactivate_offset);
|
||||
}
|
||||
|
@ -158,7 +158,7 @@ public:
|
||||
// Stops processing a buffer if SuspendibleThreadSet::should_yield(),
|
||||
// returning the incompletely processed buffer to the completed buffer
|
||||
// list, for later processing of the remainder.
|
||||
bool refine_completed_buffer_concurrently(uint worker_i, size_t stop_at);
|
||||
bool refine_completed_buffer_concurrently(uint worker_id, size_t stop_at);
|
||||
|
||||
// If a full collection is happening, reset partial logs, and release
|
||||
// completed ones: the full collection will make them all irrelevant.
|
||||
|
@ -62,8 +62,7 @@ G1GCPhaseTimes::G1GCPhaseTimes(STWGCTimer* gc_timer, uint max_gc_threads) :
|
||||
_gc_par_phases[JVMTIRoots] = new WorkerDataArray<double>(max_gc_threads, "JVMTI Roots (ms):");
|
||||
AOT_ONLY(_gc_par_phases[AOTCodeRoots] = new WorkerDataArray<double>(max_gc_threads, "AOT Root Scan (ms):");)
|
||||
_gc_par_phases[CMRefRoots] = new WorkerDataArray<double>(max_gc_threads, "CM RefProcessor Roots (ms):");
|
||||
_gc_par_phases[WaitForStrongCLD] = new WorkerDataArray<double>(max_gc_threads, "Wait For Strong CLD (ms):");
|
||||
_gc_par_phases[WeakCLDRoots] = new WorkerDataArray<double>(max_gc_threads, "Weak CLD Roots (ms):");
|
||||
_gc_par_phases[WaitForStrongRoots] = new WorkerDataArray<double>(max_gc_threads, "Wait For Strong Roots (ms):");
|
||||
|
||||
_gc_par_phases[MergeER] = new WorkerDataArray<double>(max_gc_threads, "Eager Reclaim (ms):");
|
||||
|
||||
@ -273,37 +272,37 @@ void G1GCPhaseTimes::note_gc_end() {
|
||||
#undef ASSERT_PHASE_UNINITIALIZED
|
||||
|
||||
// record the time a phase took in seconds
|
||||
void G1GCPhaseTimes::record_time_secs(GCParPhases phase, uint worker_i, double secs) {
|
||||
_gc_par_phases[phase]->set(worker_i, secs);
|
||||
void G1GCPhaseTimes::record_time_secs(GCParPhases phase, uint worker_id, double secs) {
|
||||
_gc_par_phases[phase]->set(worker_id, secs);
|
||||
}
|
||||
|
||||
// add a number of seconds to a phase
|
||||
void G1GCPhaseTimes::add_time_secs(GCParPhases phase, uint worker_i, double secs) {
|
||||
_gc_par_phases[phase]->add(worker_i, secs);
|
||||
void G1GCPhaseTimes::add_time_secs(GCParPhases phase, uint worker_id, double secs) {
|
||||
_gc_par_phases[phase]->add(worker_id, secs);
|
||||
}
|
||||
|
||||
void G1GCPhaseTimes::record_or_add_time_secs(GCParPhases phase, uint worker_i, double secs) {
|
||||
if (_gc_par_phases[phase]->get(worker_i) == _gc_par_phases[phase]->uninitialized()) {
|
||||
record_time_secs(phase, worker_i, secs);
|
||||
void G1GCPhaseTimes::record_or_add_time_secs(GCParPhases phase, uint worker_id, double secs) {
|
||||
if (_gc_par_phases[phase]->get(worker_id) == _gc_par_phases[phase]->uninitialized()) {
|
||||
record_time_secs(phase, worker_id, secs);
|
||||
} else {
|
||||
add_time_secs(phase, worker_i, secs);
|
||||
add_time_secs(phase, worker_id, secs);
|
||||
}
|
||||
}
|
||||
|
||||
double G1GCPhaseTimes::get_time_secs(GCParPhases phase, uint worker_i) {
|
||||
return _gc_par_phases[phase]->get(worker_i);
|
||||
double G1GCPhaseTimes::get_time_secs(GCParPhases phase, uint worker_id) {
|
||||
return _gc_par_phases[phase]->get(worker_id);
|
||||
}
|
||||
|
||||
void G1GCPhaseTimes::record_thread_work_item(GCParPhases phase, uint worker_i, size_t count, uint index) {
|
||||
_gc_par_phases[phase]->set_thread_work_item(worker_i, count, index);
|
||||
void G1GCPhaseTimes::record_thread_work_item(GCParPhases phase, uint worker_id, size_t count, uint index) {
|
||||
_gc_par_phases[phase]->set_thread_work_item(worker_id, count, index);
|
||||
}
|
||||
|
||||
void G1GCPhaseTimes::record_or_add_thread_work_item(GCParPhases phase, uint worker_i, size_t count, uint index) {
|
||||
_gc_par_phases[phase]->set_or_add_thread_work_item(worker_i, count, index);
|
||||
void G1GCPhaseTimes::record_or_add_thread_work_item(GCParPhases phase, uint worker_id, size_t count, uint index) {
|
||||
_gc_par_phases[phase]->set_or_add_thread_work_item(worker_id, count, index);
|
||||
}
|
||||
|
||||
size_t G1GCPhaseTimes::get_thread_work_item(GCParPhases phase, uint worker_i, uint index) {
|
||||
return _gc_par_phases[phase]->get_thread_work_item(worker_i, index);
|
||||
size_t G1GCPhaseTimes::get_thread_work_item(GCParPhases phase, uint worker_id, uint index) {
|
||||
return _gc_par_phases[phase]->get_thread_work_item(worker_id, index);
|
||||
}
|
||||
|
||||
// return the average time for a phase in milliseconds
|
||||
@ -567,8 +566,7 @@ const char* G1GCPhaseTimes::phase_name(GCParPhases phase) {
|
||||
"JVMTIRoots",
|
||||
AOT_ONLY("AOTCodeRoots" COMMA)
|
||||
"CMRefRoots",
|
||||
"WaitForStrongCLD",
|
||||
"WeakCLDRoots",
|
||||
"WaitForStrongRoots",
|
||||
"MergeER",
|
||||
"MergeRS",
|
||||
"OptMergeRS",
|
||||
|
@ -57,8 +57,7 @@ class G1GCPhaseTimes : public CHeapObj<mtGC> {
|
||||
JVMTIRoots,
|
||||
AOT_ONLY(AOTCodeRoots COMMA)
|
||||
CMRefRoots,
|
||||
WaitForStrongCLD,
|
||||
WeakCLDRoots,
|
||||
WaitForStrongRoots,
|
||||
MergeER,
|
||||
MergeRS,
|
||||
OptMergeRS,
|
||||
@ -84,7 +83,7 @@ class G1GCPhaseTimes : public CHeapObj<mtGC> {
|
||||
};
|
||||
|
||||
static const GCParPhases ExtRootScanSubPhasesFirst = ThreadRoots;
|
||||
static const GCParPhases ExtRootScanSubPhasesLast = WeakCLDRoots;
|
||||
static const GCParPhases ExtRootScanSubPhasesLast = WaitForStrongRoots;
|
||||
|
||||
enum GCMergeRSWorkTimes {
|
||||
MergeRSMergedSparse,
|
||||
@ -251,20 +250,20 @@ class G1GCPhaseTimes : public CHeapObj<mtGC> {
|
||||
static const char* phase_name(GCParPhases phase);
|
||||
|
||||
// record the time a phase took in seconds
|
||||
void record_time_secs(GCParPhases phase, uint worker_i, double secs);
|
||||
void record_time_secs(GCParPhases phase, uint worker_id, double secs);
|
||||
|
||||
// add a number of seconds to a phase
|
||||
void add_time_secs(GCParPhases phase, uint worker_i, double secs);
|
||||
void add_time_secs(GCParPhases phase, uint worker_id, double secs);
|
||||
|
||||
void record_or_add_time_secs(GCParPhases phase, uint worker_i, double secs);
|
||||
void record_or_add_time_secs(GCParPhases phase, uint worker_id, double secs);
|
||||
|
||||
double get_time_secs(GCParPhases phase, uint worker_i);
|
||||
double get_time_secs(GCParPhases phase, uint worker_id);
|
||||
|
||||
void record_thread_work_item(GCParPhases phase, uint worker_i, size_t count, uint index = 0);
|
||||
void record_thread_work_item(GCParPhases phase, uint worker_id, size_t count, uint index = 0);
|
||||
|
||||
void record_or_add_thread_work_item(GCParPhases phase, uint worker_i, size_t count, uint index = 0);
|
||||
void record_or_add_thread_work_item(GCParPhases phase, uint worker_id, size_t count, uint index = 0);
|
||||
|
||||
size_t get_thread_work_item(GCParPhases phase, uint worker_i, uint index = 0);
|
||||
size_t get_thread_work_item(GCParPhases phase, uint worker_id, uint index = 0);
|
||||
|
||||
// return the average time for a phase in milliseconds
|
||||
double average_time_ms(GCParPhases phase);
|
||||
|
@ -84,7 +84,7 @@ CardTable::CardValue* G1HotCardCache::insert(CardValue* card_ptr) {
|
||||
return (previous_ptr == current_ptr) ? previous_ptr : card_ptr;
|
||||
}
|
||||
|
||||
void G1HotCardCache::drain(G1CardTableEntryClosure* cl, uint worker_i) {
|
||||
void G1HotCardCache::drain(G1CardTableEntryClosure* cl, uint worker_id) {
|
||||
assert(default_use_cache(), "Drain only necessary if we use the hot card cache.");
|
||||
|
||||
assert(_hot_cache != NULL, "Logic");
|
||||
@ -99,7 +99,7 @@ void G1HotCardCache::drain(G1CardTableEntryClosure* cl, uint worker_i) {
|
||||
for (size_t i = start_idx; i < end_idx; i++) {
|
||||
CardValue* card_ptr = _hot_cache[i];
|
||||
if (card_ptr != NULL) {
|
||||
cl->do_card_ptr(card_ptr, worker_i);
|
||||
cl->do_card_ptr(card_ptr, worker_id);
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
|
@ -113,7 +113,7 @@ private:
|
||||
|
||||
// Refine the cards that have delayed as a result of
|
||||
// being in the cache.
|
||||
void drain(G1CardTableEntryClosure* cl, uint worker_i);
|
||||
void drain(G1CardTableEntryClosure* cl, uint worker_id);
|
||||
|
||||
// Set up for parallel processing of the cards in the hot cache
|
||||
void reset_hot_cache_claimed_index() {
|
||||
|
@ -43,16 +43,14 @@ G1ScanClosureBase::G1ScanClosureBase(G1CollectedHeap* g1h, G1ParScanThreadState*
|
||||
|
||||
void G1CLDScanClosure::do_cld(ClassLoaderData* cld) {
|
||||
// If the class loader data has not been dirtied we know that there's
|
||||
// no references into the young gen and we can skip it.
|
||||
// no references into the young gen and we can skip it.
|
||||
if (!_process_only_dirty || cld->has_modified_oops()) {
|
||||
|
||||
// Tell the closure that this class loader data is the CLD to scavenge
|
||||
// and is the one to dirty if oops are left pointing into the young gen.
|
||||
_closure->set_scanned_cld(cld);
|
||||
|
||||
// Clean the cld since we're going to scavenge all the metadata.
|
||||
// Clear modified oops only if this cld is claimed.
|
||||
cld->oops_do(_closure, _claim, /*clear_modified_oops*/true);
|
||||
// Clean modified oops since we're going to scavenge all the metadata.
|
||||
cld->oops_do(_closure, ClassLoaderData::_claim_none, true /*clear_modified_oops*/);
|
||||
|
||||
_closure->set_scanned_cld(NULL);
|
||||
|
||||
|
@ -175,12 +175,10 @@ public:
|
||||
class G1CLDScanClosure : public CLDClosure {
|
||||
G1ParCopyHelper* _closure;
|
||||
bool _process_only_dirty;
|
||||
int _claim;
|
||||
int _count;
|
||||
public:
|
||||
G1CLDScanClosure(G1ParCopyHelper* closure,
|
||||
bool process_only_dirty, int claim_value)
|
||||
: _closure(closure), _process_only_dirty(process_only_dirty), _claim(claim_value), _count(0) {}
|
||||
G1CLDScanClosure(G1ParCopyHelper* closure, bool process_only_dirty)
|
||||
: _closure(closure), _process_only_dirty(process_only_dirty), _count(0) {}
|
||||
void do_cld(ClassLoaderData* cld);
|
||||
};
|
||||
|
||||
@ -211,12 +209,12 @@ public:
|
||||
|
||||
class G1ConcurrentRefineOopClosure: public BasicOopIterateClosure {
|
||||
G1CollectedHeap* _g1h;
|
||||
uint _worker_i;
|
||||
uint _worker_id;
|
||||
|
||||
public:
|
||||
G1ConcurrentRefineOopClosure(G1CollectedHeap* g1h, uint worker_i) :
|
||||
G1ConcurrentRefineOopClosure(G1CollectedHeap* g1h, uint worker_id) :
|
||||
_g1h(g1h),
|
||||
_worker_i(worker_i) {
|
||||
_worker_id(worker_id) {
|
||||
}
|
||||
|
||||
virtual ReferenceIterationMode reference_iteration_mode() { return DO_FIELDS; }
|
||||
|
@ -156,7 +156,7 @@ inline void G1ConcurrentRefineOopClosure::do_oop_work(T* p) {
|
||||
|
||||
assert(to_rem_set != NULL, "Need per-region 'into' remsets.");
|
||||
if (to_rem_set->is_tracked()) {
|
||||
to_rem_set->add_reference(p, _worker_i);
|
||||
to_rem_set->add_reference(p, _worker_id);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -830,7 +830,7 @@ class G1ScanCollectionSetRegionClosure : public HeapRegionClosure {
|
||||
|
||||
G1ScanCardClosure scan_cl(G1CollectedHeap::heap(), _pss);
|
||||
G1ScanRSForOptionalClosure cl(G1CollectedHeap::heap(), &scan_cl);
|
||||
_opt_refs_scanned += opt_rem_set_list->oops_do(&cl, _pss->closures()->raw_strong_oops());
|
||||
_opt_refs_scanned += opt_rem_set_list->oops_do(&cl, _pss->closures()->strong_oops());
|
||||
_opt_refs_memory_used += opt_rem_set_list->used_memory();
|
||||
|
||||
event.commit(GCId::current(), _worker_id, G1GCPhaseTimes::phase_name(_scan_phase));
|
||||
@ -839,14 +839,14 @@ class G1ScanCollectionSetRegionClosure : public HeapRegionClosure {
|
||||
public:
|
||||
G1ScanCollectionSetRegionClosure(G1RemSetScanState* scan_state,
|
||||
G1ParScanThreadState* pss,
|
||||
uint worker_i,
|
||||
uint worker_id,
|
||||
G1GCPhaseTimes::GCParPhases scan_phase,
|
||||
G1GCPhaseTimes::GCParPhases code_roots_phase) :
|
||||
_pss(pss),
|
||||
_scan_state(scan_state),
|
||||
_scan_phase(scan_phase),
|
||||
_code_roots_phase(code_roots_phase),
|
||||
_worker_id(worker_i),
|
||||
_worker_id(worker_id),
|
||||
_opt_refs_scanned(0),
|
||||
_opt_refs_memory_used(0),
|
||||
_strong_code_root_scan_time(),
|
||||
@ -1061,7 +1061,7 @@ class G1MergeHeapRootsTask : public AbstractGangTask {
|
||||
_scan_state(scan_state), _ct(g1h->card_table()), _cards_dirty(0), _cards_skipped(0)
|
||||
{}
|
||||
|
||||
void do_card_ptr(CardValue* card_ptr, uint worker_i) {
|
||||
void do_card_ptr(CardValue* card_ptr, uint worker_id) {
|
||||
// The only time we care about recording cards that
|
||||
// contain references that point into the collection set
|
||||
// is during RSet updating within an evacuation pause.
|
||||
@ -1263,7 +1263,7 @@ inline void check_card_ptr(CardTable::CardValue* card_ptr, G1CardTable* ct) {
|
||||
}
|
||||
|
||||
void G1RemSet::refine_card_concurrently(CardValue* card_ptr,
|
||||
uint worker_i) {
|
||||
uint worker_id) {
|
||||
assert(!_g1h->is_gc_active(), "Only call concurrently");
|
||||
|
||||
// Construct the region representing the card.
|
||||
@ -1375,7 +1375,7 @@ void G1RemSet::refine_card_concurrently(CardValue* card_ptr,
|
||||
MemRegion dirty_region(start, MIN2(scan_limit, end));
|
||||
assert(!dirty_region.is_empty(), "sanity");
|
||||
|
||||
G1ConcurrentRefineOopClosure conc_refine_cl(_g1h, worker_i);
|
||||
G1ConcurrentRefineOopClosure conc_refine_cl(_g1h, worker_id);
|
||||
if (r->oops_on_memregion_seq_iterate_careful<false>(dirty_region, &conc_refine_cl) != NULL) {
|
||||
_num_conc_refined_cards++; // Unsynchronized update, only used for logging.
|
||||
return;
|
||||
|
@ -117,7 +117,7 @@ public:
|
||||
// Refine the card corresponding to "card_ptr". Safe to be called concurrently
|
||||
// to the mutator.
|
||||
void refine_card_concurrently(CardValue* card_ptr,
|
||||
uint worker_i);
|
||||
uint worker_id);
|
||||
|
||||
// Print accumulated summary info from the start of the VM.
|
||||
void print_summary_info();
|
||||
|
@ -35,20 +35,17 @@ public:
|
||||
G1EvacuationClosures(G1CollectedHeap* g1h,
|
||||
G1ParScanThreadState* pss,
|
||||
bool in_young_gc) :
|
||||
_closures(g1h, pss, in_young_gc, /* cld_claim */ ClassLoaderData::_claim_none) {}
|
||||
_closures(g1h, pss, in_young_gc) {}
|
||||
|
||||
OopClosure* weak_oops() { return &_closures._oops; }
|
||||
OopClosure* strong_oops() { return &_closures._oops; }
|
||||
|
||||
CLDClosure* weak_clds() { return &_closures._clds; }
|
||||
CLDClosure* strong_clds() { return &_closures._clds; }
|
||||
CLDClosure* second_pass_weak_clds() { return NULL; }
|
||||
|
||||
CodeBlobClosure* strong_codeblobs() { return &_closures._codeblobs; }
|
||||
CodeBlobClosure* weak_codeblobs() { return &_closures._codeblobs; }
|
||||
|
||||
OopClosure* raw_strong_oops() { return &_closures._oops; }
|
||||
|
||||
bool trace_metadata() { return false; }
|
||||
};
|
||||
|
||||
@ -60,38 +57,21 @@ class G1InitialMarkClosures : public G1EvacuationRootClosures {
|
||||
G1SharedClosures<G1MarkFromRoot> _strong;
|
||||
G1SharedClosures<MarkWeak> _weak;
|
||||
|
||||
// Filter method to help with returning the appropriate closures
|
||||
// depending on the class template parameter.
|
||||
template <G1Mark Mark, typename T>
|
||||
T* null_if(T* t) {
|
||||
if (Mark == MarkWeak) {
|
||||
return NULL;
|
||||
}
|
||||
return t;
|
||||
}
|
||||
|
||||
public:
|
||||
G1InitialMarkClosures(G1CollectedHeap* g1h,
|
||||
G1ParScanThreadState* pss) :
|
||||
_strong(g1h, pss, /* process_only_dirty_klasses */ false, /* cld_claim */ ClassLoaderData::_claim_strong),
|
||||
_weak(g1h, pss, /* process_only_dirty_klasses */ false, /* cld_claim */ ClassLoaderData::_claim_strong) {}
|
||||
_strong(g1h, pss, /* process_only_dirty_klasses */ false),
|
||||
_weak(g1h, pss, /* process_only_dirty_klasses */ false) {}
|
||||
|
||||
OopClosure* weak_oops() { return &_weak._oops; }
|
||||
OopClosure* strong_oops() { return &_strong._oops; }
|
||||
|
||||
// If MarkWeak is G1MarkPromotedFromRoot then the weak CLDs must be processed in a second pass.
|
||||
CLDClosure* weak_clds() { return null_if<G1MarkPromotedFromRoot>(&_weak._clds); }
|
||||
CLDClosure* weak_clds() { return &_weak._clds; }
|
||||
CLDClosure* strong_clds() { return &_strong._clds; }
|
||||
|
||||
// If MarkWeak is G1MarkFromRoot then all CLDs are processed by the weak and strong variants
|
||||
// return a NULL closure for the following specialized versions in that case.
|
||||
CLDClosure* second_pass_weak_clds() { return null_if<G1MarkFromRoot>(&_weak._clds); }
|
||||
|
||||
CodeBlobClosure* strong_codeblobs() { return &_strong._codeblobs; }
|
||||
CodeBlobClosure* weak_codeblobs() { return &_weak._codeblobs; }
|
||||
|
||||
OopClosure* raw_strong_oops() { return &_strong._oops; }
|
||||
|
||||
// If we are not marking all weak roots then we are tracing
|
||||
// which metadata is alive.
|
||||
bool trace_metadata() { return MarkWeak == G1MarkPromotedFromRoot; }
|
||||
|
@ -49,13 +49,6 @@ public:
|
||||
|
||||
class G1EvacuationRootClosures : public G1RootClosures {
|
||||
public:
|
||||
// Applied to the weakly reachable CLDs when all strongly reachable
|
||||
// CLDs are guaranteed to have been processed.
|
||||
virtual CLDClosure* second_pass_weak_clds() = 0;
|
||||
|
||||
// Get a raw oop closure for processing oops, bypassing the flushing above.
|
||||
virtual OopClosure* raw_strong_oops() = 0;
|
||||
|
||||
// Applied to code blobs treated as weak roots.
|
||||
virtual CodeBlobClosure* weak_codeblobs() = 0;
|
||||
|
||||
|
@ -45,7 +45,7 @@
|
||||
#include "services/management.hpp"
|
||||
#include "utilities/macros.hpp"
|
||||
|
||||
void G1RootProcessor::worker_has_discovered_all_strong_classes() {
|
||||
void G1RootProcessor::worker_has_discovered_all_strong_nmethods() {
|
||||
assert(ClassUnloadingWithConcurrentMark, "Currently only needed when doing G1 Class Unloading");
|
||||
|
||||
uint new_value = (uint)Atomic::add(1, &_n_workers_discovered_strong_classes);
|
||||
@ -56,7 +56,7 @@ void G1RootProcessor::worker_has_discovered_all_strong_classes() {
|
||||
}
|
||||
}
|
||||
|
||||
void G1RootProcessor::wait_until_all_strong_classes_discovered() {
|
||||
void G1RootProcessor::wait_until_all_strong_nmethods_discovered() {
|
||||
assert(ClassUnloadingWithConcurrentMark, "Currently only needed when doing G1 Class Unloading");
|
||||
|
||||
if ((uint)_n_workers_discovered_strong_classes != n_workers()) {
|
||||
@ -71,28 +71,22 @@ G1RootProcessor::G1RootProcessor(G1CollectedHeap* g1h, uint n_workers) :
|
||||
_g1h(g1h),
|
||||
_process_strong_tasks(G1RP_PS_NumElements),
|
||||
_srs(n_workers),
|
||||
_lock(Mutex::leaf, "G1 Root Scanning barrier lock", false, Monitor::_safepoint_check_never),
|
||||
_lock(Mutex::leaf, "G1 Root Scan barrier lock", false, Monitor::_safepoint_check_never),
|
||||
_n_workers_discovered_strong_classes(0) {}
|
||||
|
||||
void G1RootProcessor::evacuate_roots(G1ParScanThreadState* pss, uint worker_i) {
|
||||
void G1RootProcessor::evacuate_roots(G1ParScanThreadState* pss, uint worker_id) {
|
||||
G1GCPhaseTimes* phase_times = _g1h->phase_times();
|
||||
|
||||
G1EvacPhaseTimesTracker timer(phase_times, pss, G1GCPhaseTimes::ExtRootScan, worker_i);
|
||||
G1EvacPhaseTimesTracker timer(phase_times, pss, G1GCPhaseTimes::ExtRootScan, worker_id);
|
||||
|
||||
G1EvacuationRootClosures* closures = pss->closures();
|
||||
process_java_roots(closures, phase_times, worker_i);
|
||||
process_java_roots(closures, phase_times, worker_id, closures->trace_metadata() /* notify_claimed_nmethods_done */);
|
||||
|
||||
// This is the point where this worker thread will not find more strong CLDs/nmethods.
|
||||
// Report this so G1 can synchronize the strong and weak CLDs/nmethods processing.
|
||||
if (closures->trace_metadata()) {
|
||||
worker_has_discovered_all_strong_classes();
|
||||
}
|
||||
|
||||
process_vm_roots(closures, phase_times, worker_i);
|
||||
process_vm_roots(closures, phase_times, worker_id);
|
||||
|
||||
{
|
||||
// Now the CM ref_processor roots.
|
||||
G1GCParPhaseTimesTracker x(phase_times, G1GCPhaseTimes::CMRefRoots, worker_i);
|
||||
G1GCParPhaseTimesTracker x(phase_times, G1GCPhaseTimes::CMRefRoots, worker_id);
|
||||
if (_process_strong_tasks.try_claim_task(G1RP_PS_refProcessor_oops_do)) {
|
||||
// We need to treat the discovered reference lists of the
|
||||
// concurrent mark ref processor as roots and keep entries
|
||||
@ -103,21 +97,9 @@ void G1RootProcessor::evacuate_roots(G1ParScanThreadState* pss, uint worker_i) {
|
||||
}
|
||||
|
||||
if (closures->trace_metadata()) {
|
||||
{
|
||||
G1GCParPhaseTimesTracker x(phase_times, G1GCPhaseTimes::WaitForStrongCLD, worker_i);
|
||||
// Barrier to make sure all workers passed
|
||||
// the strong CLD and strong nmethods phases.
|
||||
wait_until_all_strong_classes_discovered();
|
||||
}
|
||||
|
||||
// Now take the complement of the strong CLDs.
|
||||
G1GCParPhaseTimesTracker x(phase_times, G1GCPhaseTimes::WeakCLDRoots, worker_i);
|
||||
assert(closures->second_pass_weak_clds() != NULL, "Should be non-null if we are tracing metadata.");
|
||||
ClassLoaderDataGraph::roots_cld_do(NULL, closures->second_pass_weak_clds());
|
||||
} else {
|
||||
phase_times->record_time_secs(G1GCPhaseTimes::WaitForStrongCLD, worker_i, 0.0);
|
||||
phase_times->record_time_secs(G1GCPhaseTimes::WeakCLDRoots, worker_i, 0.0);
|
||||
assert(closures->second_pass_weak_clds() == NULL, "Should be null if not tracing metadata.");
|
||||
G1GCParPhaseTimesTracker x(phase_times, G1GCPhaseTimes::WaitForStrongRoots, worker_id);
|
||||
// Wait to make sure all workers passed the strong nmethods phase.
|
||||
wait_until_all_strong_nmethods_discovered();
|
||||
}
|
||||
|
||||
_process_strong_tasks.all_tasks_completed(n_workers());
|
||||
@ -189,61 +171,81 @@ void G1RootProcessor::process_all_roots(OopClosure* oops,
|
||||
|
||||
void G1RootProcessor::process_java_roots(G1RootClosures* closures,
|
||||
G1GCPhaseTimes* phase_times,
|
||||
uint worker_i) {
|
||||
// Iterating over the CLDG and the Threads are done early to allow us to
|
||||
// first process the strong CLDs and nmethods and then, after a barrier,
|
||||
// let the thread process the weak CLDs and nmethods.
|
||||
uint worker_id,
|
||||
bool notify_claimed_nmethods_done) {
|
||||
// We need to make make sure that the "strong" nmethods are processed first
|
||||
// using the strong closure. Only after that we process the weakly reachable
|
||||
// nmethods.
|
||||
// We need to strictly separate the strong and weak nmethod processing because
|
||||
// any processing claims that nmethod, i.e. will not be iterated again.
|
||||
// Which means if an nmethod is processed first and claimed, the strong processing
|
||||
// will not happen, and the oops reachable by that nmethod will not be marked
|
||||
// properly.
|
||||
//
|
||||
// That is why we process strong nmethods first, synchronize all threads via a
|
||||
// barrier, and only then allow weak processing. To minimize the wait time at
|
||||
// that barrier we do the strong nmethod processing first, and immediately after-
|
||||
// wards indicate that that thread is done. Hopefully other root processing after
|
||||
// nmethod processing is enough so there is no need to wait.
|
||||
//
|
||||
// This is only required in the concurrent start pause with class unloading enabled.
|
||||
{
|
||||
G1GCParPhaseTimesTracker x(phase_times, G1GCPhaseTimes::CLDGRoots, worker_i);
|
||||
if (_process_strong_tasks.try_claim_task(G1RP_PS_ClassLoaderDataGraph_oops_do)) {
|
||||
ClassLoaderDataGraph::roots_cld_do(closures->strong_clds(), closures->weak_clds());
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
G1GCParPhaseTimesTracker x(phase_times, G1GCPhaseTimes::ThreadRoots, worker_i);
|
||||
G1GCParPhaseTimesTracker x(phase_times, G1GCPhaseTimes::ThreadRoots, worker_id);
|
||||
bool is_par = n_workers() > 1;
|
||||
Threads::possibly_parallel_oops_do(is_par,
|
||||
closures->strong_oops(),
|
||||
closures->strong_codeblobs());
|
||||
}
|
||||
|
||||
// This is the point where this worker thread will not find more strong nmethods.
|
||||
// Report this so G1 can synchronize the strong and weak CLDs/nmethods processing.
|
||||
if (notify_claimed_nmethods_done) {
|
||||
worker_has_discovered_all_strong_nmethods();
|
||||
}
|
||||
|
||||
{
|
||||
G1GCParPhaseTimesTracker x(phase_times, G1GCPhaseTimes::CLDGRoots, worker_id);
|
||||
if (_process_strong_tasks.try_claim_task(G1RP_PS_ClassLoaderDataGraph_oops_do)) {
|
||||
ClassLoaderDataGraph::roots_cld_do(closures->strong_clds(), closures->weak_clds());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void G1RootProcessor::process_vm_roots(G1RootClosures* closures,
|
||||
G1GCPhaseTimes* phase_times,
|
||||
uint worker_i) {
|
||||
uint worker_id) {
|
||||
OopClosure* strong_roots = closures->strong_oops();
|
||||
|
||||
{
|
||||
G1GCParPhaseTimesTracker x(phase_times, G1GCPhaseTimes::UniverseRoots, worker_i);
|
||||
G1GCParPhaseTimesTracker x(phase_times, G1GCPhaseTimes::UniverseRoots, worker_id);
|
||||
if (_process_strong_tasks.try_claim_task(G1RP_PS_Universe_oops_do)) {
|
||||
Universe::oops_do(strong_roots);
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
G1GCParPhaseTimesTracker x(phase_times, G1GCPhaseTimes::JNIRoots, worker_i);
|
||||
G1GCParPhaseTimesTracker x(phase_times, G1GCPhaseTimes::JNIRoots, worker_id);
|
||||
if (_process_strong_tasks.try_claim_task(G1RP_PS_JNIHandles_oops_do)) {
|
||||
JNIHandles::oops_do(strong_roots);
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
G1GCParPhaseTimesTracker x(phase_times, G1GCPhaseTimes::ObjectSynchronizerRoots, worker_i);
|
||||
G1GCParPhaseTimesTracker x(phase_times, G1GCPhaseTimes::ObjectSynchronizerRoots, worker_id);
|
||||
if (_process_strong_tasks.try_claim_task(G1RP_PS_ObjectSynchronizer_oops_do)) {
|
||||
ObjectSynchronizer::oops_do(strong_roots);
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
G1GCParPhaseTimesTracker x(phase_times, G1GCPhaseTimes::ManagementRoots, worker_i);
|
||||
G1GCParPhaseTimesTracker x(phase_times, G1GCPhaseTimes::ManagementRoots, worker_id);
|
||||
if (_process_strong_tasks.try_claim_task(G1RP_PS_Management_oops_do)) {
|
||||
Management::oops_do(strong_roots);
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
G1GCParPhaseTimesTracker x(phase_times, G1GCPhaseTimes::JVMTIRoots, worker_i);
|
||||
G1GCParPhaseTimesTracker x(phase_times, G1GCPhaseTimes::JVMTIRoots, worker_id);
|
||||
if (_process_strong_tasks.try_claim_task(G1RP_PS_jvmti_oops_do)) {
|
||||
JvmtiExport::oops_do(strong_roots);
|
||||
}
|
||||
@ -251,7 +253,7 @@ void G1RootProcessor::process_vm_roots(G1RootClosures* closures,
|
||||
|
||||
#if INCLUDE_AOT
|
||||
if (UseAOT) {
|
||||
G1GCParPhaseTimesTracker x(phase_times, G1GCPhaseTimes::AOTCodeRoots, worker_i);
|
||||
G1GCParPhaseTimesTracker x(phase_times, G1GCPhaseTimes::AOTCodeRoots, worker_id);
|
||||
if (_process_strong_tasks.try_claim_task(G1RP_PS_aot_oops_do)) {
|
||||
AOTLoader::oops_do(strong_roots);
|
||||
}
|
||||
@ -259,7 +261,7 @@ void G1RootProcessor::process_vm_roots(G1RootClosures* closures,
|
||||
#endif
|
||||
|
||||
{
|
||||
G1GCParPhaseTimesTracker x(phase_times, G1GCPhaseTimes::SystemDictionaryRoots, worker_i);
|
||||
G1GCParPhaseTimesTracker x(phase_times, G1GCPhaseTimes::SystemDictionaryRoots, worker_id);
|
||||
if (_process_strong_tasks.try_claim_task(G1RP_PS_SystemDictionary_oops_do)) {
|
||||
SystemDictionary::oops_do(strong_roots);
|
||||
}
|
||||
@ -268,7 +270,7 @@ void G1RootProcessor::process_vm_roots(G1RootClosures* closures,
|
||||
|
||||
void G1RootProcessor::process_code_cache_roots(CodeBlobClosure* code_closure,
|
||||
G1GCPhaseTimes* phase_times,
|
||||
uint worker_i) {
|
||||
uint worker_id) {
|
||||
if (_process_strong_tasks.try_claim_task(G1RP_PS_CodeCache_oops_do)) {
|
||||
CodeCache::blobs_do(code_closure);
|
||||
}
|
||||
|
@ -69,20 +69,21 @@ class G1RootProcessor : public StackObj {
|
||||
G1RP_PS_NumElements
|
||||
};
|
||||
|
||||
void worker_has_discovered_all_strong_classes();
|
||||
void wait_until_all_strong_classes_discovered();
|
||||
void worker_has_discovered_all_strong_nmethods();
|
||||
void wait_until_all_strong_nmethods_discovered();
|
||||
|
||||
void process_java_roots(G1RootClosures* closures,
|
||||
G1GCPhaseTimes* phase_times,
|
||||
uint worker_i);
|
||||
uint worker_id,
|
||||
bool notify_claimed_nmethods_done = false);
|
||||
|
||||
void process_vm_roots(G1RootClosures* closures,
|
||||
G1GCPhaseTimes* phase_times,
|
||||
uint worker_i);
|
||||
uint worker_id);
|
||||
|
||||
void process_code_cache_roots(CodeBlobClosure* code_closure,
|
||||
G1GCPhaseTimes* phase_times,
|
||||
uint worker_i);
|
||||
uint worker_id);
|
||||
|
||||
public:
|
||||
G1RootProcessor(G1CollectedHeap* g1h, uint n_workers);
|
||||
|
@ -39,9 +39,9 @@ public:
|
||||
G1CLDScanClosure _clds;
|
||||
G1CodeBlobClosure _codeblobs;
|
||||
|
||||
G1SharedClosures(G1CollectedHeap* g1h, G1ParScanThreadState* pss, bool process_only_dirty, int cld_claim) :
|
||||
G1SharedClosures(G1CollectedHeap* g1h, G1ParScanThreadState* pss, bool process_only_dirty) :
|
||||
_oops(g1h, pss),
|
||||
_oops_in_cld(g1h, pss),
|
||||
_clds(&_oops_in_cld, process_only_dirty, cld_claim),
|
||||
_clds(&_oops_in_cld, process_only_dirty),
|
||||
_codeblobs(&_oops) {}
|
||||
};
|
||||
|
@ -100,7 +100,7 @@ public:
|
||||
BasicType type() const { return _type; }
|
||||
LIR_Opr resolved_addr() const { return _resolved_addr; }
|
||||
void set_resolved_addr(LIR_Opr addr) { _resolved_addr = addr; }
|
||||
bool is_oop() const { return _type == T_ARRAY || _type == T_OBJECT; }
|
||||
bool is_oop() const { return is_reference_type(_type); }
|
||||
DecoratorSet decorators() const { return _decorators; }
|
||||
void clear_decorators(DecoratorSet ds) { _decorators &= ~ds; }
|
||||
bool is_raw() const { return (_decorators & AS_RAW) != 0; }
|
||||
|
@ -120,7 +120,7 @@ public:
|
||||
Node* base() const { return _base; }
|
||||
C2AccessValuePtr& addr() const { return _addr; }
|
||||
BasicType type() const { return _type; }
|
||||
bool is_oop() const { return _type == T_OBJECT || _type == T_ARRAY; }
|
||||
bool is_oop() const { return is_reference_type(_type); }
|
||||
bool is_raw() const { return (_decorators & AS_RAW) != 0; }
|
||||
Node* raw_access() const { return _raw_access; }
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -187,6 +187,6 @@ void CardTableBarrierSetC2::eliminate_gc_barrier(PhaseMacroExpand* macro, Node*
|
||||
}
|
||||
|
||||
bool CardTableBarrierSetC2::array_copy_requires_gc_barriers(bool tightly_coupled_alloc, BasicType type, bool is_clone, ArrayCopyPhase phase) const {
|
||||
bool is_oop = type == T_OBJECT || type == T_ARRAY;
|
||||
bool is_oop = is_reference_type(type);
|
||||
return is_oop && (!tightly_coupled_alloc || !use_ReduceInitialCardMarks());
|
||||
}
|
||||
|
@ -171,9 +171,8 @@ void MemAllocator::Allocation::check_for_valid_allocation_state() const {
|
||||
// This is a VM policy failure, so how do we exhaustively test it?
|
||||
assert(!_thread->has_pending_exception(),
|
||||
"shouldn't be allocating with pending exception");
|
||||
// Allocation of an oop can always invoke a safepoint,
|
||||
// hence, the true argument.
|
||||
_thread->check_for_valid_safepoint_state(true);
|
||||
// Allocation of an oop can always invoke a safepoint.
|
||||
_thread->check_for_valid_safepoint_state();
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -754,7 +754,7 @@ bool ShenandoahBarrierSetC2::optimize_loops(PhaseIdealLoop* phase, LoopOptsMode
|
||||
}
|
||||
|
||||
bool ShenandoahBarrierSetC2::array_copy_requires_gc_barriers(bool tightly_coupled_alloc, BasicType type, bool is_clone, ArrayCopyPhase phase) const {
|
||||
bool is_oop = type == T_OBJECT || type == T_ARRAY;
|
||||
bool is_oop = is_reference_type(type);
|
||||
if (!is_oop) {
|
||||
return false;
|
||||
}
|
||||
@ -787,7 +787,7 @@ bool ShenandoahBarrierSetC2::clone_needs_barrier(Node* src, PhaseGVN& gvn) {
|
||||
}
|
||||
} else if (src_type->isa_aryptr()) {
|
||||
BasicType src_elem = src_type->klass()->as_array_klass()->element_type()->basic_type();
|
||||
if (src_elem == T_OBJECT || src_elem == T_ARRAY) {
|
||||
if (is_reference_type(src_elem)) {
|
||||
return true;
|
||||
}
|
||||
} else {
|
||||
|
@ -266,9 +266,19 @@ oop ShenandoahBarrierSet::oop_load_from_native_barrier(oop obj) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (_heap->is_evacuation_in_progress() &&
|
||||
!_heap->complete_marking_context()->is_marked(obj)) {
|
||||
return NULL;
|
||||
ShenandoahMarkingContext* const marking_context = _heap->marking_context();
|
||||
|
||||
if (_heap->is_evacuation_in_progress()) {
|
||||
// Normal GC
|
||||
if (!marking_context->is_marked(obj)) {
|
||||
return NULL;
|
||||
}
|
||||
} else if (_heap->is_concurrent_traversal_in_progress()) {
|
||||
// Traversal GC
|
||||
if (marking_context->is_complete() &&
|
||||
!marking_context->is_marked(resolve_forwarded_not_null(obj))) {
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
return load_reference_barrier_not_null(obj);
|
||||
|
@ -593,11 +593,6 @@ void ShenandoahTraversalGC::final_traversal_collection() {
|
||||
weak_refs_work();
|
||||
}
|
||||
|
||||
if (!_heap->cancelled_gc()) {
|
||||
fixup_roots();
|
||||
_heap->parallel_cleaning(false);
|
||||
}
|
||||
|
||||
if (!_heap->cancelled_gc()) {
|
||||
assert(_task_queues->is_empty(), "queues must be empty after traversal GC");
|
||||
TASKQUEUE_STATS_ONLY(_task_queues->print_taskqueue_stats());
|
||||
@ -606,6 +601,9 @@ void ShenandoahTraversalGC::final_traversal_collection() {
|
||||
// No more marking expected
|
||||
_heap->mark_complete_marking_context();
|
||||
|
||||
fixup_roots();
|
||||
_heap->parallel_cleaning(false);
|
||||
|
||||
// Resize metaspace
|
||||
MetaspaceGC::compute_new_size();
|
||||
|
||||
|
@ -660,7 +660,7 @@ Node* ZBarrierSetC2::step_over_gc_barrier_ctrl(Node* c) const {
|
||||
}
|
||||
|
||||
bool ZBarrierSetC2::array_copy_requires_gc_barriers(bool tightly_coupled_alloc, BasicType type, bool is_clone, ArrayCopyPhase phase) const {
|
||||
return type == T_OBJECT || type == T_ARRAY;
|
||||
return is_reference_type(type);
|
||||
}
|
||||
|
||||
bool ZBarrierSetC2::final_graph_reshaping(Compile* compile, Node* n, uint opcode) const {
|
||||
@ -1367,7 +1367,7 @@ void ZBarrierSetC2::insert_barriers_on_unsafe(PhaseIdealLoop* phase) const {
|
||||
LoadStoreNode* lsn = n->as_LoadStore();
|
||||
if (lsn->has_barrier()) {
|
||||
BasicType bt = lsn->in(MemNode::Address)->bottom_type()->basic_type();
|
||||
assert ((bt == T_OBJECT || bt == T_ARRAY), "Sanity test");
|
||||
assert (is_reference_type(bt), "Sanity test");
|
||||
insert_barrier_before_unsafe(phase, lsn);
|
||||
}
|
||||
}
|
||||
|
@ -104,8 +104,7 @@ typedef ZAttachedArray<ZForwarding, ZForwardingEntry> ZAttachedArrayForForwardin
|
||||
declare_constant(ZAddressOffsetShift) \
|
||||
declare_constant(ZAddressOffsetBits) \
|
||||
declare_constant(ZAddressOffsetMask) \
|
||||
declare_constant(ZAddressOffsetMax) \
|
||||
declare_constant(ZAddressSpaceStart)
|
||||
declare_constant(ZAddressOffsetMax)
|
||||
|
||||
#define VM_TYPES_ZGC(declare_type, declare_toplevel_type, declare_integer_type) \
|
||||
declare_toplevel_type(ZGlobalsForVMStructs) \
|
||||
|
@ -32,14 +32,6 @@ void ZAddress::set_good_mask(uintptr_t mask) {
|
||||
}
|
||||
|
||||
void ZAddress::initialize() {
|
||||
ZAddressSpaceStart = ZPlatformAddressSpaceStart();
|
||||
ZAddressSpaceEnd = ZPlatformAddressSpaceEnd();
|
||||
ZAddressSpaceSize = ZAddressSpaceEnd - ZAddressSpaceStart;
|
||||
|
||||
ZAddressReservedStart = ZPlatformAddressReservedStart();
|
||||
ZAddressReservedEnd = ZPlatformAddressReservedEnd();
|
||||
ZAddressReservedSize = ZAddressReservedEnd - ZAddressReservedStart;
|
||||
|
||||
ZAddressBase = ZPlatformAddressBase();
|
||||
|
||||
ZAddressOffsetBits = ZPlatformAddressOffsetBits();
|
||||
|
@ -66,7 +66,7 @@ bool ZBarrierSet::barrier_needed(DecoratorSet decorators, BasicType type) {
|
||||
assert((decorators & AS_NO_KEEPALIVE) == 0, "Unexpected decorator");
|
||||
//assert((decorators & ON_UNKNOWN_OOP_REF) == 0, "Unexpected decorator");
|
||||
|
||||
if (type == T_OBJECT || type == T_ARRAY) {
|
||||
if (is_reference_type(type)) {
|
||||
assert((decorators & (IN_HEAP | IN_NATIVE)) != 0, "Where is reference?");
|
||||
// Barrier needed even when IN_NATIVE, to allow concurrent scanning.
|
||||
return true;
|
||||
|
@ -23,13 +23,13 @@
|
||||
|
||||
#include "precompiled.hpp"
|
||||
#include "gc/shared/gcHeapSummary.hpp"
|
||||
#include "gc/shared/locationPrinter.hpp"
|
||||
#include "gc/shared/suspendibleThreadSet.hpp"
|
||||
#include "gc/z/zCollectedHeap.hpp"
|
||||
#include "gc/z/zGlobals.hpp"
|
||||
#include "gc/z/zHeap.inline.hpp"
|
||||
#include "gc/z/zNMethod.hpp"
|
||||
#include "gc/z/zObjArrayAllocator.hpp"
|
||||
#include "gc/z/zOop.inline.hpp"
|
||||
#include "gc/z/zServiceability.hpp"
|
||||
#include "gc/z/zStat.hpp"
|
||||
#include "gc/z/zUtils.inline.hpp"
|
||||
@ -68,8 +68,7 @@ jint ZCollectedHeap::initialize() {
|
||||
return JNI_ENOMEM;
|
||||
}
|
||||
|
||||
Universe::calculate_verify_data((HeapWord*)ZAddressReservedStart,
|
||||
(HeapWord*)ZAddressReservedEnd);
|
||||
Universe::calculate_verify_data((HeapWord*)0, (HeapWord*)UINTPTR_MAX);
|
||||
|
||||
return JNI_OK;
|
||||
}
|
||||
@ -116,7 +115,7 @@ bool ZCollectedHeap::is_in(const void* p) const {
|
||||
}
|
||||
|
||||
uint32_t ZCollectedHeap::hash_oop(oop obj) const {
|
||||
return _heap.hash_oop(obj);
|
||||
return _heap.hash_oop(ZOop::to_address(obj));
|
||||
}
|
||||
|
||||
HeapWord* ZCollectedHeap::allocate_new_tlab(size_t min_size, size_t requested_size, size_t* actual_size) {
|
||||
@ -285,12 +284,7 @@ void ZCollectedHeap::gc_threads_do(ThreadClosure* tc) const {
|
||||
}
|
||||
|
||||
VirtualSpaceSummary ZCollectedHeap::create_heap_space_summary() {
|
||||
const size_t capacity_in_words = capacity() / HeapWordSize;
|
||||
const size_t max_capacity_in_words = max_capacity() / HeapWordSize;
|
||||
HeapWord* const heap_start = (HeapWord*)ZAddressReservedStart;
|
||||
return VirtualSpaceSummary(heap_start,
|
||||
heap_start + capacity_in_words,
|
||||
heap_start + max_capacity_in_words);
|
||||
return VirtualSpaceSummary((HeapWord*)0, (HeapWord*)capacity(), (HeapWord*)max_capacity());
|
||||
}
|
||||
|
||||
void ZCollectedHeap::safepoint_synchronize_begin() {
|
||||
@ -312,10 +306,6 @@ void ZCollectedHeap::print_on(outputStream* st) const {
|
||||
void ZCollectedHeap::print_on_error(outputStream* st) const {
|
||||
CollectedHeap::print_on_error(st);
|
||||
|
||||
st->print_cr("Address Space");
|
||||
st->print_cr( " Start: " PTR_FORMAT, ZAddressSpaceStart);
|
||||
st->print_cr( " End: " PTR_FORMAT, ZAddressSpaceEnd);
|
||||
st->print_cr( " Size: " SIZE_FORMAT_W(-15) " (" PTR_FORMAT ")", ZAddressSpaceSize, ZAddressSpaceSize);
|
||||
st->print_cr( "Heap");
|
||||
st->print_cr( " GlobalPhase: %u", ZGlobalPhase);
|
||||
st->print_cr( " GlobalSeqNum: %u", ZGlobalSeqNum);
|
||||
@ -352,13 +342,7 @@ void ZCollectedHeap::print_tracing_info() const {
|
||||
}
|
||||
|
||||
bool ZCollectedHeap::print_location(outputStream* st, void* addr) const {
|
||||
if (LocationPrinter::is_valid_obj(addr)) {
|
||||
st->print(INTPTR_FORMAT " is a %s oop: ", p2i(addr),
|
||||
ZAddress::is_good(reinterpret_cast<uintptr_t>(addr)) ? "good" : "bad");
|
||||
cast_to_oop(addr)->print_on(st);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
return _heap.print_location(st, (uintptr_t)addr);
|
||||
}
|
||||
|
||||
void ZCollectedHeap::verify(VerifyOption option /* ignored */) {
|
||||
@ -366,5 +350,5 @@ void ZCollectedHeap::verify(VerifyOption option /* ignored */) {
|
||||
}
|
||||
|
||||
bool ZCollectedHeap::is_oop(oop object) const {
|
||||
return CollectedHeap::is_oop(object) && _heap.is_oop(object);
|
||||
return _heap.is_oop(ZOop::to_address(object));
|
||||
}
|
||||
|
@ -126,10 +126,6 @@ end
|
||||
|
||||
# Print heap information
|
||||
define zph
|
||||
printf "Address Space\n"
|
||||
printf " Start: 0x%llx\n", ZAddressSpaceStart
|
||||
printf " End: 0x%llx\n", ZAddressSpaceEnd
|
||||
printf " Size: %-15llu (0x%llx)\n", ZAddressSpaceSize, ZAddressSpaceSize
|
||||
printf "Heap\n"
|
||||
printf " GlobalPhase: %u\n", ZGlobalPhase
|
||||
printf " GlobalSeqNum: %u\n", ZGlobalSeqNum
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user