Merge
This commit is contained in:
commit
10259cf594
@ -513,6 +513,8 @@ ARFLAGS:=@ARFLAGS@
|
||||
NM:=@NM@
|
||||
GNM:=@GNM@
|
||||
STRIP:=@STRIP@
|
||||
OBJDUMP:=@OBJDUMP@
|
||||
CXXFILT:=@CXXFILT@
|
||||
|
||||
LIPO:=@LIPO@
|
||||
INSTALL_NAME_TOOL:=@INSTALL_NAME_TOOL@
|
||||
|
@ -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.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@ -726,6 +726,14 @@ AC_DEFUN_ONCE([TOOLCHAIN_DETECT_TOOLCHAIN_EXTRA],
|
||||
# bails if argument is missing.
|
||||
BASIC_FIXUP_EXECUTABLE(OBJDUMP)
|
||||
fi
|
||||
|
||||
case $TOOLCHAIN_TYPE in
|
||||
gcc|clang|solstudio)
|
||||
BASIC_CHECK_TOOLS(CXXFILT, [c++filt])
|
||||
BASIC_CHECK_NONEMPTY(CXXFILT)
|
||||
BASIC_FIXUP_EXECUTABLE(CXXFILT)
|
||||
;;
|
||||
esac
|
||||
])
|
||||
|
||||
# Setup the build tools (i.e, the compiler and linker used to build programs
|
||||
|
@ -765,7 +765,7 @@ var getJibProfilesProfiles = function (input, common, data) {
|
||||
var getJibProfilesDependencies = function (input, common) {
|
||||
|
||||
var devkit_platform_revisions = {
|
||||
linux_x64: "gcc4.9.2-OEL6.4+1.2",
|
||||
linux_x64: "gcc4.9.2-OEL6.4+1.3",
|
||||
macosx_x64: "Xcode6.3-MacOSX10.9+1.0",
|
||||
solaris_x64: "SS12u4-Solaris11u1+1.0",
|
||||
solaris_sparcv9: "SS12u4-Solaris11u1+1.1",
|
||||
|
@ -562,8 +562,8 @@ ifeq ($(TARGET), $(HOST))
|
||||
ln -s $(TARGET)-$* $@
|
||||
|
||||
missing-links := $(addprefix $(PREFIX)/bin/, \
|
||||
addr2line ar as c++ c++filt elfedit g++ gcc gprof ld nm objcopy ranlib readelf \
|
||||
size strings strip ld.bfd ld.gold dtrace)
|
||||
addr2line ar as c++ c++filt dwp elfedit g++ gcc gcc-$(GCC_VER) gprof ld ld.bfd \
|
||||
ld.gold nm objcopy objdump ranlib readelf size strings strip)
|
||||
endif
|
||||
|
||||
##########################################################################################
|
||||
|
@ -270,3 +270,62 @@ endif
|
||||
include lib/JvmMapfile.gmk
|
||||
|
||||
TARGETS += $(BUILD_LIBJVM)
|
||||
|
||||
################################################################################
|
||||
# Hotspot disallows the use of global operators 'new' and 'delete'. This build
|
||||
# time check helps enforce this requirement. If you trigger this check and the
|
||||
# reference is not obvious from the source, GNU objdump can be used to help find
|
||||
# the reference if compiled with GCC:
|
||||
#
|
||||
# objdump -lrdSC <path/to/file.o>
|
||||
#
|
||||
# -C demangle
|
||||
# -d disassemble
|
||||
# -r print relocation entries, interspersed with the disassembly
|
||||
# -S print source code, intermixed with disassembly
|
||||
# -l include filenames and line numbers
|
||||
#
|
||||
# Search the output for the operator(s) of interest, to see where they are
|
||||
# referenced.
|
||||
|
||||
ifneq ($(filter $(TOOLCHAIN_TYPE), gcc clang solstudio), )
|
||||
|
||||
DEMANGLED_REGEXP := [^:]operator (new|delete)
|
||||
|
||||
# Running c++filt to find offending symbols in all files is too expensive,
|
||||
# especially on Solaris, so use mangled names when looking for symbols.
|
||||
# Save the demangling for when something is actually found.
|
||||
ifeq ($(TOOLCHAIN_TYPE), solstudio)
|
||||
MANGLED_SYMS := \
|
||||
__1c2n6FL_pv_ \
|
||||
__1c2N6FL_pv_ \
|
||||
__1c2k6Fpv_v_ \
|
||||
__1c2K6Fpv_v_ \
|
||||
#
|
||||
UNDEF_PATTERN := UNDEF
|
||||
else
|
||||
MANGLED_SYMS := \
|
||||
_ZdaPv \
|
||||
_ZdlPv \
|
||||
_Znam \
|
||||
_Znwm \
|
||||
#
|
||||
UNDEF_PATTERN := ' U '
|
||||
endif
|
||||
|
||||
define SetupOperatorNewDeleteCheck
|
||||
$1.op_check: $1
|
||||
if [ -n "`$(NM) $$< | $(GREP) $(addprefix -e , $(MANGLED_SYMS)) \
|
||||
| $(GREP) $(UNDEF_PATTERN)`" ]; then \
|
||||
$(ECHO) "$$<: Error: Use of global operators new and delete is not allowed in Hotspot:"; \
|
||||
$(NM) $$< | $(CXXFILT) | $(EGREP) '$(DEMANGLED_REGEXP)' | $(GREP) $(UNDEF_PATTERN); \
|
||||
$(ECHO) "See: $(TOPDIR)/make/hotspot/lib/CompileJvm.gmk"; \
|
||||
exit 1; \
|
||||
fi
|
||||
$(TOUCH) $$@
|
||||
|
||||
TARGETS += $1.op_check
|
||||
endef
|
||||
|
||||
$(foreach o, $(BUILD_LIBJVM_ALL_OBJS), $(eval $(call SetupOperatorNewDeleteCheck,$o)))
|
||||
endif
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, 2015, Red Hat Inc. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
@ -37,7 +37,7 @@
|
||||
// secondary complication -- not all code employing C call convention
|
||||
// executes as x86 code though -- we generate some of it
|
||||
|
||||
class Argument VALUE_OBJ_CLASS_SPEC {
|
||||
class Argument {
|
||||
public:
|
||||
enum {
|
||||
n_int_register_parameters_c = 8, // r0, r1, ... r7 (c_rarg0, c_rarg1, ...)
|
||||
@ -338,7 +338,7 @@ static inline unsigned long uabs(long n) { return uabs((unsigned long)n); }
|
||||
static inline unsigned long uabs(int n) { return uabs((unsigned int)n); }
|
||||
|
||||
// Addressing modes
|
||||
class Address VALUE_OBJ_CLASS_SPEC {
|
||||
class Address {
|
||||
public:
|
||||
|
||||
enum mode { no_mode, base_plus_offset, pre, post, pcrel,
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, Red Hat Inc. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
@ -27,7 +27,7 @@
|
||||
#include "interpreter/interpreter.hpp"
|
||||
#include "interpreter/interpreterRuntime.hpp"
|
||||
#include "memory/allocation.inline.hpp"
|
||||
#include "memory/universe.inline.hpp"
|
||||
#include "memory/universe.hpp"
|
||||
#include "oops/method.hpp"
|
||||
#include "oops/oop.inline.hpp"
|
||||
#include "runtime/handles.inline.hpp"
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, Red Hat Inc. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
@ -49,7 +49,7 @@
|
||||
// The base class for different kinds of native instruction abstractions.
|
||||
// Provides the primitive operations to manipulate code relative to this.
|
||||
|
||||
class NativeInstruction VALUE_OBJ_CLASS_SPEC {
|
||||
class NativeInstruction {
|
||||
friend class Relocation;
|
||||
friend bool is_NativeCallTrampolineStub_at(address);
|
||||
public:
|
||||
|
@ -29,7 +29,7 @@
|
||||
#include "interpreter/interpreterRuntime.hpp"
|
||||
#include "interpreter/interp_masm.hpp"
|
||||
#include "interpreter/templateTable.hpp"
|
||||
#include "memory/universe.inline.hpp"
|
||||
#include "memory/universe.hpp"
|
||||
#include "oops/methodData.hpp"
|
||||
#include "oops/method.hpp"
|
||||
#include "oops/objArrayKlass.hpp"
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2008, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -76,7 +76,7 @@ enum AsmOffsetOp {
|
||||
|
||||
|
||||
// ARM Addressing Modes 2 and 3 - Load and store
|
||||
class Address VALUE_OBJ_CLASS_SPEC {
|
||||
class Address {
|
||||
private:
|
||||
Register _base;
|
||||
Register _index;
|
||||
@ -334,7 +334,7 @@ class Address VALUE_OBJ_CLASS_SPEC {
|
||||
};
|
||||
|
||||
#ifdef COMPILER2
|
||||
class VFP VALUE_OBJ_CLASS_SPEC {
|
||||
class VFP {
|
||||
// Helper classes to detect whether a floating point constant can be
|
||||
// encoded in a fconstd or fconsts instruction
|
||||
// The conversion from the imm8, 8 bit constant, to the floating
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2008, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -26,7 +26,7 @@
|
||||
#define CPU_ARM_VM_ASSEMBLER_ARM_32_HPP
|
||||
|
||||
// ARM Addressing Mode 1 - Data processing operands
|
||||
class AsmOperand VALUE_OBJ_CLASS_SPEC {
|
||||
class AsmOperand {
|
||||
private:
|
||||
int _encoding;
|
||||
|
||||
@ -99,7 +99,7 @@ class AsmOperand VALUE_OBJ_CLASS_SPEC {
|
||||
|
||||
|
||||
// ARM Addressing Mode 4 - Load and store multiple
|
||||
class RegisterSet VALUE_OBJ_CLASS_SPEC {
|
||||
class RegisterSet {
|
||||
private:
|
||||
int _encoding;
|
||||
|
||||
@ -155,7 +155,7 @@ class RegisterSet VALUE_OBJ_CLASS_SPEC {
|
||||
#endif
|
||||
|
||||
// ARM Addressing Mode 5 - Load and store multiple VFP registers
|
||||
class FloatRegisterSet VALUE_OBJ_CLASS_SPEC {
|
||||
class FloatRegisterSet {
|
||||
private:
|
||||
int _encoding;
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2008, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -53,7 +53,7 @@ enum AsmPrefetchOp {
|
||||
};
|
||||
|
||||
// Shifted register operand for data processing instructions.
|
||||
class AsmOperand VALUE_OBJ_CLASS_SPEC {
|
||||
class AsmOperand {
|
||||
private:
|
||||
Register _reg;
|
||||
AsmShift _shift;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2008, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -26,7 +26,7 @@
|
||||
#include "interpreter/interpreter.hpp"
|
||||
#include "interpreter/interpreterRuntime.hpp"
|
||||
#include "memory/allocation.inline.hpp"
|
||||
#include "memory/universe.inline.hpp"
|
||||
#include "memory/universe.hpp"
|
||||
#include "oops/method.hpp"
|
||||
#include "oops/oop.inline.hpp"
|
||||
#include "runtime/handles.inline.hpp"
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2008, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -32,7 +32,7 @@ class BiasedLockingCounters;
|
||||
|
||||
// Introduced AddressLiteral and its subclasses to ease portability from
|
||||
// x86 and avoid relocation issues
|
||||
class AddressLiteral VALUE_OBJ_CLASS_SPEC {
|
||||
class AddressLiteral {
|
||||
RelocationHolder _rspec;
|
||||
// Typically we use AddressLiterals we want to use their rval
|
||||
// However in some situations we want the lval (effect address) of the item.
|
||||
@ -1394,7 +1394,7 @@ public:
|
||||
// The purpose of this class is to build several code fragments of the same size
|
||||
// in order to allow fast table branch.
|
||||
|
||||
class FixedSizeCodeBlock VALUE_OBJ_CLASS_SPEC {
|
||||
class FixedSizeCodeBlock {
|
||||
public:
|
||||
FixedSizeCodeBlock(MacroAssembler* masm, int size_in_instrs, bool enabled);
|
||||
~FixedSizeCodeBlock();
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2008, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -47,7 +47,7 @@
|
||||
// back-end extensions or the actual instructions size.
|
||||
class NativeInstruction;
|
||||
|
||||
class RawNativeInstruction VALUE_OBJ_CLASS_SPEC {
|
||||
class RawNativeInstruction {
|
||||
public:
|
||||
|
||||
enum ARM_specific {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2008, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -45,7 +45,7 @@
|
||||
// back-end extensions or the actual instructions size.
|
||||
class NativeInstruction;
|
||||
|
||||
class RawNativeInstruction VALUE_OBJ_CLASS_SPEC {
|
||||
class RawNativeInstruction {
|
||||
public:
|
||||
|
||||
enum ARM_specific {
|
||||
|
@ -28,7 +28,7 @@
|
||||
#include "interpreter/interpreter.hpp"
|
||||
#include "interpreter/interpreterRuntime.hpp"
|
||||
#include "interpreter/templateTable.hpp"
|
||||
#include "memory/universe.inline.hpp"
|
||||
#include "memory/universe.hpp"
|
||||
#include "oops/cpCache.hpp"
|
||||
#include "oops/methodData.hpp"
|
||||
#include "oops/objArrayKlass.hpp"
|
||||
|
@ -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.
|
||||
* Copyright (c) 2012, 2017 SAP SE. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
@ -31,7 +31,7 @@
|
||||
// Address is an abstraction used to represent a memory location
|
||||
// as used in assembler instructions.
|
||||
// PPC instructions grok either baseReg + indexReg or baseReg + disp.
|
||||
class Address VALUE_OBJ_CLASS_SPEC {
|
||||
class Address {
|
||||
private:
|
||||
Register _base; // Base register.
|
||||
Register _index; // Index register.
|
||||
@ -64,7 +64,7 @@ class Address VALUE_OBJ_CLASS_SPEC {
|
||||
bool is_const() const { return _base == noreg && _index == noreg; }
|
||||
};
|
||||
|
||||
class AddressLiteral VALUE_OBJ_CLASS_SPEC {
|
||||
class AddressLiteral {
|
||||
private:
|
||||
address _address;
|
||||
RelocationHolder _rspec;
|
||||
@ -117,7 +117,7 @@ class AddressLiteral VALUE_OBJ_CLASS_SPEC {
|
||||
// with the PPC Application Binary Interface, or ABI. This is
|
||||
// often referred to as the native or C calling convention.
|
||||
|
||||
class Argument VALUE_OBJ_CLASS_SPEC {
|
||||
class Argument {
|
||||
private:
|
||||
int _number; // The number of the argument.
|
||||
public:
|
||||
@ -153,7 +153,7 @@ class Argument VALUE_OBJ_CLASS_SPEC {
|
||||
|
||||
#if !defined(ABI_ELFv2)
|
||||
// A ppc64 function descriptor.
|
||||
struct FunctionDescriptor VALUE_OBJ_CLASS_SPEC {
|
||||
struct FunctionDescriptor {
|
||||
private:
|
||||
address _entry;
|
||||
address _toc;
|
||||
|
@ -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.
|
||||
* Copyright (c) 2012, 2013 SAP SE. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
@ -28,7 +28,7 @@
|
||||
#include "interpreter/interpreter.hpp"
|
||||
#include "interpreter/interpreterRuntime.hpp"
|
||||
#include "memory/allocation.inline.hpp"
|
||||
#include "memory/universe.inline.hpp"
|
||||
#include "memory/universe.hpp"
|
||||
#include "oops/method.hpp"
|
||||
#include "oops/oop.inline.hpp"
|
||||
#include "runtime/handles.inline.hpp"
|
||||
|
@ -45,7 +45,7 @@
|
||||
|
||||
// The base class for different kinds of native instruction abstractions.
|
||||
// It provides the primitive operations to manipulate code relative to this.
|
||||
class NativeInstruction VALUE_OBJ_CLASS_SPEC {
|
||||
class NativeInstruction {
|
||||
friend class Relocation;
|
||||
|
||||
public:
|
||||
|
@ -30,7 +30,7 @@
|
||||
#include "interpreter/interp_masm.hpp"
|
||||
#include "interpreter/templateInterpreter.hpp"
|
||||
#include "interpreter/templateTable.hpp"
|
||||
#include "memory/universe.inline.hpp"
|
||||
#include "memory/universe.hpp"
|
||||
#include "oops/objArrayKlass.hpp"
|
||||
#include "oops/oop.inline.hpp"
|
||||
#include "prims/methodHandles.hpp"
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2016, 2017 SAP SE. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
@ -31,7 +31,7 @@
|
||||
// Immediate is an abstraction to represent the various immediate
|
||||
// operands which exist on z/Architecture. Neither this class nor
|
||||
// instances hereof have an own state. It consists of methods only.
|
||||
class Immediate VALUE_OBJ_CLASS_SPEC {
|
||||
class Immediate {
|
||||
|
||||
public:
|
||||
static bool is_simm(int64_t x, unsigned int nbits) {
|
||||
@ -82,7 +82,7 @@ class Immediate VALUE_OBJ_CLASS_SPEC {
|
||||
// displacements which exist with addresses on z/ArchiTecture.
|
||||
// Neither this class nor instances hereof have an own state. It
|
||||
// consists of methods only.
|
||||
class Displacement VALUE_OBJ_CLASS_SPEC {
|
||||
class Displacement {
|
||||
|
||||
public: // These tests are used outside the (Macro)Assembler world, e.g. in ad-file.
|
||||
|
||||
@ -101,7 +101,7 @@ class Displacement VALUE_OBJ_CLASS_SPEC {
|
||||
// form they are used on z/Architecture for instructions which access
|
||||
// their operand with pc-relative addresses. Neither this class nor
|
||||
// instances hereof have an own state. It consists of methods only.
|
||||
class RelAddr VALUE_OBJ_CLASS_SPEC {
|
||||
class RelAddr {
|
||||
|
||||
private: // No public use at all. Solely for (Macro)Assembler.
|
||||
|
||||
@ -177,7 +177,7 @@ class RelAddr VALUE_OBJ_CLASS_SPEC {
|
||||
//
|
||||
// Note: A register location is represented via a Register, not
|
||||
// via an address for efficiency & simplicity reasons.
|
||||
class Address VALUE_OBJ_CLASS_SPEC {
|
||||
class Address {
|
||||
private:
|
||||
Register _base; // Base register.
|
||||
Register _index; // Index register
|
||||
@ -275,7 +275,7 @@ class Address VALUE_OBJ_CLASS_SPEC {
|
||||
friend class Assembler;
|
||||
};
|
||||
|
||||
class AddressLiteral VALUE_OBJ_CLASS_SPEC {
|
||||
class AddressLiteral {
|
||||
private:
|
||||
address _address;
|
||||
RelocationHolder _rspec;
|
||||
@ -398,7 +398,7 @@ class ExternalAddress: public AddressLiteral {
|
||||
// memory or in a register, in a manner consistent with the
|
||||
// z/Architecture Application Binary Interface, or ABI. This is often
|
||||
// referred to as the native or C calling convention.
|
||||
class Argument VALUE_OBJ_CLASS_SPEC {
|
||||
class Argument {
|
||||
private:
|
||||
int _number;
|
||||
bool _is_in;
|
||||
|
@ -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.
|
||||
* Copyright (c) 2016 SAP SE. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
@ -28,7 +28,7 @@
|
||||
#include "interpreter/interpreter.hpp"
|
||||
#include "interpreter/interpreterRuntime.hpp"
|
||||
#include "memory/allocation.inline.hpp"
|
||||
#include "memory/universe.inline.hpp"
|
||||
#include "memory/universe.hpp"
|
||||
#include "oops/oop.inline.hpp"
|
||||
#include "runtime/handles.inline.hpp"
|
||||
#include "runtime/icache.hpp"
|
||||
|
@ -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.
|
||||
* Copyright (c) 2016 SAP SE. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
@ -72,7 +72,7 @@ NativeInstruction* nativeInstruction_at(address address);
|
||||
// N a t i v e I n s t r u c t i o n
|
||||
//-------------------------------------
|
||||
|
||||
class NativeInstruction VALUE_OBJ_CLASS_SPEC {
|
||||
class NativeInstruction {
|
||||
friend class Relocation;
|
||||
|
||||
public:
|
||||
|
@ -29,7 +29,7 @@
|
||||
#include "interpreter/interpreterRuntime.hpp"
|
||||
#include "interpreter/interp_masm.hpp"
|
||||
#include "interpreter/templateTable.hpp"
|
||||
#include "memory/universe.inline.hpp"
|
||||
#include "memory/universe.hpp"
|
||||
#include "oops/objArrayKlass.hpp"
|
||||
#include "oops/oop.inline.hpp"
|
||||
#include "prims/methodHandles.hpp"
|
||||
|
@ -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.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -27,7 +27,7 @@
|
||||
#include "interpreter/interpreter.hpp"
|
||||
#include "interpreter/interpreterRuntime.hpp"
|
||||
#include "memory/allocation.inline.hpp"
|
||||
#include "memory/universe.inline.hpp"
|
||||
#include "memory/universe.hpp"
|
||||
#include "oops/method.hpp"
|
||||
#include "oops/oop.inline.hpp"
|
||||
#include "runtime/handles.inline.hpp"
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -239,7 +239,7 @@ REGISTER_DECLARATION(Register, Oissuing_pc , O1); // where the exception is comi
|
||||
// Note: A register location is represented via a Register, not
|
||||
// via an address for efficiency & simplicity reasons.
|
||||
|
||||
class Address VALUE_OBJ_CLASS_SPEC {
|
||||
class Address {
|
||||
private:
|
||||
Register _base; // Base register.
|
||||
RegisterOrConstant _index_or_disp; // Index register or constant displacement.
|
||||
@ -320,7 +320,7 @@ class Address VALUE_OBJ_CLASS_SPEC {
|
||||
};
|
||||
|
||||
|
||||
class AddressLiteral VALUE_OBJ_CLASS_SPEC {
|
||||
class AddressLiteral {
|
||||
private:
|
||||
address _address;
|
||||
RelocationHolder _rspec;
|
||||
@ -452,7 +452,7 @@ inline Address RegisterImpl::address_in_saved_window() const {
|
||||
// with the SPARC Application Binary Interface, or ABI. This is
|
||||
// often referred to as the native or C calling convention.
|
||||
|
||||
class Argument VALUE_OBJ_CLASS_SPEC {
|
||||
class Argument {
|
||||
private:
|
||||
int _number;
|
||||
bool _is_in;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -42,7 +42,7 @@
|
||||
// - - NativeIllegalInstruction
|
||||
// The base class for different kinds of native instruction abstractions.
|
||||
// Provides the primitive operations to manipulate code relative to this.
|
||||
class NativeInstruction VALUE_OBJ_CLASS_SPEC {
|
||||
class NativeInstruction {
|
||||
friend class Relocation;
|
||||
|
||||
public:
|
||||
|
@ -27,7 +27,7 @@
|
||||
#include "interpreter/interpreterRuntime.hpp"
|
||||
#include "interpreter/interp_masm.hpp"
|
||||
#include "interpreter/templateTable.hpp"
|
||||
#include "memory/universe.inline.hpp"
|
||||
#include "memory/universe.hpp"
|
||||
#include "oops/methodData.hpp"
|
||||
#include "oops/objArrayKlass.hpp"
|
||||
#include "oops/oop.inline.hpp"
|
||||
|
@ -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.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -33,7 +33,7 @@ class BiasedLockingCounters;
|
||||
// Contains all the definitions needed for x86 assembly code generation.
|
||||
|
||||
// Calling convention
|
||||
class Argument VALUE_OBJ_CLASS_SPEC {
|
||||
class Argument {
|
||||
public:
|
||||
enum {
|
||||
#ifdef _LP64
|
||||
@ -155,7 +155,7 @@ REGISTER_DECLARATION(Register, rbp_mh_SP_save, noreg);
|
||||
|
||||
class ArrayAddress;
|
||||
|
||||
class Address VALUE_OBJ_CLASS_SPEC {
|
||||
class Address {
|
||||
public:
|
||||
enum ScaleFactor {
|
||||
no_scale = -1,
|
||||
@ -333,7 +333,7 @@ class Address VALUE_OBJ_CLASS_SPEC {
|
||||
// on the instruction and the platform. As small step on the way to merging i486/amd64
|
||||
// directories.
|
||||
//
|
||||
class AddressLiteral VALUE_OBJ_CLASS_SPEC {
|
||||
class AddressLiteral {
|
||||
friend class ArrayAddress;
|
||||
RelocationHolder _rspec;
|
||||
// Typically we use AddressLiterals we want to use their rval
|
||||
@ -423,7 +423,7 @@ class InternalAddress: public AddressLiteral {
|
||||
// address amd64 can't. We create a class that expresses the concept but does extra
|
||||
// magic on amd64 to get the final result
|
||||
|
||||
class ArrayAddress VALUE_OBJ_CLASS_SPEC {
|
||||
class ArrayAddress {
|
||||
private:
|
||||
|
||||
AddressLiteral _base;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2010, 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.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -30,7 +30,7 @@
|
||||
|
||||
class Compilation;
|
||||
|
||||
class FpuStackSim VALUE_OBJ_CLASS_SPEC {
|
||||
class FpuStackSim {
|
||||
private:
|
||||
Compilation* _compilation;
|
||||
int _stack_size;
|
||||
|
@ -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.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -122,7 +122,7 @@ inline bool LinearScanWalker::pd_init_regs_for_alloc(Interval* cur) {
|
||||
}
|
||||
|
||||
|
||||
class FpuStackAllocator VALUE_OBJ_CLASS_SPEC {
|
||||
class FpuStackAllocator {
|
||||
private:
|
||||
Compilation* _compilation;
|
||||
LinearScan* _allocator;
|
||||
|
@ -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.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -26,7 +26,7 @@
|
||||
#include "interpreter/interpreter.hpp"
|
||||
#include "interpreter/interpreterRuntime.hpp"
|
||||
#include "memory/allocation.inline.hpp"
|
||||
#include "memory/universe.inline.hpp"
|
||||
#include "memory/universe.hpp"
|
||||
#include "oops/method.hpp"
|
||||
#include "oops/oop.inline.hpp"
|
||||
#include "runtime/handles.inline.hpp"
|
||||
|
@ -26,7 +26,7 @@
|
||||
#include "interpreter/interpreter.hpp"
|
||||
#include "interpreter/interpreterRuntime.hpp"
|
||||
#include "memory/allocation.inline.hpp"
|
||||
#include "memory/universe.inline.hpp"
|
||||
#include "memory/universe.hpp"
|
||||
#include "oops/method.hpp"
|
||||
#include "oops/oop.inline.hpp"
|
||||
#include "runtime/handles.inline.hpp"
|
||||
|
@ -50,7 +50,7 @@
|
||||
// The base class for different kinds of native instruction abstractions.
|
||||
// Provides the primitive operations to manipulate code relative to this.
|
||||
|
||||
class NativeInstruction VALUE_OBJ_CLASS_SPEC {
|
||||
class NativeInstruction {
|
||||
friend class Relocation;
|
||||
|
||||
public:
|
||||
|
@ -678,6 +678,7 @@ class StubGenerator: public StubCodeGenerator {
|
||||
assert_different_registers(start, count);
|
||||
BarrierSet* bs = Universe::heap()->barrier_set();
|
||||
switch (bs->kind()) {
|
||||
#if INCLUDE_ALL_GCS
|
||||
case BarrierSet::G1BarrierSet:
|
||||
// With G1, don't generate the call if we statically know that the target in uninitialized
|
||||
if (!uninitialized_target) {
|
||||
@ -727,6 +728,7 @@ class StubGenerator: public StubCodeGenerator {
|
||||
BarrierSet* bs = Universe::heap()->barrier_set();
|
||||
assert_different_registers(start, count);
|
||||
switch (bs->kind()) {
|
||||
#if INCLUDE_ALL_GCS
|
||||
case BarrierSet::G1BarrierSet:
|
||||
{
|
||||
__ pusha(); // push registers
|
||||
|
@ -28,7 +28,7 @@
|
||||
#include "interpreter/interpreterRuntime.hpp"
|
||||
#include "interpreter/interp_masm.hpp"
|
||||
#include "interpreter/templateTable.hpp"
|
||||
#include "memory/universe.inline.hpp"
|
||||
#include "memory/universe.hpp"
|
||||
#include "oops/methodData.hpp"
|
||||
#include "oops/objArrayKlass.hpp"
|
||||
#include "oops/oop.inline.hpp"
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright 2007, 2008, 2010 Red Hat, Inc.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
@ -27,7 +27,7 @@
|
||||
#include "interpreter/interpreter.hpp"
|
||||
#include "interpreter/interpreterRuntime.hpp"
|
||||
#include "memory/allocation.inline.hpp"
|
||||
#include "memory/universe.inline.hpp"
|
||||
#include "memory/universe.hpp"
|
||||
#include "oops/method.hpp"
|
||||
#include "oops/oop.inline.hpp"
|
||||
#include "runtime/handles.inline.hpp"
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright 2007 Red Hat, Inc.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
@ -46,7 +46,7 @@
|
||||
// The base class for different kinds of native instruction abstractions.
|
||||
// Provides the primitive operations to manipulate code relative to this.
|
||||
|
||||
class NativeInstruction VALUE_OBJ_CLASS_SPEC {
|
||||
class NativeInstruction {
|
||||
public:
|
||||
bool is_jump() {
|
||||
ShouldNotCallThis();
|
||||
|
@ -3053,12 +3053,10 @@ bool os::pd_uncommit_memory(char* addr, size_t size) {
|
||||
return res != (uintptr_t) MAP_FAILED;
|
||||
}
|
||||
|
||||
// If there is no page mapped/committed, top (bottom + size) is returned
|
||||
static address get_stack_mapped_bottom(address bottom,
|
||||
size_t size,
|
||||
bool committed_only /* must have backing pages */) {
|
||||
// address used to test if the page is mapped/committed
|
||||
address test_addr = bottom + size;
|
||||
static address get_stack_commited_bottom(address bottom, size_t size) {
|
||||
address nbot = bottom;
|
||||
address ntop = bottom + size;
|
||||
|
||||
size_t page_sz = os::vm_page_size();
|
||||
unsigned pages = size / page_sz;
|
||||
|
||||
@ -3070,40 +3068,39 @@ static address get_stack_mapped_bottom(address bottom,
|
||||
|
||||
while (imin < imax) {
|
||||
imid = (imax + imin) / 2;
|
||||
test_addr = bottom + (imid * page_sz);
|
||||
nbot = ntop - (imid * page_sz);
|
||||
|
||||
// Use a trick with mincore to check whether the page is mapped or not.
|
||||
// mincore sets vec to 1 if page resides in memory and to 0 if page
|
||||
// is swapped output but if page we are asking for is unmapped
|
||||
// it returns -1,ENOMEM
|
||||
mincore_return_value = mincore(test_addr, page_sz, vec);
|
||||
mincore_return_value = mincore(nbot, page_sz, vec);
|
||||
|
||||
if (mincore_return_value == -1 || (committed_only && (vec[0] & 0x01) == 0)) {
|
||||
// Page is not mapped/committed go up
|
||||
// to find first mapped/committed page
|
||||
if ((mincore_return_value == -1 && errno != EAGAIN)
|
||||
|| (committed_only && (vec[0] & 0x01) == 0)) {
|
||||
assert(mincore_return_value != -1 || errno == ENOMEM, "Unexpected mincore errno");
|
||||
|
||||
imin = imid + 1;
|
||||
if (mincore_return_value == -1) {
|
||||
// Page is not mapped go up
|
||||
// to find first mapped page
|
||||
if (errno != EAGAIN) {
|
||||
assert(errno == ENOMEM, "Unexpected mincore errno");
|
||||
imax = imid;
|
||||
}
|
||||
} else {
|
||||
// mapped/committed, go down
|
||||
imax= imid;
|
||||
// Page is mapped go down
|
||||
// to find first not mapped page
|
||||
imin = imid + 1;
|
||||
}
|
||||
}
|
||||
|
||||
// Adjust stack bottom one page up if last checked page is not mapped/committed
|
||||
if (mincore_return_value == -1 || (committed_only && (vec[0] & 0x01) == 0)) {
|
||||
assert(mincore_return_value != -1 || (errno != EAGAIN && errno != ENOMEM),
|
||||
"Should not get to here");
|
||||
nbot = nbot + page_sz;
|
||||
|
||||
test_addr = test_addr + page_sz;
|
||||
// Adjust stack bottom one page up if last checked page is not mapped
|
||||
if (mincore_return_value == -1) {
|
||||
nbot = nbot + page_sz;
|
||||
}
|
||||
|
||||
return test_addr;
|
||||
return nbot;
|
||||
}
|
||||
|
||||
|
||||
// Linux uses a growable mapping for the stack, and if the mapping for
|
||||
// the stack guard pages is not removed when we detach a thread the
|
||||
// stack cannot grow beyond the pages where the stack guard was
|
||||
@ -3140,9 +3137,9 @@ bool os::pd_create_stack_guard_pages(char* addr, size_t size) {
|
||||
|
||||
if (mincore((address)stack_extent, os::vm_page_size(), vec) == -1) {
|
||||
// Fallback to slow path on all errors, including EAGAIN
|
||||
stack_extent = (uintptr_t) get_stack_mapped_bottom(os::Linux::initial_thread_stack_bottom(),
|
||||
(size_t)addr - stack_extent,
|
||||
false /* committed_only */);
|
||||
stack_extent = (uintptr_t) get_stack_commited_bottom(
|
||||
os::Linux::initial_thread_stack_bottom(),
|
||||
(size_t)addr - stack_extent);
|
||||
}
|
||||
|
||||
if (stack_extent < (uintptr_t)addr) {
|
||||
@ -3169,11 +3166,6 @@ bool os::remove_stack_guard_pages(char* addr, size_t size) {
|
||||
return os::uncommit_memory(addr, size);
|
||||
}
|
||||
|
||||
size_t os::committed_stack_size(address bottom, size_t size) {
|
||||
address bot = get_stack_mapped_bottom(bottom, size, true /* committed_only */);
|
||||
return size_t(bottom + size - bot);
|
||||
}
|
||||
|
||||
// If 'fixed' is true, anon_mmap() will attempt to reserve anonymous memory
|
||||
// at 'requested_addr'. If there are existing memory mappings at the same
|
||||
// location, however, they will be overwritten. If 'fixed' is false,
|
||||
|
@ -23,10 +23,12 @@
|
||||
*/
|
||||
|
||||
#include "jvm.h"
|
||||
#include "memory/allocation.inline.hpp"
|
||||
#include "utilities/globalDefinitions.hpp"
|
||||
#include "runtime/frame.inline.hpp"
|
||||
#include "runtime/interfaceSupport.hpp"
|
||||
#include "runtime/os.hpp"
|
||||
#include "services/memTracker.hpp"
|
||||
#include "utilities/align.hpp"
|
||||
#include "utilities/macros.hpp"
|
||||
#include "utilities/vmError.hpp"
|
||||
|
@ -363,25 +363,6 @@ size_t os::current_stack_size() {
|
||||
return sz;
|
||||
}
|
||||
|
||||
size_t os::committed_stack_size(address bottom, size_t size) {
|
||||
MEMORY_BASIC_INFORMATION minfo;
|
||||
address top = bottom + size;
|
||||
size_t committed_size = 0;
|
||||
|
||||
while (committed_size < size) {
|
||||
// top is exclusive
|
||||
VirtualQuery(top - 1, &minfo, sizeof(minfo));
|
||||
if ((minfo.State & MEM_COMMIT) != 0) {
|
||||
committed_size += minfo.RegionSize;
|
||||
top -= minfo.RegionSize;
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return MIN2(committed_size, size);
|
||||
}
|
||||
|
||||
struct tm* os::localtime_pd(const time_t* clock, struct tm* res) {
|
||||
const struct tm* time_struct_ptr = localtime(clock);
|
||||
if (time_struct_ptr != NULL) {
|
||||
|
@ -375,10 +375,10 @@ static bool recalc_search_path_locked(bool* p_search_path_was_updated) {
|
||||
const int len_returned = (int)::GetModuleFileName(hMod, filebuffer, (DWORD)file_buffer_capacity);
|
||||
DEBUG_ONLY(g_buffers.dir_name.check();)
|
||||
if (len_returned == 0) {
|
||||
// Error. This is suspicious - this may happen if a module has just been
|
||||
// unloaded concurrently after our call to EnumProcessModules and
|
||||
// GetModuleFileName, but probably just indicates a coding error.
|
||||
assert(false, "GetModuleFileName failed (%u)", ::GetLastError());
|
||||
// This may happen when a module gets unloaded after our call to EnumProcessModules.
|
||||
// It should be rare but may sporadically happen. Just ignore and continue with the
|
||||
// next module.
|
||||
continue;
|
||||
} else if (len_returned == file_buffer_capacity) {
|
||||
// Truncation. Just skip this module and continue with the next module.
|
||||
continue;
|
||||
|
@ -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.
|
||||
* Copyright (c) 2012, 2014 SAP SE. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
@ -80,7 +80,6 @@ inline void OrderAccess::fence() { inlasm_sync(); }
|
||||
|
||||
template<size_t byte_size>
|
||||
struct OrderAccess::PlatformOrderedLoad<byte_size, X_ACQUIRE>
|
||||
VALUE_OBJ_CLASS_SPEC
|
||||
{
|
||||
template <typename T>
|
||||
T operator()(const volatile T* p) const { register T t = Atomic::load(p); inlasm_acquire_reg(t); return t; }
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -65,7 +65,6 @@ inline void OrderAccess::fence() {
|
||||
|
||||
template<>
|
||||
struct OrderAccess::PlatformOrderedStore<1, RELEASE_X_FENCE>
|
||||
VALUE_OBJ_CLASS_SPEC
|
||||
{
|
||||
template <typename T>
|
||||
void operator()(T v, volatile T* p) const {
|
||||
@ -78,7 +77,6 @@ struct OrderAccess::PlatformOrderedStore<1, RELEASE_X_FENCE>
|
||||
|
||||
template<>
|
||||
struct OrderAccess::PlatformOrderedStore<2, RELEASE_X_FENCE>
|
||||
VALUE_OBJ_CLASS_SPEC
|
||||
{
|
||||
template <typename T>
|
||||
void operator()(T v, volatile T* p) const {
|
||||
@ -91,7 +89,6 @@ struct OrderAccess::PlatformOrderedStore<2, RELEASE_X_FENCE>
|
||||
|
||||
template<>
|
||||
struct OrderAccess::PlatformOrderedStore<4, RELEASE_X_FENCE>
|
||||
VALUE_OBJ_CLASS_SPEC
|
||||
{
|
||||
template <typename T>
|
||||
void operator()(T v, volatile T* p) const {
|
||||
@ -105,7 +102,6 @@ struct OrderAccess::PlatformOrderedStore<4, RELEASE_X_FENCE>
|
||||
#ifdef AMD64
|
||||
template<>
|
||||
struct OrderAccess::PlatformOrderedStore<8, RELEASE_X_FENCE>
|
||||
VALUE_OBJ_CLASS_SPEC
|
||||
{
|
||||
template <typename T>
|
||||
void operator()(T v, volatile T* p) const {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, Red Hat Inc. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
@ -52,7 +52,6 @@ inline void OrderAccess::fence() {
|
||||
|
||||
template<size_t byte_size>
|
||||
struct OrderAccess::PlatformOrderedLoad<byte_size, X_ACQUIRE>
|
||||
VALUE_OBJ_CLASS_SPEC
|
||||
{
|
||||
template <typename T>
|
||||
T operator()(const volatile T* p) const { T data; __atomic_load(p, &data, __ATOMIC_ACQUIRE); return data; }
|
||||
@ -60,7 +59,6 @@ struct OrderAccess::PlatformOrderedLoad<byte_size, X_ACQUIRE>
|
||||
|
||||
template<size_t byte_size>
|
||||
struct OrderAccess::PlatformOrderedStore<byte_size, RELEASE_X>
|
||||
VALUE_OBJ_CLASS_SPEC
|
||||
{
|
||||
template <typename T>
|
||||
void operator()(T v, volatile T* p) const { __atomic_store(p, &v, __ATOMIC_RELEASE); }
|
||||
@ -68,7 +66,6 @@ struct OrderAccess::PlatformOrderedStore<byte_size, RELEASE_X>
|
||||
|
||||
template<size_t byte_size>
|
||||
struct OrderAccess::PlatformOrderedStore<byte_size, RELEASE_X_FENCE>
|
||||
VALUE_OBJ_CLASS_SPEC
|
||||
{
|
||||
template <typename T>
|
||||
void operator()(T v, volatile T* p) const { release_store(p, v); fence(); }
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2008, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -132,7 +132,6 @@ inline void OrderAccess::fence() { dmb_sy(); }
|
||||
|
||||
template<>
|
||||
struct OrderAccess::PlatformOrderedLoad<1, X_ACQUIRE>
|
||||
VALUE_OBJ_CLASS_SPEC
|
||||
{
|
||||
template <typename T>
|
||||
T operator()(const volatile T* p) const {
|
||||
@ -148,7 +147,6 @@ struct OrderAccess::PlatformOrderedLoad<1, X_ACQUIRE>
|
||||
|
||||
template<>
|
||||
struct OrderAccess::PlatformOrderedLoad<2, X_ACQUIRE>
|
||||
VALUE_OBJ_CLASS_SPEC
|
||||
{
|
||||
template <typename T>
|
||||
T operator()(const volatile T* p) const {
|
||||
@ -164,7 +162,6 @@ struct OrderAccess::PlatformOrderedLoad<2, X_ACQUIRE>
|
||||
|
||||
template<>
|
||||
struct OrderAccess::PlatformOrderedLoad<4, X_ACQUIRE>
|
||||
VALUE_OBJ_CLASS_SPEC
|
||||
{
|
||||
template <typename T>
|
||||
T operator()(const volatile T* p) const {
|
||||
@ -180,7 +177,6 @@ struct OrderAccess::PlatformOrderedLoad<4, X_ACQUIRE>
|
||||
|
||||
template<>
|
||||
struct OrderAccess::PlatformOrderedLoad<8, X_ACQUIRE>
|
||||
VALUE_OBJ_CLASS_SPEC
|
||||
{
|
||||
template <typename T>
|
||||
T operator()(const volatile T* p) const {
|
||||
@ -196,7 +192,6 @@ struct OrderAccess::PlatformOrderedLoad<8, X_ACQUIRE>
|
||||
|
||||
template<>
|
||||
struct OrderAccess::PlatformOrderedStore<1, RELEASE_X_FENCE>
|
||||
VALUE_OBJ_CLASS_SPEC
|
||||
{
|
||||
template <typename T>
|
||||
void operator()(T v, volatile T* p) const {
|
||||
@ -210,7 +205,6 @@ struct OrderAccess::PlatformOrderedStore<1, RELEASE_X_FENCE>
|
||||
|
||||
template<>
|
||||
struct OrderAccess::PlatformOrderedStore<2, RELEASE_X_FENCE>
|
||||
VALUE_OBJ_CLASS_SPEC
|
||||
{
|
||||
template <typename T>
|
||||
void operator()(T v, volatile T* p) const {
|
||||
@ -224,7 +218,6 @@ struct OrderAccess::PlatformOrderedStore<2, RELEASE_X_FENCE>
|
||||
|
||||
template<>
|
||||
struct OrderAccess::PlatformOrderedStore<4, RELEASE_X_FENCE>
|
||||
VALUE_OBJ_CLASS_SPEC
|
||||
{
|
||||
template <typename T>
|
||||
void operator()(T v, volatile T* p) const {
|
||||
@ -238,7 +231,6 @@ struct OrderAccess::PlatformOrderedStore<4, RELEASE_X_FENCE>
|
||||
|
||||
template<>
|
||||
struct OrderAccess::PlatformOrderedStore<8, RELEASE_X_FENCE>
|
||||
VALUE_OBJ_CLASS_SPEC
|
||||
{
|
||||
template <typename T>
|
||||
void operator()(T v, volatile T* p) const {
|
||||
|
@ -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.
|
||||
* Copyright (c) 2012, 2014 SAP SE. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
@ -83,7 +83,6 @@ inline void OrderAccess::fence() { inlasm_sync(); }
|
||||
|
||||
template<size_t byte_size>
|
||||
struct OrderAccess::PlatformOrderedLoad<byte_size, X_ACQUIRE>
|
||||
VALUE_OBJ_CLASS_SPEC
|
||||
{
|
||||
template <typename T>
|
||||
T operator()(const volatile T* p) const { register T t = Atomic::load(p); inlasm_acquire_reg(t); return t; }
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2016 SAP SE. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
@ -76,7 +76,6 @@ inline void OrderAccess::fence() { inlasm_zarch_sync(); }
|
||||
|
||||
template<size_t byte_size>
|
||||
struct OrderAccess::PlatformOrderedLoad<byte_size, X_ACQUIRE>
|
||||
VALUE_OBJ_CLASS_SPEC
|
||||
{
|
||||
template <typename T>
|
||||
T operator()(const volatile T* p) const { register T t = *p; inlasm_zarch_acquire(); return t; }
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -61,7 +61,6 @@ inline void OrderAccess::fence() {
|
||||
|
||||
template<>
|
||||
struct OrderAccess::PlatformOrderedStore<1, RELEASE_X_FENCE>
|
||||
VALUE_OBJ_CLASS_SPEC
|
||||
{
|
||||
template <typename T>
|
||||
void operator()(T v, volatile T* p) const {
|
||||
@ -74,7 +73,6 @@ struct OrderAccess::PlatformOrderedStore<1, RELEASE_X_FENCE>
|
||||
|
||||
template<>
|
||||
struct OrderAccess::PlatformOrderedStore<2, RELEASE_X_FENCE>
|
||||
VALUE_OBJ_CLASS_SPEC
|
||||
{
|
||||
template <typename T>
|
||||
void operator()(T v, volatile T* p) const {
|
||||
@ -87,7 +85,6 @@ struct OrderAccess::PlatformOrderedStore<2, RELEASE_X_FENCE>
|
||||
|
||||
template<>
|
||||
struct OrderAccess::PlatformOrderedStore<4, RELEASE_X_FENCE>
|
||||
VALUE_OBJ_CLASS_SPEC
|
||||
{
|
||||
template <typename T>
|
||||
void operator()(T v, volatile T* p) const {
|
||||
@ -101,7 +98,6 @@ struct OrderAccess::PlatformOrderedStore<4, RELEASE_X_FENCE>
|
||||
#ifdef AMD64
|
||||
template<>
|
||||
struct OrderAccess::PlatformOrderedStore<8, RELEASE_X_FENCE>
|
||||
VALUE_OBJ_CLASS_SPEC
|
||||
{
|
||||
template <typename T>
|
||||
void operator()(T v, volatile T* p) const {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -29,7 +29,7 @@
|
||||
|
||||
// Implement ADD using a CAS loop.
|
||||
template<size_t byte_size>
|
||||
struct Atomic::PlatformAdd VALUE_OBJ_CLASS_SPEC {
|
||||
struct Atomic::PlatformAdd {
|
||||
template<typename I, typename D>
|
||||
inline D operator()(I add_value, D volatile* dest) const {
|
||||
D old_value = *dest;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -75,7 +75,6 @@ inline void OrderAccess::fence() {
|
||||
#ifndef AMD64
|
||||
template<>
|
||||
struct OrderAccess::PlatformOrderedStore<1, RELEASE_X_FENCE>
|
||||
VALUE_OBJ_CLASS_SPEC
|
||||
{
|
||||
template <typename T>
|
||||
void operator()(T v, volatile T* p) const {
|
||||
@ -89,7 +88,6 @@ struct OrderAccess::PlatformOrderedStore<1, RELEASE_X_FENCE>
|
||||
|
||||
template<>
|
||||
struct OrderAccess::PlatformOrderedStore<2, RELEASE_X_FENCE>
|
||||
VALUE_OBJ_CLASS_SPEC
|
||||
{
|
||||
template <typename T>
|
||||
void operator()(T v, volatile T* p) const {
|
||||
@ -103,7 +101,6 @@ struct OrderAccess::PlatformOrderedStore<2, RELEASE_X_FENCE>
|
||||
|
||||
template<>
|
||||
struct OrderAccess::PlatformOrderedStore<4, RELEASE_X_FENCE>
|
||||
VALUE_OBJ_CLASS_SPEC
|
||||
{
|
||||
template <typename T>
|
||||
void operator()(T v, volatile T* p) const {
|
||||
|
@ -34,6 +34,7 @@
|
||||
#include "interpreter/abstractInterpreter.hpp"
|
||||
#include "jvmci/compilerRuntime.hpp"
|
||||
#include "jvmci/jvmciRuntime.hpp"
|
||||
#include "memory/allocation.inline.hpp"
|
||||
#include "oops/method.inline.hpp"
|
||||
#include "runtime/os.hpp"
|
||||
#include "runtime/sharedRuntime.hpp"
|
||||
|
@ -36,6 +36,7 @@
|
||||
#include "jvmci/compilerRuntime.hpp"
|
||||
#include "jvmci/jvmciRuntime.hpp"
|
||||
#include "oops/method.inline.hpp"
|
||||
#include "runtime/handles.inline.hpp"
|
||||
#include "runtime/java.hpp"
|
||||
#include "runtime/os.hpp"
|
||||
#include "runtime/sharedRuntime.hpp"
|
||||
@ -448,4 +449,3 @@ void AOTCompiledMethod::clear_inline_caches() {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -27,7 +27,9 @@
|
||||
#include "aot/aotCodeHeap.hpp"
|
||||
#include "aot/aotLoader.inline.hpp"
|
||||
#include "jvmci/jvmciRuntime.hpp"
|
||||
#include "memory/allocation.inline.hpp"
|
||||
#include "oops/method.hpp"
|
||||
#include "runtime/handles.inline.hpp"
|
||||
#include "runtime/os.hpp"
|
||||
#include "runtime/timerTrace.hpp"
|
||||
|
||||
|
@ -45,7 +45,7 @@
|
||||
#include "memory/allocation.inline.hpp"
|
||||
#include "memory/oopFactory.hpp"
|
||||
#include "memory/resourceArea.hpp"
|
||||
#include "memory/universe.inline.hpp"
|
||||
#include "memory/universe.hpp"
|
||||
#include "oops/constantPool.inline.hpp"
|
||||
#include "oops/cpCache.inline.hpp"
|
||||
#include "oops/method.inline.hpp"
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -29,7 +29,7 @@
|
||||
#include "classfile/systemDictionary.hpp"
|
||||
#include "gc/shared/collectedHeap.inline.hpp"
|
||||
#include "interpreter/linkResolver.hpp"
|
||||
#include "memory/universe.inline.hpp"
|
||||
#include "memory/universe.hpp"
|
||||
#include "oops/oop.inline.hpp"
|
||||
#include "runtime/fieldDescriptor.hpp"
|
||||
|
||||
|
@ -28,6 +28,7 @@
|
||||
#include "interpreter/bytecodes.hpp"
|
||||
#include "memory/oopFactory.hpp"
|
||||
#include "oops/constantPool.hpp"
|
||||
#include "runtime/handles.inline.hpp"
|
||||
#include "utilities/bytes.hpp"
|
||||
|
||||
u2 BytecodeConstantPool::find_or_add(BytecodeCPEntry const& bcpe) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -51,7 +51,7 @@ class BytecodeBuffer : public GrowableArray<u1> {
|
||||
};
|
||||
|
||||
// Entries in a yet-to-be-created constant pool. Limited types for now.
|
||||
class BytecodeCPEntry VALUE_OBJ_CLASS_SPEC {
|
||||
class BytecodeCPEntry {
|
||||
public:
|
||||
enum tag {
|
||||
ERROR_TAG,
|
||||
|
@ -44,7 +44,7 @@
|
||||
#include "memory/metadataFactory.hpp"
|
||||
#include "memory/oopFactory.hpp"
|
||||
#include "memory/resourceArea.hpp"
|
||||
#include "memory/universe.inline.hpp"
|
||||
#include "memory/universe.hpp"
|
||||
#include "oops/annotations.hpp"
|
||||
#include "oops/constantPool.inline.hpp"
|
||||
#include "oops/fieldStreams.hpp"
|
||||
@ -1858,7 +1858,7 @@ class LVT_Hash : public AllStatic {
|
||||
|
||||
|
||||
// Class file LocalVariableTable elements.
|
||||
class Classfile_LVT_Element VALUE_OBJ_CLASS_SPEC {
|
||||
class Classfile_LVT_Element {
|
||||
public:
|
||||
u2 start_bci;
|
||||
u2 length;
|
||||
@ -3767,9 +3767,7 @@ void ClassFileParser::layout_fields(ConstantPool* cp,
|
||||
int next_static_oop_offset = InstanceMirrorKlass::offset_of_static_fields();
|
||||
int next_static_double_offset = next_static_oop_offset +
|
||||
((fac->count[STATIC_OOP]) * heapOopSize);
|
||||
if ( fac->count[STATIC_DOUBLE] &&
|
||||
(Universe::field_type_should_be_aligned(T_DOUBLE) ||
|
||||
Universe::field_type_should_be_aligned(T_LONG)) ) {
|
||||
if (fac->count[STATIC_DOUBLE]) {
|
||||
next_static_double_offset = align_up(next_static_double_offset, BytesPerLong);
|
||||
}
|
||||
|
||||
@ -4382,7 +4380,7 @@ static void record_defined_class_dependencies(const InstanceKlass* defined_klass
|
||||
// add super class dependency
|
||||
Klass* const super = defined_klass->super();
|
||||
if (super != NULL) {
|
||||
defining_loader_data->record_dependency(super, CHECK);
|
||||
defining_loader_data->record_dependency(super);
|
||||
}
|
||||
|
||||
// add super interface dependencies
|
||||
@ -4390,7 +4388,7 @@ static void record_defined_class_dependencies(const InstanceKlass* defined_klass
|
||||
if (local_interfaces != NULL) {
|
||||
const int length = local_interfaces->length();
|
||||
for (int i = 0; i < length; i++) {
|
||||
defining_loader_data->record_dependency(local_interfaces->at(i), CHECK);
|
||||
defining_loader_data->record_dependency(local_interfaces->at(i));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -5363,6 +5361,16 @@ InstanceKlass* ClassFileParser::create_instance_klass(bool changed_by_loadhook,
|
||||
void ClassFileParser::fill_instance_klass(InstanceKlass* ik, bool changed_by_loadhook, TRAPS) {
|
||||
assert(ik != NULL, "invariant");
|
||||
|
||||
// Set name and CLD before adding to CLD
|
||||
ik->set_class_loader_data(_loader_data);
|
||||
ik->set_name(_class_name);
|
||||
|
||||
// Add all classes to our internal class loader list here,
|
||||
// including classes in the bootstrap (NULL) class loader.
|
||||
const bool publicize = !is_internal();
|
||||
|
||||
_loader_data->add_class(ik, publicize);
|
||||
|
||||
set_klass_to_deallocate(ik);
|
||||
|
||||
assert(_field_info != NULL, "invariant");
|
||||
@ -5377,7 +5385,6 @@ void ClassFileParser::fill_instance_klass(InstanceKlass* ik, bool changed_by_loa
|
||||
ik->set_should_verify_class(_need_verify);
|
||||
|
||||
// Not yet: supers are done below to support the new subtype-checking fields
|
||||
ik->set_class_loader_data(_loader_data);
|
||||
ik->set_nonstatic_field_size(_field_info->nonstatic_field_size);
|
||||
ik->set_has_nonstatic_fields(_field_info->has_nonstatic_fields);
|
||||
assert(_fac != NULL, "invariant");
|
||||
@ -5408,8 +5415,6 @@ void ClassFileParser::fill_instance_klass(InstanceKlass* ik, bool changed_by_loa
|
||||
// has to be changed accordingly.
|
||||
ik->set_initial_method_idnum(ik->methods()->length());
|
||||
|
||||
ik->set_name(_class_name);
|
||||
|
||||
if (is_anonymous()) {
|
||||
// _this_class_index is a CONSTANT_Class entry that refers to this
|
||||
// anonymous class itself. If this class needs to refer to its own methods or
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -49,7 +49,7 @@ class TempNewSymbol;
|
||||
//
|
||||
// The bytes describing the class file structure is read from a Stream object
|
||||
|
||||
class ClassFileParser VALUE_OBJ_CLASS_SPEC {
|
||||
class ClassFileParser {
|
||||
|
||||
class ClassAnnotationCollector;
|
||||
class FieldAllocationCount;
|
||||
|
@ -48,7 +48,7 @@
|
||||
#include "memory/filemap.hpp"
|
||||
#include "memory/oopFactory.hpp"
|
||||
#include "memory/resourceArea.hpp"
|
||||
#include "memory/universe.inline.hpp"
|
||||
#include "memory/universe.hpp"
|
||||
#include "oops/instanceKlass.hpp"
|
||||
#include "oops/instanceRefKlass.hpp"
|
||||
#include "oops/method.inline.hpp"
|
||||
|
@ -59,6 +59,7 @@
|
||||
#include "gc/shared/gcLocker.hpp"
|
||||
#include "logging/log.hpp"
|
||||
#include "logging/logStream.hpp"
|
||||
#include "memory/allocation.inline.hpp"
|
||||
#include "memory/metadataFactory.hpp"
|
||||
#include "memory/metaspaceShared.hpp"
|
||||
#include "memory/oopFactory.hpp"
|
||||
@ -85,7 +86,25 @@ volatile size_t ClassLoaderDataGraph::_num_instance_classes = 0;
|
||||
|
||||
ClassLoaderData * ClassLoaderData::_the_null_class_loader_data = NULL;
|
||||
|
||||
ClassLoaderData::ClassLoaderData(Handle h_class_loader, bool is_anonymous, Dependencies dependencies) :
|
||||
void ClassLoaderData::init_null_class_loader_data() {
|
||||
assert(_the_null_class_loader_data == NULL, "cannot initialize twice");
|
||||
assert(ClassLoaderDataGraph::_head == NULL, "cannot initialize twice");
|
||||
|
||||
_the_null_class_loader_data = new ClassLoaderData(Handle(), false);
|
||||
ClassLoaderDataGraph::_head = _the_null_class_loader_data;
|
||||
assert(_the_null_class_loader_data->is_the_null_class_loader_data(), "Must be");
|
||||
|
||||
LogTarget(Debug, class, loader, data) lt;
|
||||
if (lt.is_enabled()) {
|
||||
ResourceMark rm;
|
||||
LogStream ls(lt);
|
||||
ls.print("create ");
|
||||
_the_null_class_loader_data->print_value_on(&ls);
|
||||
ls.cr();
|
||||
}
|
||||
}
|
||||
|
||||
ClassLoaderData::ClassLoaderData(Handle h_class_loader, bool is_anonymous) :
|
||||
_class_loader(h_class_loader()),
|
||||
_is_anonymous(is_anonymous),
|
||||
// An anonymous class loader data doesn't have anything to keep
|
||||
@ -96,7 +115,7 @@ ClassLoaderData::ClassLoaderData(Handle h_class_loader, bool is_anonymous, Depen
|
||||
_modules(NULL), _packages(NULL),
|
||||
_claimed(0), _modified_oops(true), _accumulated_modified_oops(false),
|
||||
_jmethod_ids(NULL), _handles(), _deallocate_list(NULL),
|
||||
_next(NULL), _dependencies(dependencies),
|
||||
_next(NULL),
|
||||
_metaspace_lock(new Mutex(Monitor::leaf+1, "Metaspace allocation lock", true,
|
||||
Monitor::_safepoint_check_never)) {
|
||||
|
||||
@ -112,30 +131,18 @@ ClassLoaderData::ClassLoaderData(Handle h_class_loader, bool is_anonymous, Depen
|
||||
// Create unnamed module for all other loaders
|
||||
_unnamed_module = ModuleEntry::create_unnamed_module(this);
|
||||
}
|
||||
} else {
|
||||
_unnamed_module = NULL;
|
||||
}
|
||||
|
||||
if (!is_anonymous) {
|
||||
_dictionary = create_dictionary();
|
||||
} else {
|
||||
_packages = NULL;
|
||||
_unnamed_module = NULL;
|
||||
_dictionary = NULL;
|
||||
}
|
||||
|
||||
NOT_PRODUCT(_dependency_count = 0); // number of class loader dependencies
|
||||
|
||||
TRACE_INIT_ID(this);
|
||||
}
|
||||
|
||||
void ClassLoaderData::init_dependencies(TRAPS) {
|
||||
assert(!Universe::is_fully_initialized(), "should only be called when initializing");
|
||||
assert(is_the_null_class_loader_data(), "should only call this for the null class loader");
|
||||
_dependencies.init(CHECK);
|
||||
}
|
||||
|
||||
void ClassLoaderData::Dependencies::init(TRAPS) {
|
||||
// Create empty dependencies array to add to. CMS requires this to be
|
||||
// an oop so that it can track additions via card marks. We think.
|
||||
_list_head = oopFactory::new_objectArray(2, CHECK);
|
||||
}
|
||||
|
||||
ClassLoaderData::ChunkedHandleList::~ChunkedHandleList() {
|
||||
Chunk* c = _head;
|
||||
while (c != NULL) {
|
||||
@ -156,6 +163,16 @@ oop* ClassLoaderData::ChunkedHandleList::add(oop o) {
|
||||
return handle;
|
||||
}
|
||||
|
||||
int ClassLoaderData::ChunkedHandleList::count() const {
|
||||
int count = 0;
|
||||
Chunk* chunk = _head;
|
||||
while (chunk != NULL) {
|
||||
count += chunk->_size;
|
||||
chunk = chunk->_next;
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
inline void ClassLoaderData::ChunkedHandleList::oops_do_chunk(OopClosure* f, Chunk* c, const juint size) {
|
||||
for (juint i = 0; i < size; i++) {
|
||||
if (c->_data[i] != NULL) {
|
||||
@ -175,16 +192,15 @@ void ClassLoaderData::ChunkedHandleList::oops_do(OopClosure* f) {
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef ASSERT
|
||||
class VerifyContainsOopClosure : public OopClosure {
|
||||
oop* _target;
|
||||
oop _target;
|
||||
bool _found;
|
||||
|
||||
public:
|
||||
VerifyContainsOopClosure(oop* target) : _target(target), _found(false) {}
|
||||
VerifyContainsOopClosure(oop target) : _target(target), _found(false) {}
|
||||
|
||||
void do_oop(oop* p) {
|
||||
if (p == _target) {
|
||||
if (p != NULL && *p == _target) {
|
||||
_found = true;
|
||||
}
|
||||
}
|
||||
@ -199,12 +215,11 @@ class VerifyContainsOopClosure : public OopClosure {
|
||||
}
|
||||
};
|
||||
|
||||
bool ClassLoaderData::ChunkedHandleList::contains(oop* p) {
|
||||
bool ClassLoaderData::ChunkedHandleList::contains(oop p) {
|
||||
VerifyContainsOopClosure cl(p);
|
||||
oops_do(&cl);
|
||||
return cl.found();
|
||||
}
|
||||
#endif // ASSERT
|
||||
|
||||
bool ClassLoaderData::claim() {
|
||||
if (_claimed == 1) {
|
||||
@ -244,14 +259,9 @@ void ClassLoaderData::oops_do(OopClosure* f, bool must_claim, bool clear_mod_oop
|
||||
}
|
||||
|
||||
f->do_oop(&_class_loader);
|
||||
_dependencies.oops_do(f);
|
||||
_handles.oops_do(f);
|
||||
}
|
||||
|
||||
void ClassLoaderData::Dependencies::oops_do(OopClosure* f) {
|
||||
f->do_oop((oop*)&_list_head);
|
||||
}
|
||||
|
||||
void ClassLoaderData::classes_do(KlassClosure* klass_closure) {
|
||||
// Lock-free access requires load_acquire
|
||||
for (Klass* k = OrderAccess::load_acquire(&_klasses); k != NULL; k = k->next_link()) {
|
||||
@ -326,7 +336,7 @@ void ClassLoaderData::packages_do(void f(PackageEntry*)) {
|
||||
}
|
||||
}
|
||||
|
||||
void ClassLoaderData::record_dependency(const Klass* k, TRAPS) {
|
||||
void ClassLoaderData::record_dependency(const Klass* k) {
|
||||
assert(k != NULL, "invariant");
|
||||
|
||||
ClassLoaderData * const from_cld = this;
|
||||
@ -361,77 +371,27 @@ void ClassLoaderData::record_dependency(const Klass* k, TRAPS) {
|
||||
}
|
||||
}
|
||||
|
||||
// It's a dependency we won't find through GC, add it. This is relatively rare.
|
||||
// Must handle over GC point.
|
||||
Handle dependency(THREAD, to);
|
||||
from_cld->_dependencies.add(dependency, CHECK);
|
||||
|
||||
// Added a potentially young gen oop to the ClassLoaderData
|
||||
record_modified_oops();
|
||||
}
|
||||
|
||||
|
||||
void ClassLoaderData::Dependencies::add(Handle dependency, TRAPS) {
|
||||
// Check first if this dependency is already in the list.
|
||||
// Save a pointer to the last to add to under the lock.
|
||||
objArrayOop ok = _list_head;
|
||||
objArrayOop last = NULL;
|
||||
while (ok != NULL) {
|
||||
last = ok;
|
||||
if (ok->obj_at(0) == dependency()) {
|
||||
// Don't need to add it
|
||||
return;
|
||||
// It's a dependency we won't find through GC, add it.
|
||||
if (!_handles.contains(to)) {
|
||||
NOT_PRODUCT(Atomic::inc(&_dependency_count));
|
||||
LogTarget(Trace, class, loader, data) lt;
|
||||
if (lt.is_enabled()) {
|
||||
ResourceMark rm;
|
||||
LogStream ls(lt);
|
||||
ls.print("adding dependency from ");
|
||||
print_value_on(&ls);
|
||||
ls.print(" to ");
|
||||
to_cld->print_value_on(&ls);
|
||||
ls.cr();
|
||||
}
|
||||
ok = (objArrayOop)ok->obj_at(1);
|
||||
}
|
||||
|
||||
// Must handle over GC points
|
||||
assert (last != NULL, "dependencies should be initialized");
|
||||
objArrayHandle last_handle(THREAD, last);
|
||||
|
||||
// Create a new dependency node with fields for (class_loader or mirror, next)
|
||||
objArrayOop deps = oopFactory::new_objectArray(2, CHECK);
|
||||
deps->obj_at_put(0, dependency());
|
||||
|
||||
// Must handle over GC points
|
||||
objArrayHandle new_dependency(THREAD, deps);
|
||||
|
||||
// Add the dependency under lock
|
||||
locked_add(last_handle, new_dependency, THREAD);
|
||||
}
|
||||
|
||||
void ClassLoaderData::Dependencies::locked_add(objArrayHandle last_handle,
|
||||
objArrayHandle new_dependency,
|
||||
Thread* THREAD) {
|
||||
|
||||
// Have to lock and put the new dependency on the end of the dependency
|
||||
// array so the card mark for CMS sees that this dependency is new.
|
||||
// Can probably do this lock free with some effort.
|
||||
ObjectLocker ol(Handle(THREAD, _list_head), THREAD);
|
||||
|
||||
oop loader_or_mirror = new_dependency->obj_at(0);
|
||||
|
||||
// Since the dependencies are only added, add to the end.
|
||||
objArrayOop end = last_handle();
|
||||
objArrayOop last = NULL;
|
||||
while (end != NULL) {
|
||||
last = end;
|
||||
// check again if another thread added it to the end.
|
||||
if (end->obj_at(0) == loader_or_mirror) {
|
||||
// Don't need to add it
|
||||
return;
|
||||
}
|
||||
end = (objArrayOop)end->obj_at(1);
|
||||
}
|
||||
assert (last != NULL, "dependencies should be initialized");
|
||||
// fill in the first element with the oop in new_dependency.
|
||||
if (last->obj_at(0) == NULL) {
|
||||
last->obj_at_put(0, new_dependency->obj_at(0));
|
||||
} else {
|
||||
last->obj_at_put(1, new_dependency());
|
||||
Handle dependency(Thread::current(), to);
|
||||
add_handle(dependency);
|
||||
// Added a potentially young gen oop to the ClassLoaderData
|
||||
record_modified_oops();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void ClassLoaderDataGraph::clear_claimed_marks() {
|
||||
for (ClassLoaderData* cld = _head; cld != NULL; cld = cld->next()) {
|
||||
cld->clear_claimed();
|
||||
@ -453,15 +413,15 @@ void ClassLoaderData::add_class(Klass* k, bool publicize /* true */) {
|
||||
}
|
||||
}
|
||||
|
||||
if (publicize && k->class_loader_data() != NULL) {
|
||||
ResourceMark rm;
|
||||
log_trace(class, loader, data)("Adding k: " PTR_FORMAT " %s to CLD: "
|
||||
PTR_FORMAT " loader: " PTR_FORMAT " %s",
|
||||
p2i(k),
|
||||
k->external_name(),
|
||||
p2i(k->class_loader_data()),
|
||||
p2i((void *)k->class_loader()),
|
||||
loader_name());
|
||||
if (publicize) {
|
||||
LogTarget(Trace, class, loader, data) lt;
|
||||
if (lt.is_enabled()) {
|
||||
ResourceMark rm;
|
||||
LogStream ls(lt);
|
||||
ls.print("Adding k: " PTR_FORMAT " %s to ", p2i(k), k->external_name());
|
||||
print_value_on(&ls);
|
||||
ls.cr();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -578,12 +538,8 @@ void ClassLoaderData::unload() {
|
||||
if (lt.is_enabled()) {
|
||||
ResourceMark rm;
|
||||
LogStream ls(lt);
|
||||
ls.print(": unload loader data " INTPTR_FORMAT, p2i(this));
|
||||
ls.print(" for instance " INTPTR_FORMAT " of %s", p2i((void *)class_loader()),
|
||||
loader_name());
|
||||
if (is_anonymous()) {
|
||||
ls.print(" for anonymous class " INTPTR_FORMAT " ", p2i(_klasses));
|
||||
}
|
||||
ls.print("unload ");
|
||||
print_value_on(&ls);
|
||||
ls.cr();
|
||||
}
|
||||
|
||||
@ -779,14 +735,8 @@ Metaspace* ClassLoaderData::metaspace_non_null() {
|
||||
assert (class_loader() == NULL, "Must be");
|
||||
metaspace = new Metaspace(_metaspace_lock, Metaspace::BootMetaspaceType);
|
||||
} else if (is_anonymous()) {
|
||||
if (class_loader() != NULL) {
|
||||
log_trace(class, loader, data)("is_anonymous: %s", class_loader()->klass()->internal_name());
|
||||
}
|
||||
metaspace = new Metaspace(_metaspace_lock, Metaspace::AnonymousMetaspaceType);
|
||||
} else if (class_loader()->is_a(SystemDictionary::reflect_DelegatingClassLoader_klass())) {
|
||||
if (class_loader() != NULL) {
|
||||
log_trace(class, loader, data)("is_reflection: %s", class_loader()->klass()->internal_name());
|
||||
}
|
||||
metaspace = new Metaspace(_metaspace_lock, Metaspace::ReflectionMetaspaceType);
|
||||
} else {
|
||||
metaspace = new Metaspace(_metaspace_lock, Metaspace::StandardMetaspaceType);
|
||||
@ -808,7 +758,7 @@ void ClassLoaderData::remove_handle(OopHandle h) {
|
||||
assert(!is_unloading(), "Do not remove a handle for a CLD that is unloading");
|
||||
oop* ptr = h.ptr_raw();
|
||||
if (ptr != NULL) {
|
||||
assert(_handles.contains(ptr), "Got unexpected handle " PTR_FORMAT, p2i(ptr));
|
||||
assert(_handles.contains(*ptr), "Got unexpected handle " PTR_FORMAT, p2i(ptr));
|
||||
// This root is not walked in safepoints, and hence requires an appropriate
|
||||
// decorator that e.g. maintains the SATB invariant in SATB collectors.
|
||||
RootAccess<IN_CONCURRENT_ROOT>::oop_store(ptr, oop(NULL));
|
||||
@ -902,49 +852,44 @@ void ClassLoaderData::unload_deallocate_list() {
|
||||
}
|
||||
|
||||
// These anonymous class loaders are to contain classes used for JSR292
|
||||
ClassLoaderData* ClassLoaderData::anonymous_class_loader_data(oop loader, TRAPS) {
|
||||
ClassLoaderData* ClassLoaderData::anonymous_class_loader_data(Handle loader) {
|
||||
// Add a new class loader data to the graph.
|
||||
Handle lh(THREAD, loader);
|
||||
return ClassLoaderDataGraph::add(lh, true, THREAD);
|
||||
return ClassLoaderDataGraph::add(loader, true);
|
||||
}
|
||||
|
||||
const char* ClassLoaderData::loader_name() {
|
||||
const char* ClassLoaderData::loader_name() const {
|
||||
// Handles null class loader
|
||||
return SystemDictionary::loader_name(class_loader());
|
||||
}
|
||||
|
||||
#ifndef PRODUCT
|
||||
// Define to dump klasses
|
||||
#undef CLD_DUMP_KLASSES
|
||||
|
||||
void ClassLoaderData::dump(outputStream * const out) {
|
||||
out->print("ClassLoaderData CLD: " PTR_FORMAT ", loader: " PTR_FORMAT ", loader_klass: " PTR_FORMAT " %s {",
|
||||
p2i(this), p2i((void *)class_loader()),
|
||||
p2i(class_loader() != NULL ? class_loader()->klass() : NULL), loader_name());
|
||||
if (claimed()) out->print(" claimed ");
|
||||
if (is_unloading()) out->print(" unloading ");
|
||||
out->cr();
|
||||
if (metaspace_or_null() != NULL) {
|
||||
out->print_cr("metaspace: " INTPTR_FORMAT, p2i(metaspace_or_null()));
|
||||
metaspace_or_null()->dump(out);
|
||||
void ClassLoaderData::print_value_on(outputStream* out) const {
|
||||
if (class_loader() != NULL) {
|
||||
out->print("loader data: " INTPTR_FORMAT " for instance ", p2i(this));
|
||||
class_loader()->print_value_on(out); // includes loader_name() and address of class loader instance
|
||||
} else {
|
||||
out->print_cr("metaspace: NULL");
|
||||
// loader data: 0xsomeaddr of <bootloader>
|
||||
out->print("loader data: " INTPTR_FORMAT " of %s", p2i(this), loader_name());
|
||||
}
|
||||
if (is_anonymous()) {
|
||||
out->print(" anonymous");
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef PRODUCT
|
||||
void ClassLoaderData::print_on(outputStream* out) const {
|
||||
out->print("ClassLoaderData CLD: " PTR_FORMAT ", loader: " PTR_FORMAT ", loader_klass: %s {",
|
||||
p2i(this), p2i((void *)class_loader()), loader_name());
|
||||
if (is_anonymous()) out->print(" anonymous");
|
||||
if (claimed()) out->print(" claimed");
|
||||
if (is_unloading()) out->print(" unloading");
|
||||
out->print(" metaspace: " INTPTR_FORMAT, p2i(metaspace_or_null()));
|
||||
|
||||
#ifdef CLD_DUMP_KLASSES
|
||||
if (Verbose) {
|
||||
Klass* k = _klasses;
|
||||
while (k != NULL) {
|
||||
out->print_cr("klass " PTR_FORMAT ", %s", p2i(k), k->name()->as_C_string());
|
||||
assert(k != k->next_link(), "no loops!");
|
||||
k = k->next_link();
|
||||
}
|
||||
}
|
||||
#endif // CLD_DUMP_KLASSES
|
||||
#undef CLD_DUMP_KLASSES
|
||||
if (_jmethod_ids != NULL) {
|
||||
Method::print_jmethod_ids(this, out);
|
||||
}
|
||||
out->print(" handles count %d", _handles.count());
|
||||
out->print(" dependencies %d", _dependency_count);
|
||||
out->print_cr("}");
|
||||
}
|
||||
#endif // PRODUCT
|
||||
@ -988,16 +933,12 @@ bool ClassLoaderDataGraph::_metaspace_oom = false;
|
||||
|
||||
// Add a new class loader data node to the list. Assign the newly created
|
||||
// ClassLoaderData into the java/lang/ClassLoader object as a hidden field
|
||||
ClassLoaderData* ClassLoaderDataGraph::add(Handle loader, bool is_anonymous, TRAPS) {
|
||||
// We need to allocate all the oops for the ClassLoaderData before allocating the
|
||||
// actual ClassLoaderData object.
|
||||
ClassLoaderData::Dependencies dependencies(CHECK_NULL);
|
||||
|
||||
ClassLoaderData* ClassLoaderDataGraph::add(Handle loader, bool is_anonymous) {
|
||||
NoSafepointVerifier no_safepoints; // we mustn't GC until we've installed the
|
||||
// ClassLoaderData in the graph since the CLD
|
||||
// contains unhandled oops
|
||||
|
||||
ClassLoaderData* cld = new ClassLoaderData(loader, is_anonymous, dependencies);
|
||||
ClassLoaderData* cld = new ClassLoaderData(loader, is_anonymous);
|
||||
|
||||
|
||||
if (!is_anonymous) {
|
||||
@ -1021,9 +962,11 @@ ClassLoaderData* ClassLoaderDataGraph::add(Handle loader, bool is_anonymous, TRA
|
||||
if (exchanged == next) {
|
||||
LogTarget(Debug, class, loader, data) lt;
|
||||
if (lt.is_enabled()) {
|
||||
PauseNoSafepointVerifier pnsv(&no_safepoints); // Need safe points for JavaCalls::call_virtual
|
||||
LogStream ls(lt);
|
||||
print_creation(&ls, loader, cld, CHECK_NULL);
|
||||
ResourceMark rm;
|
||||
LogStream ls(lt);
|
||||
ls.print("create ");
|
||||
cld->print_value_on(&ls);
|
||||
ls.cr();
|
||||
}
|
||||
return cld;
|
||||
}
|
||||
@ -1031,36 +974,6 @@ ClassLoaderData* ClassLoaderDataGraph::add(Handle loader, bool is_anonymous, TRA
|
||||
} while (true);
|
||||
}
|
||||
|
||||
void ClassLoaderDataGraph::print_creation(outputStream* out, Handle loader, ClassLoaderData* cld, TRAPS) {
|
||||
Handle string;
|
||||
if (loader.not_null()) {
|
||||
// Include the result of loader.toString() in the output. This allows
|
||||
// the user of the log to identify the class loader instance.
|
||||
JavaValue result(T_OBJECT);
|
||||
Klass* spec_klass = SystemDictionary::ClassLoader_klass();
|
||||
JavaCalls::call_virtual(&result,
|
||||
loader,
|
||||
spec_klass,
|
||||
vmSymbols::toString_name(),
|
||||
vmSymbols::void_string_signature(),
|
||||
CHECK);
|
||||
assert(result.get_type() == T_OBJECT, "just checking");
|
||||
string = Handle(THREAD, (oop)result.get_jobject());
|
||||
}
|
||||
|
||||
ResourceMark rm;
|
||||
out->print("create class loader data " INTPTR_FORMAT, p2i(cld));
|
||||
out->print(" for instance " INTPTR_FORMAT " of %s", p2i((void *)cld->class_loader()),
|
||||
cld->loader_name());
|
||||
|
||||
if (string.not_null()) {
|
||||
out->print(": ");
|
||||
java_lang_String::print(string(), out);
|
||||
}
|
||||
out->cr();
|
||||
}
|
||||
|
||||
|
||||
void ClassLoaderDataGraph::oops_do(OopClosure* f, bool must_claim) {
|
||||
for (ClassLoaderData* cld = _head; cld != NULL; cld = cld->next()) {
|
||||
cld->oops_do(f, must_claim);
|
||||
@ -1477,7 +1390,8 @@ ClassLoaderDataGraphMetaspaceIterator::~ClassLoaderDataGraphMetaspaceIterator()
|
||||
#ifndef PRODUCT
|
||||
// callable from debugger
|
||||
extern "C" int print_loader_data_graph() {
|
||||
ClassLoaderDataGraph::dump_on(tty);
|
||||
ResourceMark rm;
|
||||
ClassLoaderDataGraph::print_on(tty);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -1487,32 +1401,13 @@ void ClassLoaderDataGraph::verify() {
|
||||
}
|
||||
}
|
||||
|
||||
void ClassLoaderDataGraph::dump_on(outputStream * const out) {
|
||||
void ClassLoaderDataGraph::print_on(outputStream * const out) {
|
||||
for (ClassLoaderData* data = _head; data != NULL; data = data->next()) {
|
||||
data->dump(out);
|
||||
data->print_on(out);
|
||||
}
|
||||
MetaspaceAux::dump(out);
|
||||
}
|
||||
#endif // PRODUCT
|
||||
|
||||
void ClassLoaderData::print_value_on(outputStream* out) const {
|
||||
if (class_loader() == NULL) {
|
||||
out->print("NULL class loader");
|
||||
} else {
|
||||
out->print("class loader " INTPTR_FORMAT " ", p2i(this));
|
||||
class_loader()->print_value_on(out);
|
||||
}
|
||||
}
|
||||
|
||||
void ClassLoaderData::print_on(outputStream* out) const {
|
||||
if (class_loader() == NULL) {
|
||||
out->print("NULL class loader");
|
||||
} else {
|
||||
out->print("class loader " INTPTR_FORMAT " ", p2i(this));
|
||||
class_loader()->print_on(out);
|
||||
}
|
||||
}
|
||||
|
||||
#if INCLUDE_TRACE
|
||||
|
||||
Ticks ClassLoaderDataGraph::_class_unload_time;
|
||||
|
@ -83,10 +83,10 @@ class ClassLoaderDataGraph : public AllStatic {
|
||||
static volatile size_t _num_instance_classes;
|
||||
static volatile size_t _num_array_classes;
|
||||
|
||||
static ClassLoaderData* add(Handle class_loader, bool anonymous, TRAPS);
|
||||
static ClassLoaderData* add(Handle class_loader, bool anonymous);
|
||||
static void post_class_unload_events();
|
||||
public:
|
||||
static ClassLoaderData* find_or_create(Handle class_loader, TRAPS);
|
||||
static ClassLoaderData* find_or_create(Handle class_loader);
|
||||
static void purge();
|
||||
static void clear_claimed_marks();
|
||||
// oops do
|
||||
@ -151,10 +151,9 @@ class ClassLoaderDataGraph : public AllStatic {
|
||||
static bool has_metaspace_oom() { return _metaspace_oom; }
|
||||
static void set_metaspace_oom(bool value) { _metaspace_oom = value; }
|
||||
|
||||
static void dump_on(outputStream * const out) PRODUCT_RETURN;
|
||||
static void dump() { dump_on(tty); }
|
||||
static void print_on(outputStream * const out) PRODUCT_RETURN;
|
||||
static void print() { print_on(tty); }
|
||||
static void verify();
|
||||
static void print_creation(outputStream* out, Handle loader, ClassLoaderData* cld, TRAPS);
|
||||
|
||||
static bool unload_list_contains(const void* x);
|
||||
|
||||
@ -181,23 +180,9 @@ class ClassLoaderDataGraph : public AllStatic {
|
||||
|
||||
class ClassLoaderData : public CHeapObj<mtClass> {
|
||||
friend class VMStructs;
|
||||
private:
|
||||
class Dependencies VALUE_OBJ_CLASS_SPEC {
|
||||
objArrayOop _list_head;
|
||||
void locked_add(objArrayHandle last,
|
||||
objArrayHandle new_dependency,
|
||||
Thread* THREAD);
|
||||
public:
|
||||
Dependencies() : _list_head(NULL) {}
|
||||
Dependencies(TRAPS) : _list_head(NULL) {
|
||||
init(CHECK);
|
||||
}
|
||||
void add(Handle dependency, TRAPS);
|
||||
void init(TRAPS);
|
||||
void oops_do(OopClosure* f);
|
||||
};
|
||||
|
||||
class ChunkedHandleList VALUE_OBJ_CLASS_SPEC {
|
||||
private:
|
||||
class ChunkedHandleList {
|
||||
struct Chunk : public CHeapObj<mtClass> {
|
||||
static const size_t CAPACITY = 32;
|
||||
|
||||
@ -219,10 +204,10 @@ class ClassLoaderData : public CHeapObj<mtClass> {
|
||||
// Only one thread at a time can add, guarded by ClassLoaderData::metaspace_lock().
|
||||
// However, multiple threads can execute oops_do concurrently with add.
|
||||
oop* add(oop o);
|
||||
#ifdef ASSERT
|
||||
bool contains(oop* p);
|
||||
#endif
|
||||
bool contains(oop p);
|
||||
void oops_do(OopClosure* f);
|
||||
|
||||
int count() const;
|
||||
};
|
||||
|
||||
friend class ClassLoaderDataGraph;
|
||||
@ -237,8 +222,6 @@ class ClassLoaderData : public CHeapObj<mtClass> {
|
||||
|
||||
oop _class_loader; // oop used to uniquely identify a class loader
|
||||
// class loader or a canonical class path
|
||||
Dependencies _dependencies; // holds dependencies from this class loader
|
||||
// data to others.
|
||||
|
||||
Metaspace * volatile _metaspace; // Meta-space where meta-data defined by the
|
||||
// classes in the class loader are allocated.
|
||||
@ -261,6 +244,8 @@ class ClassLoaderData : public CHeapObj<mtClass> {
|
||||
ChunkedHandleList _handles; // Handles to constant pool arrays, Modules, etc, which
|
||||
// have the same life cycle of the corresponding ClassLoader.
|
||||
|
||||
NOT_PRODUCT(volatile int _dependency_count;) // number of class loader dependencies
|
||||
|
||||
Klass* volatile _klasses; // The classes defined by the class loader.
|
||||
PackageEntryTable* volatile _packages; // The packages defined by the class loader.
|
||||
ModuleEntryTable* volatile _modules; // The modules defined by the class loader.
|
||||
@ -289,7 +274,7 @@ class ClassLoaderData : public CHeapObj<mtClass> {
|
||||
void set_next(ClassLoaderData* next) { _next = next; }
|
||||
ClassLoaderData* next() const { return _next; }
|
||||
|
||||
ClassLoaderData(Handle h_class_loader, bool is_anonymous, Dependencies dependencies);
|
||||
ClassLoaderData(Handle h_class_loader, bool is_anonymous);
|
||||
~ClassLoaderData();
|
||||
|
||||
// The CLD are not placed in the Heap, so the Card Table or
|
||||
@ -341,20 +326,18 @@ class ClassLoaderData : public CHeapObj<mtClass> {
|
||||
|
||||
bool is_anonymous() const { return _is_anonymous; }
|
||||
|
||||
static void init_null_class_loader_data() {
|
||||
assert(_the_null_class_loader_data == NULL, "cannot initialize twice");
|
||||
assert(ClassLoaderDataGraph::_head == NULL, "cannot initialize twice");
|
||||
|
||||
// We explicitly initialize the Dependencies object at a later phase in the initialization
|
||||
_the_null_class_loader_data = new ClassLoaderData(Handle(), false, Dependencies());
|
||||
ClassLoaderDataGraph::_head = _the_null_class_loader_data;
|
||||
assert(_the_null_class_loader_data->is_the_null_class_loader_data(), "Must be");
|
||||
}
|
||||
static void init_null_class_loader_data();
|
||||
|
||||
bool is_the_null_class_loader_data() const {
|
||||
return this == _the_null_class_loader_data;
|
||||
}
|
||||
|
||||
// Returns true if this class loader data is for the system class loader.
|
||||
// (Note that the class loader data may be anonymous.)
|
||||
bool is_system_class_loader_data() const;
|
||||
|
||||
// Returns true if this class loader data is for the platform class loader.
|
||||
// (Note that the class loader data may be anonymous.)
|
||||
bool is_platform_class_loader_data() const;
|
||||
|
||||
// Returns true if this class loader data is for the boot class loader.
|
||||
@ -397,12 +380,11 @@ class ClassLoaderData : public CHeapObj<mtClass> {
|
||||
void set_jmethod_ids(JNIMethodBlock* new_block) { _jmethod_ids = new_block; }
|
||||
|
||||
void print() { print_on(tty); }
|
||||
void print_on(outputStream* out) const;
|
||||
void print_on(outputStream* out) const PRODUCT_RETURN;
|
||||
void print_value() { print_value_on(tty); }
|
||||
void print_value_on(outputStream* out) const;
|
||||
void dump(outputStream * const out) PRODUCT_RETURN;
|
||||
void verify();
|
||||
const char* loader_name();
|
||||
const char* loader_name() const;
|
||||
|
||||
OopHandle add_handle(Handle h);
|
||||
void remove_handle(OopHandle h);
|
||||
@ -410,8 +392,7 @@ class ClassLoaderData : public CHeapObj<mtClass> {
|
||||
void add_class(Klass* k, bool publicize = true);
|
||||
void remove_class(Klass* k);
|
||||
bool contains_klass(Klass* k);
|
||||
void record_dependency(const Klass* to, TRAPS);
|
||||
void init_dependencies(TRAPS);
|
||||
void record_dependency(const Klass* to);
|
||||
PackageEntryTable* packages() { return _packages; }
|
||||
ModuleEntry* unnamed_module() { return _unnamed_module; }
|
||||
ModuleEntryTable* modules();
|
||||
@ -424,8 +405,7 @@ class ClassLoaderData : public CHeapObj<mtClass> {
|
||||
|
||||
static ClassLoaderData* class_loader_data(oop loader);
|
||||
static ClassLoaderData* class_loader_data_or_null(oop loader);
|
||||
static ClassLoaderData* anonymous_class_loader_data(oop loader, TRAPS);
|
||||
static void print_loader(ClassLoaderData *loader_data, outputStream *out);
|
||||
static ClassLoaderData* anonymous_class_loader_data(Handle loader);
|
||||
|
||||
TRACE_DEFINE_TRACE_ID_METHODS;
|
||||
};
|
||||
|
@ -43,7 +43,7 @@ inline ClassLoaderData* ClassLoaderData::class_loader_data(oop loader) {
|
||||
}
|
||||
|
||||
|
||||
inline ClassLoaderData *ClassLoaderDataGraph::find_or_create(Handle loader, TRAPS) {
|
||||
inline ClassLoaderData *ClassLoaderDataGraph::find_or_create(Handle loader) {
|
||||
guarantee(loader() != NULL && oopDesc::is_oop(loader()), "Loader must be oop");
|
||||
// Gets the class loader data out of the java/lang/ClassLoader object, if non-null
|
||||
// it's already in the loader_data, so no need to add
|
||||
@ -51,7 +51,7 @@ inline ClassLoaderData *ClassLoaderDataGraph::find_or_create(Handle loader, TRAP
|
||||
if (loader_data) {
|
||||
return loader_data;
|
||||
}
|
||||
return ClassLoaderDataGraph::add(loader, false, THREAD);
|
||||
return ClassLoaderDataGraph::add(loader, false);
|
||||
}
|
||||
|
||||
size_t ClassLoaderDataGraph::num_instance_classes() {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -35,7 +35,7 @@ class SimpleCompactHashtable;
|
||||
class SerializeClosure;
|
||||
|
||||
// Stats for symbol tables in the CDS archive
|
||||
class CompactHashtableStats VALUE_OBJ_CLASS_SPEC {
|
||||
class CompactHashtableStats {
|
||||
public:
|
||||
int hashentry_count;
|
||||
int hashentry_bytes;
|
||||
@ -71,7 +71,7 @@ public:
|
||||
//
|
||||
class CompactHashtableWriter: public StackObj {
|
||||
public:
|
||||
class Entry VALUE_OBJ_CLASS_SPEC {
|
||||
class Entry {
|
||||
unsigned int _hash;
|
||||
u4 _value;
|
||||
|
||||
@ -194,7 +194,7 @@ public:
|
||||
// See CompactHashtableWriter::dump() for how the table is written at CDS
|
||||
// dump time.
|
||||
//
|
||||
class SimpleCompactHashtable VALUE_OBJ_CLASS_SPEC {
|
||||
class SimpleCompactHashtable {
|
||||
protected:
|
||||
address _base_address;
|
||||
u4 _bucket_count;
|
||||
@ -281,7 +281,7 @@ public:
|
||||
// Because the dump file may be big (hundred of MB in extreme cases),
|
||||
// we use mmap for fast access when reading it.
|
||||
//
|
||||
class HashtableTextDump VALUE_OBJ_CLASS_SPEC {
|
||||
class HashtableTextDump {
|
||||
int _fd;
|
||||
const char* _base;
|
||||
const char* _p;
|
||||
|
@ -605,13 +605,16 @@ void Dictionary::print_on(outputStream* st) const {
|
||||
Klass* e = probe->instance_klass();
|
||||
bool is_defining_class =
|
||||
(loader_data() == e->class_loader_data());
|
||||
st->print("%4d: %s%s, loader ", index, is_defining_class ? " " : "^", e->external_name());
|
||||
ClassLoaderData* loader_data = e->class_loader_data();
|
||||
if (loader_data == NULL) {
|
||||
st->print("%4d: %s%s", index, is_defining_class ? " " : "^", e->external_name());
|
||||
ClassLoaderData* cld = e->class_loader_data();
|
||||
if (cld == NULL) {
|
||||
// Shared class not restored yet in shared dictionary
|
||||
st->print("<shared, not restored>");
|
||||
} else {
|
||||
loader_data->print_value_on(st);
|
||||
st->print(", loader data <shared, not restored>");
|
||||
} else if (!loader_data()->is_the_null_class_loader_data()) {
|
||||
// Class loader output for the dictionary for the null class loader data is
|
||||
// redundant and obvious.
|
||||
st->print(", ");
|
||||
cld->print_value_on(st);
|
||||
}
|
||||
st->cr();
|
||||
}
|
||||
|
@ -38,7 +38,7 @@
|
||||
#include "memory/oopFactory.hpp"
|
||||
#include "memory/metaspaceShared.hpp"
|
||||
#include "memory/resourceArea.hpp"
|
||||
#include "memory/universe.inline.hpp"
|
||||
#include "memory/universe.hpp"
|
||||
#include "oops/fieldStreams.hpp"
|
||||
#include "oops/instanceKlass.hpp"
|
||||
#include "oops/instanceMirrorKlass.hpp"
|
||||
@ -689,10 +689,10 @@ bool java_lang_String::equals(oop str1, oop str2) {
|
||||
assert(str2->klass() == SystemDictionary::String_klass(),
|
||||
"must be java String");
|
||||
typeArrayOop value1 = java_lang_String::value_no_keepalive(str1);
|
||||
int length1 = java_lang_String::length(value1);
|
||||
int length1 = java_lang_String::length(str1);
|
||||
bool is_latin1 = java_lang_String::is_latin1(str1);
|
||||
typeArrayOop value2 = java_lang_String::value_no_keepalive(str2);
|
||||
int length2 = java_lang_String::length(value2);
|
||||
int length2 = java_lang_String::length(str2);
|
||||
bool is_latin2 = java_lang_String::is_latin1(str2);
|
||||
|
||||
if ((length1 != length2) || (is_latin1 != is_latin2)) {
|
||||
@ -3300,7 +3300,7 @@ void java_lang_Module::set_name(oop module, oop value) {
|
||||
module->obj_field_put(name_offset, value);
|
||||
}
|
||||
|
||||
ModuleEntry* java_lang_Module::module_entry(oop module, TRAPS) {
|
||||
ModuleEntry* java_lang_Module::module_entry(oop module) {
|
||||
assert(_module_entry_offset != -1, "Uninitialized module_entry_offset");
|
||||
assert(module != NULL, "module can't be null");
|
||||
assert(oopDesc::is_oop(module), "module must be oop");
|
||||
@ -3310,8 +3310,8 @@ ModuleEntry* java_lang_Module::module_entry(oop module, TRAPS) {
|
||||
// If the inject field containing the ModuleEntry* is null then return the
|
||||
// class loader's unnamed module.
|
||||
oop loader = java_lang_Module::loader(module);
|
||||
Handle h_loader = Handle(THREAD, loader);
|
||||
ClassLoaderData* loader_cld = SystemDictionary::register_loader(h_loader, CHECK_NULL);
|
||||
Handle h_loader = Handle(Thread::current(), loader);
|
||||
ClassLoaderData* loader_cld = SystemDictionary::register_loader(h_loader);
|
||||
return loader_cld->unnamed_module();
|
||||
}
|
||||
return module_entry;
|
||||
|
@ -798,7 +798,7 @@ class java_lang_Module {
|
||||
static oop name(oop module);
|
||||
static void set_name(oop module, oop value);
|
||||
|
||||
static ModuleEntry* module_entry(oop module, TRAPS);
|
||||
static ModuleEntry* module_entry(oop module);
|
||||
static void set_module_entry(oop module, ModuleEntry* module_entry);
|
||||
|
||||
friend class JavaClasses;
|
||||
|
@ -85,27 +85,27 @@ static const char* get_module_version(jstring version) {
|
||||
return java_lang_String::as_utf8_string(JNIHandles::resolve_non_null(version));
|
||||
}
|
||||
|
||||
static ModuleEntryTable* get_module_entry_table(Handle h_loader, TRAPS) {
|
||||
static ModuleEntryTable* get_module_entry_table(Handle h_loader) {
|
||||
// This code can be called during start-up, before the classLoader's classLoader data got
|
||||
// created. So, call register_loader() to make sure the classLoader data gets created.
|
||||
ClassLoaderData *loader_cld = SystemDictionary::register_loader(h_loader, CHECK_NULL);
|
||||
ClassLoaderData *loader_cld = SystemDictionary::register_loader(h_loader);
|
||||
return loader_cld->modules();
|
||||
}
|
||||
|
||||
static PackageEntryTable* get_package_entry_table(Handle h_loader, TRAPS) {
|
||||
static PackageEntryTable* get_package_entry_table(Handle h_loader) {
|
||||
// This code can be called during start-up, before the classLoader's classLoader data got
|
||||
// created. So, call register_loader() to make sure the classLoader data gets created.
|
||||
ClassLoaderData *loader_cld = SystemDictionary::register_loader(h_loader, CHECK_NULL);
|
||||
ClassLoaderData *loader_cld = SystemDictionary::register_loader(h_loader);
|
||||
return loader_cld->packages();
|
||||
}
|
||||
|
||||
static ModuleEntry* get_module_entry(jobject module, TRAPS) {
|
||||
Handle module_h(THREAD, JNIHandles::resolve(module));
|
||||
if (!java_lang_Module::is_instance(module_h())) {
|
||||
oop m = JNIHandles::resolve(module);
|
||||
if (!java_lang_Module::is_instance(m)) {
|
||||
THROW_MSG_NULL(vmSymbols::java_lang_IllegalArgumentException(),
|
||||
"module is not an instance of type java.lang.Module");
|
||||
}
|
||||
return java_lang_Module::module_entry(module_h(), CHECK_NULL);
|
||||
return java_lang_Module::module_entry(m);
|
||||
}
|
||||
|
||||
static PackageEntry* get_package_entry(ModuleEntry* module_entry, const char* package_name, TRAPS) {
|
||||
@ -124,7 +124,7 @@ static PackageEntry* get_package_entry_by_name(Symbol* package,
|
||||
ResourceMark rm(THREAD);
|
||||
if (Modules::verify_package_name(package->as_C_string())) {
|
||||
PackageEntryTable* const package_entry_table =
|
||||
get_package_entry_table(h_loader, CHECK_NULL);
|
||||
get_package_entry_table(h_loader);
|
||||
assert(package_entry_table != NULL, "Unexpected null package entry table");
|
||||
return package_entry_table->lookup_only(package);
|
||||
}
|
||||
@ -186,7 +186,7 @@ static void define_javabase_module(jobject module, jstring version,
|
||||
Handle h_loader(THREAD, loader);
|
||||
|
||||
// Ensure the boot loader's PackageEntryTable has been created
|
||||
PackageEntryTable* package_table = get_package_entry_table(h_loader, CHECK);
|
||||
PackageEntryTable* package_table = get_package_entry_table(h_loader);
|
||||
assert(pkg_list->length() == 0 || package_table != NULL, "Bad package_table");
|
||||
|
||||
// Ensure java.base's ModuleEntry has been created
|
||||
@ -346,7 +346,7 @@ void Modules::define_module(jobject module, jboolean is_open, jstring version,
|
||||
pkg_list->append(pkg_symbol);
|
||||
}
|
||||
|
||||
ModuleEntryTable* module_table = get_module_entry_table(h_loader, CHECK);
|
||||
ModuleEntryTable* module_table = get_module_entry_table(h_loader);
|
||||
assert(module_table != NULL, "module entry table shouldn't be null");
|
||||
|
||||
// Create symbol* entry for module name.
|
||||
@ -382,7 +382,7 @@ void Modules::define_module(jobject module, jboolean is_open, jstring version,
|
||||
MutexLocker ml(Module_lock, THREAD);
|
||||
|
||||
if (num_packages > 0) {
|
||||
package_table = get_package_entry_table(h_loader, CHECK);
|
||||
package_table = get_package_entry_table(h_loader);
|
||||
assert(package_table != NULL, "Missing package_table");
|
||||
|
||||
// Check that none of the packages exist in the class loader's package table.
|
||||
|
@ -150,9 +150,9 @@ void SystemDictionary::compute_java_loaders(TRAPS) {
|
||||
CDS_ONLY(SystemDictionaryShared::initialize(CHECK);)
|
||||
}
|
||||
|
||||
ClassLoaderData* SystemDictionary::register_loader(Handle class_loader, TRAPS) {
|
||||
ClassLoaderData* SystemDictionary::register_loader(Handle class_loader) {
|
||||
if (class_loader() == NULL) return ClassLoaderData::the_null_class_loader_data();
|
||||
return ClassLoaderDataGraph::find_or_create(class_loader, THREAD);
|
||||
return ClassLoaderDataGraph::find_or_create(class_loader);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
@ -664,7 +664,7 @@ Klass* SystemDictionary::resolve_instance_class_or_null(Symbol* name,
|
||||
|
||||
// Fix for 4474172; see evaluation for more details
|
||||
class_loader = Handle(THREAD, java_lang_ClassLoader::non_reflection_class_loader(class_loader()));
|
||||
ClassLoaderData *loader_data = register_loader(class_loader, CHECK_NULL);
|
||||
ClassLoaderData* loader_data = register_loader(class_loader);
|
||||
Dictionary* dictionary = loader_data->dictionary();
|
||||
unsigned int d_hash = dictionary->compute_hash(name);
|
||||
|
||||
@ -989,7 +989,7 @@ InstanceKlass* SystemDictionary::parse_stream(Symbol* class_name,
|
||||
// Create a new CLD for anonymous class, that uses the same class loader
|
||||
// as the host_klass
|
||||
guarantee(host_klass->class_loader() == class_loader(), "should be the same");
|
||||
loader_data = ClassLoaderData::anonymous_class_loader_data(class_loader(), CHECK_NULL);
|
||||
loader_data = ClassLoaderData::anonymous_class_loader_data(class_loader);
|
||||
} else {
|
||||
loader_data = ClassLoaderData::class_loader_data(class_loader());
|
||||
}
|
||||
@ -1067,7 +1067,7 @@ InstanceKlass* SystemDictionary::resolve_from_stream(Symbol* class_name,
|
||||
DoObjectLock = false;
|
||||
}
|
||||
|
||||
ClassLoaderData* loader_data = register_loader(class_loader, CHECK_NULL);
|
||||
ClassLoaderData* loader_data = register_loader(class_loader);
|
||||
|
||||
// Make sure we are synchronized on the class loader before we proceed
|
||||
Handle lockObject = compute_loader_lock_object(class_loader, THREAD);
|
||||
@ -2505,11 +2505,10 @@ static methodHandle unpack_method_and_appendix(Handle mname,
|
||||
}
|
||||
(*appendix_result) = Handle(THREAD, appendix);
|
||||
// the target is stored in the cpCache and if a reference to this
|
||||
// MethodName is dropped we need a way to make sure the
|
||||
// MemberName is dropped we need a way to make sure the
|
||||
// class_loader containing this method is kept alive.
|
||||
// FIXME: the appendix might also preserve this dependency.
|
||||
ClassLoaderData* this_key = accessing_klass->class_loader_data();
|
||||
this_key->record_dependency(m->method_holder(), CHECK_NULL); // Can throw OOM
|
||||
this_key->record_dependency(m->method_holder());
|
||||
return methodHandle(THREAD, m);
|
||||
}
|
||||
}
|
||||
@ -3044,6 +3043,9 @@ class CombineDictionariesClosure : public CLDClosure {
|
||||
_master_dictionary(master_dictionary) {}
|
||||
void do_cld(ClassLoaderData* cld) {
|
||||
ResourceMark rm;
|
||||
if (cld->is_anonymous()) {
|
||||
return;
|
||||
}
|
||||
if (cld->is_system_class_loader_data() || cld->is_platform_class_loader_data()) {
|
||||
for (int i = 0; i < cld->dictionary()->table_size(); ++i) {
|
||||
Dictionary* curr_dictionary = cld->dictionary();
|
||||
|
@ -493,7 +493,7 @@ public:
|
||||
static void compute_java_loaders(TRAPS);
|
||||
|
||||
// Register a new class loader
|
||||
static ClassLoaderData* register_loader(Handle class_loader, TRAPS);
|
||||
static ClassLoaderData* register_loader(Handle class_loader);
|
||||
protected:
|
||||
// Mirrors for primitive classes (created eagerly)
|
||||
static oop check_mirror(oop m) {
|
||||
|
@ -497,7 +497,7 @@ InstanceKlass* SystemDictionaryShared::find_or_load_shared_class(
|
||||
// Fix for 4474172; see evaluation for more details
|
||||
class_loader = Handle(
|
||||
THREAD, java_lang_ClassLoader::non_reflection_class_loader(class_loader()));
|
||||
ClassLoaderData *loader_data = register_loader(class_loader, CHECK_NULL);
|
||||
ClassLoaderData *loader_data = register_loader(class_loader);
|
||||
Dictionary* dictionary = loader_data->dictionary();
|
||||
|
||||
unsigned int d_hash = dictionary->compute_hash(name);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -49,7 +49,7 @@ enum {
|
||||
|
||||
class ClassVerifier;
|
||||
|
||||
class VerificationType VALUE_OBJ_CLASS_SPEC {
|
||||
class VerificationType {
|
||||
private:
|
||||
// Least significant bits of _handle are always 0, so we use these as
|
||||
// the indicator that the _handle is valid. Otherwise, the _data field
|
||||
|
@ -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.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -96,7 +96,7 @@ class StackMapTable;
|
||||
#define CHECK_VERIFY_(verifier, result) \
|
||||
CHECK_(result)); if ((verifier)->has_error()) return (result); ((void)0
|
||||
|
||||
class TypeOrigin VALUE_OBJ_CLASS_SPEC {
|
||||
class TypeOrigin {
|
||||
private:
|
||||
typedef enum {
|
||||
CF_LOCALS, // Comes from the current frame locals
|
||||
@ -146,7 +146,7 @@ class TypeOrigin VALUE_OBJ_CLASS_SPEC {
|
||||
#endif
|
||||
};
|
||||
|
||||
class ErrorContext VALUE_OBJ_CLASS_SPEC {
|
||||
class ErrorContext {
|
||||
private:
|
||||
typedef enum {
|
||||
INVALID_BYTECODE, // There was a problem with the bytecode
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -26,6 +26,7 @@
|
||||
#include "jvm.h"
|
||||
#include "classfile/vmSymbols.hpp"
|
||||
#include "compiler/compilerDirectives.hpp"
|
||||
#include "memory/allocation.inline.hpp"
|
||||
#include "memory/oopFactory.hpp"
|
||||
#include "memory/metaspaceClosure.hpp"
|
||||
#include "oops/oop.inline.hpp"
|
||||
|
@ -37,6 +37,7 @@
|
||||
#include "oops/method.inline.hpp"
|
||||
#include "oops/oop.inline.hpp"
|
||||
#include "oops/symbol.hpp"
|
||||
#include "runtime/handles.inline.hpp"
|
||||
#include "runtime/icache.hpp"
|
||||
#include "runtime/sharedRuntime.hpp"
|
||||
#include "runtime/stubRoutines.hpp"
|
||||
|
@ -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.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -32,7 +32,7 @@
|
||||
#include "interpreter/interpreter.hpp"
|
||||
#include "interpreter/linkResolver.hpp"
|
||||
#include "memory/resourceArea.hpp"
|
||||
#include "memory/universe.inline.hpp"
|
||||
#include "memory/universe.hpp"
|
||||
#include "oops/method.hpp"
|
||||
#include "oops/oop.inline.hpp"
|
||||
#include "runtime/mutexLocker.hpp"
|
||||
|
@ -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.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -28,6 +28,7 @@
|
||||
#include "compiler/abstractCompiler.hpp"
|
||||
#include "compiler/compilerDirectives.hpp"
|
||||
#include "compiler/compilerOracle.hpp"
|
||||
#include "memory/allocation.inline.hpp"
|
||||
#include "memory/resourceArea.hpp"
|
||||
|
||||
CompilerDirectives::CompilerDirectives() :_match(NULL), _next(NULL), _ref_count(0) {
|
||||
|
@ -36,7 +36,7 @@
|
||||
#include "logging/logStream.hpp"
|
||||
#include "memory/allocation.inline.hpp"
|
||||
#include "memory/resourceArea.hpp"
|
||||
#include "memory/universe.inline.hpp"
|
||||
#include "memory/universe.hpp"
|
||||
#include "oops/oop.inline.hpp"
|
||||
#include "runtime/globals.hpp"
|
||||
#include "runtime/handles.inline.hpp"
|
||||
|
@ -38,6 +38,7 @@
|
||||
#include "gc/shared/suspendibleThreadSet.hpp"
|
||||
#include "logging/log.hpp"
|
||||
#include "memory/resourceArea.hpp"
|
||||
#include "runtime/handles.inline.hpp"
|
||||
#include "runtime/vmThread.hpp"
|
||||
#include "utilities/debug.hpp"
|
||||
|
||||
|
@ -81,6 +81,7 @@
|
||||
#include "oops/oop.inline.hpp"
|
||||
#include "prims/resolvedMethodTable.hpp"
|
||||
#include "runtime/atomic.hpp"
|
||||
#include "runtime/handles.inline.hpp"
|
||||
#include "runtime/init.hpp"
|
||||
#include "runtime/orderAccess.inline.hpp"
|
||||
#include "runtime/threadSMR.hpp"
|
||||
|
@ -43,6 +43,7 @@
|
||||
#include "gc/shared/weakProcessor.hpp"
|
||||
#include "logging/log.hpp"
|
||||
#include "runtime/biasedLocking.hpp"
|
||||
#include "runtime/handles.inline.hpp"
|
||||
#include "utilities/debug.hpp"
|
||||
|
||||
static void clear_and_activate_derived_pointers() {
|
||||
|
@ -39,6 +39,7 @@
|
||||
#include "logging/logStream.hpp"
|
||||
#include "memory/resourceArea.hpp"
|
||||
#include "oops/oop.inline.hpp"
|
||||
#include "runtime/handles.inline.hpp"
|
||||
|
||||
class VerifyRootsClosure: public OopClosure {
|
||||
private:
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2006, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2006, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -26,6 +26,7 @@
|
||||
#include "gc/parallel/mutableNUMASpace.hpp"
|
||||
#include "gc/shared/collectedHeap.hpp"
|
||||
#include "gc/shared/spaceDecorator.hpp"
|
||||
#include "memory/allocation.inline.hpp"
|
||||
#include "oops/oop.inline.hpp"
|
||||
#include "runtime/atomic.hpp"
|
||||
#include "runtime/thread.inline.hpp"
|
||||
|
@ -51,6 +51,7 @@
|
||||
#include "logging/log.hpp"
|
||||
#include "oops/oop.inline.hpp"
|
||||
#include "runtime/biasedLocking.hpp"
|
||||
#include "runtime/handles.inline.hpp"
|
||||
#include "runtime/safepoint.hpp"
|
||||
#include "runtime/vmThread.hpp"
|
||||
#include "services/management.hpp"
|
||||
|
@ -61,6 +61,7 @@
|
||||
#include "oops/objArrayKlass.inline.hpp"
|
||||
#include "oops/oop.inline.hpp"
|
||||
#include "runtime/atomic.hpp"
|
||||
#include "runtime/handles.inline.hpp"
|
||||
#include "runtime/safepoint.hpp"
|
||||
#include "runtime/vmThread.hpp"
|
||||
#include "services/management.hpp"
|
||||
|
@ -39,6 +39,7 @@
|
||||
#include "memory/resourceArea.hpp"
|
||||
#include "oops/instanceMirrorKlass.hpp"
|
||||
#include "oops/oop.inline.hpp"
|
||||
#include "runtime/handles.inline.hpp"
|
||||
#include "runtime/init.hpp"
|
||||
#include "runtime/thread.inline.hpp"
|
||||
#include "runtime/threadSMR.hpp"
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2015, 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.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -25,6 +25,8 @@
|
||||
#ifndef SHARE_VM_GC_SHARED_REFERENCEPOLICY_HPP
|
||||
#define SHARE_VM_GC_SHARED_REFERENCEPOLICY_HPP
|
||||
|
||||
#include "oops/oopsHierarchy.hpp"
|
||||
|
||||
// referencePolicy is used to determine when soft reference objects
|
||||
// should be cleared.
|
||||
|
||||
|
@ -32,7 +32,7 @@
|
||||
#include "gc/shared/referencePolicy.hpp"
|
||||
#include "gc/shared/referenceProcessor.inline.hpp"
|
||||
#include "logging/log.hpp"
|
||||
#include "memory/allocation.hpp"
|
||||
#include "memory/allocation.inline.hpp"
|
||||
#include "memory/resourceArea.hpp"
|
||||
#include "oops/access.inline.hpp"
|
||||
#include "oops/oop.inline.hpp"
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -26,8 +26,10 @@
|
||||
#include "gc/shared/gcTimer.hpp"
|
||||
#include "gc/shared/referenceProcessorPhaseTimes.hpp"
|
||||
#include "gc/shared/referenceProcessor.inline.hpp"
|
||||
#include "gc/shared/workerDataArray.inline.hpp"
|
||||
#include "logging/log.hpp"
|
||||
#include "logging/logStream.hpp"
|
||||
#include "memory/allocation.inline.hpp"
|
||||
|
||||
RefProcWorkerTimeTracker::RefProcWorkerTimeTracker(ReferenceProcessorPhaseTimes::RefProcPhaseNumbers number,
|
||||
ReferenceProcessorPhaseTimes* phase_times,
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -26,7 +26,7 @@
|
||||
#define SHARE_VM_GC_SHARED_REFERENCEPROCESSORPHASETIMES_HPP
|
||||
|
||||
#include "gc/shared/referenceProcessorStats.hpp"
|
||||
#include "gc/shared/workerDataArray.inline.hpp"
|
||||
#include "gc/shared/workerDataArray.hpp"
|
||||
#include "memory/referenceType.hpp"
|
||||
#include "utilities/ticks.hpp"
|
||||
|
||||
|
@ -33,7 +33,7 @@
|
||||
#include "gc/shared/space.hpp"
|
||||
#include "gc/shared/space.inline.hpp"
|
||||
#include "gc/shared/spaceDecorator.hpp"
|
||||
#include "memory/universe.inline.hpp"
|
||||
#include "memory/universe.hpp"
|
||||
#include "oops/oop.inline.hpp"
|
||||
#include "runtime/atomic.hpp"
|
||||
#include "runtime/java.hpp"
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -27,7 +27,7 @@
|
||||
#include "gc/shared/threadLocalAllocBuffer.inline.hpp"
|
||||
#include "logging/log.hpp"
|
||||
#include "memory/resourceArea.hpp"
|
||||
#include "memory/universe.inline.hpp"
|
||||
#include "memory/universe.hpp"
|
||||
#include "oops/oop.inline.hpp"
|
||||
#include "runtime/thread.inline.hpp"
|
||||
#include "runtime/threadSMR.hpp"
|
||||
|
@ -129,7 +129,7 @@ class Bytecode: public StackObj {
|
||||
|
||||
|
||||
// Abstractions for lookupswitch bytecode
|
||||
class LookupswitchPair VALUE_OBJ_CLASS_SPEC {
|
||||
class LookupswitchPair {
|
||||
private:
|
||||
const address _bcp;
|
||||
|
||||
|
@ -37,7 +37,7 @@
|
||||
#include "logging/log.hpp"
|
||||
#include "memory/oopFactory.hpp"
|
||||
#include "memory/resourceArea.hpp"
|
||||
#include "memory/universe.inline.hpp"
|
||||
#include "memory/universe.hpp"
|
||||
#include "oops/constantPool.hpp"
|
||||
#include "oops/cpCache.inline.hpp"
|
||||
#include "oops/instanceKlass.hpp"
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -38,7 +38,7 @@
|
||||
// more significant bits. The counter is incremented before a method is activated and an
|
||||
// action is triggered when count() > limit().
|
||||
|
||||
class InvocationCounter VALUE_OBJ_CLASS_SPEC {
|
||||
class InvocationCounter {
|
||||
friend class VMStructs;
|
||||
friend class JVMCIVMStructs;
|
||||
friend class ciReplay;
|
||||
|
@ -38,7 +38,7 @@
|
||||
#include "logging/log.hpp"
|
||||
#include "logging/logStream.hpp"
|
||||
#include "memory/resourceArea.hpp"
|
||||
#include "memory/universe.inline.hpp"
|
||||
#include "memory/universe.hpp"
|
||||
#include "oops/cpCache.inline.hpp"
|
||||
#include "oops/instanceKlass.hpp"
|
||||
#include "oops/method.hpp"
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -40,7 +40,7 @@ class InterpreterCodelet;
|
||||
// A little wrapper class to group tosca-specific entry points into a unit.
|
||||
// (tosca = Top-Of-Stack CAche)
|
||||
|
||||
class EntryPoint VALUE_OBJ_CLASS_SPEC {
|
||||
class EntryPoint {
|
||||
private:
|
||||
address _entry[number_of_states];
|
||||
|
||||
@ -62,7 +62,7 @@ class EntryPoint VALUE_OBJ_CLASS_SPEC {
|
||||
//------------------------------------------------------------------------------------------------------------------------
|
||||
// A little wrapper class to group tosca-specific dispatch tables into a unit.
|
||||
|
||||
class DispatchTable VALUE_OBJ_CLASS_SPEC {
|
||||
class DispatchTable {
|
||||
public:
|
||||
enum { length = 1 << BitsPerByte }; // an entry point for each byte value (also for undefined bytecodes)
|
||||
|
||||
|
@ -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.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -41,7 +41,7 @@ class InterpreterMacroAssembler;
|
||||
// A Template describes the properties of a code template for a given bytecode
|
||||
// and provides a generator to generate the code template.
|
||||
|
||||
class Template VALUE_OBJ_CLASS_SPEC {
|
||||
class Template {
|
||||
private:
|
||||
enum Flags {
|
||||
uses_bcp_bit, // set if template needs the bcp pointing to bytecode
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user