added patch532 hotspot-1358661.patch and patch301 bz1204159_java8.patch

This commit is contained in:
Jiri 2016-07-28 12:45:10 +02:00
parent da1227ef56
commit 700dee4637
3 changed files with 188 additions and 1 deletions

136
bz1204159_java8.patch Normal file
View File

@ -0,0 +1,136 @@
diff -r 6e357a1fc157 tapset/hotspot.stp.in
--- tapset/hotspot-1.8.0.stp.in Tue Apr 26 18:36:01 2016 +0100
+++ tapset/hotspot-1.8.0.stp.in Wed Jul 13 14:06:31 2016 -0400
@@ -141,7 +141,8 @@
Triggers at the end of the virtual machine initialization.
Has no arguments.
*/
-probe hotspot.vm_init_end =
+probe hotspot_vm_init_end = hotspot.vm_init_end8 {}
+probe hotspot.vm_init_end8 =
process("@ABS_CLIENT_LIBJVM_SO@").mark("vm__init__end"),
process("@ABS_SERVER_LIBJVM_SO@").mark("vm__init__end")
{
diff -r 6e357a1fc157 tapset/jstack.stp.in
--- tapset/jstack-1.8.0.stp.in Tue Apr 26 18:36:01 2016 +0100
+++ tapset/jstack-1.8.0.stp.in Wed Jul 13 14:06:31 2016 -0400
@@ -45,22 +45,28 @@
semantic error: failed to retrieve location attribute for local
*/
-global CodeCache_heap;
+/* Resolve multiple installed java versions conflict. */
+@define _private %( %( systemtap_v >= "3.0" %? private %) %)
+@define _check_match %(
+ %( systemtap_v >= "3.0" %? if (pp() !~ "@prefix@") next %)
+%)
-global sp_register;
-global fp_register;
-global pc_register;
-global ptr_size;
-global ptr_mask;
+@_private global CodeCache_heap;
-global constantPool_size;
-global HeapBlock_Header_size;
+@_private global sp_register;
+@_private global fp_register;
+@_private global pc_register;
+@_private global ptr_size;
+@_private global ptr_mask;
-global vm_inited;
+@_private global constantPool_size;
+@_private global HeapBlock_Header_size;
+
+@_private global vm_inited;
/* We need to collect some global symbol addresses that cannot be resolved
in a bare function and vm_init_end seems a good place to use. */
-probe hotspot.vm_init_end
+probe hotspot.vm_init_end8
{
/**
* The CodeCache class contains the static CodeHeap _heap that
@@ -116,6 +122,8 @@
function jstack:string()
{
+ @_check_match
+
// java backtraces can be a lot bigger, but we risk going over MAXACTION.
// 32 frames only gives us ~32 actions per frame (with MAXACTION == 1024).
max_depth = 32;
@@ -125,6 +133,8 @@
function jstack_n:string(max_depth:long)
{
+ @_check_match
+
// Whether to log the method signatures.
log_sig = 0;
@@ -139,6 +149,8 @@
function print_jstack()
{
+ @_check_match
+
// java backtraces can be a lot bigger, but we risk going over MAXACTION.
// 32 frames only gives us ~32 actions per frame (with MAXACTION == 1024).
max_depth = 32;
@@ -148,6 +160,8 @@
function print_jstack_n:string(max_depth:long)
{
+ @_check_match
+
// Whether to log the method signatures.
log_sig = 0;
@@ -162,6 +176,8 @@
function jstack_full:string()
{
+ @_check_match
+
// java backtraces can be a lot bigger, but we risk going over MAXACTION.
// 32 frames only gives us ~32 actions per frame (with MAXACTION == 1024).
max_depth = 32;
@@ -171,6 +187,8 @@
function jstack_full_n:string(max_depth:long)
{
+ @_check_match
+
// Whether to log the method signatures.
log_sig = 1;
@@ -185,6 +203,8 @@
function print_jstack_full()
{
+ @_check_match
+
// java backtraces can be a lot bigger, but we risk going over MAXACTION.
// 32 frames only gives us ~32 actions per frame (with MAXACTION == 1024).
max_depth = 32;
@@ -194,6 +214,8 @@
function print_jstack_full_n:string(max_depth:long)
{
+ @_check_match
+
// Whether to log the method signatures.
log_sig = 1;
@@ -209,6 +231,8 @@
function jstack_call:string(max_depth:long, log_sig:long, log_native:long,
print_frames:long)
{
+ @_check_match
+
if (! vm_inited[pid()])
{
frame = "<vm-not-inited>";

43
hotspot-1358661.patch Normal file
View File

@ -0,0 +1,43 @@
--- openjdk/hotspot/src/share/vm/opto/doCall.cpp 2016-07-22 11:32:42.953343258 +0200
+++ openjdk/hotspot/src/share/vm/opto/doCall.cpp 2016-07-22 11:32:39.209369543 +0200
@@ -209,16 +209,22 @@
int morphism = profile.morphism();
if (speculative_receiver_type != NULL) {
- // We have a speculative type, we should be able to resolve
- // the call. We do that before looking at the profiling at
- // this invoke because it may lead to bimorphic inlining which
- // a speculative type should help us avoid.
- receiver_method = callee->resolve_invoke(jvms->method()->holder(),
- speculative_receiver_type);
- if (receiver_method == NULL) {
- speculative_receiver_type = NULL;
+ if (!too_many_traps(caller, bci, Deoptimization::Reason_speculate_class_check)) {
+ // We have a speculative type, we should be able to resolve
+ // the call. We do that before looking at the profiling at
+ // this invoke because it may lead to bimorphic inlining which
+ // a speculative type should help us avoid.
+ receiver_method = callee->resolve_invoke(jvms->method()->holder(),
+ speculative_receiver_type);
+ if (receiver_method == NULL) {
+ speculative_receiver_type = NULL;
+ } else {
+ morphism = 1;
+ }
} else {
- morphism = 1;
+ // speculation failed before. Use profiling at the call
+ // (could allow bimorphic inlining for instance).
+ speculative_receiver_type = NULL;
}
}
if (receiver_method == NULL &&
@@ -255,7 +261,7 @@
Deoptimization::Reason_bimorphic :
(speculative_receiver_type == NULL ? Deoptimization::Reason_class_check : Deoptimization::Reason_speculate_class_check);
if ((morphism == 1 || (morphism == 2 && next_hit_cg != NULL)) &&
- !too_many_traps(jvms->method(), jvms->bci(), reason)
+ !too_many_traps(caller, bci, reason)
) {
// Generate uncommon trap for class check failure path
// in case of monomorphic or bimorphic virtual call site.

View File

@ -785,7 +785,7 @@ Obsoletes: java-1.7.0-openjdk-accessibility%1
Name: java-%{javaver}-%{origin}
Version: %{javaver}.%{updatever}
Release: 1.%{buildver}%{?dist}
Release: 2.%{buildver}%{?dist}
# java-1.5.0-ibm from jpackage.org set Epoch to 1 for unknown reasons,
# and this change was brought into RHEL-4. java-1.5.0-ibm packages
# also included the epoch in their virtual provides. This created a
@ -938,6 +938,7 @@ Patch201: system-libjpeg.patch
# Local fixes
Patch531: hotspot-8157306.changeset
Patch532: hotspot-1358661.patch
# PR1834, RH1022017: Reduce curves reported by SSL to those in NSS
Patch525: pr1834-rh1022017.patch
# Temporary fix for typo in CORBA security patch
@ -945,6 +946,7 @@ Patch529: corba_typo_fix.patch
# Non-OpenJDK fixes
Patch300: jstack-pr1845.patch
Patch301: bz1204159_java8.patch
BuildRequires: autoconf
BuildRequires: automake
@ -1280,11 +1282,13 @@ sh %{SOURCE12}
%ifarch %{aarch64}
%patch531
%endif
%patch532
# Extract systemtap tapsets
%if %{with_systemtap}
tar xzf %{SOURCE8}
%patch300
%patch301
%if %{include_debug_build}
cp -r tapset tapset%{debug_suffix}
%endif
@ -1868,6 +1872,10 @@ require "copy_jdk_configs.lua"
%endif
%changelog
* Mon Jul 25 2016 jvanek <jvanek@redhat.com> - 1:1.8.0.101-2.b14
- added patch532 hotspot-1358661.patch - to fix performance of bimorphic inlining may be bypassed by type speculation
- added patch301 bz1204159_java8.patch - to fix systemtap on multiple jdks
* Mon Jul 25 2016 jvanek <jvanek@redhat.com> - 1:1.8.0.101-1.b14
- updated to aarch64-jdk8u101-b14 (from aarch64-port/jdk8u)
- updated to aarch64-shenandoah-jdk8u101-b14-shenandoah-merge-2016-07-25 (from aarch64-port/jdk8u-shenandoah) of hotspot