Merge
This commit is contained in:
commit
d92c6042fe
@ -373,6 +373,20 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS],
|
||||
|
||||
FLAGS_SETUP_CFLAGS_CPU_DEP([BUILD], [OPENJDK_BUILD_])
|
||||
|
||||
COMPILER_FP_CONTRACT_OFF_FLAG="-ffp-contract=off"
|
||||
# Check that the compiler supports -ffp-contract=off flag
|
||||
# Set FDLIBM_CFLAGS to -ffp-contract=off if it does. Empty
|
||||
# otherwise.
|
||||
# These flags are required for GCC-based builds of
|
||||
# fdlibm with optimization without losing precision.
|
||||
# Notably, -ffp-contract=off needs to be added for GCC >= 4.6.
|
||||
if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang; then
|
||||
FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [${COMPILER_FP_CONTRACT_OFF_FLAG}],
|
||||
IF_TRUE: [FDLIBM_CFLAGS=${COMPILER_FP_CONTRACT_OFF_FLAG}],
|
||||
IF_FALSE: [FDLIBM_CFLAGS=""])
|
||||
fi
|
||||
AC_SUBST(FDLIBM_CFLAGS)
|
||||
|
||||
# Tests are only ever compiled for TARGET
|
||||
CFLAGS_TESTLIB="$CFLAGS_JDKLIB"
|
||||
CXXFLAGS_TESTLIB="$CXXFLAGS_JDKLIB"
|
||||
|
@ -450,6 +450,7 @@ CXXFLAGS_JDKEXE:=@CXXFLAGS_JDKEXE@
|
||||
LIBJSIG_HASHSTYLE_LDFLAGS := @LIBJSIG_HASHSTYLE_LDFLAGS@
|
||||
LIBJSIG_NOEXECSTACK_LDFLAGS := @LIBJSIG_NOEXECSTACK_LDFLAGS@
|
||||
|
||||
FDLIBM_CFLAGS := @FDLIBM_CFLAGS@
|
||||
JVM_CFLAGS := @JVM_CFLAGS@
|
||||
JVM_LDFLAGS := @JVM_LDFLAGS@
|
||||
JVM_ASFLAGS := @JVM_ASFLAGS@
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@ -31,7 +31,7 @@ $(eval $(call IncludeCustomExtension, copy/Copy-java.base.gmk))
|
||||
|
||||
################################################################################
|
||||
|
||||
ifneq ($(findstring $(OPENJDK_TARGET_OS), windows aix),)
|
||||
ifeq ($(OPENJDK_TARGET_OS), aix)
|
||||
|
||||
TZMAPPINGS_SRC := $(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS)/conf
|
||||
|
||||
|
@ -37,9 +37,17 @@ CLDR_BASE_LOCALES := "en-US"
|
||||
ZONENAME_TEMPLATE := $(TOPDIR)/src/java.base/share/classes/java/time/format/ZoneName.java.template
|
||||
TZDATA_DIR := $(TOPDIR)/make/data/tzdata
|
||||
|
||||
$(CLDR_BASEMETAINFO_FILE): $(wildcard $(CLDRSRCDIR)/common/dtd/*.dtd) \
|
||||
$(wildcard $(CLDRSRCDIR)/common/main/en*.xml) \
|
||||
$(wildcard $(CLDRSRCDIR)/common/supplemental/*.xml) \
|
||||
# tzmappings generation for Windows.
|
||||
# Since the rule is shared with CLDR_BASEMETAINFO_FILE target, note that
|
||||
# just removing the target tzmappings will not recreate the tzmappings file.
|
||||
ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
CLDR_WINTZMAPPINGS := $(GENSRC_BASEDIR)/windows/conf/tzmappings
|
||||
$(CLDR_WINTZMAPPINGS): $(CLDR_BASEMETAINFO_FILE)
|
||||
endif
|
||||
|
||||
$(CLDR_BASEMETAINFO_FILE): $(wildcard $(CLDRSRCDIR)/dtd/*.dtd) \
|
||||
$(wildcard $(CLDRSRCDIR)/main/en*.xml) \
|
||||
$(wildcard $(CLDRSRCDIR)/supplemental/*.xml) \
|
||||
$(ZONENAME_TEMPLATE) \
|
||||
$(BUILD_TOOLS_JDK)
|
||||
$(MKDIR) -p $(GENSRC_BASEDIR)
|
||||
@ -50,14 +58,14 @@ $(CLDR_BASEMETAINFO_FILE): $(wildcard $(CLDRSRCDIR)/common/dtd/*.dtd) \
|
||||
-zntempfile $(ZONENAME_TEMPLATE) \
|
||||
-tzdatadir $(TZDATA_DIR)
|
||||
|
||||
$(CLDR_METAINFO_FILE): $(wildcard $(CLDRSRCDIR)/common/dtd/*.dtd) \
|
||||
$(wildcard $(CLDRSRCDIR)/common/main/*.xml) \
|
||||
$(wildcard $(CLDRSRCDIR)/common/supplemental/*.xml) \
|
||||
$(CLDR_METAINFO_FILE): $(wildcard $(CLDRSRCDIR)/dtd/*.dtd) \
|
||||
$(wildcard $(CLDRSRCDIR)/main/*.xml) \
|
||||
$(wildcard $(CLDRSRCDIR)/supplemental/*.xml) \
|
||||
$(BUILD_TOOLS_JDK)
|
||||
$(MKDIR) -p $(GENSRC_DIR)
|
||||
$(TOOL_CLDRCONVERTER) -base $(CLDRSRCDIR) \
|
||||
-baselocales $(CLDR_BASE_LOCALES) \
|
||||
-o $(GENSRC_DIR)
|
||||
|
||||
GENSRC_JAVA_BASE += $(CLDR_BASEMETAINFO_FILE)
|
||||
GENSRC_JAVA_BASE += $(CLDR_BASEMETAINFO_FILE) $(CLDR_WINTZMAPPINGS)
|
||||
GENSRC_JDK_LOCALEDATA += $(CLDR_METAINFO_FILE)
|
||||
|
@ -25,6 +25,10 @@
|
||||
|
||||
ifeq ($(call check-jvm-feature, dtrace), true)
|
||||
ifeq ($(OPENJDK_TARGET_OS), solaris)
|
||||
JNI_INCLUDE_FLAGS := \
|
||||
-I$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
|
||||
-I$(SUPPORT_OUTPUTDIR)/modules_include/java.base/$(OPENJDK_TARGET_OS_INCLUDE_SUBDIR) \
|
||||
#
|
||||
|
||||
############################################################################
|
||||
# Build the stand-alone dtrace libraries.
|
||||
@ -34,10 +38,9 @@ ifeq ($(call check-jvm-feature, dtrace), true)
|
||||
NAME := jvm_dtrace, \
|
||||
OUTPUT_DIR := $(JVM_LIB_OUTPUTDIR), \
|
||||
SRC := $(TOPDIR)/src/java.base/solaris/native/libjvm_dtrace, \
|
||||
CFLAGS := -m64 -G -mt -KPIC, \
|
||||
CFLAGS := $(JNI_INCLUDE_FLAGS) -m64 -G -mt -KPIC -xldscope=hidden, \
|
||||
LDFLAGS := -m64 -mt -xnolib $(SHARED_LIBRARY_FLAGS), \
|
||||
LIBS := $(LIBDL) -lthread -ldoor, \
|
||||
MAPFILE := $(TOPDIR)/make/mapfiles/libjvm_dtrace/mapfile-vers, \
|
||||
OBJECT_DIR := $(LIBJVM_DTRACE_OUTPUTDIR)/objs, \
|
||||
))
|
||||
|
||||
@ -48,9 +51,8 @@ ifeq ($(call check-jvm-feature, dtrace), true)
|
||||
NAME := jvm_db, \
|
||||
OUTPUT_DIR := $(JVM_LIB_OUTPUTDIR), \
|
||||
SRC := $(TOPDIR)/src/java.base/solaris/native/libjvm_db, \
|
||||
CFLAGS := -I$(DTRACE_GENSRC_DIR) -m64 -G -mt -KPIC, \
|
||||
CFLAGS := -I$(DTRACE_GENSRC_DIR) $(JNI_INCLUDE_FLAGS) -m64 -G -mt -KPIC -xldscope=hidden, \
|
||||
LDFLAGS := -m64 -mt -xnolib $(SHARED_LIBRARY_FLAGS), \
|
||||
MAPFILE := $(TOPDIR)/make/mapfiles/libjvm_db/mapfile-vers, \
|
||||
OBJECT_DIR := $(LIBJVM_DB_OUTPUTDIR)/objs, \
|
||||
))
|
||||
|
||||
|
@ -30,7 +30,7 @@ $(eval $(call IncludeCustomExtension, hotspot/lib/JvmOverrideFiles.gmk))
|
||||
# status for individual files on specific platforms.
|
||||
|
||||
ifeq ($(TOOLCHAIN_TYPE), gcc)
|
||||
BUILD_LIBJVM_vmStructs.cpp_CXXFLAGS := -fno-var-tracking-assignments -O0
|
||||
BUILD_LIBJVM_vmStructs.cpp_CXXFLAGS := -fno-var-tracking-assignments
|
||||
BUILD_LIBJVM_jvmciCompilerToVM.cpp_CXXFLAGS := -fno-var-tracking-assignments
|
||||
BUILD_LIBJVM_jvmciCompilerToVMInit.cpp_CXXFLAGS := -fno-var-tracking-assignments
|
||||
BUILD_LIBJVM_assembler_x86.cpp_CXXFLAGS := -Wno-maybe-uninitialized
|
||||
|
@ -69,6 +69,7 @@ public class CLDRConverter {
|
||||
private static String METAZONES_SOURCE_FILE;
|
||||
private static String LIKELYSUBTAGS_SOURCE_FILE;
|
||||
private static String TIMEZONE_SOURCE_FILE;
|
||||
private static String WINZONES_SOURCE_FILE;
|
||||
static String DESTINATION_DIR = "build/gensrc";
|
||||
|
||||
static final String LOCALE_NAME_PREFIX = "locale.displayname.";
|
||||
@ -91,6 +92,7 @@ public class CLDRConverter {
|
||||
|
||||
private static SupplementDataParseHandler handlerSuppl;
|
||||
private static LikelySubtagsParseHandler handlerLikelySubtags;
|
||||
private static WinZonesParseHandler handlerWinZones;
|
||||
static SupplementalMetadataParseHandler handlerSupplMeta;
|
||||
static NumberingSystemsParseHandler handlerNumbering;
|
||||
static MetaZonesParseHandler handlerMetaZones;
|
||||
@ -241,6 +243,7 @@ public class CLDRConverter {
|
||||
METAZONES_SOURCE_FILE = CLDR_BASE + "/supplemental/metaZones.xml";
|
||||
TIMEZONE_SOURCE_FILE = CLDR_BASE + "/bcp47/timezone.xml";
|
||||
SPPL_META_SOURCE_FILE = CLDR_BASE + "/supplemental/supplementalMetadata.xml";
|
||||
WINZONES_SOURCE_FILE = CLDR_BASE + "/supplemental/windowsZones.xml";
|
||||
|
||||
if (BASE_LOCALES.isEmpty()) {
|
||||
setupBaseLocales("en-US");
|
||||
@ -255,9 +258,12 @@ public class CLDRConverter {
|
||||
List<Bundle> bundles = readBundleList();
|
||||
convertBundles(bundles);
|
||||
|
||||
// Generate java.time.format.ZoneName.java
|
||||
if (isBaseModule) {
|
||||
// Generate java.time.format.ZoneName.java
|
||||
generateZoneName();
|
||||
|
||||
// Generate Windows tzmappings
|
||||
generateWindowsTZMappings();
|
||||
}
|
||||
}
|
||||
|
||||
@ -432,6 +438,10 @@ public class CLDRConverter {
|
||||
// Currently interested in deprecated time zone ids and language aliases.
|
||||
handlerSupplMeta = new SupplementalMetadataParseHandler();
|
||||
parseLDMLFile(new File(SPPL_META_SOURCE_FILE), handlerSupplMeta);
|
||||
|
||||
// Parse windowsZones
|
||||
handlerWinZones = new WinZonesParseHandler();
|
||||
parseLDMLFile(new File(WINZONES_SOURCE_FILE), handlerWinZones);
|
||||
}
|
||||
|
||||
// Parsers for data in "bcp47" directory
|
||||
@ -1088,4 +1098,42 @@ public class CLDRConverter {
|
||||
throw new UncheckedIOException(e);
|
||||
}
|
||||
}
|
||||
|
||||
// Generate tzmappings for Windows. The format is:
|
||||
//
|
||||
// (Windows Zone Name):(REGION):(Java TZID)
|
||||
//
|
||||
// where:
|
||||
// Windows Zone Name: arbitrary time zone name string used in Windows
|
||||
// REGION: ISO3166 or UN M.49 code
|
||||
// Java TZID: Java's time zone ID
|
||||
//
|
||||
// Note: the entries are alphabetically sorted, *except* the "world" region
|
||||
// code, i.e., "001". It should be the last entry for the same windows time
|
||||
// zone name entries. (cf. TimeZone_md.c)
|
||||
private static void generateWindowsTZMappings() throws Exception {
|
||||
Files.createDirectories(Paths.get(DESTINATION_DIR, "windows", "conf"));
|
||||
Files.write(Paths.get(DESTINATION_DIR, "windows", "conf", "tzmappings"),
|
||||
handlerWinZones.keySet().stream()
|
||||
.map(k -> k + ":" + handlerWinZones.get(k) + ":")
|
||||
.sorted(new Comparator<String>() {
|
||||
public int compare(String t1, String t2) {
|
||||
String[] s1 = t1.split(":");
|
||||
String[] s2 = t2.split(":");
|
||||
if (s1[0].equals(s2[0])) {
|
||||
if (s1[1].equals("001")) {
|
||||
return 1;
|
||||
} else if (s2[1].equals("001")) {
|
||||
return -1;
|
||||
} else {
|
||||
return s1[1].compareTo(s2[1]);
|
||||
}
|
||||
} else {
|
||||
return s1[0].compareTo(s2[0]);
|
||||
}
|
||||
}
|
||||
})
|
||||
.collect(Collectors.toList()),
|
||||
StandardOpenOption.CREATE, StandardOpenOption.TRUNCATE_EXISTING);
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,68 @@
|
||||
/*
|
||||
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package build.tools.cldrconverter;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Stream;
|
||||
import org.xml.sax.Attributes;
|
||||
import org.xml.sax.InputSource;
|
||||
import org.xml.sax.SAXException;
|
||||
|
||||
/**
|
||||
* Handles parsing of files in Locale Data Markup Language for
|
||||
* windowsZones.xml
|
||||
*/
|
||||
|
||||
class WinZonesParseHandler extends AbstractLDMLHandler<Object> {
|
||||
@Override
|
||||
public InputSource resolveEntity(String publicID, String systemID) throws IOException, SAXException {
|
||||
// avoid HTTP traffic to unicode.org
|
||||
if (systemID.startsWith(CLDRConverter.SPPL_LDML_DTD_SYSTEM_ID)) {
|
||||
return new InputSource((new File(CLDRConverter.LOCAL_SPPL_LDML_DTD)).toURI().toString());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {
|
||||
switch (qName) {
|
||||
case "mapZone":
|
||||
String zoneName = attributes.getValue("other");
|
||||
String territory = attributes.getValue("territory");
|
||||
String javatz = attributes.getValue("type").replaceFirst("\\s.*", "");
|
||||
put(zoneName + ":" + territory, javatz);
|
||||
pushIgnoredContainer(qName);
|
||||
break;
|
||||
default:
|
||||
// treat anything else as a container
|
||||
pushContainer(qName, attributes);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
@ -30,7 +30,7 @@ import propertiesparser.gen.ClassGenerator;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.PrintStream;
|
||||
import java.util.HashMap;
|
||||
import java.util.TreeMap;
|
||||
import java.util.Map;
|
||||
|
||||
/** Translates a .properties file into a .java file containing an enum-like Java class
|
||||
@ -96,12 +96,13 @@ public class PropertiesParser {
|
||||
}
|
||||
|
||||
private Map<String, String> parseOptions(String args[]) {
|
||||
Map<String, String> optionsMap = new HashMap<>(args.length);
|
||||
/* Use TreeMap to guarantee stable forEach iteration */
|
||||
Map<String, String> optionsMap = new TreeMap<>();
|
||||
for ( int i = 0; i < args.length ; i++ ) {
|
||||
if ( "-compile".equals(args[i]) && i+2 < args.length ) {
|
||||
optionsMap.put(args[++i], args[++i]);
|
||||
} else {
|
||||
return new HashMap<>();
|
||||
return new TreeMap<>();
|
||||
}
|
||||
}
|
||||
return optionsMap;
|
||||
|
@ -39,20 +39,15 @@ ifeq ($(OPENJDK_TARGET_OS), solaris)
|
||||
BUILD_LIBFDLIBM_OPTIMIZATION := HIGH
|
||||
endif
|
||||
|
||||
ifeq ($(OPENJDK_TARGET_OS), linux)
|
||||
ifeq ($(OPENJDK_TARGET_CPU), ppc64)
|
||||
BUILD_LIBFDLIBM_OPTIMIZATION := HIGH
|
||||
else ifeq ($(OPENJDK_TARGET_CPU), ppc64le)
|
||||
BUILD_LIBFDLIBM_OPTIMIZATION := HIGH
|
||||
else ifeq ($(OPENJDK_TARGET_CPU), s390x)
|
||||
BUILD_LIBFDLIBM_OPTIMIZATION := HIGH
|
||||
else ifeq ($(OPENJDK_TARGET_CPU), aarch64)
|
||||
BUILD_LIBFDLIBM_OPTIMIZATION := HIGH
|
||||
endif
|
||||
# If FDLIBM_CFLAGS is non-empty we know that we can optimize
|
||||
# fdlibm when adding those extra C flags. Currently GCC,
|
||||
# and clang only.
|
||||
ifneq ($(FDLIBM_CFLAGS), )
|
||||
BUILD_LIBFDLIBM_OPTIMIZATION := LOW
|
||||
endif
|
||||
|
||||
LIBFDLIBM_SRC := $(TOPDIR)/src/java.base/share/native/libfdlibm
|
||||
LIBFDLIBM_CFLAGS := -I$(LIBFDLIBM_SRC)
|
||||
LIBFDLIBM_CFLAGS := -I$(LIBFDLIBM_SRC) $(FDLIBM_CFLAGS)
|
||||
|
||||
ifneq ($(OPENJDK_TARGET_OS), macosx)
|
||||
$(eval $(call SetupNativeCompilation, BUILD_LIBFDLIBM, \
|
||||
@ -64,10 +59,6 @@ ifneq ($(OPENJDK_TARGET_OS), macosx)
|
||||
CFLAGS := $(CFLAGS_JDKLIB) $(LIBFDLIBM_CFLAGS), \
|
||||
CFLAGS_windows_debug := -DLOGGING, \
|
||||
CFLAGS_aix := -qfloat=nomaf, \
|
||||
CFLAGS_linux_ppc64 := -ffp-contract=off, \
|
||||
CFLAGS_linux_ppc64le := -ffp-contract=off, \
|
||||
CFLAGS_linux_s390x := -ffp-contract=off, \
|
||||
CFLAGS_linux_aarch64 := -ffp-contract=off, \
|
||||
DISABLED_WARNINGS_gcc := sign-compare misleading-indentation array-bounds, \
|
||||
DISABLED_WARNINGS_microsoft := 4146 4244 4018, \
|
||||
ARFLAGS := $(ARFLAGS), \
|
||||
|
@ -195,3 +195,14 @@ ifeq ($(STATIC_BUILD), true)
|
||||
|
||||
TARGETS += $(JAVA_BASE_EXPORT_SYMBOL_FILE)
|
||||
endif
|
||||
|
||||
################################################################################
|
||||
# Copy tzmappings file for Windows
|
||||
|
||||
ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
$(eval $(call SetupCopyFiles, COPY_TZMAPPINGS, \
|
||||
FILES := $(SUPPORT_OUTPUTDIR)/gensrc/java.base/windows/conf/tzmappings, \
|
||||
DEST := $(call FindLibDirForModule, $(MODULE)), \
|
||||
))
|
||||
TARGETS += $(COPY_TZMAPPINGS)
|
||||
endif
|
||||
|
@ -52,7 +52,7 @@ endif
|
||||
|
||||
$(eval $(call SetupJdkLibrary, BUILD_LIBSA, \
|
||||
NAME := saproc, \
|
||||
OPTIMIZATION := NONE, \
|
||||
OPTIMIZATION := HIGH, \
|
||||
DISABLED_WARNINGS_microsoft := 4267, \
|
||||
DISABLED_WARNINGS_gcc := sign-compare, \
|
||||
DISABLED_WARNINGS_CXX_solstudio := truncwarn unknownpragma, \
|
||||
|
@ -1,83 +0,0 @@
|
||||
#
|
||||
# Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
# Define library interface.
|
||||
|
||||
SUNWprivate_1.1 {
|
||||
global:
|
||||
Java_com_sun_media_sound_DirectAudioDevice_nAvailable;
|
||||
Java_com_sun_media_sound_DirectAudioDevice_nClose;
|
||||
Java_com_sun_media_sound_DirectAudioDevice_nFlush;
|
||||
Java_com_sun_media_sound_DirectAudioDevice_nGetBufferSize;
|
||||
Java_com_sun_media_sound_DirectAudioDevice_nGetBytePosition;
|
||||
Java_com_sun_media_sound_DirectAudioDevice_nGetFormats;
|
||||
Java_com_sun_media_sound_DirectAudioDevice_nIsStillDraining;
|
||||
Java_com_sun_media_sound_DirectAudioDevice_nOpen;
|
||||
Java_com_sun_media_sound_DirectAudioDevice_nRead;
|
||||
Java_com_sun_media_sound_DirectAudioDevice_nRequiresServicing;
|
||||
Java_com_sun_media_sound_DirectAudioDevice_nService;
|
||||
Java_com_sun_media_sound_DirectAudioDevice_nSetBytePosition;
|
||||
Java_com_sun_media_sound_DirectAudioDevice_nStart;
|
||||
Java_com_sun_media_sound_DirectAudioDevice_nStop;
|
||||
Java_com_sun_media_sound_DirectAudioDevice_nWrite;
|
||||
Java_com_sun_media_sound_DirectAudioDeviceProvider_nGetNumDevices;
|
||||
Java_com_sun_media_sound_DirectAudioDeviceProvider_nNewDirectAudioDeviceInfo;
|
||||
Java_com_sun_media_sound_MidiInDevice_nClose;
|
||||
Java_com_sun_media_sound_MidiInDevice_nGetMessages;
|
||||
Java_com_sun_media_sound_MidiInDevice_nGetTimeStamp;
|
||||
Java_com_sun_media_sound_MidiInDevice_nOpen;
|
||||
Java_com_sun_media_sound_MidiInDevice_nStart;
|
||||
Java_com_sun_media_sound_MidiInDevice_nStop;
|
||||
Java_com_sun_media_sound_MidiInDeviceProvider_nGetDescription;
|
||||
Java_com_sun_media_sound_MidiInDeviceProvider_nGetName;
|
||||
Java_com_sun_media_sound_MidiInDeviceProvider_nGetNumDevices;
|
||||
Java_com_sun_media_sound_MidiInDeviceProvider_nGetVendor;
|
||||
Java_com_sun_media_sound_MidiInDeviceProvider_nGetVersion;
|
||||
Java_com_sun_media_sound_MidiOutDevice_nClose;
|
||||
Java_com_sun_media_sound_MidiOutDevice_nGetTimeStamp;
|
||||
Java_com_sun_media_sound_MidiOutDevice_nOpen;
|
||||
Java_com_sun_media_sound_MidiOutDevice_nSendLongMessage;
|
||||
Java_com_sun_media_sound_MidiOutDevice_nSendShortMessage;
|
||||
Java_com_sun_media_sound_MidiOutDeviceProvider_nGetDescription;
|
||||
Java_com_sun_media_sound_MidiOutDeviceProvider_nGetName;
|
||||
Java_com_sun_media_sound_MidiOutDeviceProvider_nGetNumDevices;
|
||||
Java_com_sun_media_sound_MidiOutDeviceProvider_nGetVendor;
|
||||
Java_com_sun_media_sound_MidiOutDeviceProvider_nGetVersion;
|
||||
Java_com_sun_media_sound_Platform_nIsBigEndian;
|
||||
Java_com_sun_media_sound_PortMixer_nClose;
|
||||
Java_com_sun_media_sound_PortMixer_nControlGetFloatValue;
|
||||
Java_com_sun_media_sound_PortMixer_nControlGetIntValue;
|
||||
Java_com_sun_media_sound_PortMixer_nControlSetFloatValue;
|
||||
Java_com_sun_media_sound_PortMixer_nControlSetIntValue;
|
||||
Java_com_sun_media_sound_PortMixer_nGetControls;
|
||||
Java_com_sun_media_sound_PortMixer_nGetPortCount;
|
||||
Java_com_sun_media_sound_PortMixer_nGetPortName;
|
||||
Java_com_sun_media_sound_PortMixer_nGetPortType;
|
||||
Java_com_sun_media_sound_PortMixer_nOpen;
|
||||
Java_com_sun_media_sound_PortMixerProvider_nGetNumDevices;
|
||||
Java_com_sun_media_sound_PortMixerProvider_nNewPortMixerInfo;
|
||||
local:
|
||||
*;
|
||||
};
|
@ -1,38 +0,0 @@
|
||||
#
|
||||
|
||||
#
|
||||
# Copyright (c) 2005, 2008, 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.
|
||||
#
|
||||
#
|
||||
|
||||
# Define library interface.
|
||||
|
||||
SUNWprivate_1.1 {
|
||||
global:
|
||||
Jagent_create;
|
||||
Jagent_destroy;
|
||||
Jframe_iter;
|
||||
#Jget_vframe;
|
||||
#Jlookup_by_regs;
|
||||
local:
|
||||
*;
|
||||
};
|
@ -1,37 +0,0 @@
|
||||
#
|
||||
|
||||
#
|
||||
# Copyright (c) 2006, 2008, 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.
|
||||
#
|
||||
#
|
||||
|
||||
# Define library interface for JVM-DTrace interface
|
||||
|
||||
SUNWprivate_1.1 {
|
||||
global:
|
||||
jvm_attach;
|
||||
jvm_get_last_error;
|
||||
jvm_enable_dtprobes;
|
||||
jvm_detach;
|
||||
local:
|
||||
*;
|
||||
};
|
@ -350,13 +350,11 @@ if [ "$OPENJDK_TARGET_OS" = "solaris" ] && [ "$OPENJDK_TARGET_CPU" = "sparcv9" ]
|
||||
|
||||
MAX_KNOWN_DIS_DIFF_SIZE="3000"
|
||||
|
||||
# On slowdebug the disassembly can differ randomly.
|
||||
if [ "$DEBUG_LEVEL" = "slowdebug" ]; then
|
||||
ACCEPTED_DIS_DIFF="
|
||||
./lib/libfontmanager.so
|
||||
./lib/server/libjvm.so
|
||||
"
|
||||
fi
|
||||
ACCEPTED_DIS_DIFF="
|
||||
./lib/libfontmanager.so
|
||||
./lib/libsaproc.so
|
||||
./lib/server/libjvm.so
|
||||
"
|
||||
|
||||
SKIP_FULLDUMP_DIFF="true"
|
||||
|
||||
|
@ -1569,7 +1569,6 @@ void LIR_Assembler::emit_compare_and_swap(LIR_OpCompareAndSwap* op) {
|
||||
}
|
||||
Register newval = as_reg(op->new_value());
|
||||
Register cmpval = as_reg(op->cmp_value());
|
||||
Label succeed, fail, around;
|
||||
|
||||
if (op->code() == lir_cas_obj) {
|
||||
if (UseCompressedOops) {
|
||||
|
@ -64,7 +64,7 @@ int C1_MacroAssembler::lock_object(Register hdr, Register obj, Register disp_hdr
|
||||
const int aligned_mask = BytesPerWord -1;
|
||||
const int hdr_offset = oopDesc::mark_offset_in_bytes();
|
||||
assert(hdr != obj && hdr != disp_hdr && obj != disp_hdr, "registers must be different");
|
||||
Label done, fail;
|
||||
Label done;
|
||||
int null_check_offset = -1;
|
||||
|
||||
verify_oop(obj);
|
||||
|
@ -615,7 +615,7 @@ OopMapSet* Runtime1::generate_patching(StubAssembler* sasm, address target) {
|
||||
// Runtime will return true if the nmethod has been deoptimized during
|
||||
// the patching process. In that case we must do a deopt reexecute instead.
|
||||
|
||||
Label reexecuteEntry, cont;
|
||||
Label cont;
|
||||
|
||||
__ cbz(r0, cont); // have we deoptimized?
|
||||
|
||||
|
@ -5431,7 +5431,7 @@ void MacroAssembler::zero_words(Register ptr, Register cnt)
|
||||
|
||||
BLOCK_COMMENT("zero_words {");
|
||||
cmp(cnt, (u1)zero_words_block_size);
|
||||
Label around, done, done16;
|
||||
Label around;
|
||||
br(LO, around);
|
||||
{
|
||||
RuntimeAddress zero_blocks = RuntimeAddress(StubRoutines::aarch64::zero_blocks());
|
||||
|
@ -1004,7 +1004,7 @@ void MacroAssembler::generate__kernel_rem_pio2(address two_over_pi, address pio2
|
||||
br(LT, Z_IS_LESS_THAN_TWO24B);
|
||||
fmuld(v1, v18, v17); // twon24*z
|
||||
frintzd(v1, v1); // v1 = (double)(int)(v1)
|
||||
fmaddd(v2, v10, v1, v18);
|
||||
fmsubd(v2, v10, v1, v18);
|
||||
fcvtzdw(tmp3, v1); // (int)fw
|
||||
fcvtzdw(tmp2, v2); // double to int
|
||||
strw(tmp2, Address(iqBase, jz, Address::lsl(2)));
|
||||
|
@ -634,7 +634,7 @@ class StubGenerator: public StubCodeGenerator {
|
||||
// r11 < MacroAssembler::zero_words_block_size.
|
||||
|
||||
address generate_zero_blocks() {
|
||||
Label store_pair, loop_store_pair, done;
|
||||
Label done;
|
||||
Label base_aligned;
|
||||
|
||||
Register base = r10, cnt = r11;
|
||||
@ -1039,7 +1039,7 @@ class StubGenerator: public StubCodeGenerator {
|
||||
int direction = is_backwards ? -1 : 1;
|
||||
int unit = wordSize * direction;
|
||||
|
||||
Label Lpair, Lword, Lint, Lshort, Lbyte;
|
||||
Label Lword, Lint, Lshort, Lbyte;
|
||||
|
||||
assert(granularity
|
||||
&& granularity <= sizeof (jlong), "Impossible granularity in copy_memory_small");
|
||||
@ -1096,7 +1096,7 @@ class StubGenerator: public StubCodeGenerator {
|
||||
|
||||
// <= 96 bytes do inline. Direction doesn't matter because we always
|
||||
// load all the data before writing anything
|
||||
Label copy4, copy8, copy16, copy32, copy80, copy128, copy_big, finish;
|
||||
Label copy4, copy8, copy16, copy32, copy80, copy_big, finish;
|
||||
const Register t2 = r5, t3 = r6, t4 = r7, t5 = r8;
|
||||
const Register t6 = r9, t7 = r10, t8 = r11, t9 = r12;
|
||||
const Register send = r17, dend = r18;
|
||||
@ -1966,7 +1966,7 @@ class StubGenerator: public StubCodeGenerator {
|
||||
address int_copy_entry, address oop_copy_entry,
|
||||
address long_copy_entry, address checkcast_copy_entry) {
|
||||
|
||||
Label L_failed, L_failed_0, L_objArray;
|
||||
Label L_failed, L_objArray;
|
||||
Label L_copy_bytes, L_copy_shorts, L_copy_ints, L_copy_longs;
|
||||
|
||||
// Input registers
|
||||
@ -4366,7 +4366,7 @@ class StubGenerator: public StubCodeGenerator {
|
||||
Register ch1 = rscratch1, ch2 = rscratch2, first = tmp3;
|
||||
|
||||
__ push(spilled_regs, sp);
|
||||
Label L_LOOP, L_LOOP_PROCEED, L_SMALL, L_HAS_ZERO, L_SMALL_MATCH_LOOP,
|
||||
Label L_LOOP, L_LOOP_PROCEED, L_SMALL, L_HAS_ZERO,
|
||||
L_HAS_ZERO_LOOP, L_CMP_LOOP, L_CMP_LOOP_NOMATCH, L_SMALL_PROCEED,
|
||||
L_SMALL_HAS_ZERO_LOOP, L_SMALL_CMP_LOOP_NOMATCH, L_SMALL_CMP_LOOP,
|
||||
L_POST_LOOP, L_CMP_LOOP_LAST_CMP, L_HAS_ZERO_LOOP_NOMATCH,
|
||||
|
@ -1450,7 +1450,7 @@ address TemplateInterpreterGenerator::generate_native_entry(bool synchronized) {
|
||||
// and result handler will pick it up
|
||||
|
||||
{
|
||||
Label no_oop, not_weak, store_result;
|
||||
Label no_oop;
|
||||
__ adr(t, ExternalAddress(AbstractInterpreter::result_handler(T_OBJECT)));
|
||||
__ cmp(t, result_handler);
|
||||
__ br(Assembler::NE, no_oop);
|
||||
|
@ -1,5 +1,5 @@
|
||||
//
|
||||
// Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
// Copyright (c) 2008, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
// DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
//
|
||||
// This code is free software; you can redistribute it and/or modify it
|
||||
@ -1639,7 +1639,7 @@ encode %{
|
||||
%}
|
||||
|
||||
enc_class enc_String_Equals(R0RegP str1, R1RegP str2, R2RegI cnt, iRegI result, iRegI tmp1, iRegI tmp2) %{
|
||||
Label Lword_loop, Lpost_word, Lchar, Lchar_loop, Ldone, Lequal;
|
||||
Label Lchar, Lchar_loop, Ldone, Lequal;
|
||||
MacroAssembler _masm(&cbuf);
|
||||
|
||||
Register str1_reg = $str1$$Register;
|
||||
@ -1701,7 +1701,7 @@ encode %{
|
||||
%}
|
||||
|
||||
enc_class enc_Array_Equals(R0RegP ary1, R1RegP ary2, iRegI tmp1, iRegI tmp2, iRegI tmp3, iRegI result) %{
|
||||
Label Lvector, Ldone, Lloop, Lequal;
|
||||
Label Ldone, Lloop, Lequal;
|
||||
MacroAssembler _masm(&cbuf);
|
||||
|
||||
Register ary1_reg = $ary1$$Register;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2008, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -370,7 +370,6 @@ void C1_MacroAssembler::unlock_object(Register hdr, Register obj,
|
||||
}
|
||||
|
||||
assert(oopDesc::mark_offset_in_bytes() == 0, "Required by atomic instructions");
|
||||
Label retry;
|
||||
|
||||
// Load displaced header and object from the lock
|
||||
ldr(hdr, Address(disp_hdr, mark_offset));
|
||||
|
@ -260,7 +260,7 @@ void MacroAssembler::check_klass_subtype_slow_path(Register sub_klass,
|
||||
|
||||
add(count_temp, count_temp, 1);
|
||||
|
||||
Label L_loop, L_setnz_and_fail, L_fail;
|
||||
Label L_loop, L_fail;
|
||||
|
||||
// Top of search loop
|
||||
bind(L_loop);
|
||||
|
@ -446,7 +446,6 @@ void MethodHandles::generate_method_handle_dispatch(MacroAssembler* _masm,
|
||||
}
|
||||
|
||||
// given intf, index, and recv klass, dispatch to the implementation method
|
||||
Label L_no_such_interface;
|
||||
__ lookup_interface_method(temp1_recv_klass, temp3_intf,
|
||||
// note: next two args must be the same:
|
||||
rbx_index, rbx_method,
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2008, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -1566,7 +1566,7 @@ nmethod* SharedRuntime::generate_native_wrapper(MacroAssembler* masm,
|
||||
const Register disp_hdr = AARCH64_ONLY(R22) NOT_AARCH64(altFP_7_11);
|
||||
const Register tmp = AARCH64_ONLY(R23) NOT_AARCH64(R8);
|
||||
|
||||
Label slow_lock, slow_lock_biased, lock_done, fast_lock, leave;
|
||||
Label slow_lock, slow_lock_biased, lock_done, fast_lock;
|
||||
if (method->is_synchronized()) {
|
||||
// The first argument is a handle to sync object (a class or an instance)
|
||||
__ ldr(sync_obj, Address(R1));
|
||||
@ -1686,7 +1686,7 @@ nmethod* SharedRuntime::generate_native_wrapper(MacroAssembler* masm,
|
||||
__ b(reguard, eq);
|
||||
__ bind(reguard_done);
|
||||
|
||||
Label slow_unlock, unlock_done, retry;
|
||||
Label slow_unlock, unlock_done;
|
||||
if (method->is_synchronized()) {
|
||||
__ ldr(sync_obj, Address(sync_handle));
|
||||
|
||||
|
@ -2758,7 +2758,6 @@ class StubGenerator: public StubCodeGenerator {
|
||||
Label L_doLast;
|
||||
Label L_do44;
|
||||
Label L_do52;
|
||||
Label L_do60;
|
||||
|
||||
Register from = R3_ARG1; // source array address
|
||||
Register to = R4_ARG2; // destination array address
|
||||
@ -3296,8 +3295,8 @@ class StubGenerator: public StubCodeGenerator {
|
||||
const Register cs = R27;
|
||||
|
||||
// Labels
|
||||
Label SKIP_LSHIFT, SKIP_DIAGONAL_SUM, SKIP_ADDONE, SKIP_MULADD, SKIP_LOOP_SQUARE;
|
||||
Label LOOP_LSHIFT, LOOP_DIAGONAL_SUM, LOOP_ADDONE, LOOP_MULADD, LOOP_SQUARE;
|
||||
Label SKIP_LSHIFT, SKIP_DIAGONAL_SUM, SKIP_ADDONE, SKIP_LOOP_SQUARE;
|
||||
Label LOOP_LSHIFT, LOOP_DIAGONAL_SUM, LOOP_ADDONE, LOOP_SQUARE;
|
||||
|
||||
// Save non-volatile regs (frameless).
|
||||
int current_offs = -8;
|
||||
|
@ -3880,7 +3880,6 @@ void TemplateTable::multianewarray() {
|
||||
void TemplateTable::arraylength() {
|
||||
transition(atos, itos);
|
||||
|
||||
Label LnoException;
|
||||
__ verify_oop(R17_tos);
|
||||
__ null_check_throw(R17_tos, arrayOopDesc::length_offset_in_bytes(), R11_scratch1);
|
||||
__ lwa(R17_tos, arrayOopDesc::length_offset_in_bytes(), R17_tos);
|
||||
@ -4081,7 +4080,7 @@ void TemplateTable::monitorenter() {
|
||||
found_same_obj = CCR1,
|
||||
reached_limit = CCR6;
|
||||
{
|
||||
Label Lloop, Lentry;
|
||||
Label Lloop;
|
||||
Register Rlimit = Rcurrent_monitor;
|
||||
|
||||
// Set up search loop - start with topmost monitor.
|
||||
|
@ -3079,7 +3079,7 @@ void MacroAssembler::check_klass_subtype_slow_path(Register Rsubklass,
|
||||
// Input registers must not overlap.
|
||||
// Also check for R1 which is explicitely used here.
|
||||
assert_different_registers(Z_R1, Rsubklass, Rsuperklass, Rarray_ptr, Rlength);
|
||||
NearLabel L_fallthrough, L_loop;
|
||||
NearLabel L_fallthrough;
|
||||
int label_nulls = 0;
|
||||
if (L_success == NULL) { L_success = &L_fallthrough; label_nulls++; }
|
||||
if (L_failure == NULL) { L_failure = &L_fallthrough; label_nulls++; }
|
||||
|
@ -285,11 +285,6 @@ class StubGenerator: public StubCodeGenerator {
|
||||
// Just pop the topmost frame ...
|
||||
//
|
||||
|
||||
Label ret_is_object;
|
||||
Label ret_is_long;
|
||||
Label ret_is_float;
|
||||
Label ret_is_double;
|
||||
|
||||
// Restore frame pointer.
|
||||
__ z_lg(r_entryframe_fp, _z_abi(callers_sp), Z_SP);
|
||||
// Pop frame. Done here to minimize stalls.
|
||||
|
@ -3785,7 +3785,6 @@ void TemplateTable::_new() {
|
||||
Label slow_case;
|
||||
Label done;
|
||||
Label initialize_header;
|
||||
Label allocate_shared;
|
||||
|
||||
BLOCK_COMMENT("TemplateTable::_new {");
|
||||
__ get_2_byte_integer_at_bcp(offset/*dest*/, 1, InterpreterMacroAssembler::Unsigned);
|
||||
|
@ -2648,8 +2648,6 @@ void MacroAssembler::compiler_lock_object(Register Roop, Register Rmark,
|
||||
inc_counter((address) counters->total_entry_count_addr(), Rmark, Rscratch);
|
||||
}
|
||||
|
||||
Label Egress ;
|
||||
|
||||
// Aggressively avoid the Store-before-CAS penalty
|
||||
// Defer the store into box->dhw until after the CAS
|
||||
Label IsInflated, Recursive ;
|
||||
@ -4171,7 +4169,7 @@ void MacroAssembler::kernel_crc32(Register crc, Register buf, Register len, Regi
|
||||
Label L_main_loop_prologue;
|
||||
Label L_fold_512b, L_fold_512b_loop, L_fold_128b;
|
||||
Label L_fold_tail, L_fold_tail_loop;
|
||||
Label L_8byte_fold_loop, L_8byte_fold_check;
|
||||
Label L_8byte_fold_check;
|
||||
|
||||
const Register tmp[CRC32_TMP_REG_NUM] = {L0, L1, L2, L3, L4, L5, L6, G1, I0, I1, I2, I3, I4, I5, I7, O4, O5, G3};
|
||||
|
||||
|
@ -166,7 +166,6 @@ VtableStub* VtableStubs::create_itable_stub(int itable_index) {
|
||||
Register G3_Klass = G3_scratch;
|
||||
Register G5_icholder = G5; // Passed in as an argument
|
||||
Register G4_interface = G4_scratch;
|
||||
Label search;
|
||||
|
||||
// Entry arguments:
|
||||
// G5_interface: Interface
|
||||
|
@ -1778,7 +1778,6 @@ void LIR_Assembler::emit_typecheck_helper(LIR_OpTypeCheck *op, Label* success, L
|
||||
__ bind(profile_cast_success);
|
||||
__ mov_metadata(mdo, md->constant_encoding());
|
||||
__ load_klass(recv, obj);
|
||||
Label update_done;
|
||||
type_profile_helper(mdo, md, data, recv, success);
|
||||
__ jmp(*success);
|
||||
|
||||
@ -1861,7 +1860,6 @@ void LIR_Assembler::emit_opTypeCheck(LIR_OpTypeCheck* op) {
|
||||
__ bind(profile_cast_success);
|
||||
__ mov_metadata(mdo, md->constant_encoding());
|
||||
__ load_klass(recv, value);
|
||||
Label update_done;
|
||||
type_profile_helper(mdo, md, data, recv, &done);
|
||||
__ jmpb(done);
|
||||
|
||||
@ -3048,7 +3046,6 @@ void LIR_Assembler::emit_arraycopy(LIR_OpArrayCopy* op) {
|
||||
|
||||
// if we don't know anything, just go through the generic arraycopy
|
||||
if (default_type == NULL) {
|
||||
Label done;
|
||||
// save outgoing arguments on stack in case call to System.arraycopy is needed
|
||||
// HACK ALERT. This code used to push the parameters in a hardwired fashion
|
||||
// for interpreter calling conventions. Now we have to do it in new style conventions.
|
||||
|
@ -957,7 +957,7 @@ OopMapSet* Runtime1::generate_patching(StubAssembler* sasm, address target) {
|
||||
// Runtime will return true if the nmethod has been deoptimized during
|
||||
// the patching process. In that case we must do a deopt reexecute instead.
|
||||
|
||||
Label reexecuteEntry, cont;
|
||||
Label cont;
|
||||
|
||||
__ testptr(rax, rax); // have we deoptimized?
|
||||
__ jcc(Assembler::equal, cont); // no
|
||||
|
@ -170,7 +170,7 @@ void InterpreterMacroAssembler::profile_arguments_type(Register mdp, Register ca
|
||||
void InterpreterMacroAssembler::profile_return_type(Register mdp, Register ret, Register tmp) {
|
||||
assert_different_registers(mdp, ret, tmp, _bcp_register);
|
||||
if (ProfileInterpreter && MethodData::profile_return()) {
|
||||
Label profile_continue, done;
|
||||
Label profile_continue;
|
||||
|
||||
test_method_data_pointer(mdp, profile_continue);
|
||||
|
||||
@ -204,7 +204,7 @@ void InterpreterMacroAssembler::profile_return_type(Register mdp, Register ret,
|
||||
|
||||
void InterpreterMacroAssembler::profile_parameters_type(Register mdp, Register tmp1, Register tmp2) {
|
||||
if (ProfileInterpreter && MethodData::profile_parameters()) {
|
||||
Label profile_continue, done;
|
||||
Label profile_continue;
|
||||
|
||||
test_method_data_pointer(mdp, profile_continue);
|
||||
|
||||
@ -1703,12 +1703,12 @@ void InterpreterMacroAssembler::record_item_in_profile_helper(Register item, Reg
|
||||
bind(next_test);
|
||||
|
||||
if (test_for_null_also) {
|
||||
Label found_null;
|
||||
// Failed the equality check on item[n]... Test for null.
|
||||
testptr(reg2, reg2);
|
||||
if (start_row == last_row) {
|
||||
// The only thing left to do is handle the null case.
|
||||
if (non_profiled_offset >= 0) {
|
||||
Label found_null;
|
||||
jccb(Assembler::zero, found_null);
|
||||
// Item did not match any saved item and there is no empty row for it.
|
||||
// Increment total counter to indicate polymorphic case.
|
||||
@ -1720,6 +1720,7 @@ void InterpreterMacroAssembler::record_item_in_profile_helper(Register item, Reg
|
||||
}
|
||||
break;
|
||||
}
|
||||
Label found_null;
|
||||
// Since null is rare, make it be the branch-taken case.
|
||||
jcc(Assembler::zero, found_null);
|
||||
|
||||
|
@ -7982,7 +7982,7 @@ void MacroAssembler::generate_fill(BasicType t, bool aligned,
|
||||
Register rtmp, XMMRegister xtmp) {
|
||||
ShortBranchVerifier sbv(this);
|
||||
assert_different_registers(to, value, count, rtmp);
|
||||
Label L_exit, L_skip_align1, L_skip_align2, L_fill_byte;
|
||||
Label L_exit;
|
||||
Label L_fill_2_bytes, L_fill_4_bytes;
|
||||
|
||||
int shift = -1;
|
||||
@ -8017,8 +8017,10 @@ void MacroAssembler::generate_fill(BasicType t, bool aligned,
|
||||
cmpl(count, 2<<shift); // Short arrays (< 8 bytes) fill by element
|
||||
jcc(Assembler::below, L_fill_4_bytes); // use unsigned cmp
|
||||
if (!UseUnalignedLoadStores && !aligned && (t == T_BYTE || t == T_SHORT)) {
|
||||
Label L_skip_align2;
|
||||
// align source address at 4 bytes address boundary
|
||||
if (t == T_BYTE) {
|
||||
Label L_skip_align1;
|
||||
// One byte misalignment happens only for byte arrays
|
||||
testptr(to, 1);
|
||||
jccb(Assembler::zero, L_skip_align1);
|
||||
@ -8183,6 +8185,7 @@ void MacroAssembler::generate_fill(BasicType t, bool aligned,
|
||||
jccb(Assembler::zero, L_fill_2_bytes);
|
||||
movl(Address(to, 0), value);
|
||||
if (t == T_BYTE || t == T_SHORT) {
|
||||
Label L_fill_byte;
|
||||
addptr(to, 4);
|
||||
BIND(L_fill_2_bytes);
|
||||
// fill trailing 2 bytes
|
||||
@ -8246,7 +8249,7 @@ void MacroAssembler::encode_iso_array(Register src, Register dst, Register len,
|
||||
negptr(len);
|
||||
|
||||
if (UseSSE42Intrinsics || UseAVX >= 2) {
|
||||
Label L_chars_8_check, L_copy_8_chars, L_copy_8_chars_exit;
|
||||
Label L_copy_8_chars, L_copy_8_chars_exit;
|
||||
Label L_chars_16_check, L_copy_16_chars, L_copy_16_chars_exit;
|
||||
|
||||
if (UseAVX >= 2) {
|
||||
@ -8812,9 +8815,8 @@ void MacroAssembler::multiply_to_len(Register x, Register xlen, Register y, Regi
|
||||
void MacroAssembler::vectorized_mismatch(Register obja, Register objb, Register length, Register log2_array_indxscale,
|
||||
Register result, Register tmp1, Register tmp2, XMMRegister rymm0, XMMRegister rymm1, XMMRegister rymm2){
|
||||
assert(UseSSE42Intrinsics, "SSE4.2 must be enabled.");
|
||||
Label VECTOR64_LOOP, VECTOR64_TAIL, VECTOR64_NOT_EQUAL, VECTOR32_TAIL;
|
||||
Label VECTOR32_LOOP, VECTOR16_LOOP, VECTOR8_LOOP, VECTOR4_LOOP;
|
||||
Label VECTOR16_TAIL, VECTOR8_TAIL, VECTOR4_TAIL;
|
||||
Label VECTOR16_LOOP, VECTOR8_LOOP, VECTOR4_LOOP;
|
||||
Label VECTOR8_TAIL, VECTOR4_TAIL;
|
||||
Label VECTOR32_NOT_EQUAL, VECTOR16_NOT_EQUAL, VECTOR8_NOT_EQUAL, VECTOR4_NOT_EQUAL;
|
||||
Label SAME_TILL_END, DONE;
|
||||
Label BYTES_LOOP, BYTES_TAIL, BYTES_NOT_EQUAL;
|
||||
@ -8827,6 +8829,8 @@ void MacroAssembler::vectorized_mismatch(Register obja, Register objb, Register
|
||||
|
||||
if ((UseAVX > 2) &&
|
||||
VM_Version::supports_avx512vlbw()) {
|
||||
Label VECTOR64_LOOP, VECTOR64_NOT_EQUAL, VECTOR32_TAIL;
|
||||
|
||||
set_vector_masking(); // opening of the stub context for programming mask registers
|
||||
cmpq(length, 64);
|
||||
jcc(Assembler::less, VECTOR32_TAIL);
|
||||
@ -8848,7 +8852,7 @@ void MacroAssembler::vectorized_mismatch(Register obja, Register objb, Register
|
||||
testq(tmp1, tmp1);
|
||||
jcc(Assembler::zero, SAME_TILL_END);
|
||||
|
||||
bind(VECTOR64_TAIL);
|
||||
//bind(VECTOR64_TAIL);
|
||||
// AVX512 code to compare upto 63 byte vectors.
|
||||
// Save k1
|
||||
kmovql(k3, k1);
|
||||
@ -8881,6 +8885,7 @@ void MacroAssembler::vectorized_mismatch(Register obja, Register objb, Register
|
||||
jcc(Assembler::less, VECTOR4_TAIL);
|
||||
|
||||
if (UseAVX >= 2) {
|
||||
Label VECTOR16_TAIL, VECTOR32_LOOP;
|
||||
|
||||
cmpq(length, 16);
|
||||
jcc(Assembler::equal, VECTOR16_LOOP);
|
||||
@ -9231,7 +9236,7 @@ void MacroAssembler::lshift_by_1(Register x, Register len, Register z, Register
|
||||
*/
|
||||
void MacroAssembler::square_to_len(Register x, Register len, Register z, Register zlen, Register tmp1, Register tmp2, Register tmp3, Register tmp4, Register tmp5, Register rdxReg, Register raxReg) {
|
||||
|
||||
Label L_second_loop, L_second_loop_exit, L_third_loop, L_third_loop_exit, fifth_loop, fifth_loop_exit, L_last_x, L_multiply;
|
||||
Label L_second_loop, L_second_loop_exit, L_third_loop, L_third_loop_exit, L_last_x, L_multiply;
|
||||
push(tmp1);
|
||||
push(tmp2);
|
||||
push(tmp3);
|
||||
|
@ -185,7 +185,7 @@ void MacroAssembler::fast_cos(XMMRegister xmm0, XMMRegister xmm1, XMMRegister xm
|
||||
Label L_2TAG_PACKET_0_0_1, L_2TAG_PACKET_1_0_1, L_2TAG_PACKET_2_0_1, L_2TAG_PACKET_3_0_1;
|
||||
Label L_2TAG_PACKET_4_0_1, L_2TAG_PACKET_5_0_1, L_2TAG_PACKET_6_0_1, L_2TAG_PACKET_7_0_1;
|
||||
Label L_2TAG_PACKET_8_0_1, L_2TAG_PACKET_9_0_1, L_2TAG_PACKET_10_0_1, L_2TAG_PACKET_11_0_1;
|
||||
Label L_2TAG_PACKET_12_0_1, L_2TAG_PACKET_13_0_1, B1_2, B1_3, B1_4, B1_5, start;
|
||||
Label L_2TAG_PACKET_12_0_1, L_2TAG_PACKET_13_0_1, B1_2, B1_4, start;
|
||||
|
||||
assert_different_registers(r8, r9, r10, r11, eax, ecx, edx);
|
||||
|
||||
@ -756,9 +756,7 @@ ATTRIBUTE_ALIGNED(16) juint _static_const_table_cos[] =
|
||||
|
||||
void MacroAssembler::fast_cos(XMMRegister xmm0, XMMRegister xmm1, XMMRegister xmm2, XMMRegister xmm3, XMMRegister xmm4, XMMRegister xmm5, XMMRegister xmm6, XMMRegister xmm7, Register eax, Register ecx, Register edx, Register tmp) {
|
||||
Label L_2TAG_PACKET_0_0_2, L_2TAG_PACKET_1_0_2, L_2TAG_PACKET_2_0_2, L_2TAG_PACKET_3_0_2;
|
||||
Label L_2TAG_PACKET_4_0_2, L_2TAG_PACKET_5_0_2, L_2TAG_PACKET_6_0_2, L_2TAG_PACKET_7_0_2;
|
||||
Label L_2TAG_PACKET_8_0_2, L_2TAG_PACKET_9_0_2, L_2TAG_PACKET_10_0_2, L_2TAG_PACKET_11_0_2;
|
||||
Label L_2TAG_PACKET_12_0_2, L_2TAG_PACKET_13_0_2, B1_3, B1_5, start;
|
||||
Label start;
|
||||
|
||||
assert_different_registers(tmp, eax, ecx, edx);
|
||||
|
||||
|
@ -483,7 +483,7 @@ void MacroAssembler::fast_exp(XMMRegister xmm0, XMMRegister xmm1, XMMRegister xm
|
||||
Label L_2TAG_PACKET_0_0_2, L_2TAG_PACKET_1_0_2, L_2TAG_PACKET_2_0_2, L_2TAG_PACKET_3_0_2;
|
||||
Label L_2TAG_PACKET_4_0_2, L_2TAG_PACKET_5_0_2, L_2TAG_PACKET_6_0_2, L_2TAG_PACKET_7_0_2;
|
||||
Label L_2TAG_PACKET_8_0_2, L_2TAG_PACKET_9_0_2, L_2TAG_PACKET_10_0_2, L_2TAG_PACKET_11_0_2;
|
||||
Label L_2TAG_PACKET_12_0_2, L_2TAG_PACKET_13_0_2, B1_3, B1_5, start;
|
||||
Label L_2TAG_PACKET_12_0_2, start;
|
||||
|
||||
assert_different_registers(tmp, eax, ecx, edx);
|
||||
jmp(start);
|
||||
|
@ -186,7 +186,7 @@ void MacroAssembler::fast_log(XMMRegister xmm0, XMMRegister xmm1, XMMRegister xm
|
||||
Label L_2TAG_PACKET_0_0_2, L_2TAG_PACKET_1_0_2, L_2TAG_PACKET_2_0_2, L_2TAG_PACKET_3_0_2;
|
||||
Label L_2TAG_PACKET_4_0_2, L_2TAG_PACKET_5_0_2, L_2TAG_PACKET_6_0_2, L_2TAG_PACKET_7_0_2;
|
||||
Label L_2TAG_PACKET_8_0_2;
|
||||
Label L_2TAG_PACKET_12_0_2, L_2TAG_PACKET_13_0_2, B1_3, B1_5, start;
|
||||
Label B1_3, B1_5, start;
|
||||
|
||||
assert_different_registers(tmp1, tmp2, eax, ecx, edx);
|
||||
jmp(start);
|
||||
|
@ -198,7 +198,7 @@ ATTRIBUTE_ALIGNED(16) juint _coeff_log10[] =
|
||||
void MacroAssembler::fast_log10(XMMRegister xmm0, XMMRegister xmm1, XMMRegister xmm2, XMMRegister xmm3, XMMRegister xmm4, XMMRegister xmm5, XMMRegister xmm6, XMMRegister xmm7, Register eax, Register ecx, Register edx, Register r11) {
|
||||
Label L_2TAG_PACKET_0_0_2, L_2TAG_PACKET_1_0_2, L_2TAG_PACKET_2_0_2, L_2TAG_PACKET_3_0_2;
|
||||
Label L_2TAG_PACKET_4_0_2, L_2TAG_PACKET_5_0_2, L_2TAG_PACKET_6_0_2, L_2TAG_PACKET_7_0_2;
|
||||
Label L_2TAG_PACKET_8_0_2, L_2TAG_PACKET_9_0_2, B1_2, B1_3, B1_4, B1_5, start;
|
||||
Label L_2TAG_PACKET_8_0_2, L_2TAG_PACKET_9_0_2, B1_2, B1_3, B1_5, start;
|
||||
|
||||
assert_different_registers(r11, eax, ecx, edx);
|
||||
|
||||
|
@ -383,7 +383,7 @@ void MacroAssembler::fast_sin(XMMRegister xmm0, XMMRegister xmm1, XMMRegister xm
|
||||
Label L_2TAG_PACKET_4_0_1, L_2TAG_PACKET_5_0_1, L_2TAG_PACKET_6_0_1, L_2TAG_PACKET_7_0_1;
|
||||
Label L_2TAG_PACKET_8_0_1, L_2TAG_PACKET_9_0_1, L_2TAG_PACKET_10_0_1, L_2TAG_PACKET_11_0_1;
|
||||
Label L_2TAG_PACKET_13_0_1, L_2TAG_PACKET_14_0_1;
|
||||
Label L_2TAG_PACKET_12_0_1, B1_1, B1_2, B1_4, start;
|
||||
Label L_2TAG_PACKET_12_0_1, B1_4, start;
|
||||
|
||||
assert_different_registers(tmp1, tmp2, tmp3, tmp4, eax, ebx, ecx, edx);
|
||||
address ONEHALF = StubRoutines::x86::_ONEHALF_addr();
|
||||
@ -1673,7 +1673,7 @@ void MacroAssembler::libm_sincos_huge(XMMRegister xmm0, XMMRegister xmm1, Regist
|
||||
Label B1_1, B1_2, B1_3, B1_4, B1_5, B1_6, B1_7, B1_8, B1_9, B1_10, B1_11, B1_12;
|
||||
Label B1_13, B1_14, B1_15, B1_16, B1_17, B1_18, B1_19, B1_20, B1_21, B1_22, B1_23;
|
||||
Label B1_24, B1_25, B1_26, B1_27, B1_28, B1_29, B1_30, B1_31, B1_32, B1_33, B1_34;
|
||||
Label B1_35, B1_36, B1_37, B1_38, B1_39, B1_40, B1_41, B1_42, B1_43, B1_44, B1_45, B1_46;
|
||||
Label B1_35, B1_36, B1_37, B1_38, B1_39, B1_40, B1_41, B1_42, B1_43, B1_46;
|
||||
|
||||
assert_different_registers(ebx, eax, ecx, edx, esi, edi, ebp, esp);
|
||||
|
||||
|
@ -501,7 +501,7 @@ void MacroAssembler::fast_tan(XMMRegister xmm0, XMMRegister xmm1, XMMRegister xm
|
||||
Label L_2TAG_PACKET_0_0_1, L_2TAG_PACKET_1_0_1, L_2TAG_PACKET_2_0_1, L_2TAG_PACKET_3_0_1;
|
||||
Label L_2TAG_PACKET_4_0_1, L_2TAG_PACKET_5_0_1, L_2TAG_PACKET_6_0_1, L_2TAG_PACKET_7_0_1;
|
||||
Label L_2TAG_PACKET_8_0_1, L_2TAG_PACKET_9_0_1, L_2TAG_PACKET_10_0_1, L_2TAG_PACKET_11_0_1;
|
||||
Label L_2TAG_PACKET_12_0_1, L_2TAG_PACKET_13_0_1, L_2TAG_PACKET_14_0_1, B1_2, B1_3, B1_4, B1_5, start;
|
||||
Label L_2TAG_PACKET_12_0_1, L_2TAG_PACKET_13_0_1, L_2TAG_PACKET_14_0_1, B1_2, B1_4, start;
|
||||
|
||||
address ONEHALF = (address)_ONEHALF_tan;
|
||||
address MUL16 = (address)_MUL16;
|
||||
@ -1089,7 +1089,7 @@ void MacroAssembler::libm_tancot_huge(XMMRegister xmm0, XMMRegister xmm1, Regist
|
||||
Label B1_1, B1_2, B1_3, B1_4, B1_5, B1_6, B1_7, B1_8, B1_9, B1_10, B1_11, B1_12;
|
||||
Label B1_13, B1_14, B1_15, B1_16, B1_17, B1_18, B1_19, B1_20, B1_21, B1_22, B1_23;
|
||||
Label B1_24, B1_25, B1_26, B1_27, B1_28, B1_29, B1_30, B1_31, B1_32, B1_33, B1_34;
|
||||
Label B1_35, B1_36, B1_37, B1_38, B1_39, B1_40, B1_41, B1_42, B1_43, B1_44, B1_45, B1_46;
|
||||
Label B1_35, B1_36, B1_37, B1_38, B1_39, B1_40, B1_43;
|
||||
|
||||
assert_different_registers(ebx, eax, ecx, edx, esi, edi, ebp, esp);
|
||||
|
||||
@ -1966,9 +1966,8 @@ ATTRIBUTE_ALIGNED(16) juint _static_const_table_tan[] =
|
||||
void MacroAssembler::fast_tan(XMMRegister xmm0, XMMRegister xmm1, XMMRegister xmm2, XMMRegister xmm3, XMMRegister xmm4, XMMRegister xmm5, XMMRegister xmm6, XMMRegister xmm7, Register eax, Register ecx, Register edx, Register tmp) {
|
||||
|
||||
Label L_2TAG_PACKET_0_0_2, L_2TAG_PACKET_1_0_2, L_2TAG_PACKET_2_0_2, L_2TAG_PACKET_3_0_2;
|
||||
Label L_2TAG_PACKET_4_0_2, L_2TAG_PACKET_5_0_2, L_2TAG_PACKET_6_0_2, L_2TAG_PACKET_7_0_2;
|
||||
Label L_2TAG_PACKET_8_0_2, L_2TAG_PACKET_9_0_2, L_2TAG_PACKET_10_0_2, L_2TAG_PACKET_11_0_2;
|
||||
Label L_2TAG_PACKET_12_0_2, L_2TAG_PACKET_13_0_2, B1_3, B1_5, start;
|
||||
Label L_2TAG_PACKET_4_0_2;
|
||||
Label start;
|
||||
|
||||
assert_different_registers(tmp, eax, ecx, edx);
|
||||
|
||||
|
@ -3492,8 +3492,13 @@ SafepointBlob* SharedRuntime::generate_handler_blob(address call_ptr, int poll_t
|
||||
// No exception case
|
||||
__ bind(noException);
|
||||
|
||||
Label no_adjust, bail, no_prefix, not_special;
|
||||
Label no_adjust;
|
||||
#ifdef ASSERT
|
||||
Label bail;
|
||||
#endif
|
||||
if (SafepointMechanism::uses_thread_local_poll() && !cause_return) {
|
||||
Label no_prefix, not_special;
|
||||
|
||||
// If our stashed return pc was modified by the runtime we avoid touching it
|
||||
__ cmpptr(rbx, Address(rbp, wordSize));
|
||||
__ jccb(Assembler::notEqual, no_adjust);
|
||||
|
@ -1906,7 +1906,7 @@ class StubGenerator: public StubCodeGenerator {
|
||||
StubCodeMark mark(this, "StubRoutines", name);
|
||||
address start = __ pc();
|
||||
|
||||
Label L_copy_bytes, L_copy_8_bytes, L_copy_2_bytes, L_exit;
|
||||
Label L_copy_bytes, L_copy_8_bytes, L_exit;
|
||||
const Register from = rdi; // source array address
|
||||
const Register to = rsi; // destination array address
|
||||
const Register count = rdx; // elements count
|
||||
@ -3848,7 +3848,7 @@ class StubGenerator: public StubCodeGenerator {
|
||||
Label L__incCounter[3][6]; //for 6 blocks
|
||||
Label L__incCounter_single[3]; //for single block, key128, key192, key256
|
||||
Label L_processTail_insr[3], L_processTail_4_insr[3], L_processTail_2_insr[3], L_processTail_1_insr[3], L_processTail_exit_insr[3];
|
||||
Label L_processTail_extr[3], L_processTail_4_extr[3], L_processTail_2_extr[3], L_processTail_1_extr[3], L_processTail_exit_extr[3];
|
||||
Label L_processTail_4_extr[3], L_processTail_2_extr[3], L_processTail_1_extr[3], L_processTail_exit_extr[3];
|
||||
|
||||
Label L_exit;
|
||||
|
||||
|
@ -1171,7 +1171,7 @@ address TemplateInterpreterGenerator::generate_native_entry(bool synchronized) {
|
||||
// and result handler will pick it up
|
||||
|
||||
{
|
||||
Label no_oop, not_weak, store_result;
|
||||
Label no_oop;
|
||||
__ lea(t, ExternalAddress(AbstractInterpreter::result_handler(T_OBJECT)));
|
||||
__ cmpptr(t, Address(rbp, frame::interpreter_frame_result_handler_offset*wordSize));
|
||||
__ jcc(Assembler::notEqual, no_oop);
|
||||
|
@ -2875,7 +2875,7 @@ void TemplateTable::getfield_or_static(int byte_no, bool is_static, RewriteContr
|
||||
|
||||
const Address field(obj, off, Address::times_1, 0*wordSize);
|
||||
|
||||
Label Done, notByte, notBool, notInt, notShort, notChar, notLong, notFloat, notObj, notDouble;
|
||||
Label Done, notByte, notBool, notInt, notShort, notChar, notLong, notFloat, notObj;
|
||||
|
||||
__ shrl(flags, ConstantPoolCacheEntry::tos_state_shift);
|
||||
// Make sure we don't need to mask edx after the above shift
|
||||
@ -2981,6 +2981,7 @@ void TemplateTable::getfield_or_static(int byte_no, bool is_static, RewriteContr
|
||||
|
||||
__ bind(notFloat);
|
||||
#ifdef ASSERT
|
||||
Label notDouble;
|
||||
__ cmpl(flags, dtos);
|
||||
__ jcc(Assembler::notEqual, notDouble);
|
||||
#endif
|
||||
@ -3132,7 +3133,7 @@ void TemplateTable::putfield_or_static(int byte_no, bool is_static, RewriteContr
|
||||
NOT_LP64( const Address hi(obj, off, Address::times_1, 1*wordSize);)
|
||||
|
||||
Label notByte, notBool, notInt, notShort, notChar,
|
||||
notLong, notFloat, notObj, notDouble;
|
||||
notLong, notFloat, notObj;
|
||||
|
||||
__ shrl(flags, ConstantPoolCacheEntry::tos_state_shift);
|
||||
|
||||
@ -3286,6 +3287,7 @@ void TemplateTable::putfield_or_static(int byte_no, bool is_static, RewriteContr
|
||||
|
||||
__ bind(notFloat);
|
||||
#ifdef ASSERT
|
||||
Label notDouble;
|
||||
__ cmpl(flags, dtos);
|
||||
__ jcc(Assembler::notEqual, notDouble);
|
||||
#endif
|
||||
|
@ -63,7 +63,7 @@ typedef struct {
|
||||
#include <stddef.h> /* For uintptr_t */
|
||||
#include <stdlib.h>
|
||||
|
||||
#define JVM_MAXPATHLEN _MAX_PATH
|
||||
#define JVM_MAXPATHLEN 1024
|
||||
|
||||
#define JVM_R_OK 4
|
||||
#define JVM_W_OK 2
|
||||
|
@ -38,6 +38,7 @@
|
||||
#include "oops/method.inline.hpp"
|
||||
#include "runtime/handles.inline.hpp"
|
||||
#include "runtime/os.hpp"
|
||||
#include "runtime/safepointVerifiers.hpp"
|
||||
#include "runtime/sharedRuntime.hpp"
|
||||
#include "runtime/vm_operations.hpp"
|
||||
|
||||
@ -298,15 +299,25 @@ AOTCodeHeap::AOTCodeHeap(AOTLib* lib) :
|
||||
void AOTCodeHeap::publish_aot(const methodHandle& mh, AOTMethodData* method_data, int code_id) {
|
||||
// The method may be explicitly excluded by the user.
|
||||
// Or Interpreter uses an intrinsic for this method.
|
||||
if (CompilerOracle::should_exclude(mh) || !AbstractInterpreter::can_be_compiled(mh)) {
|
||||
// Or method has breakpoints.
|
||||
if (CompilerOracle::should_exclude(mh) ||
|
||||
!AbstractInterpreter::can_be_compiled(mh) ||
|
||||
(mh->number_of_breakpoints() > 0)) {
|
||||
return;
|
||||
}
|
||||
// Make sure no break points were set in the method in case of a safepoint
|
||||
// in the following code until aot code is registered.
|
||||
NoSafepointVerifier nsv;
|
||||
|
||||
address code = method_data->_code;
|
||||
const char* name = method_data->_name;
|
||||
aot_metadata* meta = method_data->_meta;
|
||||
|
||||
if (meta->scopes_pcs_begin() == meta->scopes_pcs_end()) {
|
||||
// Switch off NoSafepointVerifier because log_info() may cause safepoint
|
||||
// and it is fine because aot code will not be registered here.
|
||||
PauseNoSafepointVerifier pnsv(&nsv);
|
||||
|
||||
// When the AOT compiler compiles something big we fail to generate metadata
|
||||
// in CodeInstaller::gather_metadata. In that case the scopes_pcs_begin == scopes_pcs_end.
|
||||
// In all successful cases we always have 2 entries of scope pcs.
|
||||
@ -343,6 +354,7 @@ void AOTCodeHeap::publish_aot(const methodHandle& mh, AOTMethodData* method_data
|
||||
#endif
|
||||
Method::set_code(mh, aot);
|
||||
if (PrintAOT || (PrintCompilation && PrintAOT)) {
|
||||
PauseNoSafepointVerifier pnsv(&nsv); // aot code is registered already
|
||||
aot->print_on(tty, NULL);
|
||||
}
|
||||
// Publish oop only after we are visible to CompiledMethodIterator
|
||||
@ -918,16 +930,6 @@ int AOTCodeHeap::verify_icholder_relocations() {
|
||||
}
|
||||
#endif
|
||||
|
||||
void AOTCodeHeap::flush_evol_dependents_on(InstanceKlass* dependee) {
|
||||
for (int index = 0; index < _method_count; index++) {
|
||||
if (_code_to_aot[index]._state != in_use) {
|
||||
continue; // Skip uninitialized entries.
|
||||
}
|
||||
AOTCompiledMethod* aot = _code_to_aot[index]._aot;
|
||||
aot->flush_evol_dependents_on(dependee);
|
||||
}
|
||||
}
|
||||
|
||||
void AOTCodeHeap::metadata_do(void f(Metadata*)) {
|
||||
for (int index = 0; index < _method_count; index++) {
|
||||
if (_code_to_aot[index]._state != in_use) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -283,8 +283,6 @@ public:
|
||||
|
||||
DEBUG_ONLY( int verify_icholder_relocations(); )
|
||||
|
||||
void flush_evol_dependents_on(InstanceKlass* dependee);
|
||||
|
||||
void alive_methods_do(void f(CompiledMethod* nm));
|
||||
|
||||
#ifndef PRODUCT
|
||||
|
@ -243,16 +243,6 @@ bool AOTCompiledMethod::make_entrant() {
|
||||
}
|
||||
#endif // TIERED
|
||||
|
||||
// We don't have full dependencies for AOT methods, so flushing is
|
||||
// more conservative than for nmethods.
|
||||
void AOTCompiledMethod::flush_evol_dependents_on(InstanceKlass* dependee) {
|
||||
if (is_java_method()) {
|
||||
clear_inline_caches();
|
||||
mark_for_deoptimization();
|
||||
make_not_entrant();
|
||||
}
|
||||
}
|
||||
|
||||
// Iterate over metadata calling this function. Used by RedefineClasses
|
||||
// Copied from nmethod::metadata_do
|
||||
void AOTCompiledMethod::metadata_do(void f(Metadata*)) {
|
||||
|
@ -238,11 +238,6 @@ private:
|
||||
address get_original_pc(const frame* fr) { return *orig_pc_addr(fr); }
|
||||
void set_original_pc(const frame* fr, address pc) { *orig_pc_addr(fr) = pc; }
|
||||
|
||||
#ifdef HOTSWAP
|
||||
// Flushing and deoptimization in case of evolution
|
||||
void flush_evol_dependents_on(InstanceKlass* dependee);
|
||||
#endif // HOTSWAP
|
||||
|
||||
virtual void metadata_do(void f(Metadata*));
|
||||
|
||||
bool metadata_got_contains(Metadata **p) {
|
||||
|
@ -101,15 +101,6 @@ void AOTLoader::metadata_do(void f(Metadata*)) {
|
||||
}
|
||||
}
|
||||
|
||||
// Flushing and deoptimization in case of evolution
|
||||
void AOTLoader::flush_evol_dependents_on(InstanceKlass* dependee) {
|
||||
// make non entrant and mark for deoptimization
|
||||
FOR_ALL_AOT_HEAPS(heap) {
|
||||
(*heap)->flush_evol_dependents_on(dependee);
|
||||
}
|
||||
Deoptimization::deoptimize_dependents();
|
||||
}
|
||||
|
||||
/**
|
||||
* List of core modules for which we search for shared libraries.
|
||||
*/
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -68,11 +68,6 @@ public:
|
||||
|
||||
NOT_PRODUCT( static void print_statistics() NOT_AOT_RETURN; )
|
||||
|
||||
#ifdef HOTSWAP
|
||||
// Flushing and deoptimization in case of evolution
|
||||
static void flush_evol_dependents_on(InstanceKlass* dependee) NOT_AOT_RETURN;
|
||||
#endif // HOTSWAP
|
||||
|
||||
static bool reconcile_dynamic_invoke(InstanceKlass* holder, int index, Method* adapter_method, Klass *appendix_klass) NOT_AOT({ return true; });
|
||||
};
|
||||
|
||||
|
@ -769,6 +769,14 @@ ClassLoaderData::~ClassLoaderData() {
|
||||
if (_deallocate_list != NULL) {
|
||||
delete _deallocate_list;
|
||||
}
|
||||
|
||||
// Decrement refcounts of Symbols if created.
|
||||
if (_name != NULL) {
|
||||
_name->decrement_refcount();
|
||||
}
|
||||
if (_name_and_id != NULL) {
|
||||
_name_and_id->decrement_refcount();
|
||||
}
|
||||
}
|
||||
|
||||
// Returns true if this class loader data is for the app class loader
|
||||
|
@ -429,20 +429,20 @@ oop* OopStorage::allocate() {
|
||||
// Failed to make new block, no other thread made a block
|
||||
// available while the mutex was released, and didn't get
|
||||
// one from a deferred update either, so return failure.
|
||||
log_info(oopstorage, ref)("%s: failed block allocation", name());
|
||||
log_debug(oopstorage, blocks)("%s: failed block allocation", name());
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// Add new block to storage.
|
||||
log_info(oopstorage, blocks)("%s: new block " PTR_FORMAT, name(), p2i(block));
|
||||
log_debug(oopstorage, blocks)("%s: new block " PTR_FORMAT, name(), p2i(block));
|
||||
|
||||
// Add new block to the _active_array, growing if needed.
|
||||
if (!_active_array->push(block)) {
|
||||
if (expand_active_array()) {
|
||||
guarantee(_active_array->push(block), "push failed after expansion");
|
||||
} else {
|
||||
log_info(oopstorage, blocks)("%s: failed active array expand", name());
|
||||
log_debug(oopstorage, blocks)("%s: failed active array expand", name());
|
||||
Block::delete_block(*block);
|
||||
return NULL;
|
||||
}
|
||||
@ -472,7 +472,7 @@ oop* OopStorage::allocate() {
|
||||
log_debug(oopstorage, blocks)("%s: block full " PTR_FORMAT, name(), p2i(block));
|
||||
_allocation_list.unlink(*block);
|
||||
}
|
||||
log_info(oopstorage, ref)("%s: allocated " PTR_FORMAT, name(), p2i(result));
|
||||
log_trace(oopstorage, ref)("%s: allocated " PTR_FORMAT, name(), p2i(result));
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -484,8 +484,8 @@ bool OopStorage::expand_active_array() {
|
||||
assert_lock_strong(_allocation_mutex);
|
||||
ActiveArray* old_array = _active_array;
|
||||
size_t new_size = 2 * old_array->size();
|
||||
log_info(oopstorage, blocks)("%s: expand active array " SIZE_FORMAT,
|
||||
name(), new_size);
|
||||
log_debug(oopstorage, blocks)("%s: expand active array " SIZE_FORMAT,
|
||||
name(), new_size);
|
||||
ActiveArray* new_array = ActiveArray::create(new_size, AllocFailStrategy::RETURN_NULL);
|
||||
if (new_array == NULL) return false;
|
||||
new_array->copy_from(old_array);
|
||||
@ -676,7 +676,7 @@ void OopStorage::release(const oop* ptr) {
|
||||
check_release_entry(ptr);
|
||||
Block* block = find_block_or_null(ptr);
|
||||
assert(block != NULL, "%s: invalid release " PTR_FORMAT, name(), p2i(ptr));
|
||||
log_info(oopstorage, ref)("%s: released " PTR_FORMAT, name(), p2i(ptr));
|
||||
log_trace(oopstorage, ref)("%s: released " PTR_FORMAT, name(), p2i(ptr));
|
||||
block->release_entries(block->bitmask_for_entry(ptr), &_deferred_updates);
|
||||
Atomic::dec(&_allocation_count);
|
||||
}
|
||||
@ -687,7 +687,7 @@ void OopStorage::release(const oop* const* ptrs, size_t size) {
|
||||
check_release_entry(ptrs[i]);
|
||||
Block* block = find_block_or_null(ptrs[i]);
|
||||
assert(block != NULL, "%s: invalid release " PTR_FORMAT, name(), p2i(ptrs[i]));
|
||||
log_info(oopstorage, ref)("%s: released " PTR_FORMAT, name(), p2i(ptrs[i]));
|
||||
log_trace(oopstorage, ref)("%s: released " PTR_FORMAT, name(), p2i(ptrs[i]));
|
||||
size_t count = 0;
|
||||
uintx releasing = 0;
|
||||
for ( ; i < size; ++i) {
|
||||
@ -696,7 +696,7 @@ void OopStorage::release(const oop* const* ptrs, size_t size) {
|
||||
// If entry not in block, finish block and resume outer loop with entry.
|
||||
if (!block->contains(entry)) break;
|
||||
// Add entry to releasing bitmap.
|
||||
log_info(oopstorage, ref)("%s: released " PTR_FORMAT, name(), p2i(entry));
|
||||
log_trace(oopstorage, ref)("%s: released " PTR_FORMAT, name(), p2i(entry));
|
||||
uintx entry_bitmask = block->bitmask_for_entry(entry);
|
||||
assert((releasing & entry_bitmask) == 0,
|
||||
"Duplicate entry: " PTR_FORMAT, p2i(entry));
|
||||
@ -740,7 +740,7 @@ OopStorage::OopStorage(const char* name,
|
||||
|
||||
void OopStorage::delete_empty_block(const Block& block) {
|
||||
assert(block.is_empty(), "discarding non-empty block");
|
||||
log_info(oopstorage, blocks)("%s: delete empty block " PTR_FORMAT, name(), p2i(&block));
|
||||
log_debug(oopstorage, blocks)("%s: delete empty block " PTR_FORMAT, name(), p2i(&block));
|
||||
Block::delete_block(block);
|
||||
}
|
||||
|
||||
@ -933,11 +933,11 @@ bool OopStorage::BasicParState::claim_next_segment(IterationData* data) {
|
||||
}
|
||||
|
||||
bool OopStorage::BasicParState::finish_iteration(const IterationData* data) const {
|
||||
log_debug(oopstorage, blocks, stats)
|
||||
("Parallel iteration on %s: blocks = " SIZE_FORMAT
|
||||
", processed = " SIZE_FORMAT " (%2.f%%)",
|
||||
_storage->name(), _block_count, data->_processed,
|
||||
percent_of(data->_processed, _block_count));
|
||||
log_info(oopstorage, blocks, stats)
|
||||
("Parallel iteration on %s: blocks = " SIZE_FORMAT
|
||||
", processed = " SIZE_FORMAT " (%2.f%%)",
|
||||
_storage->name(), _block_count, data->_processed,
|
||||
percent_of(data->_processed, _block_count));
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -69,12 +69,12 @@ void ThreadLocalAllocBuffer::accumulate_statistics_before_gc() {
|
||||
}
|
||||
|
||||
void ThreadLocalAllocBuffer::accumulate_statistics() {
|
||||
Thread* thread = myThread();
|
||||
size_t capacity = Universe::heap()->tlab_capacity(thread);
|
||||
size_t used = Universe::heap()->tlab_used(thread);
|
||||
Thread* thr = thread();
|
||||
size_t capacity = Universe::heap()->tlab_capacity(thr);
|
||||
size_t used = Universe::heap()->tlab_used(thr);
|
||||
|
||||
_gc_waste += (unsigned)remaining();
|
||||
size_t total_allocated = thread->allocated_bytes();
|
||||
size_t total_allocated = thr->allocated_bytes();
|
||||
size_t allocated_since_last_gc = total_allocated - _allocated_before_last_gc;
|
||||
_allocated_before_last_gc = total_allocated;
|
||||
|
||||
@ -119,7 +119,7 @@ void ThreadLocalAllocBuffer::make_parsable(bool retire, bool zap) {
|
||||
invariants();
|
||||
|
||||
if (retire) {
|
||||
myThread()->incr_allocated_bytes(used_bytes());
|
||||
thread()->incr_allocated_bytes(used_bytes());
|
||||
}
|
||||
|
||||
Universe::heap()->fill_with_dummy_object(top(), hard_end(), retire && zap);
|
||||
@ -150,7 +150,7 @@ void ThreadLocalAllocBuffer::resize() {
|
||||
// Compute the next tlab size using expected allocation amount
|
||||
assert(ResizeTLAB, "Should not call this otherwise");
|
||||
size_t alloc = (size_t)(_allocation_fraction.average() *
|
||||
(Universe::heap()->tlab_capacity(myThread()) / HeapWordSize));
|
||||
(Universe::heap()->tlab_capacity(thread()) / HeapWordSize));
|
||||
size_t new_size = alloc / _target_refills;
|
||||
|
||||
new_size = MIN2(MAX2(new_size, min_size()), max_size());
|
||||
@ -159,7 +159,7 @@ void ThreadLocalAllocBuffer::resize() {
|
||||
|
||||
log_trace(gc, tlab)("TLAB new size: thread: " INTPTR_FORMAT " [id: %2d]"
|
||||
" refills %d alloc: %8.6f desired_size: " SIZE_FORMAT " -> " SIZE_FORMAT,
|
||||
p2i(myThread()), myThread()->osthread()->thread_id(),
|
||||
p2i(thread()), thread()->osthread()->thread_id(),
|
||||
_target_refills, _allocation_fraction.average(), desired_size(), aligned_new_size);
|
||||
|
||||
set_desired_size(aligned_new_size);
|
||||
@ -211,7 +211,7 @@ void ThreadLocalAllocBuffer::initialize() {
|
||||
// thread is initialized before the heap is. The initialization for
|
||||
// this thread is redone in startup_initialization below.
|
||||
if (Universe::heap() != NULL) {
|
||||
size_t capacity = Universe::heap()->tlab_capacity(myThread()) / HeapWordSize;
|
||||
size_t capacity = Universe::heap()->tlab_capacity(thread()) / HeapWordSize;
|
||||
double alloc_frac = desired_size() * target_refills() / (double) capacity;
|
||||
_allocation_fraction.sample(alloc_frac);
|
||||
}
|
||||
@ -274,7 +274,7 @@ size_t ThreadLocalAllocBuffer::initial_desired_size() {
|
||||
// Initial size is a function of the average number of allocating threads.
|
||||
unsigned nof_threads = global_stats()->allocating_threads_avg();
|
||||
|
||||
init_sz = (Universe::heap()->tlab_capacity(myThread()) / HeapWordSize) /
|
||||
init_sz = (Universe::heap()->tlab_capacity(thread()) / HeapWordSize) /
|
||||
(nof_threads * target_refills());
|
||||
init_sz = align_object_size(init_sz);
|
||||
}
|
||||
@ -288,7 +288,7 @@ void ThreadLocalAllocBuffer::print_stats(const char* tag) {
|
||||
return;
|
||||
}
|
||||
|
||||
Thread* thrd = myThread();
|
||||
Thread* thrd = thread();
|
||||
size_t waste = _gc_waste + _slow_refill_waste + _fast_refill_waste;
|
||||
double waste_percent = percent_of(waste, _allocated_size);
|
||||
size_t tlab_used = Universe::heap()->tlab_used(thrd);
|
||||
@ -322,7 +322,7 @@ void ThreadLocalAllocBuffer::verify() {
|
||||
|
||||
void ThreadLocalAllocBuffer::set_sample_end() {
|
||||
size_t heap_words_remaining = pointer_delta(_end, _top);
|
||||
size_t bytes_until_sample = myThread()->heap_sampler().bytes_until_sample();
|
||||
size_t bytes_until_sample = thread()->heap_sampler().bytes_until_sample();
|
||||
size_t words_until_sample = bytes_until_sample / HeapWordSize;
|
||||
|
||||
if (heap_words_remaining > words_until_sample) {
|
||||
@ -334,10 +334,8 @@ void ThreadLocalAllocBuffer::set_sample_end() {
|
||||
}
|
||||
}
|
||||
|
||||
Thread* ThreadLocalAllocBuffer::myThread() {
|
||||
return (Thread*)(((char *)this) +
|
||||
in_bytes(start_offset()) -
|
||||
in_bytes(Thread::tlab_start_offset()));
|
||||
Thread* ThreadLocalAllocBuffer::thread() {
|
||||
return (Thread*)(((char*)this) + in_bytes(start_offset()) - in_bytes(Thread::tlab_start_offset()));
|
||||
}
|
||||
|
||||
void ThreadLocalAllocBuffer::set_back_allocation_end() {
|
||||
|
@ -101,7 +101,7 @@ private:
|
||||
|
||||
void print_stats(const char* tag);
|
||||
|
||||
Thread* myThread();
|
||||
Thread* thread();
|
||||
|
||||
// statistics
|
||||
|
||||
@ -192,15 +192,9 @@ public:
|
||||
|
||||
// Code generation support
|
||||
static ByteSize start_offset() { return byte_offset_of(ThreadLocalAllocBuffer, _start); }
|
||||
static ByteSize end_offset() { return byte_offset_of(ThreadLocalAllocBuffer, _end ); }
|
||||
static ByteSize top_offset() { return byte_offset_of(ThreadLocalAllocBuffer, _top ); }
|
||||
static ByteSize pf_top_offset() { return byte_offset_of(ThreadLocalAllocBuffer, _pf_top ); }
|
||||
static ByteSize size_offset() { return byte_offset_of(ThreadLocalAllocBuffer, _desired_size ); }
|
||||
static ByteSize refill_waste_limit_offset() { return byte_offset_of(ThreadLocalAllocBuffer, _refill_waste_limit ); }
|
||||
|
||||
static ByteSize number_of_refills_offset() { return byte_offset_of(ThreadLocalAllocBuffer, _number_of_refills ); }
|
||||
static ByteSize fast_refill_waste_offset() { return byte_offset_of(ThreadLocalAllocBuffer, _fast_refill_waste ); }
|
||||
static ByteSize slow_allocations_offset() { return byte_offset_of(ThreadLocalAllocBuffer, _slow_allocations ); }
|
||||
static ByteSize end_offset() { return byte_offset_of(ThreadLocalAllocBuffer, _end); }
|
||||
static ByteSize top_offset() { return byte_offset_of(ThreadLocalAllocBuffer, _top); }
|
||||
static ByteSize pf_top_offset() { return byte_offset_of(ThreadLocalAllocBuffer, _pf_top); }
|
||||
|
||||
void verify();
|
||||
};
|
||||
|
@ -57,8 +57,7 @@ inline size_t ThreadLocalAllocBuffer::compute_size(size_t obj_size) {
|
||||
// Compute the size for the new TLAB.
|
||||
// The "last" tlab may be smaller to reduce fragmentation.
|
||||
// unsafe_max_tlab_alloc is just a hint.
|
||||
const size_t available_size = Universe::heap()->unsafe_max_tlab_alloc(myThread()) /
|
||||
HeapWordSize;
|
||||
const size_t available_size = Universe::heap()->unsafe_max_tlab_alloc(thread()) / HeapWordSize;
|
||||
size_t new_tlab_size = MIN3(available_size, desired_size() + align_object_size(obj_size), max_size());
|
||||
|
||||
// Make sure there's enough room for object and filler int[].
|
||||
@ -92,7 +91,7 @@ void ThreadLocalAllocBuffer::record_slow_allocation(size_t obj_size) {
|
||||
" obj: " SIZE_FORMAT
|
||||
" free: " SIZE_FORMAT
|
||||
" waste: " SIZE_FORMAT,
|
||||
"slow", p2i(myThread()), myThread()->osthread()->thread_id(),
|
||||
"slow", p2i(thread()), thread()->osthread()->thread_id(),
|
||||
obj_size, free(), refill_waste_limit());
|
||||
}
|
||||
|
||||
|
@ -252,12 +252,10 @@ ZWeakRootsIterator::ZWeakRootsIterator() :
|
||||
_jfr_weak(this) {
|
||||
assert(SafepointSynchronize::is_at_safepoint(), "Should be at safepoint");
|
||||
ZStatTimer timer(ZSubPhasePauseWeakRootsSetup);
|
||||
StringTable::reset_dead_counter();
|
||||
}
|
||||
|
||||
ZWeakRootsIterator::~ZWeakRootsIterator() {
|
||||
ZStatTimer timer(ZSubPhasePauseWeakRootsTeardown);
|
||||
StringTable::finish_dead_counter();
|
||||
}
|
||||
|
||||
void ZWeakRootsIterator::do_jvmti_weak_export(BoolObjectClosure* is_alive, OopClosure* cl) {
|
||||
|
@ -178,6 +178,15 @@ WB_ENTRY(jboolean, WB_IsClassAlive(JNIEnv* env, jobject target, jstring name))
|
||||
return closure.found();
|
||||
WB_END
|
||||
|
||||
WB_ENTRY(jint, WB_GetSymbolRefcount(JNIEnv* env, jobject unused, jstring name))
|
||||
oop h_name = JNIHandles::resolve(name);
|
||||
if (h_name == NULL) return false;
|
||||
Symbol* sym = java_lang_String::as_symbol(h_name, CHECK_0);
|
||||
TempNewSymbol tsym(sym); // Make sure to decrement reference count on sym on return
|
||||
return (jint)sym->refcount();
|
||||
WB_END
|
||||
|
||||
|
||||
WB_ENTRY(void, WB_AddToBootstrapClassLoaderSearch(JNIEnv* env, jobject o, jstring segment)) {
|
||||
#if INCLUDE_JVMTI
|
||||
ResourceMark rm;
|
||||
@ -1982,7 +1991,6 @@ WB_ENTRY(jint, WB_ProtectionDomainRemovedCount(JNIEnv* env, jobject o))
|
||||
return (jint) SystemDictionary::pd_cache_table()->removed_entries_count();
|
||||
WB_END
|
||||
|
||||
|
||||
#define CC (char*)
|
||||
|
||||
static JNINativeMethod methods[] = {
|
||||
@ -1996,6 +2004,7 @@ static JNINativeMethod methods[] = {
|
||||
{CC"getHeapSpaceAlignment", CC"()J", (void*)&WB_GetHeapSpaceAlignment},
|
||||
{CC"getHeapAlignment", CC"()J", (void*)&WB_GetHeapAlignment},
|
||||
{CC"isClassAlive0", CC"(Ljava/lang/String;)Z", (void*)&WB_IsClassAlive },
|
||||
{CC"getSymbolRefcount", CC"(Ljava/lang/String;)I", (void*)&WB_GetSymbolRefcount },
|
||||
{CC"parseCommandLine0",
|
||||
CC"(Ljava/lang/String;C[Lsun/hotspot/parser/DiagnosticCommand;)[Ljava/lang/Object;",
|
||||
(void*) &WB_ParseCommandLine
|
||||
|
@ -698,20 +698,10 @@ protected:
|
||||
|
||||
static ByteSize polling_page_offset() { return byte_offset_of(Thread, _polling_page); }
|
||||
|
||||
#define TLAB_FIELD_OFFSET(name) \
|
||||
static ByteSize tlab_##name##_offset() { return byte_offset_of(Thread, _tlab) + ThreadLocalAllocBuffer::name##_offset(); }
|
||||
|
||||
TLAB_FIELD_OFFSET(start)
|
||||
TLAB_FIELD_OFFSET(end)
|
||||
TLAB_FIELD_OFFSET(top)
|
||||
TLAB_FIELD_OFFSET(pf_top)
|
||||
TLAB_FIELD_OFFSET(size) // desired_size
|
||||
TLAB_FIELD_OFFSET(refill_waste_limit)
|
||||
TLAB_FIELD_OFFSET(number_of_refills)
|
||||
TLAB_FIELD_OFFSET(fast_refill_waste)
|
||||
TLAB_FIELD_OFFSET(slow_allocations)
|
||||
|
||||
#undef TLAB_FIELD_OFFSET
|
||||
static ByteSize tlab_start_offset() { return byte_offset_of(Thread, _tlab) + ThreadLocalAllocBuffer::start_offset(); }
|
||||
static ByteSize tlab_end_offset() { return byte_offset_of(Thread, _tlab) + ThreadLocalAllocBuffer::end_offset(); }
|
||||
static ByteSize tlab_top_offset() { return byte_offset_of(Thread, _tlab) + ThreadLocalAllocBuffer::top_offset(); }
|
||||
static ByteSize tlab_pf_top_offset() { return byte_offset_of(Thread, _tlab) + ThreadLocalAllocBuffer::pf_top_offset(); }
|
||||
|
||||
static ByteSize allocated_bytes_offset() { return byte_offset_of(Thread, _allocated_bytes); }
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1994, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1994, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -455,7 +455,7 @@ public class Object {
|
||||
"nanosecond timeout value out of range");
|
||||
}
|
||||
|
||||
if (nanos > 0) {
|
||||
if (nanos > 0 && timeoutMillis < Long.MAX_VALUE) {
|
||||
timeoutMillis++;
|
||||
}
|
||||
|
||||
|
@ -35,6 +35,7 @@ import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.ConcurrentMap;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.locks.LockSupport;
|
||||
|
||||
import jdk.internal.misc.TerminatingThreadLocal;
|
||||
@ -332,7 +333,7 @@ class Thread implements Runnable {
|
||||
"nanosecond timeout value out of range");
|
||||
}
|
||||
|
||||
if (nanos >= 500000 || (nanos != 0 && millis == 0)) {
|
||||
if (nanos > 0 && millis < Long.MAX_VALUE) {
|
||||
millis++;
|
||||
}
|
||||
|
||||
@ -1291,28 +1292,23 @@ class Thread implements Runnable {
|
||||
* <i>interrupted status</i> of the current thread is
|
||||
* cleared when this exception is thrown.
|
||||
*/
|
||||
public final synchronized void join(long millis)
|
||||
public final synchronized void join(final long millis)
|
||||
throws InterruptedException {
|
||||
long base = System.currentTimeMillis();
|
||||
long now = 0;
|
||||
|
||||
if (millis < 0) {
|
||||
throw new IllegalArgumentException("timeout value is negative");
|
||||
}
|
||||
|
||||
if (millis == 0) {
|
||||
if (millis > 0) {
|
||||
if (isAlive()) {
|
||||
final long startTime = System.nanoTime();
|
||||
long delay = millis;
|
||||
do {
|
||||
wait(delay);
|
||||
} while (isAlive() && (delay = millis -
|
||||
TimeUnit.NANOSECONDS.toMillis(System.nanoTime() - startTime)) > 0);
|
||||
}
|
||||
} else if (millis == 0) {
|
||||
while (isAlive()) {
|
||||
wait(0);
|
||||
}
|
||||
} else {
|
||||
while (isAlive()) {
|
||||
long delay = millis - now;
|
||||
if (delay <= 0) {
|
||||
break;
|
||||
}
|
||||
wait(delay);
|
||||
now = System.currentTimeMillis() - base;
|
||||
}
|
||||
throw new IllegalArgumentException("timeout value is negative");
|
||||
}
|
||||
}
|
||||
|
||||
@ -1353,7 +1349,7 @@ class Thread implements Runnable {
|
||||
"nanosecond timeout value out of range");
|
||||
}
|
||||
|
||||
if (nanos >= 500000 || (nanos != 0 && millis == 0)) {
|
||||
if (nanos > 0 && millis < Long.MAX_VALUE) {
|
||||
millis++;
|
||||
}
|
||||
|
||||
|
@ -73,7 +73,8 @@ public final class Paths {
|
||||
* Converts the given URI to a {@link Path} object.
|
||||
*
|
||||
* @implSpec
|
||||
* This method simply invokes {@link Path#of(URI) * Path.of(URI)} with the given parameter.
|
||||
* This method simply invokes {@link Path#of(URI) Path.of(URI)} with the
|
||||
* given parameter.
|
||||
*
|
||||
* @param uri
|
||||
* the URI to convert
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1996, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1996, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -351,7 +351,7 @@ public abstract class Identity implements Principal, Serializable {
|
||||
|
||||
/**
|
||||
* Tests for equality between the specified identity and this identity.
|
||||
* This method should be overriden by subclasses to test for equality.
|
||||
* This method should be overridden by subclasses to test for equality.
|
||||
* The default behavior is to return true if the names and public keys
|
||||
* are equal.
|
||||
*
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1996, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1996, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -1318,7 +1318,7 @@ public abstract class Provider extends Properties {
|
||||
* {@code "putProviderProperty."+name}, where {@code name} is
|
||||
* the provider name, to see if it's ok to set this provider's property
|
||||
* values. If the default implementation of {@code checkSecurityAccess}
|
||||
* is used (that is, that method is not overriden), then this results in
|
||||
* is used (that is, that method is not overridden), then this results in
|
||||
* a call to the security manager's {@code checkPermission} method with
|
||||
* a {@code SecurityPermission("putProviderProperty."+name)}
|
||||
* permission.
|
||||
@ -1410,7 +1410,7 @@ public abstract class Provider extends Properties {
|
||||
* the provider name, to see if it's ok to remove this provider's
|
||||
* properties. If the default implementation of
|
||||
* {@code checkSecurityAccess} is used (that is, that method is not
|
||||
* overriden), then this results in a call to the security manager's
|
||||
* overridden), then this results in a call to the security manager's
|
||||
* {@code checkPermission} method with a
|
||||
* {@code SecurityPermission("removeProviderProperty."+name)}
|
||||
* permission.
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1996, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1996, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -422,7 +422,7 @@ public final class Security {
|
||||
* method is called with the string {@code "removeProvider."+name}
|
||||
* to see if it's ok to remove the provider.
|
||||
* If the default implementation of {@code checkSecurityAccess}
|
||||
* is used (i.e., that method is not overriden), then this will result in
|
||||
* is used (i.e., that method is not overridden), then this will result in
|
||||
* a call to the security manager's {@code checkPermission} method
|
||||
* with a {@code SecurityPermission("removeProvider."+name)}
|
||||
* permission.
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -348,7 +348,7 @@ public class RuleBasedCollator extends Collator{
|
||||
* Compares the character data stored in two different strings based on the
|
||||
* collation rules. Returns information about whether a string is less
|
||||
* than, greater than or equal to another string in a language.
|
||||
* This can be overriden in a subclass.
|
||||
* This can be overridden in a subclass.
|
||||
*
|
||||
* @exception NullPointerException if <code>source</code> or <code>target</code> is null.
|
||||
*/
|
||||
@ -567,7 +567,7 @@ public class RuleBasedCollator extends Collator{
|
||||
/**
|
||||
* Transforms the string into a series of characters that can be compared
|
||||
* with CollationKey.compareTo. This overrides java.text.Collator.getCollationKey.
|
||||
* It can be overriden in a subclass.
|
||||
* It can be overridden in a subclass.
|
||||
*/
|
||||
public synchronized CollationKey getCollationKey(String source)
|
||||
{
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1995, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -136,7 +136,7 @@ class Random implements java.io.Serializable {
|
||||
if (getClass() == Random.class)
|
||||
this.seed = new AtomicLong(initialScramble(seed));
|
||||
else {
|
||||
// subclass might have overriden setSeed
|
||||
// subclass might have overridden setSeed
|
||||
this.seed = new AtomicLong();
|
||||
setSeed(seed);
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -77,7 +77,7 @@ public final class StringJoiner {
|
||||
private int len;
|
||||
|
||||
/**
|
||||
* When overriden by the user to be non-null via {@link setEmptyValue}, the
|
||||
* When overridden by the user to be non-null via {@link setEmptyValue}, the
|
||||
* string returned by toString() when no elements have yet been added.
|
||||
* When null, prefix + suffix is used as the empty value.
|
||||
*/
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -52,7 +52,7 @@ import javax.crypto.IllegalBlockSizeException;
|
||||
* method counts only data that have been processed by the encapsulated Cipher.
|
||||
*
|
||||
* <p> It is crucial for a programmer using this class not to use
|
||||
* methods that are not defined or overriden in this class (such as a
|
||||
* methods that are not defined or overridden in this class (such as a
|
||||
* new method or constructor that is later added to one of the super
|
||||
* classes), because the design and implementation of those methods
|
||||
* are unlikely to have considered security impact with regard to
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -53,7 +53,7 @@ import java.io.*;
|
||||
* alternative to using this class.
|
||||
*
|
||||
* <p> It is crucial for a programmer using this class not to use
|
||||
* methods that are not defined or overriden in this class (such as a
|
||||
* methods that are not defined or overridden in this class (such as a
|
||||
* new method or constructor that is later added to one of the super
|
||||
* classes), because the design and implementation of those methods
|
||||
* are unlikely to have considered security impact with regard to
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -46,7 +46,7 @@ import java.security.cert.X509Certificate;
|
||||
* However, the implementations can be replaced on a per-class (static) or
|
||||
* per-instance basis. All new <code>HttpsURLConnection</code>s instances
|
||||
* will be assigned
|
||||
* the "default" static values at instance creation, but they can be overriden
|
||||
* the "default" static values at instance creation, but they can be overridden
|
||||
* by calling the appropriate per-instance set method(s) before
|
||||
* <code>connect</code>ing.
|
||||
*
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -48,7 +48,7 @@ import java.net.*;
|
||||
* authentication is necessary, and whether created sockets should
|
||||
* begin handshaking in client or server mode. The state
|
||||
* inherited by the created <code>SSLSocket</code> can be
|
||||
* overriden by calling the appropriate methods.
|
||||
* overridden by calling the appropriate methods.
|
||||
*
|
||||
* @see java.net.ServerSocket
|
||||
* @see SSLSocket
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2004, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -31,7 +31,7 @@ import java.security.Principal;
|
||||
* Abstract class that provides for extension of the X509KeyManager
|
||||
* interface.
|
||||
* <P>
|
||||
* Methods in this class should be overriden to provide actual
|
||||
* Methods in this class should be overridden to provide actual
|
||||
* implementations.
|
||||
*
|
||||
* @since 1.5
|
||||
|
@ -27,7 +27,6 @@ package sun.security.ssl;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.security.AccessController;
|
||||
import java.security.AlgorithmConstraints;
|
||||
import java.security.AlgorithmParameters;
|
||||
import java.security.CryptoPrimitive;
|
||||
@ -672,6 +671,11 @@ final class SupportedGroupsExtension {
|
||||
}
|
||||
|
||||
AlgorithmParameters params = namedGroupParams.get(namedGroup);
|
||||
if (params == null) {
|
||||
throw new RuntimeException(
|
||||
"Not a supported EC named group: " + namedGroup);
|
||||
}
|
||||
|
||||
try {
|
||||
return params.getParameterSpec(ECGenParameterSpec.class);
|
||||
} catch (InvalidParameterSpecException ipse) {
|
||||
@ -687,6 +691,11 @@ final class SupportedGroupsExtension {
|
||||
}
|
||||
|
||||
AlgorithmParameters params = namedGroupParams.get(namedGroup);
|
||||
if (params == null) {
|
||||
throw new RuntimeException(
|
||||
"Not a supported DH named group: " + namedGroup);
|
||||
}
|
||||
|
||||
try {
|
||||
return params.getParameterSpec(DHParameterSpec.class);
|
||||
} catch (InvalidParameterSpecException ipse) {
|
||||
@ -739,7 +748,7 @@ final class SupportedGroupsExtension {
|
||||
namedGroupParams.get(namedGroup));
|
||||
}
|
||||
|
||||
// Is there any supported group permitted by the constraints?
|
||||
// Is the named group supported?
|
||||
static boolean isSupported(NamedGroup namedGroup) {
|
||||
for (NamedGroup group : supportedNamedGroups) {
|
||||
if (namedGroup.id == group.id) {
|
||||
@ -757,6 +766,7 @@ final class SupportedGroupsExtension {
|
||||
for (NamedGroup namedGroup : requestedNamedGroups) {
|
||||
if ((namedGroup.type == type) &&
|
||||
namedGroup.isAvailable(negotiatedProtocol) &&
|
||||
isSupported(namedGroup) &&
|
||||
constraints.permits(
|
||||
EnumSet.of(CryptoPrimitive.KEY_AGREEMENT),
|
||||
namedGroup.algorithm,
|
||||
|
@ -281,7 +281,7 @@ public class CLDRTimeZoneNameProviderImpl extends TimeZoneNameProviderImpl {
|
||||
.replaceFirst("H+", (isShort ? "\\%1\\$d" : "\\%1\\$02d"))
|
||||
.replaceFirst("m+", "\\%2\\$02d");
|
||||
return MessageFormat.format(gmtFormat,
|
||||
String.format(hourFormat, offset / 60, offset % 60));
|
||||
String.format(l, hourFormat, offset / 60, offset % 60));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -100,6 +100,9 @@ DEF_STATIC_JNI_OnLoad
|
||||
static ZFILE
|
||||
ZFILE_Open(const char *fname, int flags) {
|
||||
#ifdef WIN32
|
||||
WCHAR *wfname, *wprefixed_fname;
|
||||
size_t converted_chars, fname_length;
|
||||
jlong fhandle;
|
||||
const DWORD access =
|
||||
(flags & O_RDWR) ? (GENERIC_WRITE | GENERIC_READ) :
|
||||
(flags & O_WRONLY) ? GENERIC_WRITE :
|
||||
@ -121,14 +124,37 @@ ZFILE_Open(const char *fname, int flags) {
|
||||
FILE_ATTRIBUTE_NORMAL;
|
||||
const DWORD flagsAndAttributes = maybeWriteThrough | maybeDeleteOnClose;
|
||||
|
||||
return (jlong) CreateFile(
|
||||
fname, /* Wide char path name */
|
||||
access, /* Read and/or write permission */
|
||||
sharing, /* File sharing flags */
|
||||
NULL, /* Security attributes */
|
||||
disposition, /* creation disposition */
|
||||
flagsAndAttributes, /* flags and attributes */
|
||||
NULL);
|
||||
fname_length = strlen(fname);
|
||||
if (fname_length < MAX_PATH) {
|
||||
return (jlong)CreateFile(
|
||||
fname, /* path name in multibyte char */
|
||||
access, /* Read and/or write permission */
|
||||
sharing, /* File sharing flags */
|
||||
NULL, /* Security attributes */
|
||||
disposition, /* creation disposition */
|
||||
flagsAndAttributes, /* flags and attributes */
|
||||
NULL);
|
||||
} else {
|
||||
if ((wfname = (WCHAR*)malloc((fname_length + 1) * sizeof(WCHAR))) == NULL)
|
||||
return (jlong)INVALID_HANDLE_VALUE;
|
||||
|
||||
if (mbstowcs_s(&converted_chars, wfname, fname_length + 1, fname, fname_length) != 0) {
|
||||
free(wfname);
|
||||
return (jlong)INVALID_HANDLE_VALUE;
|
||||
}
|
||||
wprefixed_fname = getPrefixed(wfname, (int)fname_length);
|
||||
fhandle = (jlong)CreateFileW(
|
||||
wprefixed_fname, /* Wide char path name */
|
||||
access, /* Read and/or write permission */
|
||||
sharing, /* File sharing flags */
|
||||
NULL, /* Security attributes */
|
||||
disposition, /* creation disposition */
|
||||
flagsAndAttributes, /* flags and attributes */
|
||||
NULL);
|
||||
free(wfname);
|
||||
free(wprefixed_fname);
|
||||
return fhandle;
|
||||
}
|
||||
#else
|
||||
return open(fname, flags, 0);
|
||||
#endif
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -26,6 +26,7 @@
|
||||
#define OS_SOLARIS_DTRACE_LIBJVM_DB_H
|
||||
|
||||
#include <proc_service.h>
|
||||
#include "jni.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@ -35,7 +36,7 @@ typedef struct jvm_agent jvm_agent_t;
|
||||
|
||||
#define JVM_DB_VERSION 1
|
||||
|
||||
jvm_agent_t *Jagent_create(struct ps_prochandle *P, int vers);
|
||||
JNIEXPORT jvm_agent_t *Jagent_create(struct ps_prochandle *P, int vers);
|
||||
|
||||
/*
|
||||
* Called from Jframe_iter() for each java frame. If it returns 0, then
|
||||
@ -57,9 +58,9 @@ typedef int java_stack_f(void *cld, const prgregset_t regs, const char* name, in
|
||||
* frames were found, or if there was some unrecoverable error. Otherwise,
|
||||
* returns the last value returned from 'func'.
|
||||
*/
|
||||
int Jframe_iter(jvm_agent_t *agent, prgregset_t gregs, java_stack_f *func, void* cld);
|
||||
JNIEXPORT int Jframe_iter(jvm_agent_t *agent, prgregset_t gregs, java_stack_f *func, void* cld);
|
||||
|
||||
void Jagent_destroy(jvm_agent_t *J);
|
||||
JNIEXPORT void Jagent_destroy(jvm_agent_t *J);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2006, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -36,7 +36,7 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
#include "jni.h"
|
||||
|
||||
struct _jvm_t;
|
||||
typedef struct _jvm_t jvm_t;
|
||||
@ -44,10 +44,10 @@ typedef struct _jvm_t jvm_t;
|
||||
|
||||
/* Attach to the given JVM process. Returns NULL on failure.
|
||||
jvm_get_last_error() returns last error message. */
|
||||
jvm_t* jvm_attach(pid_t pid);
|
||||
JNIEXPORT jvm_t* jvm_attach(pid_t pid);
|
||||
|
||||
/* Returns the last error message from this library or NULL if none. */
|
||||
const char* jvm_get_last_error();
|
||||
JNIEXPORT const char* jvm_get_last_error();
|
||||
|
||||
/* few well-known probe type constants for 'probe_types' param below */
|
||||
|
||||
@ -68,7 +68,7 @@ const char* jvm_get_last_error();
|
||||
* On success, this returns number of probe_types enabled.
|
||||
* On failure, jvm_get_last_error() returns the last error message.
|
||||
*/
|
||||
int jvm_enable_dtprobes(jvm_t* jvm, int num_probe_types, const char** probe_types);
|
||||
JNIEXPORT int jvm_enable_dtprobes(jvm_t* jvm, int num_probe_types, const char** probe_types);
|
||||
|
||||
/* Note: There is no jvm_disable_dtprobes function. Probes are automatically
|
||||
* disabled when there are no more clients requiring those probes.
|
||||
@ -77,7 +77,7 @@ int jvm_enable_dtprobes(jvm_t* jvm, int num_probe_types, const char** probe_type
|
||||
/* Detach the given JVM. Returns 0 on success, -1 on failure.
|
||||
* jvm_get_last_error() returns the last error message.
|
||||
*/
|
||||
int jvm_detach(jvm_t* jvm);
|
||||
JNIEXPORT int jvm_detach(jvm_t* jvm);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1994, 2003, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1994, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -105,7 +105,7 @@ public class Handler extends URLStreamHandler {
|
||||
return uc;
|
||||
}
|
||||
|
||||
// Template method to be overriden by Java Plug-in. [stanleyh]
|
||||
// Template method to be overridden by Java Plug-in. [stanleyh]
|
||||
//
|
||||
protected URLConnection createFileURLConnection(URL u, File file)
|
||||
{
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2003, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -124,7 +124,7 @@ public class Handler extends URLStreamHandler {
|
||||
}
|
||||
|
||||
/**
|
||||
* Template method to be overriden by Java Plug-in. [stanleyh]
|
||||
* Template method to be overridden by Java Plug-in. [stanleyh]
|
||||
*/
|
||||
protected URLConnection createFileURLConnection(URL url, File file) {
|
||||
return new FileURLConnection(url, file);
|
||||
|
@ -1,226 +0,0 @@
|
||||
#
|
||||
# This file describes mapping information between Windows and Java
|
||||
# time zones.
|
||||
# Format: Each line should include a colon separated fields of Windows
|
||||
# time zone registry key, time zone mapID, locale (which is most
|
||||
# likely used in the time zone), and Java time zone ID. Blank lines
|
||||
# and lines that start with '#' are ignored. Data lines must be sorted
|
||||
# by mapID (ASCII order).
|
||||
#
|
||||
# NOTE
|
||||
# This table format is not a public interface of any Java
|
||||
# platforms. No applications should depend on this file in any form.
|
||||
#
|
||||
# This table has been generated by a program and should not be edited
|
||||
# manually.
|
||||
#
|
||||
Romance:-1,64::Europe/Paris:
|
||||
Romance Standard Time:-1,64::Europe/Paris:
|
||||
Warsaw:-1,65::Europe/Warsaw:
|
||||
Central Europe:-1,66::Europe/Prague:
|
||||
Central Europe Standard Time:-1,66::Europe/Prague:
|
||||
Prague Bratislava:-1,66::Europe/Prague:
|
||||
W. Central Africa Standard Time:-1,66:AO:Africa/Luanda:
|
||||
FLE:-1,67:FI:Europe/Helsinki:
|
||||
FLE Standard Time:-1,67:FI:Europe/Helsinki:
|
||||
GFT:-1,67::Europe/Athens:
|
||||
GFT Standard Time:-1,67::Europe/Athens:
|
||||
GTB:-1,67::Europe/Athens:
|
||||
GTB Standard Time:-1,67::Europe/Athens:
|
||||
Israel:-1,70::Asia/Jerusalem:
|
||||
Israel Standard Time:-1,70::Asia/Jerusalem:
|
||||
Arab:-1,71::Asia/Riyadh:
|
||||
Arab Standard Time:-1,71::Asia/Riyadh:
|
||||
Arabic Standard Time:-1,71:IQ:Asia/Baghdad:
|
||||
E. Africa:-1,71:KE:Africa/Nairobi:
|
||||
E. Africa Standard Time:-1,71:KE:Africa/Nairobi:
|
||||
Saudi Arabia:-1,71::Asia/Riyadh:
|
||||
Saudi Arabia Standard Time:-1,71::Asia/Riyadh:
|
||||
Iran:-1,72::Asia/Tehran:
|
||||
Iran Standard Time:-1,72::Asia/Tehran:
|
||||
Afghanistan:-1,73::Asia/Kabul:
|
||||
Afghanistan Standard Time:-1,73::Asia/Kabul:
|
||||
India:-1,74::Asia/Calcutta:
|
||||
India Standard Time:-1,74::Asia/Calcutta:
|
||||
Myanmar Standard Time:-1,74::Asia/Rangoon:
|
||||
Nepal Standard Time:-1,74::Asia/Katmandu:
|
||||
Sri Lanka:-1,74:LK:Asia/Colombo:
|
||||
Sri Lanka Standard Time:-1,74:LK:Asia/Colombo:
|
||||
Beijing:-1,75::Asia/Shanghai:
|
||||
China:-1,75::Asia/Shanghai:
|
||||
China Standard Time:-1,75::Asia/Shanghai:
|
||||
AUS Central:-1,76::Australia/Darwin:
|
||||
AUS Central Standard Time:-1,76::Australia/Darwin:
|
||||
Cen. Australia:-1,76::Australia/Adelaide:
|
||||
Cen. Australia Standard Time:-1,76::Australia/Adelaide:
|
||||
Vladivostok:-1,77::Asia/Vladivostok:
|
||||
Vladivostok Standard Time:-1,77::Asia/Vladivostok:
|
||||
West Pacific:-1,77:GU:Pacific/Guam:
|
||||
West Pacific Standard Time:-1,77:GU:Pacific/Guam:
|
||||
E. South America:-1,80::America/Sao_Paulo:
|
||||
E. South America Standard Time:-1,80::America/Sao_Paulo:
|
||||
Greenland Standard Time:-1,80:GL:America/Godthab:
|
||||
Newfoundland:-1,81::America/St_Johns:
|
||||
Newfoundland Standard Time:-1,81::America/St_Johns:
|
||||
Pacific SA:-1,82::America/Santiago:
|
||||
Pacific SA Standard Time:-1,82::America/Santiago:
|
||||
SA Western:-1,82:BO:America/La_Paz:
|
||||
SA Western Standard Time:-1,82:BO:America/La_Paz:
|
||||
SA Pacific:-1,83::America/Bogota:
|
||||
SA Pacific Standard Time:-1,83::America/Bogota:
|
||||
US Eastern:-1,84::America/Indianapolis:
|
||||
US Eastern Standard Time:-1,84::America/Indianapolis:
|
||||
Central America Standard Time:-1,85::America/Regina:
|
||||
Mexico:-1,85::America/Mexico_City:
|
||||
Mexico Standard Time:-1,85::America/Mexico_City:
|
||||
Canada Central:-1,86::America/Regina:
|
||||
Canada Central Standard Time:-1,86::America/Regina:
|
||||
US Mountain:-1,87::America/Phoenix:
|
||||
US Mountain Standard Time:-1,87::America/Phoenix:
|
||||
GMT:0,1::Europe/London:
|
||||
GMT Standard Time:0,1::Europe/London:
|
||||
Ekaterinburg:10,11::Asia/Yekaterinburg:
|
||||
Ekaterinburg Standard Time:10,11::Asia/Yekaterinburg:
|
||||
West Asia:10,11:UZ:Asia/Tashkent:
|
||||
West Asia Standard Time:10,11:UZ:Asia/Tashkent:
|
||||
Central Asia:12,13::Asia/Almaty:
|
||||
Central Asia Standard Time:12,13::Asia/Almaty:
|
||||
N. Central Asia Standard Time:12,13::Asia/Novosibirsk:
|
||||
Bangkok:14,15::Asia/Bangkok:
|
||||
Bangkok Standard Time:14,15::Asia/Bangkok:
|
||||
North Asia Standard Time:14,15::Asia/Krasnoyarsk:
|
||||
SE Asia:14,15::Asia/Bangkok:
|
||||
SE Asia Standard Time:14,15::Asia/Bangkok:
|
||||
North Asia East Standard Time:16,17:RU:Asia/Irkutsk:
|
||||
Singapore:16,17:SG:Asia/Singapore:
|
||||
Singapore Standard Time:16,17:SG:Asia/Singapore:
|
||||
Taipei:16,17::Asia/Taipei:
|
||||
Taipei Standard Time:16,17::Asia/Taipei:
|
||||
W. Australia:16,17:AU:Australia/Perth:
|
||||
W. Australia Standard Time:16,17:AU:Australia/Perth:
|
||||
Korea:18,19:KR:Asia/Seoul:
|
||||
Korea Standard Time:18,19:KR:Asia/Seoul:
|
||||
Tokyo:18,19::Asia/Tokyo:
|
||||
Tokyo Standard Time:18,19::Asia/Tokyo:
|
||||
Yakutsk:18,19:RU:Asia/Yakutsk:
|
||||
Yakutsk Standard Time:18,19:RU:Asia/Yakutsk:
|
||||
Central European:2,3:CS:Europe/Belgrade:
|
||||
Central European Standard Time:2,3:CS:Europe/Belgrade:
|
||||
W. Europe:2,3::Europe/Berlin:
|
||||
W. Europe Standard Time:2,3::Europe/Berlin:
|
||||
Tasmania:20,-1::Australia/Hobart:
|
||||
Tasmania Standard Time:20,-1::Australia/Hobart:
|
||||
AUS Eastern:20,21::Australia/Sydney:
|
||||
AUS Eastern Standard Time:20,21::Australia/Sydney:
|
||||
E. Australia:20,21::Australia/Brisbane:
|
||||
E. Australia Standard Time:20,21::Australia/Brisbane:
|
||||
Sydney Standard Time:20,21::Australia/Sydney:
|
||||
Tasmania Standard Time:20,65::Australia/Hobart:
|
||||
Central Pacific:22,23::Pacific/Guadalcanal:
|
||||
Central Pacific Standard Time:22,23::Pacific/Guadalcanal:
|
||||
Dateline:24,25::GMT-1200:
|
||||
Dateline Standard Time:24,25::GMT-1200:
|
||||
Fiji:24,25::Pacific/Fiji:
|
||||
Fiji Standard Time:24,25::Pacific/Fiji:
|
||||
Samoa:26,27::Pacific/Apia:
|
||||
Samoa Standard Time:26,27::Pacific/Apia:
|
||||
Hawaiian:28,29::Pacific/Honolulu:
|
||||
Hawaiian Standard Time:28,29::Pacific/Honolulu:
|
||||
Alaskan:30,31::America/Anchorage:
|
||||
Alaskan Standard Time:30,31::America/Anchorage:
|
||||
Pacific:32,33::America/Los_Angeles:
|
||||
Pacific Standard Time:32,33::America/Los_Angeles:
|
||||
Mexico Standard Time 2:34,35:MX:America/Chihuahua:
|
||||
Mountain:34,35::America/Denver:
|
||||
Mountain Standard Time:34,35::America/Denver:
|
||||
Central:36,37::America/Chicago:
|
||||
Central Standard Time:36,37::America/Chicago:
|
||||
Eastern:38,39::America/New_York:
|
||||
Eastern Standard Time:38,39::America/New_York:
|
||||
E. Europe:4,5::EET:
|
||||
E. Europe Standard Time:4,5::EET:
|
||||
Egypt:4,68::Africa/Cairo:
|
||||
Egypt Standard Time:4,68::Africa/Cairo:
|
||||
South Africa:4,69::Africa/Harare:
|
||||
South Africa Standard Time:4,69::Africa/Harare:
|
||||
Atlantic:40,41::America/Halifax:
|
||||
Atlantic Standard Time:40,41::America/Halifax:
|
||||
SA Eastern:42,43:GF:America/Cayenne:
|
||||
SA Eastern Standard Time:42,43:GF:America/Cayenne:
|
||||
Mid-Atlantic:44,45::Atlantic/South_Georgia:
|
||||
Mid-Atlantic Standard Time:44,45::Atlantic/South_Georgia:
|
||||
Azores:46,47::Atlantic/Azores:
|
||||
Azores Standard Time:46,47::Atlantic/Azores:
|
||||
Cape Verde Standard Time:46,47::Atlantic/Cape_Verde:
|
||||
Russian:6,7::Europe/Moscow:
|
||||
Russian Standard Time:6,7::Europe/Moscow:
|
||||
New Zealand:78,79::Pacific/Auckland:
|
||||
New Zealand Standard Time:78,79::Pacific/Auckland:
|
||||
Tonga Standard Time:78,79::Pacific/Tongatapu:
|
||||
Arabian:8,9::Asia/Muscat:
|
||||
Arabian Standard Time:8,9::Asia/Muscat:
|
||||
Caucasus:8,9:AM:Asia/Yerevan:
|
||||
Caucasus Standard Time:8,9:AM:Asia/Yerevan:
|
||||
GMT Standard Time:88,89::GMT:
|
||||
Greenwich:88,89::GMT:
|
||||
Greenwich Standard Time:88,89::GMT:
|
||||
Aleutian Standard Time:900,900:US:America/Adak:
|
||||
Altai Standard Time:901,901::Asia/Barnaul:
|
||||
Argentina Standard Time:902,902::America/Buenos_Aires:
|
||||
Armenian Standard Time:903,903:AM:Asia/Yerevan:
|
||||
Astrakhan Standard Time:904,904::Europe/Astrakhan:
|
||||
Aus Central W. Standard Time:905,905::Australia/Eucla:
|
||||
Azerbaijan Standard Time:906,906:AZ:Asia/Baku:
|
||||
Bahia Standard Time:907,907::America/Bahia:
|
||||
Bangladesh Standard Time:908,908::Asia/Dhaka:
|
||||
Belarus Standard Time:909,909:BY:Europe/Minsk:
|
||||
Bougainville Standard Time:910,910::Pacific/Bougainville:
|
||||
Central Brazilian Standard Time:911,911:BR:America/Cuiaba:
|
||||
Central Standard Time (Mexico):912,912::America/Mexico_City:
|
||||
Chatham Islands Standard Time:913,913::Pacific/Chatham:
|
||||
Cuba Standard Time:914,914:CU:America/Havana:
|
||||
Easter Island Standard Time:915,915:CL:Pacific/Easter:
|
||||
Eastern Standard Time (Mexico):916,916::America/Cancun:
|
||||
Georgian Standard Time:917,917:GE:Asia/Tbilisi:
|
||||
Haiti Standard Time:918,918:HT:America/Port-au-Prince:
|
||||
Jordan Standard Time:919,919:JO:Asia/Amman:
|
||||
Kaliningrad Standard Time:920,920:RU:Europe/Kaliningrad:
|
||||
Kamchatka Standard Time:921,921:RU:Asia/Kamchatka:
|
||||
Libya Standard Time:922,922:LY:Africa/Tripoli:
|
||||
Line Islands Standard Time:923,923::Pacific/Kiritimati:
|
||||
Lord Howe Standard Time:924,924::Australia/Lord_Howe:
|
||||
Magadan Standard Time:925,925::Asia/Magadan:
|
||||
Marquesas Standard Time:926,926::Pacific/Marquesas:
|
||||
Mauritius Standard Time:927,927:MU:Indian/Mauritius:
|
||||
Middle East Standard Time:928,928:LB:Asia/Beirut:
|
||||
Montevideo Standard Time:929,929:UY:America/Montevideo:
|
||||
Morocco Standard Time:930,930:MA:Africa/Casablanca:
|
||||
Mountain Standard Time (Mexico):931,931:MX:America/Chihuahua:
|
||||
Namibia Standard Time:932,932:NA:Africa/Windhoek:
|
||||
Norfolk Standard Time:933,933::Pacific/Norfolk:
|
||||
North Korea Standard Time:934,934:KP:Asia/Pyongyang:
|
||||
Pacific Standard Time (Mexico):935,935:MX:America/Tijuana:
|
||||
Pakistan Standard Time:936,936::Asia/Karachi:
|
||||
Paraguay Standard Time:937,937:PY:America/Asuncion:
|
||||
Russia Time Zone 10:938,938::Asia/Srednekolymsk:
|
||||
Russia Time Zone 11:939,939::Asia/Anadyr:
|
||||
Russia Time Zone 3:940,940::Europe/Samara:
|
||||
Saint Pierre Standard Time:941,941:PM:America/Miquelon:
|
||||
Sakhalin Standard Time:942,942::Asia/Sakhalin:
|
||||
Syria Standard Time:943,943:SY:Asia/Damascus:
|
||||
Tocantins Standard Time:944,944::America/Araguaina:
|
||||
Tomsk Standard Time:945,945::Asia/Tomsk:
|
||||
Transbaikal Standard Time:946,946::Asia/Chita:
|
||||
Turkey Standard Time:947,947::Asia/Istanbul:
|
||||
Turks And Caicos Standard Time:948,948:TC:America/Grand_Turk:
|
||||
UTC+12:949,949::GMT+1200:
|
||||
UTC-02:950,950::GMT-0200:
|
||||
UTC-08:951,951::GMT-0800:
|
||||
UTC-09:952,952::GMT-0900:
|
||||
UTC-11:953,953::GMT-1100:
|
||||
UTC:954,954::UTC:
|
||||
Ulaanbaatar Standard Time:955,955::Asia/Ulaanbaatar:
|
||||
Venezuela Standard Time:956,956::America/Caracas:
|
||||
W. Mongolia Standard Time:957,957::Asia/Hovd:
|
||||
West Bank Standard Time:958,958::Asia/Gaza:
|
||||
Western Brazilian Standard Time:959,959:BR:America/Rio_Branco:
|
@ -36,6 +36,7 @@
|
||||
|
||||
#define MAX_ZONE_CHAR 256
|
||||
#define MAX_MAPID_LENGTH 32
|
||||
#define MAX_REGION_LENGTH 4
|
||||
|
||||
#define NT_TZ_KEY "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Time Zones"
|
||||
#define WIN_TZ_KEY "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Time Zones"
|
||||
@ -145,7 +146,7 @@ static void customZoneName(LONG bias, char *buffer) {
|
||||
/*
|
||||
* Gets the current time zone entry in the "Time Zones" registry.
|
||||
*/
|
||||
static int getWinTimeZone(char *winZoneName, char *winMapID)
|
||||
static int getWinTimeZone(char *winZoneName)
|
||||
{
|
||||
DYNAMIC_TIME_ZONE_INFORMATION dtzi;
|
||||
DWORD timeType;
|
||||
@ -231,7 +232,6 @@ static int getWinTimeZone(char *winZoneName, char *winMapID)
|
||||
WCHAR stdNameInReg[MAX_ZONE_CHAR];
|
||||
TziValue tempTzi;
|
||||
WCHAR *stdNamePtr = tzi.StandardName;
|
||||
DWORD valueSize;
|
||||
int onlyMapID;
|
||||
|
||||
timeType = GetTimeZoneInformation(&tzi);
|
||||
@ -372,24 +372,7 @@ static int getWinTimeZone(char *winZoneName, char *winMapID)
|
||||
(void) RegCloseKey(hSubKey);
|
||||
}
|
||||
|
||||
/*
|
||||
* Get the "MapID" value of the registry to be able to eliminate
|
||||
* duplicated key names later.
|
||||
*/
|
||||
valueSize = MAX_MAPID_LENGTH;
|
||||
ret = RegQueryValueExA(hSubKey, "MapID", NULL, &valueType, winMapID, &valueSize);
|
||||
(void) RegCloseKey(hSubKey);
|
||||
(void) RegCloseKey(hKey);
|
||||
|
||||
if (ret != ERROR_SUCCESS) {
|
||||
/*
|
||||
* Vista doesn't have mapID. VALUE_UNKNOWN should be returned
|
||||
* only for Windows NT.
|
||||
*/
|
||||
if (onlyMapID == 1) {
|
||||
return VALUE_UNKNOWN;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return VALUE_KEY;
|
||||
@ -410,24 +393,17 @@ static int getWinTimeZone(char *winZoneName, char *winMapID)
|
||||
* Index values for the mapping table.
|
||||
*/
|
||||
#define TZ_WIN_NAME 0
|
||||
#define TZ_MAPID 1
|
||||
#define TZ_REGION 2
|
||||
#define TZ_JAVA_NAME 3
|
||||
#define TZ_REGION 1
|
||||
#define TZ_JAVA_NAME 2
|
||||
|
||||
#define TZ_NITEMS 4 /* number of items (fields) */
|
||||
#define TZ_NITEMS 3 /* number of items (fields) */
|
||||
|
||||
/*
|
||||
* Looks up the mapping table (tzmappings) and returns a Java time
|
||||
* zone ID (e.g., "America/Los_Angeles") if found. Otherwise, NULL is
|
||||
* returned.
|
||||
*
|
||||
* value_type is one of the following values:
|
||||
* VALUE_KEY for exact key matching
|
||||
* VALUE_MAPID for MapID (this is
|
||||
* required for the old Windows, such as NT 4.0 SP3).
|
||||
*/
|
||||
static char *matchJavaTZ(const char *java_home_dir, int value_type, char *tzName,
|
||||
char *mapID)
|
||||
static char *matchJavaTZ(const char *java_home_dir, char *tzName)
|
||||
{
|
||||
int line;
|
||||
int IDmatched = 0;
|
||||
@ -436,9 +412,22 @@ static char *matchJavaTZ(const char *java_home_dir, int value_type, char *tzName
|
||||
char *items[TZ_NITEMS];
|
||||
char *mapFileName;
|
||||
char lineBuffer[MAX_ZONE_CHAR * 4];
|
||||
int noMapID = *mapID == '\0'; /* no mapID on Vista and later */
|
||||
int offset = 0;
|
||||
const char* errorMessage = "unknown error";
|
||||
char region[MAX_REGION_LENGTH];
|
||||
|
||||
// Get the user's location
|
||||
if (GetGeoInfo(GetUserGeoID(GEOCLASS_NATION),
|
||||
GEO_ISO2, region, MAX_REGION_LENGTH, 0) == 0) {
|
||||
// If GetGeoInfo fails, fallback to LCID's country
|
||||
LCID lcid = GetUserDefaultLCID();
|
||||
if (GetLocaleInfo(lcid,
|
||||
LOCALE_SISO3166CTRYNAME, region, MAX_REGION_LENGTH) == 0 &&
|
||||
GetLocaleInfo(lcid,
|
||||
LOCALE_SISO3166CTRYNAME2, region, MAX_REGION_LENGTH) == 0) {
|
||||
region[0] = '\0';
|
||||
}
|
||||
}
|
||||
|
||||
mapFileName = malloc(strlen(java_home_dir) + strlen(MAPPINGS_FILE) + 1);
|
||||
if (mapFileName == NULL) {
|
||||
@ -494,28 +483,20 @@ static char *matchJavaTZ(const char *java_home_dir, int value_type, char *tzName
|
||||
goto illegal_format;
|
||||
}
|
||||
|
||||
if (noMapID || strcmp(mapID, items[TZ_MAPID]) == 0) {
|
||||
/*
|
||||
* We need to scan items until the
|
||||
* exact match is found or the end of data is detected.
|
||||
*/
|
||||
if (strcmp(items[TZ_WIN_NAME], tzName) == 0) {
|
||||
/*
|
||||
* When there's no mapID, we need to scan items until the
|
||||
* exact match is found or the end of data is detected.
|
||||
* Found the time zone in the mapping table.
|
||||
* Check the region code and select the appropriate entry
|
||||
*/
|
||||
if (!noMapID) {
|
||||
IDmatched = 1;
|
||||
}
|
||||
if (strcmp(items[TZ_WIN_NAME], tzName) == 0) {
|
||||
/*
|
||||
* Found the time zone in the mapping table.
|
||||
*/
|
||||
if (strcmp(items[TZ_REGION], region) == 0 ||
|
||||
strcmp(items[TZ_REGION], "001") == 0) {
|
||||
javaTZName = _strdup(items[TZ_JAVA_NAME]);
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
if (IDmatched == 1) {
|
||||
/*
|
||||
* No need to look up the mapping table further.
|
||||
*/
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
fclose(fp);
|
||||
@ -535,19 +516,16 @@ static char *matchJavaTZ(const char *java_home_dir, int value_type, char *tzName
|
||||
char *findJavaTZ_md(const char *java_home_dir)
|
||||
{
|
||||
char winZoneName[MAX_ZONE_CHAR];
|
||||
char winMapID[MAX_MAPID_LENGTH];
|
||||
char *std_timezone = NULL;
|
||||
int result;
|
||||
|
||||
winMapID[0] = 0;
|
||||
result = getWinTimeZone(winZoneName, winMapID);
|
||||
result = getWinTimeZone(winZoneName);
|
||||
|
||||
if (result != VALUE_UNKNOWN) {
|
||||
if (result == VALUE_GMTOFFSET) {
|
||||
std_timezone = _strdup(winZoneName);
|
||||
} else {
|
||||
std_timezone = matchJavaTZ(java_home_dir, result,
|
||||
winZoneName, winMapID);
|
||||
std_timezone = matchJavaTZ(java_home_dir, winZoneName);
|
||||
if (std_timezone == NULL) {
|
||||
std_timezone = getGMTOffsetID();
|
||||
}
|
||||
|
@ -225,6 +225,8 @@ lastErrorReportable()
|
||||
return 1;
|
||||
}
|
||||
|
||||
int wcanonicalize(WCHAR *orig_path, WCHAR *result, int size);
|
||||
|
||||
/* Convert a pathname to canonical form. The input orig_path is assumed to
|
||||
have been converted to native form already, via JVM_NativePath(). This is
|
||||
necessary because _fullpath() rejects duplicate separator characters on
|
||||
@ -237,6 +239,38 @@ canonicalize(char *orig_path, char *result, int size)
|
||||
HANDLE h;
|
||||
char path[1024]; /* Working copy of path */
|
||||
char *src, *dst, *dend;
|
||||
wchar_t *worig_path, *wresult;
|
||||
size_t converted_chars = 0;
|
||||
|
||||
/* handle long path with length >= MAX_PATH */
|
||||
if (strlen(orig_path) >= MAX_PATH) {
|
||||
if ((worig_path = (WCHAR*)malloc(size * sizeof(WCHAR))) == NULL)
|
||||
return -1;
|
||||
|
||||
if (mbstowcs_s(&converted_chars, worig_path, (size_t)size, orig_path, (size_t)(size - 1)) != 0) {
|
||||
free(worig_path);
|
||||
return -1;
|
||||
}
|
||||
|
||||
if ((wresult = (WCHAR*)malloc(size * sizeof(WCHAR))) == NULL)
|
||||
return -1;
|
||||
|
||||
if (wcanonicalize(worig_path, wresult, size) != 0) {
|
||||
free(worig_path);
|
||||
free(wresult);
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (wcstombs_s(&converted_chars, result, (size_t)size, wresult, (size_t)(size - 1)) != 0) {
|
||||
free(worig_path);
|
||||
free(wresult);
|
||||
return -1;
|
||||
}
|
||||
|
||||
free(worig_path);
|
||||
free(wresult);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Reject paths that contain wildcards */
|
||||
if (wild(orig_path)) {
|
||||
@ -245,15 +279,15 @@ canonicalize(char *orig_path, char *result, int size)
|
||||
}
|
||||
|
||||
/* Collapse instances of "foo\.." and ensure absoluteness. Note that
|
||||
contrary to the documentation, the _fullpath procedure does not require
|
||||
the drive to be available. It also does not reliably change all
|
||||
occurrences of '/' to '\\' on Win95, so now JVM_NativePath does that. */
|
||||
if(!_fullpath(path, orig_path, sizeof(path))) {
|
||||
contrary to the documentation, the _fullpath procedure does not require
|
||||
the drive to be available. It also does not reliably change all
|
||||
occurrences of '/' to '\\' on Win95, so now JVM_NativePath does that. */
|
||||
if (!_fullpath(path, orig_path, sizeof(path))) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* Correction for Win95: _fullpath may leave a trailing "\\"
|
||||
on a UNC pathname */
|
||||
on a UNC pathname */
|
||||
if ((path[0] == '\\') && (path[1] == '\\')) {
|
||||
char *p = path + strlen(path);
|
||||
if ((p[-1] == '\\') && !islb(p[-2])) {
|
||||
@ -281,16 +315,16 @@ canonicalize(char *orig_path, char *result, int size)
|
||||
char *p;
|
||||
p = nextsep(src + 2); /* Skip past host name */
|
||||
if (!*p) {
|
||||
/* A UNC pathname must begin with "\\\\host\\share",
|
||||
so reject this path as invalid if there is no share name */
|
||||
/* A UNC pathname must begin with "\\\\host\\share",
|
||||
so reject this path as invalid if there is no share name */
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
p = nextsep(p + 1); /* Skip past share name */
|
||||
if (!(dst = cp(dst, dend, '\0', src, p))) {
|
||||
return -1;
|
||||
}
|
||||
src = p;
|
||||
}
|
||||
p = nextsep(p + 1); /* Skip past share name */
|
||||
if (!(dst = cp(dst, dend, '\0', src, p))) {
|
||||
return -1;
|
||||
}
|
||||
src = p;
|
||||
} else {
|
||||
/* Invalid path */
|
||||
errno = EINVAL;
|
||||
@ -309,11 +343,11 @@ canonicalize(char *orig_path, char *result, int size)
|
||||
}
|
||||
|
||||
/* At this point we have copied either a drive specifier ("z:") or a UNC
|
||||
prefix ("\\\\host\\share") to the result buffer, and src points to the
|
||||
first byte of the remainder of the path. We now scan through the rest
|
||||
of the path, looking up each prefix in order to find the true name of
|
||||
the last element of each prefix, thereby computing the full true name of
|
||||
the original path. */
|
||||
prefix ("\\\\host\\share") to the result buffer, and src points to the
|
||||
first byte of the remainder of the path. We now scan through the rest
|
||||
of the path, looking up each prefix in order to find the true name of
|
||||
the last element of each prefix, thereby computing the full true name of
|
||||
the original path. */
|
||||
while (*src) {
|
||||
char *p = nextsep(src + 1); /* Find next separator */
|
||||
char c = *p;
|
||||
@ -325,8 +359,8 @@ canonicalize(char *orig_path, char *result, int size)
|
||||
/* Lookup succeeded; append true name to result and continue */
|
||||
FindClose(h);
|
||||
if (!(dst = cp(dst, dend, '\\',
|
||||
fd.cFileName,
|
||||
fd.cFileName + strlen(fd.cFileName)))) {
|
||||
fd.cFileName,
|
||||
fd.cFileName + strlen(fd.cFileName)))) {
|
||||
return -1;
|
||||
}
|
||||
src = p;
|
||||
@ -344,8 +378,8 @@ canonicalize(char *orig_path, char *result, int size)
|
||||
}
|
||||
|
||||
if (dst >= dend) {
|
||||
errno = ENAMETOOLONG;
|
||||
return -1;
|
||||
errno = ENAMETOOLONG;
|
||||
return -1;
|
||||
}
|
||||
*dst = '\0';
|
||||
return 0;
|
||||
@ -587,7 +621,7 @@ wcanonicalizeWithPrefix(WCHAR *canonicalPrefix, WCHAR *pathWithCanonicalPrefix,
|
||||
*/
|
||||
|
||||
/* copy \\?\ or \\?\UNC\ to the front of path*/
|
||||
WCHAR*
|
||||
__declspec(dllexport) WCHAR*
|
||||
getPrefixed(const WCHAR* path, int pathlen) {
|
||||
WCHAR* pathbuf = (WCHAR*)malloc((pathlen + 10) * sizeof (WCHAR));
|
||||
if (pathbuf != 0) {
|
||||
|
@ -38,7 +38,7 @@
|
||||
*/
|
||||
WCHAR* pathToNTPath(JNIEnv *env, jstring path, jboolean throwFNFE);
|
||||
WCHAR* fileToNTPath(JNIEnv *env, jobject file, jfieldID id);
|
||||
WCHAR* getPrefixed(const WCHAR* path, int pathlen);
|
||||
__declspec(dllexport) WCHAR* getPrefixed(const WCHAR* path, int pathlen);
|
||||
WCHAR* currentDir(int di);
|
||||
int currentDirLength(const WCHAR* path, int pathlen);
|
||||
int handleAvailable(FD fd, jlong *pbytes);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -2057,7 +2057,9 @@ public class Lower extends TreeTranslator {
|
||||
|
||||
// evaluate and discard the first expression, then evaluate the second.
|
||||
JCExpression makeComma(final JCExpression expr1, final JCExpression expr2) {
|
||||
return abstractRval(expr1, discarded -> expr2);
|
||||
JCExpression res = make.LetExpr(List.of(make.Exec(expr1)), expr2);
|
||||
res.type = expr2.type;
|
||||
return res;
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
|
@ -183,7 +183,7 @@ public class MemberEnter extends JCTree.Visitor {
|
||||
|
||||
//if this is a default method, add the DEFAULT flag to the enclosing interface
|
||||
if ((tree.mods.flags & DEFAULT) != 0) {
|
||||
m.enclClass().flags_field |= DEFAULT;
|
||||
m.owner.flags_field |= DEFAULT;
|
||||
}
|
||||
|
||||
Env<AttrContext> localEnv = methodEnv(tree, env);
|
||||
|
@ -1536,13 +1536,12 @@ public class JavacProcessingEnvironment implements ProcessingEnvironment, Closea
|
||||
JCCompilationUnit topLevel;
|
||||
public void visitTopLevel(JCCompilationUnit node) {
|
||||
if (node.packge != null) {
|
||||
if (node.packge.package_info != null) {
|
||||
if (isPkgInfo(node.sourcefile, Kind.SOURCE)) {
|
||||
node.packge.package_info.reset();
|
||||
}
|
||||
node.packge.reset();
|
||||
}
|
||||
boolean isModuleInfo = node.sourcefile.isNameCompatible("module-info", Kind.SOURCE);
|
||||
if (isModuleInfo) {
|
||||
if (isModuleInfo(node.sourcefile, Kind.SOURCE)) {
|
||||
node.modle.reset();
|
||||
node.modle.completer = sym -> modules.enter(List.of(node), node.modle.module_info);
|
||||
node.modle.module_info.reset();
|
||||
|
@ -37,6 +37,7 @@ import sun.jvm.hotspot.gc.shared.*;
|
||||
import sun.jvm.hotspot.gc.epsilon.*;
|
||||
import sun.jvm.hotspot.gc.g1.*;
|
||||
import sun.jvm.hotspot.gc.parallel.*;
|
||||
import sun.jvm.hotspot.gc.z.*;
|
||||
import sun.jvm.hotspot.memory.*;
|
||||
import sun.jvm.hotspot.runtime.*;
|
||||
import sun.jvm.hotspot.types.*;
|
||||
@ -366,6 +367,10 @@ public class ObjectHeap {
|
||||
} else if (heap instanceof G1CollectedHeap) {
|
||||
G1CollectedHeap g1h = (G1CollectedHeap) heap;
|
||||
g1h.heapRegionIterate(lrc);
|
||||
} else if (heap instanceof ZCollectedHeap) {
|
||||
// Operation (currently) not supported with ZGC. Print
|
||||
// a warning and leave the list of live regions empty.
|
||||
System.err.println("Warning: Operation not supported with ZGC");
|
||||
} else if (heap instanceof EpsilonHeap) {
|
||||
EpsilonHeap eh = (EpsilonHeap) heap;
|
||||
liveRegions.add(eh.space().top());
|
||||
|
@ -50,6 +50,7 @@ public class ProgressiveHeapVisitor implements HeapVisitor {
|
||||
this.usedSize = usedSize;
|
||||
visitedSize = 0;
|
||||
userHeapVisitor.prologue(usedSize);
|
||||
thunk.heapIterationFractionUpdate(0.0);
|
||||
}
|
||||
|
||||
public boolean doObj(Oop obj) {
|
||||
|
@ -24,6 +24,7 @@
|
||||
|
||||
package org.graalvm.compiler.hotspot.management;
|
||||
|
||||
import org.graalvm.compiler.phases.common.jmx.HotSpotMBeanOperationProvider;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Comparator;
|
||||
@ -49,6 +50,7 @@ import org.graalvm.compiler.hotspot.HotSpotGraalRuntime;
|
||||
import org.graalvm.compiler.options.OptionDescriptor;
|
||||
import org.graalvm.compiler.options.OptionDescriptors;
|
||||
import org.graalvm.compiler.options.OptionsParser;
|
||||
import org.graalvm.compiler.serviceprovider.GraalServices;
|
||||
|
||||
/**
|
||||
* MBean used to access properties and operations of a {@link HotSpotGraalRuntime} instance.
|
||||
@ -170,11 +172,32 @@ final class HotSpotGraalRuntimeMBean implements DynamicMBean {
|
||||
if (DEBUG) {
|
||||
System.out.printf("invoke: %s%s%n", actionName, Arrays.asList(params));
|
||||
}
|
||||
Object retvalue = runtime.invokeManagementAction(actionName, params);
|
||||
Object retvalue = null;
|
||||
if ("dumpMethod".equals(actionName)) {
|
||||
retvalue = runtime.invokeManagementAction(actionName, params);
|
||||
} else {
|
||||
boolean found = false;
|
||||
for (HotSpotMBeanOperationProvider p : GraalServices.load(HotSpotMBeanOperationProvider.class)) {
|
||||
List<MBeanOperationInfo> info = new ArrayList<>();
|
||||
p.registerOperations(MBeanOperationInfo.class, info);
|
||||
for (MBeanOperationInfo op : info) {
|
||||
if (actionName.equals(op.getName())) {
|
||||
retvalue = p.invoke(actionName, params, signature);
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!found) {
|
||||
throw new MBeanException(new IllegalStateException("Cannot find operation " + actionName));
|
||||
}
|
||||
}
|
||||
if (DEBUG) {
|
||||
System.out.printf("invoke: %s%s = %s%n", actionName, Arrays.asList(params), retvalue);
|
||||
}
|
||||
return retvalue;
|
||||
} catch (MBeanException ex) {
|
||||
throw ex;
|
||||
} catch (Exception ex) {
|
||||
throw new ReflectionException(ex);
|
||||
}
|
||||
@ -198,30 +221,35 @@ final class HotSpotGraalRuntimeMBean implements DynamicMBean {
|
||||
return o1.getName().compareTo(o2.getName());
|
||||
}
|
||||
});
|
||||
MBeanOperationInfo[] ops = {
|
||||
new MBeanOperationInfo("dumpMethod", "Enable IGV dumps for provided method", new MBeanParameterInfo[]{
|
||||
new MBeanParameterInfo("className", "java.lang.String", "Class to observe"),
|
||||
new MBeanParameterInfo("methodName", "java.lang.String", "Method to observe"),
|
||||
}, "void", MBeanOperationInfo.ACTION),
|
||||
new MBeanOperationInfo("dumpMethod", "Enable IGV dumps for provided method", new MBeanParameterInfo[]{
|
||||
new MBeanParameterInfo("className", "java.lang.String", "Class to observe"),
|
||||
new MBeanParameterInfo("methodName", "java.lang.String", "Method to observe"),
|
||||
new MBeanParameterInfo("filter", "java.lang.String", "The parameter for Dump option"),
|
||||
}, "void", MBeanOperationInfo.ACTION),
|
||||
new MBeanOperationInfo("dumpMethod", "Enable IGV dumps for provided method", new MBeanParameterInfo[]{
|
||||
new MBeanParameterInfo("className", "java.lang.String", "Class to observe"),
|
||||
new MBeanParameterInfo("methodName", "java.lang.String", "Method to observe"),
|
||||
new MBeanParameterInfo("filter", "java.lang.String", "The parameter for Dump option"),
|
||||
new MBeanParameterInfo("host", "java.lang.String", "The host where the IGV tool is running at"),
|
||||
new MBeanParameterInfo("port", "int", "The port where the IGV tool is listening at"),
|
||||
}, "void", MBeanOperationInfo.ACTION)
|
||||
};
|
||||
List<MBeanOperationInfo> opts = new ArrayList<>();
|
||||
opts.add(new MBeanOperationInfo("dumpMethod", "Enable IGV dumps for provided method", new MBeanParameterInfo[]{
|
||||
new MBeanParameterInfo("className", "java.lang.String", "Class to observe"),
|
||||
new MBeanParameterInfo("methodName", "java.lang.String", "Method to observe"),
|
||||
}, "void", MBeanOperationInfo.ACTION));
|
||||
opts.add(new MBeanOperationInfo("dumpMethod", "Enable IGV dumps for provided method", new MBeanParameterInfo[]{
|
||||
new MBeanParameterInfo("className", "java.lang.String", "Class to observe"),
|
||||
new MBeanParameterInfo("methodName", "java.lang.String", "Method to observe"),
|
||||
new MBeanParameterInfo("filter", "java.lang.String", "The parameter for Dump option"),
|
||||
}, "void", MBeanOperationInfo.ACTION));
|
||||
opts.add(new MBeanOperationInfo("dumpMethod", "Enable IGV dumps for provided method", new MBeanParameterInfo[]{
|
||||
new MBeanParameterInfo("className", "java.lang.String", "Class to observe"),
|
||||
new MBeanParameterInfo("methodName", "java.lang.String", "Method to observe"),
|
||||
new MBeanParameterInfo("filter", "java.lang.String", "The parameter for Dump option"),
|
||||
new MBeanParameterInfo("host", "java.lang.String", "The host where the IGV tool is running at"),
|
||||
new MBeanParameterInfo("port", "int", "The port where the IGV tool is listening at"),
|
||||
}, "void", MBeanOperationInfo.ACTION));
|
||||
|
||||
for (HotSpotMBeanOperationProvider p : GraalServices.load(HotSpotMBeanOperationProvider.class)) {
|
||||
p.registerOperations(MBeanOperationInfo.class, opts);
|
||||
}
|
||||
|
||||
return new MBeanInfo(
|
||||
HotSpotGraalRuntimeMBean.class.getName(),
|
||||
"Graal",
|
||||
attrs.toArray(new MBeanAttributeInfo[attrs.size()]),
|
||||
null, ops, null);
|
||||
null,
|
||||
opts.toArray(new MBeanOperationInfo[opts.size()]),
|
||||
null);
|
||||
}
|
||||
|
||||
private static EconomicMap<String, OptionDescriptor> getOptionDescriptors() {
|
||||
|
@ -74,6 +74,7 @@ module jdk.internal.vm.compiler {
|
||||
jdk.aot,
|
||||
jdk.internal.vm.compiler.management;
|
||||
exports org.graalvm.compiler.phases to jdk.aot;
|
||||
exports org.graalvm.compiler.phases.common.jmx to jdk.internal.vm.compiler.management;
|
||||
exports org.graalvm.compiler.phases.tiers to jdk.aot;
|
||||
exports org.graalvm.compiler.printer to jdk.aot;
|
||||
exports org.graalvm.compiler.runtime to jdk.aot;
|
||||
|
@ -52,6 +52,8 @@ import static org.graalvm.compiler.asm.amd64.AMD64BaseAssembler.OperandSize.SD;
|
||||
import static org.graalvm.compiler.asm.amd64.AMD64BaseAssembler.OperandSize.SS;
|
||||
import static org.graalvm.compiler.asm.amd64.AMD64BaseAssembler.OperandSize.WORD;
|
||||
import static org.graalvm.compiler.asm.amd64.AMD64BaseAssembler.VEXPrefixConfig.L128;
|
||||
import static org.graalvm.compiler.asm.amd64.AMD64BaseAssembler.VEXPrefixConfig.L256;
|
||||
import static org.graalvm.compiler.asm.amd64.AMD64BaseAssembler.VEXPrefixConfig.LZ;
|
||||
import static org.graalvm.compiler.asm.amd64.AMD64BaseAssembler.VEXPrefixConfig.M_0F;
|
||||
import static org.graalvm.compiler.asm.amd64.AMD64BaseAssembler.VEXPrefixConfig.M_0F38;
|
||||
import static org.graalvm.compiler.asm.amd64.AMD64BaseAssembler.VEXPrefixConfig.M_0F3A;
|
||||
@ -78,7 +80,6 @@ import org.graalvm.compiler.debug.GraalError;
|
||||
|
||||
import jdk.vm.ci.amd64.AMD64;
|
||||
import jdk.vm.ci.amd64.AMD64.CPUFeature;
|
||||
import jdk.vm.ci.amd64.AMD64Kind;
|
||||
import jdk.vm.ci.code.Register;
|
||||
import jdk.vm.ci.code.Register.RegisterCategory;
|
||||
import jdk.vm.ci.code.TargetDescription;
|
||||
@ -893,7 +894,7 @@ public class AMD64Assembler extends AMD64BaseAssembler {
|
||||
}
|
||||
}
|
||||
|
||||
private enum AVXOpAssertion {
|
||||
private enum VEXOpAssertion {
|
||||
AVX1(CPUFeature.AVX, CPUFeature.AVX),
|
||||
AVX1_2(CPUFeature.AVX, CPUFeature.AVX2),
|
||||
AVX2(CPUFeature.AVX2, CPUFeature.AVX2),
|
||||
@ -903,23 +904,25 @@ public class AMD64Assembler extends AMD64BaseAssembler {
|
||||
XMM_CPU(CPUFeature.AVX, null, XMM, null, CPU, null),
|
||||
XMM_XMM_CPU(CPUFeature.AVX, null, XMM, XMM, CPU, null),
|
||||
CPU_XMM(CPUFeature.AVX, null, CPU, null, XMM, null),
|
||||
AVX1_2_CPU_XMM(CPUFeature.AVX, CPUFeature.AVX2, CPU, null, XMM, null);
|
||||
AVX1_2_CPU_XMM(CPUFeature.AVX, CPUFeature.AVX2, CPU, null, XMM, null),
|
||||
BMI1(CPUFeature.BMI1, null, CPU, CPU, CPU, null),
|
||||
BMI2(CPUFeature.BMI2, null, CPU, CPU, CPU, null);
|
||||
|
||||
private final CPUFeature avx128feature;
|
||||
private final CPUFeature avx256feature;
|
||||
private final CPUFeature l128feature;
|
||||
private final CPUFeature l256feature;
|
||||
|
||||
private final RegisterCategory rCategory;
|
||||
private final RegisterCategory vCategory;
|
||||
private final RegisterCategory mCategory;
|
||||
private final RegisterCategory imm8Category;
|
||||
|
||||
AVXOpAssertion(CPUFeature avx128feature, CPUFeature avx256feature) {
|
||||
this(avx128feature, avx256feature, XMM, XMM, XMM, XMM);
|
||||
VEXOpAssertion(CPUFeature l128feature, CPUFeature l256feature) {
|
||||
this(l128feature, l256feature, XMM, XMM, XMM, XMM);
|
||||
}
|
||||
|
||||
AVXOpAssertion(CPUFeature avx128feature, CPUFeature avx256feature, RegisterCategory rCategory, RegisterCategory vCategory, RegisterCategory mCategory, RegisterCategory imm8Category) {
|
||||
this.avx128feature = avx128feature;
|
||||
this.avx256feature = avx256feature;
|
||||
VEXOpAssertion(CPUFeature l128feature, CPUFeature l256feature, RegisterCategory rCategory, RegisterCategory vCategory, RegisterCategory mCategory, RegisterCategory imm8Category) {
|
||||
this.l128feature = l128feature;
|
||||
this.l256feature = l256feature;
|
||||
this.rCategory = rCategory;
|
||||
this.vCategory = vCategory;
|
||||
this.mCategory = mCategory;
|
||||
@ -927,16 +930,20 @@ public class AMD64Assembler extends AMD64BaseAssembler {
|
||||
}
|
||||
|
||||
public boolean check(AMD64 arch, AVXSize size, Register r, Register v, Register m) {
|
||||
return check(arch, size, r, v, m, null);
|
||||
return check(arch, getLFlag(size), r, v, m, null);
|
||||
}
|
||||
|
||||
public boolean check(AMD64 arch, AVXSize size, Register r, Register v, Register m, Register imm8) {
|
||||
switch (size) {
|
||||
case XMM:
|
||||
assert avx128feature != null && arch.getFeatures().contains(avx128feature) : "emitting illegal 128 bit instruction";
|
||||
return check(arch, getLFlag(size), r, v, m, imm8);
|
||||
}
|
||||
|
||||
public boolean check(AMD64 arch, int l, Register r, Register v, Register m, Register imm8) {
|
||||
switch (l) {
|
||||
case L128:
|
||||
assert l128feature != null && arch.getFeatures().contains(l128feature) : "emitting illegal 128 bit instruction";
|
||||
break;
|
||||
case YMM:
|
||||
assert avx256feature != null && arch.getFeatures().contains(avx256feature) : "emitting illegal 256 bit instruction";
|
||||
case L256:
|
||||
assert l256feature != null && arch.getFeatures().contains(l256feature) : "emitting illegal 256 bit instruction";
|
||||
break;
|
||||
}
|
||||
if (r != null) {
|
||||
@ -957,9 +964,9 @@ public class AMD64Assembler extends AMD64BaseAssembler {
|
||||
public boolean supports(EnumSet<CPUFeature> features, AVXSize avxSize) {
|
||||
switch (avxSize) {
|
||||
case XMM:
|
||||
return avx128feature != null && features.contains(avx128feature);
|
||||
return l128feature != null && features.contains(l128feature);
|
||||
case YMM:
|
||||
return avx256feature != null && features.contains(avx256feature);
|
||||
return l256feature != null && features.contains(l256feature);
|
||||
default:
|
||||
throw GraalError.shouldNotReachHere();
|
||||
}
|
||||
@ -976,9 +983,9 @@ public class AMD64Assembler extends AMD64BaseAssembler {
|
||||
protected final int op;
|
||||
|
||||
private final String opcode;
|
||||
protected final AVXOpAssertion assertion;
|
||||
protected final VEXOpAssertion assertion;
|
||||
|
||||
protected VexOp(String opcode, int pp, int mmmmm, int w, int op, AVXOpAssertion assertion) {
|
||||
protected VexOp(String opcode, int pp, int mmmmm, int w, int op, VEXOpAssertion assertion) {
|
||||
this.pp = pp;
|
||||
this.mmmmm = mmmmm;
|
||||
this.w = w;
|
||||
@ -987,10 +994,6 @@ public class AMD64Assembler extends AMD64BaseAssembler {
|
||||
this.assertion = assertion;
|
||||
}
|
||||
|
||||
public boolean isSupported(AMD64Assembler vasm, AMD64Kind kind) {
|
||||
return assertion.supports(((AMD64) vasm.target.arch).getFeatures(), AVXKind.getRegisterSize(kind));
|
||||
}
|
||||
|
||||
public final boolean isSupported(AMD64Assembler vasm, AVXSize size) {
|
||||
return assertion.supports(((AMD64) vasm.target.arch).getFeatures(), size);
|
||||
}
|
||||
@ -1006,14 +1009,14 @@ public class AMD64Assembler extends AMD64BaseAssembler {
|
||||
*/
|
||||
public static class VexRROp extends VexOp {
|
||||
// @formatter:off
|
||||
public static final VexRROp VMASKMOVDQU = new VexRROp("VMASKMOVDQU", P_66, M_0F, WIG, 0xF7, AVXOpAssertion.AVX1_128ONLY);
|
||||
public static final VexRROp VMASKMOVDQU = new VexRROp("VMASKMOVDQU", P_66, M_0F, WIG, 0xF7, VEXOpAssertion.AVX1_128ONLY);
|
||||
// @formatter:on
|
||||
|
||||
protected VexRROp(String opcode, int pp, int mmmmm, int w, int op) {
|
||||
this(opcode, pp, mmmmm, w, op, AVXOpAssertion.AVX1);
|
||||
this(opcode, pp, mmmmm, w, op, VEXOpAssertion.AVX1);
|
||||
}
|
||||
|
||||
protected VexRROp(String opcode, int pp, int mmmmm, int w, int op, AVXOpAssertion assertion) {
|
||||
protected VexRROp(String opcode, int pp, int mmmmm, int w, int op, VEXOpAssertion assertion) {
|
||||
super(opcode, pp, mmmmm, w, op, assertion);
|
||||
}
|
||||
|
||||
@ -1031,10 +1034,10 @@ public class AMD64Assembler extends AMD64BaseAssembler {
|
||||
*/
|
||||
public static class VexRMOp extends VexRROp {
|
||||
// @formatter:off
|
||||
public static final VexRMOp VCVTTSS2SI = new VexRMOp("VCVTTSS2SI", P_F3, M_0F, W0, 0x2C, AVXOpAssertion.CPU_XMM);
|
||||
public static final VexRMOp VCVTTSS2SQ = new VexRMOp("VCVTTSS2SQ", P_F3, M_0F, W1, 0x2C, AVXOpAssertion.CPU_XMM);
|
||||
public static final VexRMOp VCVTTSD2SI = new VexRMOp("VCVTTSD2SI", P_F2, M_0F, W0, 0x2C, AVXOpAssertion.CPU_XMM);
|
||||
public static final VexRMOp VCVTTSD2SQ = new VexRMOp("VCVTTSD2SQ", P_F2, M_0F, W1, 0x2C, AVXOpAssertion.CPU_XMM);
|
||||
public static final VexRMOp VCVTTSS2SI = new VexRMOp("VCVTTSS2SI", P_F3, M_0F, W0, 0x2C, VEXOpAssertion.CPU_XMM);
|
||||
public static final VexRMOp VCVTTSS2SQ = new VexRMOp("VCVTTSS2SQ", P_F3, M_0F, W1, 0x2C, VEXOpAssertion.CPU_XMM);
|
||||
public static final VexRMOp VCVTTSD2SI = new VexRMOp("VCVTTSD2SI", P_F2, M_0F, W0, 0x2C, VEXOpAssertion.CPU_XMM);
|
||||
public static final VexRMOp VCVTTSD2SQ = new VexRMOp("VCVTTSD2SQ", P_F2, M_0F, W1, 0x2C, VEXOpAssertion.CPU_XMM);
|
||||
public static final VexRMOp VCVTPS2PD = new VexRMOp("VCVTPS2PD", P_, M_0F, WIG, 0x5A);
|
||||
public static final VexRMOp VCVTPD2PS = new VexRMOp("VCVTPD2PS", P_66, M_0F, WIG, 0x5A);
|
||||
public static final VexRMOp VCVTDQ2PS = new VexRMOp("VCVTDQ2PS", P_, M_0F, WIG, 0x5B);
|
||||
@ -1042,14 +1045,14 @@ public class AMD64Assembler extends AMD64BaseAssembler {
|
||||
public static final VexRMOp VCVTTPD2DQ = new VexRMOp("VCVTTPD2DQ", P_66, M_0F, WIG, 0xE6);
|
||||
public static final VexRMOp VCVTDQ2PD = new VexRMOp("VCVTDQ2PD", P_F3, M_0F, WIG, 0xE6);
|
||||
public static final VexRMOp VBROADCASTSS = new VexRMOp("VBROADCASTSS", P_66, M_0F38, W0, 0x18);
|
||||
public static final VexRMOp VBROADCASTSD = new VexRMOp("VBROADCASTSD", P_66, M_0F38, W0, 0x19, AVXOpAssertion.AVX1_256ONLY);
|
||||
public static final VexRMOp VBROADCASTF128 = new VexRMOp("VBROADCASTF128", P_66, M_0F38, W0, 0x1A, AVXOpAssertion.AVX1_256ONLY);
|
||||
public static final VexRMOp VPBROADCASTI128 = new VexRMOp("VPBROADCASTI128", P_66, M_0F38, W0, 0x5A, AVXOpAssertion.AVX2_256ONLY);
|
||||
public static final VexRMOp VPBROADCASTB = new VexRMOp("VPBROADCASTB", P_66, M_0F38, W0, 0x78, AVXOpAssertion.AVX2);
|
||||
public static final VexRMOp VPBROADCASTW = new VexRMOp("VPBROADCASTW", P_66, M_0F38, W0, 0x79, AVXOpAssertion.AVX2);
|
||||
public static final VexRMOp VPBROADCASTD = new VexRMOp("VPBROADCASTD", P_66, M_0F38, W0, 0x58, AVXOpAssertion.AVX2);
|
||||
public static final VexRMOp VPBROADCASTQ = new VexRMOp("VPBROADCASTQ", P_66, M_0F38, W0, 0x59, AVXOpAssertion.AVX2);
|
||||
public static final VexRMOp VPMOVMSKB = new VexRMOp("VPMOVMSKB", P_66, M_0F, WIG, 0xD7, AVXOpAssertion.AVX1_2_CPU_XMM);
|
||||
public static final VexRMOp VBROADCASTSD = new VexRMOp("VBROADCASTSD", P_66, M_0F38, W0, 0x19, VEXOpAssertion.AVX1_256ONLY);
|
||||
public static final VexRMOp VBROADCASTF128 = new VexRMOp("VBROADCASTF128", P_66, M_0F38, W0, 0x1A, VEXOpAssertion.AVX1_256ONLY);
|
||||
public static final VexRMOp VPBROADCASTI128 = new VexRMOp("VPBROADCASTI128", P_66, M_0F38, W0, 0x5A, VEXOpAssertion.AVX2_256ONLY);
|
||||
public static final VexRMOp VPBROADCASTB = new VexRMOp("VPBROADCASTB", P_66, M_0F38, W0, 0x78, VEXOpAssertion.AVX2);
|
||||
public static final VexRMOp VPBROADCASTW = new VexRMOp("VPBROADCASTW", P_66, M_0F38, W0, 0x79, VEXOpAssertion.AVX2);
|
||||
public static final VexRMOp VPBROADCASTD = new VexRMOp("VPBROADCASTD", P_66, M_0F38, W0, 0x58, VEXOpAssertion.AVX2);
|
||||
public static final VexRMOp VPBROADCASTQ = new VexRMOp("VPBROADCASTQ", P_66, M_0F38, W0, 0x59, VEXOpAssertion.AVX2);
|
||||
public static final VexRMOp VPMOVMSKB = new VexRMOp("VPMOVMSKB", P_66, M_0F, WIG, 0xD7, VEXOpAssertion.AVX1_2_CPU_XMM);
|
||||
public static final VexRMOp VPMOVSXBW = new VexRMOp("VPMOVSXBW", P_66, M_0F38, WIG, 0x20);
|
||||
public static final VexRMOp VPMOVSXBD = new VexRMOp("VPMOVSXBD", P_66, M_0F38, WIG, 0x21);
|
||||
public static final VexRMOp VPMOVSXBQ = new VexRMOp("VPMOVSXBQ", P_66, M_0F38, WIG, 0x22);
|
||||
@ -1072,10 +1075,10 @@ public class AMD64Assembler extends AMD64BaseAssembler {
|
||||
// @formatter:on
|
||||
|
||||
protected VexRMOp(String opcode, int pp, int mmmmm, int w, int op) {
|
||||
this(opcode, pp, mmmmm, w, op, AVXOpAssertion.AVX1);
|
||||
this(opcode, pp, mmmmm, w, op, VEXOpAssertion.AVX1);
|
||||
}
|
||||
|
||||
protected VexRMOp(String opcode, int pp, int mmmmm, int w, int op, AVXOpAssertion assertion) {
|
||||
protected VexRMOp(String opcode, int pp, int mmmmm, int w, int op, VEXOpAssertion assertion) {
|
||||
super(opcode, pp, mmmmm, w, op, assertion);
|
||||
}
|
||||
|
||||
@ -1103,17 +1106,17 @@ public class AMD64Assembler extends AMD64BaseAssembler {
|
||||
public static final VexMoveOp VMOVUPD = new VexMoveOp("VMOVUPD", P_66, M_0F, WIG, 0x10, 0x11);
|
||||
public static final VexMoveOp VMOVSS = new VexMoveOp("VMOVSS", P_F3, M_0F, WIG, 0x10, 0x11);
|
||||
public static final VexMoveOp VMOVSD = new VexMoveOp("VMOVSD", P_F2, M_0F, WIG, 0x10, 0x11);
|
||||
public static final VexMoveOp VMOVD = new VexMoveOp("VMOVD", P_66, M_0F, W0, 0x6E, 0x7E, AVXOpAssertion.XMM_CPU);
|
||||
public static final VexMoveOp VMOVQ = new VexMoveOp("VMOVQ", P_66, M_0F, W1, 0x6E, 0x7E, AVXOpAssertion.XMM_CPU);
|
||||
public static final VexMoveOp VMOVD = new VexMoveOp("VMOVD", P_66, M_0F, W0, 0x6E, 0x7E, VEXOpAssertion.XMM_CPU);
|
||||
public static final VexMoveOp VMOVQ = new VexMoveOp("VMOVQ", P_66, M_0F, W1, 0x6E, 0x7E, VEXOpAssertion.XMM_CPU);
|
||||
// @formatter:on
|
||||
|
||||
private final int opReverse;
|
||||
|
||||
private VexMoveOp(String opcode, int pp, int mmmmm, int w, int op, int opReverse) {
|
||||
this(opcode, pp, mmmmm, w, op, opReverse, AVXOpAssertion.AVX1);
|
||||
this(opcode, pp, mmmmm, w, op, opReverse, VEXOpAssertion.AVX1);
|
||||
}
|
||||
|
||||
private VexMoveOp(String opcode, int pp, int mmmmm, int w, int op, int opReverse, AVXOpAssertion assertion) {
|
||||
private VexMoveOp(String opcode, int pp, int mmmmm, int w, int op, int opReverse, VEXOpAssertion assertion) {
|
||||
super(opcode, pp, mmmmm, w, op, assertion);
|
||||
this.opReverse = opReverse;
|
||||
}
|
||||
@ -1142,13 +1145,13 @@ public class AMD64Assembler extends AMD64BaseAssembler {
|
||||
*/
|
||||
public static final class VexRMIOp extends VexOp implements VexRRIOp {
|
||||
// @formatter:off
|
||||
public static final VexRMIOp VPERMQ = new VexRMIOp("VPERMQ", P_66, M_0F3A, W1, 0x00, AVXOpAssertion.AVX2_256ONLY);
|
||||
public static final VexRMIOp VPSHUFLW = new VexRMIOp("VPSHUFLW", P_F2, M_0F, WIG, 0x70, AVXOpAssertion.AVX1_2);
|
||||
public static final VexRMIOp VPSHUFHW = new VexRMIOp("VPSHUFHW", P_F3, M_0F, WIG, 0x70, AVXOpAssertion.AVX1_2);
|
||||
public static final VexRMIOp VPSHUFD = new VexRMIOp("VPSHUFD", P_66, M_0F, WIG, 0x70, AVXOpAssertion.AVX1_2);
|
||||
public static final VexRMIOp VPERMQ = new VexRMIOp("VPERMQ", P_66, M_0F3A, W1, 0x00, VEXOpAssertion.AVX2_256ONLY);
|
||||
public static final VexRMIOp VPSHUFLW = new VexRMIOp("VPSHUFLW", P_F2, M_0F, WIG, 0x70, VEXOpAssertion.AVX1_2);
|
||||
public static final VexRMIOp VPSHUFHW = new VexRMIOp("VPSHUFHW", P_F3, M_0F, WIG, 0x70, VEXOpAssertion.AVX1_2);
|
||||
public static final VexRMIOp VPSHUFD = new VexRMIOp("VPSHUFD", P_66, M_0F, WIG, 0x70, VEXOpAssertion.AVX1_2);
|
||||
// @formatter:on
|
||||
|
||||
private VexRMIOp(String opcode, int pp, int mmmmm, int w, int op, AVXOpAssertion assertion) {
|
||||
private VexRMIOp(String opcode, int pp, int mmmmm, int w, int op, VEXOpAssertion assertion) {
|
||||
super(opcode, pp, mmmmm, w, op, assertion);
|
||||
}
|
||||
|
||||
@ -1175,15 +1178,15 @@ public class AMD64Assembler extends AMD64BaseAssembler {
|
||||
*/
|
||||
public static final class VexMRIOp extends VexOp implements VexRRIOp {
|
||||
// @formatter:off
|
||||
public static final VexMRIOp VEXTRACTF128 = new VexMRIOp("VEXTRACTF128", P_66, M_0F3A, W0, 0x19, AVXOpAssertion.AVX1_256ONLY);
|
||||
public static final VexMRIOp VEXTRACTI128 = new VexMRIOp("VEXTRACTI128", P_66, M_0F3A, W0, 0x39, AVXOpAssertion.AVX2_256ONLY);
|
||||
public static final VexMRIOp VPEXTRB = new VexMRIOp("VPEXTRB", P_66, M_0F3A, W0, 0x14, AVXOpAssertion.XMM_CPU);
|
||||
public static final VexMRIOp VPEXTRW = new VexMRIOp("VPEXTRW", P_66, M_0F3A, W0, 0x15, AVXOpAssertion.XMM_CPU);
|
||||
public static final VexMRIOp VPEXTRD = new VexMRIOp("VPEXTRD", P_66, M_0F3A, W0, 0x16, AVXOpAssertion.XMM_CPU);
|
||||
public static final VexMRIOp VPEXTRQ = new VexMRIOp("VPEXTRQ", P_66, M_0F3A, W1, 0x16, AVXOpAssertion.XMM_CPU);
|
||||
public static final VexMRIOp VEXTRACTF128 = new VexMRIOp("VEXTRACTF128", P_66, M_0F3A, W0, 0x19, VEXOpAssertion.AVX1_256ONLY);
|
||||
public static final VexMRIOp VEXTRACTI128 = new VexMRIOp("VEXTRACTI128", P_66, M_0F3A, W0, 0x39, VEXOpAssertion.AVX2_256ONLY);
|
||||
public static final VexMRIOp VPEXTRB = new VexMRIOp("VPEXTRB", P_66, M_0F3A, W0, 0x14, VEXOpAssertion.XMM_CPU);
|
||||
public static final VexMRIOp VPEXTRW = new VexMRIOp("VPEXTRW", P_66, M_0F3A, W0, 0x15, VEXOpAssertion.XMM_CPU);
|
||||
public static final VexMRIOp VPEXTRD = new VexMRIOp("VPEXTRD", P_66, M_0F3A, W0, 0x16, VEXOpAssertion.XMM_CPU);
|
||||
public static final VexMRIOp VPEXTRQ = new VexMRIOp("VPEXTRQ", P_66, M_0F3A, W1, 0x16, VEXOpAssertion.XMM_CPU);
|
||||
// @formatter:on
|
||||
|
||||
private VexMRIOp(String opcode, int pp, int mmmmm, int w, int op, AVXOpAssertion assertion) {
|
||||
private VexMRIOp(String opcode, int pp, int mmmmm, int w, int op, VEXOpAssertion assertion) {
|
||||
super(opcode, pp, mmmmm, w, op, assertion);
|
||||
}
|
||||
|
||||
@ -1210,12 +1213,12 @@ public class AMD64Assembler extends AMD64BaseAssembler {
|
||||
*/
|
||||
public static class VexRVMROp extends VexOp {
|
||||
// @formatter:off
|
||||
public static final VexRVMROp VPBLENDVB = new VexRVMROp("VPBLENDVB", P_66, M_0F3A, W0, 0x4C, AVXOpAssertion.AVX1_2);
|
||||
public static final VexRVMROp VPBLENDVPS = new VexRVMROp("VPBLENDVPS", P_66, M_0F3A, W0, 0x4A, AVXOpAssertion.AVX1);
|
||||
public static final VexRVMROp VPBLENDVPD = new VexRVMROp("VPBLENDVPD", P_66, M_0F3A, W0, 0x4B, AVXOpAssertion.AVX1);
|
||||
public static final VexRVMROp VPBLENDVB = new VexRVMROp("VPBLENDVB", P_66, M_0F3A, W0, 0x4C, VEXOpAssertion.AVX1_2);
|
||||
public static final VexRVMROp VPBLENDVPS = new VexRVMROp("VPBLENDVPS", P_66, M_0F3A, W0, 0x4A, VEXOpAssertion.AVX1);
|
||||
public static final VexRVMROp VPBLENDVPD = new VexRVMROp("VPBLENDVPD", P_66, M_0F3A, W0, 0x4B, VEXOpAssertion.AVX1);
|
||||
// @formatter:on
|
||||
|
||||
protected VexRVMROp(String opcode, int pp, int mmmmm, int w, int op, AVXOpAssertion assertion) {
|
||||
protected VexRVMROp(String opcode, int pp, int mmmmm, int w, int op, VEXOpAssertion assertion) {
|
||||
super(opcode, pp, mmmmm, w, op, assertion);
|
||||
}
|
||||
|
||||
@ -1275,43 +1278,43 @@ public class AMD64Assembler extends AMD64BaseAssembler {
|
||||
public static final VexRVMOp VMAXSD = new VexRVMOp("VMAXSD", P_F2, M_0F, WIG, 0x5F);
|
||||
public static final VexRVMOp VADDSUBPS = new VexRVMOp("VADDSUBPS", P_F2, M_0F, WIG, 0xD0);
|
||||
public static final VexRVMOp VADDSUBPD = new VexRVMOp("VADDSUBPD", P_66, M_0F, WIG, 0xD0);
|
||||
public static final VexRVMOp VPAND = new VexRVMOp("VPAND", P_66, M_0F, WIG, 0xDB, AVXOpAssertion.AVX1_2);
|
||||
public static final VexRVMOp VPOR = new VexRVMOp("VPOR", P_66, M_0F, WIG, 0xEB, AVXOpAssertion.AVX1_2);
|
||||
public static final VexRVMOp VPXOR = new VexRVMOp("VPXOR", P_66, M_0F, WIG, 0xEF, AVXOpAssertion.AVX1_2);
|
||||
public static final VexRVMOp VPADDB = new VexRVMOp("VPADDB", P_66, M_0F, WIG, 0xFC, AVXOpAssertion.AVX1_2);
|
||||
public static final VexRVMOp VPADDW = new VexRVMOp("VPADDW", P_66, M_0F, WIG, 0xFD, AVXOpAssertion.AVX1_2);
|
||||
public static final VexRVMOp VPADDD = new VexRVMOp("VPADDD", P_66, M_0F, WIG, 0xFE, AVXOpAssertion.AVX1_2);
|
||||
public static final VexRVMOp VPADDQ = new VexRVMOp("VPADDQ", P_66, M_0F, WIG, 0xD4, AVXOpAssertion.AVX1_2);
|
||||
public static final VexRVMOp VPMULHUW = new VexRVMOp("VPMULHUW", P_66, M_0F, WIG, 0xE4, AVXOpAssertion.AVX1_2);
|
||||
public static final VexRVMOp VPMULHW = new VexRVMOp("VPMULHW", P_66, M_0F, WIG, 0xE5, AVXOpAssertion.AVX1_2);
|
||||
public static final VexRVMOp VPMULLW = new VexRVMOp("VPMULLW", P_66, M_0F, WIG, 0xD5, AVXOpAssertion.AVX1_2);
|
||||
public static final VexRVMOp VPMULLD = new VexRVMOp("VPMULLD", P_66, M_0F38, WIG, 0x40, AVXOpAssertion.AVX1_2);
|
||||
public static final VexRVMOp VPSUBB = new VexRVMOp("VPSUBB", P_66, M_0F, WIG, 0xF8, AVXOpAssertion.AVX1_2);
|
||||
public static final VexRVMOp VPSUBW = new VexRVMOp("VPSUBW", P_66, M_0F, WIG, 0xF9, AVXOpAssertion.AVX1_2);
|
||||
public static final VexRVMOp VPSUBD = new VexRVMOp("VPSUBD", P_66, M_0F, WIG, 0xFA, AVXOpAssertion.AVX1_2);
|
||||
public static final VexRVMOp VPSUBQ = new VexRVMOp("VPSUBQ", P_66, M_0F, WIG, 0xFB, AVXOpAssertion.AVX1_2);
|
||||
public static final VexRVMOp VPSHUFB = new VexRVMOp("VPSHUFB", P_66, M_0F38, WIG, 0x00, AVXOpAssertion.AVX1_2);
|
||||
public static final VexRVMOp VPAND = new VexRVMOp("VPAND", P_66, M_0F, WIG, 0xDB, VEXOpAssertion.AVX1_2);
|
||||
public static final VexRVMOp VPOR = new VexRVMOp("VPOR", P_66, M_0F, WIG, 0xEB, VEXOpAssertion.AVX1_2);
|
||||
public static final VexRVMOp VPXOR = new VexRVMOp("VPXOR", P_66, M_0F, WIG, 0xEF, VEXOpAssertion.AVX1_2);
|
||||
public static final VexRVMOp VPADDB = new VexRVMOp("VPADDB", P_66, M_0F, WIG, 0xFC, VEXOpAssertion.AVX1_2);
|
||||
public static final VexRVMOp VPADDW = new VexRVMOp("VPADDW", P_66, M_0F, WIG, 0xFD, VEXOpAssertion.AVX1_2);
|
||||
public static final VexRVMOp VPADDD = new VexRVMOp("VPADDD", P_66, M_0F, WIG, 0xFE, VEXOpAssertion.AVX1_2);
|
||||
public static final VexRVMOp VPADDQ = new VexRVMOp("VPADDQ", P_66, M_0F, WIG, 0xD4, VEXOpAssertion.AVX1_2);
|
||||
public static final VexRVMOp VPMULHUW = new VexRVMOp("VPMULHUW", P_66, M_0F, WIG, 0xE4, VEXOpAssertion.AVX1_2);
|
||||
public static final VexRVMOp VPMULHW = new VexRVMOp("VPMULHW", P_66, M_0F, WIG, 0xE5, VEXOpAssertion.AVX1_2);
|
||||
public static final VexRVMOp VPMULLW = new VexRVMOp("VPMULLW", P_66, M_0F, WIG, 0xD5, VEXOpAssertion.AVX1_2);
|
||||
public static final VexRVMOp VPMULLD = new VexRVMOp("VPMULLD", P_66, M_0F38, WIG, 0x40, VEXOpAssertion.AVX1_2);
|
||||
public static final VexRVMOp VPSUBB = new VexRVMOp("VPSUBB", P_66, M_0F, WIG, 0xF8, VEXOpAssertion.AVX1_2);
|
||||
public static final VexRVMOp VPSUBW = new VexRVMOp("VPSUBW", P_66, M_0F, WIG, 0xF9, VEXOpAssertion.AVX1_2);
|
||||
public static final VexRVMOp VPSUBD = new VexRVMOp("VPSUBD", P_66, M_0F, WIG, 0xFA, VEXOpAssertion.AVX1_2);
|
||||
public static final VexRVMOp VPSUBQ = new VexRVMOp("VPSUBQ", P_66, M_0F, WIG, 0xFB, VEXOpAssertion.AVX1_2);
|
||||
public static final VexRVMOp VPSHUFB = new VexRVMOp("VPSHUFB", P_66, M_0F38, WIG, 0x00, VEXOpAssertion.AVX1_2);
|
||||
public static final VexRVMOp VCVTSD2SS = new VexRVMOp("VCVTSD2SS", P_F2, M_0F, WIG, 0x5A);
|
||||
public static final VexRVMOp VCVTSS2SD = new VexRVMOp("VCVTSS2SD", P_F3, M_0F, WIG, 0x5A);
|
||||
public static final VexRVMOp VCVTSI2SD = new VexRVMOp("VCVTSI2SD", P_F2, M_0F, W0, 0x2A, AVXOpAssertion.XMM_XMM_CPU);
|
||||
public static final VexRVMOp VCVTSQ2SD = new VexRVMOp("VCVTSQ2SD", P_F2, M_0F, W1, 0x2A, AVXOpAssertion.XMM_XMM_CPU);
|
||||
public static final VexRVMOp VCVTSI2SS = new VexRVMOp("VCVTSI2SS", P_F3, M_0F, W0, 0x2A, AVXOpAssertion.XMM_XMM_CPU);
|
||||
public static final VexRVMOp VCVTSQ2SS = new VexRVMOp("VCVTSQ2SS", P_F3, M_0F, W1, 0x2A, AVXOpAssertion.XMM_XMM_CPU);
|
||||
public static final VexRVMOp VPCMPEQB = new VexRVMOp("VPCMPEQB", P_66, M_0F, WIG, 0x74, AVXOpAssertion.AVX1_2);
|
||||
public static final VexRVMOp VPCMPEQW = new VexRVMOp("VPCMPEQW", P_66, M_0F, WIG, 0x75, AVXOpAssertion.AVX1_2);
|
||||
public static final VexRVMOp VPCMPEQD = new VexRVMOp("VPCMPEQD", P_66, M_0F, WIG, 0x76, AVXOpAssertion.AVX1_2);
|
||||
public static final VexRVMOp VPCMPEQQ = new VexRVMOp("VPCMPEQQ", P_66, M_0F38, WIG, 0x29, AVXOpAssertion.AVX1_2);
|
||||
public static final VexRVMOp VPCMPGTB = new VexRVMOp("VPCMPGTB", P_66, M_0F, WIG, 0x64, AVXOpAssertion.AVX1_2);
|
||||
public static final VexRVMOp VPCMPGTW = new VexRVMOp("VPCMPGTW", P_66, M_0F, WIG, 0x65, AVXOpAssertion.AVX1_2);
|
||||
public static final VexRVMOp VPCMPGTD = new VexRVMOp("VPCMPGTD", P_66, M_0F, WIG, 0x66, AVXOpAssertion.AVX1_2);
|
||||
public static final VexRVMOp VPCMPGTQ = new VexRVMOp("VPCMPGTQ", P_66, M_0F38, WIG, 0x37, AVXOpAssertion.AVX1_2);
|
||||
public static final VexRVMOp VCVTSI2SD = new VexRVMOp("VCVTSI2SD", P_F2, M_0F, W0, 0x2A, VEXOpAssertion.XMM_XMM_CPU);
|
||||
public static final VexRVMOp VCVTSQ2SD = new VexRVMOp("VCVTSQ2SD", P_F2, M_0F, W1, 0x2A, VEXOpAssertion.XMM_XMM_CPU);
|
||||
public static final VexRVMOp VCVTSI2SS = new VexRVMOp("VCVTSI2SS", P_F3, M_0F, W0, 0x2A, VEXOpAssertion.XMM_XMM_CPU);
|
||||
public static final VexRVMOp VCVTSQ2SS = new VexRVMOp("VCVTSQ2SS", P_F3, M_0F, W1, 0x2A, VEXOpAssertion.XMM_XMM_CPU);
|
||||
public static final VexRVMOp VPCMPEQB = new VexRVMOp("VPCMPEQB", P_66, M_0F, WIG, 0x74, VEXOpAssertion.AVX1_2);
|
||||
public static final VexRVMOp VPCMPEQW = new VexRVMOp("VPCMPEQW", P_66, M_0F, WIG, 0x75, VEXOpAssertion.AVX1_2);
|
||||
public static final VexRVMOp VPCMPEQD = new VexRVMOp("VPCMPEQD", P_66, M_0F, WIG, 0x76, VEXOpAssertion.AVX1_2);
|
||||
public static final VexRVMOp VPCMPEQQ = new VexRVMOp("VPCMPEQQ", P_66, M_0F38, WIG, 0x29, VEXOpAssertion.AVX1_2);
|
||||
public static final VexRVMOp VPCMPGTB = new VexRVMOp("VPCMPGTB", P_66, M_0F, WIG, 0x64, VEXOpAssertion.AVX1_2);
|
||||
public static final VexRVMOp VPCMPGTW = new VexRVMOp("VPCMPGTW", P_66, M_0F, WIG, 0x65, VEXOpAssertion.AVX1_2);
|
||||
public static final VexRVMOp VPCMPGTD = new VexRVMOp("VPCMPGTD", P_66, M_0F, WIG, 0x66, VEXOpAssertion.AVX1_2);
|
||||
public static final VexRVMOp VPCMPGTQ = new VexRVMOp("VPCMPGTQ", P_66, M_0F38, WIG, 0x37, VEXOpAssertion.AVX1_2);
|
||||
// @formatter:on
|
||||
|
||||
private VexRVMOp(String opcode, int pp, int mmmmm, int w, int op) {
|
||||
this(opcode, pp, mmmmm, w, op, AVXOpAssertion.AVX1);
|
||||
this(opcode, pp, mmmmm, w, op, VEXOpAssertion.AVX1);
|
||||
}
|
||||
|
||||
protected VexRVMOp(String opcode, int pp, int mmmmm, int w, int op, AVXOpAssertion assertion) {
|
||||
protected VexRVMOp(String opcode, int pp, int mmmmm, int w, int op, VEXOpAssertion assertion) {
|
||||
super(opcode, pp, mmmmm, w, op, assertion);
|
||||
}
|
||||
|
||||
@ -1330,6 +1333,65 @@ public class AMD64Assembler extends AMD64BaseAssembler {
|
||||
}
|
||||
}
|
||||
|
||||
public static final class VexGeneralPurposeRVMOp extends VexOp {
|
||||
// @formatter:off
|
||||
public static final VexGeneralPurposeRVMOp ANDN = new VexGeneralPurposeRVMOp("ANDN", P_, M_0F38, WIG, 0xF2, VEXOpAssertion.BMI1);
|
||||
public static final VexGeneralPurposeRVMOp MULX = new VexGeneralPurposeRVMOp("MULX", P_F2, M_0F38, WIG, 0xF6, VEXOpAssertion.BMI2);
|
||||
public static final VexGeneralPurposeRVMOp PDEP = new VexGeneralPurposeRVMOp("PDEP", P_F2, M_0F38, WIG, 0xF5, VEXOpAssertion.BMI2);
|
||||
public static final VexGeneralPurposeRVMOp PEXT = new VexGeneralPurposeRVMOp("PEXT", P_F3, M_0F38, WIG, 0xF5, VEXOpAssertion.BMI2);
|
||||
// @formatter:on
|
||||
|
||||
private VexGeneralPurposeRVMOp(String opcode, int pp, int mmmmm, int w, int op, VEXOpAssertion assertion) {
|
||||
super(opcode, pp, mmmmm, w, op, assertion);
|
||||
}
|
||||
|
||||
public void emit(AMD64Assembler asm, AVXSize size, Register dst, Register src1, Register src2) {
|
||||
assert assertion.check((AMD64) asm.target.arch, LZ, dst, src1, src2, null);
|
||||
assert size == AVXSize.DWORD || size == AVXSize.QWORD;
|
||||
asm.vexPrefix(dst, src1, src2, size, pp, mmmmm, size == AVXSize.DWORD ? W0 : W1);
|
||||
asm.emitByte(op);
|
||||
asm.emitModRM(dst, src2);
|
||||
}
|
||||
|
||||
public void emit(AMD64Assembler asm, AVXSize size, Register dst, Register src1, AMD64Address src2) {
|
||||
assert assertion.check((AMD64) asm.target.arch, LZ, dst, src1, null, null);
|
||||
assert size == AVXSize.DWORD || size == AVXSize.QWORD;
|
||||
asm.vexPrefix(dst, src1, src2, size, pp, mmmmm, size == AVXSize.DWORD ? W0 : W1);
|
||||
asm.emitByte(op);
|
||||
asm.emitOperandHelper(dst, src2, 0);
|
||||
}
|
||||
}
|
||||
|
||||
public static final class VexGeneralPurposeRMVOp extends VexOp {
|
||||
// @formatter:off
|
||||
public static final VexGeneralPurposeRMVOp BEXTR = new VexGeneralPurposeRMVOp("BEXTR", P_, M_0F38, WIG, 0xF7, VEXOpAssertion.BMI1);
|
||||
public static final VexGeneralPurposeRMVOp BZHI = new VexGeneralPurposeRMVOp("BZHI", P_, M_0F38, WIG, 0xF5, VEXOpAssertion.BMI2);
|
||||
public static final VexGeneralPurposeRMVOp SARX = new VexGeneralPurposeRMVOp("SARX", P_F3, M_0F38, WIG, 0xF7, VEXOpAssertion.BMI2);
|
||||
public static final VexGeneralPurposeRMVOp SHRX = new VexGeneralPurposeRMVOp("SHRX", P_F2, M_0F38, WIG, 0xF7, VEXOpAssertion.BMI2);
|
||||
public static final VexGeneralPurposeRMVOp SHLX = new VexGeneralPurposeRMVOp("SHLX", P_66, M_0F38, WIG, 0xF7, VEXOpAssertion.BMI2);
|
||||
// @formatter:on
|
||||
|
||||
private VexGeneralPurposeRMVOp(String opcode, int pp, int mmmmm, int w, int op, VEXOpAssertion assertion) {
|
||||
super(opcode, pp, mmmmm, w, op, assertion);
|
||||
}
|
||||
|
||||
public void emit(AMD64Assembler asm, AVXSize size, Register dst, Register src1, Register src2) {
|
||||
assert assertion.check((AMD64) asm.target.arch, LZ, dst, src2, src1, null);
|
||||
assert size == AVXSize.DWORD || size == AVXSize.QWORD;
|
||||
asm.vexPrefix(dst, src2, src1, size, pp, mmmmm, size == AVXSize.DWORD ? W0 : W1);
|
||||
asm.emitByte(op);
|
||||
asm.emitModRM(dst, src1);
|
||||
}
|
||||
|
||||
public void emit(AMD64Assembler asm, AVXSize size, Register dst, AMD64Address src1, Register src2) {
|
||||
assert assertion.check((AMD64) asm.target.arch, LZ, dst, src2, null, null);
|
||||
assert size == AVXSize.DWORD || size == AVXSize.QWORD;
|
||||
asm.vexPrefix(dst, src2, src1, size, pp, mmmmm, size == AVXSize.DWORD ? W0 : W1);
|
||||
asm.emitByte(op);
|
||||
asm.emitOperandHelper(dst, src1, 0);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* VEX-encoded shift instructions with an operand order of either RVM or VMI.
|
||||
*/
|
||||
@ -1349,7 +1411,7 @@ public class AMD64Assembler extends AMD64BaseAssembler {
|
||||
private final int r;
|
||||
|
||||
private VexShiftOp(String opcode, int pp, int mmmmm, int w, int op, int immOp, int r) {
|
||||
super(opcode, pp, mmmmm, w, op, AVXOpAssertion.AVX1_2);
|
||||
super(opcode, pp, mmmmm, w, op, VEXOpAssertion.AVX1_2);
|
||||
this.immOp = immOp;
|
||||
this.r = r;
|
||||
}
|
||||
@ -1368,17 +1430,17 @@ public class AMD64Assembler extends AMD64BaseAssembler {
|
||||
// @formatter:off
|
||||
public static final VexMaskMoveOp VMASKMOVPS = new VexMaskMoveOp("VMASKMOVPS", P_66, M_0F38, W0, 0x2C, 0x2E);
|
||||
public static final VexMaskMoveOp VMASKMOVPD = new VexMaskMoveOp("VMASKMOVPD", P_66, M_0F38, W0, 0x2D, 0x2F);
|
||||
public static final VexMaskMoveOp VPMASKMOVD = new VexMaskMoveOp("VPMASKMOVD", P_66, M_0F38, W0, 0x8C, 0x8E, AVXOpAssertion.AVX2);
|
||||
public static final VexMaskMoveOp VPMASKMOVQ = new VexMaskMoveOp("VPMASKMOVQ", P_66, M_0F38, W1, 0x8C, 0x8E, AVXOpAssertion.AVX2);
|
||||
public static final VexMaskMoveOp VPMASKMOVD = new VexMaskMoveOp("VPMASKMOVD", P_66, M_0F38, W0, 0x8C, 0x8E, VEXOpAssertion.AVX2);
|
||||
public static final VexMaskMoveOp VPMASKMOVQ = new VexMaskMoveOp("VPMASKMOVQ", P_66, M_0F38, W1, 0x8C, 0x8E, VEXOpAssertion.AVX2);
|
||||
// @formatter:on
|
||||
|
||||
private final int opReverse;
|
||||
|
||||
private VexMaskMoveOp(String opcode, int pp, int mmmmm, int w, int op, int opReverse) {
|
||||
this(opcode, pp, mmmmm, w, op, opReverse, AVXOpAssertion.AVX1);
|
||||
this(opcode, pp, mmmmm, w, op, opReverse, VEXOpAssertion.AVX1);
|
||||
}
|
||||
|
||||
private VexMaskMoveOp(String opcode, int pp, int mmmmm, int w, int op, int opReverse, AVXOpAssertion assertion) {
|
||||
private VexMaskMoveOp(String opcode, int pp, int mmmmm, int w, int op, int opReverse, VEXOpAssertion assertion) {
|
||||
super(opcode, pp, mmmmm, w, op, assertion);
|
||||
this.opReverse = opReverse;
|
||||
}
|
||||
@ -1405,15 +1467,15 @@ public class AMD64Assembler extends AMD64BaseAssembler {
|
||||
// @formatter:off
|
||||
public static final VexRVMIOp VSHUFPS = new VexRVMIOp("VSHUFPS", P_, M_0F, WIG, 0xC6);
|
||||
public static final VexRVMIOp VSHUFPD = new VexRVMIOp("VSHUFPD", P_66, M_0F, WIG, 0xC6);
|
||||
public static final VexRVMIOp VINSERTF128 = new VexRVMIOp("VINSERTF128", P_66, M_0F3A, W0, 0x18, AVXOpAssertion.AVX1_256ONLY);
|
||||
public static final VexRVMIOp VINSERTI128 = new VexRVMIOp("VINSERTI128", P_66, M_0F3A, W0, 0x38, AVXOpAssertion.AVX2_256ONLY);
|
||||
public static final VexRVMIOp VINSERTF128 = new VexRVMIOp("VINSERTF128", P_66, M_0F3A, W0, 0x18, VEXOpAssertion.AVX1_256ONLY);
|
||||
public static final VexRVMIOp VINSERTI128 = new VexRVMIOp("VINSERTI128", P_66, M_0F3A, W0, 0x38, VEXOpAssertion.AVX2_256ONLY);
|
||||
// @formatter:on
|
||||
|
||||
private VexRVMIOp(String opcode, int pp, int mmmmm, int w, int op) {
|
||||
this(opcode, pp, mmmmm, w, op, AVXOpAssertion.AVX1);
|
||||
this(opcode, pp, mmmmm, w, op, VEXOpAssertion.AVX1);
|
||||
}
|
||||
|
||||
private VexRVMIOp(String opcode, int pp, int mmmmm, int w, int op, AVXOpAssertion assertion) {
|
||||
private VexRVMIOp(String opcode, int pp, int mmmmm, int w, int op, VEXOpAssertion assertion) {
|
||||
super(opcode, pp, mmmmm, w, op, assertion);
|
||||
}
|
||||
|
||||
@ -1528,7 +1590,7 @@ public class AMD64Assembler extends AMD64BaseAssembler {
|
||||
}
|
||||
|
||||
private VexFloatCompareOp(String opcode, int pp, int mmmmm, int w, int op) {
|
||||
super(opcode, pp, mmmmm, w, op, AVXOpAssertion.AVX1);
|
||||
super(opcode, pp, mmmmm, w, op, VEXOpAssertion.AVX1);
|
||||
}
|
||||
|
||||
public void emit(AMD64Assembler asm, AVXSize size, Register dst, Register src1, Register src2, Predicate p) {
|
||||
|
@ -37,7 +37,7 @@ import static org.graalvm.compiler.asm.amd64.AMD64BaseAssembler.EVEXPrefixConfig
|
||||
import static org.graalvm.compiler.asm.amd64.AMD64BaseAssembler.EVEXPrefixConfig.Z1;
|
||||
import static org.graalvm.compiler.asm.amd64.AMD64BaseAssembler.VEXPrefixConfig.L128;
|
||||
import static org.graalvm.compiler.asm.amd64.AMD64BaseAssembler.VEXPrefixConfig.L256;
|
||||
import static org.graalvm.compiler.asm.amd64.AMD64BaseAssembler.VEXPrefixConfig.LIG;
|
||||
import static org.graalvm.compiler.asm.amd64.AMD64BaseAssembler.VEXPrefixConfig.LZ;
|
||||
import static org.graalvm.compiler.asm.amd64.AMD64BaseAssembler.VEXPrefixConfig.M_0F;
|
||||
import static org.graalvm.compiler.asm.amd64.AMD64BaseAssembler.VEXPrefixConfig.M_0F38;
|
||||
import static org.graalvm.compiler.asm.amd64.AMD64BaseAssembler.VEXPrefixConfig.M_0F3A;
|
||||
@ -748,7 +748,7 @@ public abstract class AMD64BaseAssembler extends Assembler {
|
||||
public static final class VEXPrefixConfig {
|
||||
public static final int L128 = 0;
|
||||
public static final int L256 = 1;
|
||||
public static final int LIG = 0;
|
||||
public static final int LZ = 0;
|
||||
|
||||
public static final int W0 = 0;
|
||||
public static final int W1 = 1;
|
||||
@ -849,10 +849,10 @@ public abstract class AMD64BaseAssembler extends Assembler {
|
||||
protected final void emitVEX(int l, int pp, int mmmmm, int w, int rxb, int vvvv) {
|
||||
assert ((AMD64) target.arch).getFeatures().contains(CPUFeature.AVX) : "emitting VEX prefix on a CPU without AVX support";
|
||||
|
||||
assert l == L128 || l == L256 || l == LIG : "invalid value for VEX.L";
|
||||
assert l == L128 || l == L256 : "invalid value for VEX.L";
|
||||
assert pp == P_ || pp == P_66 || pp == P_F3 || pp == P_F2 : "invalid value for VEX.pp";
|
||||
assert mmmmm == M_0F || mmmmm == M_0F38 || mmmmm == M_0F3A : "invalid value for VEX.m-mmmm";
|
||||
assert w == W0 || w == W1 || w == WIG : "invalid value for VEX.W";
|
||||
assert w == W0 || w == W1 : "invalid value for VEX.W";
|
||||
|
||||
assert (rxb & 0x07) == rxb : "invalid value for VEX.RXB";
|
||||
assert (vvvv & 0x0F) == vvvv : "invalid value for VEX.vvvv";
|
||||
@ -887,7 +887,7 @@ public abstract class AMD64BaseAssembler extends Assembler {
|
||||
}
|
||||
}
|
||||
|
||||
private static int getLFlag(AVXSize size) {
|
||||
public static int getLFlag(AVXSize size) {
|
||||
switch (size) {
|
||||
case XMM:
|
||||
return L128;
|
||||
@ -896,7 +896,7 @@ public abstract class AMD64BaseAssembler extends Assembler {
|
||||
case ZMM:
|
||||
return L512;
|
||||
default:
|
||||
return LIG;
|
||||
return LZ;
|
||||
}
|
||||
}
|
||||
|
||||
@ -910,6 +910,7 @@ public abstract class AMD64BaseAssembler extends Assembler {
|
||||
|
||||
protected static final class EVEXPrefixConfig {
|
||||
public static final int L512 = 2;
|
||||
public static final int LIG = 0;
|
||||
|
||||
public static final int Z0 = 0x0;
|
||||
public static final int Z1 = 0x1;
|
||||
@ -1013,10 +1014,10 @@ public abstract class AMD64BaseAssembler extends Assembler {
|
||||
private void emitEVEX(int l, int pp, int mm, int w, int rxb, int reg, int vvvvv, int z, int b, int aaa) {
|
||||
assert ((AMD64) target.arch).getFeatures().contains(CPUFeature.AVX512F) : "emitting EVEX prefix on a CPU without AVX512 support";
|
||||
|
||||
assert l == L128 || l == L256 || l == L512 || l == LIG : "invalid value for EVEX.L'L";
|
||||
assert l == L128 || l == L256 || l == L512 : "invalid value for EVEX.L'L";
|
||||
assert pp == P_ || pp == P_66 || pp == P_F3 || pp == P_F2 : "invalid value for EVEX.pp";
|
||||
assert mm == M_0F || mm == M_0F38 || mm == M_0F3A : "invalid value for EVEX.mm";
|
||||
assert w == W0 || w == W1 || w == WIG : "invalid value for EVEX.W";
|
||||
assert w == W0 || w == W1 : "invalid value for EVEX.W";
|
||||
|
||||
assert (rxb & 0x07) == rxb : "invalid value for EVEX.RXB";
|
||||
assert (reg & 0x1F) == reg : "invalid value for EVEX.R'";
|
||||
|
@ -41,6 +41,7 @@ import java.util.concurrent.TimeUnit;
|
||||
import java.util.zip.ZipEntry;
|
||||
import java.util.zip.ZipFile;
|
||||
|
||||
import org.graalvm.compiler.api.replacements.MethodSubstitution;
|
||||
import org.graalvm.compiler.api.replacements.Snippet;
|
||||
import org.graalvm.compiler.api.replacements.Snippet.ConstantParameter;
|
||||
import org.graalvm.compiler.api.replacements.Snippet.NonNullParameter;
|
||||
@ -279,7 +280,8 @@ public class CheckGraalInvariants extends GraalCompilerTest {
|
||||
executor.execute(() -> {
|
||||
try (DebugContext debug = DebugContext.create(options, DebugHandlersFactory.LOADER)) {
|
||||
ResolvedJavaMethod method = metaAccess.lookupJavaMethod(m);
|
||||
StructuredGraph graph = new StructuredGraph.Builder(options, debug).method(method).build();
|
||||
boolean isSubstitution = method.getAnnotation(Snippet.class) != null || method.getAnnotation(MethodSubstitution.class) != null;
|
||||
StructuredGraph graph = new StructuredGraph.Builder(options, debug).method(method).setIsSubstitution(isSubstitution).build();
|
||||
try (DebugCloseable s = debug.disableIntercept(); DebugContext.Scope ds = debug.scope("CheckingGraph", graph, method)) {
|
||||
checkMethod(method);
|
||||
graphBuilderSuite.apply(graph, context);
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user