mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 14:24:46 +02:00
Merge
This commit is contained in:
commit
4fc510cc89
101 changed files with 777 additions and 346 deletions
1
.hgtags
1
.hgtags
|
@ -495,4 +495,5 @@ e1b3def126240d5433902f3cb0e91a4c27f6db50 jdk-11+18
|
||||||
9816d7cc655e53ba081f938b656e31971b8f097a jdk-11+20
|
9816d7cc655e53ba081f938b656e31971b8f097a jdk-11+20
|
||||||
14708e1acdc3974f4539027cbbcfa6d69f83cf51 jdk-11+21
|
14708e1acdc3974f4539027cbbcfa6d69f83cf51 jdk-11+21
|
||||||
00b16d0457e43d23f6ca5ade6b243edce62750a0 jdk-12+1
|
00b16d0457e43d23f6ca5ade6b243edce62750a0 jdk-12+1
|
||||||
|
9937ef7499dcd7673714517fd5e450410c14ba4e jdk-11+22
|
||||||
69b438908512d3dfef5852c6a843a5778333a309 jdk-12+2
|
69b438908512d3dfef5852c6a843a5778333a309 jdk-12+2
|
||||||
|
|
|
@ -500,7 +500,7 @@ AC_DEFUN_ONCE([HOTSPOT_SETUP_JVM_FEATURES],
|
||||||
|
|
||||||
# Enable features depending on variant.
|
# Enable features depending on variant.
|
||||||
JVM_FEATURES_server="compiler1 compiler2 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci $JVM_FEATURES_aot $JVM_FEATURES_graal"
|
JVM_FEATURES_server="compiler1 compiler2 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci $JVM_FEATURES_aot $JVM_FEATURES_graal"
|
||||||
JVM_FEATURES_client="compiler1 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
|
JVM_FEATURES_client="compiler1 $NON_MINIMAL_FEATURES $JVM_FEATURES"
|
||||||
JVM_FEATURES_core="$NON_MINIMAL_FEATURES $JVM_FEATURES"
|
JVM_FEATURES_core="$NON_MINIMAL_FEATURES $JVM_FEATURES"
|
||||||
JVM_FEATURES_minimal="compiler1 minimal serialgc $JVM_FEATURES $JVM_FEATURES_link_time_opt"
|
JVM_FEATURES_minimal="compiler1 minimal serialgc $JVM_FEATURES $JVM_FEATURES_link_time_opt"
|
||||||
JVM_FEATURES_zero="zero $NON_MINIMAL_FEATURES $JVM_FEATURES"
|
JVM_FEATURES_zero="zero $NON_MINIMAL_FEATURES $JVM_FEATURES"
|
||||||
|
|
|
@ -1015,7 +1015,7 @@ ExecuteWithLog = \
|
||||||
$(call LogCmdlines, Exececuting: [$(strip $2)]) \
|
$(call LogCmdlines, Exececuting: [$(strip $2)]) \
|
||||||
$(call MakeDir, $(dir $(strip $1))) \
|
$(call MakeDir, $(dir $(strip $1))) \
|
||||||
$(call WriteFile, $2, $(strip $1).cmdline) \
|
$(call WriteFile, $2, $(strip $1).cmdline) \
|
||||||
( $(strip $2) > >($(TEE) $(strip $1).log) 2> >($(TEE) $(strip $1).log >&2) || \
|
( $(RM) $(strip $1).log && $(strip $2) > >($(TEE) -a $(strip $1).log) 2> >($(TEE) -a $(strip $1).log >&2) || \
|
||||||
( exitcode=$(DOLLAR)? && \
|
( exitcode=$(DOLLAR)? && \
|
||||||
$(CP) $(strip $1).log $(MAKESUPPORT_OUTPUTDIR)/failure-logs/$(subst /,_,$(patsubst $(OUTPUTDIR)/%,%,$(strip $1))).log && \
|
$(CP) $(strip $1).log $(MAKESUPPORT_OUTPUTDIR)/failure-logs/$(subst /,_,$(patsubst $(OUTPUTDIR)/%,%,$(strip $1))).log && \
|
||||||
$(CP) $(strip $1).cmdline $(MAKESUPPORT_OUTPUTDIR)/failure-logs/$(subst /,_,$(patsubst $(OUTPUTDIR)/%,%,$(strip $1))).cmdline && \
|
$(CP) $(strip $1).cmdline $(MAKESUPPORT_OUTPUTDIR)/failure-logs/$(subst /,_,$(patsubst $(OUTPUTDIR)/%,%,$(strip $1))).cmdline && \
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
# Build tools needed for the JFR source code generation
|
# Build tools needed for the JFR source code generation
|
||||||
|
|
||||||
JFR_TOOLS_SRCDIR := $(TOPDIR)/make/src/classes
|
JFR_TOOLS_SRCDIR := $(TOPDIR)/make/src/classes
|
||||||
JFR_TOOLS_OUTPUTDIR := $(OUTPUTDIR)/buildtools/tools_classes
|
JFR_TOOLS_OUTPUTDIR := $(JVM_VARIANT_OUTPUTDIR)/buildtools/tools_classes
|
||||||
|
|
||||||
$(eval $(call SetupJavaCompiler, GENERATE_JFRBYTECODE, \
|
$(eval $(call SetupJavaCompiler, GENERATE_JFRBYTECODE, \
|
||||||
JAVAC := $(JAVAC), \
|
JAVAC := $(JAVAC), \
|
||||||
|
|
|
@ -470,8 +470,8 @@ int VM_Version_Ext::cpu_extended_brand_string(char* const buf, size_t buf_len) {
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t VM_Version_Ext::cpu_write_support_string(char* const buf, size_t buf_len) {
|
size_t VM_Version_Ext::cpu_write_support_string(char* const buf, size_t buf_len) {
|
||||||
assert(buf != NULL, "buffer is NULL!");
|
guarantee(buf != NULL, "buffer is NULL!");
|
||||||
assert(buf_len > 0, "buffer len not enough!");
|
guarantee(buf_len > 0, "buffer len not enough!");
|
||||||
|
|
||||||
unsigned int flag = 0;
|
unsigned int flag = 0;
|
||||||
unsigned int fi = 0;
|
unsigned int fi = 0;
|
||||||
|
@ -481,8 +481,7 @@ size_t VM_Version_Ext::cpu_write_support_string(char* const buf, size_t buf_len)
|
||||||
#define WRITE_TO_BUF(string) \
|
#define WRITE_TO_BUF(string) \
|
||||||
{ \
|
{ \
|
||||||
int res = jio_snprintf(&buf[written], buf_len - written, "%s%s", prefix, string); \
|
int res = jio_snprintf(&buf[written], buf_len - written, "%s%s", prefix, string); \
|
||||||
if (res < 0 || (size_t) res >= buf_len - 1) { \
|
if (res < 0) { \
|
||||||
buf[buf_len-1] = '\0'; \
|
|
||||||
return buf_len - 1; \
|
return buf_len - 1; \
|
||||||
} \
|
} \
|
||||||
written += res; \
|
written += res; \
|
||||||
|
@ -592,7 +591,7 @@ int VM_Version_Ext::cpu_detailed_description(char* const buf, size_t buf_len) {
|
||||||
_cpuid_info.ext_cpuid1_edx);
|
_cpuid_info.ext_cpuid1_edx);
|
||||||
|
|
||||||
if (outputLen < 0 || (size_t) outputLen >= buf_len - 1) {
|
if (outputLen < 0 || (size_t) outputLen >= buf_len - 1) {
|
||||||
buf[buf_len-1] = '\0';
|
if (buf_len > 0) { buf[buf_len-1] = '\0'; }
|
||||||
return OS_ERR;
|
return OS_ERR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -63,6 +63,7 @@ class VM_Version_Ext : public VM_Version {
|
||||||
static bool cpu_is_em64t(void);
|
static bool cpu_is_em64t(void);
|
||||||
static bool is_netburst(void);
|
static bool is_netburst(void);
|
||||||
|
|
||||||
|
// Returns bytes written excluding termninating null byte.
|
||||||
static size_t cpu_write_support_string(char* const buf, size_t buf_len);
|
static size_t cpu_write_support_string(char* const buf, size_t buf_len);
|
||||||
static void resolve_cpu_information_details(void);
|
static void resolve_cpu_information_details(void);
|
||||||
static jlong max_qualified_cpu_freq_from_brand_string(void);
|
static jlong max_qualified_cpu_freq_from_brand_string(void);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
//
|
//
|
||||||
// Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
|
// Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
// DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
// DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
//
|
//
|
||||||
// This code is free software; you can redistribute it and/or modify it
|
// This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -1444,6 +1444,7 @@ const bool Matcher::match_rule_supported_vector(int opcode, int vlen) {
|
||||||
case Op_CMoveVF:
|
case Op_CMoveVF:
|
||||||
if (vlen != 8)
|
if (vlen != 8)
|
||||||
ret_value = false;
|
ret_value = false;
|
||||||
|
break;
|
||||||
case Op_CMoveVD:
|
case Op_CMoveVD:
|
||||||
if (vlen != 4)
|
if (vlen != 4)
|
||||||
ret_value = false;
|
ret_value = false;
|
||||||
|
|
|
@ -2093,7 +2093,9 @@ void os::get_summary_os_info(char* buf, size_t buflen) {
|
||||||
// special case for debian
|
// special case for debian
|
||||||
if (file_exists("/etc/debian_version")) {
|
if (file_exists("/etc/debian_version")) {
|
||||||
strncpy(buf, "Debian ", buflen);
|
strncpy(buf, "Debian ", buflen);
|
||||||
|
if (buflen > 7) {
|
||||||
parse_os_info(&buf[7], buflen-7, "/etc/debian_version");
|
parse_os_info(&buf[7], buflen-7, "/etc/debian_version");
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
strncpy(buf, "Linux", buflen);
|
strncpy(buf, "Linux", buflen);
|
||||||
}
|
}
|
||||||
|
@ -2805,8 +2807,8 @@ int os::numa_get_group_id() {
|
||||||
}
|
}
|
||||||
|
|
||||||
int os::Linux::get_existing_num_nodes() {
|
int os::Linux::get_existing_num_nodes() {
|
||||||
size_t node;
|
int node;
|
||||||
size_t highest_node_number = Linux::numa_max_node();
|
int highest_node_number = Linux::numa_max_node();
|
||||||
int num_nodes = 0;
|
int num_nodes = 0;
|
||||||
|
|
||||||
// Get the total number of nodes in the system including nodes without memory.
|
// Get the total number of nodes in the system including nodes without memory.
|
||||||
|
@ -2819,14 +2821,14 @@ int os::Linux::get_existing_num_nodes() {
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t os::numa_get_leaf_groups(int *ids, size_t size) {
|
size_t os::numa_get_leaf_groups(int *ids, size_t size) {
|
||||||
size_t highest_node_number = Linux::numa_max_node();
|
int highest_node_number = Linux::numa_max_node();
|
||||||
size_t i = 0;
|
size_t i = 0;
|
||||||
|
|
||||||
// Map all node ids in which is possible to allocate memory. Also nodes are
|
// Map all node ids in which it is possible to allocate memory. Also nodes are
|
||||||
// not always consecutively available, i.e. available from 0 to the highest
|
// not always consecutively available, i.e. available from 0 to the highest
|
||||||
// node number.
|
// node number.
|
||||||
for (size_t node = 0; node <= highest_node_number; node++) {
|
for (int node = 0; node <= highest_node_number; node++) {
|
||||||
if (Linux::isnode_in_configured_nodes(node)) {
|
if (Linux::isnode_in_configured_nodes((unsigned int)node)) {
|
||||||
ids[i++] = node;
|
ids[i++] = node;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -534,15 +534,14 @@ static char* get_user_name_slow(int vmid, int nspid, TRAPS) {
|
||||||
// directory search
|
// directory search
|
||||||
char* oldest_user = NULL;
|
char* oldest_user = NULL;
|
||||||
time_t oldest_ctime = 0;
|
time_t oldest_ctime = 0;
|
||||||
char buffer[TMP_BUFFER_LEN];
|
char buffer[MAXPATHLEN + 1];
|
||||||
int searchpid;
|
int searchpid;
|
||||||
char* tmpdirname = (char *)os::get_temp_directory();
|
char* tmpdirname = (char *)os::get_temp_directory();
|
||||||
assert(strlen(tmpdirname) == 4, "No longer using /tmp - update buffer size");
|
assert(strlen(tmpdirname) == 4, "No longer using /tmp - update buffer size");
|
||||||
|
|
||||||
if (nspid == -1) {
|
if (nspid == -1) {
|
||||||
searchpid = vmid;
|
searchpid = vmid;
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
jio_snprintf(buffer, MAXPATHLEN, "/proc/%d/root%s", vmid, tmpdirname);
|
jio_snprintf(buffer, MAXPATHLEN, "/proc/%d/root%s", vmid, tmpdirname);
|
||||||
tmpdirname = buffer;
|
tmpdirname = buffer;
|
||||||
searchpid = nspid;
|
searchpid = nspid;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
//
|
//
|
||||||
// Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
|
// Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
// DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
// DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
//
|
//
|
||||||
// This code is free software; you can redistribute it and/or modify it
|
// This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -551,6 +551,10 @@ void ArchDesc::buildMList(MatchNode *node, const char *rootOp,
|
||||||
assert(0, "fatal error");
|
assert(0, "fatal error");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (node == NULL) {
|
||||||
|
fprintf(stderr, "error: node is NULL\n");
|
||||||
|
assert(0, "fatal error");
|
||||||
|
}
|
||||||
// Build MatchLists for children
|
// Build MatchLists for children
|
||||||
// Check each child for an internal operand name, and use that name
|
// Check each child for an internal operand name, and use that name
|
||||||
// for the parent's matchlist entry if it exists
|
// for the parent's matchlist entry if it exists
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -43,7 +43,7 @@ void Chunk::chop() {
|
||||||
while( k ) {
|
while( k ) {
|
||||||
Chunk *tmp = k->_next;
|
Chunk *tmp = k->_next;
|
||||||
// clear out this chunk (to detect allocation bugs)
|
// clear out this chunk (to detect allocation bugs)
|
||||||
memset(k, 0xBAADBABE, k->_len);
|
memset(k, 0xBE, k->_len);
|
||||||
free(k); // Free chunk (was malloc'd)
|
free(k); // Free chunk (was malloc'd)
|
||||||
k = tmp;
|
k = tmp;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -503,8 +503,10 @@ class dfa_shared_preds {
|
||||||
return true;
|
return true;
|
||||||
case '|':
|
case '|':
|
||||||
if (prev != pred && *(prev-1) == '|') return true;
|
if (prev != pred && *(prev-1) == '|') return true;
|
||||||
|
break;
|
||||||
case '&':
|
case '&':
|
||||||
if (prev != pred && *(prev-1) == '&') return true;
|
if (prev != pred && *(prev-1) == '&') return true;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -719,19 +721,19 @@ const char *Expr::compute_external(const Expr *c1, const Expr *c2) {
|
||||||
if( c1->_external_name != NULL ) {
|
if( c1->_external_name != NULL ) {
|
||||||
sprintf(string_buffer, "%s", c1->as_string());
|
sprintf(string_buffer, "%s", c1->as_string());
|
||||||
if( !c2->is_zero() ) {
|
if( !c2->is_zero() ) {
|
||||||
strcat( string_buffer, "+");
|
strncat(string_buffer, "+", STRING_BUFFER_LENGTH);
|
||||||
strcat( string_buffer, c2->as_string());
|
strncat(string_buffer, c2->as_string(), STRING_BUFFER_LENGTH);
|
||||||
}
|
}
|
||||||
result = strdup(string_buffer);
|
result = strdup(string_buffer);
|
||||||
}
|
}
|
||||||
else if( c2->_external_name != NULL ) {
|
else if( c2->_external_name != NULL ) {
|
||||||
if( !c1->is_zero() ) {
|
if( !c1->is_zero() ) {
|
||||||
sprintf(string_buffer, "%s", c1->as_string());
|
sprintf(string_buffer, "%s", c1->as_string());
|
||||||
strcat( string_buffer, " + ");
|
strncat(string_buffer, " + ", STRING_BUFFER_LENGTH);
|
||||||
} else {
|
} else {
|
||||||
string_buffer[0] = '\0';
|
string_buffer[0] = '\0';
|
||||||
}
|
}
|
||||||
strcat( string_buffer, c2->_external_name );
|
strncat(string_buffer, c2->_external_name, STRING_BUFFER_LENGTH);
|
||||||
result = strdup(string_buffer);
|
result = strdup(string_buffer);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
|
@ -741,8 +743,8 @@ const char *Expr::compute_expr(const Expr *c1, const Expr *c2) {
|
||||||
if( !c1->is_zero() ) {
|
if( !c1->is_zero() ) {
|
||||||
sprintf( string_buffer, "%s", c1->_expr);
|
sprintf( string_buffer, "%s", c1->_expr);
|
||||||
if( !c2->is_zero() ) {
|
if( !c2->is_zero() ) {
|
||||||
strcat( string_buffer, "+");
|
strncat(string_buffer, "+", STRING_BUFFER_LENGTH);
|
||||||
strcat( string_buffer, c2->_expr);
|
strncat(string_buffer, c2->_expr, STRING_BUFFER_LENGTH);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if( !c2->is_zero() ) {
|
else if( !c2->is_zero() ) {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -95,8 +95,11 @@ void FileBuff::file_error(int flag, int linenum, const char *fmt, ...)
|
||||||
va_start(args, fmt);
|
va_start(args, fmt);
|
||||||
switch (flag) {
|
switch (flag) {
|
||||||
case 0: _AD._warnings += _AD.emit_msg(0, flag, linenum, fmt, args);
|
case 0: _AD._warnings += _AD.emit_msg(0, flag, linenum, fmt, args);
|
||||||
|
break;
|
||||||
case 1: _AD._syntax_errs += _AD.emit_msg(0, flag, linenum, fmt, args);
|
case 1: _AD._syntax_errs += _AD.emit_msg(0, flag, linenum, fmt, args);
|
||||||
|
break;
|
||||||
case 2: _AD._semantic_errs += _AD.emit_msg(0, flag, linenum, fmt, args);
|
case 2: _AD._semantic_errs += _AD.emit_msg(0, flag, linenum, fmt, args);
|
||||||
|
break;
|
||||||
default: assert(0, ""); break;
|
default: assert(0, ""); break;
|
||||||
}
|
}
|
||||||
va_end(args);
|
va_end(args);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -3634,7 +3634,7 @@ int MatchNode::cisc_spill_match(FormDict& globals, RegisterForm* registers, Matc
|
||||||
&& (is_load_from_memory(mRule2->_opType) == data_type) // reg vs. (load memory)
|
&& (is_load_from_memory(mRule2->_opType) == data_type) // reg vs. (load memory)
|
||||||
&& (name_left != NULL) // NOT (load)
|
&& (name_left != NULL) // NOT (load)
|
||||||
&& (name_right == NULL) ) { // NOT (load memory foo)
|
&& (name_right == NULL) ) { // NOT (load memory foo)
|
||||||
const Form *form2_left = name_left ? globals[name_left] : NULL;
|
const Form *form2_left = globals[name_left];
|
||||||
if( form2_left && form2_left->is_cisc_mem(globals) ) {
|
if( form2_left && form2_left->is_cisc_mem(globals) ) {
|
||||||
cisc_spillable = Is_cisc_spillable;
|
cisc_spillable = Is_cisc_spillable;
|
||||||
operand = _name;
|
operand = _name;
|
||||||
|
@ -3645,7 +3645,7 @@ int MatchNode::cisc_spill_match(FormDict& globals, RegisterForm* registers, Matc
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Detect reg vs memory
|
// Detect reg vs memory
|
||||||
else if( form->is_cisc_reg(globals) && form2->is_cisc_mem(globals) ) {
|
else if (form->is_cisc_reg(globals) && form2 != NULL && form2->is_cisc_mem(globals)) {
|
||||||
cisc_spillable = Is_cisc_spillable;
|
cisc_spillable = Is_cisc_spillable;
|
||||||
operand = _name;
|
operand = _name;
|
||||||
reg_type = _result;
|
reg_type = _result;
|
||||||
|
@ -3710,8 +3710,12 @@ int MatchRule::matchrule_cisc_spill_match(FormDict& globals, RegisterForm* regi
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check right operands: recursive walk to identify reg->mem operand
|
// Check right operands: recursive walk to identify reg->mem operand
|
||||||
if( (_rChild == NULL) && (mRule2->_rChild == NULL) ) {
|
if (_rChild == NULL) {
|
||||||
|
if (mRule2->_rChild == NULL) {
|
||||||
right_spillable = Maybe_cisc_spillable;
|
right_spillable = Maybe_cisc_spillable;
|
||||||
|
} else {
|
||||||
|
assert(0, "_rChild should not be NULL");
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
right_spillable = _rChild->cisc_spill_match(globals, registers, mRule2->_rChild, operand, reg_type);
|
right_spillable = _rChild->cisc_spill_match(globals, registers, mRule2->_rChild, operand, reg_type);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -142,7 +142,7 @@ int main(int argc, char *argv[])
|
||||||
const char *base = strip_ext(strdup(argv[i]));
|
const char *base = strip_ext(strdup(argv[i]));
|
||||||
char *temp = base_plus_suffix("dfa_",base);
|
char *temp = base_plus_suffix("dfa_",base);
|
||||||
AD._DFA_file._name = base_plus_suffix(temp,".cpp");
|
AD._DFA_file._name = base_plus_suffix(temp,".cpp");
|
||||||
delete temp;
|
delete[] temp;
|
||||||
temp = base_plus_suffix("ad_",base);
|
temp = base_plus_suffix("ad_",base);
|
||||||
AD._CPP_file._name = base_plus_suffix(temp,".cpp");
|
AD._CPP_file._name = base_plus_suffix(temp,".cpp");
|
||||||
AD._CPP_CLONE_file._name = base_plus_suffix(temp,"_clone.cpp");
|
AD._CPP_CLONE_file._name = base_plus_suffix(temp,"_clone.cpp");
|
||||||
|
@ -153,13 +153,13 @@ int main(int argc, char *argv[])
|
||||||
AD._CPP_PEEPHOLE_file._name = base_plus_suffix(temp,"_peephole.cpp");
|
AD._CPP_PEEPHOLE_file._name = base_plus_suffix(temp,"_peephole.cpp");
|
||||||
AD._CPP_PIPELINE_file._name = base_plus_suffix(temp,"_pipeline.cpp");
|
AD._CPP_PIPELINE_file._name = base_plus_suffix(temp,"_pipeline.cpp");
|
||||||
AD._HPP_file._name = base_plus_suffix(temp,".hpp");
|
AD._HPP_file._name = base_plus_suffix(temp,".hpp");
|
||||||
delete temp;
|
delete[] temp;
|
||||||
temp = base_plus_suffix("adGlobals_",base);
|
temp = base_plus_suffix("adGlobals_",base);
|
||||||
AD._VM_file._name = base_plus_suffix(temp,".hpp");
|
AD._VM_file._name = base_plus_suffix(temp,".hpp");
|
||||||
delete temp;
|
delete[] temp;
|
||||||
temp = base_plus_suffix("bugs_",base);
|
temp = base_plus_suffix("bugs_",base);
|
||||||
AD._bug_file._name = base_plus_suffix(temp,".out");
|
AD._bug_file._name = base_plus_suffix(temp,".out");
|
||||||
delete temp;
|
delete[] temp;
|
||||||
} // End of files vs options...
|
} // End of files vs options...
|
||||||
} // End of while have command line arguments
|
} // End of while have command line arguments
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -1936,6 +1936,7 @@ public:
|
||||||
_AD.syntax_err( _ins_encode._linenum,
|
_AD.syntax_err( _ins_encode._linenum,
|
||||||
"Parameter %s not passed to enc_class %s from instruct %s.\n",
|
"Parameter %s not passed to enc_class %s from instruct %s.\n",
|
||||||
rep_var, _encoding._name, _inst._ident);
|
rep_var, _encoding._name, _inst._ident);
|
||||||
|
assert(false, "inst_rep_var == NULL, cannot continue.");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check if instruction's actual parameter is a local name in the instruction
|
// Check if instruction's actual parameter is a local name in the instruction
|
||||||
|
@ -1976,7 +1977,7 @@ public:
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// Check for unimplemented functionality before hard failure
|
// Check for unimplemented functionality before hard failure
|
||||||
assert( strcmp(opc->_ident,"label")==0, "Unimplemented() Label");
|
assert(opc != NULL && strcmp(opc->_ident, "label") == 0, "Unimplemented Label");
|
||||||
assert(false, "ShouldNotReachHere()");
|
assert(false, "ShouldNotReachHere()");
|
||||||
}
|
}
|
||||||
} // done checking which operand this is.
|
} // done checking which operand this is.
|
||||||
|
@ -2450,7 +2451,7 @@ private:
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// Check for unimplemented functionality before hard failure
|
// Check for unimplemented functionality before hard failure
|
||||||
assert( strcmp(opc->_ident,"label")==0, "Unimplemented() Label");
|
assert(opc != NULL && strcmp(opc->_ident, "label") == 0, "Unimplemented Label");
|
||||||
assert(false, "ShouldNotReachHere()");
|
assert(false, "ShouldNotReachHere()");
|
||||||
}
|
}
|
||||||
// all done
|
// all done
|
||||||
|
@ -3305,16 +3306,19 @@ void ArchDesc::defineClasses(FILE *fp) {
|
||||||
// Output the definitions for machine node specific pipeline data
|
// Output the definitions for machine node specific pipeline data
|
||||||
_machnodes.reset();
|
_machnodes.reset();
|
||||||
|
|
||||||
|
if (_pipeline != NULL) {
|
||||||
for ( ; (machnode = (MachNodeForm*)_machnodes.iter()) != NULL; ) {
|
for ( ; (machnode = (MachNodeForm*)_machnodes.iter()) != NULL; ) {
|
||||||
fprintf(_CPP_PIPELINE_file._fp, "const Pipeline * %sNode::pipeline() const { return (&pipeline_class_%03d); }\n",
|
fprintf(_CPP_PIPELINE_file._fp, "const Pipeline * %sNode::pipeline() const { return (&pipeline_class_%03d); }\n",
|
||||||
machnode->_ident, ((class PipeClassForm *)_pipeline->_classdict[machnode->_machnode_pipe])->_num);
|
machnode->_ident, ((class PipeClassForm *)_pipeline->_classdict[machnode->_machnode_pipe])->_num);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
fprintf(_CPP_PIPELINE_file._fp, "\n");
|
fprintf(_CPP_PIPELINE_file._fp, "\n");
|
||||||
|
|
||||||
// Output the definitions for instruction pipeline static data references
|
// Output the definitions for instruction pipeline static data references
|
||||||
_instructions.reset();
|
_instructions.reset();
|
||||||
|
|
||||||
|
if (_pipeline != NULL) {
|
||||||
for ( ; (instr = (InstructForm*)_instructions.iter()) != NULL; ) {
|
for ( ; (instr = (InstructForm*)_instructions.iter()) != NULL; ) {
|
||||||
if (instr->_ins_pipe && _pipeline->_classlist.search(instr->_ins_pipe)) {
|
if (instr->_ins_pipe && _pipeline->_classlist.search(instr->_ins_pipe)) {
|
||||||
fprintf(_CPP_PIPELINE_file._fp, "\n");
|
fprintf(_CPP_PIPELINE_file._fp, "\n");
|
||||||
|
@ -3325,6 +3329,7 @@ void ArchDesc::defineClasses(FILE *fp) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// -------------------------------- maps ------------------------------------
|
// -------------------------------- maps ------------------------------------
|
||||||
|
|
|
@ -549,7 +549,7 @@ void AOTCodeHeap::link_global_lib_symbols() {
|
||||||
_lib_symbols_initialized = true;
|
_lib_symbols_initialized = true;
|
||||||
|
|
||||||
CollectedHeap* heap = Universe::heap();
|
CollectedHeap* heap = Universe::heap();
|
||||||
SET_AOT_GLOBAL_SYMBOL_VALUE("_aot_card_table_address", address, ci_card_table_address());
|
SET_AOT_GLOBAL_SYMBOL_VALUE("_aot_card_table_address", address, (BarrierSet::barrier_set()->is_a(BarrierSet::CardTableBarrierSet) ? ci_card_table_address() : NULL));
|
||||||
SET_AOT_GLOBAL_SYMBOL_VALUE("_aot_heap_top_address", address, (heap->supports_inline_contig_alloc() ? heap->top_addr() : NULL));
|
SET_AOT_GLOBAL_SYMBOL_VALUE("_aot_heap_top_address", address, (heap->supports_inline_contig_alloc() ? heap->top_addr() : NULL));
|
||||||
SET_AOT_GLOBAL_SYMBOL_VALUE("_aot_heap_end_address", address, (heap->supports_inline_contig_alloc() ? heap->end_addr() : NULL));
|
SET_AOT_GLOBAL_SYMBOL_VALUE("_aot_heap_end_address", address, (heap->supports_inline_contig_alloc() ? heap->end_addr() : NULL));
|
||||||
SET_AOT_GLOBAL_SYMBOL_VALUE("_aot_polling_page", address, os::get_polling_page());
|
SET_AOT_GLOBAL_SYMBOL_VALUE("_aot_polling_page", address, os::get_polling_page());
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -187,7 +187,7 @@ void CodeBuffer::freeze_section(CodeSection* cs) {
|
||||||
cs->_limit = new_limit;
|
cs->_limit = new_limit;
|
||||||
cs->_locs_limit = new_locs_limit;
|
cs->_locs_limit = new_locs_limit;
|
||||||
cs->_frozen = true;
|
cs->_frozen = true;
|
||||||
if (!next_cs->is_allocated() && !next_cs->is_frozen()) {
|
if (next_cs != NULL && !next_cs->is_allocated() && !next_cs->is_frozen()) {
|
||||||
// Give remaining buffer space to the following section.
|
// Give remaining buffer space to the following section.
|
||||||
next_cs->initialize(new_limit, old_limit - new_limit);
|
next_cs->initialize(new_limit, old_limit - new_limit);
|
||||||
next_cs->initialize_shared_locs(new_locs_limit,
|
next_cs->initialize_shared_locs(new_locs_limit,
|
||||||
|
@ -494,11 +494,14 @@ void CodeBuffer::compute_final_layout(CodeBuffer* dest) const {
|
||||||
// Compute initial padding; assign it to the previous non-empty guy.
|
// Compute initial padding; assign it to the previous non-empty guy.
|
||||||
// Cf. figure_expanded_capacities.
|
// Cf. figure_expanded_capacities.
|
||||||
csize_t padding = cs->align_at_start(buf_offset) - buf_offset;
|
csize_t padding = cs->align_at_start(buf_offset) - buf_offset;
|
||||||
|
if (prev_dest_cs != NULL) {
|
||||||
if (padding != 0) {
|
if (padding != 0) {
|
||||||
buf_offset += padding;
|
buf_offset += padding;
|
||||||
assert(prev_dest_cs != NULL, "sanity");
|
|
||||||
prev_dest_cs->_limit += padding;
|
prev_dest_cs->_limit += padding;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
guarantee(padding == 0, "In first iteration no padding should be needed.");
|
||||||
|
}
|
||||||
#ifdef ASSERT
|
#ifdef ASSERT
|
||||||
if (prev_cs != NULL && prev_cs->is_frozen() && n < (SECT_LIMIT - 1)) {
|
if (prev_cs != NULL && prev_cs->is_frozen() && n < (SECT_LIMIT - 1)) {
|
||||||
// Make sure the ends still match up.
|
// Make sure the ends still match up.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -1386,7 +1386,7 @@ void SubstitutionResolver::block_do(BlockBegin* block) {
|
||||||
n->values_do(this);
|
n->values_do(this);
|
||||||
// need to remove this instruction from the instruction stream
|
// need to remove this instruction from the instruction stream
|
||||||
if (n->subst() != n) {
|
if (n->subst() != n) {
|
||||||
assert(last != NULL, "must have last");
|
guarantee(last != NULL, "must have last");
|
||||||
last->set_next(n->next());
|
last->set_next(n->next());
|
||||||
} else {
|
} else {
|
||||||
last = n;
|
last = n;
|
||||||
|
|
|
@ -2311,7 +2311,9 @@ void LIRGenerator::do_TableSwitch(TableSwitch* x) {
|
||||||
if (compilation()->env()->comp_level() == CompLevel_full_profile && UseSwitchProfiling) {
|
if (compilation()->env()->comp_level() == CompLevel_full_profile && UseSwitchProfiling) {
|
||||||
ciMethod* method = x->state()->scope()->method();
|
ciMethod* method = x->state()->scope()->method();
|
||||||
ciMethodData* md = method->method_data_or_null();
|
ciMethodData* md = method->method_data_or_null();
|
||||||
|
assert(md != NULL, "Sanity");
|
||||||
ciProfileData* data = md->bci_to_data(x->state()->bci());
|
ciProfileData* data = md->bci_to_data(x->state()->bci());
|
||||||
|
assert(data != NULL, "must have profiling data");
|
||||||
assert(data->is_MultiBranchData(), "bad profile data?");
|
assert(data->is_MultiBranchData(), "bad profile data?");
|
||||||
int default_count_offset = md->byte_offset_of_slot(data, MultiBranchData::default_count_offset());
|
int default_count_offset = md->byte_offset_of_slot(data, MultiBranchData::default_count_offset());
|
||||||
LIR_Opr md_reg = new_register(T_METADATA);
|
LIR_Opr md_reg = new_register(T_METADATA);
|
||||||
|
@ -2367,7 +2369,9 @@ void LIRGenerator::do_LookupSwitch(LookupSwitch* x) {
|
||||||
if (compilation()->env()->comp_level() == CompLevel_full_profile && UseSwitchProfiling) {
|
if (compilation()->env()->comp_level() == CompLevel_full_profile && UseSwitchProfiling) {
|
||||||
ciMethod* method = x->state()->scope()->method();
|
ciMethod* method = x->state()->scope()->method();
|
||||||
ciMethodData* md = method->method_data_or_null();
|
ciMethodData* md = method->method_data_or_null();
|
||||||
|
assert(md != NULL, "Sanity");
|
||||||
ciProfileData* data = md->bci_to_data(x->state()->bci());
|
ciProfileData* data = md->bci_to_data(x->state()->bci());
|
||||||
|
assert(data != NULL, "must have profiling data");
|
||||||
assert(data->is_MultiBranchData(), "bad profile data?");
|
assert(data->is_MultiBranchData(), "bad profile data?");
|
||||||
int default_count_offset = md->byte_offset_of_slot(data, MultiBranchData::default_count_offset());
|
int default_count_offset = md->byte_offset_of_slot(data, MultiBranchData::default_count_offset());
|
||||||
LIR_Opr md_reg = new_register(T_METADATA);
|
LIR_Opr md_reg = new_register(T_METADATA);
|
||||||
|
@ -3076,6 +3080,7 @@ void LIRGenerator::profile_arguments(ProfileCall* x) {
|
||||||
if (compilation()->profile_arguments()) {
|
if (compilation()->profile_arguments()) {
|
||||||
int bci = x->bci_of_invoke();
|
int bci = x->bci_of_invoke();
|
||||||
ciMethodData* md = x->method()->method_data_or_null();
|
ciMethodData* md = x->method()->method_data_or_null();
|
||||||
|
assert(md != NULL, "Sanity");
|
||||||
ciProfileData* data = md->bci_to_data(bci);
|
ciProfileData* data = md->bci_to_data(bci);
|
||||||
if (data != NULL) {
|
if (data != NULL) {
|
||||||
if ((data->is_CallTypeData() && data->as_CallTypeData()->has_arguments()) ||
|
if ((data->is_CallTypeData() && data->as_CallTypeData()->has_arguments()) ||
|
||||||
|
@ -3212,6 +3217,7 @@ void LIRGenerator::do_ProfileCall(ProfileCall* x) {
|
||||||
void LIRGenerator::do_ProfileReturnType(ProfileReturnType* x) {
|
void LIRGenerator::do_ProfileReturnType(ProfileReturnType* x) {
|
||||||
int bci = x->bci_of_invoke();
|
int bci = x->bci_of_invoke();
|
||||||
ciMethodData* md = x->method()->method_data_or_null();
|
ciMethodData* md = x->method()->method_data_or_null();
|
||||||
|
assert(md != NULL, "Sanity");
|
||||||
ciProfileData* data = md->bci_to_data(bci);
|
ciProfileData* data = md->bci_to_data(bci);
|
||||||
if (data != NULL) {
|
if (data != NULL) {
|
||||||
assert(data->is_CallTypeData() || data->is_VirtualCallTypeData(), "wrong profile data type");
|
assert(data->is_CallTypeData() || data->is_VirtualCallTypeData(), "wrong profile data type");
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -3954,7 +3954,7 @@ void MoveResolver::resolve_mappings() {
|
||||||
if (!processed_interval) {
|
if (!processed_interval) {
|
||||||
// no move could be processed because there is a cycle in the move list
|
// no move could be processed because there is a cycle in the move list
|
||||||
// (e.g. r1 -> r2, r2 -> r1), so one interval must be spilled to memory
|
// (e.g. r1 -> r2, r2 -> r1), so one interval must be spilled to memory
|
||||||
assert(spill_candidate != -1, "no interval in register for spilling found");
|
guarantee(spill_candidate != -1, "no interval in register for spilling found");
|
||||||
|
|
||||||
// create a new spill interval and assign a stack slot to it
|
// create a new spill interval and assign a stack slot to it
|
||||||
Interval* from_interval = _mapping_from.at(spill_candidate);
|
Interval* from_interval = _mapping_from.at(spill_candidate);
|
||||||
|
@ -6301,7 +6301,8 @@ void ControlFlowOptimizer::delete_unnecessary_jumps(BlockList* code) {
|
||||||
assert(prev_branch->cond() == prev_cmp->condition(), "should be the same");
|
assert(prev_branch->cond() == prev_cmp->condition(), "should be the same");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
assert(prev_cmp != NULL, "should have found comp instruction for branch");
|
// Guarantee because it is dereferenced below.
|
||||||
|
guarantee(prev_cmp != NULL, "should have found comp instruction for branch");
|
||||||
if (prev_branch->block() == code->at(i + 1) && prev_branch->info() == NULL) {
|
if (prev_branch->block() == code->at(i + 1) && prev_branch->info() == NULL) {
|
||||||
|
|
||||||
TRACE_LINEAR_SCAN(3, tty->print_cr("Negating conditional branch and deleting unconditional branch at end of block B%d", block->block_id()));
|
TRACE_LINEAR_SCAN(3, tty->print_cr("Negating conditional branch and deleting unconditional branch at end of block B%d", block->block_id()));
|
||||||
|
|
|
@ -387,7 +387,8 @@ ModuleEntry* ModuleEntryTable::new_entry(unsigned int hash, Handle module_handle
|
||||||
entry->set_is_patched();
|
entry->set_is_patched();
|
||||||
if (log_is_enabled(Trace, module, patch)) {
|
if (log_is_enabled(Trace, module, patch)) {
|
||||||
ResourceMark rm;
|
ResourceMark rm;
|
||||||
log_trace(module, patch)("Marked module %s as patched from --patch-module", name->as_C_string());
|
log_trace(module, patch)("Marked module %s as patched from --patch-module",
|
||||||
|
name != NULL ? name->as_C_string() : UNNAMED_MODULE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1364,7 +1364,6 @@ InstanceKlass* SystemDictionary::load_shared_class(InstanceKlass* ik,
|
||||||
|
|
||||||
// notify a class loaded from shared object
|
// notify a class loaded from shared object
|
||||||
ClassLoadingService::notify_class_loaded(ik, true /* shared class */);
|
ClassLoadingService::notify_class_loaded(ik, true /* shared class */);
|
||||||
}
|
|
||||||
|
|
||||||
ik->set_has_passed_fingerprint_check(false);
|
ik->set_has_passed_fingerprint_check(false);
|
||||||
if (UseAOT && ik->supers_have_passed_fingerprint_checks()) {
|
if (UseAOT && ik->supers_have_passed_fingerprint_checks()) {
|
||||||
|
@ -1378,6 +1377,7 @@ InstanceKlass* SystemDictionary::load_shared_class(InstanceKlass* ik,
|
||||||
log_info(class, fingerprint)("%s : expected = " PTR64_FORMAT " actual = " PTR64_FORMAT, ik->external_name(), aot_fp, cds_fp);
|
log_info(class, fingerprint)("%s : expected = " PTR64_FORMAT " actual = " PTR64_FORMAT, ik->external_name(), aot_fp, cds_fp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return ik;
|
return ik;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -766,10 +766,11 @@ bool SystemDictionaryShared::add_verification_constraint(Klass* k, Symbol* name,
|
||||||
SharedDictionaryEntry* entry = ((SharedDictionary*)(k->class_loader_data()->dictionary()))->find_entry_for(k);
|
SharedDictionaryEntry* entry = ((SharedDictionary*)(k->class_loader_data()->dictionary()))->find_entry_for(k);
|
||||||
ResourceMark rm;
|
ResourceMark rm;
|
||||||
// Lambda classes are not archived and will be regenerated at runtime.
|
// Lambda classes are not archived and will be regenerated at runtime.
|
||||||
if (entry == NULL && strstr(k->name()->as_C_string(), "Lambda$") != NULL) {
|
if (entry == NULL) {
|
||||||
|
guarantee(strstr(k->name()->as_C_string(), "Lambda$") != NULL,
|
||||||
|
"class should be in dictionary before being verified");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
assert(entry != NULL, "class should be in dictionary before being verified");
|
|
||||||
entry->add_verification_constraint(name, from_name, from_field_is_protected,
|
entry->add_verification_constraint(name, from_name, from_field_is_protected,
|
||||||
from_is_array, from_is_object);
|
from_is_array, from_is_object);
|
||||||
if (entry->is_builtin()) {
|
if (entry->is_builtin()) {
|
||||||
|
|
|
@ -719,7 +719,8 @@ void ClassVerifier::verify_method(const methodHandle& m, TRAPS) {
|
||||||
ResourceMark rm(THREAD);
|
ResourceMark rm(THREAD);
|
||||||
LogStream ls(lt);
|
LogStream ls(lt);
|
||||||
current_frame.print_on(&ls);
|
current_frame.print_on(&ls);
|
||||||
lt.print("offset = %d, opcode = %s", bci, Bytecodes::name(opcode));
|
lt.print("offset = %d, opcode = %s", bci,
|
||||||
|
opcode == Bytecodes::_illegal ? "illegal" : Bytecodes::name(opcode));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Make sure wide instruction is in correct format
|
// Make sure wide instruction is in correct format
|
||||||
|
|
|
@ -1363,22 +1363,22 @@ void CodeCache::report_codemem_full(int code_blob_type, bool print) {
|
||||||
const char *msg1 = msg1_stream.as_string();
|
const char *msg1 = msg1_stream.as_string();
|
||||||
const char *msg2 = msg2_stream.as_string();
|
const char *msg2 = msg2_stream.as_string();
|
||||||
|
|
||||||
log_warning(codecache)(msg1);
|
log_warning(codecache)("%s", msg1);
|
||||||
log_warning(codecache)(msg2);
|
log_warning(codecache)("%s", msg2);
|
||||||
warning(msg1);
|
warning("%s", msg1);
|
||||||
warning(msg2);
|
warning("%s", msg2);
|
||||||
} else {
|
} else {
|
||||||
const char *msg1 = "CodeCache is full. Compiler has been disabled.";
|
const char *msg1 = "CodeCache is full. Compiler has been disabled.";
|
||||||
const char *msg2 = "Try increasing the code cache size using -XX:ReservedCodeCacheSize=";
|
const char *msg2 = "Try increasing the code cache size using -XX:ReservedCodeCacheSize=";
|
||||||
|
|
||||||
log_warning(codecache)(msg1);
|
log_warning(codecache)("%s", msg1);
|
||||||
log_warning(codecache)(msg2);
|
log_warning(codecache)("%s", msg2);
|
||||||
warning(msg1);
|
warning("%s", msg1);
|
||||||
warning(msg2);
|
warning("%s", msg2);
|
||||||
}
|
}
|
||||||
ResourceMark rm;
|
ResourceMark rm;
|
||||||
stringStream s;
|
stringStream s;
|
||||||
// Dump code cache into a buffer before locking the tty,
|
// Dump code cache into a buffer before locking the tty.
|
||||||
{
|
{
|
||||||
MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag);
|
MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag);
|
||||||
print_summary(&s);
|
print_summary(&s);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2002, 2017, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -217,14 +217,17 @@ void CompileLog::finish_log_on_error(outputStream* file, char* buf, int buflen)
|
||||||
file->print_raw_cr("'>");
|
file->print_raw_cr("'>");
|
||||||
|
|
||||||
size_t nr; // number read into buf from partial log
|
size_t nr; // number read into buf from partial log
|
||||||
|
// In case of unsuccessful completion, read returns -1.
|
||||||
|
ssize_t bytes_read;
|
||||||
// Copy data up to the end of the last <event> element:
|
// Copy data up to the end of the last <event> element:
|
||||||
julong to_read = log->_file_end;
|
julong to_read = log->_file_end;
|
||||||
while (to_read > 0) {
|
while (to_read > 0) {
|
||||||
if (to_read < (julong)buflen)
|
if (to_read < (julong)buflen)
|
||||||
nr = (size_t)to_read;
|
nr = (size_t)to_read;
|
||||||
else nr = buflen;
|
else nr = buflen;
|
||||||
nr = read(partial_fd, buf, (int)nr);
|
bytes_read = read(partial_fd, buf, (int)nr);
|
||||||
if (nr <= 0) break;
|
if (bytes_read <= 0) break;
|
||||||
|
nr = bytes_read;
|
||||||
to_read -= (julong)nr;
|
to_read -= (julong)nr;
|
||||||
file->write(buf, nr);
|
file->write(buf, nr);
|
||||||
}
|
}
|
||||||
|
@ -232,7 +235,8 @@ void CompileLog::finish_log_on_error(outputStream* file, char* buf, int buflen)
|
||||||
// Copy any remaining data inside a quote:
|
// Copy any remaining data inside a quote:
|
||||||
bool saw_slop = false;
|
bool saw_slop = false;
|
||||||
int end_cdata = 0; // state machine [0..2] watching for too many "]]"
|
int end_cdata = 0; // state machine [0..2] watching for too many "]]"
|
||||||
while ((nr = read(partial_fd, buf, buflen-1)) > 0) {
|
while ((bytes_read = read(partial_fd, buf, buflen-1)) > 0) {
|
||||||
|
nr = bytes_read;
|
||||||
buf[buflen-1] = '\0';
|
buf[buflen-1] = '\0';
|
||||||
if (!saw_slop) {
|
if (!saw_slop) {
|
||||||
file->print_raw_cr("<fragment>");
|
file->print_raw_cr("<fragment>");
|
||||||
|
|
|
@ -124,7 +124,7 @@ bool Disassembler::load_library() {
|
||||||
_decode_instructions_virtual = CAST_TO_FN_PTR(Disassembler::decode_func_virtual,
|
_decode_instructions_virtual = CAST_TO_FN_PTR(Disassembler::decode_func_virtual,
|
||||||
os::dll_lookup(_library, decode_instructions_virtual_name));
|
os::dll_lookup(_library, decode_instructions_virtual_name));
|
||||||
}
|
}
|
||||||
if (_decode_instructions_virtual == NULL) {
|
if (_decode_instructions_virtual == NULL && _library != NULL) {
|
||||||
// could not spot in new version, try old version
|
// could not spot in new version, try old version
|
||||||
_decode_instructions = CAST_TO_FN_PTR(Disassembler::decode_func,
|
_decode_instructions = CAST_TO_FN_PTR(Disassembler::decode_func,
|
||||||
os::dll_lookup(_library, decode_instructions_name));
|
os::dll_lookup(_library, decode_instructions_name));
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -484,7 +484,7 @@ MethodLivenessResult MethodLiveness::get_liveness_at(int entry_bci) {
|
||||||
while (block == NULL && t > 0) {
|
while (block == NULL && t > 0) {
|
||||||
block = _block_map->at(--t);
|
block = _block_map->at(--t);
|
||||||
}
|
}
|
||||||
assert( block != NULL, "invalid bytecode index; must be instruction index" );
|
guarantee(block != NULL, "invalid bytecode index; must be instruction index");
|
||||||
assert(bci >= block->start_bci() && bci < block->limit_bci(), "block must contain bci.");
|
assert(bci >= block->start_bci() && bci < block->limit_bci(), "block must contain bci.");
|
||||||
|
|
||||||
answer = block->get_liveness_at(method(), bci);
|
answer = block->get_liveness_at(method(), bci);
|
||||||
|
|
|
@ -571,14 +571,14 @@ bool OopMap::equals(const OopMap* other) const {
|
||||||
|
|
||||||
const ImmutableOopMap* ImmutableOopMapSet::find_map_at_offset(int pc_offset) const {
|
const ImmutableOopMap* ImmutableOopMapSet::find_map_at_offset(int pc_offset) const {
|
||||||
ImmutableOopMapPair* pairs = get_pairs();
|
ImmutableOopMapPair* pairs = get_pairs();
|
||||||
ImmutableOopMapPair* last = NULL;
|
|
||||||
|
|
||||||
for (int i = 0; i < _count; ++i) {
|
int i;
|
||||||
|
for (i = 0; i < _count; ++i) {
|
||||||
if (pairs[i].pc_offset() >= pc_offset) {
|
if (pairs[i].pc_offset() >= pc_offset) {
|
||||||
last = &pairs[i];
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
ImmutableOopMapPair* last = &pairs[i];
|
||||||
|
|
||||||
assert(last->pc_offset() == pc_offset, "oopmap not found");
|
assert(last->pc_offset() == pc_offset, "oopmap not found");
|
||||||
return last->get_from(this);
|
return last->get_from(this);
|
||||||
|
|
|
@ -236,6 +236,8 @@ int AOTOopRecorder::find_index(Metadata* h) {
|
||||||
|
|
||||||
JVMCIKlassHandle klass(THREAD);
|
JVMCIKlassHandle klass(THREAD);
|
||||||
oop result = NULL;
|
oop result = NULL;
|
||||||
|
guarantee(h != NULL,
|
||||||
|
"If DebugInformationRecorder::describe_scope passes NULL oldCount == newCount must hold.");
|
||||||
if (h->is_klass()) {
|
if (h->is_klass()) {
|
||||||
klass = (Klass*) h;
|
klass = (Klass*) h;
|
||||||
result = CompilerToVM::get_jvmci_type(klass, CATCH);
|
result = CompilerToVM::get_jvmci_type(klass, CATCH);
|
||||||
|
|
|
@ -349,7 +349,9 @@ C2V_VMENTRY(jobject, getResolvedJavaType, (JNIEnv *, jobject, jobject base, jlon
|
||||||
klass = *((Klass**) (intptr_t) (base_address + offset));
|
klass = *((Klass**) (intptr_t) (base_address + offset));
|
||||||
} else {
|
} else {
|
||||||
THROW_MSG_0(vmSymbols::java_lang_IllegalArgumentException(),
|
THROW_MSG_0(vmSymbols::java_lang_IllegalArgumentException(),
|
||||||
err_msg("Unexpected arguments: %s " JLONG_FORMAT " %s", base_object->klass()->external_name(), offset, compressed ? "true" : "false"));
|
err_msg("Unexpected arguments: %s " JLONG_FORMAT " %s",
|
||||||
|
base_object != NULL ? base_object->klass()->external_name() : "null",
|
||||||
|
offset, compressed ? "true" : "false"));
|
||||||
}
|
}
|
||||||
assert (klass == NULL || klass->is_klass(), "invalid read");
|
assert (klass == NULL || klass->is_klass(), "invalid read");
|
||||||
oop result = CompilerToVM::get_jvmci_type(klass, CHECK_NULL);
|
oop result = CompilerToVM::get_jvmci_type(klass, CHECK_NULL);
|
||||||
|
|
|
@ -262,7 +262,9 @@ void LogOutput::update_config_string(const size_t on_level[LogLevel::Count]) {
|
||||||
while (n_deviates > 0) {
|
while (n_deviates > 0) {
|
||||||
size_t prev_deviates = n_deviates;
|
size_t prev_deviates = n_deviates;
|
||||||
int max_score = 0;
|
int max_score = 0;
|
||||||
const LogSelection* best_selection = NULL;
|
|
||||||
|
guarantee(n_selections > 0, "Cannot find maximal selection.");
|
||||||
|
const LogSelection* best_selection = &selections[0];
|
||||||
for (size_t i = 0; i < n_selections; i++) {
|
for (size_t i = 0; i < n_selections; i++) {
|
||||||
|
|
||||||
// Give the selection a score based on how many deviating tag sets it selects (with correct level)
|
// Give the selection a score based on how many deviating tag sets it selects (with correct level)
|
||||||
|
@ -287,13 +289,12 @@ void LogOutput::update_config_string(const size_t on_level[LogLevel::Count]) {
|
||||||
|
|
||||||
// Pick the selection with the best score, or in the case of a tie, the one with fewest tags
|
// Pick the selection with the best score, or in the case of a tie, the one with fewest tags
|
||||||
if (score > max_score ||
|
if (score > max_score ||
|
||||||
(score == max_score && best_selection != NULL && selections[i].ntags() < best_selection->ntags())) {
|
(score == max_score && selections[i].ntags() < best_selection->ntags())) {
|
||||||
max_score = score;
|
max_score = score;
|
||||||
best_selection = &selections[i];
|
best_selection = &selections[i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
assert(best_selection != NULL, "must always find a maximal selection");
|
|
||||||
add_to_config_string(*best_selection);
|
add_to_config_string(*best_selection);
|
||||||
|
|
||||||
// Remove all deviates that this selection covered
|
// Remove all deviates that this selection covered
|
||||||
|
|
|
@ -631,8 +631,10 @@ void FileMapInfo::write_region(int region, char* base, size_t size,
|
||||||
si->_read_only = read_only;
|
si->_read_only = read_only;
|
||||||
si->_allow_exec = allow_exec;
|
si->_allow_exec = allow_exec;
|
||||||
si->_crc = ClassLoader::crc32(0, base, (jint)size);
|
si->_crc = ClassLoader::crc32(0, base, (jint)size);
|
||||||
|
if (base != NULL) {
|
||||||
write_bytes_aligned(base, (int)size);
|
write_bytes_aligned(base, (int)size);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Write out the given archive heap memory regions. GC code combines multiple
|
// Write out the given archive heap memory regions. GC code combines multiple
|
||||||
// consecutive archive GC regions into one MemRegion whenever possible and
|
// consecutive archive GC regions into one MemRegion whenever possible and
|
||||||
|
|
|
@ -1260,7 +1260,9 @@ MetaWord* Metaspace::allocate(ClassLoaderData* loader_data, size_t word_size,
|
||||||
tty->print_cr("Please increase MaxMetaspaceSize (currently " SIZE_FORMAT " bytes).", MaxMetaspaceSize);
|
tty->print_cr("Please increase MaxMetaspaceSize (currently " SIZE_FORMAT " bytes).", MaxMetaspaceSize);
|
||||||
vm_exit(1);
|
vm_exit(1);
|
||||||
}
|
}
|
||||||
report_metadata_oome(loader_data, word_size, type, mdtype, CHECK_NULL);
|
report_metadata_oome(loader_data, word_size, type, mdtype, THREAD);
|
||||||
|
assert(HAS_PENDING_EXCEPTION, "sanity");
|
||||||
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Zero initialize.
|
// Zero initialize.
|
||||||
|
|
|
@ -70,6 +70,18 @@ ReservedSpace::ReservedSpace(size_t size, size_t alignment,
|
||||||
initialize(size, alignment, large, NULL, executable);
|
initialize(size, alignment, large, NULL, executable);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ReservedSpace::ReservedSpace(char* base, size_t size, size_t alignment,
|
||||||
|
bool special, bool executable) : _fd_for_heap(-1) {
|
||||||
|
assert((size % os::vm_allocation_granularity()) == 0,
|
||||||
|
"size not allocation aligned");
|
||||||
|
_base = base;
|
||||||
|
_size = size;
|
||||||
|
_alignment = alignment;
|
||||||
|
_noaccess_prefix = 0;
|
||||||
|
_special = special;
|
||||||
|
_executable = executable;
|
||||||
|
}
|
||||||
|
|
||||||
// Helper method
|
// Helper method
|
||||||
static void unmap_or_release_memory(char* base, size_t size, bool is_file_mapped) {
|
static void unmap_or_release_memory(char* base, size_t size, bool is_file_mapped) {
|
||||||
if (is_file_mapped) {
|
if (is_file_mapped) {
|
||||||
|
@ -218,20 +230,6 @@ void ReservedSpace::initialize(size_t size, size_t alignment, bool large,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
ReservedSpace::ReservedSpace(char* base, size_t size, size_t alignment,
|
|
||||||
bool special, bool executable) {
|
|
||||||
assert((size % os::vm_allocation_granularity()) == 0,
|
|
||||||
"size not allocation aligned");
|
|
||||||
_base = base;
|
|
||||||
_size = size;
|
|
||||||
_alignment = alignment;
|
|
||||||
_noaccess_prefix = 0;
|
|
||||||
_special = special;
|
|
||||||
_executable = executable;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
ReservedSpace ReservedSpace::first_part(size_t partition_size, size_t alignment,
|
ReservedSpace ReservedSpace::first_part(size_t partition_size, size_t alignment,
|
||||||
bool split, bool realloc) {
|
bool split, bool realloc) {
|
||||||
assert(partition_size <= size(), "partition failed");
|
assert(partition_size <= size(), "partition failed");
|
||||||
|
|
|
@ -366,6 +366,9 @@ Node* ArrayCopyNode::array_copy_forward(PhaseGVN *phase,
|
||||||
if (!forward_ctl->is_top()) {
|
if (!forward_ctl->is_top()) {
|
||||||
// copy forward
|
// copy forward
|
||||||
mem = start_mem_dest;
|
mem = start_mem_dest;
|
||||||
|
uint alias_idx_src = phase->C->get_alias_index(atp_src);
|
||||||
|
uint alias_idx_dest = phase->C->get_alias_index(atp_dest);
|
||||||
|
bool same_alias = (alias_idx_src == alias_idx_dest);
|
||||||
|
|
||||||
if (count > 0) {
|
if (count > 0) {
|
||||||
Node* v = LoadNode::make(*phase, forward_ctl, start_mem_src, adr_src, atp_src, value_type, copy_type, MemNode::unordered);
|
Node* v = LoadNode::make(*phase, forward_ctl, start_mem_src, adr_src, atp_src, value_type, copy_type, MemNode::unordered);
|
||||||
|
@ -376,7 +379,7 @@ Node* ArrayCopyNode::array_copy_forward(PhaseGVN *phase,
|
||||||
Node* off = phase->MakeConX(type2aelembytes(copy_type) * i);
|
Node* off = phase->MakeConX(type2aelembytes(copy_type) * i);
|
||||||
Node* next_src = phase->transform(new AddPNode(base_src,adr_src,off));
|
Node* next_src = phase->transform(new AddPNode(base_src,adr_src,off));
|
||||||
Node* next_dest = phase->transform(new AddPNode(base_dest,adr_dest,off));
|
Node* next_dest = phase->transform(new AddPNode(base_dest,adr_dest,off));
|
||||||
v = LoadNode::make(*phase, forward_ctl, mem, next_src, atp_src, value_type, copy_type, MemNode::unordered);
|
v = LoadNode::make(*phase, forward_ctl, same_alias ? mem : start_mem_src, next_src, atp_src, value_type, copy_type, MemNode::unordered);
|
||||||
v = phase->transform(v);
|
v = phase->transform(v);
|
||||||
mem = StoreNode::make(*phase, forward_ctl,mem,next_dest,atp_dest,v, copy_type, MemNode::unordered);
|
mem = StoreNode::make(*phase, forward_ctl,mem,next_dest,atp_dest,v, copy_type, MemNode::unordered);
|
||||||
mem = phase->transform(mem);
|
mem = phase->transform(mem);
|
||||||
|
@ -408,18 +411,21 @@ Node* ArrayCopyNode::array_copy_backward(PhaseGVN *phase,
|
||||||
if (!backward_ctl->is_top()) {
|
if (!backward_ctl->is_top()) {
|
||||||
// copy backward
|
// copy backward
|
||||||
mem = start_mem_dest;
|
mem = start_mem_dest;
|
||||||
|
uint alias_idx_src = phase->C->get_alias_index(atp_src);
|
||||||
|
uint alias_idx_dest = phase->C->get_alias_index(atp_dest);
|
||||||
|
bool same_alias = (alias_idx_src == alias_idx_dest);
|
||||||
|
|
||||||
if (count > 0) {
|
if (count > 0) {
|
||||||
for (int i = count-1; i >= 1; i--) {
|
for (int i = count-1; i >= 1; i--) {
|
||||||
Node* off = phase->MakeConX(type2aelembytes(copy_type) * i);
|
Node* off = phase->MakeConX(type2aelembytes(copy_type) * i);
|
||||||
Node* next_src = phase->transform(new AddPNode(base_src,adr_src,off));
|
Node* next_src = phase->transform(new AddPNode(base_src,adr_src,off));
|
||||||
Node* next_dest = phase->transform(new AddPNode(base_dest,adr_dest,off));
|
Node* next_dest = phase->transform(new AddPNode(base_dest,adr_dest,off));
|
||||||
Node* v = LoadNode::make(*phase, backward_ctl, mem, next_src, atp_src, value_type, copy_type, MemNode::unordered);
|
Node* v = LoadNode::make(*phase, backward_ctl, same_alias ? mem : start_mem_src, next_src, atp_src, value_type, copy_type, MemNode::unordered);
|
||||||
v = phase->transform(v);
|
v = phase->transform(v);
|
||||||
mem = StoreNode::make(*phase, backward_ctl,mem,next_dest,atp_dest,v, copy_type, MemNode::unordered);
|
mem = StoreNode::make(*phase, backward_ctl,mem,next_dest,atp_dest,v, copy_type, MemNode::unordered);
|
||||||
mem = phase->transform(mem);
|
mem = phase->transform(mem);
|
||||||
}
|
}
|
||||||
Node* v = LoadNode::make(*phase, backward_ctl, mem, adr_src, atp_src, value_type, copy_type, MemNode::unordered);
|
Node* v = LoadNode::make(*phase, backward_ctl, same_alias ? mem : start_mem_src, adr_src, atp_src, value_type, copy_type, MemNode::unordered);
|
||||||
v = phase->transform(v);
|
v = phase->transform(v);
|
||||||
mem = StoreNode::make(*phase, backward_ctl, mem, adr_dest, atp_dest, v, copy_type, MemNode::unordered);
|
mem = StoreNode::make(*phase, backward_ctl, mem, adr_dest, atp_dest, v, copy_type, MemNode::unordered);
|
||||||
mem = phase->transform(mem);
|
mem = phase->transform(mem);
|
||||||
|
@ -659,7 +665,8 @@ bool ArrayCopyNode::may_modify(const TypeOopPtr *t_oop, MemBarNode* mb, PhaseTra
|
||||||
c = bs->step_over_gc_barrier(c);
|
c = bs->step_over_gc_barrier(c);
|
||||||
|
|
||||||
CallNode* call = NULL;
|
CallNode* call = NULL;
|
||||||
if (c != NULL && c->is_Region()) {
|
guarantee(c != NULL, "step_over_gc_barrier failed, there must be something to step to.");
|
||||||
|
if (c->is_Region()) {
|
||||||
for (uint i = 1; i < c->req(); i++) {
|
for (uint i = 1; i < c->req(); i++) {
|
||||||
if (c->in(i) != NULL) {
|
if (c->in(i) != NULL) {
|
||||||
Node* n = c->in(i)->in(0);
|
Node* n = c->in(i)->in(0);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -520,8 +520,8 @@ void InlineTree::print_inlining(ciMethod* callee_method, int caller_bci,
|
||||||
caller_bci, inline_msg);
|
caller_bci, inline_msg);
|
||||||
if (C->print_inlining()) {
|
if (C->print_inlining()) {
|
||||||
C->print_inlining(callee_method, inline_level(), caller_bci, inline_msg);
|
C->print_inlining(callee_method, inline_level(), caller_bci, inline_msg);
|
||||||
if (callee_method == NULL) tty->print(" callee not monotonic or profiled");
|
guarantee(callee_method != NULL, "would crash in post_inlining_event");
|
||||||
if (Verbose && callee_method) {
|
if (Verbose) {
|
||||||
const InlineTree *top = this;
|
const InlineTree *top = this;
|
||||||
while (top->caller_tree() != NULL) { top = top->caller_tree(); }
|
while (top->caller_tree() != NULL) { top = top->caller_tree(); }
|
||||||
//tty->print(" bcs: %d+%d invoked: %d", top->count_inline_bcs(), callee_method->code_size(), callee_method->interpreter_invocation_count());
|
//tty->print(" bcs: %d+%d invoked: %d", top->count_inline_bcs(), callee_method->code_size(), callee_method->interpreter_invocation_count());
|
||||||
|
|
|
@ -759,6 +759,7 @@ bool CallNode::may_modify(const TypeOopPtr *t_oop, PhaseTransform *phase) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
guarantee(dest != NULL, "Call had only one ptr in, broken IR!");
|
||||||
if (!dest->is_top() && may_modify_arraycopy_helper(phase->type(dest)->is_oopptr(), t_oop, phase)) {
|
if (!dest->is_top() && may_modify_arraycopy_helper(phase->type(dest)->is_oopptr(), t_oop, phase)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -4049,9 +4049,9 @@ void Compile::ConstantTable::emit(CodeBuffer& cb) {
|
||||||
|
|
||||||
int Compile::ConstantTable::find_offset(Constant& con) const {
|
int Compile::ConstantTable::find_offset(Constant& con) const {
|
||||||
int idx = _constants.find(con);
|
int idx = _constants.find(con);
|
||||||
assert(idx != -1, "constant must be in constant table");
|
guarantee(idx != -1, "constant must be in constant table");
|
||||||
int offset = _constants.at(idx).offset();
|
int offset = _constants.at(idx).offset();
|
||||||
assert(offset != -1, "constant table not emitted yet?");
|
guarantee(offset != -1, "constant table not emitted yet?");
|
||||||
return offset;
|
return offset;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1263,6 +1263,7 @@ void PhaseCFG::schedule_late(VectorSet &visited, Node_Stack &stack) {
|
||||||
Node* use = self->fast_out(i);
|
Node* use = self->fast_out(i);
|
||||||
LCA = raise_LCA_above_use(LCA, use, self, this);
|
LCA = raise_LCA_above_use(LCA, use, self, this);
|
||||||
}
|
}
|
||||||
|
guarantee(LCA != NULL, "There must be a LCA");
|
||||||
} // (Hide defs of imax, i from rest of block.)
|
} // (Hide defs of imax, i from rest of block.)
|
||||||
|
|
||||||
// Place temps in the block of their use. This isn't a
|
// Place temps in the block of their use. This isn't a
|
||||||
|
|
|
@ -387,6 +387,7 @@ static Node* split_if(IfNode *iff, PhaseIterGVN *igvn) {
|
||||||
} else {
|
} else {
|
||||||
assert( 0, "do not know how to handle this guy" );
|
assert( 0, "do not know how to handle this guy" );
|
||||||
}
|
}
|
||||||
|
guarantee(proj != NULL, "sanity");
|
||||||
|
|
||||||
Node *proj_path_data, *proj_path_ctrl;
|
Node *proj_path_data, *proj_path_ctrl;
|
||||||
if( proj->Opcode() == Op_IfTrue ) {
|
if( proj->Opcode() == Op_IfTrue ) {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -319,7 +319,7 @@ void IndexSet::initialize(uint max_elements) {
|
||||||
if (_max_blocks <= preallocated_block_list_size) {
|
if (_max_blocks <= preallocated_block_list_size) {
|
||||||
_blocks = _preallocated_block_list;
|
_blocks = _preallocated_block_list;
|
||||||
} else {
|
} else {
|
||||||
_blocks = (IndexSet::BitBlock**) arena()->Amalloc_4(sizeof(IndexSet::BitBlock**) * _max_blocks);
|
_blocks = (IndexSet::BitBlock**) arena()->Amalloc_4(sizeof(IndexSet::BitBlock*) * _max_blocks);
|
||||||
}
|
}
|
||||||
for (uint i = 0; i < _max_blocks; i++) {
|
for (uint i = 0; i < _max_blocks; i++) {
|
||||||
set_block(i, &_empty_block);
|
set_block(i, &_empty_block);
|
||||||
|
@ -343,7 +343,7 @@ void IndexSet::initialize(uint max_elements, Arena *arena) {
|
||||||
if (_max_blocks <= preallocated_block_list_size) {
|
if (_max_blocks <= preallocated_block_list_size) {
|
||||||
_blocks = _preallocated_block_list;
|
_blocks = _preallocated_block_list;
|
||||||
} else {
|
} else {
|
||||||
_blocks = (IndexSet::BitBlock**) arena->Amalloc_4(sizeof(IndexSet::BitBlock**) * _max_blocks);
|
_blocks = (IndexSet::BitBlock**) arena->Amalloc_4(sizeof(IndexSet::BitBlock*) * _max_blocks);
|
||||||
}
|
}
|
||||||
for (uint i = 0; i < _max_blocks; i++) {
|
for (uint i = 0; i < _max_blocks; i++) {
|
||||||
set_block(i, &_empty_block);
|
set_block(i, &_empty_block);
|
||||||
|
|
|
@ -646,7 +646,7 @@ Node* PhaseCFG::select(
|
||||||
}
|
}
|
||||||
} // End of for all ready nodes in worklist
|
} // End of for all ready nodes in worklist
|
||||||
|
|
||||||
assert(idx >= 0, "index should be set");
|
guarantee(idx >= 0, "index should be set");
|
||||||
Node *n = worklist[(uint)idx]; // Get the winner
|
Node *n = worklist[(uint)idx]; // Get the winner
|
||||||
|
|
||||||
worklist.map((uint)idx, worklist.pop()); // Compress worklist
|
worklist.map((uint)idx, worklist.pop()); // Compress worklist
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -684,6 +684,7 @@ BoolNode* PhaseIdealLoop::rc_predicate(IdealLoopTree *loop, Node* ctrl,
|
||||||
Node* max_idx_expr = NULL;
|
Node* max_idx_expr = NULL;
|
||||||
const TypeInt* idx_type = TypeInt::INT;
|
const TypeInt* idx_type = TypeInt::INT;
|
||||||
if ((stride > 0) == (scale > 0) == upper) {
|
if ((stride > 0) == (scale > 0) == upper) {
|
||||||
|
guarantee(limit != NULL, "sanity");
|
||||||
if (TraceLoopPredicate) {
|
if (TraceLoopPredicate) {
|
||||||
if (limit->is_Con()) {
|
if (limit->is_Con()) {
|
||||||
predString->print("(%d ", con_limit);
|
predString->print("(%d ", con_limit);
|
||||||
|
|
|
@ -768,11 +768,12 @@ bool IdealLoopTree::policy_unroll(PhaseIdealLoop *phase) {
|
||||||
Node *init_n = cl->init_trip();
|
Node *init_n = cl->init_trip();
|
||||||
Node *limit_n = cl->limit();
|
Node *limit_n = cl->limit();
|
||||||
int stride_con = cl->stride_con();
|
int stride_con = cl->stride_con();
|
||||||
|
if (limit_n == NULL) return false; // We will dereference it below.
|
||||||
|
|
||||||
// Non-constant bounds.
|
// Non-constant bounds.
|
||||||
// Protect against over-unrolling when init or/and limit are not constant
|
// Protect against over-unrolling when init or/and limit are not constant
|
||||||
// (so that trip_count's init value is maxint) but iv range is known.
|
// (so that trip_count's init value is maxint) but iv range is known.
|
||||||
if (init_n == NULL || !init_n->is_Con() ||
|
if (init_n == NULL || !init_n->is_Con() || !limit_n->is_Con()) {
|
||||||
limit_n == NULL || !limit_n->is_Con()) {
|
|
||||||
Node* phi = cl->phi();
|
Node* phi = cl->phi();
|
||||||
if (phi != NULL) {
|
if (phi != NULL) {
|
||||||
assert(phi->is_Phi() && phi->in(0) == _head, "Counted loop should have iv phi.");
|
assert(phi->is_Phi() && phi->in(0) == _head, "Counted loop should have iv phi.");
|
||||||
|
|
|
@ -2154,6 +2154,7 @@ bool PhaseMacroExpand::eliminate_locking_node(AbstractLockNode *alock) {
|
||||||
|
|
||||||
Node* mem = alock->in(TypeFunc::Memory);
|
Node* mem = alock->in(TypeFunc::Memory);
|
||||||
Node* ctrl = alock->in(TypeFunc::Control);
|
Node* ctrl = alock->in(TypeFunc::Control);
|
||||||
|
guarantee(ctrl != NULL, "missing control projection, cannot replace_node() with NULL");
|
||||||
|
|
||||||
extract_call_projections(alock);
|
extract_call_projections(alock);
|
||||||
// There are 2 projections from the lock. The lock node will
|
// There are 2 projections from the lock. The lock node will
|
||||||
|
@ -2188,8 +2189,7 @@ bool PhaseMacroExpand::eliminate_locking_node(AbstractLockNode *alock) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Seach for MemBarReleaseLock node and delete it also.
|
// Seach for MemBarReleaseLock node and delete it also.
|
||||||
if (alock->is_Unlock() && ctrl != NULL && ctrl->is_Proj() &&
|
if (alock->is_Unlock() && ctrl->is_Proj() && ctrl->in(0)->is_MemBar()) {
|
||||||
ctrl->in(0)->is_MemBar()) {
|
|
||||||
MemBarNode* membar = ctrl->in(0)->as_MemBar();
|
MemBarNode* membar = ctrl->in(0)->as_MemBar();
|
||||||
assert(membar->Opcode() == Op_MemBarReleaseLock &&
|
assert(membar->Opcode() == Op_MemBarReleaseLock &&
|
||||||
mem->is_Proj() && membar == mem->in(0), "");
|
mem->is_Proj() && membar == mem->in(0), "");
|
||||||
|
|
|
@ -370,7 +370,7 @@ Node *MemNode::Ideal_common(PhaseGVN *phase, bool can_reshape) {
|
||||||
|
|
||||||
if (mem != old_mem) {
|
if (mem != old_mem) {
|
||||||
set_req(MemNode::Memory, mem);
|
set_req(MemNode::Memory, mem);
|
||||||
if (can_reshape && old_mem->outcnt() == 0) {
|
if (can_reshape && old_mem->outcnt() == 0 && igvn != NULL) {
|
||||||
igvn->_worklist.push(old_mem);
|
igvn->_worklist.push(old_mem);
|
||||||
}
|
}
|
||||||
if (phase->type(mem) == Type::TOP) return NodeSentinel;
|
if (phase->type(mem) == Type::TOP) return NodeSentinel;
|
||||||
|
@ -825,7 +825,7 @@ Node *LoadNode::make(PhaseGVN& gvn, Node *ctl, Node *mem, Node *adr, const TypeP
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
// ShouldNotReachHere(); ???
|
ShouldNotReachHere();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
assert(load != NULL, "LoadNode should have been created");
|
assert(load != NULL, "LoadNode should have been created");
|
||||||
|
|
|
@ -1692,6 +1692,7 @@ Compile::locate_node_notes(GrowableArray<Node_Notes*>* arr,
|
||||||
if (!can_grow) return NULL;
|
if (!can_grow) return NULL;
|
||||||
grow_node_notes(arr, grow_by + 1);
|
grow_node_notes(arr, grow_by + 1);
|
||||||
}
|
}
|
||||||
|
if (arr == NULL) return NULL;
|
||||||
// (Every element of arr is a sub-array of length _node_notes_block_size.)
|
// (Every element of arr is a sub-array of length _node_notes_block_size.)
|
||||||
return arr->at(block_idx) + (idx & (_node_notes_block_size-1));
|
return arr->at(block_idx) + (idx & (_node_notes_block_size-1));
|
||||||
}
|
}
|
||||||
|
|
|
@ -1424,7 +1424,7 @@ void Compile::fill_buffer(CodeBuffer* cb, uint* blk_starts) {
|
||||||
|
|
||||||
// See if this instruction has a delay slot
|
// See if this instruction has a delay slot
|
||||||
if (valid_bundle_info(n) && node_bundling(n)->use_unconditional_delay()) {
|
if (valid_bundle_info(n) && node_bundling(n)->use_unconditional_delay()) {
|
||||||
assert(delay_slot != NULL, "expecting delay slot node");
|
guarantee(delay_slot != NULL, "expecting delay slot node");
|
||||||
|
|
||||||
// Back up 1 instruction
|
// Back up 1 instruction
|
||||||
cb->set_insts_end(cb->insts_end() - Pipeline::instr_unit_size());
|
cb->set_insts_end(cb->insts_end() - Pipeline::instr_unit_size());
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -1823,7 +1823,7 @@ void Parse::merge_memory_edges(MergeMemNode* n, int pnum, bool nophi) {
|
||||||
// Instead, wire the new split into a MergeMem on the backedge.
|
// Instead, wire the new split into a MergeMem on the backedge.
|
||||||
// The optimizer will sort it out, slicing the phi.
|
// The optimizer will sort it out, slicing the phi.
|
||||||
if (remerge == NULL) {
|
if (remerge == NULL) {
|
||||||
assert(base != NULL, "");
|
guarantee(base != NULL, "");
|
||||||
assert(base->in(0) != NULL, "should not be xformed away");
|
assert(base->in(0) != NULL, "should not be xformed away");
|
||||||
remerge = MergeMemNode::make(base->in(pnum));
|
remerge = MergeMemNode::make(base->in(pnum));
|
||||||
gvn().set_type(remerge, Type::MEMORY);
|
gvn().set_type(remerge, Type::MEMORY);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -683,7 +683,7 @@ uint PhaseChaitin::Split(uint maxlrg, ResourceArea* split_arena) {
|
||||||
if( needs_phi ) {
|
if( needs_phi ) {
|
||||||
// create a new phi node and insert it into the block
|
// create a new phi node and insert it into the block
|
||||||
// type is taken from left over pointer to a predecessor
|
// type is taken from left over pointer to a predecessor
|
||||||
assert(n3,"No non-NULL reaching DEF for a Phi");
|
guarantee(n3, "No non-NULL reaching DEF for a Phi");
|
||||||
phi = new PhiNode(b->head(), n3->bottom_type());
|
phi = new PhiNode(b->head(), n3->bottom_type());
|
||||||
// initialize the Reaches entry for this LRG
|
// initialize the Reaches entry for this LRG
|
||||||
Reachblock[slidx] = phi;
|
Reachblock[slidx] = phi;
|
||||||
|
|
|
@ -1608,7 +1608,12 @@ NamedCounter* OptoRuntime::new_named_counter(JVMState* youngest_jvms, NamedCount
|
||||||
}
|
}
|
||||||
int bci = jvms->bci();
|
int bci = jvms->bci();
|
||||||
if (bci < 0) bci = 0;
|
if (bci < 0) bci = 0;
|
||||||
st.print("%s.%s@%d", m->holder()->name()->as_utf8(), m->name()->as_utf8(), bci);
|
if (m != NULL) {
|
||||||
|
st.print("%s.%s", m->holder()->name()->as_utf8(), m->name()->as_utf8());
|
||||||
|
} else {
|
||||||
|
st.print("no method");
|
||||||
|
}
|
||||||
|
st.print("@%d", bci);
|
||||||
// To print linenumbers instead of bci use: m->line_number_from_bci(bci)
|
// To print linenumbers instead of bci use: m->line_number_from_bci(bci)
|
||||||
}
|
}
|
||||||
NamedCounter* c;
|
NamedCounter* c;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -252,9 +252,9 @@ const Type* Type::make_from_constant(ciConstant constant, bool require_constant,
|
||||||
ciObject* oop_constant = constant.as_object();
|
ciObject* oop_constant = constant.as_object();
|
||||||
if (oop_constant->is_null_object()) {
|
if (oop_constant->is_null_object()) {
|
||||||
con_type = Type::get_zero_type(T_OBJECT);
|
con_type = Type::get_zero_type(T_OBJECT);
|
||||||
} else if (require_constant || oop_constant->should_be_constant()) {
|
} else {
|
||||||
|
guarantee(require_constant || oop_constant->should_be_constant(), "con_type must get computed");
|
||||||
con_type = TypeOopPtr::make_from_constant(oop_constant, require_constant);
|
con_type = TypeOopPtr::make_from_constant(oop_constant, require_constant);
|
||||||
if (con_type != NULL) {
|
|
||||||
if (Compile::current()->eliminate_boxing() && is_autobox_cache) {
|
if (Compile::current()->eliminate_boxing() && is_autobox_cache) {
|
||||||
con_type = con_type->is_aryptr()->cast_to_autobox_cache(true);
|
con_type = con_type->is_aryptr()->cast_to_autobox_cache(true);
|
||||||
}
|
}
|
||||||
|
@ -264,7 +264,6 @@ const Type* Type::make_from_constant(ciConstant constant, bool require_constant,
|
||||||
con_type = con_type->is_aryptr()->cast_to_stable(true, stable_dimension);
|
con_type = con_type->is_aryptr()->cast_to_stable(true, stable_dimension);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if (is_narrow_oop) {
|
if (is_narrow_oop) {
|
||||||
con_type = con_type->make_narrowoop();
|
con_type = con_type->make_narrowoop();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1219,7 +1219,7 @@ VM_GetMultipleStackTraces::fill_frames(jthread jt, JavaThread *thr, oop thread_o
|
||||||
}
|
}
|
||||||
infop->state = state;
|
infop->state = state;
|
||||||
|
|
||||||
if (thr != NULL || (state & JVMTI_THREAD_STATE_ALIVE) != 0) {
|
if (thr != NULL && (state & JVMTI_THREAD_STATE_ALIVE) != 0) {
|
||||||
infop->frame_buffer = NEW_RESOURCE_ARRAY(jvmtiFrameInfo, max_frame_count());
|
infop->frame_buffer = NEW_RESOURCE_ARRAY(jvmtiFrameInfo, max_frame_count());
|
||||||
env()->get_stack_trace(thr, 0, max_frame_count(),
|
env()->get_stack_trace(thr, 0, max_frame_count(),
|
||||||
infop->frame_buffer, &(infop->frame_count));
|
infop->frame_buffer, &(infop->frame_count));
|
||||||
|
|
|
@ -2044,7 +2044,7 @@ Deoptimization::update_method_data_from_interpreter(MethodData* trap_mdo, int tr
|
||||||
bool ignore_maybe_prior_recompile;
|
bool ignore_maybe_prior_recompile;
|
||||||
assert(!reason_is_speculate(reason), "reason speculate only used by compiler");
|
assert(!reason_is_speculate(reason), "reason speculate only used by compiler");
|
||||||
// JVMCI uses the total counts to determine if deoptimizations are happening too frequently -> do not adjust total counts
|
// JVMCI uses the total counts to determine if deoptimizations are happening too frequently -> do not adjust total counts
|
||||||
bool update_total_counts = JVMCI_ONLY(false) NOT_JVMCI(true);
|
bool update_total_counts = true JVMCI_ONLY( && !UseJVMCICompiler);
|
||||||
query_update_method_data(trap_mdo, trap_bci,
|
query_update_method_data(trap_mdo, trap_bci,
|
||||||
(DeoptReason)reason,
|
(DeoptReason)reason,
|
||||||
update_total_counts,
|
update_total_counts,
|
||||||
|
|
|
@ -939,6 +939,10 @@ JVMFlag* JVMFlag::fuzzy_match(const char* name, size_t length, bool allow_locked
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (match == NULL) {
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
if (!(match->is_unlocked() || match->is_unlocker())) {
|
if (!(match->is_unlocked() || match->is_unlocker())) {
|
||||||
if (!allow_locked) {
|
if (!allow_locked) {
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
|
@ -266,8 +266,9 @@ CompileTask* SimpleThresholdPolicy::select_task(CompileQueue* compile_queue) {
|
||||||
max_method = max_task->method();
|
max_method = max_task->method();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (max_task->comp_level() == CompLevel_full_profile && TieredStopAtLevel > CompLevel_full_profile
|
if (max_task != NULL && max_task->comp_level() == CompLevel_full_profile &&
|
||||||
&& is_method_profiled(max_method)) {
|
TieredStopAtLevel > CompLevel_full_profile &&
|
||||||
|
max_method != NULL && is_method_profiled(max_method)) {
|
||||||
max_task->set_comp_level(CompLevel_limited_profile);
|
max_task->set_comp_level(CompLevel_limited_profile);
|
||||||
if (PrintTieredEvents) {
|
if (PrintTieredEvents) {
|
||||||
print_event(UPDATE_IN_QUEUE, max_method, max_method, max_task->osr_bci(), (CompLevel)max_task->comp_level());
|
print_event(UPDATE_IN_QUEUE, max_method, max_method, max_task->osr_bci(), (CompLevel)max_task->comp_level());
|
||||||
|
|
|
@ -79,7 +79,7 @@ static void print_flag_error_message_if_needed(JVMFlag::Error error, const char*
|
||||||
case JVMFlag::NON_WRITABLE:
|
case JVMFlag::NON_WRITABLE:
|
||||||
buffer_concat(buffer, "flag is not writeable."); break;
|
buffer_concat(buffer, "flag is not writeable."); break;
|
||||||
case JVMFlag::OUT_OF_BOUNDS:
|
case JVMFlag::OUT_OF_BOUNDS:
|
||||||
print_flag_error_message_bounds(name, buffer); break;
|
if (name != NULL) { print_flag_error_message_bounds(name, buffer); } break;
|
||||||
case JVMFlag::VIOLATES_CONSTRAINT:
|
case JVMFlag::VIOLATES_CONSTRAINT:
|
||||||
buffer_concat(buffer, "value violates its flag's constraint."); break;
|
buffer_concat(buffer, "value violates its flag's constraint."); break;
|
||||||
case JVMFlag::INVALID_FLAG:
|
case JVMFlag::INVALID_FLAG:
|
||||||
|
|
|
@ -532,6 +532,7 @@ long fileStream::fileSize() {
|
||||||
long size = -1;
|
long size = -1;
|
||||||
if (_file != NULL) {
|
if (_file != NULL) {
|
||||||
long pos = ::ftell(_file);
|
long pos = ::ftell(_file);
|
||||||
|
if (pos < 0) return pos;
|
||||||
if (::fseek(_file, 0, SEEK_END) == 0) {
|
if (::fseek(_file, 0, SEEK_END) == 0) {
|
||||||
size = ::ftell(_file);
|
size = ::ftell(_file);
|
||||||
}
|
}
|
||||||
|
|
|
@ -207,15 +207,7 @@ class Bits { // package-private
|
||||||
assert cnt >= 0 && reservedMem >= 0 && totalCap >= 0;
|
assert cnt >= 0 && reservedMem >= 0 && totalCap >= 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// -- Monitoring of direct buffer usage --
|
static final JavaNioAccess.BufferPool BUFFER_POOL = new JavaNioAccess.BufferPool() {
|
||||||
|
|
||||||
static {
|
|
||||||
// setup access to this package in SharedSecrets
|
|
||||||
SharedSecrets.setJavaNioAccess(
|
|
||||||
new JavaNioAccess() {
|
|
||||||
@Override
|
|
||||||
public JavaNioAccess.BufferPool getDirectBufferPool() {
|
|
||||||
return new JavaNioAccess.BufferPool() {
|
|
||||||
@Override
|
@Override
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return "direct";
|
return "direct";
|
||||||
|
@ -233,17 +225,6 @@ class Bits { // package-private
|
||||||
return Bits.RESERVED_MEMORY.get();
|
return Bits.RESERVED_MEMORY.get();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
|
||||||
@Override
|
|
||||||
public ByteBuffer newDirectByteBuffer(long addr, int cap, Object ob) {
|
|
||||||
return new DirectByteBuffer(addr, cap, ob);
|
|
||||||
}
|
|
||||||
@Override
|
|
||||||
public void truncate(Buffer buf) {
|
|
||||||
buf.truncate();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
// These numbers represent the point at which we have empirically
|
// These numbers represent the point at which we have empirically
|
||||||
// determined that the average cost of a JNI call exceeds the expense
|
// determined that the average cost of a JNI call exceeds the expense
|
||||||
|
|
|
@ -26,6 +26,8 @@
|
||||||
package java.nio;
|
package java.nio;
|
||||||
|
|
||||||
import jdk.internal.HotSpotIntrinsicCandidate;
|
import jdk.internal.HotSpotIntrinsicCandidate;
|
||||||
|
import jdk.internal.misc.JavaNioAccess;
|
||||||
|
import jdk.internal.misc.SharedSecrets;
|
||||||
import jdk.internal.misc.Unsafe;
|
import jdk.internal.misc.Unsafe;
|
||||||
|
|
||||||
import java.util.Spliterator;
|
import java.util.Spliterator;
|
||||||
|
@ -707,4 +709,23 @@ public abstract class Buffer {
|
||||||
throw new IndexOutOfBoundsException();
|
throw new IndexOutOfBoundsException();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static {
|
||||||
|
// setup access to this package in SharedSecrets
|
||||||
|
SharedSecrets.setJavaNioAccess(
|
||||||
|
new JavaNioAccess() {
|
||||||
|
@Override
|
||||||
|
public JavaNioAccess.BufferPool getDirectBufferPool() {
|
||||||
|
return Bits.BUFFER_POOL;
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public ByteBuffer newDirectByteBuffer(long addr, int cap, Object ob) {
|
||||||
|
return new DirectByteBuffer(addr, cap, ob);
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public void truncate(Buffer buf) {
|
||||||
|
buf.truncate();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -194,10 +194,9 @@ public class SharedSecrets {
|
||||||
|
|
||||||
public static JavaNioAccess getJavaNioAccess() {
|
public static JavaNioAccess getJavaNioAccess() {
|
||||||
if (javaNioAccess == null) {
|
if (javaNioAccess == null) {
|
||||||
// Ensure java.nio.ByteOrder is initialized; we know that
|
// Ensure java.nio.Buffer is initialized, which provides the
|
||||||
// this class initializes java.nio.Bits that provides the
|
|
||||||
// shared secret.
|
// shared secret.
|
||||||
unsafe.ensureClassInitialized(java.nio.ByteOrder.class);
|
unsafe.ensureClassInitialized(java.nio.Buffer.class);
|
||||||
}
|
}
|
||||||
return javaNioAccess;
|
return javaNioAccess;
|
||||||
}
|
}
|
||||||
|
|
|
@ -333,7 +333,6 @@ public class VerifyAccess {
|
||||||
* @return whether they are in the same package
|
* @return whether they are in the same package
|
||||||
*/
|
*/
|
||||||
public static boolean isSamePackage(Class<?> class1, Class<?> class2) {
|
public static boolean isSamePackage(Class<?> class1, Class<?> class2) {
|
||||||
assert(!class1.isArray() && !class2.isArray());
|
|
||||||
if (class1 == class2)
|
if (class1 == class2)
|
||||||
return true;
|
return true;
|
||||||
if (class1.getClassLoader() != class2.getClassLoader())
|
if (class1.getClassLoader() != class2.getClassLoader())
|
||||||
|
|
|
@ -73,6 +73,10 @@ final class SSLAlgorithmConstraints implements AlgorithmConstraints {
|
||||||
boolean withDefaultCertPathConstraints) {
|
boolean withDefaultCertPathConstraints) {
|
||||||
AlgorithmConstraints configuredConstraints = null;
|
AlgorithmConstraints configuredConstraints = null;
|
||||||
if (socket != null) {
|
if (socket != null) {
|
||||||
|
// Note that the KeyManager or TrustManager implementation may be
|
||||||
|
// not implemented in the same provider as SSLSocket/SSLEngine.
|
||||||
|
// Please check the instance before casting to use SSLSocketImpl.
|
||||||
|
if (socket instanceof SSLSocketImpl) {
|
||||||
HandshakeContext hc =
|
HandshakeContext hc =
|
||||||
((SSLSocketImpl)socket).conContext.handshakeContext;
|
((SSLSocketImpl)socket).conContext.handshakeContext;
|
||||||
if (hc != null) {
|
if (hc != null) {
|
||||||
|
@ -80,6 +84,10 @@ final class SSLAlgorithmConstraints implements AlgorithmConstraints {
|
||||||
} else {
|
} else {
|
||||||
configuredConstraints = null;
|
configuredConstraints = null;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
configuredConstraints =
|
||||||
|
socket.getSSLParameters().getAlgorithmConstraints();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
this.userSpecifiedConstraints = configuredConstraints;
|
this.userSpecifiedConstraints = configuredConstraints;
|
||||||
this.peerSpecifiedConstraints = null;
|
this.peerSpecifiedConstraints = null;
|
||||||
|
@ -90,6 +98,10 @@ final class SSLAlgorithmConstraints implements AlgorithmConstraints {
|
||||||
boolean withDefaultCertPathConstraints) {
|
boolean withDefaultCertPathConstraints) {
|
||||||
AlgorithmConstraints configuredConstraints = null;
|
AlgorithmConstraints configuredConstraints = null;
|
||||||
if (engine != null) {
|
if (engine != null) {
|
||||||
|
// Note that the KeyManager or TrustManager implementation may be
|
||||||
|
// not implemented in the same provider as SSLSocket/SSLEngine.
|
||||||
|
// Please check the instance before casting to use SSLEngineImpl.
|
||||||
|
if (engine instanceof SSLEngineImpl) {
|
||||||
HandshakeContext hc =
|
HandshakeContext hc =
|
||||||
((SSLEngineImpl)engine).conContext.handshakeContext;
|
((SSLEngineImpl)engine).conContext.handshakeContext;
|
||||||
if (hc != null) {
|
if (hc != null) {
|
||||||
|
@ -97,6 +109,10 @@ final class SSLAlgorithmConstraints implements AlgorithmConstraints {
|
||||||
} else {
|
} else {
|
||||||
configuredConstraints = null;
|
configuredConstraints = null;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
configuredConstraints =
|
||||||
|
engine.getSSLParameters().getAlgorithmConstraints();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
this.userSpecifiedConstraints = configuredConstraints;
|
this.userSpecifiedConstraints = configuredConstraints;
|
||||||
this.peerSpecifiedConstraints = null;
|
this.peerSpecifiedConstraints = null;
|
||||||
|
|
|
@ -130,7 +130,8 @@ public class CLDRTimeZoneNameProviderImpl extends TimeZoneNameProviderImpl {
|
||||||
|
|
||||||
// Fill in for the empty names.
|
// Fill in for the empty names.
|
||||||
// English names are prefilled for performance.
|
// English names are prefilled for performance.
|
||||||
if (locale.getLanguage() != "en") {
|
if (!locale.equals(Locale.ENGLISH) &&
|
||||||
|
!locale.equals(Locale.US)) {
|
||||||
for (int zoneIndex = 0; zoneIndex < ret.length; zoneIndex++) {
|
for (int zoneIndex = 0; zoneIndex < ret.length; zoneIndex++) {
|
||||||
deriveFallbackNames(ret[zoneIndex], locale);
|
deriveFallbackNames(ret[zoneIndex], locale);
|
||||||
}
|
}
|
||||||
|
|
|
@ -378,7 +378,7 @@ public class CPlatformWindow extends CFRetainedResource implements PlatformWindo
|
||||||
|
|
||||||
// Either java.awt.Frame or java.awt.Dialog can be resizable, however java.awt.Window is never resizable
|
// Either java.awt.Frame or java.awt.Dialog can be resizable, however java.awt.Window is never resizable
|
||||||
{
|
{
|
||||||
final boolean resizable = isFrame ? ((Frame)target).isResizable() : (isDialog ? ((Dialog)target).isResizable() : false);
|
final boolean resizable = isTargetResizable() && isNativelyFocusableWindow();
|
||||||
styleBits = SET(styleBits, RESIZABLE, resizable);
|
styleBits = SET(styleBits, RESIZABLE, resizable);
|
||||||
if (!resizable) {
|
if (!resizable) {
|
||||||
styleBits = SET(styleBits, ZOOMABLE, false);
|
styleBits = SET(styleBits, ZOOMABLE, false);
|
||||||
|
@ -482,6 +482,16 @@ public class CPlatformWindow extends CFRetainedResource implements PlatformWindo
|
||||||
return styleBits;
|
return styleBits;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private boolean isTargetResizable() {
|
||||||
|
if (target instanceof Frame) {
|
||||||
|
return ((Frame)target).isResizable();
|
||||||
|
} else if (target instanceof Dialog) {
|
||||||
|
return ((Dialog)target).isResizable();
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
// this is the counter-point to -[CWindow _nativeSetStyleBit:]
|
// this is the counter-point to -[CWindow _nativeSetStyleBit:]
|
||||||
private void setStyleBits(final int mask, final boolean value) {
|
private void setStyleBits(final int mask, final boolean value) {
|
||||||
execute(ptr -> nativeSetNSWindowStyleBits(ptr, mask, value ? mask : 0));
|
execute(ptr -> nativeSetNSWindowStyleBits(ptr, mask, value ? mask : 0));
|
||||||
|
@ -676,10 +686,9 @@ public class CPlatformWindow extends CFRetainedResource implements PlatformWindo
|
||||||
// Manage the extended state when showing
|
// Manage the extended state when showing
|
||||||
if (visible) {
|
if (visible) {
|
||||||
/* Frame or Dialog should be set property WINDOW_FULLSCREENABLE to true if the
|
/* Frame or Dialog should be set property WINDOW_FULLSCREENABLE to true if the
|
||||||
Frame or Dialog is resizable.
|
Frame or Dialog is resizable and focusable.
|
||||||
**/
|
**/
|
||||||
final boolean resizable = (target instanceof Frame) ? ((Frame)target).isResizable() :
|
final boolean resizable = isTargetResizable() && isNativelyFocusableWindow();
|
||||||
((target instanceof Dialog) ? ((Dialog)target).isResizable() : false);
|
|
||||||
if (resizable) {
|
if (resizable) {
|
||||||
setCanFullscreen(true);
|
setCanFullscreen(true);
|
||||||
}
|
}
|
||||||
|
@ -814,9 +823,10 @@ public class CPlatformWindow extends CFRetainedResource implements PlatformWindo
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setResizable(final boolean resizable) {
|
public void setResizable(final boolean resizable) {
|
||||||
setCanFullscreen(resizable);
|
final boolean windowResizable = resizable && isNativelyFocusableWindow();
|
||||||
setStyleBits(RESIZABLE, resizable);
|
setCanFullscreen(windowResizable);
|
||||||
setStyleBits(ZOOMABLE, resizable);
|
setStyleBits(RESIZABLE, windowResizable);
|
||||||
|
setStyleBits(ZOOMABLE, windowResizable);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -858,8 +868,8 @@ public class CPlatformWindow extends CFRetainedResource implements PlatformWindo
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateFocusableWindowState() {
|
public void updateFocusableWindowState() {
|
||||||
final boolean isFocusable = isNativelyFocusableWindow();
|
setStyleBits(SHOULD_BECOME_KEY | SHOULD_BECOME_MAIN | RESIZABLE,
|
||||||
setStyleBits(SHOULD_BECOME_KEY | SHOULD_BECOME_MAIN | RESIZABLE, isFocusable); // set bits at once
|
(isNativelyFocusableWindow() && isTargetResizable()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -24,13 +24,41 @@
|
||||||
*/
|
*/
|
||||||
package javax.swing.text.html;
|
package javax.swing.text.html;
|
||||||
|
|
||||||
import java.awt.*;
|
import java.awt.Rectangle;
|
||||||
|
import java.awt.Image;
|
||||||
|
import java.awt.Container;
|
||||||
|
import java.awt.Color;
|
||||||
|
import java.awt.Shape;
|
||||||
|
import java.awt.Graphics;
|
||||||
|
import java.awt.Toolkit;
|
||||||
|
|
||||||
import java.awt.image.ImageObserver;
|
import java.awt.image.ImageObserver;
|
||||||
import java.net.*;
|
import java.net.URL;
|
||||||
|
import java.net.MalformedURLException;
|
||||||
|
|
||||||
import java.util.Dictionary;
|
import java.util.Dictionary;
|
||||||
import javax.swing.*;
|
|
||||||
import javax.swing.text.*;
|
import javax.swing.GrayFilter;
|
||||||
import javax.swing.event.*;
|
import javax.swing.ImageIcon;
|
||||||
|
import javax.swing.Icon;
|
||||||
|
import javax.swing.UIManager;
|
||||||
|
import javax.swing.SwingUtilities;
|
||||||
|
|
||||||
|
import javax.swing.text.JTextComponent;
|
||||||
|
import javax.swing.text.StyledDocument;
|
||||||
|
import javax.swing.text.View;
|
||||||
|
import javax.swing.text.AttributeSet;
|
||||||
|
import javax.swing.text.Element;
|
||||||
|
import javax.swing.text.ViewFactory;
|
||||||
|
import javax.swing.text.Position;
|
||||||
|
import javax.swing.text.Segment;
|
||||||
|
import javax.swing.text.Highlighter;
|
||||||
|
import javax.swing.text.LayeredHighlighter;
|
||||||
|
import javax.swing.text.AbstractDocument;
|
||||||
|
import javax.swing.text.Document;
|
||||||
|
import javax.swing.text.BadLocationException;
|
||||||
|
|
||||||
|
import javax.swing.event.DocumentEvent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* View of an Image, intended to support the HTML <IMG> tag.
|
* View of an Image, intended to support the HTML <IMG> tag.
|
||||||
|
@ -744,12 +772,22 @@ public class ImageView extends View {
|
||||||
// anything that might cause the image to be loaded, and thus the
|
// anything that might cause the image to be loaded, and thus the
|
||||||
// ImageHandler to be called.
|
// ImageHandler to be called.
|
||||||
newWidth = getIntAttr(HTML.Attribute.WIDTH, -1);
|
newWidth = getIntAttr(HTML.Attribute.WIDTH, -1);
|
||||||
|
newHeight = getIntAttr(HTML.Attribute.HEIGHT, -1);
|
||||||
|
|
||||||
if (newWidth > 0) {
|
if (newWidth > 0) {
|
||||||
newState |= WIDTH_FLAG;
|
newState |= WIDTH_FLAG;
|
||||||
|
if (newHeight <= 0) {
|
||||||
|
newHeight = newWidth;
|
||||||
|
newState |= HEIGHT_FLAG;
|
||||||
}
|
}
|
||||||
newHeight = getIntAttr(HTML.Attribute.HEIGHT, -1);
|
}
|
||||||
|
|
||||||
if (newHeight > 0) {
|
if (newHeight > 0) {
|
||||||
newState |= HEIGHT_FLAG;
|
newState |= HEIGHT_FLAG;
|
||||||
|
if (newWidth <= 0) {
|
||||||
|
newWidth = newHeight;
|
||||||
|
newState |= WIDTH_FLAG;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (newWidth <= 0) {
|
if (newWidth <= 0) {
|
||||||
|
|
|
@ -69,7 +69,8 @@ public class XDHKeyAgreement extends KeyAgreementSpi {
|
||||||
|
|
||||||
initImpl(key);
|
initImpl(key);
|
||||||
|
|
||||||
// the private key parameters must match params
|
// the private key parameters must match params, if present
|
||||||
|
if (params != null) {
|
||||||
XECParameters xecParams = XECParameters.get(
|
XECParameters xecParams = XECParameters.get(
|
||||||
InvalidAlgorithmParameterException::new, params);
|
InvalidAlgorithmParameterException::new, params);
|
||||||
if (!xecParams.oidEquals(this.ops.getParameters())) {
|
if (!xecParams.oidEquals(this.ops.getParameters())) {
|
||||||
|
@ -78,6 +79,7 @@ public class XDHKeyAgreement extends KeyAgreementSpi {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private
|
private
|
||||||
<T extends Throwable>
|
<T extends Throwable>
|
||||||
|
@ -171,7 +173,9 @@ public class XDHKeyAgreement extends KeyAgreementSpi {
|
||||||
throw new IllegalStateException("Not initialized correctly");
|
throw new IllegalStateException("Not initialized correctly");
|
||||||
}
|
}
|
||||||
|
|
||||||
return secret.clone();
|
byte[] result = secret;
|
||||||
|
secret = null;
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -189,7 +193,8 @@ public class XDHKeyAgreement extends KeyAgreementSpi {
|
||||||
}
|
}
|
||||||
|
|
||||||
System.arraycopy(this.secret, 0, sharedSecret, offset, secretLen);
|
System.arraycopy(this.secret, 0, sharedSecret, offset, secretLen);
|
||||||
return secret.length;
|
secret = null;
|
||||||
|
return secretLen;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -83,7 +83,7 @@ public class AArch64AtomicMove {
|
||||||
if (AArch64LIRFlagsVersioned.useLSE(masm.target.arch)) {
|
if (AArch64LIRFlagsVersioned.useLSE(masm.target.arch)) {
|
||||||
Register expected = asRegister(expectedValue);
|
Register expected = asRegister(expectedValue);
|
||||||
masm.mov(size, result, expected);
|
masm.mov(size, result, expected);
|
||||||
masm.cas(size, expected, newVal, address, true /* acquire */, true /* release */);
|
masm.cas(size, result, newVal, address, true /* acquire */, true /* release */);
|
||||||
AArch64Compare.gpCompare(masm, resultValue, expectedValue);
|
AArch64Compare.gpCompare(masm, resultValue, expectedValue);
|
||||||
} else {
|
} else {
|
||||||
// We could avoid using a scratch register here, by reusing resultValue for the
|
// We could avoid using a scratch register here, by reusing resultValue for the
|
||||||
|
|
|
@ -423,6 +423,21 @@ public class HelpWriter extends HtmlDocletWriter {
|
||||||
ul.addContent(htmlTree);
|
ul.addContent(htmlTree);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Search
|
||||||
|
Content searchHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING,
|
||||||
|
contents.getContent("doclet.help.search.head"));
|
||||||
|
htmlTree = (configuration.allowTag(HtmlTag.SECTION))
|
||||||
|
? HtmlTree.SECTION(searchHead)
|
||||||
|
: HtmlTree.LI(HtmlStyle.blockList, searchHead);
|
||||||
|
Content searchBody = contents.getContent("doclet.help.search.body");
|
||||||
|
Content searchPara = HtmlTree.P(searchBody);
|
||||||
|
htmlTree.addContent(searchPara);
|
||||||
|
if (configuration.allowTag(HtmlTag.SECTION)) {
|
||||||
|
ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
|
||||||
|
} else {
|
||||||
|
ul.addContent(htmlTree);
|
||||||
|
}
|
||||||
|
|
||||||
Content divContent = HtmlTree.DIV(HtmlStyle.contentContainer, ul);
|
Content divContent = HtmlTree.DIV(HtmlStyle.contentContainer, ul);
|
||||||
divContent.addContent(new HtmlTree(HtmlTag.HR));
|
divContent.addContent(new HtmlTree(HtmlTag.HR));
|
||||||
Content footnote = HtmlTree.SPAN(HtmlStyle.emphasizedPhrase,
|
Content footnote = HtmlTree.SPAN(HtmlStyle.emphasizedPhrase,
|
||||||
|
|
|
@ -192,6 +192,10 @@ doclet.help.annotation_type.declaration=\
|
||||||
Annotation Type Declaration
|
Annotation Type Declaration
|
||||||
doclet.help.annotation_type.description=\
|
doclet.help.annotation_type.description=\
|
||||||
Annotation Type Description
|
Annotation Type Description
|
||||||
|
doclet.help.search.head=Search
|
||||||
|
doclet.help.search.body=You can search for definitions of modules, packages, types, fields, methods \
|
||||||
|
and other terms defined in the API, using some or all of the name. "Camel-case" abbreviations \
|
||||||
|
are supported: for example, "InpStr" will find "InputStream" and "InputStreamReader".
|
||||||
|
|
||||||
doclet.ClassUse_Packages.that.use.0=Packages that use {0}
|
doclet.ClassUse_Packages.that.use.0=Packages that use {0}
|
||||||
doclet.ClassUse_Uses.of.0.in.1=Uses of {0} in {1}
|
doclet.ClassUse_Uses.of.0.in.1=Uses of {0} in {1}
|
||||||
|
|
|
@ -91,7 +91,7 @@ public class FormatData_ja extends ParallelListResourceBundle {
|
||||||
"\u5927\u6b63", // Taisho
|
"\u5927\u6b63", // Taisho
|
||||||
"\u662d\u548c", // Showa
|
"\u662d\u548c", // Showa
|
||||||
"\u5e73\u6210", // Heisei
|
"\u5e73\u6210", // Heisei
|
||||||
"\u65b0\u5143\u53f7", // NewEra
|
"\u5143\u53f7", // NewEra
|
||||||
};
|
};
|
||||||
final String[] rocEras = {
|
final String[] rocEras = {
|
||||||
"\u6c11\u56fd\u524d",
|
"\u6c11\u56fd\u524d",
|
||||||
|
|
|
@ -154,7 +154,7 @@ public class JavaTimeSupplementary_ja extends OpenListResourceBundle {
|
||||||
"\u5927\u6b63",
|
"\u5927\u6b63",
|
||||||
"\u662d\u548c",
|
"\u662d\u548c",
|
||||||
"\u5e73\u6210",
|
"\u5e73\u6210",
|
||||||
"\u65b0\u5143\u53f7", // NewEra
|
"\u5143\u53f7", // NewEra
|
||||||
};
|
};
|
||||||
|
|
||||||
final String[] sharedJavaTimeShortEras = {
|
final String[] sharedJavaTimeShortEras = {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -95,6 +95,7 @@ static inline char* read_line(FILE* fp) {
|
||||||
int buflen = 512;
|
int buflen = 512;
|
||||||
char* buf = NEW_RESOURCE_ARRAY(char, buflen);
|
char* buf = NEW_RESOURCE_ARRAY(char, buflen);
|
||||||
long pos = ftell(fp);
|
long pos = ftell(fp);
|
||||||
|
if (pos < 0) return NULL;
|
||||||
|
|
||||||
char* ret = fgets(buf, buflen, fp);
|
char* ret = fgets(buf, buflen, fp);
|
||||||
while (ret != NULL && buf[strlen(buf) - 1] != '\n' && !feof(fp)) {
|
while (ret != NULL && buf[strlen(buf) - 1] != '\n' && !feof(fp)) {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -60,7 +60,7 @@ TEST(Metachunk, basic) {
|
||||||
// Check sizes
|
// Check sizes
|
||||||
EXPECT_EQ(metachunk->size(), metachunk->word_size());
|
EXPECT_EQ(metachunk->size(), metachunk->word_size());
|
||||||
EXPECT_EQ(pointer_delta(metachunk->end(), metachunk->bottom(),
|
EXPECT_EQ(pointer_delta(metachunk->end(), metachunk->bottom(),
|
||||||
sizeof (MetaWord*)),
|
sizeof (MetaWord)),
|
||||||
metachunk->word_size());
|
metachunk->word_size());
|
||||||
|
|
||||||
// Check usage
|
// Check usage
|
||||||
|
|
|
@ -81,7 +81,6 @@ runtime/CompressedOops/UseCompressedOops.java 8079353 generic-all
|
||||||
|
|
||||||
serviceability/sa/TestRevPtrsForInvokeDynamic.java 8191270 generic-all
|
serviceability/sa/TestRevPtrsForInvokeDynamic.java 8191270 generic-all
|
||||||
serviceability/sa/sadebugd/SADebugDTest.java 8163805 generic-all
|
serviceability/sa/sadebugd/SADebugDTest.java 8163805 generic-all
|
||||||
serviceability/jvmti/HeapMonitor/MyPackage/HeapMonitorGCCMSTest.java 8205643 generic-all
|
|
||||||
serviceability/jvmti/HeapMonitor/MyPackage/HeapMonitorStatArrayCorrectnessTest.java 8205541 generic-all
|
serviceability/jvmti/HeapMonitor/MyPackage/HeapMonitorStatArrayCorrectnessTest.java 8205541 generic-all
|
||||||
serviceability/jvmti/HeapMonitor/MyPackage/HeapMonitorStatRateTest.java 8205652 generic-all
|
serviceability/jvmti/HeapMonitor/MyPackage/HeapMonitorStatRateTest.java 8205652 generic-all
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,58 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2018, Red Hat, Inc. 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 8200282
|
||||||
|
* @summary arraycopy converted as a series of loads/stores uses wrong slice for loads
|
||||||
|
*
|
||||||
|
* @run main/othervm -XX:-TieredCompilation -XX:-BackgroundCompilation -XX:-UseOnStackReplacement -XX:CompileCommand=dontinline,ACasLoadsStoresBadMem::not_inlined ACasLoadsStoresBadMem
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class ACasLoadsStoresBadMem {
|
||||||
|
public static void main(String[] args) {
|
||||||
|
int[] dst = new int[5];
|
||||||
|
for (int i = 0; i < 20_000; i++) {
|
||||||
|
test1(dst, 1);
|
||||||
|
for (int j = 1; j < 5; j++) {
|
||||||
|
if (dst[j] != j) {
|
||||||
|
throw new RuntimeException("Bad copy ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void test1(int[] dst, int dstPos) {
|
||||||
|
int[] src = new int[4];
|
||||||
|
not_inlined();
|
||||||
|
src[0] = 1;
|
||||||
|
src[1] = 2;
|
||||||
|
src[2] = 3;
|
||||||
|
src[3] = 4;
|
||||||
|
System.arraycopy(src, 0, dst, dstPos, 4);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void not_inlined() {
|
||||||
|
}
|
||||||
|
}
|
|
@ -24,6 +24,7 @@
|
||||||
/*
|
/*
|
||||||
* @test
|
* @test
|
||||||
* @bug 8062950
|
* @bug 8062950
|
||||||
|
* @requires vm.flavor == "server"
|
||||||
* @key regression
|
* @key regression
|
||||||
* @library /test/lib
|
* @library /test/lib
|
||||||
* @run driver compiler.c2.Test8062950
|
* @run driver compiler.c2.Test8062950
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
* @test
|
* @test
|
||||||
* @bug 8193130 8203915
|
* @bug 8193130 8203915
|
||||||
* @summary Bad graph when unrolled loop bounds conflicts with range checks
|
* @summary Bad graph when unrolled loop bounds conflicts with range checks
|
||||||
|
* @requires vm.flavor == "server"
|
||||||
*
|
*
|
||||||
* @run main/othervm IterationSplitPredicateInconsistency
|
* @run main/othervm IterationSplitPredicateInconsistency
|
||||||
* @run main/othervm -XX:-UseLoopPredicate IterationSplitPredicateInconsistency
|
* @run main/othervm -XX:-UseLoopPredicate IterationSplitPredicateInconsistency
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
* @test
|
* @test
|
||||||
* @bug 8187822
|
* @bug 8187822
|
||||||
* @summary C2 conditonal move optimization might create broken graph
|
* @summary C2 conditonal move optimization might create broken graph
|
||||||
|
* @requires vm.flavor == "server"
|
||||||
* @run main/othervm -XX:-UseOnStackReplacement -XX:-BackgroundCompilation -XX:CompileCommand=dontinline,TestCMovSplitThruPhi::not_inlined -XX:CompileOnly=TestCMovSplitThruPhi::test -XX:-LoopUnswitching TestCMovSplitThruPhi
|
* @run main/othervm -XX:-UseOnStackReplacement -XX:-BackgroundCompilation -XX:CompileCommand=dontinline,TestCMovSplitThruPhi::not_inlined -XX:CompileOnly=TestCMovSplitThruPhi::test -XX:-LoopUnswitching TestCMovSplitThruPhi
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
* @test
|
* @test
|
||||||
* @bug 8196294
|
* @bug 8196294
|
||||||
* @summary when loop strip is enabled, LoopStripMiningIterShortLoop should be not null
|
* @summary when loop strip is enabled, LoopStripMiningIterShortLoop should be not null
|
||||||
|
* @requires vm.flavor == "server"
|
||||||
* @library /test/lib /
|
* @library /test/lib /
|
||||||
* @modules java.base/jdk.internal.misc
|
* @modules java.base/jdk.internal.misc
|
||||||
* java.management
|
* java.management
|
||||||
|
|
|
@ -117,22 +117,15 @@ public class TestTypeProfiling {
|
||||||
}
|
}
|
||||||
|
|
||||||
// should deoptimize for speculative type check
|
// should deoptimize for speculative type check
|
||||||
|
// Intepreter will also add actual type check trap information into MDO
|
||||||
|
// when it throw ClassCastException
|
||||||
if (!deoptimize(method, src_obj)) {
|
if (!deoptimize(method, src_obj)) {
|
||||||
throw new RuntimeException(method.getName() + " is not deoptimized");
|
throw new RuntimeException(method.getName() + " is not deoptimized");
|
||||||
}
|
}
|
||||||
|
|
||||||
// compile again
|
// compile again
|
||||||
WHITE_BOX.enqueueMethodForCompilation(method, CompilerWhiteBoxTest.COMP_LEVEL_FULL_OPTIMIZATION);
|
// c2 will generate throw instead of uncommon trap because
|
||||||
if (!WHITE_BOX.isMethodCompiled(method)) {
|
// actual type check trap information is present in MDO
|
||||||
throw new RuntimeException(method.getName() + " is not recompiled");
|
|
||||||
}
|
|
||||||
|
|
||||||
// should deoptimize for actual type check
|
|
||||||
if (!deoptimize(method, src_obj)) {
|
|
||||||
throw new RuntimeException(method.getName() + " is not deoptimized (should deoptimize for actual type check)");
|
|
||||||
}
|
|
||||||
|
|
||||||
// compile once again
|
|
||||||
WHITE_BOX.enqueueMethodForCompilation(method, CompilerWhiteBoxTest.COMP_LEVEL_FULL_OPTIMIZATION);
|
WHITE_BOX.enqueueMethodForCompilation(method, CompilerWhiteBoxTest.COMP_LEVEL_FULL_OPTIMIZATION);
|
||||||
if (!WHITE_BOX.isMethodCompiled(method)) {
|
if (!WHITE_BOX.isMethodCompiled(method)) {
|
||||||
throw new RuntimeException(method.getName() + " is not recompiled");
|
throw new RuntimeException(method.getName() + " is not recompiled");
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
* @test
|
* @test
|
||||||
* @bug 8201367
|
* @bug 8201367
|
||||||
* @summary RPO walk of counted loop block doesn't properly order loads
|
* @summary RPO walk of counted loop block doesn't properly order loads
|
||||||
|
* @requires vm.flavor == "server"
|
||||||
*
|
*
|
||||||
* @run main/othervm -XX:-BackgroundCompilation -XX:-UseCountedLoopSafepoints TestUnexpectedLoadOrdering
|
* @run main/othervm -XX:-BackgroundCompilation -XX:-UseCountedLoopSafepoints TestUnexpectedLoadOrdering
|
||||||
*
|
*
|
||||||
|
|
|
@ -25,13 +25,38 @@
|
||||||
* @test
|
* @test
|
||||||
* @bug 8193373
|
* @bug 8193373
|
||||||
* @summary Test reading ELF info direct from underlaying file
|
* @summary Test reading ELF info direct from underlaying file
|
||||||
* @requires (os.family == "linux")
|
* @requires (os.family == "linux") & (os.arch != "ppc64")
|
||||||
* @modules java.base/jdk.internal.misc
|
* @modules java.base/jdk.internal.misc
|
||||||
* @library /test/lib
|
* @library /test/lib
|
||||||
* @build sun.hotspot.WhiteBox
|
* @build sun.hotspot.WhiteBox
|
||||||
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
|
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
|
||||||
* sun.hotspot.WhiteBox$WhiteBoxPermission
|
* sun.hotspot.WhiteBox$WhiteBoxPermission
|
||||||
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:NativeMemoryTracking=detail TestElfDirectRead
|
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
|
||||||
|
-XX:NativeMemoryTracking=detail TestElfDirectRead
|
||||||
|
*/
|
||||||
|
|
||||||
|
// This test intentionally disables caching of Elf sections during symbol lookup
|
||||||
|
// with WhiteBox.disableElfSectionCache(). On platforms which do not use file
|
||||||
|
// descriptors instead of plain function pointers this slows down the lookup just a
|
||||||
|
// little bit, because all the symbols from an Elf file are still read consecutively
|
||||||
|
// after one 'fseek()' call. But on platforms with file descriptors like ppc64
|
||||||
|
// big-endian, we get two 'fseek()' calls for each symbol read from the Elf file
|
||||||
|
// because reading the file descriptor table is nested inside the loop which reads
|
||||||
|
// the symbols. This really trashes the I/O system and considerable slows down the
|
||||||
|
// test, so we need an extra long timeout setting.
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @test
|
||||||
|
* @bug 8193373
|
||||||
|
* @summary Test reading ELF info direct from underlaying file
|
||||||
|
* @requires (os.family == "linux") & (os.arch == "ppc64")
|
||||||
|
* @modules java.base/jdk.internal.misc
|
||||||
|
* @library /test/lib
|
||||||
|
* @build sun.hotspot.WhiteBox
|
||||||
|
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
|
||||||
|
* sun.hotspot.WhiteBox$WhiteBoxPermission
|
||||||
|
* @run main/othervm/timeout=600 -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
|
||||||
|
-XX:NativeMemoryTracking=detail TestElfDirectRead
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import jdk.test.lib.process.ProcessTools;
|
import jdk.test.lib.process.ProcessTools;
|
||||||
|
|
|
@ -23,9 +23,13 @@
|
||||||
|
|
||||||
package MyPackage;
|
package MyPackage;
|
||||||
|
|
||||||
|
import java.lang.management.ManagementFactory;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.sun.management.HotSpotDiagnosticMXBean;
|
||||||
|
import com.sun.management.VMOption;
|
||||||
|
|
||||||
/** API for handling the underlying heap sampling monitoring system. */
|
/** API for handling the underlying heap sampling monitoring system. */
|
||||||
public class HeapMonitor {
|
public class HeapMonitor {
|
||||||
private static int[][] arrays;
|
private static int[][] arrays;
|
||||||
|
@ -56,7 +60,7 @@ public class HeapMonitor {
|
||||||
int sum = 0;
|
int sum = 0;
|
||||||
List<Frame> frames = new ArrayList<Frame>();
|
List<Frame> frames = new ArrayList<Frame>();
|
||||||
allocate(frames);
|
allocate(frames);
|
||||||
frames.add(new Frame("allocate", "()Ljava/util/List;", "HeapMonitor.java", 58));
|
frames.add(new Frame("allocate", "()Ljava/util/List;", "HeapMonitor.java", 62));
|
||||||
return frames;
|
return frames;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -65,8 +69,8 @@ public class HeapMonitor {
|
||||||
for (int j = 0; j < allocationIterations; j++) {
|
for (int j = 0; j < allocationIterations; j++) {
|
||||||
sum += actuallyAllocate();
|
sum += actuallyAllocate();
|
||||||
}
|
}
|
||||||
frames.add(new Frame("actuallyAllocate", "()I", "HeapMonitor.java", 93));
|
frames.add(new Frame("actuallyAllocate", "()I", "HeapMonitor.java", 97));
|
||||||
frames.add(new Frame("allocate", "(Ljava/util/List;)V", "HeapMonitor.java", 66));
|
frames.add(new Frame("allocate", "(Ljava/util/List;)V", "HeapMonitor.java", 70));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static List<Frame> repeatAllocate(int max) {
|
public static List<Frame> repeatAllocate(int max) {
|
||||||
|
@ -74,7 +78,7 @@ public class HeapMonitor {
|
||||||
for (int i = 0; i < max; i++) {
|
for (int i = 0; i < max; i++) {
|
||||||
frames = allocate();
|
frames = allocate();
|
||||||
}
|
}
|
||||||
frames.add(new Frame("repeatAllocate", "(I)Ljava/util/List;", "HeapMonitor.java", 75));
|
frames.add(new Frame("repeatAllocate", "(I)Ljava/util/List;", "HeapMonitor.java", 79));
|
||||||
return frames;
|
return frames;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -152,14 +156,42 @@ public class HeapMonitor {
|
||||||
}
|
}
|
||||||
|
|
||||||
public native static int sampledEvents();
|
public native static int sampledEvents();
|
||||||
public native static boolean obtainedEvents(Frame[] frames);
|
public native static boolean obtainedEvents(Frame[] frames, boolean checkLines);
|
||||||
public native static boolean garbageContains(Frame[] frames);
|
public native static boolean garbageContains(Frame[] frames, boolean checkLines);
|
||||||
public native static boolean eventStorageIsEmpty();
|
public native static boolean eventStorageIsEmpty();
|
||||||
public native static void resetEventStorage();
|
public native static void resetEventStorage();
|
||||||
public native static int getEventStorageElementCount();
|
public native static int getEventStorageElementCount();
|
||||||
public native static void forceGarbageCollection();
|
public native static void forceGarbageCollection();
|
||||||
public native static boolean enableVMEvents();
|
public native static boolean enableVMEvents();
|
||||||
|
|
||||||
|
private static boolean getCheckLines() {
|
||||||
|
boolean checkLines = true;
|
||||||
|
|
||||||
|
// Do not check lines for Graal since it is not always "precise" with BCIs at uncommon traps.
|
||||||
|
try {
|
||||||
|
HotSpotDiagnosticMXBean bean = ManagementFactory.getPlatformMXBean(HotSpotDiagnosticMXBean.class);
|
||||||
|
|
||||||
|
VMOption enableJVMCI = bean.getVMOption("EnableJVMCI");
|
||||||
|
VMOption useJVMCICompiler = bean.getVMOption("UseJVMCICompiler");
|
||||||
|
String compiler = System.getProperty("jvmci.Compiler");
|
||||||
|
|
||||||
|
checkLines = !(enableJVMCI.getValue().equals("true")
|
||||||
|
&& useJVMCICompiler.getValue().equals("true") && compiler.equals("graal"));
|
||||||
|
} catch (Exception e) {
|
||||||
|
// NOP.
|
||||||
|
}
|
||||||
|
|
||||||
|
return checkLines;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static boolean obtainedEvents(Frame[] frames) {
|
||||||
|
return obtainedEvents(frames, getCheckLines());
|
||||||
|
}
|
||||||
|
|
||||||
|
public static boolean garbageContains(Frame[] frames) {
|
||||||
|
return garbageContains(frames, getCheckLines());
|
||||||
|
}
|
||||||
|
|
||||||
public static boolean statsHaveExpectedNumberSamples(int expected, int acceptedErrorPercentage) {
|
public static boolean statsHaveExpectedNumberSamples(int expected, int acceptedErrorPercentage) {
|
||||||
double actual = getEventStorageElementCount();
|
double actual = getEventStorageElementCount();
|
||||||
double diffPercentage = Math.abs(actual - expected) / expected;
|
double diffPercentage = Math.abs(actual - expected) / expected;
|
||||||
|
|
|
@ -28,6 +28,7 @@ package MyPackage;
|
||||||
* @summary Verifies the JVMTI Heap Monitor Statistics using CMS GC
|
* @summary Verifies the JVMTI Heap Monitor Statistics using CMS GC
|
||||||
* @build Frame HeapMonitor
|
* @build Frame HeapMonitor
|
||||||
* @requires vm.gc == "ConcMarkSweep" | vm.gc == "null"
|
* @requires vm.gc == "ConcMarkSweep" | vm.gc == "null"
|
||||||
|
* @requires !vm.graal.enabled
|
||||||
* @compile HeapMonitorGCCMSTest.java
|
* @compile HeapMonitorGCCMSTest.java
|
||||||
* @run main/othervm/native -agentlib:HeapMonitorTest -XX:+UseConcMarkSweepGC MyPackage.HeapMonitorGCTest
|
* @run main/othervm/native -agentlib:HeapMonitorTest -XX:+UseConcMarkSweepGC MyPackage.HeapMonitorGCTest
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -26,11 +26,13 @@ package MyPackage;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
// Graal is not tested here due to Graal not supporting DisableIntrinsic.
|
||||||
/**
|
/**
|
||||||
* @test
|
* @test
|
||||||
* @summary Verifies that when the VM event is sent, sampled events are also collected.
|
* @summary Verifies that when the VM event is sent, sampled events are also collected.
|
||||||
* @build Frame HeapMonitor
|
* @build Frame HeapMonitor
|
||||||
* @compile HeapMonitorVMEventsTest.java
|
* @compile HeapMonitorVMEventsTest.java
|
||||||
|
* @requires !vm.graal.enabled
|
||||||
* @run main/othervm/native -XX:+UnlockDiagnosticVMOptions
|
* @run main/othervm/native -XX:+UnlockDiagnosticVMOptions
|
||||||
* -XX:DisableIntrinsic=_clone
|
* -XX:DisableIntrinsic=_clone
|
||||||
* -agentlib:HeapMonitorTest MyPackage.HeapMonitorVMEventsTest
|
* -agentlib:HeapMonitorTest MyPackage.HeapMonitorVMEventsTest
|
||||||
|
|
|
@ -208,6 +208,7 @@ static jboolean check_sample_content(JNIEnv* env,
|
||||||
ObjectTrace* trace,
|
ObjectTrace* trace,
|
||||||
ExpectedContentFrame *expected,
|
ExpectedContentFrame *expected,
|
||||||
size_t expected_count,
|
size_t expected_count,
|
||||||
|
jboolean check_lines,
|
||||||
int print_out_comparisons) {
|
int print_out_comparisons) {
|
||||||
jvmtiFrameInfo* frames;
|
jvmtiFrameInfo* frames;
|
||||||
size_t i;
|
size_t i;
|
||||||
|
@ -224,6 +225,7 @@ static jboolean check_sample_content(JNIEnv* env,
|
||||||
char *name = NULL, *signature = NULL, *file_name = NULL;
|
char *name = NULL, *signature = NULL, *file_name = NULL;
|
||||||
jclass declaring_class;
|
jclass declaring_class;
|
||||||
int line_number;
|
int line_number;
|
||||||
|
jboolean differ;
|
||||||
jvmtiError err;
|
jvmtiError err;
|
||||||
|
|
||||||
if (bci < 0 && expected[i].line_number != -1) {
|
if (bci < 0 && expected[i].line_number != -1) {
|
||||||
|
@ -258,23 +260,21 @@ static jboolean check_sample_content(JNIEnv* env,
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
differ = (strcmp(name, expected[i].name) ||
|
||||||
|
strcmp(signature, expected[i].signature) ||
|
||||||
|
strcmp(file_name, expected[i].file_name) ||
|
||||||
|
(check_lines && line_number != expected[i].line_number));
|
||||||
|
|
||||||
if (print_out_comparisons) {
|
if (print_out_comparisons) {
|
||||||
fprintf(stderr, "\tComparing:\n");
|
fprintf(stderr, "\tComparing: (check_lines: %d)\n", check_lines);
|
||||||
fprintf(stderr, "\t\tNames: %s and %s\n", name, expected[i].name);
|
fprintf(stderr, "\t\tNames: %s and %s\n", name, expected[i].name);
|
||||||
fprintf(stderr, "\t\tSignatures: %s and %s\n", signature, expected[i].signature);
|
fprintf(stderr, "\t\tSignatures: %s and %s\n", signature, expected[i].signature);
|
||||||
fprintf(stderr, "\t\tFile name: %s and %s\n", file_name, expected[i].file_name);
|
fprintf(stderr, "\t\tFile name: %s and %s\n", file_name, expected[i].file_name);
|
||||||
fprintf(stderr, "\t\tLines: %d and %d\n", line_number, expected[i].line_number);
|
fprintf(stderr, "\t\tLines: %d and %d\n", line_number, expected[i].line_number);
|
||||||
fprintf(stderr, "\t\tResult is %d\n",
|
fprintf(stderr, "\t\tResult is %d\n", differ);
|
||||||
(strcmp(name, expected[i].name) ||
|
|
||||||
strcmp(signature, expected[i].signature) ||
|
|
||||||
strcmp(file_name, expected[i].file_name) ||
|
|
||||||
line_number != expected[i].line_number));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcmp(name, expected[i].name) ||
|
if (differ) {
|
||||||
strcmp(signature, expected[i].signature) ||
|
|
||||||
strcmp(file_name, expected[i].file_name) ||
|
|
||||||
line_number != expected[i].line_number) {
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -388,14 +388,15 @@ static double event_storage_get_average_rate(EventStorage* storage) {
|
||||||
static jboolean event_storage_contains(JNIEnv* env,
|
static jboolean event_storage_contains(JNIEnv* env,
|
||||||
EventStorage* storage,
|
EventStorage* storage,
|
||||||
ExpectedContentFrame* frames,
|
ExpectedContentFrame* frames,
|
||||||
size_t size) {
|
size_t size,
|
||||||
|
jboolean check_lines) {
|
||||||
int i;
|
int i;
|
||||||
event_storage_lock(storage);
|
event_storage_lock(storage);
|
||||||
fprintf(stderr, "Checking storage count %d\n", storage->live_object_count);
|
fprintf(stderr, "Checking storage count %d\n", storage->live_object_count);
|
||||||
for (i = 0; i < storage->live_object_count; i++) {
|
for (i = 0; i < storage->live_object_count; i++) {
|
||||||
ObjectTrace* trace = storage->live_objects[i];
|
ObjectTrace* trace = storage->live_objects[i];
|
||||||
|
|
||||||
if (check_sample_content(env, trace, frames, size, PRINT_OUT)) {
|
if (check_sample_content(env, trace, frames, size, check_lines, PRINT_OUT)) {
|
||||||
event_storage_unlock(storage);
|
event_storage_unlock(storage);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -407,7 +408,8 @@ static jboolean event_storage_contains(JNIEnv* env,
|
||||||
static jboolean event_storage_garbage_contains(JNIEnv* env,
|
static jboolean event_storage_garbage_contains(JNIEnv* env,
|
||||||
EventStorage* storage,
|
EventStorage* storage,
|
||||||
ExpectedContentFrame* frames,
|
ExpectedContentFrame* frames,
|
||||||
size_t size) {
|
size_t size,
|
||||||
|
jboolean check_lines) {
|
||||||
int i;
|
int i;
|
||||||
event_storage_lock(storage);
|
event_storage_lock(storage);
|
||||||
fprintf(stderr, "Checking garbage storage count %d\n",
|
fprintf(stderr, "Checking garbage storage count %d\n",
|
||||||
|
@ -419,7 +421,7 @@ static jboolean event_storage_garbage_contains(JNIEnv* env,
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (check_sample_content(env, trace, frames, size, PRINT_OUT)) {
|
if (check_sample_content(env, trace, frames, size, check_lines, PRINT_OUT)) {
|
||||||
event_storage_unlock(storage);
|
event_storage_unlock(storage);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -876,7 +878,9 @@ Java_MyPackage_HeapMonitor_disableSamplingEvents(JNIEnv* env, jclass cls) {
|
||||||
}
|
}
|
||||||
|
|
||||||
JNIEXPORT jboolean JNICALL
|
JNIEXPORT jboolean JNICALL
|
||||||
Java_MyPackage_HeapMonitor_obtainedEvents(JNIEnv* env, jclass cls, jobjectArray frames) {
|
Java_MyPackage_HeapMonitor_obtainedEvents(JNIEnv* env, jclass cls,
|
||||||
|
jobjectArray frames,
|
||||||
|
jboolean check_lines) {
|
||||||
jboolean result;
|
jboolean result;
|
||||||
jsize size = (*env)->GetArrayLength(env, frames);
|
jsize size = (*env)->GetArrayLength(env, frames);
|
||||||
ExpectedContentFrame *native_frames = malloc(size * sizeof(*native_frames));
|
ExpectedContentFrame *native_frames = malloc(size * sizeof(*native_frames));
|
||||||
|
@ -886,14 +890,17 @@ Java_MyPackage_HeapMonitor_obtainedEvents(JNIEnv* env, jclass cls, jobjectArray
|
||||||
}
|
}
|
||||||
|
|
||||||
fill_native_frames(env, frames, native_frames, size);
|
fill_native_frames(env, frames, native_frames, size);
|
||||||
result = event_storage_contains(env, &global_event_storage, native_frames, size);
|
result = event_storage_contains(env, &global_event_storage, native_frames,
|
||||||
|
size, check_lines);
|
||||||
|
|
||||||
free(native_frames), native_frames = NULL;
|
free(native_frames), native_frames = NULL;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
JNIEXPORT jboolean JNICALL
|
JNIEXPORT jboolean JNICALL
|
||||||
Java_MyPackage_HeapMonitor_garbageContains(JNIEnv* env, jclass cls, jobjectArray frames) {
|
Java_MyPackage_HeapMonitor_garbageContains(JNIEnv* env, jclass cls,
|
||||||
|
jobjectArray frames,
|
||||||
|
jboolean check_lines) {
|
||||||
jboolean result;
|
jboolean result;
|
||||||
jsize size = (*env)->GetArrayLength(env, frames);
|
jsize size = (*env)->GetArrayLength(env, frames);
|
||||||
ExpectedContentFrame *native_frames = malloc(size * sizeof(*native_frames));
|
ExpectedContentFrame *native_frames = malloc(size * sizeof(*native_frames));
|
||||||
|
@ -903,7 +910,8 @@ Java_MyPackage_HeapMonitor_garbageContains(JNIEnv* env, jclass cls, jobjectArray
|
||||||
}
|
}
|
||||||
|
|
||||||
fill_native_frames(env, frames, native_frames, size);
|
fill_native_frames(env, frames, native_frames, size);
|
||||||
result = event_storage_garbage_contains(env, &global_event_storage, native_frames, size);
|
result = event_storage_garbage_contains(env, &global_event_storage,
|
||||||
|
native_frames, size, check_lines);
|
||||||
|
|
||||||
free(native_frames), native_frames = NULL;
|
free(native_frames), native_frames = NULL;
|
||||||
return result;
|
return result;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -32,10 +32,13 @@
|
||||||
* @modules java.base/jdk.internal.misc
|
* @modules java.base/jdk.internal.misc
|
||||||
* @library /test/lib
|
* @library /test/lib
|
||||||
* @library ../share
|
* @library ../share
|
||||||
* @run main/othervm -XX:+UsePerfData -XX:MaxNewSize=4m -XX:MaxHeapSize=128M -XX:MaxMetaspaceSize=128M GcCauseTest02
|
* @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:-VerifyDependencies
|
||||||
|
-XX:+UsePerfData -XX:MaxNewSize=4m -XX:MaxHeapSize=128M -XX:MaxMetaspaceSize=128M GcCauseTest02
|
||||||
*/
|
*/
|
||||||
import utils.*;
|
import utils.*;
|
||||||
|
|
||||||
|
// This test produces more than 90_000 classes until it eats up ~70% of the 128M meta space.
|
||||||
|
// We turn off VerifyDependencies because it slows down the test considerably in debug builds.
|
||||||
public class GcCauseTest02 {
|
public class GcCauseTest02 {
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws Exception {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -32,10 +32,13 @@
|
||||||
* @modules java.base/jdk.internal.misc
|
* @modules java.base/jdk.internal.misc
|
||||||
* @library /test/lib
|
* @library /test/lib
|
||||||
* @library ../share
|
* @library ../share
|
||||||
* @run main/othervm -XX:+UsePerfData -XX:MaxNewSize=4m -XX:MaxHeapSize=128M -XX:MaxMetaspaceSize=128M GcTest02
|
* @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:-VerifyDependencies
|
||||||
|
-XX:+UsePerfData -XX:MaxNewSize=4m -XX:MaxHeapSize=128M -XX:MaxMetaspaceSize=128M GcTest02
|
||||||
*/
|
*/
|
||||||
import utils.*;
|
import utils.*;
|
||||||
|
|
||||||
|
// This test produces more than 90_000 classes until it eats up ~70% of the 128M meta space.
|
||||||
|
// We turn off VerifyDependencies because it slows down the test considerably in debug builds.
|
||||||
public class GcTest02 {
|
public class GcTest02 {
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws Exception {
|
||||||
|
|
|
@ -520,6 +520,7 @@ java/lang/management/MemoryMXBean/Pending.java 8158837 generic-
|
||||||
java/lang/management/MemoryMXBean/PendingAllGC.sh 8158837 generic-all
|
java/lang/management/MemoryMXBean/PendingAllGC.sh 8158837 generic-all
|
||||||
|
|
||||||
java/lang/management/ThreadMXBean/ThreadMXBeanStateTest.java 8081652 generic-all
|
java/lang/management/ThreadMXBean/ThreadMXBeanStateTest.java 8081652 generic-all
|
||||||
|
java/lang/management/ThreadMXBean/AllThreadIds.java 8131745 generic-all
|
||||||
|
|
||||||
############################################################################
|
############################################################################
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
/*
|
/*
|
||||||
@test
|
@test
|
||||||
@key headful
|
@key headful
|
||||||
@bug 4980161 7158623
|
@bug 4980161 7158623 8204860
|
||||||
@summary Setting focusable window state to false makes the maximized frame resizable
|
@summary Setting focusable window state to false makes the maximized frame resizable
|
||||||
@compile UnfocusableMaximizedFrameResizablity.java
|
@compile UnfocusableMaximizedFrameResizablity.java
|
||||||
@run main UnfocusableMaximizedFrameResizablity
|
@run main UnfocusableMaximizedFrameResizablity
|
||||||
|
@ -36,29 +36,84 @@ import java.awt.Rectangle;
|
||||||
import java.awt.AWTException;
|
import java.awt.AWTException;
|
||||||
import java.awt.event.InputEvent;
|
import java.awt.event.InputEvent;
|
||||||
import java.awt.Robot;
|
import java.awt.Robot;
|
||||||
|
import javax.swing.JFrame;
|
||||||
|
import javax.swing.SwingUtilities;
|
||||||
|
|
||||||
public class UnfocusableMaximizedFrameResizablity {
|
public class UnfocusableMaximizedFrameResizablity {
|
||||||
|
|
||||||
private static Frame frame;
|
private static Frame frame;
|
||||||
|
private static JFrame jframe;
|
||||||
private static Robot robot;
|
private static Robot robot;
|
||||||
private static boolean isProgInterruption = false;
|
private static boolean isProgInterruption = false;
|
||||||
private static Thread mainThread = null;
|
private static Thread mainThread = null;
|
||||||
private static int sleepTime = 300000;
|
private static int sleepTime = 300000;
|
||||||
|
|
||||||
private static void createAndShowFrame() {
|
private static void createAndShowFrame() throws Exception {
|
||||||
|
|
||||||
//The MAXIMIZED_BOTH state is not supported by the toolkit. Nothing to test.
|
//The MAXIMIZED_BOTH state is not supported by the toolkit. Nothing to test.
|
||||||
if (!Toolkit.getDefaultToolkit().isFrameStateSupported(Frame.MAXIMIZED_BOTH)) {
|
if (!Toolkit.getDefaultToolkit().isFrameStateSupported(Frame.MAXIMIZED_BOTH)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
frame = new Frame("Unfocusable frame");
|
//Case 1: Setting frame resizable to true followed by focusable to false
|
||||||
|
frame = createFrame("Resizable Unfocusable frame");
|
||||||
|
frame.setResizable(true);
|
||||||
|
frame.setFocusableWindowState(false);
|
||||||
|
tryToResizeFrame(frame);
|
||||||
|
|
||||||
|
//Case 2: Setting frame focusable to false followed by resizable to true
|
||||||
|
frame = createFrame("Unfocusable Resizable frame");
|
||||||
|
frame.setFocusableWindowState(false);
|
||||||
|
frame.setResizable(true);
|
||||||
|
tryToResizeFrame(frame);
|
||||||
|
|
||||||
|
//Case 3: Testing JFrame fullscreen behaviour only on Mac OS
|
||||||
|
if (System.getProperty("os.name").toLowerCase().startsWith("mac")) {
|
||||||
|
SwingUtilities.invokeAndWait(new Runnable() {
|
||||||
|
|
||||||
|
Override
|
||||||
|
public void run() {
|
||||||
|
jframe = createJFrame("Unfocusable Resizable JFrame");
|
||||||
|
jframe.setFocusableWindowState(false);
|
||||||
|
jframe.setResizable(true);
|
||||||
|
Object prop1 = jframe.getRootPane().getClientProperty("apple.awt.fullscreenable");
|
||||||
|
jframe.setVisible(false);
|
||||||
|
jframe.setVisible(true);
|
||||||
|
Object prop2 = jframe.getRootPane().getClientProperty("apple.awt.fullscreenable");
|
||||||
|
|
||||||
|
if((prop1 != null && prop2 != null) && (!prop1.equals(prop2))) {
|
||||||
|
jframe.dispose();
|
||||||
|
cleanup();
|
||||||
|
throw new RuntimeException("Non-focusable resizable JFrame is fullscreenable!!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
cleanup();
|
||||||
|
}
|
||||||
|
|
||||||
|
private static JFrame createJFrame(String title) {
|
||||||
|
JFrame jframe = new JFrame(title);
|
||||||
|
jframe.setMaximizedBounds(new Rectangle(0, 0, 300, 300));
|
||||||
|
jframe.setSize(200, 200);
|
||||||
|
jframe.setVisible(true);
|
||||||
|
jframe.setExtendedState(Frame.MAXIMIZED_BOTH);
|
||||||
|
|
||||||
|
return jframe;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static Frame createFrame(String title) {
|
||||||
|
Frame frame = new Frame(title);
|
||||||
frame.setMaximizedBounds(new Rectangle(0, 0, 300, 300));
|
frame.setMaximizedBounds(new Rectangle(0, 0, 300, 300));
|
||||||
frame.setSize(200, 200);
|
frame.setSize(200, 200);
|
||||||
frame.setVisible(true);
|
frame.setVisible(true);
|
||||||
frame.setExtendedState(Frame.MAXIMIZED_BOTH);
|
frame.setExtendedState(Frame.MAXIMIZED_BOTH);
|
||||||
frame.setFocusableWindowState(false);
|
|
||||||
|
|
||||||
|
return frame;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void tryToResizeFrame(Frame frame) {
|
||||||
try {
|
try {
|
||||||
robot = new Robot();
|
robot = new Robot();
|
||||||
} catch (AWTException e) {
|
} catch (AWTException e) {
|
||||||
|
@ -89,16 +144,16 @@ public class UnfocusableMaximizedFrameResizablity {
|
||||||
cleanup();
|
cleanup();
|
||||||
throw new RuntimeException("The maximized unfocusable frame can be resized.");
|
throw new RuntimeException("The maximized unfocusable frame can be resized.");
|
||||||
}
|
}
|
||||||
cleanup();
|
|
||||||
|
frame.dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void cleanup() {
|
private static void cleanup() {
|
||||||
frame.dispose();
|
|
||||||
isProgInterruption = true;
|
isProgInterruption = true;
|
||||||
mainThread.interrupt();
|
mainThread.interrupt();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void main(String args[]) throws InterruptedException {
|
public static void main(String args[]) throws Exception {
|
||||||
|
|
||||||
mainThread = Thread.currentThread();
|
mainThread = Thread.currentThread();
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -24,6 +24,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* @test
|
/* @test
|
||||||
|
* @bug 8150782 8207027
|
||||||
* @compile TestAccessClass.java TestCls.java
|
* @compile TestAccessClass.java TestCls.java
|
||||||
* @run testng/othervm -ea -esa test.java.lang.invoke.t8150782.TestAccessClass
|
* @run testng/othervm -ea -esa test.java.lang.invoke.t8150782.TestAccessClass
|
||||||
*/
|
*/
|
||||||
|
@ -54,11 +55,17 @@ public class TestAccessClass {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void returnsSameClass() throws IllegalAccessException, ClassNotFoundException {
|
public void returnsSameClassInSamePackage() throws IllegalAccessException, ClassNotFoundException {
|
||||||
Class<?> aClass = lookup().accessClass(Class1.class);
|
Class<?> aClass = lookup().accessClass(Class1.class);
|
||||||
assertEquals(Class1.class, aClass);
|
assertEquals(Class1.class, aClass);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void returnsSameArrayClassInSamePackage() throws IllegalAccessException, ClassNotFoundException {
|
||||||
|
Class<?> aClass = lookup().accessClass(Class1[].class);
|
||||||
|
assertEquals(Class1[].class, aClass);
|
||||||
|
}
|
||||||
|
|
||||||
@DataProvider
|
@DataProvider
|
||||||
Object[][] illegalAccessAccess() {
|
Object[][] illegalAccessAccess() {
|
||||||
return new Object[][] {
|
return new Object[][] {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -24,6 +24,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* @test
|
/* @test
|
||||||
|
* @bug 8150782 8207027
|
||||||
* @compile TestFindClass.java TestCls.java
|
* @compile TestFindClass.java TestCls.java
|
||||||
* @run testng/othervm -ea -esa test.java.lang.invoke.t8150782.TestFindClass
|
* @run testng/othervm -ea -esa test.java.lang.invoke.t8150782.TestFindClass
|
||||||
*/
|
*/
|
||||||
|
@ -56,11 +57,17 @@ public class TestFindClass {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void returnsRequestedClass() throws IllegalAccessException, ClassNotFoundException {
|
public void returnsRequestedClassInSamePackage() throws IllegalAccessException, ClassNotFoundException {
|
||||||
Class<?> aClass = lookup().findClass(PACKAGE_PREFIX + "TestFindClass$Class1");
|
Class<?> aClass = lookup().findClass(PACKAGE_PREFIX + "TestFindClass$Class1");
|
||||||
assertEquals(Class1.class, aClass);
|
assertEquals(Class1.class, aClass);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void returnsRequestedArrayClassInSamePackage() throws IllegalAccessException, ClassNotFoundException {
|
||||||
|
Class<?> aClass = lookup().findClass("[L" + PACKAGE_PREFIX + "TestFindClass$Class1;");
|
||||||
|
assertEquals(Class1[].class, aClass);
|
||||||
|
}
|
||||||
|
|
||||||
@Test(expectedExceptions = {ClassNotFoundException.class})
|
@Test(expectedExceptions = {ClassNotFoundException.class})
|
||||||
public void classNotFoundExceptionTest() throws IllegalAccessException, ClassNotFoundException {
|
public void classNotFoundExceptionTest() throws IllegalAccessException, ClassNotFoundException {
|
||||||
lookup().findClass(PACKAGE_PREFIX + "TestFindClass$NonExistent");
|
lookup().findClass(PACKAGE_PREFIX + "TestFindClass$NonExistent");
|
||||||
|
|
|
@ -28,6 +28,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.nio.channels.ClosedSelectorException;
|
||||||
import java.nio.channels.Pipe;
|
import java.nio.channels.Pipe;
|
||||||
import java.nio.channels.SelectionKey;
|
import java.nio.channels.SelectionKey;
|
||||||
import java.nio.channels.Selector;
|
import java.nio.channels.Selector;
|
||||||
|
@ -44,9 +45,14 @@ public class RegisterDuringSelect {
|
||||||
@Override
|
@Override
|
||||||
public Void call() throws IOException {
|
public Void call() throws IOException {
|
||||||
for (;;) {
|
for (;;) {
|
||||||
|
try {
|
||||||
sel.select();
|
sel.select();
|
||||||
|
} catch (ClosedSelectorException ignore) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
if (sel.isOpen()) {
|
if (sel.isOpen()) {
|
||||||
barrier.arriveAndAwaitAdvance();
|
barrier.arriveAndAwaitAdvance();
|
||||||
|
System.out.println("selectLoop advanced ...");
|
||||||
} else {
|
} else {
|
||||||
// closed
|
// closed
|
||||||
return null;
|
return null;
|
||||||
|
@ -107,3 +113,4 @@ public class RegisterDuringSelect {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -49,7 +49,7 @@ import org.testng.annotations.Test;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @test
|
* @test
|
||||||
* @bug 8081022 8151876 8166875 8189784
|
* @bug 8081022 8151876 8166875 8189784 8206980
|
||||||
* @key randomness
|
* @key randomness
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -162,6 +162,9 @@ public class TestZoneTextPrinterParser extends AbstractTestPrinterParser {
|
||||||
{"America/Juneau", "AKDT", none, Locale.ENGLISH, TextStyle.SHORT},
|
{"America/Juneau", "AKDT", none, Locale.ENGLISH, TextStyle.SHORT},
|
||||||
{"Pacific/Honolulu", "HST", none, Locale.ENGLISH, TextStyle.SHORT},
|
{"Pacific/Honolulu", "HST", none, Locale.ENGLISH, TextStyle.SHORT},
|
||||||
{"America/Halifax", "AST", none, Locale.ENGLISH, TextStyle.SHORT},
|
{"America/Halifax", "AST", none, Locale.ENGLISH, TextStyle.SHORT},
|
||||||
|
{"Z", "Z", none, Locale.ENGLISH, TextStyle.SHORT},
|
||||||
|
{"Z", "Z", none, Locale.US, TextStyle.SHORT},
|
||||||
|
{"Z", "Z", none, Locale.CANADA, TextStyle.SHORT},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @test
|
* @test
|
||||||
* @bug 8202088
|
* @bug 8202088 8207152
|
||||||
* @summary Test the localized Japanese new era name (May 1st. 2019-)
|
* @summary Test the localized Japanese new era name (May 1st. 2019-)
|
||||||
* is retrieved no matter CLDR provider contains the name or not.
|
* is retrieved no matter CLDR provider contains the name or not.
|
||||||
* @modules jdk.localedata
|
* @modules jdk.localedata
|
||||||
|
@ -51,7 +51,7 @@ public class JapaneseEraNameTest {
|
||||||
Object[][] names() {
|
Object[][] names() {
|
||||||
return new Object[][] {
|
return new Object[][] {
|
||||||
// type, locale, name
|
// type, locale, name
|
||||||
{ LONG, JAPAN, "\u65b0\u5143\u53f7" }, // NewEra
|
{ LONG, JAPAN, "\u5143\u53f7" }, // NewEra
|
||||||
{ LONG, US, "NewEra" },
|
{ LONG, US, "NewEra" },
|
||||||
{ SHORT, JAPAN, "N" },
|
{ SHORT, JAPAN, "N" },
|
||||||
{ SHORT, US, "N" },
|
{ SHORT, US, "N" },
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
/**
|
/**
|
||||||
* @test
|
* @test
|
||||||
* @key headful
|
* @key headful
|
||||||
* @bug 8195095
|
* @bug 8195095 8206238
|
||||||
* @summary Tests if Images are scaled correctly in JEditorPane.
|
* @summary Tests if Images are scaled correctly in JEditorPane.
|
||||||
* @run main ImageViewTest
|
* @run main ImageViewTest
|
||||||
*/
|
*/
|
||||||
|
@ -40,22 +40,16 @@ import javax.swing.WindowConstants;
|
||||||
|
|
||||||
public class ImageViewTest {
|
public class ImageViewTest {
|
||||||
|
|
||||||
private static final int WIDTH = 200;
|
|
||||||
private static final int HEIGHT = 200;
|
|
||||||
private static JFrame f;
|
private static JFrame f;
|
||||||
|
|
||||||
private static JEditorPane editorPane1;
|
private static void test(Robot r, JEditorPane editorPane,
|
||||||
private static JEditorPane editorPane2;
|
final int WIDTH, final int HEIGHT ) throws Exception {
|
||||||
private static JEditorPane editorPane3;
|
|
||||||
private static JEditorPane editorPane4;
|
|
||||||
|
|
||||||
private static void test(Robot r, JEditorPane editorPane) throws Exception {
|
|
||||||
|
|
||||||
SwingUtilities.invokeAndWait(() -> {
|
SwingUtilities.invokeAndWait(() -> {
|
||||||
f = new JFrame();
|
f = new JFrame();
|
||||||
editorPane.setEditable(false);
|
editorPane.setEditable(false);
|
||||||
f.add(editorPane);
|
f.add(editorPane);
|
||||||
f.setSize(220,240);
|
f.setSize(WIDTH + 20, HEIGHT + 40);
|
||||||
f.setLocationRelativeTo(null);
|
f.setLocationRelativeTo(null);
|
||||||
|
|
||||||
f.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
|
f.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
|
||||||
|
@ -109,34 +103,78 @@ public class ImageViewTest {
|
||||||
|
|
||||||
Robot r = new Robot();
|
Robot r = new Robot();
|
||||||
|
|
||||||
|
final JEditorPane[] editorPanes = new JEditorPane[11];
|
||||||
|
|
||||||
SwingUtilities.invokeAndWait(() -> {
|
SwingUtilities.invokeAndWait(() -> {
|
||||||
editorPane1 = new JEditorPane("text/html",
|
editorPanes[0] = new JEditorPane("text/html",
|
||||||
"<img height=\"200\" src=\"file:///" + ABSOLUTE_FILE_PATH + "\"");
|
"<img height=\"200\" src=\"file:///" + ABSOLUTE_FILE_PATH + "\"");
|
||||||
|
|
||||||
editorPane2 = new JEditorPane("text/html",
|
editorPanes[1] = new JEditorPane("text/html",
|
||||||
"<img width=\"200\" src=\"file:///" + ABSOLUTE_FILE_PATH + "\"");
|
"<img width=\"200\" src=\"file:///" + ABSOLUTE_FILE_PATH + "\"");
|
||||||
|
|
||||||
editorPane3 = new JEditorPane("text/html",
|
editorPanes[2] = new JEditorPane("text/html",
|
||||||
"<img width=\"200\" height=\"200\" src=\"file:///" + ABSOLUTE_FILE_PATH + "\"");
|
"<img width=\"200\" height=\"200\" src=\"file:///" + ABSOLUTE_FILE_PATH + "\"");
|
||||||
|
|
||||||
editorPane4 = new JEditorPane("text/html",
|
editorPanes[3] = new JEditorPane("text/html",
|
||||||
"<img src=\"file:///" + ABSOLUTE_FILE_PATH + "\"");
|
"<img src=\"file:///" + ABSOLUTE_FILE_PATH + "\"");
|
||||||
|
|
||||||
|
editorPanes[4] = new JEditorPane("text/html",
|
||||||
|
"<img width=\"100\" src =\"file:///" + ABSOLUTE_FILE_PATH + "\"");
|
||||||
|
|
||||||
|
editorPanes[5] = new JEditorPane("text/html",
|
||||||
|
"<img height=\"100\" src =\"file:///" + ABSOLUTE_FILE_PATH + "\"");
|
||||||
|
|
||||||
|
editorPanes[6] = new JEditorPane("text/html",
|
||||||
|
"<img width=\"100\" height=\"100\" src =\"file:///" + ABSOLUTE_FILE_PATH + "\"");
|
||||||
|
|
||||||
|
editorPanes[7] = new JEditorPane("text/html",
|
||||||
|
"<img width=\"50\" src =\"file:///" + ABSOLUTE_FILE_PATH + "\"");
|
||||||
|
|
||||||
|
editorPanes[8] = new JEditorPane("text/html",
|
||||||
|
"<img height=\"50\" src =\"file:///" + ABSOLUTE_FILE_PATH + "\"");
|
||||||
|
|
||||||
|
editorPanes[9] = new JEditorPane("text/html",
|
||||||
|
"<img width=\"300\" src =\"file:///" + ABSOLUTE_FILE_PATH + "\"");
|
||||||
|
|
||||||
|
editorPanes[10] = new JEditorPane("text/html",
|
||||||
|
"<img height=\"300\" src =\"file:///" + ABSOLUTE_FILE_PATH + "\"");
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
r.waitForIdle();
|
r.waitForIdle();
|
||||||
|
|
||||||
System.out.println("Test with only height set to 200");
|
System.out.println("Test with only height set to 200");
|
||||||
test(r, editorPane1);
|
test(r, editorPanes[0], 200, 200);
|
||||||
|
|
||||||
System.out.println("Test with only width set to 200");
|
System.out.println("Test with only width set to 200");
|
||||||
test(r, editorPane2);
|
test(r, editorPanes[1], 200, 200);
|
||||||
|
|
||||||
System.out.println("Test with none of them set");
|
System.out.println("Test with both of them set");
|
||||||
test(r, editorPane3);
|
test(r, editorPanes[2], 200, 200);
|
||||||
|
|
||||||
System.out.println("Test with both of them set to 200");
|
System.out.println("Test with none of them set to 200");
|
||||||
test(r, editorPane4);
|
test(r, editorPanes[3], 200, 200);
|
||||||
|
|
||||||
|
System.out.println("Test with only width set to 100");
|
||||||
|
test(r, editorPanes[4], 100, 100);
|
||||||
|
|
||||||
|
System.out.println("Test with only height set to 100");
|
||||||
|
test(r, editorPanes[5], 100, 100);
|
||||||
|
|
||||||
|
System.out.println("Test with both width and height set to 100");
|
||||||
|
test(r, editorPanes[6], 100, 100);
|
||||||
|
|
||||||
|
System.out.println("Test with only width set to 50");
|
||||||
|
test(r, editorPanes[7], 50, 50);
|
||||||
|
|
||||||
|
System.out.println("Test with only height set to 50");
|
||||||
|
test(r, editorPanes[8], 50, 50);
|
||||||
|
|
||||||
|
System.out.println("Test with only width set to 300");
|
||||||
|
test(r, editorPanes[9], 300, 300);
|
||||||
|
|
||||||
|
System.out.println("Test with only height set to 300");
|
||||||
|
test(r, editorPanes[10], 300, 300);
|
||||||
|
|
||||||
System.out.println("Test Passed.");
|
System.out.println("Test Passed.");
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @test
|
* @test
|
||||||
* @bug 8189131 8198240 8191844 8189949 8191031 8196141 8204923 8195774
|
* @bug 8189131 8198240 8191844 8189949 8191031 8196141 8204923 8195774 8199779
|
||||||
* @requires java.runtime.name ~= "OpenJDK.*"
|
* @requires java.runtime.name ~= "OpenJDK.*"
|
||||||
* @summary Check root CA entries in cacerts file
|
* @summary Check root CA entries in cacerts file
|
||||||
*/
|
*/
|
||||||
|
@ -42,7 +42,7 @@ public class VerifyCACerts {
|
||||||
+ File.separator + "security" + File.separator + "cacerts";
|
+ File.separator + "security" + File.separator + "cacerts";
|
||||||
|
|
||||||
// The numbers of certs now.
|
// The numbers of certs now.
|
||||||
private static final int COUNT = 83;
|
private static final int COUNT = 90;
|
||||||
|
|
||||||
// map of cert alias to SHA-256 fingerprint
|
// map of cert alias to SHA-256 fingerprint
|
||||||
private static final Map<String, String> FINGERPRINT_MAP
|
private static final Map<String, String> FINGERPRINT_MAP
|
||||||
|
@ -214,6 +214,20 @@ public class VerifyCACerts {
|
||||||
"03:76:AB:1D:54:C5:F9:80:3C:E4:B2:E2:01:A0:EE:7E:EF:7B:57:B6:36:E8:A9:3C:9B:8D:48:60:C9:6F:5F:A7");
|
"03:76:AB:1D:54:C5:F9:80:3C:E4:B2:E2:01:A0:EE:7E:EF:7B:57:B6:36:E8:A9:3C:9B:8D:48:60:C9:6F:5F:A7");
|
||||||
put("affirmtrustpremiumeccca [jdk]",
|
put("affirmtrustpremiumeccca [jdk]",
|
||||||
"BD:71:FD:F6:DA:97:E4:CF:62:D1:64:7A:DD:25:81:B0:7D:79:AD:F8:39:7E:B4:EC:BA:9C:5E:84:88:82:14:23");
|
"BD:71:FD:F6:DA:97:E4:CF:62:D1:64:7A:DD:25:81:B0:7D:79:AD:F8:39:7E:B4:EC:BA:9C:5E:84:88:82:14:23");
|
||||||
|
put("deutschetelekomrootca2 [jdk]",
|
||||||
|
"B6:19:1A:50:D0:C3:97:7F:7D:A9:9B:CD:AA:C8:6A:22:7D:AE:B9:67:9E:C7:0B:A3:B0:C9:D9:22:71:C1:70:D3");
|
||||||
|
put("ttelesecglobalrootclass3ca [jdk]",
|
||||||
|
"FD:73:DA:D3:1C:64:4F:F1:B4:3B:EF:0C:CD:DA:96:71:0B:9C:D9:87:5E:CA:7E:31:70:7A:F3:E9:6D:52:2B:BD");
|
||||||
|
put("ttelesecglobalrootclass2ca [jdk]",
|
||||||
|
"91:E2:F5:78:8D:58:10:EB:A7:BA:58:73:7D:E1:54:8A:8E:CA:CD:01:45:98:BC:0B:14:3E:04:1B:17:05:25:52");
|
||||||
|
put("starfieldservicesrootg2ca [jdk]",
|
||||||
|
"56:8D:69:05:A2:C8:87:08:A4:B3:02:51:90:ED:CF:ED:B1:97:4A:60:6A:13:C6:E5:29:0F:CB:2A:E6:3E:DA:B5");
|
||||||
|
put("globalsignca [jdk]",
|
||||||
|
"EB:D4:10:40:E4:BB:3E:C7:42:C9:E3:81:D3:1E:F2:A4:1A:48:B6:68:5C:96:E7:CE:F3:C1:DF:6C:D4:33:1C:99");
|
||||||
|
put("globalsignr3ca [jdk]",
|
||||||
|
"CB:B5:22:D7:B7:F1:27:AD:6A:01:13:86:5B:DF:1C:D4:10:2E:7D:07:59:AF:63:5A:7C:F4:72:0D:C9:63:C5:3B");
|
||||||
|
put("globalsigneccrootcar5 [jdk]",
|
||||||
|
"17:9F:BC:14:8A:3D:D0:0F:D2:4E:A1:34:58:CC:43:BF:A7:F5:9C:81:82:D7:83:A5:13:F6:EB:EC:10:0C:89:24");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue