OpenJDK / amber / amber
changeset 54851:917106436fe0 amber-demo-II
Automatic merge with patterns-stage-1
author | mcimadamore |
---|---|
date | Fri, 08 Feb 2019 18:58:44 +0100 |
parents | 5beca44c5e0d 0e61020e9d00 |
children | 98cf3eeea6bc |
files | src/hotspot/share/classfile/classFileParser.cpp src/hotspot/share/classfile/classFileParser.hpp src/hotspot/share/code/relocInfo_ext.cpp src/hotspot/share/code/relocInfo_ext.hpp src/hotspot/share/gc/g1/collectionSetChooser.cpp src/hotspot/share/gc/g1/collectionSetChooser.hpp test/hotspot/jtreg/serviceability/dcmd/framework/TEST.properties |
diffstat | 119 files changed, 2914 insertions(+), 964 deletions(-) [+] |
line wrap: on
line diff
--- a/.hgtags Thu Feb 07 22:15:11 2019 +0100 +++ b/.hgtags Fri Feb 08 18:58:44 2019 +0100 @@ -541,3 +541,4 @@ b5f05fe4a6f8b3996a000c20078b356d991ca8ec jdk-13+6 6c377af36a5c4203f16aed8a5e4c2ecc08fcd8bd jdk-12+30 021917019cda1c0c5853255322274f37693a2431 jdk-13+7 +b5f7bb57de2f797be34f6c75d45c3245ad37ab97 jdk-12+31
--- a/make/data/symbols/README Thu Feb 07 22:15:11 2019 +0100 +++ b/make/data/symbols/README Fri Feb 08 18:58:44 2019 +0100 @@ -1,3 +1,3 @@ This directory contains history data for -release. -Please see $LANGTOOLS_DIR/make/src/classes/build/tools/symbolgenerator/CreateSymbols.java for main usage. +Please see $JDK_TOP_DIR/make/scripts/generate-symbol-data.sh for main usage.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/make/data/symbols/java.base-C.sym.txt Fri Feb 08 18:58:44 2019 +0100 @@ -0,0 +1,636 @@ +# +# Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle in the LICENSE file that accompanied this code. +# +# This code is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# version 2 for more details (a copy is included in the LICENSE file that +# accompanied this code). +# +# You should have received a copy of the GNU General Public License version +# 2 along with this work; if not, write to the Free Software Foundation, +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. +# +# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# +# ########################################################## +# ### THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. ### +# ########################################################## +# +module name java.base +header exports java/io,java/lang,java/lang/annotation,java/lang/constant,java/lang/invoke,java/lang/module,java/lang/ref,java/lang/reflect,java/math,java/net,java/net/spi,java/nio,java/nio/channels,java/nio/channels/spi,java/nio/charset,java/nio/charset/spi,java/nio/file,java/nio/file/attribute,java/nio/file/spi,java/security,java/security/acl,java/security/cert,java/security/interfaces,java/security/spec,java/text,java/text/spi,java/time,java/time/chrono,java/time/format,java/time/temporal,java/time/zone,java/util,java/util/concurrent,java/util/concurrent/atomic,java/util/concurrent/locks,java/util/function,java/util/jar,java/util/regex,java/util/spi,java/util/stream,java/util/zip,javax/crypto,javax/crypto/interfaces,javax/crypto/spec,javax/net,javax/net/ssl,javax/security/auth,javax/security/auth/callback,javax/security/auth/login,javax/security/auth/spi,javax/security/auth/x500,javax/security/cert uses java/lang/System$LoggerFinder,java/net/ContentHandlerFactory,java/net/spi/URLStreamHandlerProvider,java/nio/channels/spi/AsynchronousChannelProvider,java/nio/channels/spi/SelectorProvider,java/nio/charset/spi/CharsetProvider,java/nio/file/spi/FileSystemProvider,java/nio/file/spi/FileTypeDetector,java/security/Provider,java/text/spi/BreakIteratorProvider,java/text/spi/CollatorProvider,java/text/spi/DateFormatProvider,java/text/spi/DateFormatSymbolsProvider,java/text/spi/DecimalFormatSymbolsProvider,java/text/spi/NumberFormatProvider,java/time/chrono/AbstractChronology,java/time/chrono/Chronology,java/time/zone/ZoneRulesProvider,java/util/spi/CalendarDataProvider,java/util/spi/CalendarNameProvider,java/util/spi/CurrencyNameProvider,java/util/spi/LocaleNameProvider,java/util/spi/ResourceBundleControlProvider,java/util/spi/ResourceBundleProvider,java/util/spi/TimeZoneNameProvider,java/util/spi/ToolProvider,javax/security/auth/spi/LoginModule,jdk/internal/logger/DefaultLoggerFinder,sun/text/spi/JavaTimeDateTimePatternProvider,sun/util/locale/provider/LocaleDataMetaInfo,sun/util/resources/LocaleData$CommonResourceBundleProvider,sun/util/resources/LocaleData$SupplementaryResourceBundleProvider,sun/util/spi/CalendarProvider provides interface\u0020;java/nio/file/spi/FileSystemProvider\u0020;impls\u0020;jdk/internal/jrtfs/JrtFileSystemProvider target linux-amd64 flags 8000 + +class name java/io/FileInputStream +-method name finalize descriptor ()V + +class name java/io/FileOutputStream +-method name finalize descriptor ()V + +class name java/io/InputStream +method name skipNBytes descriptor (J)V thrownTypes java/io/IOException flags 1 + +class name java/lang/Character$UnicodeBlock +field name GEORGIAN_EXTENDED descriptor Ljava/lang/Character$UnicodeBlock; flags 19 +field name HANIFI_ROHINGYA descriptor Ljava/lang/Character$UnicodeBlock; flags 19 +field name OLD_SOGDIAN descriptor Ljava/lang/Character$UnicodeBlock; flags 19 +field name SOGDIAN descriptor Ljava/lang/Character$UnicodeBlock; flags 19 +field name DOGRA descriptor Ljava/lang/Character$UnicodeBlock; flags 19 +field name GUNJALA_GONDI descriptor Ljava/lang/Character$UnicodeBlock; flags 19 +field name MAKASAR descriptor Ljava/lang/Character$UnicodeBlock; flags 19 +field name MEDEFAIDRIN descriptor Ljava/lang/Character$UnicodeBlock; flags 19 +field name MAYAN_NUMERALS descriptor Ljava/lang/Character$UnicodeBlock; flags 19 +field name INDIC_SIYAQ_NUMBERS descriptor Ljava/lang/Character$UnicodeBlock; flags 19 +field name CHESS_SYMBOLS descriptor Ljava/lang/Character$UnicodeBlock; flags 19 + +class name java/lang/Character$UnicodeScript +field name HANIFI_ROHINGYA descriptor Ljava/lang/Character$UnicodeScript; flags 4019 +field name OLD_SOGDIAN descriptor Ljava/lang/Character$UnicodeScript; flags 4019 +field name SOGDIAN descriptor Ljava/lang/Character$UnicodeScript; flags 4019 +field name DOGRA descriptor Ljava/lang/Character$UnicodeScript; flags 4019 +field name GUNJALA_GONDI descriptor Ljava/lang/Character$UnicodeScript; flags 4019 +field name MAKASAR descriptor Ljava/lang/Character$UnicodeScript; flags 4019 +field name MEDEFAIDRIN descriptor Ljava/lang/Character$UnicodeScript; flags 4019 + +class name java/lang/Class +header extends java/lang/Object implements java/io/Serializable,java/lang/reflect/GenericDeclaration,java/lang/reflect/Type,java/lang/reflect/AnnotatedElement,java/lang/invoke/TypeDescriptor$OfField,java/lang/constant/Constable flags 31 signature <T:Ljava/lang/Object;>Ljava/lang/Object;Ljava/io/Serializable;Ljava/lang/reflect/GenericDeclaration;Ljava/lang/reflect/Type;Ljava/lang/reflect/AnnotatedElement;Ljava/lang/invoke/TypeDescriptor$OfField<Ljava/lang/Class<*>;>;Ljava/lang/constant/Constable; +innerclass innerClass java/util/Map$Entry outerClass java/util/Map innerClassName Entry flags 609 +innerclass innerClass java/lang/invoke/TypeDescriptor$OfField outerClass java/lang/invoke/TypeDescriptor innerClassName OfField flags 609 +innerclass innerClass java/lang/invoke/MethodHandles$Lookup outerClass java/lang/invoke/MethodHandles innerClassName Lookup flags 19 +method name descriptorString descriptor ()Ljava/lang/String; flags 1 +method name componentType descriptor ()Ljava/lang/Class; flags 1 signature ()Ljava/lang/Class<*>; +method name arrayType descriptor ()Ljava/lang/Class; flags 1 signature ()Ljava/lang/Class<*>; +method name describeConstable descriptor ()Ljava/util/Optional; flags 1 signature ()Ljava/util/Optional<Ljava/lang/constant/ClassDesc;>; +method name arrayType descriptor ()Ljava/lang/invoke/TypeDescriptor$OfField; flags 1041 +method name componentType descriptor ()Ljava/lang/invoke/TypeDescriptor$OfField; flags 1041 + +class name java/lang/ClassNotFoundException +header extends java/lang/ReflectiveOperationException flags 21 +innerclass innerClass java/io/ObjectInputStream$GetField outerClass java/io/ObjectInputStream innerClassName GetField flags 409 +innerclass innerClass java/io/ObjectOutputStream$PutField outerClass java/io/ObjectOutputStream innerClassName PutField flags 409 +-method name getCause descriptor ()Ljava/lang/Throwable; + +class name java/lang/Double +header extends java/lang/Number implements java/lang/Comparable,java/lang/constant/Constable,java/lang/constant/ConstantDesc flags 31 signature Ljava/lang/Number;Ljava/lang/Comparable<Ljava/lang/Double;>;Ljava/lang/constant/Constable;Ljava/lang/constant/ConstantDesc; +innerclass innerClass java/lang/invoke/MethodHandles$Lookup outerClass java/lang/invoke/MethodHandles innerClassName Lookup flags 19 +method name describeConstable descriptor ()Ljava/util/Optional; flags 1 signature ()Ljava/util/Optional<Ljava/lang/Double;>; +method name resolveConstantDesc descriptor (Ljava/lang/invoke/MethodHandles$Lookup;)Ljava/lang/Double; flags 1 +method name resolveConstantDesc descriptor (Ljava/lang/invoke/MethodHandles$Lookup;)Ljava/lang/Object; thrownTypes java/lang/ReflectiveOperationException flags 1041 + +class name java/lang/Enum +header extends java/lang/Object implements java/lang/constant/Constable,java/lang/Comparable,java/io/Serializable nestMembers java/lang/Enum$EnumDesc flags 421 signature <E:Ljava/lang/Enum<TE;>;>Ljava/lang/Object;Ljava/lang/constant/Constable;Ljava/lang/Comparable<TE;>;Ljava/io/Serializable; +innerclass innerClass java/lang/Enum$EnumDesc outerClass java/lang/Enum innerClassName EnumDesc flags 19 +innerclass innerClass java/lang/invoke/MethodHandles$Lookup outerClass java/lang/invoke/MethodHandles innerClassName Lookup flags 19 +method name describeConstable descriptor ()Ljava/util/Optional; flags 11 signature ()Ljava/util/Optional<Ljava/lang/Enum$EnumDesc<TE;>;>; + +class name java/lang/Enum$EnumDesc +header extends java/lang/constant/DynamicConstantDesc nestHost java/lang/Enum flags 31 signature <E:Ljava/lang/Enum<TE;>;>Ljava/lang/constant/DynamicConstantDesc<TE;>; +innerclass innerClass java/lang/Enum$EnumDesc outerClass java/lang/Enum innerClassName EnumDesc flags 19 +innerclass innerClass java/lang/invoke/MethodHandles$Lookup outerClass java/lang/invoke/MethodHandles innerClassName Lookup flags 19 +method name of descriptor (Ljava/lang/constant/ClassDesc;Ljava/lang/String;)Ljava/lang/Enum$EnumDesc; flags 9 signature <E:Ljava/lang/Enum<TE;>;>(Ljava/lang/constant/ClassDesc;Ljava/lang/String;)Ljava/lang/Enum$EnumDesc<TE;>; +method name resolveConstantDesc descriptor (Ljava/lang/invoke/MethodHandles$Lookup;)Ljava/lang/Enum; thrownTypes java/lang/ReflectiveOperationException flags 1 signature (Ljava/lang/invoke/MethodHandles$Lookup;)TE; +method name toString descriptor ()Ljava/lang/String; flags 1 +method name resolveConstantDesc descriptor (Ljava/lang/invoke/MethodHandles$Lookup;)Ljava/lang/Object; thrownTypes java/lang/ReflectiveOperationException flags 1041 + +class name java/lang/ExceptionInInitializerError +header extends java/lang/LinkageError flags 21 +innerclass innerClass java/io/ObjectInputStream$GetField outerClass java/io/ObjectInputStream innerClassName GetField flags 409 +innerclass innerClass java/io/ObjectOutputStream$PutField outerClass java/io/ObjectOutputStream innerClassName PutField flags 409 +-method name getCause descriptor ()Ljava/lang/Throwable; + +class name java/lang/Float +header extends java/lang/Number implements java/lang/Comparable,java/lang/constant/Constable,java/lang/constant/ConstantDesc flags 31 signature Ljava/lang/Number;Ljava/lang/Comparable<Ljava/lang/Float;>;Ljava/lang/constant/Constable;Ljava/lang/constant/ConstantDesc; +innerclass innerClass java/lang/invoke/MethodHandles$Lookup outerClass java/lang/invoke/MethodHandles innerClassName Lookup flags 19 +method name describeConstable descriptor ()Ljava/util/Optional; flags 1 signature ()Ljava/util/Optional<Ljava/lang/Float;>; +method name resolveConstantDesc descriptor (Ljava/lang/invoke/MethodHandles$Lookup;)Ljava/lang/Float; flags 1 +method name resolveConstantDesc descriptor (Ljava/lang/invoke/MethodHandles$Lookup;)Ljava/lang/Object; thrownTypes java/lang/ReflectiveOperationException flags 1041 + +class name java/lang/Integer +header extends java/lang/Number implements java/lang/Comparable,java/lang/constant/Constable,java/lang/constant/ConstantDesc flags 31 signature Ljava/lang/Number;Ljava/lang/Comparable<Ljava/lang/Integer;>;Ljava/lang/constant/Constable;Ljava/lang/constant/ConstantDesc; +innerclass innerClass java/lang/invoke/MethodHandles$Lookup outerClass java/lang/invoke/MethodHandles innerClassName Lookup flags 19 +method name describeConstable descriptor ()Ljava/util/Optional; flags 1 signature ()Ljava/util/Optional<Ljava/lang/Integer;>; +method name resolveConstantDesc descriptor (Ljava/lang/invoke/MethodHandles$Lookup;)Ljava/lang/Integer; flags 1 +method name resolveConstantDesc descriptor (Ljava/lang/invoke/MethodHandles$Lookup;)Ljava/lang/Object; thrownTypes java/lang/ReflectiveOperationException flags 1041 + +class name java/lang/Long +header extends java/lang/Number implements java/lang/Comparable,java/lang/constant/Constable,java/lang/constant/ConstantDesc flags 31 signature Ljava/lang/Number;Ljava/lang/Comparable<Ljava/lang/Long;>;Ljava/lang/constant/Constable;Ljava/lang/constant/ConstantDesc; +innerclass innerClass java/lang/invoke/MethodHandles$Lookup outerClass java/lang/invoke/MethodHandles innerClassName Lookup flags 19 +method name describeConstable descriptor ()Ljava/util/Optional; flags 1 signature ()Ljava/util/Optional<Ljava/lang/Long;>; +method name resolveConstantDesc descriptor (Ljava/lang/invoke/MethodHandles$Lookup;)Ljava/lang/Long; flags 1 +method name resolveConstantDesc descriptor (Ljava/lang/invoke/MethodHandles$Lookup;)Ljava/lang/Object; thrownTypes java/lang/ReflectiveOperationException flags 1041 + +class name java/lang/String +header extends java/lang/Object implements java/io/Serializable,java/lang/Comparable,java/lang/CharSequence,java/lang/constant/Constable,java/lang/constant/ConstantDesc flags 31 signature Ljava/lang/Object;Ljava/io/Serializable;Ljava/lang/Comparable<Ljava/lang/String;>;Ljava/lang/CharSequence;Ljava/lang/constant/Constable;Ljava/lang/constant/ConstantDesc; +innerclass innerClass java/lang/invoke/MethodHandles$Lookup outerClass java/lang/invoke/MethodHandles innerClassName Lookup flags 19 +innerclass innerClass java/util/Spliterator$OfInt outerClass java/util/Spliterator innerClassName OfInt flags 609 +method name indent descriptor (I)Ljava/lang/String; flags 1 +method name transform descriptor (Ljava/util/function/Function;)Ljava/lang/Object; flags 1 signature <R:Ljava/lang/Object;>(Ljava/util/function/Function<-Ljava/lang/String;+TR;>;)TR; +method name describeConstable descriptor ()Ljava/util/Optional; flags 1 signature ()Ljava/util/Optional<Ljava/lang/String;>; +method name resolveConstantDesc descriptor (Ljava/lang/invoke/MethodHandles$Lookup;)Ljava/lang/String; flags 1 +method name resolveConstantDesc descriptor (Ljava/lang/invoke/MethodHandles$Lookup;)Ljava/lang/Object; thrownTypes java/lang/ReflectiveOperationException flags 1041 + +class name java/lang/System +header extends java/lang/Object nestMembers java/lang/System$LoggerFinder,java/lang/System$Logger,java/lang/System$Logger$Level flags 31 +innerclass innerClass java/lang/System$LoggerFinder outerClass java/lang/System innerClassName LoggerFinder flags 409 +innerclass innerClass java/lang/System$Logger outerClass java/lang/System innerClassName Logger flags 609 +innerclass innerClass java/util/Map$Entry outerClass java/util/Map innerClassName Entry flags 609 +innerclass innerClass java/lang/System$Logger$Level outerClass java/lang/System$Logger innerClassName Level flags 4019 +innerclass innerClass java/lang/invoke/MethodHandles$Lookup outerClass java/lang/invoke/MethodHandles innerClassName Lookup flags 19 + +class name java/lang/constant/ClassDesc +header extends java/lang/Object implements java/lang/constant/ConstantDesc,java/lang/invoke/TypeDescriptor$OfField flags 601 signature Ljava/lang/Object;Ljava/lang/constant/ConstantDesc;Ljava/lang/invoke/TypeDescriptor$OfField<Ljava/lang/constant/ClassDesc;>; +innerclass innerClass java/lang/invoke/TypeDescriptor$OfField outerClass java/lang/invoke/TypeDescriptor innerClassName OfField flags 609 +method name of descriptor (Ljava/lang/String;)Ljava/lang/constant/ClassDesc; flags 9 +method name of descriptor (Ljava/lang/String;Ljava/lang/String;)Ljava/lang/constant/ClassDesc; flags 9 +method name ofDescriptor descriptor (Ljava/lang/String;)Ljava/lang/constant/ClassDesc; flags 9 +method name arrayType descriptor ()Ljava/lang/constant/ClassDesc; flags 1 +method name arrayType descriptor (I)Ljava/lang/constant/ClassDesc; flags 1 +method name nested descriptor (Ljava/lang/String;)Ljava/lang/constant/ClassDesc; flags 1 +method name nested descriptor (Ljava/lang/String;[Ljava/lang/String;)Ljava/lang/constant/ClassDesc; flags 81 +method name isArray descriptor ()Z flags 1 +method name isPrimitive descriptor ()Z flags 1 +method name isClassOrInterface descriptor ()Z flags 1 +method name componentType descriptor ()Ljava/lang/constant/ClassDesc; flags 1 +method name packageName descriptor ()Ljava/lang/String; flags 1 +method name displayName descriptor ()Ljava/lang/String; flags 1 +method name descriptorString descriptor ()Ljava/lang/String; flags 401 +method name equals descriptor (Ljava/lang/Object;)Z flags 401 +method name arrayType descriptor ()Ljava/lang/invoke/TypeDescriptor$OfField; flags 1041 +method name componentType descriptor ()Ljava/lang/invoke/TypeDescriptor$OfField; flags 1041 + +class name java/lang/constant/Constable +header extends java/lang/Object flags 601 +method name describeConstable descriptor ()Ljava/util/Optional; flags 401 signature ()Ljava/util/Optional<+Ljava/lang/constant/ConstantDesc;>; + +class name java/lang/constant/ConstantDesc +header extends java/lang/Object flags 601 +innerclass innerClass java/lang/invoke/MethodHandles$Lookup outerClass java/lang/invoke/MethodHandles innerClassName Lookup flags 19 +method name resolveConstantDesc descriptor (Ljava/lang/invoke/MethodHandles$Lookup;)Ljava/lang/Object; thrownTypes java/lang/ReflectiveOperationException flags 401 + +class name java/lang/constant/ConstantDescs +header extends java/lang/Object flags 31 +innerclass innerClass java/lang/constant/DirectMethodHandleDesc$Kind outerClass java/lang/constant/DirectMethodHandleDesc innerClassName Kind flags 4019 +field name DEFAULT_NAME descriptor Ljava/lang/String; constantValue _ flags 19 +field name CD_Object descriptor Ljava/lang/constant/ClassDesc; flags 19 +field name CD_String descriptor Ljava/lang/constant/ClassDesc; flags 19 +field name CD_Class descriptor Ljava/lang/constant/ClassDesc; flags 19 +field name CD_Number descriptor Ljava/lang/constant/ClassDesc; flags 19 +field name CD_Integer descriptor Ljava/lang/constant/ClassDesc; flags 19 +field name CD_Long descriptor Ljava/lang/constant/ClassDesc; flags 19 +field name CD_Float descriptor Ljava/lang/constant/ClassDesc; flags 19 +field name CD_Double descriptor Ljava/lang/constant/ClassDesc; flags 19 +field name CD_Short descriptor Ljava/lang/constant/ClassDesc; flags 19 +field name CD_Byte descriptor Ljava/lang/constant/ClassDesc; flags 19 +field name CD_Character descriptor Ljava/lang/constant/ClassDesc; flags 19 +field name CD_Boolean descriptor Ljava/lang/constant/ClassDesc; flags 19 +field name CD_Void descriptor Ljava/lang/constant/ClassDesc; flags 19 +field name CD_Throwable descriptor Ljava/lang/constant/ClassDesc; flags 19 +field name CD_Exception descriptor Ljava/lang/constant/ClassDesc; flags 19 +field name CD_Enum descriptor Ljava/lang/constant/ClassDesc; flags 19 +field name CD_VarHandle descriptor Ljava/lang/constant/ClassDesc; flags 19 +field name CD_MethodHandles descriptor Ljava/lang/constant/ClassDesc; flags 19 +field name CD_MethodHandles_Lookup descriptor Ljava/lang/constant/ClassDesc; flags 19 +field name CD_MethodHandle descriptor Ljava/lang/constant/ClassDesc; flags 19 +field name CD_MethodType descriptor Ljava/lang/constant/ClassDesc; flags 19 +field name CD_CallSite descriptor Ljava/lang/constant/ClassDesc; flags 19 +field name CD_Collection descriptor Ljava/lang/constant/ClassDesc; flags 19 +field name CD_List descriptor Ljava/lang/constant/ClassDesc; flags 19 +field name CD_Set descriptor Ljava/lang/constant/ClassDesc; flags 19 +field name CD_Map descriptor Ljava/lang/constant/ClassDesc; flags 19 +field name CD_ConstantDesc descriptor Ljava/lang/constant/ClassDesc; flags 19 +field name CD_ClassDesc descriptor Ljava/lang/constant/ClassDesc; flags 19 +field name CD_EnumDesc descriptor Ljava/lang/constant/ClassDesc; flags 19 +field name CD_MethodTypeDesc descriptor Ljava/lang/constant/ClassDesc; flags 19 +field name CD_MethodHandleDesc descriptor Ljava/lang/constant/ClassDesc; flags 19 +field name CD_DirectMethodHandleDesc descriptor Ljava/lang/constant/ClassDesc; flags 19 +field name CD_VarHandleDesc descriptor Ljava/lang/constant/ClassDesc; flags 19 +field name CD_MethodHandleDesc_Kind descriptor Ljava/lang/constant/ClassDesc; flags 19 +field name CD_DynamicConstantDesc descriptor Ljava/lang/constant/ClassDesc; flags 19 +field name CD_DynamicCallSiteDesc descriptor Ljava/lang/constant/ClassDesc; flags 19 +field name CD_ConstantBootstraps descriptor Ljava/lang/constant/ClassDesc; flags 19 +field name BSM_PRIMITIVE_CLASS descriptor Ljava/lang/constant/DirectMethodHandleDesc; flags 19 +field name BSM_ENUM_CONSTANT descriptor Ljava/lang/constant/DirectMethodHandleDesc; flags 19 +field name BSM_NULL_CONSTANT descriptor Ljava/lang/constant/DirectMethodHandleDesc; flags 19 +field name BSM_VARHANDLE_FIELD descriptor Ljava/lang/constant/DirectMethodHandleDesc; flags 19 +field name BSM_VARHANDLE_STATIC_FIELD descriptor Ljava/lang/constant/DirectMethodHandleDesc; flags 19 +field name BSM_VARHANDLE_ARRAY descriptor Ljava/lang/constant/DirectMethodHandleDesc; flags 19 +field name BSM_INVOKE descriptor Ljava/lang/constant/DirectMethodHandleDesc; flags 19 +field name CD_int descriptor Ljava/lang/constant/ClassDesc; flags 19 +field name CD_long descriptor Ljava/lang/constant/ClassDesc; flags 19 +field name CD_float descriptor Ljava/lang/constant/ClassDesc; flags 19 +field name CD_double descriptor Ljava/lang/constant/ClassDesc; flags 19 +field name CD_short descriptor Ljava/lang/constant/ClassDesc; flags 19 +field name CD_byte descriptor Ljava/lang/constant/ClassDesc; flags 19 +field name CD_char descriptor Ljava/lang/constant/ClassDesc; flags 19 +field name CD_boolean descriptor Ljava/lang/constant/ClassDesc; flags 19 +field name CD_void descriptor Ljava/lang/constant/ClassDesc; flags 19 +field name NULL descriptor Ljava/lang/constant/ConstantDesc; flags 19 +method name ofCallsiteBootstrap descriptor (Ljava/lang/constant/ClassDesc;Ljava/lang/String;Ljava/lang/constant/ClassDesc;[Ljava/lang/constant/ClassDesc;)Ljava/lang/constant/DirectMethodHandleDesc; flags 89 +method name ofConstantBootstrap descriptor (Ljava/lang/constant/ClassDesc;Ljava/lang/String;Ljava/lang/constant/ClassDesc;[Ljava/lang/constant/ClassDesc;)Ljava/lang/constant/DirectMethodHandleDesc; flags 89 + +class name java/lang/constant/DirectMethodHandleDesc +header extends java/lang/Object implements java/lang/constant/MethodHandleDesc nestMembers java/lang/constant/DirectMethodHandleDesc$Kind flags 601 +innerclass innerClass java/lang/constant/DirectMethodHandleDesc$Kind outerClass java/lang/constant/DirectMethodHandleDesc innerClassName Kind flags 4019 +method name kind descriptor ()Ljava/lang/constant/DirectMethodHandleDesc$Kind; flags 401 +method name refKind descriptor ()I flags 401 +method name isOwnerInterface descriptor ()Z flags 401 +method name owner descriptor ()Ljava/lang/constant/ClassDesc; flags 401 +method name methodName descriptor ()Ljava/lang/String; flags 401 +method name lookupDescriptor descriptor ()Ljava/lang/String; flags 401 + +class name java/lang/constant/DirectMethodHandleDesc$Kind +header extends java/lang/Enum nestHost java/lang/constant/DirectMethodHandleDesc flags 4031 signature Ljava/lang/Enum<Ljava/lang/constant/DirectMethodHandleDesc$Kind;>; +innerclass innerClass java/lang/constant/DirectMethodHandleDesc$Kind outerClass java/lang/constant/DirectMethodHandleDesc innerClassName Kind flags 4019 +field name STATIC descriptor Ljava/lang/constant/DirectMethodHandleDesc$Kind; flags 4019 +field name INTERFACE_STATIC descriptor Ljava/lang/constant/DirectMethodHandleDesc$Kind; flags 4019 +field name VIRTUAL descriptor Ljava/lang/constant/DirectMethodHandleDesc$Kind; flags 4019 +field name INTERFACE_VIRTUAL descriptor Ljava/lang/constant/DirectMethodHandleDesc$Kind; flags 4019 +field name SPECIAL descriptor Ljava/lang/constant/DirectMethodHandleDesc$Kind; flags 4019 +field name INTERFACE_SPECIAL descriptor Ljava/lang/constant/DirectMethodHandleDesc$Kind; flags 4019 +field name CONSTRUCTOR descriptor Ljava/lang/constant/DirectMethodHandleDesc$Kind; flags 4019 +field name GETTER descriptor Ljava/lang/constant/DirectMethodHandleDesc$Kind; flags 4019 +field name SETTER descriptor Ljava/lang/constant/DirectMethodHandleDesc$Kind; flags 4019 +field name STATIC_GETTER descriptor Ljava/lang/constant/DirectMethodHandleDesc$Kind; flags 4019 +field name STATIC_SETTER descriptor Ljava/lang/constant/DirectMethodHandleDesc$Kind; flags 4019 +field name refKind descriptor I flags 11 +field name isInterface descriptor Z flags 11 +method name values descriptor ()[Ljava/lang/constant/DirectMethodHandleDesc$Kind; flags 9 +method name valueOf descriptor (Ljava/lang/String;)Ljava/lang/constant/DirectMethodHandleDesc$Kind; flags 9 +method name valueOf descriptor (I)Ljava/lang/constant/DirectMethodHandleDesc$Kind; flags 9 +method name valueOf descriptor (IZ)Ljava/lang/constant/DirectMethodHandleDesc$Kind; flags 9 + +class name java/lang/constant/DynamicCallSiteDesc +header extends java/lang/Object flags 21 +innerclass innerClass java/lang/invoke/MethodHandles$Lookup outerClass java/lang/invoke/MethodHandles innerClassName Lookup flags 19 +method name of descriptor (Ljava/lang/constant/DirectMethodHandleDesc;Ljava/lang/String;Ljava/lang/constant/MethodTypeDesc;[Ljava/lang/constant/ConstantDesc;)Ljava/lang/constant/DynamicCallSiteDesc; flags 89 +method name of descriptor (Ljava/lang/constant/DirectMethodHandleDesc;Ljava/lang/String;Ljava/lang/constant/MethodTypeDesc;)Ljava/lang/constant/DynamicCallSiteDesc; flags 9 +method name of descriptor (Ljava/lang/constant/DirectMethodHandleDesc;Ljava/lang/constant/MethodTypeDesc;)Ljava/lang/constant/DynamicCallSiteDesc; flags 9 +method name withArgs descriptor ([Ljava/lang/constant/ConstantDesc;)Ljava/lang/constant/DynamicCallSiteDesc; flags 81 +method name withNameAndType descriptor (Ljava/lang/String;Ljava/lang/constant/MethodTypeDesc;)Ljava/lang/constant/DynamicCallSiteDesc; flags 1 +method name invocationName descriptor ()Ljava/lang/String; flags 1 +method name invocationType descriptor ()Ljava/lang/constant/MethodTypeDesc; flags 1 +method name bootstrapMethod descriptor ()Ljava/lang/constant/MethodHandleDesc; flags 1 +method name bootstrapArgs descriptor ()[Ljava/lang/constant/ConstantDesc; flags 1 +method name resolveCallSiteDesc descriptor (Ljava/lang/invoke/MethodHandles$Lookup;)Ljava/lang/invoke/CallSite; thrownTypes java/lang/Throwable flags 1 +method name equals descriptor (Ljava/lang/Object;)Z flags 11 +method name hashCode descriptor ()I flags 11 +method name toString descriptor ()Ljava/lang/String; flags 1 + +class name java/lang/constant/DynamicConstantDesc +header extends java/lang/Object implements java/lang/constant/ConstantDesc flags 421 signature <T:Ljava/lang/Object;>Ljava/lang/Object;Ljava/lang/constant/ConstantDesc; +innerclass innerClass java/lang/invoke/MethodHandles$Lookup outerClass java/lang/invoke/MethodHandles innerClassName Lookup flags 19 +innerclass innerClass java/util/Map$Entry outerClass java/util/Map innerClassName Entry flags 609 +innerclass innerClass java/lang/Enum$EnumDesc outerClass java/lang/Enum innerClassName EnumDesc flags 19 +innerclass innerClass java/lang/invoke/VarHandle$VarHandleDesc outerClass java/lang/invoke/VarHandle innerClassName VarHandleDesc flags 19 +method name <init> descriptor (Ljava/lang/constant/DirectMethodHandleDesc;Ljava/lang/String;Ljava/lang/constant/ClassDesc;[Ljava/lang/constant/ConstantDesc;)V flags 84 +method name ofCanonical descriptor (Ljava/lang/constant/DirectMethodHandleDesc;Ljava/lang/String;Ljava/lang/constant/ClassDesc;[Ljava/lang/constant/ConstantDesc;)Ljava/lang/constant/ConstantDesc; flags 9 signature <T:Ljava/lang/Object;>(Ljava/lang/constant/DirectMethodHandleDesc;Ljava/lang/String;Ljava/lang/constant/ClassDesc;[Ljava/lang/constant/ConstantDesc;)Ljava/lang/constant/ConstantDesc; +method name ofNamed descriptor (Ljava/lang/constant/DirectMethodHandleDesc;Ljava/lang/String;Ljava/lang/constant/ClassDesc;[Ljava/lang/constant/ConstantDesc;)Ljava/lang/constant/DynamicConstantDesc; flags 89 signature <T:Ljava/lang/Object;>(Ljava/lang/constant/DirectMethodHandleDesc;Ljava/lang/String;Ljava/lang/constant/ClassDesc;[Ljava/lang/constant/ConstantDesc;)Ljava/lang/constant/DynamicConstantDesc<TT;>; +method name of descriptor (Ljava/lang/constant/DirectMethodHandleDesc;[Ljava/lang/constant/ConstantDesc;)Ljava/lang/constant/DynamicConstantDesc; flags 89 signature <T:Ljava/lang/Object;>(Ljava/lang/constant/DirectMethodHandleDesc;[Ljava/lang/constant/ConstantDesc;)Ljava/lang/constant/DynamicConstantDesc<TT;>; +method name of descriptor (Ljava/lang/constant/DirectMethodHandleDesc;)Ljava/lang/constant/DynamicConstantDesc; flags 9 signature <T:Ljava/lang/Object;>(Ljava/lang/constant/DirectMethodHandleDesc;)Ljava/lang/constant/DynamicConstantDesc<TT;>; +method name constantName descriptor ()Ljava/lang/String; flags 1 +method name constantType descriptor ()Ljava/lang/constant/ClassDesc; flags 1 +method name bootstrapMethod descriptor ()Ljava/lang/constant/DirectMethodHandleDesc; flags 1 +method name bootstrapArgs descriptor ()[Ljava/lang/constant/ConstantDesc; flags 1 +method name bootstrapArgsList descriptor ()Ljava/util/List; flags 1 signature ()Ljava/util/List<Ljava/lang/constant/ConstantDesc;>; +method name resolveConstantDesc descriptor (Ljava/lang/invoke/MethodHandles$Lookup;)Ljava/lang/Object; thrownTypes java/lang/ReflectiveOperationException flags 1 signature (Ljava/lang/invoke/MethodHandles$Lookup;)TT; +method name equals descriptor (Ljava/lang/Object;)Z flags 11 +method name hashCode descriptor ()I flags 11 +method name toString descriptor ()Ljava/lang/String; flags 1 + +class name java/lang/constant/MethodHandleDesc +header extends java/lang/Object implements java/lang/constant/ConstantDesc flags 601 +innerclass innerClass java/lang/constant/DirectMethodHandleDesc$Kind outerClass java/lang/constant/DirectMethodHandleDesc innerClassName Kind flags 4019 +method name of descriptor (Ljava/lang/constant/DirectMethodHandleDesc$Kind;Ljava/lang/constant/ClassDesc;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/constant/DirectMethodHandleDesc; flags 9 +method name ofMethod descriptor (Ljava/lang/constant/DirectMethodHandleDesc$Kind;Ljava/lang/constant/ClassDesc;Ljava/lang/String;Ljava/lang/constant/MethodTypeDesc;)Ljava/lang/constant/DirectMethodHandleDesc; flags 9 +method name ofField descriptor (Ljava/lang/constant/DirectMethodHandleDesc$Kind;Ljava/lang/constant/ClassDesc;Ljava/lang/String;Ljava/lang/constant/ClassDesc;)Ljava/lang/constant/DirectMethodHandleDesc; flags 9 +method name ofConstructor descriptor (Ljava/lang/constant/ClassDesc;[Ljava/lang/constant/ClassDesc;)Ljava/lang/constant/DirectMethodHandleDesc; flags 89 +method name asType descriptor (Ljava/lang/constant/MethodTypeDesc;)Ljava/lang/constant/MethodHandleDesc; flags 1 +method name invocationType descriptor ()Ljava/lang/constant/MethodTypeDesc; flags 401 +method name equals descriptor (Ljava/lang/Object;)Z flags 401 + +class name java/lang/constant/MethodTypeDesc +header extends java/lang/Object implements java/lang/constant/ConstantDesc,java/lang/invoke/TypeDescriptor$OfMethod flags 601 signature Ljava/lang/Object;Ljava/lang/constant/ConstantDesc;Ljava/lang/invoke/TypeDescriptor$OfMethod<Ljava/lang/constant/ClassDesc;Ljava/lang/constant/MethodTypeDesc;>; +innerclass innerClass java/lang/invoke/TypeDescriptor$OfField outerClass java/lang/invoke/TypeDescriptor innerClassName OfField flags 609 +innerclass innerClass java/lang/invoke/TypeDescriptor$OfMethod outerClass java/lang/invoke/TypeDescriptor innerClassName OfMethod flags 609 +innerclass innerClass java/lang/invoke/MethodHandles$Lookup outerClass java/lang/invoke/MethodHandles innerClassName Lookup flags 19 +method name ofDescriptor descriptor (Ljava/lang/String;)Ljava/lang/constant/MethodTypeDesc; flags 9 +method name of descriptor (Ljava/lang/constant/ClassDesc;[Ljava/lang/constant/ClassDesc;)Ljava/lang/constant/MethodTypeDesc; flags 89 +method name returnType descriptor ()Ljava/lang/constant/ClassDesc; flags 401 +method name parameterCount descriptor ()I flags 401 +method name parameterType descriptor (I)Ljava/lang/constant/ClassDesc; flags 401 +method name parameterList descriptor ()Ljava/util/List; flags 401 signature ()Ljava/util/List<Ljava/lang/constant/ClassDesc;>; +method name parameterArray descriptor ()[Ljava/lang/constant/ClassDesc; flags 401 +method name changeReturnType descriptor (Ljava/lang/constant/ClassDesc;)Ljava/lang/constant/MethodTypeDesc; flags 401 +method name changeParameterType descriptor (ILjava/lang/constant/ClassDesc;)Ljava/lang/constant/MethodTypeDesc; flags 401 +method name dropParameterTypes descriptor (II)Ljava/lang/constant/MethodTypeDesc; flags 401 +method name insertParameterTypes descriptor (I[Ljava/lang/constant/ClassDesc;)Ljava/lang/constant/MethodTypeDesc; flags 481 +method name descriptorString descriptor ()Ljava/lang/String; flags 1 +method name displayDescriptor descriptor ()Ljava/lang/String; flags 1 +method name equals descriptor (Ljava/lang/Object;)Z flags 401 +method name insertParameterTypes descriptor (I[Ljava/lang/invoke/TypeDescriptor$OfField;)Ljava/lang/invoke/TypeDescriptor$OfMethod; flags 1041 +method name dropParameterTypes descriptor (II)Ljava/lang/invoke/TypeDescriptor$OfMethod; flags 1041 +method name changeParameterType descriptor (ILjava/lang/invoke/TypeDescriptor$OfField;)Ljava/lang/invoke/TypeDescriptor$OfMethod; flags 1041 +method name changeReturnType descriptor (Ljava/lang/invoke/TypeDescriptor$OfField;)Ljava/lang/invoke/TypeDescriptor$OfMethod; flags 1041 +method name parameterArray descriptor ()[Ljava/lang/invoke/TypeDescriptor$OfField; flags 1041 +method name returnType descriptor ()Ljava/lang/invoke/TypeDescriptor$OfField; flags 1041 +method name parameterType descriptor (I)Ljava/lang/invoke/TypeDescriptor$OfField; flags 1041 + +class name java/lang/invoke/MethodHandle +header extends java/lang/Object implements java/lang/constant/Constable flags 421 +innerclass innerClass java/lang/invoke/MethodHandles$Lookup outerClass java/lang/invoke/MethodHandles innerClassName Lookup flags 19 +innerclass innerClass java/lang/constant/DirectMethodHandleDesc$Kind outerClass java/lang/constant/DirectMethodHandleDesc innerClassName Kind flags 4019 +method name describeConstable descriptor ()Ljava/util/Optional; flags 1 signature ()Ljava/util/Optional<Ljava/lang/constant/MethodHandleDesc;>; + +class name java/lang/invoke/MethodHandleProxies +header extends java/lang/Object flags 21 +innerclass innerClass java/lang/invoke/MethodHandles$Lookup outerClass java/lang/invoke/MethodHandles innerClassName Lookup flags 19 + +class name java/lang/invoke/MethodType +header extends java/lang/Object implements java/lang/constant/Constable,java/lang/invoke/TypeDescriptor$OfMethod,java/io/Serializable flags 31 signature Ljava/lang/Object;Ljava/lang/constant/Constable;Ljava/lang/invoke/TypeDescriptor$OfMethod<Ljava/lang/Class<*>;Ljava/lang/invoke/MethodType;>;Ljava/io/Serializable; +innerclass innerClass java/lang/invoke/TypeDescriptor$OfField outerClass java/lang/invoke/TypeDescriptor innerClassName OfField flags 609 +innerclass innerClass java/lang/invoke/TypeDescriptor$OfMethod outerClass java/lang/invoke/TypeDescriptor innerClassName OfMethod flags 609 +innerclass innerClass java/lang/invoke/MethodHandles$Lookup outerClass java/lang/invoke/MethodHandles innerClassName Lookup flags 19 +method name descriptorString descriptor ()Ljava/lang/String; flags 1 +method name describeConstable descriptor ()Ljava/util/Optional; flags 1 signature ()Ljava/util/Optional<Ljava/lang/constant/MethodTypeDesc;>; +method name insertParameterTypes descriptor (I[Ljava/lang/invoke/TypeDescriptor$OfField;)Ljava/lang/invoke/TypeDescriptor$OfMethod; flags 1041 +method name dropParameterTypes descriptor (II)Ljava/lang/invoke/TypeDescriptor$OfMethod; flags 1041 +method name changeParameterType descriptor (ILjava/lang/invoke/TypeDescriptor$OfField;)Ljava/lang/invoke/TypeDescriptor$OfMethod; flags 1041 +method name changeReturnType descriptor (Ljava/lang/invoke/TypeDescriptor$OfField;)Ljava/lang/invoke/TypeDescriptor$OfMethod; flags 1041 +method name parameterArray descriptor ()[Ljava/lang/invoke/TypeDescriptor$OfField; flags 1041 +method name returnType descriptor ()Ljava/lang/invoke/TypeDescriptor$OfField; flags 1041 +method name parameterType descriptor (I)Ljava/lang/invoke/TypeDescriptor$OfField; flags 1041 + +class name java/lang/invoke/TypeDescriptor +header extends java/lang/Object nestMembers java/lang/invoke/TypeDescriptor$OfMethod,java/lang/invoke/TypeDescriptor$OfField flags 601 +innerclass innerClass java/lang/invoke/TypeDescriptor$OfMethod outerClass java/lang/invoke/TypeDescriptor innerClassName OfMethod flags 609 +innerclass innerClass java/lang/invoke/TypeDescriptor$OfField outerClass java/lang/invoke/TypeDescriptor innerClassName OfField flags 609 +method name descriptorString descriptor ()Ljava/lang/String; flags 401 + +class name java/lang/invoke/TypeDescriptor$OfField +header extends java/lang/Object implements java/lang/invoke/TypeDescriptor nestHost java/lang/invoke/TypeDescriptor flags 601 signature <F::Ljava/lang/invoke/TypeDescriptor$OfField<TF;>;>Ljava/lang/Object;Ljava/lang/invoke/TypeDescriptor; +innerclass innerClass java/lang/invoke/TypeDescriptor$OfField outerClass java/lang/invoke/TypeDescriptor innerClassName OfField flags 609 +method name isArray descriptor ()Z flags 401 +method name isPrimitive descriptor ()Z flags 401 +method name componentType descriptor ()Ljava/lang/invoke/TypeDescriptor$OfField; flags 401 signature ()TF; +method name arrayType descriptor ()Ljava/lang/invoke/TypeDescriptor$OfField; flags 401 signature ()TF; + +class name java/lang/invoke/TypeDescriptor$OfMethod +header extends java/lang/Object implements java/lang/invoke/TypeDescriptor nestHost java/lang/invoke/TypeDescriptor flags 601 signature <F::Ljava/lang/invoke/TypeDescriptor$OfField<TF;>;M::Ljava/lang/invoke/TypeDescriptor$OfMethod<TF;TM;>;>Ljava/lang/Object;Ljava/lang/invoke/TypeDescriptor; +innerclass innerClass java/lang/invoke/TypeDescriptor$OfField outerClass java/lang/invoke/TypeDescriptor innerClassName OfField flags 609 +innerclass innerClass java/lang/invoke/TypeDescriptor$OfMethod outerClass java/lang/invoke/TypeDescriptor innerClassName OfMethod flags 609 +method name parameterCount descriptor ()I flags 401 +method name parameterType descriptor (I)Ljava/lang/invoke/TypeDescriptor$OfField; flags 401 signature (I)TF; +method name returnType descriptor ()Ljava/lang/invoke/TypeDescriptor$OfField; flags 401 signature ()TF; +method name parameterArray descriptor ()[Ljava/lang/invoke/TypeDescriptor$OfField; flags 401 signature ()[TF; +method name parameterList descriptor ()Ljava/util/List; flags 401 signature ()Ljava/util/List<TF;>; +method name changeReturnType descriptor (Ljava/lang/invoke/TypeDescriptor$OfField;)Ljava/lang/invoke/TypeDescriptor$OfMethod; flags 401 signature (TF;)TM; +method name changeParameterType descriptor (ILjava/lang/invoke/TypeDescriptor$OfField;)Ljava/lang/invoke/TypeDescriptor$OfMethod; flags 401 signature (ITF;)TM; +method name dropParameterTypes descriptor (II)Ljava/lang/invoke/TypeDescriptor$OfMethod; flags 401 signature (II)TM; +method name insertParameterTypes descriptor (I[Ljava/lang/invoke/TypeDescriptor$OfField;)Ljava/lang/invoke/TypeDescriptor$OfMethod; flags 481 signature (I[TF;)TM; + +class name java/lang/invoke/VarHandle +header extends java/lang/Object implements java/lang/constant/Constable nestMembers java/lang/invoke/VarHandle$VarHandleDesc,java/lang/invoke/VarHandle$AccessMode flags 421 +innerclass innerClass java/lang/invoke/VarHandle$VarHandleDesc outerClass java/lang/invoke/VarHandle innerClassName VarHandleDesc flags 19 +innerclass innerClass java/lang/invoke/VarHandle$AccessMode outerClass java/lang/invoke/VarHandle innerClassName AccessMode flags 4019 +method name toString descriptor ()Ljava/lang/String; flags 11 +method name describeConstable descriptor ()Ljava/util/Optional; flags 1 signature ()Ljava/util/Optional<Ljava/lang/invoke/VarHandle$VarHandleDesc;>; + +class name java/lang/invoke/VarHandle$VarHandleDesc +header extends java/lang/constant/DynamicConstantDesc nestHost java/lang/invoke/VarHandle flags 31 signature Ljava/lang/constant/DynamicConstantDesc<Ljava/lang/invoke/VarHandle;>; +innerclass innerClass java/lang/invoke/VarHandle$VarHandleDesc outerClass java/lang/invoke/VarHandle innerClassName VarHandleDesc flags 19 +innerclass innerClass java/lang/invoke/MethodHandles$Lookup outerClass java/lang/invoke/MethodHandles innerClassName Lookup flags 19 +method name ofField descriptor (Ljava/lang/constant/ClassDesc;Ljava/lang/String;Ljava/lang/constant/ClassDesc;)Ljava/lang/invoke/VarHandle$VarHandleDesc; flags 9 +method name ofStaticField descriptor (Ljava/lang/constant/ClassDesc;Ljava/lang/String;Ljava/lang/constant/ClassDesc;)Ljava/lang/invoke/VarHandle$VarHandleDesc; flags 9 +method name ofArray descriptor (Ljava/lang/constant/ClassDesc;)Ljava/lang/invoke/VarHandle$VarHandleDesc; flags 9 +method name varType descriptor ()Ljava/lang/constant/ClassDesc; flags 1 +method name resolveConstantDesc descriptor (Ljava/lang/invoke/MethodHandles$Lookup;)Ljava/lang/invoke/VarHandle; thrownTypes java/lang/ReflectiveOperationException flags 1 +method name toString descriptor ()Ljava/lang/String; flags 1 +method name resolveConstantDesc descriptor (Ljava/lang/invoke/MethodHandles$Lookup;)Ljava/lang/Object; thrownTypes java/lang/ReflectiveOperationException flags 1041 + +class name java/lang/module/ModuleDescriptor +header extends java/lang/Object implements java/lang/Comparable nestMembers java/lang/module/ModuleDescriptor$Builder,java/lang/module/ModuleDescriptor$Version,java/lang/module/ModuleDescriptor$Provides,java/lang/module/ModuleDescriptor$Opens,java/lang/module/ModuleDescriptor$Opens$Modifier,java/lang/module/ModuleDescriptor$Exports,java/lang/module/ModuleDescriptor$Exports$Modifier,java/lang/module/ModuleDescriptor$Requires,java/lang/module/ModuleDescriptor$Requires$Modifier,java/lang/module/ModuleDescriptor$Modifier flags 21 signature Ljava/lang/Object;Ljava/lang/Comparable<Ljava/lang/module/ModuleDescriptor;>; +innerclass innerClass java/lang/module/ModuleDescriptor$Builder outerClass java/lang/module/ModuleDescriptor innerClassName Builder flags 19 +innerclass innerClass java/lang/module/ModuleDescriptor$Version outerClass java/lang/module/ModuleDescriptor innerClassName Version flags 19 +innerclass innerClass java/lang/module/ModuleDescriptor$Provides outerClass java/lang/module/ModuleDescriptor innerClassName Provides flags 19 +innerclass innerClass java/lang/module/ModuleDescriptor$Opens outerClass java/lang/module/ModuleDescriptor innerClassName Opens flags 19 +innerclass innerClass java/lang/module/ModuleDescriptor$Exports outerClass java/lang/module/ModuleDescriptor innerClassName Exports flags 19 +innerclass innerClass java/lang/module/ModuleDescriptor$Requires outerClass java/lang/module/ModuleDescriptor innerClassName Requires flags 19 +innerclass innerClass java/lang/module/ModuleDescriptor$Modifier outerClass java/lang/module/ModuleDescriptor innerClassName Modifier flags 4019 +innerclass innerClass java/lang/module/ModuleDescriptor$Opens$Modifier outerClass java/lang/module/ModuleDescriptor$Opens innerClassName Modifier flags 4019 +innerclass innerClass java/lang/module/ModuleDescriptor$Exports$Modifier outerClass java/lang/module/ModuleDescriptor$Exports innerClassName Modifier flags 4019 +innerclass innerClass java/lang/module/ModuleDescriptor$Requires$Modifier outerClass java/lang/module/ModuleDescriptor$Requires innerClassName Modifier flags 4019 +innerclass innerClass java/lang/invoke/MethodHandles$Lookup outerClass java/lang/invoke/MethodHandles innerClassName Lookup flags 19 + +class name java/lang/reflect/Executable +header extends java/lang/reflect/AccessibleObject implements java/lang/reflect/Member,java/lang/reflect/GenericDeclaration flags 421 +innerclass innerClass java/lang/invoke/MethodHandles$Lookup outerClass java/lang/invoke/MethodHandles innerClassName Lookup flags 19 + +class name java/lang/reflect/UndeclaredThrowableException +header extends java/lang/RuntimeException flags 21 +innerclass innerClass java/io/ObjectInputStream$GetField outerClass java/io/ObjectInputStream innerClassName GetField flags 409 +innerclass innerClass java/io/ObjectOutputStream$PutField outerClass java/io/ObjectOutputStream innerClassName PutField flags 409 +-method name getCause descriptor ()Ljava/lang/Throwable; + +class name java/net/SecureCacheResponse +method name getSSLSession descriptor ()Ljava/util/Optional; flags 1 signature ()Ljava/util/Optional<Ljavax/net/ssl/SSLSession;>; + +class name java/net/ServerSocket +method name <init> descriptor (Ljava/net/SocketImpl;)V flags 4 + +class name java/nio/file/Files +method name mismatch descriptor (Ljava/nio/file/Path;Ljava/nio/file/Path;)J thrownTypes java/io/IOException flags 9 + +class name java/security/AccessController +-method name doPrivileged descriptor (Ljava/security/PrivilegedAction;)Ljava/lang/Object; +-method name doPrivileged descriptor (Ljava/security/PrivilegedAction;Ljava/security/AccessControlContext;)Ljava/lang/Object; +-method name doPrivileged descriptor (Ljava/security/PrivilegedExceptionAction;)Ljava/lang/Object; +-method name doPrivileged descriptor (Ljava/security/PrivilegedExceptionAction;Ljava/security/AccessControlContext;)Ljava/lang/Object; +method name doPrivileged descriptor (Ljava/security/PrivilegedAction;)Ljava/lang/Object; flags 9 signature <T:Ljava/lang/Object;>(Ljava/security/PrivilegedAction<TT;>;)TT; runtimeAnnotations @Ljdk/internal/reflect/CallerSensitive; +method name doPrivileged descriptor (Ljava/security/PrivilegedAction;Ljava/security/AccessControlContext;)Ljava/lang/Object; flags 9 signature <T:Ljava/lang/Object;>(Ljava/security/PrivilegedAction<TT;>;Ljava/security/AccessControlContext;)TT; runtimeAnnotations @Ljdk/internal/reflect/CallerSensitive; +method name doPrivileged descriptor (Ljava/security/PrivilegedExceptionAction;)Ljava/lang/Object; thrownTypes java/security/PrivilegedActionException flags 9 signature <T:Ljava/lang/Object;>(Ljava/security/PrivilegedExceptionAction<TT;>;)TT; runtimeAnnotations @Ljdk/internal/reflect/CallerSensitive; +method name doPrivileged descriptor (Ljava/security/PrivilegedExceptionAction;Ljava/security/AccessControlContext;)Ljava/lang/Object; thrownTypes java/security/PrivilegedActionException flags 9 signature <T:Ljava/lang/Object;>(Ljava/security/PrivilegedExceptionAction<TT;>;Ljava/security/AccessControlContext;)TT; runtimeAnnotations @Ljdk/internal/reflect/CallerSensitive; + +class name java/security/Key +-field name serialVersionUID descriptor J +field name serialVersionUID descriptor J constantValue 6603384152749567654 flags 19 deprecated true runtimeAnnotations @Ljava/lang/Deprecated; + +class name java/security/PrivateKey +-field name serialVersionUID descriptor J +field name serialVersionUID descriptor J constantValue 6034044314589513430 flags 19 deprecated true runtimeAnnotations @Ljava/lang/Deprecated; + +class name java/security/PrivilegedActionException +header extends java/lang/Exception flags 21 +innerclass innerClass java/io/ObjectInputStream$GetField outerClass java/io/ObjectInputStream innerClassName GetField flags 409 +innerclass innerClass java/io/ObjectOutputStream$PutField outerClass java/io/ObjectOutputStream innerClassName PutField flags 409 +-method name getCause descriptor ()Ljava/lang/Throwable; + +class name java/security/Provider +-method name getService descriptor (Ljava/lang/String;Ljava/lang/String;)Ljava/security/Provider$Service; +-method name putService descriptor (Ljava/security/Provider$Service;)V +-method name removeService descriptor (Ljava/security/Provider$Service;)V +method name getService descriptor (Ljava/lang/String;Ljava/lang/String;)Ljava/security/Provider$Service; flags 1 +method name putService descriptor (Ljava/security/Provider$Service;)V flags 4 +method name removeService descriptor (Ljava/security/Provider$Service;)V flags 4 + +class name java/security/PublicKey +-field name serialVersionUID descriptor J +field name serialVersionUID descriptor J constantValue 7187392471159151072 flags 19 deprecated true runtimeAnnotations @Ljava/lang/Deprecated; + +class name java/security/interfaces/DSAPrivateKey +-field name serialVersionUID descriptor J +field name serialVersionUID descriptor J constantValue 7776497482533790279 flags 19 deprecated true runtimeAnnotations @Ljava/lang/Deprecated; + +class name java/security/interfaces/DSAPublicKey +-field name serialVersionUID descriptor J +field name serialVersionUID descriptor J constantValue 1234526332779022332 flags 19 deprecated true runtimeAnnotations @Ljava/lang/Deprecated; + +class name java/security/interfaces/ECPrivateKey +-field name serialVersionUID descriptor J +field name serialVersionUID descriptor J constantValue -7896394956925609184 flags 19 deprecated true runtimeAnnotations @Ljava/lang/Deprecated; + +class name java/security/interfaces/ECPublicKey +-field name serialVersionUID descriptor J +field name serialVersionUID descriptor J constantValue -3314988629879632826 flags 19 deprecated true runtimeAnnotations @Ljava/lang/Deprecated; + +class name java/security/interfaces/RSAMultiPrimePrivateCrtKey +-field name serialVersionUID descriptor J +field name serialVersionUID descriptor J constantValue 618058533534628008 flags 19 deprecated true runtimeAnnotations @Ljava/lang/Deprecated; + +class name java/security/interfaces/RSAPrivateCrtKey +-field name serialVersionUID descriptor J +field name serialVersionUID descriptor J constantValue -5682214253527700368 flags 19 deprecated true runtimeAnnotations @Ljava/lang/Deprecated; + +class name java/security/interfaces/RSAPrivateKey +-field name serialVersionUID descriptor J +field name serialVersionUID descriptor J constantValue 5187144804936595022 flags 19 deprecated true runtimeAnnotations @Ljava/lang/Deprecated; + +class name java/security/interfaces/RSAPublicKey +-field name serialVersionUID descriptor J +field name serialVersionUID descriptor J constantValue -8727434096241101194 flags 19 deprecated true runtimeAnnotations @Ljava/lang/Deprecated; + +class name java/security/spec/PSSParameterSpec +method name toString descriptor ()Ljava/lang/String; flags 1 + +class name java/text/CompactNumberFormat +header extends java/text/NumberFormat flags 31 +innerclass innerClass java/text/Format$Field outerClass java/text/Format innerClassName Field flags 9 +innerclass innerClass java/text/NumberFormat$Field outerClass java/text/NumberFormat innerClassName Field flags 9 +method name <init> descriptor (Ljava/lang/String;Ljava/text/DecimalFormatSymbols;[Ljava/lang/String;)V flags 1 +method name format descriptor (Ljava/lang/Object;Ljava/lang/StringBuffer;Ljava/text/FieldPosition;)Ljava/lang/StringBuffer; flags 11 +method name format descriptor (DLjava/lang/StringBuffer;Ljava/text/FieldPosition;)Ljava/lang/StringBuffer; flags 1 +method name format descriptor (JLjava/lang/StringBuffer;Ljava/text/FieldPosition;)Ljava/lang/StringBuffer; flags 1 +method name formatToCharacterIterator descriptor (Ljava/lang/Object;)Ljava/text/AttributedCharacterIterator; flags 1 +method name parse descriptor (Ljava/lang/String;Ljava/text/ParsePosition;)Ljava/lang/Number; flags 1 +method name setMaximumIntegerDigits descriptor (I)V flags 1 +method name setMinimumIntegerDigits descriptor (I)V flags 1 +method name setMinimumFractionDigits descriptor (I)V flags 1 +method name setMaximumFractionDigits descriptor (I)V flags 1 +method name getRoundingMode descriptor ()Ljava/math/RoundingMode; flags 1 +method name setRoundingMode descriptor (Ljava/math/RoundingMode;)V flags 1 +method name getGroupingSize descriptor ()I flags 1 +method name setGroupingSize descriptor (I)V flags 1 +method name isGroupingUsed descriptor ()Z flags 1 +method name setGroupingUsed descriptor (Z)V flags 1 +method name isParseIntegerOnly descriptor ()Z flags 1 +method name setParseIntegerOnly descriptor (Z)V flags 1 +method name isParseBigDecimal descriptor ()Z flags 1 +method name setParseBigDecimal descriptor (Z)V flags 1 +method name equals descriptor (Ljava/lang/Object;)Z flags 1 +method name hashCode descriptor ()I flags 1 +method name clone descriptor ()Ljava/text/CompactNumberFormat; flags 1 +method name clone descriptor ()Ljava/lang/Object; flags 1041 + +class name java/text/NumberFormat +header extends java/text/Format nestMembers java/text/NumberFormat$Style,java/text/NumberFormat$Field flags 421 +innerclass innerClass java/text/NumberFormat$Style outerClass java/text/NumberFormat innerClassName Style flags 4019 +innerclass innerClass java/text/NumberFormat$Field outerClass java/text/NumberFormat innerClassName Field flags 9 +innerclass innerClass java/util/Locale$Category outerClass java/util/Locale innerClassName Category flags 4019 +method name getCompactNumberInstance descriptor ()Ljava/text/NumberFormat; flags 9 +method name getCompactNumberInstance descriptor (Ljava/util/Locale;Ljava/text/NumberFormat$Style;)Ljava/text/NumberFormat; flags 9 + +class name java/text/NumberFormat$Field +field name PREFIX descriptor Ljava/text/NumberFormat$Field; flags 19 +field name SUFFIX descriptor Ljava/text/NumberFormat$Field; flags 19 + +class name java/text/NumberFormat$Style +header extends java/lang/Enum nestHost java/text/NumberFormat flags 4031 signature Ljava/lang/Enum<Ljava/text/NumberFormat$Style;>; +innerclass innerClass java/text/NumberFormat$Style outerClass java/text/NumberFormat innerClassName Style flags 4019 +field name SHORT descriptor Ljava/text/NumberFormat$Style; flags 4019 +field name LONG descriptor Ljava/text/NumberFormat$Style; flags 4019 +method name values descriptor ()[Ljava/text/NumberFormat$Style; flags 9 +method name valueOf descriptor (Ljava/lang/String;)Ljava/text/NumberFormat$Style; flags 9 + +class name java/text/spi/NumberFormatProvider +header extends java/util/spi/LocaleServiceProvider flags 421 +innerclass innerClass java/text/NumberFormat$Style outerClass java/text/NumberFormat innerClassName Style flags 4019 +method name getCompactNumberInstance descriptor (Ljava/util/Locale;Ljava/text/NumberFormat$Style;)Ljava/text/NumberFormat; flags 1 + +class name java/util/concurrent/CompletableFuture +method name exceptionallyAsync descriptor (Ljava/util/function/Function;)Ljava/util/concurrent/CompletableFuture; flags 1 signature (Ljava/util/function/Function<Ljava/lang/Throwable;+TT;>;)Ljava/util/concurrent/CompletableFuture<TT;>; +method name exceptionallyAsync descriptor (Ljava/util/function/Function;Ljava/util/concurrent/Executor;)Ljava/util/concurrent/CompletableFuture; flags 1 signature (Ljava/util/function/Function<Ljava/lang/Throwable;+TT;>;Ljava/util/concurrent/Executor;)Ljava/util/concurrent/CompletableFuture<TT;>; +method name exceptionallyCompose descriptor (Ljava/util/function/Function;)Ljava/util/concurrent/CompletableFuture; flags 1 signature (Ljava/util/function/Function<Ljava/lang/Throwable;+Ljava/util/concurrent/CompletionStage<TT;>;>;)Ljava/util/concurrent/CompletableFuture<TT;>; +method name exceptionallyComposeAsync descriptor (Ljava/util/function/Function;)Ljava/util/concurrent/CompletableFuture; flags 1 signature (Ljava/util/function/Function<Ljava/lang/Throwable;+Ljava/util/concurrent/CompletionStage<TT;>;>;)Ljava/util/concurrent/CompletableFuture<TT;>; +method name exceptionallyComposeAsync descriptor (Ljava/util/function/Function;Ljava/util/concurrent/Executor;)Ljava/util/concurrent/CompletableFuture; flags 1 signature (Ljava/util/function/Function<Ljava/lang/Throwable;+Ljava/util/concurrent/CompletionStage<TT;>;>;Ljava/util/concurrent/Executor;)Ljava/util/concurrent/CompletableFuture<TT;>; +method name exceptionallyComposeAsync descriptor (Ljava/util/function/Function;Ljava/util/concurrent/Executor;)Ljava/util/concurrent/CompletionStage; flags 1041 +method name exceptionallyComposeAsync descriptor (Ljava/util/function/Function;)Ljava/util/concurrent/CompletionStage; flags 1041 +method name exceptionallyCompose descriptor (Ljava/util/function/Function;)Ljava/util/concurrent/CompletionStage; flags 1041 +method name exceptionallyAsync descriptor (Ljava/util/function/Function;Ljava/util/concurrent/Executor;)Ljava/util/concurrent/CompletionStage; flags 1041 +method name exceptionallyAsync descriptor (Ljava/util/function/Function;)Ljava/util/concurrent/CompletionStage; flags 1041 + +class name java/util/concurrent/CompletionStage +header extends java/lang/Object flags 601 signature <T:Ljava/lang/Object;>Ljava/lang/Object; +innerclass innerClass java/lang/invoke/MethodHandles$Lookup outerClass java/lang/invoke/MethodHandles innerClassName Lookup flags 19 +method name exceptionallyAsync descriptor (Ljava/util/function/Function;)Ljava/util/concurrent/CompletionStage; flags 1 signature (Ljava/util/function/Function<Ljava/lang/Throwable;+TT;>;)Ljava/util/concurrent/CompletionStage<TT;>; +method name exceptionallyAsync descriptor (Ljava/util/function/Function;Ljava/util/concurrent/Executor;)Ljava/util/concurrent/CompletionStage; flags 1 signature (Ljava/util/function/Function<Ljava/lang/Throwable;+TT;>;Ljava/util/concurrent/Executor;)Ljava/util/concurrent/CompletionStage<TT;>; +method name exceptionallyCompose descriptor (Ljava/util/function/Function;)Ljava/util/concurrent/CompletionStage; flags 1 signature (Ljava/util/function/Function<Ljava/lang/Throwable;+Ljava/util/concurrent/CompletionStage<TT;>;>;)Ljava/util/concurrent/CompletionStage<TT;>; +method name exceptionallyComposeAsync descriptor (Ljava/util/function/Function;)Ljava/util/concurrent/CompletionStage; flags 1 signature (Ljava/util/function/Function<Ljava/lang/Throwable;+Ljava/util/concurrent/CompletionStage<TT;>;>;)Ljava/util/concurrent/CompletionStage<TT;>; +method name exceptionallyComposeAsync descriptor (Ljava/util/function/Function;Ljava/util/concurrent/Executor;)Ljava/util/concurrent/CompletionStage; flags 1 signature (Ljava/util/function/Function<Ljava/lang/Throwable;+Ljava/util/concurrent/CompletionStage<TT;>;>;Ljava/util/concurrent/Executor;)Ljava/util/concurrent/CompletionStage<TT;>; + +class name java/util/jar/JarFile +header extends java/util/zip/ZipFile flags 21 +innerclass innerClass java/lang/Runtime$Version outerClass java/lang/Runtime innerClassName Version flags 19 +innerclass innerClass java/util/jar/Attributes$Name outerClass java/util/jar/Attributes innerClassName Name flags 9 +innerclass innerClass java/lang/invoke/MethodHandles$Lookup outerClass java/lang/invoke/MethodHandles innerClassName Lookup flags 19 + +class name java/util/stream/Collectors +method name teeing descriptor (Ljava/util/stream/Collector;Ljava/util/stream/Collector;Ljava/util/function/BiFunction;)Ljava/util/stream/Collector; flags 9 signature <T:Ljava/lang/Object;R1:Ljava/lang/Object;R2:Ljava/lang/Object;R:Ljava/lang/Object;>(Ljava/util/stream/Collector<-TT;*TR1;>;Ljava/util/stream/Collector<-TT;*TR2;>;Ljava/util/function/BiFunction<-TR1;-TR2;TR;>;)Ljava/util/stream/Collector<TT;*TR;>; + +class name java/util/zip/Deflater +-method name finalize descriptor ()V + +class name java/util/zip/Inflater +-method name finalize descriptor ()V + +class name java/util/zip/ZipFile +-method name finalize descriptor ()V + +class name javax/crypto/Cipher +method name toString descriptor ()Ljava/lang/String; flags 1 + +class name javax/crypto/SecretKey +-field name serialVersionUID descriptor J +field name serialVersionUID descriptor J constantValue -4795878709595146952 flags 19 deprecated true runtimeAnnotations @Ljava/lang/Deprecated; + +class name javax/crypto/interfaces/DHPrivateKey +-field name serialVersionUID descriptor J +field name serialVersionUID descriptor J constantValue 2211791113380396553 flags 19 deprecated true runtimeAnnotations @Ljava/lang/Deprecated; + +class name javax/crypto/interfaces/DHPublicKey +-field name serialVersionUID descriptor J +field name serialVersionUID descriptor J constantValue -6628103563352519193 flags 19 deprecated true runtimeAnnotations @Ljava/lang/Deprecated; + +class name javax/crypto/interfaces/PBEKey +-field name serialVersionUID descriptor J +field name serialVersionUID descriptor J constantValue -1430015993304333921 flags 19 deprecated true runtimeAnnotations @Ljava/lang/Deprecated; + +class name javax/net/ssl/HttpsURLConnection +method name getSSLSession descriptor ()Ljava/util/Optional; flags 1 signature ()Ljava/util/Optional<Ljavax/net/ssl/SSLSession;>; +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/make/data/symbols/java.compiler-C.sym.txt Fri Feb 08 18:58:44 2019 +0100 @@ -0,0 +1,106 @@ +# +# Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle in the LICENSE file that accompanied this code. +# +# This code is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# version 2 for more details (a copy is included in the LICENSE file that +# accompanied this code). +# +# You should have received a copy of the GNU General Public License version +# 2 along with this work; if not, write to the Free Software Foundation, +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. +# +# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# +# ########################################################## +# ### THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. ### +# ########################################################## +# +class name javax/lang/model/SourceVersion +field name RELEASE_12 descriptor Ljavax/lang/model/SourceVersion; flags 4019 + +class name javax/lang/model/util/AbstractAnnotationValueVisitor7 +-method name <init> descriptor ()V +method name <init> descriptor ()V flags 4 deprecated true runtimeAnnotations @Ljava/lang/Deprecated;(since="12") + +class name javax/lang/model/util/AbstractAnnotationValueVisitor9 +header extends javax/lang/model/util/AbstractAnnotationValueVisitor8 flags 421 signature <R:Ljava/lang/Object;P:Ljava/lang/Object;>Ljavax/lang/model/util/AbstractAnnotationValueVisitor8<TR;TP;>; runtimeAnnotations @Ljavax/annotation/processing/SupportedSourceVersion;(value=eLjavax/lang/model/SourceVersion;RELEASE_12;) + +class name javax/lang/model/util/AbstractElementVisitor7 +-method name <init> descriptor ()V +method name <init> descriptor ()V flags 4 deprecated true runtimeAnnotations @Ljava/lang/Deprecated;(since="12") + +class name javax/lang/model/util/AbstractElementVisitor9 +header extends javax/lang/model/util/AbstractElementVisitor8 flags 421 signature <R:Ljava/lang/Object;P:Ljava/lang/Object;>Ljavax/lang/model/util/AbstractElementVisitor8<TR;TP;>; runtimeAnnotations @Ljavax/annotation/processing/SupportedSourceVersion;(value=eLjavax/lang/model/SourceVersion;RELEASE_12;) + +class name javax/lang/model/util/AbstractTypeVisitor7 +-method name <init> descriptor ()V +method name <init> descriptor ()V flags 4 deprecated true runtimeAnnotations @Ljava/lang/Deprecated;(since="12") + +class name javax/lang/model/util/AbstractTypeVisitor9 +header extends javax/lang/model/util/AbstractTypeVisitor8 flags 421 signature <R:Ljava/lang/Object;P:Ljava/lang/Object;>Ljavax/lang/model/util/AbstractTypeVisitor8<TR;TP;>; runtimeAnnotations @Ljavax/annotation/processing/SupportedSourceVersion;(value=eLjavax/lang/model/SourceVersion;RELEASE_12;) + +class name javax/lang/model/util/ElementKindVisitor7 +-method name <init> descriptor ()V +-method name <init> descriptor (Ljava/lang/Object;)V +method name <init> descriptor ()V flags 4 deprecated true runtimeAnnotations @Ljava/lang/Deprecated;(since="12") +method name <init> descriptor (Ljava/lang/Object;)V flags 4 deprecated true signature (TR;)V runtimeAnnotations @Ljava/lang/Deprecated;(since="12") + +class name javax/lang/model/util/ElementKindVisitor9 +header extends javax/lang/model/util/ElementKindVisitor8 flags 21 signature <R:Ljava/lang/Object;P:Ljava/lang/Object;>Ljavax/lang/model/util/ElementKindVisitor8<TR;TP;>; runtimeAnnotations @Ljavax/annotation/processing/SupportedSourceVersion;(value=eLjavax/lang/model/SourceVersion;RELEASE_12;) + +class name javax/lang/model/util/ElementScanner7 +-method name <init> descriptor ()V +-method name <init> descriptor (Ljava/lang/Object;)V +method name <init> descriptor ()V flags 4 deprecated true runtimeAnnotations @Ljava/lang/Deprecated;(since="12") +method name <init> descriptor (Ljava/lang/Object;)V flags 4 deprecated true signature (TR;)V runtimeAnnotations @Ljava/lang/Deprecated;(since="12") + +class name javax/lang/model/util/ElementScanner9 +header extends javax/lang/model/util/ElementScanner8 flags 21 signature <R:Ljava/lang/Object;P:Ljava/lang/Object;>Ljavax/lang/model/util/ElementScanner8<TR;TP;>; runtimeAnnotations @Ljavax/annotation/processing/SupportedSourceVersion;(value=eLjavax/lang/model/SourceVersion;RELEASE_12;) + +class name javax/lang/model/util/SimpleAnnotationValueVisitor7 +-method name <init> descriptor ()V +-method name <init> descriptor (Ljava/lang/Object;)V +method name <init> descriptor ()V flags 4 deprecated true runtimeAnnotations @Ljava/lang/Deprecated;(since="12") +method name <init> descriptor (Ljava/lang/Object;)V flags 4 deprecated true signature (TR;)V runtimeAnnotations @Ljava/lang/Deprecated;(since="12") + +class name javax/lang/model/util/SimpleAnnotationValueVisitor9 +header extends javax/lang/model/util/SimpleAnnotationValueVisitor8 flags 21 signature <R:Ljava/lang/Object;P:Ljava/lang/Object;>Ljavax/lang/model/util/SimpleAnnotationValueVisitor8<TR;TP;>; runtimeAnnotations @Ljavax/annotation/processing/SupportedSourceVersion;(value=eLjavax/lang/model/SourceVersion;RELEASE_12;) + +class name javax/lang/model/util/SimpleElementVisitor7 +-method name <init> descriptor ()V +-method name <init> descriptor (Ljava/lang/Object;)V +method name <init> descriptor ()V flags 4 deprecated true runtimeAnnotations @Ljava/lang/Deprecated;(since="12") +method name <init> descriptor (Ljava/lang/Object;)V flags 4 deprecated true signature (TR;)V runtimeAnnotations @Ljava/lang/Deprecated;(since="12") + +class name javax/lang/model/util/SimpleElementVisitor9 +header extends javax/lang/model/util/SimpleElementVisitor8 flags 21 signature <R:Ljava/lang/Object;P:Ljava/lang/Object;>Ljavax/lang/model/util/SimpleElementVisitor8<TR;TP;>; runtimeAnnotations @Ljavax/annotation/processing/SupportedSourceVersion;(value=eLjavax/lang/model/SourceVersion;RELEASE_12;) + +class name javax/lang/model/util/SimpleTypeVisitor7 +-method name <init> descriptor ()V +-method name <init> descriptor (Ljava/lang/Object;)V +method name <init> descriptor ()V flags 4 deprecated true runtimeAnnotations @Ljava/lang/Deprecated;(since="12") +method name <init> descriptor (Ljava/lang/Object;)V flags 4 deprecated true signature (TR;)V runtimeAnnotations @Ljava/lang/Deprecated;(since="12") + +class name javax/lang/model/util/SimpleTypeVisitor9 +header extends javax/lang/model/util/SimpleTypeVisitor8 flags 21 signature <R:Ljava/lang/Object;P:Ljava/lang/Object;>Ljavax/lang/model/util/SimpleTypeVisitor8<TR;TP;>; runtimeAnnotations @Ljavax/annotation/processing/SupportedSourceVersion;(value=eLjavax/lang/model/SourceVersion;RELEASE_12;) + +class name javax/lang/model/util/TypeKindVisitor7 +-method name <init> descriptor ()V +-method name <init> descriptor (Ljava/lang/Object;)V +method name <init> descriptor ()V flags 4 deprecated true runtimeAnnotations @Ljava/lang/Deprecated;(since="12") +method name <init> descriptor (Ljava/lang/Object;)V flags 4 deprecated true signature (TR;)V runtimeAnnotations @Ljava/lang/Deprecated;(since="12") + +class name javax/lang/model/util/TypeKindVisitor9 +header extends javax/lang/model/util/TypeKindVisitor8 flags 21 signature <R:Ljava/lang/Object;P:Ljava/lang/Object;>Ljavax/lang/model/util/TypeKindVisitor8<TR;TP;>; runtimeAnnotations @Ljavax/annotation/processing/SupportedSourceVersion;(value=eLjavax/lang/model/SourceVersion;RELEASE_12;) +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/make/data/symbols/java.desktop-C.sym.txt Fri Feb 08 18:58:44 2019 +0100 @@ -0,0 +1,47 @@ +# +# Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle in the LICENSE file that accompanied this code. +# +# This code is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# version 2 for more details (a copy is included in the LICENSE file that +# accompanied this code). +# +# You should have received a copy of the GNU General Public License version +# 2 along with this work; if not, write to the Free Software Foundation, +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. +# +# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# +# ########################################################## +# ### THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. ### +# ########################################################## +# +class name javax/swing/border/TitledBorder +header extends javax/swing/border/AbstractBorder flags 21 +innerclass innerClass java/awt/Component$BaselineResizeBehavior outerClass java/awt/Component innerClassName BaselineResizeBehavior flags 4019 +innerclass innerClass java/awt/geom/Path2D$Float outerClass java/awt/geom/Path2D innerClassName Float flags 9 +innerclass innerClass java/lang/ref/Cleaner$Cleanable outerClass java/lang/ref/Cleaner innerClassName Cleanable flags 609 +innerclass innerClass java/lang/invoke/MethodHandles$Lookup outerClass java/lang/invoke/MethodHandles innerClassName Lookup flags 19 + +class name javax/swing/filechooser/FileSystemView +method name getChooserShortcutPanelFiles descriptor ()[Ljava/io/File; flags 11 + +class name javax/swing/text/html/StyleSheet$ListPainter +header extends java/lang/Object implements java/io/Serializable nestHost javax/swing/text/html/StyleSheet flags 21 +innerclass innerClass javax/swing/text/html/StyleSheet$ListPainter outerClass javax/swing/text/html/StyleSheet innerClassName ListPainter flags 9 +innerclass innerClass javax/swing/text/html/HTML$Tag outerClass javax/swing/text/html/HTML innerClassName Tag flags 9 +innerclass innerClass javax/swing/text/html/CSS$Attribute outerClass javax/swing/text/html/CSS innerClassName Attribute flags 19 +innerclass innerClass javax/swing/text/html/HTML$Attribute outerClass javax/swing/text/html/HTML innerClassName Attribute flags 19 +innerclass innerClass java/awt/RenderingHints$Key outerClass java/awt/RenderingHints innerClassName Key flags 409 +innerclass innerClass java/lang/invoke/MethodHandles$Lookup outerClass java/lang/invoke/MethodHandles innerClassName Lookup flags 19 +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/make/data/symbols/java.naming-C.sym.txt Fri Feb 08 18:58:44 2019 +0100 @@ -0,0 +1,50 @@ +# +# Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle in the LICENSE file that accompanied this code. +# +# This code is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# version 2 for more details (a copy is included in the LICENSE file that +# accompanied this code). +# +# You should have received a copy of the GNU General Public License version +# 2 along with this work; if not, write to the Free Software Foundation, +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. +# +# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# +# ########################################################## +# ### THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. ### +# ########################################################## +# +module name java.naming +header exports javax/naming,javax/naming/directory,javax/naming/event,javax/naming/ldap,javax/naming/spi,javax/naming/ldap/spi requires name\u0020;java.base\u0020;flags\u0020;8000,name\u0020;java.security.sasl\u0020;flags\u0020;0 uses javax/naming/ldap/StartTlsResponse,javax/naming/spi/InitialContextFactory,javax/naming/ldap/spi/LdapDnsProvider provides interface\u0020;java/security/Provider\u0020;impls\u0020;sun/security/provider/certpath/ldap/JdkLDAP target linux-amd64 flags 8000 + +class name javax/naming/Name +-field name serialVersionUID descriptor J +field name serialVersionUID descriptor J constantValue -3617482732056931635 flags 19 deprecated true runtimeAnnotations @Ljava/lang/Deprecated; + +class name javax/naming/directory/Attribute +-field name serialVersionUID descriptor J +field name serialVersionUID descriptor J constantValue 8707690322213556804 flags 19 deprecated true runtimeAnnotations @Ljava/lang/Deprecated; + +class name javax/naming/ldap/spi/LdapDnsProvider +header extends java/lang/Object flags 421 +method name <init> descriptor ()V flags 4 +method name lookupEndpoints descriptor (Ljava/lang/String;Ljava/util/Map;)Ljava/util/Optional; thrownTypes javax/naming/NamingException flags 401 signature (Ljava/lang/String;Ljava/util/Map<**>;)Ljava/util/Optional<Ljavax/naming/ldap/spi/LdapDnsProviderResult;>; + +class name javax/naming/ldap/spi/LdapDnsProviderResult +header extends java/lang/Object flags 31 +method name <init> descriptor (Ljava/lang/String;Ljava/util/List;)V flags 1 signature (Ljava/lang/String;Ljava/util/List<Ljava/lang/String;>;)V +method name getDomainName descriptor ()Ljava/lang/String; flags 1 +method name getEndpoints descriptor ()Ljava/util/List; flags 1 signature ()Ljava/util/List<Ljava/lang/String;>; +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/make/data/symbols/java.rmi-C.sym.txt Fri Feb 08 18:58:44 2019 +0100 @@ -0,0 +1,36 @@ +# +# Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle in the LICENSE file that accompanied this code. +# +# This code is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# version 2 for more details (a copy is included in the LICENSE file that +# accompanied this code). +# +# You should have received a copy of the GNU General Public License version +# 2 along with this work; if not, write to the Free Software Foundation, +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. +# +# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# +# ########################################################## +# ### THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. ### +# ########################################################## +# +class name java/rmi/server/RemoteRef +-field name serialVersionUID descriptor J +field name serialVersionUID descriptor J constantValue 3632638527362204081 flags 19 deprecated true runtimeAnnotations @Ljava/lang/Deprecated; + +class name java/rmi/server/ServerRef +-field name serialVersionUID descriptor J +field name serialVersionUID descriptor J constantValue -4557750989390278438 flags 19 deprecated true runtimeAnnotations @Ljava/lang/Deprecated; +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/make/data/symbols/java.xml-C.sym.txt Fri Feb 08 18:58:44 2019 +0100 @@ -0,0 +1,32 @@ +# +# Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle in the LICENSE file that accompanied this code. +# +# This code is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# version 2 for more details (a copy is included in the LICENSE file that +# accompanied this code). +# +# You should have received a copy of the GNU General Public License version +# 2 along with this work; if not, write to the Free Software Foundation, +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. +# +# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# +# ########################################################## +# ### THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. ### +# ########################################################## +# +class name javax/xml/stream/XMLInputFactory +method name newFactory descriptor ()Ljavax/xml/stream/XMLInputFactory; thrownTypes javax/xml/stream/FactoryConfigurationError flags 9 +-method name newFactory descriptor ()Ljavax/xml/stream/XMLInputFactory; +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/make/data/symbols/jdk.compiler-C.sym.txt Fri Feb 08 18:58:44 2019 +0100 @@ -0,0 +1,84 @@ +# +# Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle in the LICENSE file that accompanied this code. +# +# This code is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# version 2 for more details (a copy is included in the LICENSE file that +# accompanied this code). +# +# You should have received a copy of the GNU General Public License version +# 2 along with this work; if not, write to the Free Software Foundation, +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. +# +# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# +# ########################################################## +# ### THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. ### +# ########################################################## +# +class name com/sun/source/doctree/DocTree$Kind +field name SYSTEM_PROPERTY descriptor Lcom/sun/source/doctree/DocTree$Kind; flags 4019 + +class name com/sun/source/doctree/DocTreeVisitor +method name visitSystemProperty descriptor (Lcom/sun/source/doctree/SystemPropertyTree;Ljava/lang/Object;)Ljava/lang/Object; flags 1 signature (Lcom/sun/source/doctree/SystemPropertyTree;TP;)TR; + +class name com/sun/source/doctree/SystemPropertyTree +header extends java/lang/Object implements com/sun/source/doctree/InlineTagTree flags 601 +method name getPropertyName descriptor ()Ljavax/lang/model/element/Name; flags 401 + +class name com/sun/source/tree/BreakTree +method name getValue descriptor ()Lcom/sun/source/tree/ExpressionTree; flags 401 deprecated true runtimeAnnotations @Ljava/lang/Deprecated;(forRemoval=Ztrue,since="12") + +class name com/sun/source/tree/CaseTree +header extends java/lang/Object implements com/sun/source/tree/Tree nestMembers com/sun/source/tree/CaseTree$CaseKind flags 601 +innerclass innerClass com/sun/source/tree/CaseTree$CaseKind outerClass com/sun/source/tree/CaseTree innerClassName CaseKind flags 4019 +method name getExpressions descriptor ()Ljava/util/List; flags 401 deprecated true signature ()Ljava/util/List<+Lcom/sun/source/tree/ExpressionTree;>; runtimeAnnotations @Ljava/lang/Deprecated;(forRemoval=Ztrue,since="12") +method name getBody descriptor ()Lcom/sun/source/tree/Tree; flags 1 deprecated true runtimeAnnotations @Ljava/lang/Deprecated;(forRemoval=Ztrue,since="12") +method name getCaseKind descriptor ()Lcom/sun/source/tree/CaseTree$CaseKind; flags 1 deprecated true runtimeAnnotations @Ljava/lang/Deprecated;(forRemoval=Ztrue,since="12") + +class name com/sun/source/tree/CaseTree$CaseKind +header extends java/lang/Enum nestHost com/sun/source/tree/CaseTree flags 4031 deprecated true signature Ljava/lang/Enum<Lcom/sun/source/tree/CaseTree$CaseKind;>; runtimeAnnotations @Ljava/lang/Deprecated;(forRemoval=Ztrue,since="12") +innerclass innerClass com/sun/source/tree/CaseTree$CaseKind outerClass com/sun/source/tree/CaseTree innerClassName CaseKind flags 4019 +field name STATEMENT descriptor Lcom/sun/source/tree/CaseTree$CaseKind; flags 4019 +field name RULE descriptor Lcom/sun/source/tree/CaseTree$CaseKind; flags 4019 +method name values descriptor ()[Lcom/sun/source/tree/CaseTree$CaseKind; flags 9 +method name valueOf descriptor (Ljava/lang/String;)Lcom/sun/source/tree/CaseTree$CaseKind; flags 9 + +class name com/sun/source/tree/SwitchExpressionTree +header extends java/lang/Object implements com/sun/source/tree/ExpressionTree flags 601 deprecated true runtimeAnnotations @Ljava/lang/Deprecated;(forRemoval=Ztrue,since="12") +method name getExpression descriptor ()Lcom/sun/source/tree/ExpressionTree; flags 401 +method name getCases descriptor ()Ljava/util/List; flags 401 signature ()Ljava/util/List<+Lcom/sun/source/tree/CaseTree;>; + +class name com/sun/source/tree/Tree$Kind +field name SWITCH_EXPRESSION descriptor Lcom/sun/source/tree/Tree$Kind; flags 4019 deprecated true runtimeAnnotations @Ljava/lang/Deprecated;(forRemoval=Ztrue,since="12") + +class name com/sun/source/tree/TreeVisitor +method name visitSwitchExpression descriptor (Lcom/sun/source/tree/SwitchExpressionTree;Ljava/lang/Object;)Ljava/lang/Object; flags 401 deprecated true signature (Lcom/sun/source/tree/SwitchExpressionTree;TP;)TR; runtimeAnnotations @Ljava/lang/Deprecated;(forRemoval=Ztrue,since="12") + +class name com/sun/source/util/DocTreeFactory +method name newSystemPropertyTree descriptor (Ljavax/lang/model/element/Name;)Lcom/sun/source/doctree/SystemPropertyTree; flags 401 + +class name com/sun/source/util/DocTreeScanner +method name visitSystemProperty descriptor (Lcom/sun/source/doctree/SystemPropertyTree;Ljava/lang/Object;)Ljava/lang/Object; flags 1 signature (Lcom/sun/source/doctree/SystemPropertyTree;TP;)TR; + +class name com/sun/source/util/SimpleDocTreeVisitor +method name visitSystemProperty descriptor (Lcom/sun/source/doctree/SystemPropertyTree;Ljava/lang/Object;)Ljava/lang/Object; flags 1 signature (Lcom/sun/source/doctree/SystemPropertyTree;TP;)TR; + +class name com/sun/source/util/SimpleTreeVisitor +method name visitSwitchExpression descriptor (Lcom/sun/source/tree/SwitchExpressionTree;Ljava/lang/Object;)Ljava/lang/Object; flags 1 deprecated true signature (Lcom/sun/source/tree/SwitchExpressionTree;TP;)TR; runtimeAnnotations @Ljava/lang/Deprecated;(forRemoval=Ztrue,since="12") + +class name com/sun/source/util/TreeScanner +header extends java/lang/Object implements com/sun/source/tree/TreeVisitor flags 21 signature <R:Ljava/lang/Object;P:Ljava/lang/Object;>Ljava/lang/Object;Lcom/sun/source/tree/TreeVisitor<TR;TP;>; +innerclass innerClass com/sun/source/tree/CaseTree$CaseKind outerClass com/sun/source/tree/CaseTree innerClassName CaseKind flags 4019 +method name visitSwitchExpression descriptor (Lcom/sun/source/tree/SwitchExpressionTree;Ljava/lang/Object;)Ljava/lang/Object; flags 1 deprecated true signature (Lcom/sun/source/tree/SwitchExpressionTree;TP;)TR; runtimeAnnotations @Ljava/lang/Deprecated;(forRemoval=Ztrue,since="12") +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/make/data/symbols/jdk.jfr-C.sym.txt Fri Feb 08 18:58:44 2019 +0100 @@ -0,0 +1,31 @@ +# +# Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle in the LICENSE file that accompanied this code. +# +# This code is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# version 2 for more details (a copy is included in the LICENSE file that +# accompanied this code). +# +# You should have received a copy of the GNU General Public License version +# 2 along with this work; if not, write to the Free Software Foundation, +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. +# +# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# +# ########################################################## +# ### THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. ### +# ########################################################## +# +class name jdk/jfr/Event +header extends jdk/internal/event/Event flags 421 runtimeAnnotations @Ljdk/jfr/Enabled;(value=Ztrue)@Ljdk/jfr/StackTrace;(value=Ztrue)@Ljdk/jfr/Registered;(value=Ztrue) +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/make/data/symbols/jdk.jsobject-C.sym.txt Fri Feb 08 18:58:44 2019 +0100 @@ -0,0 +1,32 @@ +# +# Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle in the LICENSE file that accompanied this code. +# +# This code is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# version 2 for more details (a copy is included in the LICENSE file that +# accompanied this code). +# +# You should have received a copy of the GNU General Public License version +# 2 along with this work; if not, write to the Free Software Foundation, +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. +# +# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# +# ########################################################## +# ### THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. ### +# ########################################################## +# +class name netscape/javascript/JSObject +-method name getWindow descriptor (Ljava/applet/Applet;)Lnetscape/javascript/JSObject; +method name getWindow descriptor (Ljava/applet/Applet;)Lnetscape/javascript/JSObject; thrownTypes netscape/javascript/JSException flags 9 deprecated true runtimeAnnotations @Ljava/lang/Deprecated;(forRemoval=Ztrue,since="9") +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/make/data/symbols/jdk.unsupported-C.sym.txt Fri Feb 08 18:58:44 2019 +0100 @@ -0,0 +1,32 @@ +# +# Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle in the LICENSE file that accompanied this code. +# +# This code is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# version 2 for more details (a copy is included in the LICENSE file that +# accompanied this code). +# +# You should have received a copy of the GNU General Public License version +# 2 along with this work; if not, write to the Free Software Foundation, +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. +# +# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# +# ########################################################## +# ### THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. ### +# ########################################################## +# +class name sun/reflect/ReflectionFactory +header extends java/lang/Object flags 21 classAnnotations @Lsun/Proprietary+Annotation; +-method name newInstanceForSerialization descriptor (Ljava/lang/reflect/Constructor;[Ljava/security/ProtectionDomain;)Ljava/lang/Object; +
--- a/make/data/symbols/symbols Thu Feb 07 22:15:11 2019 +0100 +++ b/make/data/symbols/symbols Fri Feb 08 18:58:44 2019 +0100 @@ -1,5 +1,5 @@ # -# Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -29,9 +29,10 @@ #command used to generate this file: #build.tools.symbolgenerator.CreateSymbols build-description-incremental symbols include.list # -generate platforms 7:8:9:A:B +generate platforms 7:8:9:A:B:C platform version 8 files java.activation-8.sym.txt:java.base-8.sym.txt:java.compiler-8.sym.txt:java.corba-8.sym.txt:java.datatransfer-8.sym.txt:java.desktop-8.sym.txt:java.instrument-8.sym.txt:java.logging-8.sym.txt:java.management-8.sym.txt:java.management.rmi-8.sym.txt:java.naming-8.sym.txt:java.prefs-8.sym.txt:java.rmi-8.sym.txt:java.scripting-8.sym.txt:java.security.jgss-8.sym.txt:java.security.sasl-8.sym.txt:java.sql-8.sym.txt:java.sql.rowset-8.sym.txt:java.transaction-8.sym.txt:java.xml-8.sym.txt:java.xml.bind-8.sym.txt:java.xml.crypto-8.sym.txt:java.xml.ws-8.sym.txt:java.xml.ws.annotation-8.sym.txt:jdk.httpserver-8.sym.txt:jdk.management-8.sym.txt:jdk.scripting.nashorn-8.sym.txt:jdk.sctp-8.sym.txt:jdk.security.auth-8.sym.txt:jdk.security.jgss-8.sym.txt platform version 7 base 8 files java.base-7.sym.txt:java.compiler-7.sym.txt:java.datatransfer-7.sym.txt:java.desktop-7.sym.txt:java.logging-7.sym.txt:java.management-7.sym.txt:java.naming-7.sym.txt:java.prefs-7.sym.txt:java.rmi-7.sym.txt:java.scripting-7.sym.txt:java.security.jgss-7.sym.txt:java.security.sasl-7.sym.txt:java.sql-7.sym.txt:java.sql.rowset-7.sym.txt:java.xml-7.sym.txt:java.xml.bind-7.sym.txt:java.xml.ws.annotation-7.sym.txt:jdk.httpserver-7.sym.txt:jdk.management-7.sym.txt:jdk.scripting.nashorn-7.sym.txt:jdk.sctp-7.sym.txt:jdk.security.auth-7.sym.txt:jdk.security.jgss-7.sym.txt platform version 9 base 8 files java.activation-9.sym.txt:java.base-9.sym.txt:java.compiler-9.sym.txt:java.corba-9.sym.txt:java.datatransfer-9.sym.txt:java.desktop-9.sym.txt:java.instrument-9.sym.txt:java.logging-9.sym.txt:java.management-9.sym.txt:java.management.rmi-9.sym.txt:java.naming-9.sym.txt:java.prefs-9.sym.txt:java.rmi-9.sym.txt:java.scripting-9.sym.txt:java.se-9.sym.txt:java.se.ee-9.sym.txt:java.security.jgss-9.sym.txt:java.security.sasl-9.sym.txt:java.smartcardio-9.sym.txt:java.sql-9.sym.txt:java.sql.rowset-9.sym.txt:java.transaction-9.sym.txt:java.xml-9.sym.txt:java.xml.bind-9.sym.txt:java.xml.crypto-9.sym.txt:java.xml.ws-9.sym.txt:java.xml.ws.annotation-9.sym.txt:jdk.accessibility-9.sym.txt:jdk.attach-9.sym.txt:jdk.charsets-9.sym.txt:jdk.compiler-9.sym.txt:jdk.crypto.cryptoki-9.sym.txt:jdk.crypto.ec-9.sym.txt:jdk.dynalink-9.sym.txt:jdk.editpad-9.sym.txt:jdk.hotspot.agent-9.sym.txt:jdk.httpserver-9.sym.txt:jdk.incubator.httpclient-9.sym.txt:jdk.jartool-9.sym.txt:jdk.javadoc-9.sym.txt:jdk.jcmd-9.sym.txt:jdk.jconsole-9.sym.txt:jdk.jdeps-9.sym.txt:jdk.jdi-9.sym.txt:jdk.jdwp.agent-9.sym.txt:jdk.jlink-9.sym.txt:jdk.jshell-9.sym.txt:jdk.jsobject-9.sym.txt:jdk.jstatd-9.sym.txt:jdk.localedata-9.sym.txt:jdk.management-9.sym.txt:jdk.management.agent-9.sym.txt:jdk.naming.dns-9.sym.txt:jdk.naming.rmi-9.sym.txt:jdk.net-9.sym.txt:jdk.pack-9.sym.txt:jdk.policytool-9.sym.txt:jdk.rmic-9.sym.txt:jdk.scripting.nashorn-9.sym.txt:jdk.sctp-9.sym.txt:jdk.security.auth-9.sym.txt:jdk.security.jgss-9.sym.txt:jdk.unsupported-9.sym.txt:jdk.xml.dom-9.sym.txt:jdk.zipfs-9.sym.txt platform version A base 9 files java.activation-A.sym.txt:java.base-A.sym.txt:java.compiler-A.sym.txt:java.corba-A.sym.txt:java.datatransfer-A.sym.txt:java.desktop-A.sym.txt:java.instrument-A.sym.txt:java.logging-A.sym.txt:java.management-A.sym.txt:java.management.rmi-A.sym.txt:java.naming-A.sym.txt:java.prefs-A.sym.txt:java.rmi-A.sym.txt:java.scripting-A.sym.txt:java.se-A.sym.txt:java.se.ee-A.sym.txt:java.security.jgss-A.sym.txt:java.security.sasl-A.sym.txt:java.smartcardio-A.sym.txt:java.sql-A.sym.txt:java.sql.rowset-A.sym.txt:java.transaction-A.sym.txt:java.xml-A.sym.txt:java.xml.bind-A.sym.txt:java.xml.crypto-A.sym.txt:java.xml.ws-A.sym.txt:java.xml.ws.annotation-A.sym.txt:jdk.accessibility-A.sym.txt:jdk.attach-A.sym.txt:jdk.charsets-A.sym.txt:jdk.compiler-A.sym.txt:jdk.crypto.cryptoki-A.sym.txt:jdk.crypto.ec-A.sym.txt:jdk.dynalink-A.sym.txt:jdk.editpad-A.sym.txt:jdk.hotspot.agent-A.sym.txt:jdk.httpserver-A.sym.txt:jdk.incubator.httpclient-A.sym.txt:jdk.jartool-A.sym.txt:jdk.javadoc-A.sym.txt:jdk.jcmd-A.sym.txt:jdk.jconsole-A.sym.txt:jdk.jdeps-A.sym.txt:jdk.jdi-A.sym.txt:jdk.jdwp.agent-A.sym.txt:jdk.jlink-A.sym.txt:jdk.jshell-A.sym.txt:jdk.jsobject-A.sym.txt:jdk.jstatd-A.sym.txt:jdk.localedata-A.sym.txt:jdk.management-A.sym.txt:jdk.management.agent-A.sym.txt:jdk.naming.dns-A.sym.txt:jdk.naming.rmi-A.sym.txt:jdk.net-A.sym.txt:jdk.pack-A.sym.txt:jdk.policytool-A.sym.txt:jdk.rmic-A.sym.txt:jdk.scripting.nashorn-A.sym.txt:jdk.sctp-A.sym.txt:jdk.security.auth-A.sym.txt:jdk.security.jgss-A.sym.txt:jdk.unsupported-A.sym.txt:jdk.xml.dom-A.sym.txt:jdk.zipfs-A.sym.txt platform version B base A files java.activation-B.sym.txt:java.base-B.sym.txt:java.compiler-B.sym.txt:java.corba-B.sym.txt:java.datatransfer-B.sym.txt:java.desktop-B.sym.txt:java.instrument-B.sym.txt:java.logging-B.sym.txt:java.management-B.sym.txt:java.management.rmi-B.sym.txt:java.naming-B.sym.txt:java.net.http-B.sym.txt:java.prefs-B.sym.txt:java.rmi-B.sym.txt:java.scripting-B.sym.txt:java.se-B.sym.txt:java.se.ee-B.sym.txt:java.security.jgss-B.sym.txt:java.security.sasl-B.sym.txt:java.smartcardio-B.sym.txt:java.sql-B.sym.txt:java.sql.rowset-B.sym.txt:java.transaction-B.sym.txt:java.transaction.xa-B.sym.txt:java.xml-B.sym.txt:java.xml.bind-B.sym.txt:java.xml.crypto-B.sym.txt:java.xml.ws-B.sym.txt:java.xml.ws.annotation-B.sym.txt:jdk.accessibility-B.sym.txt:jdk.attach-B.sym.txt:jdk.charsets-B.sym.txt:jdk.compiler-B.sym.txt:jdk.crypto.cryptoki-B.sym.txt:jdk.crypto.ec-B.sym.txt:jdk.dynalink-B.sym.txt:jdk.editpad-B.sym.txt:jdk.hotspot.agent-B.sym.txt:jdk.httpserver-B.sym.txt:jdk.incubator.httpclient-B.sym.txt:jdk.jartool-B.sym.txt:jdk.javadoc-B.sym.txt:jdk.jcmd-B.sym.txt:jdk.jconsole-B.sym.txt:jdk.jdeps-B.sym.txt:jdk.jdi-B.sym.txt:jdk.jdwp.agent-B.sym.txt:jdk.jfr-B.sym.txt:jdk.jlink-B.sym.txt:jdk.jshell-B.sym.txt:jdk.jsobject-B.sym.txt:jdk.jstatd-B.sym.txt:jdk.localedata-B.sym.txt:jdk.management-B.sym.txt:jdk.management.agent-B.sym.txt:jdk.management.jfr-B.sym.txt:jdk.naming.dns-B.sym.txt:jdk.naming.rmi-B.sym.txt:jdk.net-B.sym.txt:jdk.pack-B.sym.txt:jdk.rmic-B.sym.txt:jdk.scripting.nashorn-B.sym.txt:jdk.sctp-B.sym.txt:jdk.security.auth-B.sym.txt:jdk.security.jgss-B.sym.txt:jdk.unsupported-B.sym.txt:jdk.xml.dom-B.sym.txt:jdk.zipfs-B.sym.txt +platform version C base B files java.base-C.sym.txt:java.compiler-C.sym.txt:java.desktop-C.sym.txt:java.naming-C.sym.txt:java.rmi-C.sym.txt:java.xml-C.sym.txt:jdk.compiler-C.sym.txt:jdk.jfr-C.sym.txt:jdk.jsobject-C.sym.txt:jdk.unsupported-C.sym.txt
--- a/make/langtools/src/classes/build/tools/symbolgenerator/CreateSymbols.java Thu Feb 07 22:15:11 2019 +0100 +++ b/make/langtools/src/classes/build/tools/symbolgenerator/CreateSymbols.java Fri Feb 08 18:58:44 2019 +0100 @@ -1786,9 +1786,13 @@ if (existing.equals(headerDesc)) { headerDesc = existing; existed = true; - } else { - //check if the only difference between the 7 and 8 version is the Profile annotation - //if so, copy it to the pre-8 version, so save space + } + } + + if (!existed) { + //check if the only difference between the 7 and 8 version is the Profile annotation + //if so, copy it to the pre-8 version, so save space + for (ClassHeaderDescription existing : clazzDesc.header) { List<AnnotationDescription> annots = existing.classAnnotations; if (annots != null) { @@ -2610,6 +2614,40 @@ req.requires_flags, ver); } + + @Override + public int hashCode() { + int hash = 7; + hash = 53 * hash + Objects.hashCode(this.moduleName); + hash = 53 * hash + this.flags; + hash = 53 * hash + Objects.hashCode(this.version); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final RequiresDescription other = (RequiresDescription) obj; + if (this.flags != other.flags) { + return false; + } + if (!Objects.equals(this.moduleName, other.moduleName)) { + return false; + } + if (!Objects.equals(this.version, other.version)) { + return false; + } + return true; + } + } static class ProvidesDescription { @@ -2645,6 +2683,35 @@ .collect(Collectors.toList()); return new ProvidesDescription(api, impls); } + + @Override + public int hashCode() { + int hash = 5; + hash = 53 * hash + Objects.hashCode(this.interfaceName); + hash = 53 * hash + Objects.hashCode(this.implNames); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final ProvidesDescription other = (ProvidesDescription) obj; + if (!Objects.equals(this.interfaceName, other.interfaceName)) { + return false; + } + if (!Objects.equals(this.implNames, other.implNames)) { + return false; + } + return true; + } } } @@ -2806,7 +2873,7 @@ if (!Objects.equals(this.nestHost, other.nestHost)) { return false; } - if (!Objects.equals(this.nestMembers, other.nestMembers)) { + if (!listEquals(this.nestMembers, other.nestMembers)) { return false; } return true;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/make/scripts/generate-symbol-data.sh Fri Feb 08 18:58:44 2019 +0100 @@ -0,0 +1,77 @@ +#!/bin/sh +# +# Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle in the LICENSE file that accompanied this code. +# +# This code is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# version 2 for more details (a copy is included in the LICENSE file that +# accompanied this code). +# +# You should have received a copy of the GNU General Public License version +# 2 along with this work; if not, write to the Free Software Foundation, +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. +# +# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# This script allows to easily generate (add or update) "--release N" data for JDK N + 1. +# N must be 11 or greater. This script works on Linux. To create new data, or update existing +# data, it is necessary to: +# - download a binary build of OpenJDK N for Linux, API of which will be recorded. It is strongly recommended +# to use an official build, not a custom build, to avoid any chance of including unofficial changes. +# The binary build should never be a build newer than the GA for JDK N. Install the build. The installation +# directory will be denoted as "${JDK_N_INSTALL}" in the further text. +# - have a checkout the JDK to which the data should be added (or in which the data should be updated). +# The checkout directory will be denoted as "${JDK_CHECKOUT}" in the further text. +# The checkout must not have any local changes that could interfere with the new data. In particular, +# there must be absolutely no changed, new or removed files under the ${JDK_CHECKOUT}/make/data/symbols +# directory. +# - open a terminal program and run these commands: +# cd "${JDK_CHECKOUT}"/make/data/symbols +# bash ../../scripts/generate-symbol-data.sh "${JDK_N_INSTALL}" +# - this command will generate or update data for "--release N" into the ${JDK_CHECKOUT}/make/data/symbols +# directory, updating all registration necessary. If the goal was to update the data, and there are no +# new or changed files in the ${JDK_CHECKOUT}/make/data/symbols directory after running this script, +# there were no relevant changes and no further action is necessary. Note that version for N > 9 are encoded +# using capital letters, i.e. A represents version 10, B represents 11, and so on. The version numbers are in +# the names of the files in the ${JDK_CHECKOUT}/make/data/symbols directory, as well as in +# the ${JDK_CHECKOUT}/make/data/symbols/symbols file. +# - if there are any changed/new files in the ${JDK_CHECKOUT}/make/data/symbols directory after running this script, +# then all the changes in this directory, including any new files, need to be sent for review and eventually pushed. +# The commit message should specify which binary build was installed in the ${JDK_N_INSTALL} directory and also +# include the SCM state that was used to build it, which can be found in ${JDK_N_INSTALL}/release, +# in property "SOURCE". + +if [ "$1x" = "x" ] ; then + echo "Must provide the target JDK as a parameter:" >&2 + echo "$0 <target-jdk>" >&2 + exit 1 +fi; + +if [ ! -f symbols ] ; then + echo "Must run inside the make/data/symbols directory" >&2 + exit 1 +fi; + +if [ "`hg status .`x" != "x" ] ; then + echo "The make/data/symbols directory contains local changes!" >&2 + exit 1 +fi; + +$1/bin/java --add-exports jdk.jdeps/com.sun.tools.classfile=ALL-UNNAMED \ + --add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED \ + --add-exports jdk.compiler/com.sun.tools.javac.jvm=ALL-UNNAMED \ + --add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED \ + --add-modules jdk.jdeps \ + ../../../make/langtools/src/classes/build/tools/symbolgenerator/CreateSymbols.java \ + build-description-incremental symbols include.list
--- a/src/hotspot/cpu/arm/arm.ad Thu Feb 07 22:15:11 2019 +0100 +++ b/src/hotspot/cpu/arm/arm.ad Fri Feb 08 18:58:44 2019 +0100 @@ -352,7 +352,7 @@ // If this does safepoint polling, then do it here if (do_polling() && ra_->C->is_method_compilation()) { // mov_slow here is usually one or two instruction - __ mov_address(Rtemp, (address)os::get_polling_page(), symbolic_Relocation::polling_page_reference); + __ mov_address(Rtemp, (address)os::get_polling_page()); __ relocate(relocInfo::poll_return_type); __ ldr(Rtemp, Address(Rtemp)); }
--- a/src/hotspot/cpu/arm/c1_LIRAssembler_arm.cpp Thu Feb 07 22:15:11 2019 +0100 +++ b/src/hotspot/cpu/arm/c1_LIRAssembler_arm.cpp Fri Feb 08 18:58:44 2019 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -309,7 +309,7 @@ __ remove_frame(initial_frame_size_in_bytes()); // mov_slow here is usually one or two instruction - __ mov_address(Rtemp, os::get_polling_page(), symbolic_Relocation::polling_page_reference); + __ mov_address(Rtemp, os::get_polling_page()); __ relocate(relocInfo::poll_return_type); __ ldr(Rtemp, Address(Rtemp)); __ ret(); @@ -317,7 +317,7 @@ int LIR_Assembler::safepoint_poll(LIR_Opr tmp, CodeEmitInfo* info) { - __ mov_address(Rtemp, os::get_polling_page(), symbolic_Relocation::polling_page_reference); + __ mov_address(Rtemp, os::get_polling_page()); if (info != NULL) { add_debug_info_for_branch(info); }
--- a/src/hotspot/cpu/arm/gc/g1/g1BarrierSetAssembler_arm.cpp Thu Feb 07 22:15:11 2019 +0100 +++ b/src/hotspot/cpu/arm/gc/g1/g1BarrierSetAssembler_arm.cpp Fri Feb 08 18:58:44 2019 +0100 @@ -218,7 +218,7 @@ const Register card_addr = tmp1; assert(sizeof(*ct->byte_map_base()) == sizeof(jbyte), "adjust this code"); - __ mov_address(tmp2, (address)ct->byte_map_base(), symbolic_Relocation::card_table_reference); + __ mov_address(tmp2, (address)ct->byte_map_base()); __ add(card_addr, tmp2, AsmOperand(store_addr, lsr, CardTable::card_shift)); __ ldrb(tmp2, Address(card_addr));
--- a/src/hotspot/cpu/arm/gc/shared/barrierSetAssembler_arm.cpp Thu Feb 07 22:15:11 2019 +0100 +++ b/src/hotspot/cpu/arm/gc/shared/barrierSetAssembler_arm.cpp Fri Feb 08 18:58:44 2019 +0100 @@ -167,7 +167,7 @@ bool load_const = VM_Version::supports_movw(); if (load_const) { - __ mov_address(top_addr, (address)Universe::heap()->top_addr(), symbolic_Relocation::eden_top_reference); + __ mov_address(top_addr, (address)Universe::heap()->top_addr()); } else { __ ldr(top_addr, Address(Rthread, JavaThread::heap_top_addr_offset())); }
--- a/src/hotspot/cpu/arm/gc/shared/cardTableBarrierSetAssembler_arm.cpp Thu Feb 07 22:15:11 2019 +0100 +++ b/src/hotspot/cpu/arm/gc/shared/cardTableBarrierSetAssembler_arm.cpp Fri Feb 08 18:58:44 2019 +0100 @@ -61,7 +61,7 @@ __ sub(count, count, addr); // nb of cards // warning: Rthread has not been preserved - __ mov_address(tmp, (address) ct->byte_map_base(), symbolic_Relocation::card_table_reference); + __ mov_address(tmp, (address) ct->byte_map_base()); __ add(addr,tmp, addr); Register zero = __ zero_register(tmp); @@ -119,7 +119,7 @@ Possible cause is a cache miss (card table base address resides in a rarely accessed area of thread descriptor). */ - __ mov_address(card_table_base, (address)ct->byte_map_base(), symbolic_Relocation::card_table_reference); + __ mov_address(card_table_base, (address)ct->byte_map_base()); } // The 2nd part of the store check.
--- a/src/hotspot/cpu/arm/macroAssembler_arm.hpp Thu Feb 07 22:15:11 2019 +0100 +++ b/src/hotspot/cpu/arm/macroAssembler_arm.hpp Fri Feb 08 18:58:44 2019 +0100 @@ -26,7 +26,6 @@ #define CPU_ARM_MACROASSEMBLER_ARM_HPP #include "code/relocInfo.hpp" -#include "code/relocInfo_ext.hpp" class BiasedLockingCounters; @@ -513,15 +512,13 @@ } } - // Runtime address that may vary from one execution to another. The - // symbolic_reference describes what the address is, allowing - // the address to be resolved in a different execution context. + // Runtime address that may vary from one execution to another. // Warning: do not implement as a PC relative address. - void mov_address(Register rd, address addr, symbolic_Relocation::symbolic_reference t) { + void mov_address(Register rd, address addr) { mov_address(rd, addr, RelocationHolder::none); } - // rspec can be RelocationHolder::none (for ignored symbolic_Relocation). + // rspec can be RelocationHolder::none (for ignored symbolic Relocation). // In that case, the address is absolute and the generated code need // not be relocable. void mov_address(Register rd, address addr, RelocationHolder const& rspec) {
--- a/src/hotspot/cpu/arm/stubGenerator_arm.cpp Thu Feb 07 22:15:11 2019 +0100 +++ b/src/hotspot/cpu/arm/stubGenerator_arm.cpp Fri Feb 08 18:58:44 2019 +0100 @@ -820,9 +820,9 @@ // Note: oop_mask and oop_bits must be updated if the code is saved/reused const address oop_mask = (address) Universe::verify_oop_mask(); const address oop_bits = (address) Universe::verify_oop_bits(); - __ mov_address(tmp1, oop_mask, symbolic_Relocation::oop_mask_reference); + __ mov_address(tmp1, oop_mask); __ andr(tmp2, oop, tmp1); - __ mov_address(tmp1, oop_bits, symbolic_Relocation::oop_bits_reference); + __ mov_address(tmp1, oop_bits); __ cmp(tmp2, tmp1); __ b(error, ne);
--- a/src/hotspot/os/windows/os_windows.cpp Thu Feb 07 22:15:11 2019 +0100 +++ b/src/hotspot/os/windows/os_windows.cpp Fri Feb 08 18:58:44 2019 +0100 @@ -125,6 +125,11 @@ #define __CPU__ i486 #endif +#if INCLUDE_AOT +PVOID topLevelVectoredExceptionHandler = NULL; +LONG WINAPI topLevelVectoredExceptionFilter(struct _EXCEPTION_POINTERS* exceptionInfo); +#endif + // save DLL module handle, used by GetModuleFileName HINSTANCE vm_lib_handle; @@ -143,6 +148,12 @@ if (ForceTimeHighResolution) { timeEndPeriod(1L); } +#if INCLUDE_AOT + if (topLevelVectoredExceptionHandler != NULL) { + RemoveVectoredExceptionHandler(topLevelVectoredExceptionHandler); + topLevelVectoredExceptionHandler = NULL; + } +#endif break; default: break; @@ -2325,6 +2336,25 @@ return true; } +#if INCLUDE_AOT +LONG WINAPI topLevelVectoredExceptionFilter(struct _EXCEPTION_POINTERS* exceptionInfo) { + PEXCEPTION_RECORD exceptionRecord = exceptionInfo->ExceptionRecord; + address addr = (address) exceptionRecord->ExceptionInformation[1]; + address pc = (address) exceptionInfo->ContextRecord->Rip; + + // Handle the case where we get an implicit exception in AOT generated + // code. AOT DLL's loaded are not registered for structured exceptions. + // If the exception occurred in the codeCache or AOT code, pass control + // to our normal exception handler. + CodeBlob* cb = CodeCache::find_blob(pc); + if (cb != NULL) { + return topLevelExceptionFilter(exceptionInfo); + } + + return EXCEPTION_CONTINUE_SEARCH; +} +#endif + //----------------------------------------------------------------------------- LONG WINAPI topLevelExceptionFilter(struct _EXCEPTION_POINTERS* exceptionInfo) { if (InterceptOSException) return EXCEPTION_CONTINUE_SEARCH; @@ -4080,6 +4110,16 @@ // Setup Windows Exceptions +#if INCLUDE_AOT + // If AOT is enabled we need to install a vectored exception handler + // in order to forward implicit exceptions from code in AOT + // generated DLLs. This is necessary since these DLLs are not + // registered for structured exceptions like codecache methods are. + if (UseAOT) { + topLevelVectoredExceptionHandler = AddVectoredExceptionHandler( 1, topLevelVectoredExceptionFilter); + } +#endif + // for debugging float code generation bugs if (ForceFloatExceptions) { #ifndef _WIN64
--- a/src/hotspot/share/aot/aotCodeHeap.cpp Thu Feb 07 22:15:11 2019 +0100 +++ b/src/hotspot/share/aot/aotCodeHeap.cpp Fri Feb 08 18:58:44 2019 +0100 @@ -707,7 +707,9 @@ for (int i = 0; i < methods_cnt; ++i) { int code_id = indexes[i]; AOTCompiledMethod* aot = _code_to_aot[code_id]._aot; - aot->mark_for_deoptimization(false); + if (aot != NULL) { + aot->mark_for_deoptimization(false); + } } } }
--- a/src/hotspot/share/classfile/classFileParser.cpp Thu Feb 07 22:15:11 2019 +0100 +++ b/src/hotspot/share/classfile/classFileParser.cpp Fri Feb 08 18:58:44 2019 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -5851,6 +5851,19 @@ debug_only(ik->verify();) } +void ClassFileParser::update_class_name(Symbol* new_class_name) { + // Decrement the refcount in the old name, since we're clobbering it. + if (_class_name != NULL) { + _class_name->decrement_refcount(); + } + _class_name = new_class_name; + // Increment the refcount of the new name. + // Now the ClassFileParser owns this name and will decrement in + // the destructor. + _class_name->increment_refcount(); +} + + // For an unsafe anonymous class that is in the unnamed package, move it to its host class's // package by prepending its host class's package name to its class name and setting // its _class_name field. @@ -5874,9 +5887,10 @@ strncpy(new_anon_name + host_pkg_len + 1, (char *)_class_name->base(), class_name_len); // Create a symbol and update the anonymous class name. - _class_name = SymbolTable::new_symbol(new_anon_name, + Symbol* new_name = SymbolTable::new_symbol(new_anon_name, (int)host_pkg_len + 1 + class_name_len, CHECK); + update_class_name(new_name); } } @@ -5922,6 +5936,7 @@ TRAPS) : _stream(stream), _requested_name(name), + _class_name(NULL), _loader_data(loader_data), _unsafe_anonymous_host(unsafe_anonymous_host), _cp_patches(cp_patches), @@ -5981,7 +5996,7 @@ _has_vanilla_constructor(false), _max_bootstrap_specifier_index(-1) { - _class_name = name != NULL ? name : vmSymbols::unknown_class_name(); + update_class_name(name != NULL ? name : vmSymbols::unknown_class_name()); assert(THREAD->is_Java_thread(), "invariant"); assert(_loader_data != NULL, "invariant"); @@ -6052,6 +6067,8 @@ // Destructor to clean up ClassFileParser::~ClassFileParser() { + _class_name->decrement_refcount(); + if (_cp != NULL) { MetadataFactory::free_metadata(_loader_data, _cp); } @@ -6211,7 +6228,7 @@ // Update _class_name which could be null previously // to reflect the name in the constant pool - _class_name = class_name_in_cp; + update_class_name(class_name_in_cp); // Don't need to check whether this class name is legal or not. // It has been checked when constant pool is parsed.
--- a/src/hotspot/share/classfile/classFileParser.hpp Thu Feb 07 22:15:11 2019 +0100 +++ b/src/hotspot/share/classfile/classFileParser.hpp Fri Feb 08 18:58:44 2019 +0100 @@ -504,6 +504,8 @@ FieldLayoutInfo* info, TRAPS); + void update_class_name(Symbol* new_name); + public: ClassFileParser(ClassFileStream* stream, Symbol* name,
--- a/src/hotspot/share/code/relocInfo.cpp Thu Feb 07 22:15:11 2019 +0100 +++ b/src/hotspot/share/code/relocInfo.cpp Fri Feb 08 18:58:44 2019 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -92,18 +92,6 @@ assert(format()==old_format, "sanity check"); } -nmethod* RelocIterator::code_as_nmethod() const { - return _code->as_nmethod(); -} - -void relocInfo::set_format(int f) { - int old_offset = addr_offset(); - assert((f & format_mask) == f, "wrong format"); - _value = (_value & ~(format_mask << offset_width)) | (f << offset_width); - assert(addr_offset()==old_offset, "sanity check"); -} - - void relocInfo::change_reloc_info_for_address(RelocIterator *itr, address pc, relocType old_type, relocType new_type) { bool found = false; while (itr->next() && !found) { @@ -117,11 +105,6 @@ } -void relocInfo::remove_reloc_info_for_address(RelocIterator *itr, address pc, relocType old_type) { - change_reloc_info_for_address(itr, pc, old_type, none); -} - - // ---------------------------------------------------------------------------------------------------- // Implementation of RelocIterator @@ -179,14 +162,6 @@ set_limits(begin, limit); } - -enum { indexCardSize = 128 }; -struct RelocIndexEntry { - jint addr_offset; // offset from header_end of an addr() - jint reloc_offset; // offset from header_end of a relocInfo (prefix) -}; - - bool RelocIterator::addr_in_const() const { const int n = CodeBuffer::SECT_CONSTS; return section_start(n) <= addr() && addr() < section_end(n); @@ -215,12 +190,6 @@ } -void RelocIterator::set_limit(address limit) { - address code_end = (address)code() + code()->size(); - assert(limit == NULL || limit <= code_end, "in bounds"); - _limit = limit; -} - // All the strange bit-encodings are in here. // The idea is to encode relocation data which are small integers // very efficiently (a single extra halfword). Larger chunks of @@ -622,14 +591,6 @@ } } - -void metadata_Relocation::verify_metadata_relocation() { - if (!metadata_is_immediate()) { - // get the metadata from the pool, and re-insert it into the instruction: - verify_value(value()); - } -} - address virtual_call_Relocation::cached_value() { assert(_cached_value != NULL && _cached_value < addr(), "must precede ic_call"); return _cached_value;
--- a/src/hotspot/share/code/relocInfo.hpp Thu Feb 07 22:15:11 2019 +0100 +++ b/src/hotspot/share/code/relocInfo.hpp Fri Feb 08 18:58:44 2019 +0100 @@ -345,7 +345,6 @@ static int offset_limit() { return (1 << offset_width) * offset_unit; } void set_type(relocType type); - void set_format(int format); void remove() { set_type(none); } @@ -422,7 +421,6 @@ // (since code is dynamically patched, we also need to dynamically update the relocation info) // Both methods takes old_type, so it is able to performe sanity checks on the information removed. static void change_reloc_info_for_address(RelocIterator *itr, address pc, relocType old_type, relocType new_type); - static void remove_reloc_info_for_address(RelocIterator *itr, address pc, relocType old_type); // Machine dependent stuff #include CPU_HEADER(relocInfo) @@ -531,7 +529,6 @@ short _databuf; // spare buffer for compressed data short* _data; // pointer to the relocation's data short _datalen; // number of halfwords in _data - char _format; // position within the instruction // Base addresses needed to compute targets of section_word_type relocs. address _section_start[SECT_LIMIT]; @@ -588,23 +585,18 @@ return false; } - if (relocInfo::have_format) _format = current()->format(); return true; } // accessors address limit() const { return _limit; } - void set_limit(address x); relocType type() const { return current()->type(); } int format() const { return (relocInfo::have_format) ? current()->format() : 0; } address addr() const { return _addr; } CompiledMethod* code() const { return _code; } - nmethod* code_as_nmethod() const; short* data() const { return _data; } int datalen() const { return _datalen; } bool has_current() const { return _datalen >= 0; } - - void set_addr(address addr) { _addr = addr; } bool addr_in_const() const; address section_start(int n) const { @@ -793,7 +785,6 @@ // accessors which only make sense for a bound Relocation address addr() const { return binding()->addr(); } CompiledMethod* code() const { return binding()->code(); } - nmethod* code_as_nmethod() const { return binding()->code_as_nmethod(); } bool addr_in_const() const { return binding()->addr_in_const(); } protected: short* data() const { return binding()->data(); } @@ -1002,8 +993,6 @@ void fix_metadata_relocation(); // reasserts metadata value - void verify_metadata_relocation(); - address value() { return (address) *metadata_addr(); } bool metadata_is_immediate() { return metadata_index() == 0; }
--- a/src/hotspot/share/code/relocInfo_ext.cpp Thu Feb 07 22:15:11 2019 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,88 +0,0 @@ -/* - * Copyright (c) 2015, 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. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - * - */ - -#include "precompiled.hpp" -#include "code/codeCache.hpp" -#include "code/relocInfo.hpp" -#include "code/relocInfo_ext.hpp" -#include "gc/shared/cardTable.hpp" -#include "gc/shared/cardTableBarrierSet.hpp" -#include "gc/shared/collectedHeap.hpp" -#include "memory/universe.hpp" -#include "runtime/os.hpp" -#include "utilities/debug.hpp" -#ifdef COMPILER1 -#include "c1/c1_globals.hpp" -#endif - -address symbolic_Relocation::symbolic_value(symbolic_Relocation::symbolic_reference t) { - if (Universe::heap() == NULL) { - // the symbolic values are not needed so early - // (and most of them lead to errors if asked too early) - return NULL; - } - switch(t) { - case symbolic_Relocation::polling_page_reference: { - return os::get_polling_page(); - } - case symbolic_Relocation::eden_top_reference: { - if (!Universe::heap()->supports_inline_contig_alloc()) { - return NULL; - } - return (address)Universe::heap()->top_addr(); - } - case symbolic_Relocation::heap_end_reference: { - if (!Universe::heap()->supports_inline_contig_alloc()) { - return NULL; - } - return (address)Universe::heap()->end_addr(); - } - case symbolic_Relocation::card_table_reference: { - BarrierSet* bs = BarrierSet::barrier_set(); - CardTableBarrierSet* ctbs = barrier_set_cast<CardTableBarrierSet>(bs); - CardTable* ct = ctbs->card_table(); - return (address)ct->byte_map_base(); - } - case symbolic_Relocation::mark_bits_reference: { - return (address)Universe::verify_mark_bits(); - } - case symbolic_Relocation::mark_mask_reference: { - return (address)Universe::verify_mark_mask(); - } - case symbolic_Relocation::oop_bits_reference: { - return (address)Universe::verify_oop_bits(); - } - case symbolic_Relocation::oop_mask_reference: { - return (address)Universe::verify_oop_mask(); - } - case symbolic_Relocation::debug_string_reference: { - return (address)"<Lost debug string>"; - } - default: { - // missing declaration - ShouldNotReachHere(); - return NULL; - } - } -}
--- a/src/hotspot/share/code/relocInfo_ext.hpp Thu Feb 07 22:15:11 2019 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,61 +0,0 @@ -/* - * Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - * - */ - -#ifndef SHARE_CODE_RELOCINFO_EXT_HPP -#define SHARE_CODE_RELOCINFO_EXT_HPP - -// symbolic_Relocation allows to anotate some addresses in the generated code. -// -// This class was initially defined using the last unused relocType. The -// new version tries to limit the impact on open source code changes. -// -// Without compiled code support, symbolic_Relocation need not be a real -// relocation. To avoid using the last unused relocType, the -// symbolic_Relocation::spec(<any symbolic type>) has been replaced -// by additional methods using directly the symbolic type. -// -// Note: the order of the arguments in some methods had to reversed -// to avoid confusion between the relocType enum and the -// symbolic_reference enum. -class symbolic_Relocation : AllStatic { - - public: - enum symbolic_reference { - card_table_reference, - eden_top_reference, - heap_end_reference, - polling_page_reference, - mark_bits_reference, - mark_mask_reference, - oop_bits_reference, - oop_mask_reference, - debug_string_reference, - last_symbolic_reference - }; - - // get the new value for a given symbolic type - static address symbolic_value(symbolic_reference t); -}; - -#endif // SHARE_CODE_RELOCINFO_EXT_HPP
--- a/src/hotspot/share/gc/g1/collectionSetChooser.cpp Thu Feb 07 22:15:11 2019 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,302 +0,0 @@ -/* - * Copyright (c) 2001, 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. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - * - */ - -#include "precompiled.hpp" -#include "gc/g1/collectionSetChooser.hpp" -#include "gc/g1/g1CollectedHeap.inline.hpp" -#include "gc/g1/heapRegionRemSet.hpp" -#include "gc/shared/space.inline.hpp" -#include "runtime/atomic.hpp" - -// Even though we don't use the GC efficiency in our heuristics as -// much as we used to, we still order according to GC efficiency. This -// will cause regions with a lot of live objects and large RSets to -// end up at the end of the array. Given that we might skip collecting -// the last few old regions, if after a few mixed GCs the remaining -// have reclaimable bytes under a certain threshold, the hope is that -// the ones we'll skip are ones with both large RSets and a lot of -// live objects, not the ones with just a lot of live objects if we -// ordered according to the amount of reclaimable bytes per region. -static int order_regions(HeapRegion* hr1, HeapRegion* hr2) { - if (hr1 == NULL) { - if (hr2 == NULL) { - return 0; - } else { - return 1; - } - } else if (hr2 == NULL) { - return -1; - } - - double gc_eff1 = hr1->gc_efficiency(); - double gc_eff2 = hr2->gc_efficiency(); - if (gc_eff1 > gc_eff2) { - return -1; - } if (gc_eff1 < gc_eff2) { - return 1; - } else { - return 0; - } -} - -static int order_regions(HeapRegion** hr1p, HeapRegion** hr2p) { - return order_regions(*hr1p, *hr2p); -} - -CollectionSetChooser::CollectionSetChooser() : - // The line below is the worst bit of C++ hackery I've ever written - // (Detlefs, 11/23). You should think of it as equivalent to - // "_regions(100, true)": initialize the growable array and inform it - // that it should allocate its elem array(s) on the C heap. - // - // The first argument, however, is actually a comma expression - // (set_allocation_type(this, C_HEAP), 100). The purpose of the - // set_allocation_type() call is to replace the default allocation - // type for embedded objects STACK_OR_EMBEDDED with C_HEAP. It will - // allow to pass the assert in GenericGrowableArray() which checks - // that a growable array object must be on C heap if elements are. - // - // Note: containing object is allocated on C heap since it is CHeapObj. - // - _regions((ResourceObj::set_allocation_type((address) &_regions, - ResourceObj::C_HEAP), - 100), true /* C_Heap */), - _front(0), _end(0), _first_par_unreserved_idx(0), - _region_live_threshold_bytes(0), _remaining_reclaimable_bytes(0) { - _region_live_threshold_bytes = mixed_gc_live_threshold_bytes(); -} - -#ifndef PRODUCT -void CollectionSetChooser::verify() { - guarantee(_end <= regions_length(), "_end: %u regions length: %u", _end, regions_length()); - guarantee(_front <= _end, "_front: %u _end: %u", _front, _end); - uint index = 0; - size_t sum_of_reclaimable_bytes = 0; - while (index < _front) { - guarantee(regions_at(index) == NULL, - "all entries before _front should be NULL"); - index += 1; - } - HeapRegion *prev = NULL; - while (index < _end) { - HeapRegion *curr = regions_at(index++); - guarantee(curr != NULL, "Regions in _regions array cannot be NULL"); - guarantee(!curr->is_young(), "should not be young!"); - guarantee(!curr->is_pinned(), - "Pinned region should not be in collection set (index %u)", curr->hrm_index()); - if (prev != NULL) { - guarantee(order_regions(prev, curr) != 1, - "GC eff prev: %1.4f GC eff curr: %1.4f", - prev->gc_efficiency(), curr->gc_efficiency()); - } - sum_of_reclaimable_bytes += curr->reclaimable_bytes(); - prev = curr; - } - guarantee(sum_of_reclaimable_bytes == _remaining_reclaimable_bytes, - "reclaimable bytes inconsistent, " - "remaining: " SIZE_FORMAT " sum: " SIZE_FORMAT, - _remaining_reclaimable_bytes, sum_of_reclaimable_bytes); -} -#endif // !PRODUCT - -void CollectionSetChooser::sort_regions() { - // First trim any unused portion of the top in the parallel case. - if (_first_par_unreserved_idx > 0) { - assert(_first_par_unreserved_idx <= regions_length(), - "Or we didn't reserved enough length"); - regions_trunc_to(_first_par_unreserved_idx); - } - _regions.sort(order_regions); - assert(_end <= regions_length(), "Requirement"); -#ifdef ASSERT - for (uint i = 0; i < _end; i++) { - assert(regions_at(i) != NULL, "Should be true by sorting!"); - } -#endif // ASSERT - if (log_is_enabled(Trace, gc, liveness)) { - G1PrintRegionLivenessInfoClosure cl("Post-Sorting"); - for (uint i = 0; i < _end; ++i) { - HeapRegion* r = regions_at(i); - cl.do_heap_region(r); - } - } - verify(); -} - -void CollectionSetChooser::add_region(HeapRegion* hr) { - assert(!hr->is_pinned(), - "Pinned region shouldn't be added to the collection set (index %u)", hr->hrm_index()); - assert(hr->is_old(), "should be old but is %s", hr->get_type_str()); - assert(hr->rem_set()->is_complete(), - "Trying to add region %u to the collection set with incomplete remembered set", hr->hrm_index()); - _regions.append(hr); - _end++; - _remaining_reclaimable_bytes += hr->reclaimable_bytes(); - hr->calc_gc_efficiency(); -} - -void CollectionSetChooser::push(HeapRegion* hr) { - assert(hr != NULL, "Can't put back a NULL region"); - assert(_front >= 1, "Too many regions have been put back"); - _front--; - regions_at_put(_front, hr); - _remaining_reclaimable_bytes += hr->reclaimable_bytes(); -} - -void CollectionSetChooser::prepare_for_par_region_addition(uint n_threads, - uint n_regions, - uint chunk_size) { - _first_par_unreserved_idx = 0; - uint max_waste = n_threads * chunk_size; - // it should be aligned with respect to chunk_size - uint aligned_n_regions = (n_regions + chunk_size - 1) / chunk_size * chunk_size; - assert(aligned_n_regions % chunk_size == 0, "should be aligned"); - regions_at_put_grow(aligned_n_regions + max_waste - 1, NULL); -} - -uint CollectionSetChooser::claim_array_chunk(uint chunk_size) { - uint res = (uint) Atomic::add((jint) chunk_size, - (volatile jint*) &_first_par_unreserved_idx); - assert(regions_length() > res + chunk_size - 1, - "Should already have been expanded"); - return res - chunk_size; -} - -void CollectionSetChooser::set_region(uint index, HeapRegion* hr) { - assert(regions_at(index) == NULL, "precondition"); - assert(hr->is_old(), "should be old but is %s", hr->get_type_str()); - regions_at_put(index, hr); - hr->calc_gc_efficiency(); -} - -void CollectionSetChooser::update_totals(uint region_num, - size_t reclaimable_bytes) { - // Only take the lock if we actually need to update the totals. - if (region_num > 0) { - assert(reclaimable_bytes > 0, "invariant"); - // We could have just used atomics instead of taking the - // lock. However, we currently don't have an atomic add for size_t. - MutexLockerEx x(ParGCRareEvent_lock, Mutex::_no_safepoint_check_flag); - _end += region_num; - _remaining_reclaimable_bytes += reclaimable_bytes; - } else { - assert(reclaimable_bytes == 0, "invariant"); - } -} - -void CollectionSetChooser::iterate(HeapRegionClosure* cl) { - for (uint i = _front; i < _end; i++) { - HeapRegion* r = regions_at(i); - if (cl->do_heap_region(r)) { - cl->set_incomplete(); - break; - } - } -} - -void CollectionSetChooser::clear() { - _regions.clear(); - _front = 0; - _end = 0; - _remaining_reclaimable_bytes = 0; -} - -class ParKnownGarbageHRClosure: public HeapRegionClosure { - G1CollectedHeap* _g1h; - CSetChooserParUpdater _cset_updater; - -public: - ParKnownGarbageHRClosure(CollectionSetChooser* hrSorted, - uint chunk_size) : - _g1h(G1CollectedHeap::heap()), - _cset_updater(hrSorted, true /* parallel */, chunk_size) { } - - bool do_heap_region(HeapRegion* r) { - // We will skip any region that's currently used as an old GC - // alloc region (we should not consider those for collection - // before we fill them up). - if (_cset_updater.should_add(r) && !_g1h->is_old_gc_alloc_region(r)) { - _cset_updater.add_region(r); - } else if (r->is_old()) { - // Keep remembered sets for humongous regions, otherwise clean out remembered - // sets for old regions. - r->rem_set()->clear(true /* only_cardset */); - } else { - assert(r->is_archive() || !r->is_old() || !r->rem_set()->is_tracked(), - "Missed to clear unused remembered set of region %u (%s) that is %s", - r->hrm_index(), r->get_type_str(), r->rem_set()->get_state_str()); - } - return false; - } -}; - -class ParKnownGarbageTask: public AbstractGangTask { - CollectionSetChooser* _hrSorted; - uint _chunk_size; - G1CollectedHeap* _g1h; - HeapRegionClaimer _hrclaimer; - -public: - ParKnownGarbageTask(CollectionSetChooser* hrSorted, uint chunk_size, uint n_workers) : - AbstractGangTask("ParKnownGarbageTask"), - _hrSorted(hrSorted), _chunk_size(chunk_size), - _g1h(G1CollectedHeap::heap()), _hrclaimer(n_workers) {} - - void work(uint worker_id) { - ParKnownGarbageHRClosure par_known_garbage_cl(_hrSorted, _chunk_size); - _g1h->heap_region_par_iterate_from_worker_offset(&par_known_garbage_cl, &_hrclaimer, worker_id); - } -}; - -uint CollectionSetChooser::calculate_parallel_work_chunk_size(uint n_workers, uint n_regions) const { - assert(n_workers > 0, "Active gc workers should be greater than 0"); - const uint overpartition_factor = 4; - const uint min_chunk_size = MAX2(n_regions / n_workers, 1U); - return MAX2(n_regions / (n_workers * overpartition_factor), min_chunk_size); -} - -bool CollectionSetChooser::region_occupancy_low_enough_for_evac(size_t live_bytes) { - return live_bytes < mixed_gc_live_threshold_bytes(); -} - -bool CollectionSetChooser::should_add(HeapRegion* hr) const { - return !hr->is_young() && - !hr->is_pinned() && - region_occupancy_low_enough_for_evac(hr->live_bytes()) && - hr->rem_set()->is_complete(); -} - -void CollectionSetChooser::rebuild(WorkGang* workers, uint n_regions) { - clear(); - - uint n_workers = workers->active_workers(); - - uint chunk_size = calculate_parallel_work_chunk_size(n_workers, n_regions); - prepare_for_par_region_addition(n_workers, n_regions, chunk_size); - - ParKnownGarbageTask par_known_garbage_task(this, chunk_size, n_workers); - workers->run_task(&par_known_garbage_task); - - sort_regions(); -}
--- a/src/hotspot/share/gc/g1/collectionSetChooser.hpp Thu Feb 07 22:15:11 2019 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,202 +0,0 @@ -/* - * Copyright (c) 2001, 2019, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - * - */ - -#ifndef SHARE_GC_G1_COLLECTIONSETCHOOSER_HPP -#define SHARE_GC_G1_COLLECTIONSETCHOOSER_HPP - -#include "gc/g1/heapRegion.hpp" -#include "utilities/growableArray.hpp" - -class CollectionSetChooser: public CHeapObj<mtGC> { - - GrowableArray<HeapRegion*> _regions; - - // Unfortunately, GrowableArray uses ints for length and indexes. To - // avoid excessive casting in the rest of the class the following - // wrapper methods are provided that use uints. - - uint regions_length() { return (uint) _regions.length(); } - HeapRegion* regions_at(uint i) { return _regions.at((int) i); } - void regions_at_put(uint i, HeapRegion* hr) { - _regions.at_put((int) i, hr); - } - void regions_at_put_grow(uint i, HeapRegion* hr) { - _regions.at_put_grow((int) i, hr); - } - void regions_trunc_to(uint i) { _regions.trunc_to((uint) i); } - - // The index of the next candidate old region to be considered for - // addition to the CSet. - uint _front; - - // The index of the last candidate old region - uint _end; - - // Keeps track of the start of the next array chunk to be claimed by - // parallel GC workers. - uint _first_par_unreserved_idx; - - // If a region has more live bytes than this threshold, it will not - // be added to the CSet chooser and will not be a candidate for - // collection. - size_t _region_live_threshold_bytes; - - // The sum of reclaimable bytes over all the regions in the CSet chooser. - size_t _remaining_reclaimable_bytes; - - // Calculate and return chunk size (in number of regions) for parallel - // addition of regions - uint calculate_parallel_work_chunk_size(uint n_workers, uint n_regions) const; -public: - - // Return the current candidate region to be considered for - // collection without removing it from the CSet chooser. - HeapRegion* peek() { - HeapRegion* res = NULL; - if (_front < _end) { - res = regions_at(_front); - assert(res != NULL, "Unexpected NULL hr in _regions at index %u", _front); - } - return res; - } - - // Remove the given region from the CSet chooser and move to the - // next one. - HeapRegion* pop() { - HeapRegion* hr = regions_at(_front); - assert(hr != NULL, "pre-condition"); - assert(_front < _end, "pre-condition"); - regions_at_put(_front, NULL); - assert(hr->reclaimable_bytes() <= _remaining_reclaimable_bytes, - "remaining reclaimable bytes inconsistent " - "from region: " SIZE_FORMAT " remaining: " SIZE_FORMAT, - hr->reclaimable_bytes(), _remaining_reclaimable_bytes); - _remaining_reclaimable_bytes -= hr->reclaimable_bytes(); - _front += 1; - return hr; - } - - void push(HeapRegion* hr); - - CollectionSetChooser(); - - static size_t mixed_gc_live_threshold_bytes() { - return HeapRegion::GrainBytes * (size_t) G1MixedGCLiveThresholdPercent / 100; - } - - static bool region_occupancy_low_enough_for_evac(size_t live_bytes); - - void sort_regions(); - - // Determine whether to add the given region to the CSet chooser or - // not. Currently, we skip pinned regions and regions whose live - // bytes are over the threshold. Humongous regions may be reclaimed during cleanup. - // Regions also need a complete remembered set to be a candidate. - bool should_add(HeapRegion* hr) const; - - // Returns the number candidate old regions added - uint length() { return _end; } - - // Serial version. - void add_region(HeapRegion *hr); - - // Must be called before calls to claim_array_chunk(). - // n_regions is the number of regions, chunk_size the chunk size. - void prepare_for_par_region_addition(uint n_threads, uint n_regions, uint chunk_size); - // Returns the first index in a contiguous chunk of chunk_size indexes - // that the calling thread has reserved. These must be set by the - // calling thread using set_region() (to NULL if necessary). - uint claim_array_chunk(uint chunk_size); - // Set the marked array entry at index to hr. Careful to claim the index - // first if in parallel. - void set_region(uint index, HeapRegion* hr); - // Atomically increment the number of added regions by region_num - // and the amount of reclaimable bytes by reclaimable_bytes. - void update_totals(uint region_num, size_t reclaimable_bytes); - - // Iterate over all collection set candidate regions. - void iterate(HeapRegionClosure* cl); - - void clear(); - - void rebuild(WorkGang* workers, uint n_regions); - - // Return the number of candidate regions that remain to be collected. - uint remaining_regions() { return _end - _front; } - - // Determine whether the CSet chooser has more candidate regions or not. - bool is_empty() { return remaining_regions() == 0; } - - // Return the reclaimable bytes that remain to be collected on - // all the candidate regions in the CSet chooser. - size_t remaining_reclaimable_bytes() { return _remaining_reclaimable_bytes; } - - // Returns true if the used portion of "_regions" is properly - // sorted, otherwise asserts false. - void verify() PRODUCT_RETURN; -}; - -class CSetChooserParUpdater : public StackObj { -private: - CollectionSetChooser* _chooser; - bool _parallel; - uint _chunk_size; - uint _cur_chunk_idx; - uint _cur_chunk_end; - uint _regions_added; - size_t _reclaimable_bytes_added; - -public: - CSetChooserParUpdater(CollectionSetChooser* chooser, - bool parallel, uint chunk_size) : - _chooser(chooser), _parallel(parallel), _chunk_size(chunk_size), - _cur_chunk_idx(0), _cur_chunk_end(0), - _regions_added(0), _reclaimable_bytes_added(0) { } - - ~CSetChooserParUpdater() { - if (_parallel && _regions_added > 0) { - _chooser->update_totals(_regions_added, _reclaimable_bytes_added); - } - } - - void add_region(HeapRegion* hr) { - if (_parallel) { - if (_cur_chunk_idx == _cur_chunk_end) { - _cur_chunk_idx = _chooser->claim_array_chunk(_chunk_size); - _cur_chunk_end = _cur_chunk_idx + _chunk_size; - } - assert(_cur_chunk_idx < _cur_chunk_end, "invariant"); - _chooser->set_region(_cur_chunk_idx, hr); - _cur_chunk_idx += 1; - } else { - _chooser->add_region(hr); - } - _regions_added += 1; - _reclaimable_bytes_added += hr->reclaimable_bytes(); - } - - bool should_add(HeapRegion* hr) { return _chooser->should_add(hr); } -}; - -#endif // SHARE_GC_G1_COLLECTIONSETCHOOSER_HPP
--- a/src/hotspot/share/gc/g1/g1CollectionSet.cpp Thu Feb 07 22:15:11 2019 +0100 +++ b/src/hotspot/share/gc/g1/g1CollectionSet.cpp Fri Feb 08 18:58:44 2019 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,6 +25,7 @@ #include "precompiled.hpp" #include "gc/g1/g1CollectedHeap.inline.hpp" #include "gc/g1/g1CollectionSet.hpp" +#include "gc/g1/g1CollectionSetCandidates.hpp" #include "gc/g1/g1CollectorState.hpp" #include "gc/g1/g1ParScanThreadState.hpp" #include "gc/g1/g1Policy.hpp" @@ -44,10 +45,6 @@ return _policy->phase_times(); } -CollectionSetChooser* G1CollectionSet::cset_chooser() { - return _cset_chooser; -} - double G1CollectionSet::predict_region_elapsed_time_ms(HeapRegion* hr) { return _policy->predict_region_elapsed_time_ms(hr, collector_state()->in_young_only_phase()); } @@ -55,7 +52,7 @@ G1CollectionSet::G1CollectionSet(G1CollectedHeap* g1h, G1Policy* policy) : _g1h(g1h), _policy(policy), - _cset_chooser(new CollectionSetChooser()), + _candidates(NULL), _eden_region_length(0), _survivor_region_length(0), _old_region_length(0), @@ -80,7 +77,7 @@ FREE_C_HEAP_ARRAY(uint, _collection_set_regions); } free_optional_regions(); - delete _cset_chooser; + clear_candidates(); } void G1CollectionSet::init_region_lengths(uint eden_cset_region_length, @@ -120,6 +117,11 @@ } } +void G1CollectionSet::clear_candidates() { + delete _candidates; + _candidates = NULL; +} + void G1CollectionSet::set_recorded_rs_lengths(size_t rs_lengths) { _recorded_rs_lengths = rs_lengths; } @@ -439,14 +441,14 @@ } void G1CollectionSet::add_as_old(HeapRegion* hr) { - cset_chooser()->pop(); // already have region via peek() + candidates()->pop_front(); // already have region via peek() _g1h->old_set_remove(hr); add_old_region(hr); } void G1CollectionSet::add_as_optional(HeapRegion* hr) { assert(_optional_regions != NULL, "Must not be called before array is allocated"); - cset_chooser()->pop(); // already have region via peek() + candidates()->pop_front(); // already have region via peek() _g1h->old_set_remove(hr); add_optional_region(hr); } @@ -480,7 +482,7 @@ uint expensive_region_num = 0; if (collector_state()->in_mixed_phase()) { - cset_chooser()->verify(); + candidates()->verify(); const uint min_old_cset_length = _policy->calc_min_old_cset_length(); const uint max_old_cset_length = MAX2(min_old_cset_length, _policy->calc_max_old_cset_length()); bool check_time_remaining = _policy->adaptive_young_list_length(); @@ -490,7 +492,7 @@ "time remaining %1.2fms, optional threshold %1.2fms", min_old_cset_length, max_old_cset_length, time_remaining_ms, optional_threshold_ms); - HeapRegion* hr = cset_chooser()->peek(); + HeapRegion* hr = candidates()->peek_front(); while (hr != NULL) { if (old_region_length() + optional_region_length() >= max_old_cset_length) { // Added maximum number of old regions to the CSet. @@ -502,7 +504,7 @@ // Stop adding regions if the remaining reclaimable space is // not above G1HeapWastePercent. - size_t reclaimable_bytes = cset_chooser()->remaining_reclaimable_bytes(); + size_t reclaimable_bytes = candidates()->remaining_reclaimable_bytes(); double reclaimable_percent = _policy->reclaimable_bytes_percent(reclaimable_bytes); double threshold = (double) G1HeapWastePercent; if (reclaimable_percent <= threshold) { @@ -551,13 +553,13 @@ break; } } - hr = cset_chooser()->peek(); + hr = candidates()->peek_front(); } if (hr == NULL) { log_debug(gc, ergo, cset)("Finish adding old regions to CSet (candidate old regions not available)"); } - cset_chooser()->verify(); + candidates()->verify(); } stop_incremental_building(); @@ -630,15 +632,15 @@ G1OptionalCSet::~G1OptionalCSet() { G1CollectedHeap* g1h = G1CollectedHeap::heap(); while (!is_empty()) { - // We want to return regions not evacuated to the - // chooser in reverse order to maintain the old order. + // We want to return regions not evacuated to the collection set candidates + // in reverse order to maintain the old order. HeapRegion* hr = _cset->remove_last_optional_region(); assert(hr != NULL, "Should be valid region left"); _pset->record_unused_optional_region(hr); g1h->old_set_add(hr); g1h->clear_in_cset(hr); hr->set_index_in_opt_cset(InvalidCSetIndex); - _cset->cset_chooser()->push(hr); + _cset->candidates()->push_front(hr); } _cset->free_optional_regions(); }
--- a/src/hotspot/share/gc/g1/g1CollectionSet.hpp Thu Feb 07 22:15:11 2019 +0100 +++ b/src/hotspot/share/gc/g1/g1CollectionSet.hpp Fri Feb 08 18:58:44 2019 +0100 @@ -25,23 +25,25 @@ #ifndef SHARE_GC_G1_G1COLLECTIONSET_HPP #define SHARE_GC_G1_G1COLLECTIONSET_HPP -#include "gc/g1/collectionSetChooser.hpp" #include "utilities/debug.hpp" #include "utilities/globalDefinitions.hpp" class G1CollectedHeap; +class G1CollectionSetCandidates; class G1CollectorState; class G1GCPhaseTimes; class G1ParScanThreadStateSet; class G1Policy; class G1SurvivorRegions; class HeapRegion; +class HeapRegionClosure; class G1CollectionSet { G1CollectedHeap* _g1h; G1Policy* _policy; - CollectionSetChooser* _cset_chooser; + // All old gen collection set candidate regions for the current mixed gc phase. + G1CollectionSetCandidates* _candidates; uint _eden_region_length; uint _survivor_region_length; @@ -128,7 +130,13 @@ void initialize_optional(uint max_length); void free_optional_regions(); - CollectionSetChooser* cset_chooser(); + void clear_candidates(); + + void set_candidates(G1CollectionSetCandidates* candidates) { + assert(_candidates == NULL, "Trying to replace collection set candidates."); + _candidates = candidates; + } + G1CollectionSetCandidates* candidates() { return _candidates; } void init_region_lengths(uint eden_cset_region_length, uint survivor_cset_region_length); @@ -253,8 +261,8 @@ _current_limit(0), _prepare_failed(false), _evacuation_failed(false) { } - // The destructor returns regions to the cset-chooser and - // frees the optional structure in the cset. + // The destructor returns regions to the collection set candidates set and + // frees the optional structure in the collection set. ~G1OptionalCSet(); uint current_index() { return _current_index; }
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hotspot/share/gc/g1/g1CollectionSetCandidates.cpp Fri Feb 08 18:58:44 2019 +0100 @@ -0,0 +1,89 @@ +/* + * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +#include "precompiled.hpp" +#include "gc/g1/g1CollectionSetCandidates.hpp" +#include "gc/g1/g1CollectionSetChooser.hpp" +#include "gc/g1/heapRegion.inline.hpp" + +HeapRegion* G1CollectionSetCandidates::pop_front() { + assert(_front_idx < _num_regions, "pre-condition"); + HeapRegion* hr = _regions[_front_idx]; + assert(hr != NULL, "pre-condition"); + _regions[_front_idx] = NULL; + assert(hr->reclaimable_bytes() <= _remaining_reclaimable_bytes, + "Remaining reclaimable bytes inconsistent " + "from region: " SIZE_FORMAT " remaining: " SIZE_FORMAT, + hr->reclaimable_bytes(), _remaining_reclaimable_bytes); + _remaining_reclaimable_bytes -= hr->reclaimable_bytes(); + _front_idx++; + return hr; +} + +void G1CollectionSetCandidates::push_front(HeapRegion* hr) { + assert(hr != NULL, "Can't put back a NULL region"); + assert(_front_idx >= 1, "Too many regions have been put back."); + _front_idx--; + _regions[_front_idx] = hr; + _remaining_reclaimable_bytes += hr->reclaimable_bytes(); +} + +void G1CollectionSetCandidates::iterate(HeapRegionClosure* cl) { + for (uint i = _front_idx; i < _num_regions; i++) { + HeapRegion* r = _regions[i]; + if (cl->do_heap_region(r)) { + cl->set_incomplete(); + break; + } + } +} + +#ifndef PRODUCT +void G1CollectionSetCandidates::verify() const { + guarantee(_front_idx <= _num_regions, "Index: %u Num_regions: %u", _front_idx, _num_regions); + uint idx = 0; + size_t sum_of_reclaimable_bytes = 0; + while (idx < _front_idx) { + guarantee(_regions[idx] == NULL, "All entries before _front_idx %u should be NULL, but %u is not", + _front_idx, idx); + idx++; + } + HeapRegion *prev = NULL; + for (; idx < _num_regions; idx++) { + HeapRegion *cur = _regions[idx]; + guarantee(cur != NULL, "Regions after _front_idx %u cannot be NULL but %u is", _front_idx, idx); + guarantee(G1CollectionSetChooser::should_add(cur), "Region %u should be eligible for addition.", cur->hrm_index()); + if (prev != NULL) { + guarantee(prev->gc_efficiency() >= cur->gc_efficiency(), + "GC efficiency for region %u: %1.4f smaller than for region %u: %1.4f", + prev->hrm_index(), prev->gc_efficiency(), cur->hrm_index(), cur->gc_efficiency()); + } + sum_of_reclaimable_bytes += cur->reclaimable_bytes(); + prev = cur; + } + guarantee(sum_of_reclaimable_bytes == _remaining_reclaimable_bytes, + "Inconsistent remaining_reclaimable bytes, remaining " SIZE_FORMAT " calculated " SIZE_FORMAT, + _remaining_reclaimable_bytes, sum_of_reclaimable_bytes); +} +#endif // !PRODUCT
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hotspot/share/gc/g1/g1CollectionSetCandidates.hpp Fri Feb 08 18:58:44 2019 +0100 @@ -0,0 +1,99 @@ +/* + * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +#ifndef SHARE_GC_G1_G1COLLECTIONSETCANDIDATES_HPP +#define SHARE_GC_G1_G1COLLECTIONSETCANDIDATES_HPP + +#include "gc/g1/g1CollectionSetCandidates.hpp" +#include "gc/shared/workgroup.hpp" +#include "memory/allocation.hpp" +#include "runtime/globals.hpp" + +class HeapRegion; +class HeapRegionClosure; + +// Set of collection set candidates, i.e. all old gen regions we consider worth +// collecting in the remainder of the current mixed phase. Regions are sorted by decreasing +// gc efficiency. +// Maintains a cursor into the list that specifies the next collection set candidate +// to put into the current collection set. +class G1CollectionSetCandidates : public CHeapObj<mtGC> { + HeapRegion** _regions; + uint _num_regions; // Total number of regions in the collection set candidate set. + + // The sum of bytes that can be reclaimed in the remaining set of collection + // set candidates. + size_t _remaining_reclaimable_bytes; + // The index of the next candidate old region to be considered for + // addition to the current collection set. + uint _front_idx; + +public: + G1CollectionSetCandidates(HeapRegion** regions, uint num_regions, size_t remaining_reclaimable_bytes) : + _regions(regions), + _num_regions(num_regions), + _remaining_reclaimable_bytes(remaining_reclaimable_bytes), + _front_idx(0) { } + + ~G1CollectionSetCandidates() { + FREE_C_HEAP_ARRAY(HeapRegion*, _regions); + } + + // Returns the total number of collection set candidate old regions added. + uint num_regions() { return _num_regions; } + + // Return the candidate region at the cursor position to be considered for collection without + // removing it. + HeapRegion* peek_front() { + HeapRegion* res = NULL; + if (_front_idx < _num_regions) { + res = _regions[_front_idx]; + assert(res != NULL, "Unexpected NULL HeapRegion at index %u", _front_idx); + } + return res; + } + + // Remove the given region from the candidates set and move the cursor to the next one. + HeapRegion* pop_front(); + + // Add the given HeapRegion to the front of the collection set candidate set again. + void push_front(HeapRegion* hr); + + // Iterate over all remaining collection set candidate regions. + void iterate(HeapRegionClosure* cl); + + // Return the number of candidate regions remaining. + uint num_remaining() { return _num_regions - _front_idx; } + + bool is_empty() { return num_remaining() == 0; } + + // Return the amount of reclaimable bytes that may be collected by the remaining + // candidate regions. + size_t remaining_reclaimable_bytes() { return _remaining_reclaimable_bytes; } + + void verify() const PRODUCT_RETURN; +}; + +#endif /* SHARE_GC_G1_G1COLLECTIONSETCANDIDATES_HPP */ +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hotspot/share/gc/g1/g1CollectionSetChooser.cpp Fri Feb 08 18:58:44 2019 +0100 @@ -0,0 +1,270 @@ +/* + * Copyright (c) 2001, 2019, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +#include "precompiled.hpp" +#include "gc/g1/g1CollectedHeap.inline.hpp" +#include "gc/g1/g1CollectionSetCandidates.hpp" +#include "gc/g1/g1CollectionSetChooser.hpp" +#include "gc/g1/heapRegionRemSet.hpp" +#include "gc/shared/space.inline.hpp" +#include "runtime/atomic.hpp" +#include "utilities/quickSort.hpp" + +// Order regions according to GC efficiency. This will cause regions with a lot +// of live objects and large remembered sets to end up at the end of the array. +// Given that we might skip collecting the last few old regions, if after a few +// mixed GCs the remaining have reclaimable bytes under a certain threshold, the +// hope is that the ones we'll skip are ones with both large remembered sets and +// a lot of live objects, not the ones with just a lot of live objects if we +// ordered according to the amount of reclaimable bytes per region. +static int order_regions(HeapRegion* hr1, HeapRegion* hr2) { + // Make sure that NULL entries are moved to the end. + if (hr1 == NULL) { + if (hr2 == NULL) { + return 0; + } else { + return 1; + } + } else if (hr2 == NULL) { + return -1; + } + + double gc_eff1 = hr1->gc_efficiency(); + double gc_eff2 = hr2->gc_efficiency(); + + if (gc_eff1 > gc_eff2) { + return -1; + } if (gc_eff1 < gc_eff2) { + return 1; + } else { + return 0; + } +} + +// Determine collection set candidates: For all regions determine whether they +// should be a collection set candidates, calculate their efficiency, sort and +// return them as G1CollectionSetCandidates instance. +// Threads calculate the GC efficiency of the regions they get to process, and +// put them into some work area unsorted. At the end the array is sorted and +// copied into the G1CollectionSetCandidates instance; the caller will be the new +// owner of this object. +class G1BuildCandidateRegionsTask : public AbstractGangTask { + + // Work area for building the set of collection set candidates. Contains references + // to heap regions with their GC efficiencies calculated. To reduce contention + // on claiming array elements, worker threads claim parts of this array in chunks; + // Array elements may be NULL as threads might not get enough regions to fill + // up their chunks completely. + // Final sorting will remove them. + class G1BuildCandidateArray : public StackObj { + + uint const _max_size; + uint const _chunk_size; + + HeapRegion** _data; + + uint volatile _cur_claim_idx; + + // Calculates the maximum array size that will be used. + static uint required_array_size(uint num_regions, uint num_workers, uint chunk_size) { + uint const max_waste = num_workers * chunk_size; + // The array should be aligned with respect to chunk_size. + uint const aligned_num_regions = ((num_regions + chunk_size - 1) / chunk_size) * chunk_size; + + return aligned_num_regions + max_waste; + } + + public: + G1BuildCandidateArray(uint max_num_regions, uint num_workers, uint chunk_size) : + _max_size(required_array_size(max_num_regions, num_workers, chunk_size)), + _chunk_size(chunk_size), + _data(NEW_C_HEAP_ARRAY(HeapRegion*, _max_size, mtGC)), + _cur_claim_idx(0) { + for (uint i = 0; i < _max_size; i++) { + _data[i] = NULL; + } + } + + ~G1BuildCandidateArray() { + FREE_C_HEAP_ARRAY(HeapRegion*, _data); + } + + // Claim a new chunk, returning its bounds [from, to[. + void claim_chunk(uint& from, uint& to) { + uint result = Atomic::add(_chunk_size, &_cur_claim_idx); + assert(_max_size > result - 1, + "Array too small, is %u should be %u with chunk size %u.", + _max_size, result, _chunk_size); + from = result - _chunk_size; + to = result; + } + + // Set element in array. + void set(uint idx, HeapRegion* hr) { + assert(idx < _max_size, "Index %u out of bounds %u", idx, _max_size); + assert(_data[idx] == NULL, "Value must not have been set."); + _data[idx] = hr; + } + + void sort_and_copy_into(HeapRegion** dest, uint num_regions) { + if (_cur_claim_idx == 0) { + return; + } + for (uint i = _cur_claim_idx; i < _max_size; i++) { + assert(_data[i] == NULL, "must be"); + } + QuickSort::sort(_data, _cur_claim_idx, order_regions, true); + for (uint i = num_regions; i < _max_size; i++) { + assert(_data[i] == NULL, "must be"); + } + for (uint i = 0; i < num_regions; i++) { + dest[i] = _data[i]; + } + } + }; + + // Per-region closure. In addition to determining whether a region should be + // added to the candidates, and calculating those regions' gc efficiencies, also + // gather additional statistics. + class G1BuildCandidateRegionsClosure : public HeapRegionClosure { + G1BuildCandidateArray* _array; + + uint _cur_chunk_idx; + uint _cur_chunk_end; + + uint _regions_added; + size_t _reclaimable_bytes_added; + + void add_region(HeapRegion* hr) { + if (_cur_chunk_idx == _cur_chunk_end) { + _array->claim_chunk(_cur_chunk_idx, _cur_chunk_end); + } + assert(_cur_chunk_idx < _cur_chunk_end, "Must be"); + + hr->calc_gc_efficiency(); + _array->set(_cur_chunk_idx, hr); + + _cur_chunk_idx++; + + _regions_added++; + _reclaimable_bytes_added += hr->reclaimable_bytes(); + } + + bool should_add(HeapRegion* hr) { return G1CollectionSetChooser::should_add(hr); } + + public: + G1BuildCandidateRegionsClosure(G1BuildCandidateArray* array) : + _array(array), + _cur_chunk_idx(0), + _cur_chunk_end(0), + _regions_added(0), + _reclaimable_bytes_added(0) { } + + bool do_heap_region(HeapRegion* r) { + // We will skip any region that's currently used as an old GC + // alloc region (we should not consider those for collection + // before we fill them up). + if (should_add(r) && !G1CollectedHeap::heap()->is_old_gc_alloc_region(r)) { + add_region(r); + } else if (r->is_old()) { + // Keep remembered sets for humongous regions, otherwise clean out remembered + // sets for old regions. + r->rem_set()->clear(true /* only_cardset */); + } else { + assert(r->is_archive() || !r->is_old() || !r->rem_set()->is_tracked(), + "Missed to clear unused remembered set of region %u (%s) that is %s", + r->hrm_index(), r->get_type_str(), r->rem_set()->get_state_str()); + } + return false; + } + + uint regions_added() const { return _regions_added; } + size_t reclaimable_bytes_added() const { return _reclaimable_bytes_added; } + }; + + G1CollectedHeap* _g1h; + HeapRegionClaimer _hrclaimer; + + uint volatile _num_regions_added; + size_t volatile _reclaimable_bytes_added; + + G1BuildCandidateArray _result; + + void update_totals(uint num_regions, size_t reclaimable_bytes) { + if (num_regions > 0) { + assert(reclaimable_bytes > 0, "invariant"); + Atomic::add(num_regions, &_num_regions_added); + Atomic::add(reclaimable_bytes, &_reclaimable_bytes_added); + } else { + assert(reclaimable_bytes == 0, "invariant"); + } + } + +public: + G1BuildCandidateRegionsTask(uint max_num_regions, uint chunk_size, uint num_workers) : + AbstractGangTask("G1 Build Candidate Regions"), + _g1h(G1CollectedHeap::heap()), + _hrclaimer(num_workers), + _num_regions_added(0), + _reclaimable_bytes_added(0), + _result(max_num_regions, chunk_size, num_workers) { } + + void work(uint worker_id) { + G1BuildCandidateRegionsClosure cl(&_result); + _g1h->heap_region_par_iterate_from_worker_offset(&cl, &_hrclaimer, worker_id); + update_totals(cl.regions_added(), cl.reclaimable_bytes_added()); + } + + G1CollectionSetCandidates* get_sorted_candidates() { + HeapRegion** regions = NEW_C_HEAP_ARRAY(HeapRegion*, _num_regions_added, mtGC); + _result.sort_and_copy_into(regions, _num_regions_added); + return new G1CollectionSetCandidates(regions, + _num_regions_added, + _reclaimable_bytes_added); + } +}; + +uint G1CollectionSetChooser::calculate_work_chunk_size(uint num_workers, uint num_regions) { + assert(num_workers > 0, "Active gc workers should be greater than 0"); + return MAX2(num_regions / num_workers, 1U); +} + +bool G1CollectionSetChooser::should_add(HeapRegion* hr) { + return !hr->is_young() && + !hr->is_pinned() && + region_occupancy_low_enough_for_evac(hr->live_bytes()) && + hr->rem_set()->is_complete(); +} + +G1CollectionSetCandidates* G1CollectionSetChooser::build(WorkGang* workers, uint max_num_regions) { + uint num_workers = workers->active_workers(); + uint chunk_size = calculate_work_chunk_size(num_workers, max_num_regions); + + G1BuildCandidateRegionsTask cl(max_num_regions, chunk_size, num_workers); + workers->run_task(&cl, num_workers); + + G1CollectionSetCandidates* result = cl.get_sorted_candidates(); + result->verify(); + return result; +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hotspot/share/gc/g1/g1CollectionSetChooser.hpp Fri Feb 08 18:58:44 2019 +0100 @@ -0,0 +1,60 @@ +/* + * Copyright (c) 2001, 2019, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +#ifndef SHARE_GC_G1_G1COLLECTIONSETCHOOSER_HPP +#define SHARE_GC_G1_G1COLLECTIONSETCHOOSER_HPP + +#include "gc/g1/heapRegion.hpp" +#include "memory/allocation.hpp" +#include "runtime/globals.hpp" + +class G1CollectionSetCandidates; +class WorkGang; + +// Helper class to calculate collection set candidates, and containing some related +// methods. +class G1CollectionSetChooser : public AllStatic { + static uint calculate_work_chunk_size(uint num_workers, uint num_regions); +public: + + static size_t mixed_gc_live_threshold_bytes() { + return HeapRegion::GrainBytes * (size_t) G1MixedGCLiveThresholdPercent / 100; + } + + static bool region_occupancy_low_enough_for_evac(size_t live_bytes) { + return live_bytes < mixed_gc_live_threshold_bytes(); + } + + // Determine whether to add the given region to the collection set candidates or + // not. Currently, we skip pinned regions and regions whose live + // bytes are over the threshold. Humongous regions may be reclaimed during cleanup. + // Regions also need a complete remembered set to be a candidate. + static bool should_add(HeapRegion* hr); + + // Build and return set of collection set candidates sorted by decreasing gc + // efficiency. + static G1CollectionSetCandidates* build(WorkGang* workers, uint max_num_regions); +}; + +#endif // SHARE_GC_G1_G1COLLECTIONSETCHOOSER_HPP
--- a/src/hotspot/share/gc/g1/g1Policy.cpp Thu Feb 07 22:15:11 2019 +0100 +++ b/src/hotspot/share/gc/g1/g1Policy.cpp Fri Feb 08 18:58:44 2019 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -26,9 +26,11 @@ #include "gc/g1/g1Analytics.hpp" #include "gc/g1/g1CollectedHeap.inline.hpp" #include "gc/g1/g1CollectionSet.hpp" +#include "gc/g1/g1CollectionSetCandidates.hpp" #include "gc/g1/g1ConcurrentMark.hpp" #include "gc/g1/g1ConcurrentMarkThread.inline.hpp" #include "gc/g1/g1ConcurrentRefine.hpp" +#include "gc/g1/g1CollectionSetChooser.hpp" #include "gc/g1/g1HeterogeneousHeapPolicy.hpp" #include "gc/g1/g1HotCardCache.hpp" #include "gc/g1/g1IHOPControl.hpp" @@ -438,7 +440,7 @@ // Release the future to-space so that it is available for compaction into. collector_state()->set_in_young_only_phase(false); collector_state()->set_in_full_gc(true); - cset_chooser()->clear(); + _collection_set->clear_candidates(); } void G1Policy::record_full_collection_end() { @@ -546,10 +548,6 @@ return other_time_ms(pause_time_ms) - phase_times()->total_free_cset_time_ms(); } -CollectionSetChooser* G1Policy::cset_chooser() const { - return _collection_set->cset_chooser(); -} - bool G1Policy::about_to_start_mixed_phase() const { return _g1h->concurrent_mark()->cm_thread()->during_cycle() || collector_state()->in_young_gc_before_mixed(); } @@ -773,8 +771,6 @@ _g1h->concurrent_refine()->adjust(average_time_ms(G1GCPhaseTimes::UpdateRS), phase_times()->sum_thread_work_items(G1GCPhaseTimes::UpdateRS), update_rs_time_goal_ms); - - cset_chooser()->verify(); } G1IHOPControl* G1Policy::create_ihop_control(const G1Predictions* predictor){ @@ -1032,7 +1028,8 @@ } void G1Policy::record_concurrent_mark_cleanup_end() { - cset_chooser()->rebuild(_g1h->workers(), _g1h->num_regions()); + G1CollectionSetCandidates* candidates = G1CollectionSetChooser::build(_g1h->workers(), _g1h->num_regions()); + _collection_set->set_candidates(candidates); bool mixed_gc_pending = next_gc_should_be_mixed("request mixed gcs", "request young-only gcs"); if (!mixed_gc_pending) { @@ -1063,10 +1060,10 @@ void G1Policy::clear_collection_set_candidates() { // Clear remembered sets of remaining candidate regions and the actual candidate - // list. + // set. G1ClearCollectionSetCandidateRemSets cl; - cset_chooser()->iterate(&cl); - cset_chooser()->clear(); + _collection_set->candidates()->iterate(&cl); + _collection_set->clear_candidates(); } void G1Policy::maybe_start_marking() { @@ -1132,22 +1129,24 @@ bool G1Policy::next_gc_should_be_mixed(const char* true_action_str, const char* false_action_str) const { - if (cset_chooser()->is_empty()) { + G1CollectionSetCandidates* candidates = _collection_set->candidates(); + + if (candidates->is_empty()) { log_debug(gc, ergo)("%s (candidate old regions not available)", false_action_str); return false; } // Is the amount of uncollected reclaimable space above G1HeapWastePercent? - size_t reclaimable_bytes = cset_chooser()->remaining_reclaimable_bytes(); + size_t reclaimable_bytes = candidates->remaining_reclaimable_bytes(); double reclaimable_percent = reclaimable_bytes_percent(reclaimable_bytes); double threshold = (double) G1HeapWastePercent; if (reclaimable_percent <= threshold) { log_debug(gc, ergo)("%s (reclaimable percentage not over threshold). candidate old regions: %u reclaimable: " SIZE_FORMAT " (%1.2f) threshold: " UINTX_FORMAT, - false_action_str, cset_chooser()->remaining_regions(), reclaimable_bytes, reclaimable_percent, G1HeapWastePercent); + false_action_str, candidates->num_remaining(), reclaimable_bytes, reclaimable_percent, G1HeapWastePercent); return false; } log_debug(gc, ergo)("%s (candidate old regions available). candidate old regions: %u reclaimable: " SIZE_FORMAT " (%1.2f) threshold: " UINTX_FORMAT, - true_action_str, cset_chooser()->remaining_regions(), reclaimable_bytes, reclaimable_percent, G1HeapWastePercent); + true_action_str, candidates->num_remaining(), reclaimable_bytes, reclaimable_percent, G1HeapWastePercent); return true; } @@ -1159,10 +1158,10 @@ // maximum desired number of mixed GCs. // // The calculation is based on the number of marked regions we added - // to the CSet chooser in the first place, not how many remain, so + // to the CSet candidates in the first place, not how many remain, so // that the result is the same during all mixed GCs that follow a cycle. - const size_t region_num = (size_t) cset_chooser()->length(); + const size_t region_num = _collection_set->candidates()->num_regions(); const size_t gc_num = (size_t) MAX2(G1MixedGCCountTarget, (uintx) 1); size_t result = region_num / gc_num; // emulate ceiling
--- a/src/hotspot/share/gc/g1/g1Policy.hpp Thu Feb 07 22:15:11 2019 +0100 +++ b/src/hotspot/share/gc/g1/g1Policy.hpp Fri Feb 08 18:58:44 2019 +0100 @@ -44,7 +44,7 @@ class HeapRegion; class G1CollectionSet; -class CollectionSetChooser; +class G1CollectionSetChooser; class G1IHOPControl; class G1Analytics; class G1SurvivorRegions; @@ -176,7 +176,7 @@ double non_young_other_time_ms() const; double constant_other_time_ms(double pause_time_ms) const; - CollectionSetChooser* cset_chooser() const; + G1CollectionSetChooser* cset_chooser() const; // The number of bytes copied during the GC. size_t _bytes_copied_during_gc;
--- a/src/hotspot/share/gc/g1/g1RemSetTrackingPolicy.cpp Thu Feb 07 22:15:11 2019 +0100 +++ b/src/hotspot/share/gc/g1/g1RemSetTrackingPolicy.cpp Fri Feb 08 18:58:44 2019 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,7 +23,7 @@ */ #include "precompiled.hpp" -#include "gc/g1/collectionSetChooser.hpp" +#include "gc/g1/g1CollectionSetChooser.hpp" #include "gc/g1/g1RemSetTrackingPolicy.hpp" #include "gc/g1/heapRegion.inline.hpp" #include "gc/g1/heapRegionRemSet.hpp" @@ -126,7 +126,7 @@ // - Otherwise only add those old gen regions which occupancy is low enough that there // is a chance that we will ever evacuate them in the mixed gcs. if ((total_live_bytes > 0) && - CollectionSetChooser::region_occupancy_low_enough_for_evac(total_live_bytes) && + G1CollectionSetChooser::region_occupancy_low_enough_for_evac(total_live_bytes) && !r->rem_set()->is_tracked()) { r->rem_set()->set_state_updating();
--- a/src/hotspot/share/gc/g1/heapRegion.hpp Thu Feb 07 22:15:11 2019 +0100 +++ b/src/hotspot/share/gc/g1/heapRegion.hpp Fri Feb 08 18:58:44 2019 +0100 @@ -547,7 +547,7 @@ } void calc_gc_efficiency(void); - double gc_efficiency() { return _gc_efficiency;} + double gc_efficiency() const { return _gc_efficiency;} uint index_in_opt_cset() const { return _index_in_opt_cset; } void set_index_in_opt_cset(uint index) { _index_in_opt_cset = index; } @@ -705,7 +705,7 @@ class HeapRegionClosure : public StackObj { friend class HeapRegionManager; friend class G1CollectionSet; - friend class CollectionSetChooser; + friend class G1CollectionSetCandidates; bool _is_complete; void set_incomplete() { _is_complete = false; }
--- a/src/hotspot/share/gc/shared/weakProcessor.cpp Thu Feb 07 22:15:11 2019 +0100 +++ b/src/hotspot/share/gc/shared/weakProcessor.cpp Fri Feb 08 18:58:44 2019 +0100 @@ -35,19 +35,23 @@ #include "utilities/macros.hpp" void WeakProcessor::weak_oops_do(BoolObjectClosure* is_alive, OopClosure* keep_alive) { - StringTable::reset_dead_counter(); - CountingIsAliveClosure<BoolObjectClosure> cl(is_alive); FOR_EACH_WEAK_PROCESSOR_PHASE(phase) { if (WeakProcessorPhases::is_serial(phase)) { - WeakProcessorPhases::processor(phase)(&cl, keep_alive); + WeakProcessorPhases::processor(phase)(is_alive, keep_alive); } else { - WeakProcessorPhases::oop_storage(phase)->weak_oops_do(&cl, keep_alive); - } - if (WeakProcessorPhases::is_stringtable(phase)) { - StringTable::inc_dead_counter(cl.num_dead()); + if (WeakProcessorPhases::is_stringtable(phase)) { + StringTable::reset_dead_counter(); + + CountingSkippedIsAliveClosure<BoolObjectClosure, OopClosure> cl(is_alive, keep_alive); + WeakProcessorPhases::oop_storage(phase)->oops_do(&cl); + + StringTable::inc_dead_counter(cl.num_dead() + cl.num_skipped()); + StringTable::finish_dead_counter(); + } else { + WeakProcessorPhases::oop_storage(phase)->weak_oops_do(is_alive, keep_alive); + } } } - StringTable::finish_dead_counter(); } void WeakProcessor::oops_do(OopClosure* closure) {
--- a/src/hotspot/share/gc/shared/weakProcessor.inline.hpp Thu Feb 07 22:15:11 2019 +0100 +++ b/src/hotspot/share/gc/shared/weakProcessor.inline.hpp Fri Feb 08 18:58:44 2019 +0100 @@ -37,15 +37,15 @@ class BoolObjectClosure; class OopClosure; -template<typename T> +template<typename IsAlive> class CountingIsAliveClosure : public BoolObjectClosure { - T* _inner; + IsAlive* _inner; size_t _num_dead; size_t _num_total; public: - CountingIsAliveClosure(T* cl) : _inner(cl), _num_dead(0), _num_total(0) { } + CountingIsAliveClosure(IsAlive* cl) : _inner(cl), _num_dead(0), _num_total(0) { } virtual bool do_object_b(oop obj) { bool result = _inner->do_object_b(obj); @@ -58,6 +58,33 @@ size_t num_total() const { return _num_total; } }; +template <typename IsAlive, typename KeepAlive> +class CountingSkippedIsAliveClosure : public Closure { + CountingIsAliveClosure<IsAlive> _counting_is_alive; + KeepAlive* _keep_alive; + + size_t _num_skipped; + +public: + CountingSkippedIsAliveClosure(IsAlive* is_alive, KeepAlive* keep_alive) : + _counting_is_alive(is_alive), _keep_alive(keep_alive), _num_skipped(0) { } + + void do_oop(oop* p) { + oop obj = *p; + if (obj == NULL) { + _num_skipped++; + } else if (_counting_is_alive.do_object_b(obj)) { + _keep_alive->do_oop(p); + } else { + *p = NULL; + } + } + + size_t num_dead() const { return _counting_is_alive.num_dead(); } + size_t num_skipped() const { return _num_skipped; } + size_t num_total() const { return _counting_is_alive.num_total() + num_skipped(); } +}; + template<typename IsAlive, typename KeepAlive> void WeakProcessor::Task::work(uint worker_id, IsAlive* is_alive, @@ -67,8 +94,8 @@ worker_id, _nworkers); FOR_EACH_WEAK_PROCESSOR_PHASE(phase) { - CountingIsAliveClosure<IsAlive> cl(is_alive); if (WeakProcessorPhases::is_serial(phase)) { + CountingIsAliveClosure<IsAlive> cl(is_alive); uint serial_index = WeakProcessorPhases::serial_index(phase); if (_serial_phases_done.try_claim_task(serial_index)) { WeakProcessorPhaseTimeTracker pt(_phase_times, phase); @@ -78,15 +105,16 @@ } } } else { + CountingSkippedIsAliveClosure<IsAlive, KeepAlive> cl(is_alive, keep_alive); WeakProcessorPhaseTimeTracker pt(_phase_times, phase, worker_id); uint storage_index = WeakProcessorPhases::oop_storage_index(phase); - _storage_states[storage_index].weak_oops_do(&cl, keep_alive); + _storage_states[storage_index].oops_do(&cl); if (_phase_times != NULL) { _phase_times->record_worker_items(worker_id, phase, cl.num_dead(), cl.num_total()); } - } - if (WeakProcessorPhases::is_stringtable(phase)) { - StringTable::inc_dead_counter(cl.num_dead()); + if (WeakProcessorPhases::is_stringtable(phase)) { + StringTable::inc_dead_counter(cl.num_dead() + cl.num_skipped()); + } } }
--- a/src/hotspot/share/memory/allocation.cpp Thu Feb 07 22:15:11 2019 +0100 +++ b/src/hotspot/share/memory/allocation.cpp Fri Feb 08 18:58:44 2019 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -169,8 +169,7 @@ ResourceObj* resobj = (ResourceObj *)res; resobj->_allocation_t[0] = ~(allocation + type); if (type != STACK_OR_EMBEDDED) { - // Called from operator new() and CollectionSetChooser(), - // set verification value. + // Called from operator new(), set verification value. resobj->_allocation_t[1] = (uintptr_t)&(resobj->_allocation_t[1]) + type; } }
--- a/src/hotspot/share/opto/escape.cpp Thu Feb 07 22:15:11 2019 +0100 +++ b/src/hotspot/share/opto/escape.cpp Fri Feb 08 18:58:44 2019 +0100 @@ -3010,6 +3010,11 @@ n->raise_bottom_type(tinst); igvn->hash_insert(n); record_for_optimizer(n); + // Allocate an alias index for the header fields. Accesses to + // the header emitted during macro expansion wouldn't have + // correct memory state otherwise. + _compile->get_alias_index(tinst->add_offset(oopDesc::mark_offset_in_bytes())); + _compile->get_alias_index(tinst->add_offset(oopDesc::klass_offset_in_bytes())); if (alloc->is_Allocate() && (t->isa_instptr() || t->isa_aryptr())) { // First, put on the worklist all Field edges from Connection Graph
--- a/src/hotspot/share/opto/graphKit.cpp Thu Feb 07 22:15:11 2019 +0100 +++ b/src/hotspot/share/opto/graphKit.cpp Fri Feb 08 18:58:44 2019 +0100 @@ -3426,6 +3426,10 @@ record_for_igvn(minit_in); // fold it up later, if possible Node* minit_out = memory(rawidx); assert(minit_out->is_Proj() && minit_out->in(0) == init, ""); + // Add an edge in the MergeMem for the header fields so an access + // to one of those has correct memory state + set_memory(minit_out, C->get_alias_index(oop_type->add_offset(oopDesc::mark_offset_in_bytes()))); + set_memory(minit_out, C->get_alias_index(oop_type->add_offset(oopDesc::klass_offset_in_bytes()))); if (oop_type->isa_aryptr()) { const TypePtr* telemref = oop_type->add_offset(Type::OffsetBot); int elemidx = C->get_alias_index(telemref);
--- a/src/java.net.http/share/classes/jdk/internal/net/http/MultiExchange.java Thu Feb 07 22:15:11 2019 +0100 +++ b/src/java.net.http/share/classes/jdk/internal/net/http/MultiExchange.java Fri Feb 08 18:58:44 2019 +0100 @@ -259,7 +259,7 @@ private boolean bodyIsPresent(Response r) { HttpHeaders headers = r.headers(); - if (headers.firstValue("Content-length").isPresent()) + if (headers.firstValueAsLong("Content-length").orElse(0L) != 0L) return true; if (headers.firstValue("Transfer-encoding").isPresent()) return true;
--- a/src/java.net.http/share/classes/jdk/internal/net/http/Stream.java Thu Feb 07 22:15:11 2019 +0100 +++ b/src/java.net.http/share/classes/jdk/internal/net/http/Stream.java Fri Feb 08 18:58:44 2019 +0100 @@ -597,10 +597,6 @@ if (contentLength > 0) { h.setHeader("content-length", Long.toString(contentLength)); } - URI uri = request.uri(); - if (uri != null) { - h.setHeader("host", Utils.hostString(request)); - } HttpHeaders sysh = filterHeaders(h.build()); HttpHeaders userh = filterHeaders(request.getUserHeaders()); // Filter context restricted from userHeaders
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/javac_ja.properties Thu Feb 07 22:15:11 2019 +0100 +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/javac_ja.properties Fri Feb 08 18:58:44 2019 +0100 @@ -1,5 +1,5 @@ # -# Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1999, 2019, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -53,7 +53,7 @@ javac.opt.encoding=\u30BD\u30FC\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u304C\u4F7F\u7528\u3059\u308B\u6587\u5B57\u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0\u3092\u6307\u5B9A\u3059\u308B javac.opt.profile=\u4F7F\u7528\u3055\u308C\u3066\u3044\u308BAPI\u304C\u6307\u5B9A\u3057\u305F\u30D7\u30ED\u30D5\u30A1\u30A4\u30EB\u3067\u4F7F\u7528\u53EF\u80FD\u304B\u3069\u3046\u304B\u3092\u78BA\u8A8D\u3057\u307E\u3059 javac.opt.target=\u7279\u5B9A\u306EVM\u30D0\u30FC\u30B8\u30E7\u30F3\u7528\u306E\u30AF\u30E9\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u3092\u751F\u6210\u3057\u307E\u3059\u3002\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u308B\u30D0\u30FC\u30B8\u30E7\u30F3: {0} -javac.opt.release=\u7279\u5B9A\u306E\u30EA\u30EA\u30FC\u30B9\u7528\u306B\u306B\u30B3\u30F3\u30D1\u30A4\u30EB\u3057\u307E\u3059\u3002\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u308B\u30EA\u30EA\u30FC\u30B9: {0} +javac.opt.release=\u7279\u5B9A\u306E\u30EA\u30EA\u30FC\u30B9\u7528\u306B\u30B3\u30F3\u30D1\u30A4\u30EB\u3057\u307E\u3059\u3002\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u308B\u30EA\u30EA\u30FC\u30B9: {0} javac.opt.source=\u6307\u5B9A\u3055\u308C\u305F\u30EA\u30EA\u30FC\u30B9\u3068\u30BD\u30FC\u30B9\u306E\u4E92\u63DB\u6027\u3092\u4FDD\u6301\u3057\u307E\u3059\u3002\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u308B\u30EA\u30EA\u30FC\u30B9: {0} javac.opt.Werror=\u8B66\u544A\u304C\u767A\u751F\u3057\u305F\u5834\u5408\u306B\u30B3\u30F3\u30D1\u30A4\u30EB\u3092\u7D42\u4E86\u3059\u308B javac.opt.A=\u6CE8\u91C8\u30D7\u30ED\u30BB\u30C3\u30B5\u306B\u6E21\u3055\u308C\u308B\u30AA\u30D7\u30B7\u30E7\u30F3 @@ -66,7 +66,7 @@ javac.opt.arg.key.equals.value=key[=value] javac.opt.arg.path=<path> javac.opt.arg.mspath=<module-source-path> -javac.opt.arg.m=<module-name> +javac.opt.arg.m=<module>(,<module>)* javac.opt.arg.jdk=<jdk>|none javac.opt.arg.dirs=<dirs> javac.opt.arg.directory=<directory>
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/javac_zh_CN.properties Thu Feb 07 22:15:11 2019 +0100 +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/javac_zh_CN.properties Fri Feb 08 18:58:44 2019 +0100 @@ -1,5 +1,5 @@ # -# Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1999, 2019, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -34,7 +34,7 @@ javac.opt.classpath=\u6307\u5B9A\u67E5\u627E\u7528\u6237\u7C7B\u6587\u4EF6\u548C\u6CE8\u91CA\u5904\u7406\u7A0B\u5E8F\u7684\u4F4D\u7F6E javac.opt.modulepath=\u6307\u5B9A\u67E5\u627E\u5E94\u7528\u7A0B\u5E8F\u6A21\u5757\u7684\u4F4D\u7F6E javac.opt.sourcepath=\u6307\u5B9A\u67E5\u627E\u8F93\u5165\u6E90\u6587\u4EF6\u7684\u4F4D\u7F6E -javac.opt.m=\u53EA\u7F16\u8BD1\u6307\u5B9A\u7684\u6A21\u5757, \u8BF7\u68C0\u67E5\u65F6\u95F4\u6233 +javac.opt.m=\u53EA\u7F16\u8BD1\u6307\u5B9A\u7684\u6A21\u5757\uFF0C\u8BF7\u68C0\u67E5\u65F6\u95F4\u6233 javac.opt.modulesourcepath=\u6307\u5B9A\u67E5\u627E\u591A\u4E2A\u6A21\u5757\u7684\u8F93\u5165\u6E90\u6587\u4EF6\u7684\u4F4D\u7F6E javac.opt.bootclasspath=\u8986\u76D6\u5F15\u5BFC\u7C7B\u6587\u4EF6\u7684\u4F4D\u7F6E javac.opt.system=\u8986\u76D6\u7CFB\u7EDF\u6A21\u5757\u4F4D\u7F6E @@ -66,7 +66,7 @@ javac.opt.arg.key.equals.value=key[=value] javac.opt.arg.path=<path> javac.opt.arg.mspath=<module-source-path> -javac.opt.arg.m=<module-name> +javac.opt.arg.m=<\u6A21\u5757>(,<\u6A21\u5757>)* javac.opt.arg.jdk=<jdk>|none javac.opt.arg.dirs=<dirs> javac.opt.arg.directory=<directory>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/jdk.jcmd/linux/classes/sun/tools/ProcessHelper.java Fri Feb 08 18:58:44 2019 +0100 @@ -0,0 +1,155 @@ +/* + * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. 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 sun.tools; + +import java.io.IOException; +import java.io.UncheckedIOException; +import java.nio.file.Files; +import java.nio.file.Paths; +import java.util.jar.Attributes; +import java.util.jar.JarFile; +import java.util.jar.Manifest; +import java.util.stream.Stream; + +/** + * A helper class that retrieves the main class name for + * a running Java process using the proc filesystem (procfs) + */ +public class ProcessHelper implements sun.tools.common.ProcessHelper { + + + private static final String CMD_PREFIX = "cmd:"; + private static final ProcessHelper INSTANCE = new ProcessHelper(); + + public static ProcessHelper getInstance() { + return INSTANCE; + } + + /** + * Gets the main class name for the given Java process by parsing the + * process command line. + * @param pid - process ID (pid) + * @return main class name or null if the process no longer exists or + * was started with a native launcher (e.g. jcmd etc) + */ + + public String getMainClass(String pid) { + String cmdLine = getCommandLine(pid); + if (cmdLine == null) { + return null; + } + if (cmdLine.startsWith(CMD_PREFIX)) { + cmdLine = cmdLine.substring(CMD_PREFIX.length()); + } + String[] parts = cmdLine.split(" "); + String mainClass = null; + + if(parts.length == 0) { + return null; + } + + // Check the executable + String[] executablePath = parts[0].split("/"); + if (executablePath.length > 0) { + String binaryName = executablePath[executablePath.length - 1]; + if (!"java".equals(binaryName)) { + // Skip the process if it is not started with java launcher + return null; + } + } + + // If -jar option is used then read the main class name from the manifest file. + // Otherwise, the main class name is either specified in -m or --module options or it + // is the first part that is not a Java option (doesn't start with '-' and is not a + // classpath or a module path). + + for (int i = 1; i < parts.length && mainClass == null; i++) { + if (i < parts.length - 1) { + // Check if the module is executed with explicitly specified main class + if ((parts[i].equals("-m") || parts[i].equals("--module"))) { + return getMainClassFromModuleArg(parts[i + 1]); + } + // Check if the main class needs to be read from the manifest.mf in a JAR file + if (parts[i].equals("-jar")) { + return getMainClassFromJar(parts[i + 1], pid); + } + } + // If this is a classpath or a module path option then skip the next part + // (the classpath or the module path itself) + if (parts[i].equals("-cp") || parts[i].equals("-classpath") || parts[i].equals("--class-path") || + parts[i].equals("-p") || parts[i].equals("--module-path")) { + i++; + continue; + } + // Skip all other Java options + if (parts[i].startsWith("-")) { + continue; + } + mainClass = parts[i]; + } + return mainClass; + + } + + private String getMainClassFromModuleArg(String moduleArg) { + int pos = moduleArg.lastIndexOf("/"); + return (pos > 0 && pos < moduleArg.length()-1) ? moduleArg.substring(pos + 1) : null; + } + + private String getMainClassFromJar(String jar, String pid) { + if (!jar.startsWith("/")) { + String cwd = getCurrentWorkingDir(pid); + if (cwd != null) { + jar = cwd + "/" + jar; + } + } + try (JarFile jarFile = new JarFile(jar)) { + Manifest mf = jarFile.getManifest(); + if (mf != null) { + Attributes mainAttributes = mf.getMainAttributes(); + return mainAttributes.getValue("Main-Class"); + } + } catch (IOException e) { + return null; + } + return null; + } + + private static String getCurrentWorkingDir(String pid) { + return ("/proc/" + pid + "/cwd"); + } + + private static String getCommandLine(String pid) { + try (Stream<String> lines = + Files.lines(Paths.get("/proc/" + pid + "/cmdline"))) { + return lines.map(x -> x.replaceAll("\0", " ")).findFirst().orElse(null); + } catch (IOException | UncheckedIOException e) { + return null; + } + } +} + +
--- a/src/jdk.jcmd/share/classes/sun/tools/common/ProcessArgumentMatcher.java Thu Feb 07 22:15:11 2019 +0100 +++ b/src/jdk.jcmd/share/classes/sun/tools/common/ProcessArgumentMatcher.java Fri Feb 08 18:58:44 2019 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -78,25 +78,40 @@ } private static boolean check(VirtualMachineDescriptor vmd, String excludeClass, String partialMatch) { + String mainClass = null; - try { - VmIdentifier vmId = new VmIdentifier(vmd.id()); - MonitoredHost monitoredHost = MonitoredHost.getMonitoredHost(vmId); - MonitoredVm monitoredVm = monitoredHost.getMonitoredVm(vmId, -1); - mainClass = MonitoredVmUtil.mainClass(monitoredVm, true); - monitoredHost.detach(monitoredVm); - } catch (NullPointerException npe) { - // There is a potential race, where a running java app is being - // queried, unfortunately the java app has shutdown after this - // method is started but before getMonitoredVM is called. - // If this is the case, then the /tmp/hsperfdata_xxx/pid file - // will have disappeared and we will get a NullPointerException. - // Handle this gracefully.... - return false; - } catch (MonitorException | URISyntaxException e) { - return false; + + // Get the main class name using platform specific helper + ProcessHelper helper = ProcessHelper.platformProcessHelper(); + if (helper != null) { + mainClass = helper.getMainClass(vmd.id()); + if (mainClass == null) { + return false; + } } + // If the main class name is still unset then retrieve it with the attach mechanism + if (mainClass == null) { + try { + VmIdentifier vmId = new VmIdentifier(vmd.id()); + MonitoredHost monitoredHost = MonitoredHost.getMonitoredHost(vmId); + MonitoredVm monitoredVm = monitoredHost.getMonitoredVm(vmId, -1); + mainClass = MonitoredVmUtil.mainClass(monitoredVm, true); + monitoredHost.detach(monitoredVm); + } catch (NullPointerException npe) { + // There is a potential race, where a running java app is being + // queried, unfortunately the java app has shutdown after this + // method is started but before getMonitoredVM is called. + // If this is the case, then the /tmp/hsperfdata_xxx/pid file + // will have disappeared and we will get a NullPointerException. + // Handle this gracefully.... + return false; + } catch (MonitorException | URISyntaxException e) { + return false; + } + } + + if (excludeClass != null && mainClass.equals(excludeClass)) { return false; }
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/jdk.jcmd/share/classes/sun/tools/common/ProcessHelper.java Fri Feb 08 18:58:44 2019 +0100 @@ -0,0 +1,64 @@ +/* + * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. 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 sun.tools.common; + +import java.lang.reflect.Method; + +/** + * A helper class to retrieve the main class name for a running + * Java process. + */ + +public interface ProcessHelper { + + /** + * Returns an instance of the ProcessHelper class. + * + * @return ProcessHelper object or null if not supported on this platform. + */ + public static ProcessHelper platformProcessHelper() { + try { + Class<?> c = Class.forName("sun.tools.ProcessHelper"); + @SuppressWarnings("unchecked") + Method m = c.getMethod("getInstance"); + return (ProcessHelper) m.invoke(null); + } catch (ClassNotFoundException e) { + return null; + } catch (ReflectiveOperationException e) { + throw new InternalError(e); + } + } + + + /** + * Returns the main class name for the given Java process + * + * @param pid - process ID (pid) + * @return main class name or null if the main class could not be retrieved + */ + + String getMainClass(String pid); +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/hotspot/jtreg/compiler/c2/TestUseOptoBiasInliningWithoutEliminateLocks.java Fri Feb 08 18:58:44 2019 +0100 @@ -0,0 +1,94 @@ +/* + * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2019 SAP SE. 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. + */ + +/** + * @test + * @bug 8217990 + * @summary With -XX:+UseOptoBiasInlining loading the markword is replaced by 0L if EliminateLocks is disabled. assert(dmw->is_neutral()) failed: invariant fails. + * @author Richard Reingruber richard DOT reingruber AT sap DOT com + * + * @library /test/lib /test/hotspot/jtreg + * + * @build sun.hotspot.WhiteBox + * @build ClassFileInstaller + * + * @run driver ClassFileInstaller sun.hotspot.WhiteBox + * sun.hotspot.WhiteBox$WhiteBoxPermission + * + * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions + * -XX:CompileCommand=compileonly,*.TestUseOptoBiasInliningWithoutEliminateLocks::dontinline_testMethod + * -XX:CompileCommand=dontinline,*::dontinline_* + * -XX:-EliminateLocks + * -XX:+WhiteBoxAPI -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions + * -Xbatch + * -XX:-TieredCompilation + * compiler.c2.TestUseOptoBiasInliningWithoutEliminateLocks + */ + +package compiler.c2; + +import sun.hotspot.WhiteBox; + +public class TestUseOptoBiasInliningWithoutEliminateLocks { + + public static final WhiteBox WB = WhiteBox.getWhiteBox(); + + public static void main(String[] args) { + new TestUseOptoBiasInliningWithoutEliminateLocks().run(); + } + + public boolean warmupDone; + + public void run() { + for(int i = 0; i < 30000; i++) { + dontinline_testMethod(); + } + warmupDone = true; + dontinline_testMethod(); + } + + public void dontinline_testMethod() { + PointXY l1 = new PointXY(4.0f, 2.0f); + synchronized (l1) { + dontinline_deopt(); + } + } + + public void dontinline_deopt() { + if (warmupDone) { + WB.deoptimizeFrames(false); + } + } + + static class PointXY { + + public float fritz; + public float felix; + + public PointXY(float fritz_param, float felix_param) { + this.fritz = fritz_param; +// this.felix = felix_param; + } + } +}
--- a/test/hotspot/jtreg/gc/TestAgeOutput.java Thu Feb 07 22:15:11 2019 +0100 +++ b/test/hotspot/jtreg/gc/TestAgeOutput.java Fri Feb 08 18:58:44 2019 +0100 @@ -55,12 +55,9 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; -import jdk.test.lib.Platform; import jdk.test.lib.process.OutputAnalyzer; import jdk.test.lib.process.ProcessTools; -import static jdk.test.lib.Asserts.*; - public class TestAgeOutput { public static void checkPattern(String pattern, String what) throws Exception {
--- a/test/hotspot/jtreg/gc/TestAllocateHeapAt.java Thu Feb 07 22:15:11 2019 +0100 +++ b/test/hotspot/jtreg/gc/TestAllocateHeapAt.java Fri Feb 08 18:58:44 2019 +0100 @@ -40,7 +40,7 @@ public class TestAllocateHeapAt { public static void main(String args[]) throws Exception { - ArrayList<String> vmOpts = new ArrayList(); + ArrayList<String> vmOpts = new ArrayList<>(); String testVmOptsStr = System.getProperty("test.java.opts"); if (!testVmOptsStr.isEmpty()) {
--- a/test/hotspot/jtreg/gc/TestAllocateHeapAtError.java Thu Feb 07 22:15:11 2019 +0100 +++ b/test/hotspot/jtreg/gc/TestAllocateHeapAtError.java Fri Feb 08 18:58:44 2019 +0100 @@ -42,7 +42,7 @@ public class TestAllocateHeapAtError { public static void main(String args[]) throws Exception { - ArrayList<String> vmOpts = new ArrayList(); + ArrayList<String> vmOpts = new ArrayList<>(); String testVmOptsStr = System.getProperty("test.java.opts"); if (!testVmOptsStr.isEmpty()) {
--- a/test/hotspot/jtreg/gc/TestAllocateHeapAtMultiple.java Thu Feb 07 22:15:11 2019 +0100 +++ b/test/hotspot/jtreg/gc/TestAllocateHeapAtMultiple.java Fri Feb 08 18:58:44 2019 +0100 @@ -40,7 +40,7 @@ public class TestAllocateHeapAtMultiple { public static void main(String args[]) throws Exception { - ArrayList<String> vmOpts = new ArrayList(); + ArrayList<String> vmOpts = new ArrayList<>(); String[] testVmOpts = null; String test_dir = System.getProperty("test.dir", ".");
--- a/test/hotspot/jtreg/gc/TestCardTablePageCommits.java Thu Feb 07 22:15:11 2019 +0100 +++ b/test/hotspot/jtreg/gc/TestCardTablePageCommits.java Fri Feb 08 18:58:44 2019 +0100 @@ -23,7 +23,6 @@ package gc; -import jdk.test.lib.JDKToolFinder; import jdk.test.lib.process.ProcessTools; import jdk.test.lib.process.OutputAnalyzer; import jdk.test.lib.Platform;
--- a/test/hotspot/jtreg/gc/TestFullGCCount.java Thu Feb 07 22:15:11 2019 +0100 +++ b/test/hotspot/jtreg/gc/TestFullGCCount.java Fri Feb 08 18:58:44 2019 +0100 @@ -52,7 +52,7 @@ int iterations = 20; boolean failed = false; String errorMessage = ""; - HashMap<String, List> counts = new HashMap<>(); + HashMap<String, List<Long>> counts = new HashMap<>(); // Prime the collection of count lists for all collectors. for (int i = 0; i < collectors.size(); i++) { @@ -91,10 +91,10 @@ System.out.println("Passed."); } - private static void addCollectionCount(HashMap<String, List> counts, int iteration) { + private static void addCollectionCount(HashMap<String, List<Long>> counts, int iteration) { for (int i = 0; i < collectors.size(); i++) { GarbageCollectorMXBean collector = collectors.get(i); - List thisList = counts.get(collector.getName()); + List<Long> thisList = counts.get(collector.getName()); thisList.add(collector.getCollectionCount()); } }
--- a/test/hotspot/jtreg/gc/TestGenerationPerfCounter.java Thu Feb 07 22:15:11 2019 +0100 +++ b/test/hotspot/jtreg/gc/TestGenerationPerfCounter.java Fri Feb 08 18:58:44 2019 +0100 @@ -24,7 +24,6 @@ package gc; import static jdk.test.lib.Asserts.*; -import gc.testlibrary.PerfCounter; import gc.testlibrary.PerfCounters;
--- a/test/hotspot/jtreg/gc/TestMemoryMXBeansAndPoolsPresence.java Thu Feb 07 22:15:11 2019 +0100 +++ b/test/hotspot/jtreg/gc/TestMemoryMXBeansAndPoolsPresence.java Fri Feb 08 18:58:44 2019 +0100 @@ -24,7 +24,6 @@ package gc; import java.util.List; -import java.util.ArrayList; import java.lang.management.*; import static jdk.test.lib.Asserts.*; import java.util.stream.*;
--- a/test/hotspot/jtreg/gc/TestNumWorkerOutput.java Thu Feb 07 22:15:11 2019 +0100 +++ b/test/hotspot/jtreg/gc/TestNumWorkerOutput.java Fri Feb 08 18:58:44 2019 +0100 @@ -54,12 +54,9 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; -import jdk.test.lib.Platform; import jdk.test.lib.process.OutputAnalyzer; import jdk.test.lib.process.ProcessTools; -import static jdk.test.lib.Asserts.*; - public class TestNumWorkerOutput { public static void checkPatternOnce(String pattern, String what) throws Exception {
--- a/test/hotspot/jtreg/gc/TestObjectAlignment.java Thu Feb 07 22:15:11 2019 +0100 +++ b/test/hotspot/jtreg/gc/TestObjectAlignment.java Fri Feb 08 18:58:44 2019 +0100 @@ -44,9 +44,6 @@ * @run main/othervm gc.TestObjectAlignment -Xmx20M -XX:-ExplicitGCInvokesConcurrent -XX:+IgnoreUnrecognizedVMOptions -XX:ObjectAlignmentInBytes=256 */ -import jdk.test.lib.process.ProcessTools; -import jdk.test.lib.process.OutputAnalyzer; - public class TestObjectAlignment { public static byte[] garbage;
--- a/test/hotspot/jtreg/gc/TestPolicyNamePerfCounter.java Thu Feb 07 22:15:11 2019 +0100 +++ b/test/hotspot/jtreg/gc/TestPolicyNamePerfCounter.java Fri Feb 08 18:58:44 2019 +0100 @@ -24,7 +24,6 @@ package gc; import static jdk.test.lib.Asserts.*; -import gc.testlibrary.PerfCounter; import gc.testlibrary.PerfCounters;
--- a/test/hotspot/jtreg/gc/TestSoftReferencesBehaviorOnOOME.java Thu Feb 07 22:15:11 2019 +0100 +++ b/test/hotspot/jtreg/gc/TestSoftReferencesBehaviorOnOOME.java Fri Feb 08 18:58:44 2019 +0100 @@ -71,9 +71,9 @@ void softReferencesOom(long minSize, long maxSize) { System.out.format( "minSize = %d, maxSize = %d%n", minSize, maxSize ); - LinkedList<SoftReference> arrSoftRefs = new LinkedList(); + LinkedList<SoftReference<byte[]>> arrSoftRefs = new LinkedList<>(); staticRef = arrSoftRefs; - LinkedList arrObjects = new LinkedList(); + LinkedList<byte[]> arrObjects = new LinkedList<>(); staticRef = arrObjects; long multiplier = maxSize - minSize; @@ -89,7 +89,7 @@ while (numSofts-- > 0) { int allocationSize = ((int) (RND_GENERATOR.nextDouble() * multiplier)) + (int)minSize; - arrSoftRefs.add(new SoftReference(new byte[allocationSize])); + arrSoftRefs.add(new SoftReference<byte[]>(new byte[allocationSize])); } System.out.println("free: " + Runtime.getRuntime().freeMemory()); @@ -106,7 +106,7 @@ arrObjects = null; long oomSoftArraySize = arrSoftRefs.size(); - for (SoftReference sr : arrSoftRefs) { + for (SoftReference<byte[]> sr : arrSoftRefs) { Object o = sr.get(); if (o != null) {
--- a/test/hotspot/jtreg/gc/TestVerifyDuringStartup.java Thu Feb 07 22:15:11 2019 +0100 +++ b/test/hotspot/jtreg/gc/TestVerifyDuringStartup.java Fri Feb 08 18:58:44 2019 +0100 @@ -41,7 +41,7 @@ public class TestVerifyDuringStartup { public static void main(String args[]) throws Exception { - ArrayList<String> vmOpts = new ArrayList(); + ArrayList<String> vmOpts = new ArrayList<>(); String testVmOptsStr = System.getProperty("test.java.opts"); if (!testVmOptsStr.isEmpty()) {
--- a/test/hotspot/jtreg/gc/TestVerifySilently.java Thu Feb 07 22:15:11 2019 +0100 +++ b/test/hotspot/jtreg/gc/TestVerifySilently.java Fri Feb 08 18:58:44 2019 +0100 @@ -49,7 +49,7 @@ public class TestVerifySilently { private static OutputAnalyzer runTest(boolean verifySilently) throws Exception { - ArrayList<String> vmOpts = new ArrayList(); + ArrayList<String> vmOpts = new ArrayList<>(); Collections.addAll(vmOpts, Utils.getFilteredTestJavaOpts("-Xlog.*")); Collections.addAll(vmOpts, new String[] {"-XX:+UnlockDiagnosticVMOptions",
--- a/test/hotspot/jtreg/gc/TestVerifySubSet.java Thu Feb 07 22:15:11 2019 +0100 +++ b/test/hotspot/jtreg/gc/TestVerifySubSet.java Fri Feb 08 18:58:44 2019 +0100 @@ -47,7 +47,7 @@ public class TestVerifySubSet { private static OutputAnalyzer runTest(String subset) throws Exception { - ArrayList<String> vmOpts = new ArrayList(); + ArrayList<String> vmOpts = new ArrayList<>(); Collections.addAll(vmOpts, Utils.getFilteredTestJavaOpts("-Xlog.*")); Collections.addAll(vmOpts, new String[] {"-XX:+UnlockDiagnosticVMOptions",
--- a/test/hotspot/jtreg/gc/arguments/AllocationHelper.java Thu Feb 07 22:15:11 2019 +0100 +++ b/test/hotspot/jtreg/gc/arguments/AllocationHelper.java Fri Feb 08 18:58:44 2019 +0100 @@ -23,7 +23,6 @@ package gc.arguments; -import java.util.LinkedList; import java.util.concurrent.Callable; /**
--- a/test/hotspot/jtreg/gc/arguments/TestSelectDefaultGC.java Thu Feb 07 22:15:11 2019 +0100 +++ b/test/hotspot/jtreg/gc/arguments/TestSelectDefaultGC.java Fri Feb 08 18:58:44 2019 +0100 @@ -35,12 +35,9 @@ * @run driver gc.arguments.TestSelectDefaultGC */ -import jdk.test.lib.Platform; import jdk.test.lib.process.OutputAnalyzer; import jdk.test.lib.process.ProcessTools; -import java.util.regex.*; - public class TestSelectDefaultGC { public static void assertVMOption(OutputAnalyzer output, String option, boolean value) { output.shouldMatch(" " + option + " .*=.* " + value + " ");
--- a/test/hotspot/jtreg/gc/arguments/TestShrinkHeapInSteps.java Thu Feb 07 22:15:11 2019 +0100 +++ b/test/hotspot/jtreg/gc/arguments/TestShrinkHeapInSteps.java Fri Feb 08 18:58:44 2019 +0100 @@ -37,7 +37,6 @@ import java.util.LinkedList; import java.util.Arrays; -import java.util.Collections; import jdk.test.lib.Utils; public class TestShrinkHeapInSteps {
--- a/test/hotspot/jtreg/gc/class_unloading/TestCMSClassUnloadingEnabledHWM.java Thu Feb 07 22:15:11 2019 +0100 +++ b/test/hotspot/jtreg/gc/class_unloading/TestCMSClassUnloadingEnabledHWM.java Fri Feb 08 18:58:44 2019 +0100 @@ -42,8 +42,6 @@ import jdk.test.lib.process.ProcessTools; import java.lang.management.GarbageCollectorMXBean; import java.lang.management.ManagementFactory; -import java.util.ArrayList; -import java.util.Arrays; import sun.hotspot.WhiteBox; public class TestCMSClassUnloadingEnabledHWM {
--- a/test/hotspot/jtreg/gc/class_unloading/TestG1ClassUnloadingHWM.java Thu Feb 07 22:15:11 2019 +0100 +++ b/test/hotspot/jtreg/gc/class_unloading/TestG1ClassUnloadingHWM.java Fri Feb 08 18:58:44 2019 +0100 @@ -39,8 +39,6 @@ import jdk.test.lib.process.OutputAnalyzer; import jdk.test.lib.process.ProcessTools; -import java.util.ArrayList; -import java.util.Arrays; import sun.hotspot.WhiteBox; public class TestG1ClassUnloadingHWM {
--- a/test/hotspot/jtreg/gc/cms/TestMBeanCMS.java Thu Feb 07 22:15:11 2019 +0100 +++ b/test/hotspot/jtreg/gc/cms/TestMBeanCMS.java Fri Feb 08 18:58:44 2019 +0100 @@ -137,7 +137,7 @@ public void allocationWork(long target) { long sizeAllocated = 0; - List list = new LinkedList(); + List<byte[]> list = new LinkedList<>(); long delay = 50; long count = 0;
--- a/test/hotspot/jtreg/gc/concurrent_phase_control/CheckControl.java Thu Feb 07 22:15:11 2019 +0100 +++ b/test/hotspot/jtreg/gc/concurrent_phase_control/CheckControl.java Fri Feb 08 18:58:44 2019 +0100 @@ -51,7 +51,6 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; -import jdk.test.lib.Platform; import jdk.test.lib.process.OutputAnalyzer; import jdk.test.lib.process.ProcessTools;
--- a/test/hotspot/jtreg/gc/epsilon/TestArraycopyCheckcast.java Thu Feb 07 22:15:11 2019 +0100 +++ b/test/hotspot/jtreg/gc/epsilon/TestArraycopyCheckcast.java Fri Feb 08 18:58:44 2019 +0100 @@ -38,8 +38,6 @@ * @run main/othervm -Xmx1g -Xbatch -Xcomp -XX:-TieredCompilation -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC gc.epsilon.TestArraycopyCheckcast */ -import java.util.Random; - public class TestArraycopyCheckcast { static int COUNT = Integer.getInteger("count", 1000);
--- a/test/hotspot/jtreg/gc/epsilon/TestEpsilonEnabled.java Thu Feb 07 22:15:11 2019 +0100 +++ b/test/hotspot/jtreg/gc/epsilon/TestEpsilonEnabled.java Fri Feb 08 18:58:44 2019 +0100 @@ -32,7 +32,6 @@ * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC gc.epsilon.TestEpsilonEnabled */ -import jdk.test.lib.Platform; import java.lang.management.GarbageCollectorMXBean; import java.lang.management.ManagementFactory;
--- a/test/hotspot/jtreg/gc/epsilon/TestMemoryMXBeans.java Thu Feb 07 22:15:11 2019 +0100 +++ b/test/hotspot/jtreg/gc/epsilon/TestMemoryMXBeans.java Fri Feb 08 18:58:44 2019 +0100 @@ -36,7 +36,6 @@ */ import java.lang.management.*; -import java.util.*; public class TestMemoryMXBeans {
--- a/test/hotspot/jtreg/gc/g1/TestEagerReclaimHumongousRegionsLog.java Thu Feb 07 22:15:11 2019 +0100 +++ b/test/hotspot/jtreg/gc/g1/TestEagerReclaimHumongousRegionsLog.java Fri Feb 08 18:58:44 2019 +0100 @@ -39,12 +39,8 @@ import sun.hotspot.WhiteBox; import java.util.Arrays; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - import jdk.test.lib.Asserts; -import jdk.test.lib.Platform; import jdk.test.lib.process.OutputAnalyzer; import jdk.test.lib.process.ProcessTools;
--- a/test/hotspot/jtreg/gc/g1/TestHumongousShrinkHeap.java Thu Feb 07 22:15:11 2019 +0100 +++ b/test/hotspot/jtreg/gc/g1/TestHumongousShrinkHeap.java Fri Feb 08 18:58:44 2019 +0100 @@ -52,7 +52,7 @@ public static final String MIN_FREE_RATIO_FLAG_NAME = "MinHeapFreeRatio"; public static final String MAX_FREE_RATIO_FLAG_NAME = "MaxHeapFreeRatio"; - private static final List<List<byte[]>> garbage = new ArrayList(); + private static final List<List<byte[]>> garbage = new ArrayList<>(); private static final int REGION_SIZE = 1024 * 1024; // 1M private static final int LISTS_COUNT = 10; private static final int HUMON_SIZE = Math.round(.9f * REGION_SIZE); @@ -108,7 +108,7 @@ private void allocate() { for (int i = 0; i < LISTS_COUNT; i++) { - List<byte[]> stuff = new ArrayList(); + List<byte[]> stuff = new ArrayList<>(); allocateList(stuff, HUMON_COUNT, HUMON_SIZE); MemoryUsagePrinter.printMemoryUsage("allocate #" + (i+1)); garbage.add(stuff); @@ -120,12 +120,12 @@ garbage.subList(0, garbage.size() - 1).clear(); // do not free last one element from last list - List stuff = garbage.get(garbage.size() - 1); + List<byte[]> stuff = garbage.get(garbage.size() - 1); stuff.subList(0, stuff.size() - 1).clear(); System.gc(); } - private static void allocateList(List garbage, int count, int size) { + private static void allocateList(List<byte[]> garbage, int count, int size) { for (int i = 0; i < count; i++) { garbage.add(new byte[size]); }
--- a/test/hotspot/jtreg/gc/g1/TestLargePageUseForAuxMemory.java Thu Feb 07 22:15:11 2019 +0100 +++ b/test/hotspot/jtreg/gc/g1/TestLargePageUseForAuxMemory.java Fri Feb 08 18:58:44 2019 +0100 @@ -38,9 +38,6 @@ */ import java.lang.Math; -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; - import jdk.test.lib.process.OutputAnalyzer; import jdk.test.lib.process.ProcessTools; import jdk.test.lib.Asserts;
--- a/test/hotspot/jtreg/gc/g1/TestPLABOutput.java Thu Feb 07 22:15:11 2019 +0100 +++ b/test/hotspot/jtreg/gc/g1/TestPLABOutput.java Fri Feb 08 18:58:44 2019 +0100 @@ -41,7 +41,6 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; -import jdk.test.lib.Platform; import jdk.test.lib.process.OutputAnalyzer; import jdk.test.lib.process.ProcessTools;
--- a/test/hotspot/jtreg/gc/g1/TestPeriodicLogMessages.java Thu Feb 07 22:15:11 2019 +0100 +++ b/test/hotspot/jtreg/gc/g1/TestPeriodicLogMessages.java Fri Feb 08 18:58:44 2019 +0100 @@ -36,7 +36,6 @@ import jdk.test.lib.process.OutputAnalyzer; import jdk.test.lib.process.ProcessTools; -import jdk.test.lib.Platform; public class TestPeriodicLogMessages {
--- a/test/hotspot/jtreg/gc/g1/TestRemsetLoggingTools.java Thu Feb 07 22:15:11 2019 +0100 +++ b/test/hotspot/jtreg/gc/g1/TestRemsetLoggingTools.java Fri Feb 08 18:58:44 2019 +0100 @@ -27,13 +27,10 @@ * Common helpers for TestRemsetLogging* tests */ -import com.sun.management.HotSpotDiagnosticMXBean; -import com.sun.management.VMOption; import sun.hotspot.WhiteBox; import jdk.test.lib.process.ProcessTools; import jdk.test.lib.process.OutputAnalyzer; -import java.lang.management.ManagementFactory; import java.util.ArrayList; import java.util.Arrays;
--- a/test/hotspot/jtreg/gc/g1/TestShrinkAuxiliaryData.java Thu Feb 07 22:15:11 2019 +0100 +++ b/test/hotspot/jtreg/gc/g1/TestShrinkAuxiliaryData.java Fri Feb 08 18:58:44 2019 +0100 @@ -27,7 +27,6 @@ import jdk.test.lib.Platform; import jdk.test.lib.process.ProcessTools; import jdk.test.lib.process.OutputAnalyzer; -import jdk.test.lib.Utils; import jtreg.SkippedException; import java.io.IOException; @@ -36,7 +35,6 @@ import java.text.DecimalFormat; import java.text.DecimalFormatSymbols; import java.util.ArrayList; -import java.util.Arrays; import java.util.Collections; import java.util.LinkedList; import java.util.List; @@ -68,7 +66,7 @@ } protected void test() throws Exception { - ArrayList<String> vmOpts = new ArrayList(); + ArrayList<String> vmOpts = new ArrayList<>(); Collections.addAll(vmOpts, initialOpts); int maxCacheSize = Math.max(0, Math.min(31, getMaxCacheSize())); @@ -84,14 +82,14 @@ // for 32 bits ObjectAlignmentInBytes is not a option if (Platform.is32bit()) { - ArrayList<String> vmOptsWithoutAlign = new ArrayList(vmOpts); + ArrayList<String> vmOptsWithoutAlign = new ArrayList<>(vmOpts); vmOptsWithoutAlign.add(ShrinkAuxiliaryDataTest.class.getName()); performTest(vmOptsWithoutAlign); return; } for (int alignment = 3; alignment <= 8; alignment++) { - ArrayList<String> vmOptsWithAlign = new ArrayList(vmOpts); + ArrayList<String> vmOptsWithAlign = new ArrayList<>(vmOpts); vmOptsWithAlign.add("-XX:ObjectAlignmentInBytes=" + (int) Math.pow(2, alignment)); vmOptsWithAlign.add(ShrinkAuxiliaryDataTest.class.getName()); @@ -202,8 +200,8 @@ class GarbageObject { - private final List<byte[]> payload = new ArrayList(); - private final List<GarbageObject> ref = new LinkedList(); + private final List<byte[]> payload = new ArrayList<>(); + private final List<GarbageObject> ref = new LinkedList<>(); public GarbageObject(int size) { payload.add(new byte[size]); @@ -220,7 +218,7 @@ } } - private final List<GarbageObject> garbage = new ArrayList(); + private final List<GarbageObject> garbage = new ArrayList<>(); public void test() throws IOException {
--- a/test/hotspot/jtreg/gc/g1/TestShrinkDefragmentedHeap.java Thu Feb 07 22:15:11 2019 +0100 +++ b/test/hotspot/jtreg/gc/g1/TestShrinkDefragmentedHeap.java Fri Feb 08 18:58:44 2019 +0100 @@ -139,7 +139,7 @@ garbage.subList(0, garbage.size() - 1).clear(); // do not free last one element from last list - ArrayList stuff = garbage.get(garbage.size() - 1); + ArrayList<byte[]> stuff = garbage.get(garbage.size() - 1); if (stuff.size() > 1) { stuff.subList(0, stuff.size() - 1).clear(); } @@ -159,7 +159,7 @@ ); } - private static void allocateList(List garbage, int count, int size) { + private static void allocateList(List<byte[]> garbage, int count, int size) { for (int i = 0; i < count; i++) { garbage.add(new byte[size]); }
--- a/test/hotspot/jtreg/gc/g1/TestStringDeduplicationTools.java Thu Feb 07 22:15:11 2019 +0100 +++ b/test/hotspot/jtreg/gc/g1/TestStringDeduplicationTools.java Fri Feb 08 18:58:44 2019 +0100 @@ -27,9 +27,7 @@ * Common code for string deduplication tests */ -import java.lang.management.*; import java.lang.reflect.*; -import java.security.*; import java.util.*; import jdk.test.lib.process.ProcessTools; import jdk.test.lib.process.OutputAnalyzer;
--- a/test/hotspot/jtreg/gc/g1/TestVerifyGCType.java Thu Feb 07 22:15:11 2019 +0100 +++ b/test/hotspot/jtreg/gc/g1/TestVerifyGCType.java Fri Feb 08 18:58:44 2019 +0100 @@ -38,7 +38,6 @@ import java.util.Collections; import jdk.test.lib.Asserts; -import jdk.test.lib.Utils; import jdk.test.lib.process.OutputAnalyzer; import jdk.test.lib.process.ProcessTools; import sun.hotspot.WhiteBox;
--- a/test/hotspot/jtreg/gc/g1/humongousObjects/TestObjectCollected.java Thu Feb 07 22:15:11 2019 +0100 +++ b/test/hotspot/jtreg/gc/g1/humongousObjects/TestObjectCollected.java Fri Feb 08 18:58:44 2019 +0100 @@ -139,7 +139,7 @@ System.out.println(String.format("Testing %s reference behavior after %s", ref.name(), gc.name())); - Reference reference = ref.create(); + Reference<byte[]> reference = ref.create(); Asserts.assertNotNull(reference, "Test Bug: failed to allocate reference"); long adr = WHITE_BOX.getObjectAddress(reference.get());
--- a/test/hotspot/jtreg/gc/g1/mixedgc/TestOldGenCollectionUsage.java Thu Feb 07 22:15:11 2019 +0100 +++ b/test/hotspot/jtreg/gc/g1/mixedgc/TestOldGenCollectionUsage.java Fri Feb 08 18:58:44 2019 +0100 @@ -42,8 +42,6 @@ import java.util.ArrayList; import java.util.List; -import java.util.Collections; - import java.lang.management.*; // 8195115 says that for the "G1 Old Gen" MemoryPool, CollectionUsage.used
--- a/test/hotspot/jtreg/gc/logging/TestDeprecatedPrintFlags.java Thu Feb 07 22:15:11 2019 +0100 +++ b/test/hotspot/jtreg/gc/logging/TestDeprecatedPrintFlags.java Fri Feb 08 18:58:44 2019 +0100 @@ -36,10 +36,8 @@ import jdk.test.lib.process.OutputAnalyzer; import jdk.test.lib.process.ProcessTools; -import java.io.File; import java.nio.file.Files; import java.nio.file.Paths; -import java.util.List; import java.util.stream.Collectors; public class TestDeprecatedPrintFlags {
--- a/test/hotspot/jtreg/gc/logging/TestMetaSpaceLog.java Thu Feb 07 22:15:11 2019 +0100 +++ b/test/hotspot/jtreg/gc/logging/TestMetaSpaceLog.java Fri Feb 08 18:58:44 2019 +0100 @@ -27,7 +27,6 @@ import java.io.File; import java.net.URL; import java.net.URLClassLoader; -import java.util.List; import java.util.function.Predicate; import java.util.regex.Pattern; import java.util.regex.Matcher;
--- a/test/hotspot/jtreg/gc/logging/TestPrintReferences.java Thu Feb 07 22:15:11 2019 +0100 +++ b/test/hotspot/jtreg/gc/logging/TestPrintReferences.java Fri Feb 08 18:58:44 2019 +0100 @@ -36,8 +36,6 @@ import java.lang.ref.SoftReference; import java.math.BigDecimal; -import java.util.ArrayList; - import jdk.test.lib.process.OutputAnalyzer; import jdk.test.lib.process.ProcessTools; import java.util.regex.Pattern;
--- a/test/hotspot/jtreg/gc/metaspace/TestMetaspaceMemoryPool.java Thu Feb 07 22:15:11 2019 +0100 +++ b/test/hotspot/jtreg/gc/metaspace/TestMetaspaceMemoryPool.java Fri Feb 08 18:58:44 2019 +0100 @@ -26,8 +26,6 @@ import java.util.List; import java.lang.management.*; import jdk.test.lib.Platform; -import jdk.test.lib.process.ProcessTools; -import jdk.test.lib.process.OutputAnalyzer; import static jdk.test.lib.Asserts.*; /* @test TestMetaspaceMemoryPool
--- a/test/hotspot/jtreg/gc/metaspace/TestMetaspacePerfCounters.java Thu Feb 07 22:15:11 2019 +0100 +++ b/test/hotspot/jtreg/gc/metaspace/TestMetaspacePerfCounters.java Fri Feb 08 18:58:44 2019 +0100 @@ -70,7 +70,7 @@ * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:+UseCompressedOops -XX:+UseCompressedClassPointers -XX:+UsePerfData -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC gc.metaspace.TestMetaspacePerfCounters */ public class TestMetaspacePerfCounters { - public static Class fooClass = null; + public static Class<?> fooClass = null; private static final String[] counterNames = {"minCapacity", "maxCapacity", "capacity", "used"}; private static final List<GarbageCollectorMXBean> gcBeans = ManagementFactoryHelper.getGarbageCollectorMXBeans();
--- a/test/hotspot/jtreg/gc/metaspace/TestPerfCountersAndMemoryPools.java Thu Feb 07 22:15:11 2019 +0100 +++ b/test/hotspot/jtreg/gc/metaspace/TestPerfCountersAndMemoryPools.java Fri Feb 08 18:58:44 2019 +0100 @@ -28,7 +28,6 @@ import jdk.test.lib.Platform; import static jdk.test.lib.Asserts.*; -import gc.testlibrary.PerfCounter; import gc.testlibrary.PerfCounters; /* @test TestPerfCountersAndMemoryPools
--- a/test/hotspot/jtreg/gc/nvdimm/TestAllocateOldGenAt.java Thu Feb 07 22:15:11 2019 +0100 +++ b/test/hotspot/jtreg/gc/nvdimm/TestAllocateOldGenAt.java Fri Feb 08 18:58:44 2019 +0100 @@ -43,7 +43,7 @@ private static ArrayList<String> commonOpts; public static void main(String args[]) throws Exception { - commonOpts = new ArrayList(); + commonOpts = new ArrayList<>(); String testVmOptsStr = System.getProperty("test.java.opts"); if (!testVmOptsStr.isEmpty()) { @@ -63,7 +63,7 @@ } private static void runTest(String... extraFlags) throws Exception { - ArrayList<String> testOpts = new ArrayList(); + ArrayList<String> testOpts = new ArrayList<>(); Collections.addAll(testOpts, commonOpts.toArray(new String[commonOpts.size()])); Collections.addAll(testOpts, extraFlags);
--- a/test/hotspot/jtreg/gc/nvdimm/TestAllocateOldGenAtError.java Thu Feb 07 22:15:11 2019 +0100 +++ b/test/hotspot/jtreg/gc/nvdimm/TestAllocateOldGenAtError.java Fri Feb 08 18:58:44 2019 +0100 @@ -45,7 +45,7 @@ private static ArrayList<String> commonOpts; public static void main(String args[]) throws Exception { - commonOpts = new ArrayList(); + commonOpts = new ArrayList<>(); String testVmOptsStr = System.getProperty("test.java.opts"); if (!testVmOptsStr.isEmpty()) { @@ -94,7 +94,7 @@ } private static OutputAnalyzer runTest(String... extraFlags) throws Exception { - ArrayList<String> testOpts = new ArrayList(); + ArrayList<String> testOpts = new ArrayList<>(); Collections.addAll(testOpts, commonOpts.toArray(new String[commonOpts.size()])); Collections.addAll(testOpts, extraFlags);
--- a/test/hotspot/jtreg/gc/nvdimm/TestAllocateOldGenAtMultiple.java Thu Feb 07 22:15:11 2019 +0100 +++ b/test/hotspot/jtreg/gc/nvdimm/TestAllocateOldGenAtMultiple.java Fri Feb 08 18:58:44 2019 +0100 @@ -42,7 +42,7 @@ public class TestAllocateOldGenAtMultiple { public static void main(String args[]) throws Exception { - ArrayList<String> vmOpts = new ArrayList(); + ArrayList<String> vmOpts = new ArrayList<>(); String[] testVmOpts = null; String test_dir = System.getProperty("test.dir", ".");
--- a/test/hotspot/jtreg/gc/nvdimm/TestHumongousObjectsOnNvdimm.java Thu Feb 07 22:15:11 2019 +0100 +++ b/test/hotspot/jtreg/gc/nvdimm/TestHumongousObjectsOnNvdimm.java Fri Feb 08 18:58:44 2019 +0100 @@ -41,7 +41,6 @@ import sun.hotspot.WhiteBox; import java.util.ArrayList; -import java.util.List; import java.util.Collections; import gc.testlibrary.Helpers; @@ -54,7 +53,7 @@ private static ArrayList<String> testOpts; public static void main(String args[]) throws Exception { - testOpts = new ArrayList(); + testOpts = new ArrayList<>(); String[] common_options = new String[] { "-Xbootclasspath/a:.",
--- a/test/hotspot/jtreg/gc/nvdimm/TestOldObjectsOnNvdimm.java Thu Feb 07 22:15:11 2019 +0100 +++ b/test/hotspot/jtreg/gc/nvdimm/TestOldObjectsOnNvdimm.java Fri Feb 08 18:58:44 2019 +0100 @@ -41,7 +41,6 @@ import sun.hotspot.WhiteBox; import java.util.ArrayList; -import java.util.List; import java.util.Collections; /* @@ -54,7 +53,7 @@ private static ArrayList<String> testOpts; public static void main(String args[]) throws Exception { - testOpts = new ArrayList(); + testOpts = new ArrayList<>(); String[] common_options = new String[] { "-Xbootclasspath/a:.",
--- a/test/hotspot/jtreg/gc/nvdimm/TestYoungObjectsOnDram.java Thu Feb 07 22:15:11 2019 +0100 +++ b/test/hotspot/jtreg/gc/nvdimm/TestYoungObjectsOnDram.java Fri Feb 08 18:58:44 2019 +0100 @@ -41,7 +41,6 @@ import sun.hotspot.WhiteBox; import java.util.ArrayList; -import java.util.List; import java.util.Collections; /** @@ -54,7 +53,7 @@ private static ArrayList<String> testOpts; public static void main(String args[]) throws Exception { - testOpts = new ArrayList(); + testOpts = new ArrayList<>(); String[] common_options = new String[] { "-Xbootclasspath/a:.",
--- a/test/hotspot/jtreg/gc/stress/TestReclaimStringsLeaksMemory.java Thu Feb 07 22:15:11 2019 +0100 +++ b/test/hotspot/jtreg/gc/stress/TestReclaimStringsLeaksMemory.java Fri Feb 08 18:58:44 2019 +0100 @@ -55,12 +55,12 @@ public static final int ReservedThreshold = 70000; public static void main(String[] args) throws Exception { - ArrayList<String> baseargs = new ArrayList(Arrays.asList( "-Xms256M", - "-Xmx256M", - "-Xlog:gc*", - "-XX:NativeMemoryTracking=summary", - "-XX:+UnlockDiagnosticVMOptions", - "-XX:+PrintNMTStatistics" )); + ArrayList<String> baseargs = new ArrayList<>(Arrays.asList("-Xms256M", + "-Xmx256M", + "-Xlog:gc*", + "-XX:NativeMemoryTracking=summary", + "-XX:+UnlockDiagnosticVMOptions", + "-XX:+PrintNMTStatistics" )); baseargs.addAll(Arrays.asList(args)); baseargs.add(GCTest.class.getName()); ProcessBuilder pb_default =
--- a/test/hotspot/jtreg/gc/stress/gclocker/TestGCLocker.java Thu Feb 07 22:15:11 2019 +0100 +++ b/test/hotspot/jtreg/gc/stress/gclocker/TestGCLocker.java Fri Feb 08 18:58:44 2019 +0100 @@ -30,7 +30,6 @@ import java.lang.management.MemoryPoolMXBean; import java.lang.management.ManagementFactory; import java.lang.management.MemoryUsage; -import java.nio.ByteBuffer; import java.util.ArrayDeque; import java.util.HashMap; import java.util.List;
--- a/test/hotspot/jtreg/gc/stress/systemgc/TestSystemGC.java Thu Feb 07 22:15:11 2019 +0100 +++ b/test/hotspot/jtreg/gc/stress/systemgc/TestSystemGC.java Fri Feb 08 18:58:44 2019 +0100 @@ -26,7 +26,6 @@ // A test that stresses a full GC by allocating objects of different lifetimes // and concurrently calling System.gc(). -import java.util.ArrayList; import java.util.HashMap; import java.util.Map; import java.util.TreeMap;
--- a/test/hotspot/jtreg/gc/whitebox/TestConcMarkCycleWB.java Thu Feb 07 22:15:11 2019 +0100 +++ b/test/hotspot/jtreg/gc/whitebox/TestConcMarkCycleWB.java Fri Feb 08 18:58:44 2019 +0100 @@ -38,7 +38,6 @@ * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:+UseG1GC gc.whitebox.TestConcMarkCycleWB * @summary Verifies that ConcurrentMarking-related WB works properly */ -import static jdk.test.lib.Asserts.assertFalse; import static jdk.test.lib.Asserts.assertTrue; import sun.hotspot.WhiteBox;
--- a/test/hotspot/jtreg/serviceability/dcmd/framework/HelpTest.java Thu Feb 07 22:15:11 2019 +0100 +++ b/test/hotspot/jtreg/serviceability/dcmd/framework/HelpTest.java Fri Feb 08 18:58:44 2019 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -33,6 +33,7 @@ * @test * @summary Test of diagnostic command help (tests all DCMD executors) * @library /test/lib + * /vmTestbase * @modules java.base/jdk.internal.misc * java.compiler * java.management @@ -55,7 +56,13 @@ @Test public void mainClass() { - run(new MainClassJcmdExecutor()); + TestProcessLauncher t = new TestProcessLauncher(Process.class.getName()); + try { + t.launch(); + run(new MainClassJcmdExecutor(Process.class.getName())); + } finally { + t.quit(); + } } @Test @@ -68,4 +75,6 @@ run(new JMXExecutor()); } + private static class Process extends TestJavaProcess { + } }
--- a/test/hotspot/jtreg/serviceability/dcmd/framework/InvalidCommandTest.java Thu Feb 07 22:15:11 2019 +0100 +++ b/test/hotspot/jtreg/serviceability/dcmd/framework/InvalidCommandTest.java Fri Feb 08 18:58:44 2019 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -33,6 +33,7 @@ * @test * @summary Test of invalid diagnostic command (tests all DCMD executors) * @library /test/lib + * /vmTestbase * @modules java.base/jdk.internal.misc * java.compiler * java.management @@ -53,7 +54,13 @@ @Test public void mainClass() { - run(new MainClassJcmdExecutor()); + TestProcessLauncher t = new TestProcessLauncher(Process.class.getName()); + try { + t.launch(); + run(new MainClassJcmdExecutor(Process.class.getName())); + } finally { + t.quit(); + } } @Test @@ -65,4 +72,7 @@ public void jmx() { run(new JMXExecutor()); } + + private static class Process extends TestJavaProcess { + } }
--- a/test/hotspot/jtreg/serviceability/dcmd/framework/TEST.properties Thu Feb 07 22:15:11 2019 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,2 +0,0 @@ -exclusiveAccess.dirs=. -
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/hotspot/jtreg/serviceability/dcmd/framework/TestJavaProcess.java Fri Feb 08 18:58:44 2019 +0100 @@ -0,0 +1,61 @@ +/* + * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +import nsk.share.jpda.*; +import nsk.share.jdi.*; + +/** + * A simple process that connects to a pipe and waits for command "quit" to + * be received. + * + * Usage: java TestJavaProcess -pipe.port <PIPE_PORT_NUMBER> + */ + +public class TestJavaProcess { + + static final int PASSED = 0; + static final int FAILED = 2; + + public static void main(String argv[]) { + + log("Test Java process started!"); + + ArgumentHandler argHandler = new ArgumentHandler(argv); + IOPipe pipe = argHandler.createDebugeeIOPipe(); + pipe.println("ready"); + log("Waiting for the quit command from the test ..."); + String cmd = pipe.readln(); + int exitCode = PASSED; + if (cmd.equals("quit")) { + log("'quit' received"); + } else { + log("Invalid command received " + cmd); + exitCode = FAILED; + } + System.exit(exitCode); + } + + private static void log(String message) { + System.out.println(message); + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/hotspot/jtreg/serviceability/dcmd/framework/TestProcessLauncher.java Fri Feb 08 18:58:44 2019 +0100 @@ -0,0 +1,78 @@ + +/* + * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +import nsk.share.*; +import nsk.share.jpda.*; +import nsk.share.jdi.*; + +/** + * Launches a new Java process that uses a communication pipe to interact + * with the test. + */ + +public class TestProcessLauncher { + + private final String className; + private final ArgumentHandler argHandler; + + private IOPipe pipe; + + public TestProcessLauncher(String className, ArgumentHandler argHandler) { + this.className = className; + this.argHandler = argHandler; + } + + public TestProcessLauncher(String className) { + this(className, new ArgumentHandler(new String[0])); + } + + public Process launch() { + + String java = argHandler.getLaunchExecPath(); + + Log log = new Log(System.out, argHandler); + Binder binder = new Binder(argHandler, log); + binder.prepareForPipeConnection(argHandler); + + String cmd = java + " " + className + " -pipe.port=" + argHandler.getPipePort(); + + Debugee debuggee = binder.startLocalDebugee(cmd); + debuggee.redirectOutput(log); + + pipe = new IOPipe(debuggee); + + String line = pipe.readln(); + if (!"ready".equals(line)) { + System.out.println("Wrong reply received:" + line); + } + return debuggee.getProcess(); + } + + public void quit() { + if (pipe != null) { + pipe.println("quit"); + } + } + +}
--- a/test/hotspot/jtreg/serviceability/dcmd/framework/VMVersionTest.java Thu Feb 07 22:15:11 2019 +0100 +++ b/test/hotspot/jtreg/serviceability/dcmd/framework/VMVersionTest.java Fri Feb 08 18:58:44 2019 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -27,6 +27,7 @@ import jdk.test.lib.dcmd.MainClassJcmdExecutor; import jdk.test.lib.dcmd.FileJcmdExecutor; import jdk.test.lib.dcmd.JMXExecutor; +import nsk.share.jdi.ArgumentHandler; import org.testng.annotations.Test; @@ -34,6 +35,8 @@ * @test * @summary Test of diagnostic command VM.version (tests all DCMD executors) * @library /test/lib + * /vmTestbase + * @build TestJavaProcess * @modules java.base/jdk.internal.misc * java.compiler * java.management @@ -53,7 +56,13 @@ @Test public void mainClass() { - run(new MainClassJcmdExecutor()); + TestProcessLauncher t = new TestProcessLauncher(Process.class.getName()); + try { + t.launch(); + run(new MainClassJcmdExecutor(Process.class.getName())); + } finally { + t.quit(); + } } @Test @@ -65,4 +74,6 @@ public void jmx() { run(new JMXExecutor()); } + + private static class Process extends TestJavaProcess{} }
--- a/test/hotspot/jtreg/vmTestbase/nsk/share/jpda/DebugeeBinder.java Thu Feb 07 22:15:11 2019 +0100 +++ b/test/hotspot/jtreg/vmTestbase/nsk/share/jpda/DebugeeBinder.java Fri Feb 08 18:58:44 2019 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -175,7 +175,7 @@ * Make preperation for IOPipe connection before starting debugee VM process. * May change options in the passed <code>argumentHandler</code>. */ - protected void prepareForPipeConnection(DebugeeArgumentHandler argumentHandler) { + public void prepareForPipeConnection(DebugeeArgumentHandler argumentHandler) { if (argumentHandler.isTransportAddressDynamic()) { try { pipeServerSocket = new ServerSocket();
--- a/test/jdk/java/net/httpclient/Response204.java Thu Feb 07 22:15:11 2019 +0100 +++ b/test/jdk/java/net/httpclient/Response204.java Fri Feb 08 18:58:44 2019 +0100 @@ -23,7 +23,7 @@ /** * @test - * @bug 8211437 8216974 + * @bug 8211437 8216974 8218662 * @run main/othervm -Djdk.httpclient.HttpClient.log=headers,requests Response204 * @summary */ @@ -33,12 +33,13 @@ import java.net.http.HttpClient; import java.net.http.HttpRequest; import java.net.http.HttpResponse; -import java.util.*; +import java.net.http.HttpResponse.BodyHandlers; import java.util.concurrent.*; import java.util.concurrent.atomic.AtomicReference; import java.util.logging.*; import java.io.*; import java.net.*; +import static java.net.http.HttpClient.Builder.NO_PROXY; /** * Verify that a 204 response code with no content-length is handled correctly @@ -58,6 +59,7 @@ InetSocketAddress addr = new InetSocketAddress (InetAddress.getLoopbackAddress(), 0); HttpServer server = HttpServer.create (addr, 0); HttpContext ctx = server.createContext ("/test", handler); + server.createContext ("/zero", new ZeroContentLengthHandler()); ExecutorService executor = Executors.newCachedThreadPool(); server.setExecutor (executor); server.start (); @@ -91,12 +93,31 @@ // check for 8216974 Exception error = serverError.get(); if (error != null) throw error; + + // Test 3 + testZeroContentLength(uri.resolve("/zero/xxyy")); + System.out.println ("OK 3"); } finally { server.stop(2); executor.shutdown(); } } + static void testZeroContentLength(URI uri) throws Exception { + System.out.println("--- testZeroContentLength ---"); + HttpClient client = HttpClient.newBuilder().proxy(NO_PROXY).build(); + HttpRequest request = HttpRequest.newBuilder(uri).build(); + HttpResponse<String> response = client.send(request, BodyHandlers.ofString()); + System.out.println("Received response:" + response); + System.out.println("Received headers:" + response.headers()); + if (response.statusCode() != 204) + throw new RuntimeException("Expected 204, got:" + response.statusCode()); + if (response.body() != null && !response.body().equals("")) + throw new RuntimeException("Expected empty response, got: " + response.body()); + if (response.headers().firstValueAsLong("Content-Length").orElse(-1L) != 0L) + throw new RuntimeException("Expected Content-Length:0, in: " + response.headers()); + } + public static boolean error = false; static class Handler implements HttpHandler { @@ -133,4 +154,16 @@ t.close(); } } + + // A handler that returns a 204 with a `Content-Length: 0` header/value + static class ZeroContentLengthHandler implements HttpHandler { + public void handle(HttpExchange t) throws IOException { + try (InputStream is = t.getRequestBody()) { + is.readAllBytes(); + } + t.getResponseHeaders().set("Content-length", "0"); + t.sendResponseHeaders(204, -1); + t.close(); + } + } }
--- a/test/jdk/java/net/httpclient/SpecialHeadersTest.java Thu Feb 07 22:15:11 2019 +0100 +++ b/test/jdk/java/net/httpclient/SpecialHeadersTest.java Fri Feb 08 18:58:44 2019 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,7 +25,7 @@ * @test * @summary Verify that some special headers - such as User-Agent * can be specified by the caller. - * @bug 8203771 + * @bug 8203771 8218546 * @modules java.base/sun.net.www.http * java.net.http/jdk.internal.net.http.common * java.net.http/jdk.internal.net.http.frame @@ -64,8 +64,6 @@ import java.net.http.HttpRequest; import java.net.http.HttpResponse; import java.net.http.HttpResponse.BodyHandlers; -import java.security.AccessController; -import java.security.PrivilegedAction; import java.time.Duration; import java.util.ArrayList; import java.util.Arrays; @@ -74,13 +72,13 @@ import java.util.Map; import java.util.Optional; import java.util.function.Function; - -import static java.lang.System.err; import static java.lang.System.out; import static java.net.http.HttpClient.Builder.NO_PROXY; +import static java.net.http.HttpClient.Version.HTTP_2; import static java.nio.charset.StandardCharsets.US_ASCII; import org.testng.Assert; import static org.testng.Assert.assertEquals; +import static org.testng.Assert.assertTrue; public class SpecialHeadersTest implements HttpServerAdapters { @@ -151,7 +149,11 @@ "USER-AGENT", u -> userAgent(), "HOST", u -> u.getRawAuthority()); @Test(dataProvider = "variants") - void test(String uriString, String headerNameAndValue, boolean sameClient) throws Exception { + void test(String uriString, + String headerNameAndValue, + boolean sameClient) + throws Exception + { out.println("\n--- Starting "); int index = headerNameAndValue.indexOf(":"); @@ -183,21 +185,41 @@ assertEquals(resp.statusCode(), 200, "Expected 200, got:" + resp.statusCode()); - String receivedHeaderString = value == null ? null - : resp.headers().firstValue("X-"+key).get(); - out.println("Got X-" + key + ": " + resp.headers().allValues("X-"+key)); - if (value != null) { - assertEquals(receivedHeaderString, value); - assertEquals(resp.headers().allValues("X-"+key), List.of(value)); + boolean isInitialRequest = i == 0; + boolean isSecure = uri.getScheme().equalsIgnoreCase("https"); + boolean isHTTP2 = resp.version() == HTTP_2; + boolean isNotH2CUpgrade = isSecure || (sameClient == true && !isInitialRequest); + boolean isDefaultHostHeader = name.equalsIgnoreCase("host") && useDefault; + + // By default, HTTP/2 sets the `:authority:` pseudo-header, instead + // of the `Host` header. Therefore, there should be no "X-Host" + // header in the response, except the response to the h2c Upgrade + // request which will have been sent through HTTP/1.1. + + if (isDefaultHostHeader && isHTTP2 && isNotH2CUpgrade) { + assertTrue(resp.headers().firstValue("X-" + key).isEmpty()); + assertTrue(resp.headers().allValues("X-" + key).isEmpty()); + out.println("No X-" + key + " header received, as expected"); } else { - assertEquals(resp.headers().allValues("X-"+key).size(), 0); + String receivedHeaderString = value == null ? null + : resp.headers().firstValue("X-"+key).get(); + out.println("Got X-" + key + ": " + resp.headers().allValues("X-"+key)); + if (value != null) { + assertEquals(receivedHeaderString, value); + assertEquals(resp.headers().allValues("X-"+key), List.of(value)); + } else { + assertEquals(resp.headers().allValues("X-"+key).size(), 0); + } } - } } @Test(dataProvider = "variants") - void testHomeMadeIllegalHeader(String uriString, String headerNameAndValue, boolean sameClient) throws Exception { + void testHomeMadeIllegalHeader(String uriString, + String headerNameAndValue, + boolean sameClient) + throws Exception + { out.println("\n--- Starting "); final URI uri = URI.create(uriString); @@ -266,6 +288,11 @@ } HttpRequest request = requestBuilder.build(); + boolean isInitialRequest = i == 0; + boolean isSecure = uri.getScheme().equalsIgnoreCase("https"); + boolean isNotH2CUpgrade = isSecure || (sameClient == true && !isInitialRequest); + boolean isDefaultHostHeader = name.equalsIgnoreCase("host") && useDefault; + client.sendAsync(request, BodyHandlers.ofString()) .thenApply(response -> { out.println("Got response: " + response); @@ -273,15 +300,27 @@ assertEquals(response.statusCode(), 200); return response;}) .thenAccept(resp -> { - String receivedHeaderString = value == null ? null - : resp.headers().firstValue("X-"+key).get(); - out.println("Got X-" + key + ": " + resp.headers().allValues("X-"+key)); - if (value != null) { - assertEquals(receivedHeaderString, value); - assertEquals(resp.headers().allValues("X-" + key), List.of(value)); + // By default, HTTP/2 sets the `:authority:` pseudo-header, instead + // of the `Host` header. Therefore, there should be no "X-Host" + // header in the response, except the response to the h2c Upgrade + // request which will have been sent through HTTP/1.1. + + if (isDefaultHostHeader && resp.version() == HTTP_2 && isNotH2CUpgrade) { + assertTrue(resp.headers().firstValue("X-" + key).isEmpty()); + assertTrue(resp.headers().allValues("X-" + key).isEmpty()); + out.println("No X-" + key + " header received, as expected"); } else { - assertEquals(resp.headers().allValues("X-" + key).size(), 1); - } }) + String receivedHeaderString = value == null ? null + : resp.headers().firstValue("X-"+key).get(); + out.println("Got X-" + key + ": " + resp.headers().allValues("X-"+key)); + if (value != null) { + assertEquals(receivedHeaderString, value); + assertEquals(resp.headers().allValues("X-" + key), List.of(value)); + } else { + assertEquals(resp.headers().allValues("X-" + key).size(), 1); + } + } + }) .join(); } }
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/jdk/sun/tools/jcmd/TestProcess.java Fri Feb 08 18:58:44 2019 +0100 @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package test; + +public class TestProcess { + + public static void main(String[] args) throws Exception { + System.out.print("The process started, pid:" + ProcessHandle.current().pid()); + while(true) { + Thread.sleep(100); + } + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/jdk/sun/tools/jcmd/TestProcessHelper.java Fri Feb 08 18:58:44 2019 +0100 @@ -0,0 +1,259 @@ +/* + * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +import jdk.internal.module.ModuleInfoWriter; +import jdk.test.lib.JDKToolFinder; +import jdk.test.lib.process.ProcessTools; +import jdk.test.lib.util.JarUtils; +import sun.tools.common.ProcessHelper; + +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.lang.module.ModuleDescriptor; +import java.nio.file.FileSystems; +import java.nio.file.Files; +import java.nio.file.Path; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.jar.Attributes; +import java.util.jar.JarEntry; +import java.util.jar.JarOutputStream; +import java.util.jar.Manifest; +import java.util.stream.Collectors; +import java.util.stream.Stream; + +/* + * @test + * @bug 8205654 + * @summary Unit test for sun.tools.ProcessHelper class. The test launches Java processes with different Java options + * and checks that sun.tools.ProcessHelper.getMainClass(pid) method returns a correct main class. return a . + * + * @requires os.family == "linux" + * @library /test/lib + * @modules jdk.jcmd/sun.tools.common + * java.base/jdk.internal.module + * @build test.TestProcess + * @run main/othervm TestProcessHelper + */ +public class TestProcessHelper { + + private ProcessHelper PROCESS_HELPER = ProcessHelper.platformProcessHelper(); + + private static final String TEST_PROCESS_MAIN_CLASS_NAME = "TestProcess"; + private static final String TEST_PROCESS_MAIN_CLASS_PACKAGE = "test"; + private static final String TEST_PROCESS_MAIN_CLASS = TEST_PROCESS_MAIN_CLASS_PACKAGE + "." + + TEST_PROCESS_MAIN_CLASS_NAME; + private static final Path TEST_CLASSES = FileSystems.getDefault().getPath(System.getProperty("test.classes")); + private static final Path USER_DIR = FileSystems.getDefault().getPath(System.getProperty("user.dir", ".")); + private static final Path TEST_MODULES = USER_DIR.resolve("testmodules"); + private static final String JAVA_PATH = JDKToolFinder.getJDKTool("java"); + private static final Path TEST_CLASS = TEST_CLASSES.resolve(TEST_PROCESS_MAIN_CLASS_PACKAGE) + .resolve(TEST_PROCESS_MAIN_CLASS_NAME + ".class"); + + private static final String[] CP_OPTIONS = {"-cp", "-classpath", "--class-path"}; + private static final String[][] VM_ARGS = {{}, {"-Dtest1=aaa"}, {"-Dtest1=aaa", "-Dtest2=bbb"}}; + private static final String[][] ARGS = {{}, {"param1"}, {"param1", "param2"}}; + private static final String[] MP_OPTIONS = {"-p", "--module-path"}; + private static final String[] MODULE_OPTIONS = {"-m", "--module"}; + private static final String JAR_OPTION = "-jar"; + private static final String MODULE_NAME = "module1"; + + + public static void main(String[] args) throws Exception { + new TestProcessHelper().runTests(); + } + + public void runTests() throws Exception { + testClassPath(); + testJar(); + testModule(); + } + + // Test Java processes that are started with -classpath, -cp, or --class-path options + // and with different combinations of VM and program args. + private void testClassPath() throws Exception { + for (String cp : CP_OPTIONS) { + for (String[] vma : VM_ARGS) { + for (String[] arg : ARGS) { + List<String> cmd = new LinkedList<>(); + cmd.add(JAVA_PATH); + cmd.add(cp); + cmd.add(TEST_CLASSES.toAbsolutePath().toString()); + for (String v : vma) { + cmd.add(v); + } + cmd.add(TEST_PROCESS_MAIN_CLASS); + for (String a : arg) { + cmd.add(a); + } + testProcessHelper(cmd); + } + } + } + } + + // Test Java processes that are started with -jar option + // and with different combinations of VM and program args. + private void testJar() throws Exception { + File jarFile = prepareJar(); + for (String[] vma : VM_ARGS) { + for (String[] arg : ARGS) { + List<String> cmd = new LinkedList<>(); + cmd.add(JAVA_PATH); + for (String v : vma) { + cmd.add(v); + } + cmd.add(JAR_OPTION); + cmd.add(jarFile.getAbsolutePath()); + for (String a : arg) { + cmd.add(a); + } + testProcessHelper(cmd); + } + } + + } + + // Test Java processes that are started with -m or --module options + // and with different combination of VM and program args. + private void testModule() throws Exception { + prepareModule(); + for (String mp : MP_OPTIONS) { + for (String m : MODULE_OPTIONS) { + for (String[] vma : VM_ARGS) { + for (String[] arg : ARGS) { + List<String> cmd = new LinkedList<>(); + cmd.add(JAVA_PATH); + cmd.add(mp); + cmd.add(TEST_MODULES.toAbsolutePath().toString()); + for (String v : vma) { + cmd.add(v); + } + cmd.add(m); + cmd.add(MODULE_NAME + "/" + TEST_PROCESS_MAIN_CLASS); + for (String a : arg) { + cmd.add(a); + } + testProcessHelper(cmd); + } + } + } + } + } + + private void checkMainClass(Process p, String expectedMainClass) { + String mainClass = PROCESS_HELPER.getMainClass(Long.toString(p.pid())); + p.destroyForcibly(); + if (!expectedMainClass.equals(mainClass)) { + throw new RuntimeException("Main class is wrong: " + mainClass); + } + } + + private void testProcessHelper(List<String> args) throws Exception { + ProcessBuilder pb = new ProcessBuilder(args); + String cmd = pb.command().stream().collect(Collectors.joining(" ")); + System.out.println("Starting the process:" + cmd); + Process p = ProcessTools.startProcess("test", pb); + if (!p.isAlive()) { + throw new RuntimeException("Cannot start the process: " + cmd); + } + checkMainClass(p, TEST_PROCESS_MAIN_CLASS); + } + + private File prepareJar() throws Exception { + Path jarFile = USER_DIR.resolve("testprocess.jar"); + Manifest manifest = createManifest(); + JarUtils.createJarFile(jarFile, manifest, TEST_CLASSES, TEST_CLASS); + return jarFile.toFile(); + } + + private void prepareModule() throws Exception { + TEST_MODULES.toFile().mkdirs(); + Path moduleJar = TEST_MODULES.resolve("mod1.jar"); + ModuleDescriptor md = createModuleDescriptor(); + createModuleJarFile(moduleJar, md, TEST_CLASSES, TEST_CLASS); + } + + private Manifest createManifest() { + Manifest manifest = new Manifest(); + manifest.getMainAttributes().put(Attributes.Name.MANIFEST_VERSION, "1.0"); + manifest.getMainAttributes().put(Attributes.Name.MAIN_CLASS, TEST_PROCESS_MAIN_CLASS); + return manifest; + } + + private ModuleDescriptor createModuleDescriptor() { + ModuleDescriptor.Builder builder + = ModuleDescriptor.newModule(MODULE_NAME).requires("java.base"); + return builder.build(); + } + + private static void createModuleJarFile(Path jarfile, ModuleDescriptor md, Path dir, Path... files) + throws IOException { + + Path parent = jarfile.getParent(); + if (parent != null) { + Files.createDirectories(parent); + } + + List<Path> entries = findAllRegularFiles(dir, files); + + try (OutputStream out = Files.newOutputStream(jarfile); + JarOutputStream jos = new JarOutputStream(out)) { + if (md != null) { + JarEntry je = new JarEntry("module-info.class"); + jos.putNextEntry(je); + ModuleInfoWriter.write(md, jos); + jos.closeEntry(); + } + + for (Path entry : entries) { + String name = toJarEntryName(entry); + jos.putNextEntry(new JarEntry(name)); + Files.copy(dir.resolve(entry), jos); + jos.closeEntry(); + } + } + } + + private static String toJarEntryName(Path file) { + Path normalized = file.normalize(); + return normalized.subpath(0, normalized.getNameCount()) + .toString() + .replace(File.separatorChar, '/'); + } + + private static List<Path> findAllRegularFiles(Path dir, Path[] files) throws IOException { + List<Path> entries = new ArrayList<>(); + for (Path file : files) { + try (Stream<Path> stream = Files.find(dir.resolve(file), Integer.MAX_VALUE, + (p, attrs) -> attrs.isRegularFile())) { + stream.map(dir::relativize) + .forEach(entries::add); + } + } + return entries; + } + +}