--- a/hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/ppc64/PPC64Frame.java Thu Aug 11 12:27:20 2016 -0700
+++ b/hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/ppc64/PPC64Frame.java Thu Aug 11 21:35:09 2016 +0200
@@ -46,7 +46,6 @@
private static final int SENDER_SP_OFFSET = 0;
// Interpreter frames
- private static final int INTERPRETER_FRAME_MIRROR_OFFSET = -3; // for native calls only
private static final int INTERPRETER_FRAME_SENDER_SP_OFFSET = -4;
private static final int INTERPRETER_FRAME_LAST_SP_OFFSET = INTERPRETER_FRAME_SENDER_SP_OFFSET - 1;
private static final int INTERPRETER_FRAME_MDX_OFFSET = INTERPRETER_FRAME_LAST_SP_OFFSET -1;
@@ -55,7 +54,8 @@
private static final int INTERPRETER_FRAME_CACHE_OFFSET =INTERPRETER_FRAME_BCX_OFFSET - 1;
private static final int INTERPRETER_FRAME_MONITORS_OFFSET = INTERPRETER_FRAME_CACHE_OFFSET - 1;
private static final int INTERPRETER_FRAME_LOCALS_OFFSET = INTERPRETER_FRAME_MONITORS_OFFSET - 1;
- private static final int INTERPRETER_FRAME_METHOD_OFFSET = INTERPRETER_FRAME_LOCALS_OFFSET - 1;
+ private static final int INTERPRETER_FRAME_MIRROR_OFFSET = INTERPRETER_FRAME_LOCALS_OFFSET - 1;
+ private static final int INTERPRETER_FRAME_METHOD_OFFSET = INTERPRETER_FRAME_MIRROR_OFFSET - 1;
private static final int INTERPRETER_FRAME_INITIAL_SP_OFFSET = INTERPRETER_FRAME_BCX_OFFSET - 1; // FIXME: probably wrong, but unused anyway
private static final int INTERPRETER_FRAME_MONITOR_BLOCK_TOP_OFFSET = INTERPRETER_FRAME_INITIAL_SP_OFFSET;
private static final int INTERPRETER_FRAME_MONITOR_BLOCK_BOTTOM_OFFSET = INTERPRETER_FRAME_INITIAL_SP_OFFSET;
--- a/hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/sparc/SPARCFrame.java Thu Aug 11 12:27:20 2016 -0700
+++ b/hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/sparc/SPARCFrame.java Thu Aug 11 21:35:09 2016 +0200
@@ -714,11 +714,7 @@
/** 2 words, also used to save float regs across calls to C */
public static final int INTERPRETER_FRAME_D_SCRATCH_FP_OFFSET = -2;
public static final int INTERPRETER_FRAME_L_SCRATCH_FP_OFFSET = -4;
- /** For native calls only */
- public static final int INTERPRETER_FRAME_PADDING_OFFSET = -5;
- /** For native calls only */
- public static final int INTERPRETER_FRAME_MIRROR_OFFSET = -6;
- /** Should be same as above, and should be zero mod 8 */
+ public static final int INTERPRETER_FRAME_MIRROR_OFFSET = -5;
public static final int INTERPRETER_FRAME_VM_LOCALS_FP_OFFSET = -6;
public static final int INTERPRETER_FRAME_VM_LOCAL_WORDS = -INTERPRETER_FRAME_VM_LOCALS_FP_OFFSET;
--- a/hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/x86/X86Frame.java Thu Aug 11 12:27:20 2016 -0700
+++ b/hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/x86/X86Frame.java Thu Aug 11 21:35:09 2016 +0200
@@ -48,10 +48,10 @@
private static final int SENDER_SP_OFFSET = 2;
// Interpreter frames
- private static final int INTERPRETER_FRAME_MIRROR_OFFSET = 2; // for native calls only
private static final int INTERPRETER_FRAME_SENDER_SP_OFFSET = -1;
private static final int INTERPRETER_FRAME_LAST_SP_OFFSET = INTERPRETER_FRAME_SENDER_SP_OFFSET - 1;
private static final int INTERPRETER_FRAME_METHOD_OFFSET = INTERPRETER_FRAME_LAST_SP_OFFSET - 1;
+ private static int INTERPRETER_FRAME_MIRROR_OFFSET;
private static int INTERPRETER_FRAME_MDX_OFFSET; // Non-core builds only
private static int INTERPRETER_FRAME_CACHE_OFFSET;
private static int INTERPRETER_FRAME_LOCALS_OFFSET;
@@ -74,7 +74,8 @@
}
private static synchronized void initialize(TypeDataBase db) {
- INTERPRETER_FRAME_MDX_OFFSET = INTERPRETER_FRAME_METHOD_OFFSET - 1;
+ INTERPRETER_FRAME_MIRROR_OFFSET = INTERPRETER_FRAME_METHOD_OFFSET - 1;
+ INTERPRETER_FRAME_MDX_OFFSET = INTERPRETER_FRAME_MIRROR_OFFSET - 1;
INTERPRETER_FRAME_CACHE_OFFSET = INTERPRETER_FRAME_MDX_OFFSET - 1;
INTERPRETER_FRAME_LOCALS_OFFSET = INTERPRETER_FRAME_CACHE_OFFSET - 1;
INTERPRETER_FRAME_BCX_OFFSET = INTERPRETER_FRAME_LOCALS_OFFSET - 1;
--- a/hotspot/src/share/vm/classfile/classLoaderData.cpp Thu Aug 11 12:27:20 2016 -0700
+++ b/hotspot/src/share/vm/classfile/classLoaderData.cpp Thu Aug 11 21:35:09 2016 +0200
@@ -126,13 +126,17 @@
// ClassLoaderData, no other non-GC thread has knowledge of the anonymous class while
// it is being defined, therefore _keep_alive is not volatile or atomic.
void ClassLoaderData::inc_keep_alive() {
- assert(_keep_alive >= 0, "Invalid keep alive count");
- _keep_alive++;
+ if (is_anonymous()) {
+ assert(_keep_alive >= 0, "Invalid keep alive increment count");
+ _keep_alive++;
+ }
}
void ClassLoaderData::dec_keep_alive() {
- assert(_keep_alive > 0, "Invalid keep alive count");
- _keep_alive--;
+ if (is_anonymous()) {
+ assert(_keep_alive > 0, "Invalid keep alive decrement count");
+ _keep_alive--;
+ }
}
void ClassLoaderData::oops_do(OopClosure* f, KlassClosure* klass_closure, bool must_claim) {
--- a/hotspot/src/share/vm/classfile/classLoaderData.hpp Thu Aug 11 12:27:20 2016 -0700
+++ b/hotspot/src/share/vm/classfile/classLoaderData.hpp Thu Aug 11 21:35:09 2016 +0200
@@ -176,9 +176,9 @@
Mutex* _metaspace_lock; // Locks the metaspace for allocations and setup.
bool _unloading; // true if this class loader goes away
bool _is_anonymous; // if this CLD is for an anonymous class
- int _keep_alive; // if this CLD is kept alive without a keep_alive_object().
- // Currently used solely for anonymous classes.
- // _keep_alive does not need to be volatile or
+ s2 _keep_alive; // if this CLD is kept alive without a keep_alive_object().
+ // Used for anonymous classes and the boot class
+ // loader. _keep_alive does not need to be volatile or
// atomic since there is one unique CLD per anonymous class.
volatile int _claimed; // true if claimed, for example during GC traces.
// To avoid applying oop closure more than once.
@@ -289,6 +289,8 @@
return _unloading;
}
+ // Used to refcount an anonymous class's CLD in order to
+ // indicate their aliveness without a keep_alive_object().
void inc_keep_alive();
void dec_keep_alive();
--- a/hotspot/src/share/vm/logging/logTagSet.hpp Thu Aug 11 12:27:20 2016 -0700
+++ b/hotspot/src/share/vm/logging/logTagSet.hpp Thu Aug 11 21:35:09 2016 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2016 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
--- a/hotspot/src/share/vm/runtime/vmStructs.cpp Thu Aug 11 12:27:20 2016 -0700
+++ b/hotspot/src/share/vm/runtime/vmStructs.cpp Thu Aug 11 21:35:09 2016 +0200
@@ -2643,7 +2643,7 @@
/* DEFAULT_CACHE_LINE_SIZE (globalDefinitions.hpp) */ \
/***************************************************/ \
\
- declare_constant(DEFAULT_CACHE_LINE_SIZE) \
+ declare_preprocessor_constant("DEFAULT_CACHE_LINE_SIZE", DEFAULT_CACHE_LINE_SIZE) \
\
declare_constant(Deoptimization::Unpack_deopt) \
declare_constant(Deoptimization::Unpack_exception) \