# HG changeset patch
# User rkennke
# Date 1508100843 -7200
# Sun Oct 15 22:54:03 2017 +0200
# Node ID 6a5da2a5ac23717019fe07f534ad0603af607867
# Parent 52cf482c4d28c0c7fc8daa912a93ce4f0532485c
8171853: Remove Shark compiler
diff --git a/doc/building.html b/doc/building.html
--- a/doc/building.html
+++ b/doc/building.html
@@ -463,7 +463,7 @@
--with-native-debug-symbols=<method>
- Specify if and how native debug symbols should be built. Available methods are none
, internal
, external
, zipped
. Default behavior depends on platform. See Native Debug Symbols for more details.
--with-version-string=<string>
- Specify the version string this build will be identified with.
--with-version-<part>=<value>
- A group of options, where <part>
can be any of pre
, opt
, build
, major
, minor
, security
or patch
. Use these options to modify just the corresponding part of the version string from the default, or the value provided by --with-version-string
.
---with-jvm-variants=<variant>[,<variant>...]
- Build the specified variant (or variants) of Hotspot. Valid variants are: server
, client
, minimal
, core
, zero
, zeroshark
, custom
. Note that not all variants are possible to combine in a single build.
+--with-jvm-variants=<variant>[,<variant>...]
- Build the specified variant (or variants) of Hotspot. Valid variants are: server
, client
, minimal
, core
, zero
, custom
. Note that not all variants are possible to combine in a single build.
--with-jvm-features=<feature>[,<feature>...]
- Use the specified JVM features when building Hotspot. The list of features will be enabled on top of the default list. For the custom
JVM variant, this default list is empty. A complete list of available JVM features can be found using bash configure --help
.
--with-target-bits=<bits>
- Create a target binary suitable for running on a <bits>
platform. Use this to create 32-bit output on a 64-bit build platform, instead of doing a full cross-compile. (This is known as a reduced build.)
diff --git a/doc/building.md b/doc/building.md
--- a/doc/building.md
+++ b/doc/building.md
@@ -668,7 +668,7 @@
from the default, or the value provided by `--with-version-string`.
* `--with-jvm-variants=[,...]` - Build the specified variant
(or variants) of Hotspot. Valid variants are: `server`, `client`,
- `minimal`, `core`, `zero`, `zeroshark`, `custom`. Note that not all
+ `minimal`, `core`, `zero`, `custom`. Note that not all
variants are possible to combine in a single build.
* `--with-jvm-features=[,...]` - Use the specified JVM
features when building Hotspot. The list of features will be enabled on top
diff --git a/make/autoconf/flags.m4 b/make/autoconf/flags.m4
--- a/make/autoconf/flags.m4
+++ b/make/autoconf/flags.m4
@@ -1097,7 +1097,7 @@
]
)
fi
- if ! HOTSPOT_CHECK_JVM_VARIANT(zero) && ! HOTSPOT_CHECK_JVM_VARIANT(zeroshark); then
+ if ! HOTSPOT_CHECK_JVM_VARIANT(zero); then
# Non-zero builds have stricter warnings
$2JVM_CFLAGS="[$]$2JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
else
diff --git a/make/autoconf/hotspot.m4 b/make/autoconf/hotspot.m4
--- a/make/autoconf/hotspot.m4
+++ b/make/autoconf/hotspot.m4
@@ -24,12 +24,12 @@
#
# All valid JVM features, regardless of platform
-VALID_JVM_FEATURES="compiler1 compiler2 zero shark minimal dtrace jvmti jvmci \
+VALID_JVM_FEATURES="compiler1 compiler2 zero minimal dtrace jvmti jvmci \
graal vm-structs jni-check services management all-gcs nmt cds \
static-build link-time-opt aot"
# All valid JVM variants
-VALID_JVM_VARIANTS="server client minimal core zero zeroshark custom"
+VALID_JVM_VARIANTS="server client minimal core zero custom"
###############################################################################
# Check if the specified JVM variant should be built. To be used in shell if
@@ -62,13 +62,12 @@
# minimal: reduced form of client with optional features stripped out
# core: normal interpreter only, no compiler
# zero: C++ based interpreter only, no compiler
-# zeroshark: C++ based interpreter, and a llvm-based compiler
# custom: baseline JVM with no default features
#
AC_DEFUN_ONCE([HOTSPOT_SETUP_JVM_VARIANTS],
[
AC_ARG_WITH([jvm-variants], [AS_HELP_STRING([--with-jvm-variants],
- [JVM variants (separated by commas) to build (server,client,minimal,core,zero,zeroshark,custom) @<:@server@:>@])])
+ [JVM variants (separated by commas) to build (server,client,minimal,core,zero,custom) @<:@server@:>@])])
SETUP_HOTSPOT_TARGET_CPU_PORT
@@ -132,7 +131,7 @@
AC_SUBST(VALID_JVM_VARIANTS)
AC_SUBST(JVM_VARIANT_MAIN)
- if HOTSPOT_CHECK_JVM_VARIANT(zero) || HOTSPOT_CHECK_JVM_VARIANT(zeroshark); then
+ if HOTSPOT_CHECK_JVM_VARIANT(zero); then
# zero behaves as a platform and rewrites these values. This is really weird. :(
# We are guaranteed that we do not build any other variants when building zero.
HOTSPOT_TARGET_CPU=zero
@@ -325,15 +324,9 @@
fi
fi
- if ! HOTSPOT_CHECK_JVM_VARIANT(zero) && ! HOTSPOT_CHECK_JVM_VARIANT(zeroshark); then
+ if ! HOTSPOT_CHECK_JVM_VARIANT(zero); then
if HOTSPOT_CHECK_JVM_FEATURE(zero); then
- AC_MSG_ERROR([To enable zero/zeroshark, you must use --with-jvm-variants=zero/zeroshark])
- fi
- fi
-
- if ! HOTSPOT_CHECK_JVM_VARIANT(zeroshark); then
- if HOTSPOT_CHECK_JVM_FEATURE(shark); then
- AC_MSG_ERROR([To enable shark, you must use --with-jvm-variants=zeroshark])
+ AC_MSG_ERROR([To enable zero, you must use --with-jvm-variants=zero])
fi
fi
@@ -408,7 +401,6 @@
JVM_FEATURES_core="$NON_MINIMAL_FEATURES $JVM_FEATURES"
JVM_FEATURES_minimal="compiler1 minimal $JVM_FEATURES $JVM_FEATURES_link_time_opt"
JVM_FEATURES_zero="zero $NON_MINIMAL_FEATURES $JVM_FEATURES"
- JVM_FEATURES_zeroshark="zero shark $NON_MINIMAL_FEATURES $JVM_FEATURES"
JVM_FEATURES_custom="$JVM_FEATURES"
AC_SUBST(JVM_FEATURES_server)
@@ -416,7 +408,6 @@
AC_SUBST(JVM_FEATURES_core)
AC_SUBST(JVM_FEATURES_minimal)
AC_SUBST(JVM_FEATURES_zero)
- AC_SUBST(JVM_FEATURES_zeroshark)
AC_SUBST(JVM_FEATURES_custom)
# Used for verification of Makefiles by check-jvm-feature
@@ -437,7 +428,6 @@
JVM_FEATURES_core="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_core | $SORT -u))"
JVM_FEATURES_minimal="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_minimal | $SORT -u))"
JVM_FEATURES_zero="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zero | $SORT -u))"
- JVM_FEATURES_zeroshark="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zeroshark | $SORT -u))"
JVM_FEATURES_custom="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_custom | $SORT -u))"
# Validate features
diff --git a/make/autoconf/jdk-options.m4 b/make/autoconf/jdk-options.m4
--- a/make/autoconf/jdk-options.m4
+++ b/make/autoconf/jdk-options.m4
@@ -232,7 +232,7 @@
# Should we build the serviceability agent (SA)?
INCLUDE_SA=true
- if HOTSPOT_CHECK_JVM_VARIANT(zero) || HOTSPOT_CHECK_JVM_VARIANT(zeroshark); then
+ if HOTSPOT_CHECK_JVM_VARIANT(zero); then
INCLUDE_SA=false
fi
if test "x$OPENJDK_TARGET_OS" = xaix ; then
diff --git a/make/autoconf/lib-std.m4 b/make/autoconf/lib-std.m4
--- a/make/autoconf/lib-std.m4
+++ b/make/autoconf/lib-std.m4
@@ -65,8 +65,7 @@
# If dynamic was requested, it's available since it would fail above otherwise.
# If dynamic wasn't requested, go with static unless it isn't available.
AC_MSG_CHECKING([how to link with libstdc++])
- if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno \
- || HOTSPOT_CHECK_JVM_VARIANT(zeroshark); then
+ if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno ; then
AC_MSG_RESULT([dynamic])
else
LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
diff --git a/make/autoconf/libraries.m4 b/make/autoconf/libraries.m4
--- a/make/autoconf/libraries.m4
+++ b/make/autoconf/libraries.m4
@@ -68,7 +68,7 @@
fi
# Check if ffi is needed
- if HOTSPOT_CHECK_JVM_VARIANT(zero) || HOTSPOT_CHECK_JVM_VARIANT(zeroshark); then
+ if HOTSPOT_CHECK_JVM_VARIANT(zero); then
NEEDS_LIB_FFI=true
else
NEEDS_LIB_FFI=false
@@ -86,70 +86,12 @@
LIB_SETUP_FREETYPE
LIB_SETUP_ALSA
LIB_SETUP_LIBFFI
- LIB_SETUP_LLVM
LIB_SETUP_BUNDLED_LIBS
LIB_SETUP_MISC_LIBS
LIB_SETUP_SOLARIS_STLPORT
])
################################################################################
-# Setup llvm (Low-Level VM)
-################################################################################
-AC_DEFUN_ONCE([LIB_SETUP_LLVM],
-[
- if HOTSPOT_CHECK_JVM_VARIANT(zeroshark); then
- AC_CHECK_PROG([LLVM_CONFIG], [llvm-config], [llvm-config])
-
- if test "x$LLVM_CONFIG" != xllvm-config; then
- AC_MSG_ERROR([llvm-config not found in $PATH.])
- fi
-
- llvm_components="jit mcjit engine nativecodegen native"
- unset LLVM_CFLAGS
- for flag in $("$LLVM_CONFIG" --cxxflags); do
- if echo "${flag}" | grep -q '^-@<:@ID@:>@'; then
- if test "${flag}" != "-D_DEBUG" ; then
- if test "${LLVM_CFLAGS}" != "" ; then
- LLVM_CFLAGS="${LLVM_CFLAGS} "
- fi
- LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
- fi
- fi
- done
- llvm_version=$("${LLVM_CONFIG}" --version | $SED 's/\.//; s/svn.*//')
- LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
-
- unset LLVM_LDFLAGS
- for flag in $("${LLVM_CONFIG}" --ldflags); do
- if echo "${flag}" | grep -q '^-L'; then
- if test "${LLVM_LDFLAGS}" != ""; then
- LLVM_LDFLAGS="${LLVM_LDFLAGS} "
- fi
- LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
- fi
- done
-
- unset LLVM_LIBS
- for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
- if echo "${flag}" | grep -q '^-l'; then
- if test "${LLVM_LIBS}" != ""; then
- LLVM_LIBS="${LLVM_LIBS} "
- fi
- LLVM_LIBS="${LLVM_LIBS}${flag}"
- fi
- done
-
- # Due to https://llvm.org/bugs/show_bug.cgi?id=16902, llvm does not
- # always properly detect -ltinfo
- LLVM_LIBS="${LLVM_LIBS} -ltinfo"
-
- AC_SUBST(LLVM_CFLAGS)
- AC_SUBST(LLVM_LDFLAGS)
- AC_SUBST(LLVM_LIBS)
- fi
-])
-
-################################################################################
# Setup various libraries, typically small system libraries
################################################################################
AC_DEFUN_ONCE([LIB_SETUP_MISC_LIBS],
diff --git a/make/autoconf/spec.gmk.in b/make/autoconf/spec.gmk.in
--- a/make/autoconf/spec.gmk.in
+++ b/make/autoconf/spec.gmk.in
@@ -222,7 +222,6 @@
JVM_FEATURES_core := @JVM_FEATURES_core@
JVM_FEATURES_minimal := @JVM_FEATURES_minimal@
JVM_FEATURES_zero := @JVM_FEATURES_zero@
-JVM_FEATURES_zeroshark := @JVM_FEATURES_zeroshark@
JVM_FEATURES_custom := @JVM_FEATURES_custom@
# Used for make-time verifications
@@ -396,11 +395,6 @@
JVM_LIBS := @JVM_LIBS@
JVM_RCFLAGS := @JVM_RCFLAGS@
-# Flags for zeroshark
-LLVM_CFLAGS := @LLVM_CFLAGS@
-LLVM_LIBS := @LLVM_LIBS@
-LLVM_LDFLAGS := @LLVM_LDFLAGS@
-
# These flags might contain variables set by a custom extension that is included later.
EXTRA_CFLAGS = @EXTRA_CFLAGS@
EXTRA_CXXFLAGS = @EXTRA_CXXFLAGS@
diff --git a/make/copy/Copy-java.base.gmk b/make/copy/Copy-java.base.gmk
--- a/make/copy/Copy-java.base.gmk
+++ b/make/copy/Copy-java.base.gmk
@@ -87,7 +87,7 @@
#
# How to install jvm.cfg.
#
-ifeq ($(call check-jvm-variant, zero zeroshark), true)
+ifeq ($(call check-jvm-variant, zero), true)
JVMCFG_ARCH := zero
else
JVMCFG_ARCH := $(OPENJDK_TARGET_CPU_LEGACY)
@@ -102,8 +102,6 @@
endif
JVMCFG := $(LIB_DST_DIR)/jvm.cfg
-# To do: should this also support -zeroshark?
-
ifeq ($(OPENJDK_TARGET_CPU_BITS), 64)
COPY_JVM_CFG_FILE := true
else
@@ -120,7 +118,7 @@
COPY_JVM_CFG_FILE := true
else
# For zero, the default jvm.cfg file is sufficient
- ifeq ($(call check-jvm-variant, zero zeroshark), true)
+ ifeq ($(call check-jvm-variant, zero), true)
COPY_JVM_CFG_FILE := true
endif
endif
diff --git a/make/hotspot/ide/CreateVSProject.gmk b/make/hotspot/ide/CreateVSProject.gmk
--- a/make/hotspot/ide/CreateVSProject.gmk
+++ b/make/hotspot/ide/CreateVSProject.gmk
@@ -75,7 +75,6 @@
-ignorePath linux \
-ignorePath posix \
-ignorePath ppc \
- -ignorePath shark \
-ignorePath solaris \
-ignorePath sparc \
-ignorePath x86_32 \
diff --git a/make/hotspot/lib/JvmFeatures.gmk b/make/hotspot/lib/JvmFeatures.gmk
--- a/make/hotspot/lib/JvmFeatures.gmk
+++ b/make/hotspot/lib/JvmFeatures.gmk
@@ -52,14 +52,6 @@
endif
endif
-ifeq ($(call check-jvm-feature, shark), true)
- JVM_CFLAGS_FEATURES += -DSHARK $(LLVM_CFLAGS)
- JVM_LDFLAGS_FEATURES += $(LLVM_LDFLAGS)
- JVM_LIBS_FEATURES += $(LLVM_LIBS)
-else
- JVM_EXCLUDES += shark
-endif
-
ifeq ($(call check-jvm-feature, minimal), true)
JVM_CFLAGS_FEATURES += -DMINIMAL_JVM -DVMTYPE=\"Minimal\"
ifeq ($(OPENJDK_TARGET_OS), linux)
diff --git a/make/lib/CoreLibraries.gmk b/make/lib/CoreLibraries.gmk
--- a/make/lib/CoreLibraries.gmk
+++ b/make/lib/CoreLibraries.gmk
@@ -300,7 +300,7 @@
LIBJLI_CFLAGS := $(CFLAGS_JDKLIB)
-ifeq ($(call check-jvm-variant, zero zeroshark), true)
+ifeq ($(call check-jvm-variant, zero), true)
ERGO_FAMILY := zero
else
ifeq ($(OPENJDK_TARGET_CPU_ARCH), x86)
diff --git a/src/hotspot/cpu/arm/sharedRuntime_arm.cpp b/src/hotspot/cpu/arm/sharedRuntime_arm.cpp
--- a/src/hotspot/cpu/arm/sharedRuntime_arm.cpp
+++ b/src/hotspot/cpu/arm/sharedRuntime_arm.cpp
@@ -42,10 +42,6 @@
#ifdef COMPILER2
#include "opto/runtime.hpp"
#endif
-#ifdef SHARK
-#include "compiler/compileBroker.hpp"
-#include "shark/sharkCompiler.hpp"
-#endif
#define __ masm->
diff --git a/src/hotspot/cpu/sparc/globalDefinitions_sparc.hpp b/src/hotspot/cpu/sparc/globalDefinitions_sparc.hpp
--- a/src/hotspot/cpu/sparc/globalDefinitions_sparc.hpp
+++ b/src/hotspot/cpu/sparc/globalDefinitions_sparc.hpp
@@ -43,7 +43,7 @@
#elif defined(COMPILER1)
// pure C1, 32-bit, small machine
#define DEFAULT_CACHE_LINE_SIZE 16
-#elif defined(COMPILER2) || defined(SHARK)
+#elif defined(COMPILER2)
// pure C2, 64-bit, large machine
#define DEFAULT_CACHE_LINE_SIZE 128
#endif
diff --git a/src/hotspot/cpu/sparc/sharedRuntime_sparc.cpp b/src/hotspot/cpu/sparc/sharedRuntime_sparc.cpp
--- a/src/hotspot/cpu/sparc/sharedRuntime_sparc.cpp
+++ b/src/hotspot/cpu/sparc/sharedRuntime_sparc.cpp
@@ -41,10 +41,6 @@
#ifdef COMPILER2
#include "opto/runtime.hpp"
#endif
-#ifdef SHARK
-#include "compiler/compileBroker.hpp"
-#include "shark/sharkCompiler.hpp"
-#endif
#if INCLUDE_JVMCI
#include "jvmci/jvmciJavaClasses.hpp"
#endif
diff --git a/src/hotspot/cpu/x86/globalDefinitions_x86.hpp b/src/hotspot/cpu/x86/globalDefinitions_x86.hpp
--- a/src/hotspot/cpu/x86/globalDefinitions_x86.hpp
+++ b/src/hotspot/cpu/x86/globalDefinitions_x86.hpp
@@ -46,7 +46,7 @@
// pure C1, 32-bit, small machine
// i486 was the last Intel chip with 16-byte cache line size
#define DEFAULT_CACHE_LINE_SIZE 32
-#elif defined(COMPILER2) || defined(SHARK)
+#elif defined(COMPILER2)
#ifdef _LP64
// pure C2, 64-bit, large machine
#define DEFAULT_CACHE_LINE_SIZE 128
diff --git a/src/hotspot/cpu/zero/cppInterpreter_zero.cpp b/src/hotspot/cpu/zero/cppInterpreter_zero.cpp
--- a/src/hotspot/cpu/zero/cppInterpreter_zero.cpp
+++ b/src/hotspot/cpu/zero/cppInterpreter_zero.cpp
@@ -50,9 +50,6 @@
#include "stack_zero.inline.hpp"
#include "utilities/debug.hpp"
#include "utilities/macros.hpp"
-#ifdef SHARK
-#include "shark/shark_globals.hpp"
-#endif
#ifdef CC_INTERP
diff --git a/src/hotspot/cpu/zero/frame_zero.cpp b/src/hotspot/cpu/zero/frame_zero.cpp
--- a/src/hotspot/cpu/zero/frame_zero.cpp
+++ b/src/hotspot/cpu/zero/frame_zero.cpp
@@ -71,7 +71,6 @@
frame frame::sender_for_nonentry_frame(RegisterMap *map) const {
assert(zeroframe()->is_interpreter_frame() ||
- zeroframe()->is_shark_frame() ||
zeroframe()->is_fake_stub_frame(), "wrong type of frame");
return frame(zeroframe()->next(), sender_sp());
}
@@ -101,8 +100,6 @@
if (pc != NULL) {
_cb = CodeCache::find_blob(pc);
- SharkFrame* sharkframe = zeroframe()->as_shark_frame();
- sharkframe->set_pc(pc);
_pc = pc;
_deopt_state = is_deoptimized;
@@ -233,8 +230,6 @@
strncpy(valuebuf, "ENTRY_FRAME", buflen);
else if (is_interpreter_frame())
strncpy(valuebuf, "INTERPRETER_FRAME", buflen);
- else if (is_shark_frame())
- strncpy(valuebuf, "SHARK_FRAME", buflen);
else if (is_fake_stub_frame())
strncpy(valuebuf, "FAKE_STUB_FRAME", buflen);
break;
@@ -248,10 +243,6 @@
as_interpreter_frame()->identify_word(
frame_index, offset, fieldbuf, valuebuf, buflen);
}
- else if (is_shark_frame()) {
- as_shark_frame()->identify_word(
- frame_index, offset, fieldbuf, valuebuf, buflen);
- }
else if (is_fake_stub_frame()) {
as_fake_stub_frame()->identify_word(
frame_index, offset, fieldbuf, valuebuf, buflen);
@@ -350,50 +341,6 @@
fieldbuf, buflen);
}
-void SharkFrame::identify_word(int frame_index,
- int offset,
- char* fieldbuf,
- char* valuebuf,
- int buflen) const {
- // Fixed part
- switch (offset) {
- case pc_off:
- strncpy(fieldbuf, "pc", buflen);
- if (method()->is_method()) {
- CompiledMethod *code = method()->code();
- if (code && code->pc_desc_at(pc())) {
- SimpleScopeDesc ssd(code, pc());
- snprintf(valuebuf, buflen, PTR_FORMAT " (bci %d)",
- (intptr_t) pc(), ssd.bci());
- }
- }
- return;
-
- case unextended_sp_off:
- strncpy(fieldbuf, "unextended_sp", buflen);
- return;
-
- case method_off:
- strncpy(fieldbuf, "method", buflen);
- if (method()->is_method()) {
- method()->name_and_sig_as_C_string(valuebuf, buflen);
- }
- return;
-
- case oop_tmp_off:
- strncpy(fieldbuf, "oop_tmp", buflen);
- return;
- }
-
- // Variable part
- if (method()->is_method()) {
- identify_vp_word(frame_index, addr_of_word(offset),
- addr_of_word(header_words + 1),
- unextended_sp() + method()->max_stack(),
- fieldbuf, buflen);
- }
-}
-
void ZeroFrame::identify_vp_word(int frame_index,
intptr_t* addr,
intptr_t* monitor_base,
diff --git a/src/hotspot/cpu/zero/frame_zero.hpp b/src/hotspot/cpu/zero/frame_zero.hpp
--- a/src/hotspot/cpu/zero/frame_zero.hpp
+++ b/src/hotspot/cpu/zero/frame_zero.hpp
@@ -62,9 +62,6 @@
const InterpreterFrame *zero_interpreterframe() const {
return zeroframe()->as_interpreter_frame();
}
- const SharkFrame *zero_sharkframe() const {
- return zeroframe()->as_shark_frame();
- }
public:
bool is_fake_stub_frame() const;
diff --git a/src/hotspot/cpu/zero/frame_zero.inline.hpp b/src/hotspot/cpu/zero/frame_zero.inline.hpp
--- a/src/hotspot/cpu/zero/frame_zero.inline.hpp
+++ b/src/hotspot/cpu/zero/frame_zero.inline.hpp
@@ -56,18 +56,6 @@
_deopt_state = not_deoptimized;
break;
- case ZeroFrame::SHARK_FRAME: {
- _pc = zero_sharkframe()->pc();
- _cb = CodeCache::find_blob_unsafe(pc());
- address original_pc = CompiledMethod::get_deopt_original_pc(this);
- if (original_pc != NULL) {
- _pc = original_pc;
- _deopt_state = is_deoptimized;
- } else {
- _deopt_state = not_deoptimized;
- }
- break;
- }
case ZeroFrame::FAKE_STUB_FRAME:
_pc = NULL;
_cb = NULL;
@@ -177,10 +165,7 @@
}
inline intptr_t* frame::unextended_sp() const {
- if (zeroframe()->is_shark_frame())
- return zero_sharkframe()->unextended_sp();
- else
- return (intptr_t *) -1;
+ return (intptr_t *) -1;
}
#endif // CPU_ZERO_VM_FRAME_ZERO_INLINE_HPP
diff --git a/src/hotspot/cpu/zero/icache_zero.hpp b/src/hotspot/cpu/zero/icache_zero.hpp
--- a/src/hotspot/cpu/zero/icache_zero.hpp
+++ b/src/hotspot/cpu/zero/icache_zero.hpp
@@ -29,7 +29,7 @@
// Interface for updating the instruction cache. Whenever the VM
// modifies code, part of the processor instruction cache potentially
// has to be flushed. This implementation is empty: Zero never deals
-// with code, and LLVM handles cache flushing for Shark.
+// with code.
class ICache : public AbstractICache {
public:
diff --git a/src/hotspot/cpu/zero/nativeInst_zero.cpp b/src/hotspot/cpu/zero/nativeInst_zero.cpp
--- a/src/hotspot/cpu/zero/nativeInst_zero.cpp
+++ b/src/hotspot/cpu/zero/nativeInst_zero.cpp
@@ -42,11 +42,6 @@
// insert a jump to SharedRuntime::get_handle_wrong_method_stub()
// (dest) at the start of a compiled method (verified_entry) to avoid
// a race where a method is invoked while being made non-entrant.
-//
-// In Shark, verified_entry is a pointer to a SharkEntry. We can
-// handle this simply by changing it's entry point to point at the
-// interpreter. This only works because the interpreter and Shark
-// calling conventions are the same.
void NativeJump::patch_verified_entry(address entry,
address verified_entry,
diff --git a/src/hotspot/cpu/zero/relocInfo_zero.cpp b/src/hotspot/cpu/zero/relocInfo_zero.cpp
--- a/src/hotspot/cpu/zero/relocInfo_zero.cpp
+++ b/src/hotspot/cpu/zero/relocInfo_zero.cpp
@@ -50,7 +50,7 @@
}
address* Relocation::pd_address_in_code() {
- // Relocations in Shark are just stored directly
+ ShouldNotCallThis();
return (address *) addr();
}
diff --git a/src/hotspot/cpu/zero/sharedRuntime_zero.cpp b/src/hotspot/cpu/zero/sharedRuntime_zero.cpp
--- a/src/hotspot/cpu/zero/sharedRuntime_zero.cpp
+++ b/src/hotspot/cpu/zero/sharedRuntime_zero.cpp
@@ -41,11 +41,6 @@
#ifdef COMPILER2
#include "opto/runtime.hpp"
#endif
-#ifdef SHARK
-#include "compiler/compileBroker.hpp"
-#include "shark/sharkCompiler.hpp"
-#endif
-
static address zero_null_code_stub() {
@@ -80,16 +75,8 @@
BasicType *sig_bt,
VMRegPair *regs,
BasicType ret_type) {
-#ifdef SHARK
- return SharkCompiler::compiler()->generate_native_wrapper(masm,
- method,
- compile_id,
- sig_bt,
- ret_type);
-#else
ShouldNotCallThis();
return NULL;
-#endif // SHARK
}
int Deoptimization::last_frame_adjust(int callee_parameters,
diff --git a/src/hotspot/cpu/zero/sharkFrame_zero.hpp b/src/hotspot/cpu/zero/sharkFrame_zero.hpp
deleted file mode 100644
--- a/src/hotspot/cpu/zero/sharkFrame_zero.hpp
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
- * Copyright 2008, 2009 Red Hat, Inc.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-#ifndef CPU_ZERO_VM_SHARKFRAME_ZERO_HPP
-#define CPU_ZERO_VM_SHARKFRAME_ZERO_HPP
-
-#include "oops/method.hpp"
-#include "stack_zero.hpp"
-
-// | ... |
-// +--------------------+ ------------------
-// | stack slot n-1 | low addresses
-// | ... |
-// | stack slot 0 |
-// | monitor m-1 |
-// | ... |
-// | monitor 0 |
-// | oop_tmp |
-// | method |
-// | unextended_sp |
-// | pc |
-// | frame_type |
-// | next_frame | high addresses
-// +--------------------+ ------------------
-// | ... |
-
-class SharkFrame : public ZeroFrame {
- friend class SharkStack;
-
- private:
- SharkFrame() : ZeroFrame() {
- ShouldNotCallThis();
- }
-
- protected:
- enum Layout {
- pc_off = jf_header_words,
- unextended_sp_off,
- method_off,
- oop_tmp_off,
- header_words
- };
-
- public:
- address pc() const {
- return (address) value_of_word(pc_off);
- }
-
- void set_pc(address pc) const {
- *((address*) addr_of_word(pc_off)) = pc;
- }
-
- intptr_t* unextended_sp() const {
- return (intptr_t *) value_of_word(unextended_sp_off);
- }
-
- Method* method() const {
- return (Method*) value_of_word(method_off);
- }
-
- public:
- void identify_word(int frame_index,
- int offset,
- char* fieldbuf,
- char* valuebuf,
- int buflen) const;
-};
-
-#endif // CPU_ZERO_VM_SHARKFRAME_ZERO_HPP
diff --git a/src/hotspot/cpu/zero/shark_globals_zero.hpp b/src/hotspot/cpu/zero/shark_globals_zero.hpp
deleted file mode 100644
--- a/src/hotspot/cpu/zero/shark_globals_zero.hpp
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
- * Copyright 2008, 2009, 2010 Red Hat, Inc.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-#ifndef CPU_ZERO_VM_SHARK_GLOBALS_ZERO_HPP
-#define CPU_ZERO_VM_SHARK_GLOBALS_ZERO_HPP
-
-// Set the default values for platform dependent flags used by the
-// Shark compiler. See globals.hpp for details of what they do.
-
-define_pd_global(bool, BackgroundCompilation, true );
-define_pd_global(bool, UseTLAB, true );
-define_pd_global(bool, ResizeTLAB, true );
-define_pd_global(bool, InlineIntrinsics, false);
-define_pd_global(bool, PreferInterpreterNativeStubs, false);
-define_pd_global(bool, ProfileTraps, false);
-define_pd_global(bool, UseOnStackReplacement, true );
-define_pd_global(bool, TieredCompilation, false);
-
-define_pd_global(intx, CompileThreshold, 1500);
-define_pd_global(intx, Tier2CompileThreshold, 1500);
-define_pd_global(intx, Tier3CompileThreshold, 2500);
-define_pd_global(intx, Tier4CompileThreshold, 4500);
-
-define_pd_global(intx, Tier2BackEdgeThreshold, 100000);
-define_pd_global(intx, Tier3BackEdgeThreshold, 100000);
-define_pd_global(intx, Tier4BackEdgeThreshold, 100000);
-
-define_pd_global(intx, OnStackReplacePercentage, 933 );
-define_pd_global(intx, FreqInlineSize, 325 );
-define_pd_global(uintx, NewRatio, 12 );
-define_pd_global(size_t, NewSizeThreadIncrease, 4*K );
-define_pd_global(intx, InitialCodeCacheSize, 160*K);
-define_pd_global(intx, ReservedCodeCacheSize, 32*M );
-define_pd_global(intx, NonProfiledCodeHeapSize, 13*M );
-define_pd_global(intx, ProfiledCodeHeapSize, 14*M );
-define_pd_global(intx, NonNMethodCodeHeapSize, 5*M );
-define_pd_global(bool, ProfileInterpreter, false);
-define_pd_global(intx, CodeCacheExpansionSize, 32*K );
-define_pd_global(uintx, CodeCacheMinBlockLength, 1 );
-define_pd_global(uintx, CodeCacheMinimumUseSpace, 200*K);
-
-define_pd_global(size_t, MetaspaceSize, 12*M );
-define_pd_global(bool, NeverActAsServerClassMachine, true );
-define_pd_global(uint64_t, MaxRAM, 1ULL*G);
-define_pd_global(bool, CICompileOSR, true );
-
-#endif // CPU_ZERO_VM_SHARK_GLOBALS_ZERO_HPP
diff --git a/src/hotspot/cpu/zero/stack_zero.cpp b/src/hotspot/cpu/zero/stack_zero.cpp
--- a/src/hotspot/cpu/zero/stack_zero.cpp
+++ b/src/hotspot/cpu/zero/stack_zero.cpp
@@ -52,9 +52,6 @@
intptr_t *sp = thread->zero_stack()->sp();
ZeroFrame *frame = thread->top_zero_frame();
while (frame) {
- if (frame->is_shark_frame())
- break;
-
if (frame->is_interpreter_frame()) {
interpreterState istate =
frame->as_interpreter_frame()->interpreter_state();
diff --git a/src/hotspot/cpu/zero/stack_zero.hpp b/src/hotspot/cpu/zero/stack_zero.hpp
--- a/src/hotspot/cpu/zero/stack_zero.hpp
+++ b/src/hotspot/cpu/zero/stack_zero.hpp
@@ -121,7 +121,6 @@
class EntryFrame;
class InterpreterFrame;
-class SharkFrame;
class FakeStubFrame;
//
@@ -151,7 +150,6 @@
enum FrameType {
ENTRY_FRAME = 1,
INTERPRETER_FRAME,
- SHARK_FRAME,
FAKE_STUB_FRAME
};
@@ -180,9 +178,6 @@
bool is_interpreter_frame() const {
return type() == INTERPRETER_FRAME;
}
- bool is_shark_frame() const {
- return type() == SHARK_FRAME;
- }
bool is_fake_stub_frame() const {
return type() == FAKE_STUB_FRAME;
}
@@ -196,10 +191,6 @@
assert(is_interpreter_frame(), "should be");
return (InterpreterFrame *) this;
}
- SharkFrame *as_shark_frame() const {
- assert(is_shark_frame(), "should be");
- return (SharkFrame *) this;
- }
FakeStubFrame *as_fake_stub_frame() const {
assert(is_fake_stub_frame(), "should be");
return (FakeStubFrame *) this;
diff --git a/src/hotspot/cpu/zero/stack_zero.inline.hpp b/src/hotspot/cpu/zero/stack_zero.inline.hpp
--- a/src/hotspot/cpu/zero/stack_zero.inline.hpp
+++ b/src/hotspot/cpu/zero/stack_zero.inline.hpp
@@ -29,7 +29,6 @@
#include "runtime/thread.hpp"
#include "stack_zero.hpp"
-// This function should match SharkStack::CreateStackOverflowCheck
inline void ZeroStack::overflow_check(int required_words, TRAPS) {
// Check the Zero stack
if (available_words() < required_words) {
diff --git a/src/hotspot/share/ci/ciEnv.cpp b/src/hotspot/share/ci/ciEnv.cpp
--- a/src/hotspot/share/ci/ciEnv.cpp
+++ b/src/hotspot/share/ci/ciEnv.cpp
@@ -1218,12 +1218,12 @@
method->signature()->as_quoted_ascii(),
entry_bci, comp_level);
if (compiler_data() != NULL) {
- if (is_c2_compile(comp_level)) { // C2 or Shark
+ if (is_c2_compile(comp_level)) {
#ifdef COMPILER2
// Dump C2 inlining data.
((Compile*)compiler_data())->dump_inline_data(out);
#endif
- } else if (is_c1_compile(comp_level)) { // C1
+ } else if (is_c1_compile(comp_level)) {
#ifdef COMPILER1
// Dump C1 inlining data.
((Compilation*)compiler_data())->dump_inline_data(out);
diff --git a/src/hotspot/share/ci/ciMethod.cpp b/src/hotspot/share/ci/ciMethod.cpp
--- a/src/hotspot/share/ci/ciMethod.cpp
+++ b/src/hotspot/share/ci/ciMethod.cpp
@@ -53,10 +53,6 @@
#include "ci/ciTypeFlow.hpp"
#include "oops/method.hpp"
#endif
-#ifdef SHARK
-#include "ci/ciTypeFlow.hpp"
-#include "oops/method.hpp"
-#endif
// ciMethod
//
@@ -97,10 +93,10 @@
_exception_handlers = NULL;
_liveness = NULL;
_method_blocks = NULL;
-#if defined(COMPILER2) || defined(SHARK)
+#if defined(COMPILER2)
_flow = NULL;
_bcea = NULL;
-#endif // COMPILER2 || SHARK
+#endif // COMPILER2
ciEnv *env = CURRENT_ENV;
if (env->jvmti_can_hotswap_or_post_breakpoint() && can_be_compiled()) {
@@ -173,12 +169,12 @@
_can_be_statically_bound(false),
_method_blocks( NULL),
_method_data( NULL)
-#if defined(COMPILER2) || defined(SHARK)
+#if defined(COMPILER2)
,
_flow( NULL),
_bcea( NULL),
_instructions_size(-1)
-#endif // COMPILER2 || SHARK
+#endif // COMPILER2
{
// Usually holder and accessor are the same type but in some cases
// the holder has the wrong class loader (e.g. invokedynamic call
@@ -287,23 +283,6 @@
}
-#ifdef SHARK
-// ------------------------------------------------------------------
-// ciMethod::itable_index
-//
-// Get the position of this method's entry in the itable, if any.
-int ciMethod::itable_index() {
- check_is_loaded();
- assert(holder()->is_linked(), "must be linked");
- VM_ENTRY_MARK;
- Method* m = get_Method();
- if (!m->has_itable_index())
- return Method::nonvirtual_vtable_index;
- return m->itable_index();
-}
-#endif // SHARK
-
-
// ------------------------------------------------------------------
// ciMethod::native_entry
//
@@ -369,34 +348,34 @@
// ------------------------------------------------------------------
// ciMethod::get_flow_analysis
ciTypeFlow* ciMethod::get_flow_analysis() {
-#if defined(COMPILER2) || defined(SHARK)
+#if defined(COMPILER2)
if (_flow == NULL) {
ciEnv* env = CURRENT_ENV;
_flow = new (env->arena()) ciTypeFlow(env, this);
_flow->do_flow();
}
return _flow;
-#else // COMPILER2 || SHARK
+#else // COMPILER2
ShouldNotReachHere();
return NULL;
-#endif // COMPILER2 || SHARK
+#endif // COMPILER2
}
// ------------------------------------------------------------------
// ciMethod::get_osr_flow_analysis
ciTypeFlow* ciMethod::get_osr_flow_analysis(int osr_bci) {
-#if defined(COMPILER2) || defined(SHARK)
+#if defined(COMPILER2)
// OSR entry points are always place after a call bytecode of some sort
assert(osr_bci >= 0, "must supply valid OSR entry point");
ciEnv* env = CURRENT_ENV;
ciTypeFlow* flow = new (env->arena()) ciTypeFlow(env, this, osr_bci);
flow->do_flow();
return flow;
-#else // COMPILER2 || SHARK
+#else // COMPILER2
ShouldNotReachHere();
return NULL;
-#endif // COMPILER2 || SHARK
+#endif // COMPILER2
}
// ------------------------------------------------------------------
diff --git a/src/hotspot/share/ci/ciMethod.hpp b/src/hotspot/share/ci/ciMethod.hpp
--- a/src/hotspot/share/ci/ciMethod.hpp
+++ b/src/hotspot/share/ci/ciMethod.hpp
@@ -96,7 +96,7 @@
// Optional liveness analyzer.
MethodLiveness* _liveness;
-#if defined(COMPILER2) || defined(SHARK)
+#if defined(COMPILER2)
ciTypeFlow* _flow;
BCEscapeAnalyzer* _bcea;
#endif
@@ -216,9 +216,6 @@
// Runtime information.
int vtable_index();
-#ifdef SHARK
- int itable_index();
-#endif // SHARK
address native_entry();
address interpreter_entry();
diff --git a/src/hotspot/share/ci/ciTypeFlow.hpp b/src/hotspot/share/ci/ciTypeFlow.hpp
--- a/src/hotspot/share/ci/ciTypeFlow.hpp
+++ b/src/hotspot/share/ci/ciTypeFlow.hpp
@@ -30,12 +30,6 @@
#include "ci/ciKlass.hpp"
#include "ci/ciMethodBlocks.hpp"
#endif
-#ifdef SHARK
-#include "ci/ciEnv.hpp"
-#include "ci/ciKlass.hpp"
-#include "ci/ciMethodBlocks.hpp"
-#include "shark/shark_globals.hpp"
-#endif
class ciTypeFlow : public ResourceObj {
diff --git a/src/hotspot/share/code/codeBlob.hpp b/src/hotspot/share/code/codeBlob.hpp
--- a/src/hotspot/share/code/codeBlob.hpp
+++ b/src/hotspot/share/code/codeBlob.hpp
@@ -125,7 +125,6 @@
inline bool is_compiled_by_c1() const { return _type == compiler_c1; };
inline bool is_compiled_by_c2() const { return _type == compiler_c2; };
inline bool is_compiled_by_jvmci() const { return _type == compiler_jvmci; };
- inline bool is_compiled_by_shark() const { return _type == compiler_shark; };
const char* compiler_name() const;
// Casting
diff --git a/src/hotspot/share/code/compiledMethod.cpp b/src/hotspot/share/code/compiledMethod.cpp
--- a/src/hotspot/share/code/compiledMethod.cpp
+++ b/src/hotspot/share/code/compiledMethod.cpp
@@ -294,7 +294,6 @@
// Method that knows how to preserve outgoing arguments at call. This method must be
// called with a frame corresponding to a Java invoke
void CompiledMethod::preserve_callee_argument_oops(frame fr, const RegisterMap *reg_map, OopClosure* f) {
-#ifndef SHARK
if (method() != NULL && !method()->is_native()) {
address pc = fr.pc();
SimpleScopeDesc ssd(this, pc);
@@ -314,7 +313,6 @@
fr.oops_compiled_arguments_do(signature, has_receiver, has_appendix, reg_map, f);
}
-#endif // !SHARK
}
Method* CompiledMethod::attached_method(address call_instr) {
diff --git a/src/hotspot/share/code/nmethod.cpp b/src/hotspot/share/code/nmethod.cpp
--- a/src/hotspot/share/code/nmethod.cpp
+++ b/src/hotspot/share/code/nmethod.cpp
@@ -53,9 +53,6 @@
#include "utilities/events.hpp"
#include "utilities/resourceHash.hpp"
#include "utilities/xmlstream.hpp"
-#ifdef SHARK
-#include "shark/sharkCompiler.hpp"
-#endif
#if INCLUDE_JVMCI
#include "jvmci/jvmciJavaClasses.hpp"
#endif
@@ -200,9 +197,6 @@
#if INCLUDE_JVMCI
static java_nmethod_stats_struct jvmci_java_nmethod_stats;
#endif
-#ifdef SHARK
-static java_nmethod_stats_struct shark_java_nmethod_stats;
-#endif
static java_nmethod_stats_struct unknown_java_nmethod_stats;
static native_nmethod_stats_struct native_nmethod_stats;
@@ -224,11 +218,6 @@
jvmci_java_nmethod_stats.note_nmethod(nm);
} else
#endif
-#ifdef SHARK
- if (nm->is_compiled_by_shark()) {
- shark_java_nmethod_stats.note_nmethod(nm);
- } else
-#endif
{
unknown_java_nmethod_stats.note_nmethod(nm);
}
@@ -1325,10 +1314,6 @@
CodeCache::drop_scavenge_root_nmethod(this);
}
-#ifdef SHARK
- ((SharkCompiler *) compiler())->free_compiled_method(insts_begin());
-#endif // SHARK
-
CodeBlob::flush();
CodeCache::free(this);
}
@@ -2245,8 +2230,6 @@
tty->print("(c1) ");
} else if (is_compiled_by_c2()) {
tty->print("(c2) ");
- } else if (is_compiled_by_shark()) {
- tty->print("(shark) ");
} else if (is_compiled_by_jvmci()) {
tty->print("(JVMCI) ");
} else {
@@ -2868,9 +2851,6 @@
#if INCLUDE_JVMCI
jvmci_java_nmethod_stats.print_nmethod_stats("JVMCI");
#endif
-#ifdef SHARK
- shark_java_nmethod_stats.print_nmethod_stats("Shark");
-#endif
unknown_java_nmethod_stats.print_nmethod_stats("Unknown");
DebugInformationRecorder::print_statistics();
#ifndef PRODUCT
diff --git a/src/hotspot/share/compiler/abstractCompiler.hpp b/src/hotspot/share/compiler/abstractCompiler.hpp
--- a/src/hotspot/share/compiler/abstractCompiler.hpp
+++ b/src/hotspot/share/compiler/abstractCompiler.hpp
@@ -152,7 +152,6 @@
const bool is_c1() { return _type == compiler_c1; }
const bool is_c2() { return _type == compiler_c2; }
const bool is_jvmci() { return _type == compiler_jvmci; }
- const bool is_shark() { return _type == compiler_shark; }
const CompilerType type() { return _type; }
// Extra tests to identify trivial methods for the tiered compilation policy.
diff --git a/src/hotspot/share/compiler/compileBroker.cpp b/src/hotspot/share/compiler/compileBroker.cpp
--- a/src/hotspot/share/compiler/compileBroker.cpp
+++ b/src/hotspot/share/compiler/compileBroker.cpp
@@ -70,9 +70,6 @@
#ifdef COMPILER2
#include "opto/c2compiler.hpp"
#endif
-#ifdef SHARK
-#include "shark/sharkCompiler.hpp"
-#endif
#ifdef DTRACE_ENABLED
@@ -531,7 +528,6 @@
if (!UseCompiler) {
return;
}
-#ifndef SHARK
// Set the interface to the current compiler(s).
int c1_count = CompilationPolicy::policy()->compiler_count(CompLevel_simple);
int c2_count = CompilationPolicy::policy()->compiler_count(CompLevel_full_optimization);
@@ -573,13 +569,6 @@
}
#endif // COMPILER2
-#else // SHARK
- int c1_count = 0;
- int c2_count = 1;
-
- _compilers[1] = new SharkCompiler();
-#endif // SHARK
-
// Start the compiler thread(s) and the sweeper thread
init_compiler_sweeper_threads(c1_count, c2_count);
// totalTime performance counter is always created as it is required
@@ -774,9 +763,9 @@
void CompileBroker::init_compiler_sweeper_threads(int c1_compiler_count, int c2_compiler_count) {
EXCEPTION_MARK;
-#if !defined(ZERO) && !defined(SHARK)
+#if !defined(ZERO)
assert(c2_compiler_count > 0 || c1_compiler_count > 0, "No compilers?");
-#endif // !ZERO && !SHARK
+#endif // !ZERO
// Initialize the compilation queue
if (c2_compiler_count > 0) {
const char* name = JVMCI_ONLY(UseJVMCICompiler ? "JVMCI compile queue" :) "C2 compile queue";
@@ -796,7 +785,6 @@
// Create a name for our thread.
sprintf(name_buffer, "%s CompilerThread%d", _compilers[1]->name(), i);
CompilerCounters* counters = new CompilerCounters();
- // Shark and C2
make_thread(name_buffer, _c2_compile_queue, counters, _compilers[1], compiler_thread, CHECK);
}
@@ -1100,7 +1088,7 @@
assert(!HAS_PENDING_EXCEPTION, "No exception should be present");
// some prerequisites that are compiler specific
- if (comp->is_c2() || comp->is_shark()) {
+ if (comp->is_c2()) {
method->constants()->resolve_string_constants(CHECK_AND_CLEAR_NULL);
// Resolve all classes seen in the signature of the method
// we are compiling.
@@ -1490,10 +1478,8 @@
ThreadInVMfromNative tv(thread);
ResetNoHandleMark rnhm;
- if (!comp->is_shark()) {
- // Perform per-thread and global initializations
- comp->initialize();
- }
+ // Perform per-thread and global initializations
+ comp->initialize();
}
if (comp->is_failed()) {
diff --git a/src/hotspot/share/compiler/compilerDefinitions.cpp b/src/hotspot/share/compiler/compilerDefinitions.cpp
--- a/src/hotspot/share/compiler/compilerDefinitions.cpp
+++ b/src/hotspot/share/compiler/compilerDefinitions.cpp
@@ -31,11 +31,10 @@
"",
"c1",
"c2",
- "jvmci",
- "shark"
+ "jvmci"
};
-#if defined(COMPILER2) || defined(SHARK)
+#if defined(COMPILER2)
CompLevel CompLevel_highest_tier = CompLevel_full_optimization; // pure C2 and tiered or JVMCI and tiered
#elif defined(COMPILER1)
CompLevel CompLevel_highest_tier = CompLevel_simple; // pure C1 or JVMCI
@@ -47,7 +46,7 @@
CompLevel CompLevel_initial_compile = CompLevel_full_profile; // tiered
#elif defined(COMPILER1) || INCLUDE_JVMCI
CompLevel CompLevel_initial_compile = CompLevel_simple; // pure C1 or JVMCI
-#elif defined(COMPILER2) || defined(SHARK)
+#elif defined(COMPILER2)
CompLevel CompLevel_initial_compile = CompLevel_full_optimization; // pure C2
#else
CompLevel CompLevel_initial_compile = CompLevel_none;
diff --git a/src/hotspot/share/compiler/compilerDefinitions.hpp b/src/hotspot/share/compiler/compilerDefinitions.hpp
--- a/src/hotspot/share/compiler/compilerDefinitions.hpp
+++ b/src/hotspot/share/compiler/compilerDefinitions.hpp
@@ -33,7 +33,6 @@
compiler_c1,
compiler_c2,
compiler_jvmci,
- compiler_shark,
compiler_number_of_types
};
@@ -54,7 +53,7 @@
CompLevel_simple = 1, // C1
CompLevel_limited_profile = 2, // C1, invocation & backedge counters
CompLevel_full_profile = 3, // C1, invocation & backedge counters + mdo
- CompLevel_full_optimization = 4 // C2, Shark or JVMCI
+ CompLevel_full_optimization = 4 // C2 or JVMCI
};
extern CompLevel CompLevel_highest_tier;
diff --git a/src/hotspot/share/compiler/compilerDirectives.cpp b/src/hotspot/share/compiler/compilerDirectives.cpp
--- a/src/hotspot/share/compiler/compilerDirectives.cpp
+++ b/src/hotspot/share/compiler/compilerDirectives.cpp
@@ -171,7 +171,7 @@
return _c2_store;
} else {
// use c1_store as default
- assert(comp->is_c1() || comp->is_jvmci() || comp->is_shark(), "");
+ assert(comp->is_c1() || comp->is_jvmci(), "");
return _c1_store;
}
}
diff --git a/src/hotspot/share/compiler/disassembler.cpp b/src/hotspot/share/compiler/disassembler.cpp
--- a/src/hotspot/share/compiler/disassembler.cpp
+++ b/src/hotspot/share/compiler/disassembler.cpp
@@ -35,9 +35,6 @@
#include "runtime/stubCodeGenerator.hpp"
#include "runtime/stubRoutines.hpp"
#include CPU_HEADER(depChecker)
-#ifdef SHARK
-#include "shark/sharkEntry.hpp"
-#endif
void* Disassembler::_library = NULL;
bool Disassembler::_tried_to_load_library = false;
@@ -521,14 +518,8 @@
decode_env env(nm, st);
env.output()->print_cr("----------------------------------------------------------------------");
-#ifdef SHARK
- SharkEntry* entry = (SharkEntry *) nm->code_begin();
- unsigned char* p = entry->code_start();
- unsigned char* end = entry->code_limit();
-#else
unsigned char* p = nm->code_begin();
unsigned char* end = nm->code_end();
-#endif // SHARK
nm->method()->method_holder()->name()->print_symbol_on(env.output());
env.output()->print(".");
diff --git a/src/hotspot/share/interpreter/bytecodeInterpreter.cpp b/src/hotspot/share/interpreter/bytecodeInterpreter.cpp
--- a/src/hotspot/share/interpreter/bytecodeInterpreter.cpp
+++ b/src/hotspot/share/interpreter/bytecodeInterpreter.cpp
@@ -478,9 +478,7 @@
#ifdef ASSERT
if (istate->_msg != initialize) {
assert(labs(istate->_stack_base - istate->_stack_limit) == (istate->_method->max_stack() + 1), "bad stack limit");
-#ifndef SHARK
IA32_ONLY(assert(istate->_stack_limit == istate->_thread->last_Java_sp() + 1, "wrong"));
-#endif // !SHARK
}
// Verify linkages.
interpreterState l = istate;
diff --git a/src/hotspot/share/oops/method.cpp b/src/hotspot/share/oops/method.cpp
--- a/src/hotspot/share/oops/method.cpp
+++ b/src/hotspot/share/oops/method.cpp
@@ -1160,15 +1160,11 @@
}
OrderAccess::storestore();
-#ifdef SHARK
- mh->_from_interpreted_entry = code->insts_begin();
-#else //!SHARK
mh->_from_compiled_entry = code->verified_entry_point();
OrderAccess::storestore();
// Instantly compiled code can execute.
if (!mh->is_method_handle_intrinsic())
mh->_from_interpreted_entry = mh->get_i2c_entry();
-#endif //!SHARK
}
diff --git a/src/hotspot/share/runtime/commandLineFlagConstraintsCompiler.cpp b/src/hotspot/share/runtime/commandLineFlagConstraintsCompiler.cpp
--- a/src/hotspot/share/runtime/commandLineFlagConstraintsCompiler.cpp
+++ b/src/hotspot/share/runtime/commandLineFlagConstraintsCompiler.cpp
@@ -64,7 +64,7 @@
*/
Flag::Error CICompilerCountConstraintFunc(intx value, bool verbose) {
int min_number_of_compiler_threads = 0;
-#if !defined(COMPILER1) && !defined(COMPILER2) && !defined(SHARK) && !INCLUDE_JVMCI
+#if !defined(COMPILER1) && !defined(COMPILER2) && !INCLUDE_JVMCI
// case 1
#else
if (!TieredCompilation || (TieredStopAtLevel < CompLevel_full_optimization)) {
diff --git a/src/hotspot/share/runtime/deoptimization.cpp b/src/hotspot/share/runtime/deoptimization.cpp
--- a/src/hotspot/share/runtime/deoptimization.cpp
+++ b/src/hotspot/share/runtime/deoptimization.cpp
@@ -339,7 +339,6 @@
}
-#ifndef SHARK
// Compute the caller frame based on the sender sp of stub_frame and stored frame sizes info.
CodeBlob* cb = stub_frame.cb();
// Verify we have the right vframeArray
@@ -359,9 +358,6 @@
strcmp("Stub", cb->name()) == 0,
"unexpected code blob: %s", cb->name());
#endif
-#else
- intptr_t* unpack_sp = stub_frame.sender(&dummy_map).unextended_sp();
-#endif // !SHARK
// This is a guarantee instead of an assert because if vframe doesn't match
// we will unpack the wrong deoptimized frame and wind up in strange places
@@ -488,9 +484,7 @@
frame_pcs[0] = deopt_sender.raw_pc();
-#ifndef SHARK
assert(CodeCache::find_blob_unsafe(frame_pcs[0]) != NULL, "bad pc");
-#endif // SHARK
#ifdef INCLUDE_JVMCI
if (exceptionObject() != NULL) {
@@ -1449,7 +1443,7 @@
return mdo;
}
-#if defined(COMPILER2) || defined(SHARK) || INCLUDE_JVMCI
+#if defined(COMPILER2) || INCLUDE_JVMCI
void Deoptimization::load_class_by_index(const constantPoolHandle& constant_pool, int index, TRAPS) {
// in case of an unresolved klass entry, load the class.
if (constant_pool->tag_at(index).is_unresolved_klass()) {
@@ -2366,7 +2360,7 @@
if (xtty != NULL) xtty->tail("statistics");
}
}
-#else // COMPILER2 || SHARK || INCLUDE_JVMCI
+#else // COMPILER2 || INCLUDE_JVMCI
// Stubs for C1 only system.
@@ -2402,4 +2396,4 @@
return buf;
}
-#endif // COMPILER2 || SHARK || INCLUDE_JVMCI
+#endif // COMPILER2 || INCLUDE_JVMCI
diff --git a/src/hotspot/share/runtime/frame.cpp b/src/hotspot/share/runtime/frame.cpp
--- a/src/hotspot/share/runtime/frame.cpp
+++ b/src/hotspot/share/runtime/frame.cpp
@@ -1122,10 +1122,6 @@
oops_entry_do(f, map);
} else if (CodeCache::contains(pc())) {
oops_code_blob_do(f, cf, map);
-#ifdef SHARK
- } else if (is_fake_stub_frame()) {
- // nothing to do
-#endif // SHARK
} else {
ShouldNotReachHere();
}
diff --git a/src/hotspot/share/runtime/frame.inline.hpp b/src/hotspot/share/runtime/frame.inline.hpp
--- a/src/hotspot/share/runtime/frame.inline.hpp
+++ b/src/hotspot/share/runtime/frame.inline.hpp
@@ -37,7 +37,6 @@
# include "entryFrame_zero.hpp"
# include "fakeStubFrame_zero.hpp"
# include "interpreterFrame_zero.hpp"
-# include "sharkFrame_zero.hpp"
#endif
#include CPU_HEADER_INLINE(frame)
diff --git a/src/hotspot/share/runtime/globals.cpp b/src/hotspot/share/runtime/globals.cpp
--- a/src/hotspot/share/runtime/globals.cpp
+++ b/src/hotspot/share/runtime/globals.cpp
@@ -50,9 +50,6 @@
#ifdef COMPILER2
#include "opto/c2_globals.hpp"
#endif
-#ifdef SHARK
-#include "shark/shark_globals.hpp"
-#endif
RUNTIME_FLAGS(MATERIALIZE_DEVELOPER_FLAG, \
MATERIALIZE_PD_DEVELOPER_FLAG, \
@@ -578,7 +575,6 @@
{ KIND_C1, "C1" },
{ KIND_C2, "C2" },
{ KIND_ARCH, "ARCH" },
- { KIND_SHARK, "SHARK" },
{ KIND_PLATFORM_DEPENDENT, "pd" },
{ KIND_PRODUCT, "product" },
{ KIND_MANAGEABLE, "manageable" },
@@ -754,14 +750,6 @@
#define ARCH_DEVELOP_FLAG_STRUCT( type, name, value, doc) { #type, XSTR(name), (void*) &name, NOT_PRODUCT_ARG(doc) Flag::Flags(Flag::DEFAULT | Flag::KIND_ARCH | Flag::KIND_DEVELOP) },
#define ARCH_NOTPRODUCT_FLAG_STRUCT( type, name, value, doc) { #type, XSTR(name), (void*) &name, NOT_PRODUCT_ARG(doc) Flag::Flags(Flag::DEFAULT | Flag::KIND_ARCH | Flag::KIND_NOT_PRODUCT) },
-#define SHARK_PRODUCT_FLAG_STRUCT( type, name, value, doc) { #type, XSTR(name), &name, NOT_PRODUCT_ARG(doc) Flag::Flags(Flag::DEFAULT | Flag::KIND_SHARK | Flag::KIND_PRODUCT) },
-#define SHARK_PD_PRODUCT_FLAG_STRUCT( type, name, doc) { #type, XSTR(name), &name, NOT_PRODUCT_ARG(doc) Flag::Flags(Flag::DEFAULT | Flag::KIND_SHARK | Flag::KIND_PRODUCT | Flag::KIND_PLATFORM_DEPENDENT) },
-#define SHARK_DIAGNOSTIC_FLAG_STRUCT( type, name, value, doc) { #type, XSTR(name), &name, NOT_PRODUCT_ARG(doc) Flag::Flags(Flag::DEFAULT | Flag::KIND_SHARK | Flag::KIND_DIAGNOSTIC) },
-#define SHARK_PD_DIAGNOSTIC_FLAG_STRUCT( type, name, doc) { #type, XSTR(name), &name, NOT_PRODUCT_ARG(doc) Flag::Flags(Flag::DEFAULT | Flag::KIND_SHARK | Flag::KIND_DIAGNOSTIC | Flag::KIND_PLATFORM_DEPENDENT) },
-#define SHARK_DEVELOP_FLAG_STRUCT( type, name, value, doc) { #type, XSTR(name), (void*) &name, NOT_PRODUCT_ARG(doc) Flag::Flags(Flag::DEFAULT | Flag::KIND_SHARK | Flag::KIND_DEVELOP) },
-#define SHARK_PD_DEVELOP_FLAG_STRUCT( type, name, doc) { #type, XSTR(name), (void*) &name, NOT_PRODUCT_ARG(doc) Flag::Flags(Flag::DEFAULT | Flag::KIND_SHARK | Flag::KIND_DEVELOP | Flag::KIND_PLATFORM_DEPENDENT) },
-#define SHARK_NOTPRODUCT_FLAG_STRUCT( type, name, value, doc) { #type, XSTR(name), (void*) &name, NOT_PRODUCT_ARG(doc) Flag::Flags(Flag::DEFAULT | Flag::KIND_SHARK | Flag::KIND_NOT_PRODUCT) },
-
static Flag flagTable[] = {
RUNTIME_FLAGS(RUNTIME_DEVELOP_FLAG_STRUCT, \
RUNTIME_PD_DEVELOP_FLAG_STRUCT, \
@@ -840,18 +828,6 @@
IGNORE_CONSTRAINT, \
IGNORE_WRITEABLE)
#endif // COMPILER2
-#ifdef SHARK
- SHARK_FLAGS(SHARK_DEVELOP_FLAG_STRUCT, \
- SHARK_PD_DEVELOP_FLAG_STRUCT, \
- SHARK_PRODUCT_FLAG_STRUCT, \
- SHARK_PD_PRODUCT_FLAG_STRUCT, \
- SHARK_DIAGNOSTIC_FLAG_STRUCT, \
- SHARK_PD_DIAGNOSTIC_FLAG_STRUCT, \
- SHARK_NOTPRODUCT_FLAG_STRUCT, \
- IGNORE_RANGE, \
- IGNORE_CONSTRAINT, \
- IGNORE_WRITEABLE)
-#endif // SHARK
ARCH_FLAGS(ARCH_DEVELOP_FLAG_STRUCT, \
ARCH_PRODUCT_FLAG_STRUCT, \
ARCH_DIAGNOSTIC_FLAG_STRUCT, \
diff --git a/src/hotspot/share/runtime/globals.hpp b/src/hotspot/share/runtime/globals.hpp
--- a/src/hotspot/share/runtime/globals.hpp
+++ b/src/hotspot/share/runtime/globals.hpp
@@ -63,13 +63,8 @@
#include CPU_HEADER(c2_globals)
#include OS_HEADER(c2_globals)
#endif
-#ifdef SHARK
-#ifdef ZERO
-# include "shark_globals_zero.hpp"
-#endif
-#endif
-#if !defined(COMPILER1) && !defined(COMPILER2) && !defined(SHARK) && !INCLUDE_JVMCI
+#if !defined(COMPILER1) && !defined(COMPILER2) && !INCLUDE_JVMCI
define_pd_global(bool, BackgroundCompilation, false);
define_pd_global(bool, UseTLAB, false);
define_pd_global(bool, CICompileOSR, false);
@@ -147,13 +142,12 @@
KIND_C1 = 1 << 12,
KIND_C2 = 1 << 13,
KIND_ARCH = 1 << 14,
- KIND_SHARK = 1 << 15,
- KIND_LP64_PRODUCT = 1 << 16,
- KIND_COMMERCIAL = 1 << 17,
- KIND_JVMCI = 1 << 18,
+ KIND_LP64_PRODUCT = 1 << 15,
+ KIND_COMMERCIAL = 1 << 16,
+ KIND_JVMCI = 1 << 17,
// set this bit if the flag was set on the command line
- ORIG_COMMAND_LINE = 1 << 19,
+ ORIG_COMMAND_LINE = 1 << 18,
KIND_MASK = ~(VALUE_ORIGIN_MASK | ORIG_COMMAND_LINE)
};
diff --git a/src/hotspot/share/runtime/thread.cpp b/src/hotspot/share/runtime/thread.cpp
--- a/src/hotspot/share/runtime/thread.cpp
+++ b/src/hotspot/share/runtime/thread.cpp
@@ -3727,7 +3727,7 @@
}
// initialize compiler(s)
-#if defined(COMPILER1) || defined(COMPILER2) || defined(SHARK) || INCLUDE_JVMCI
+#if defined(COMPILER1) || defined(COMPILER2) || INCLUDE_JVMCI
CompileBroker::compilation_init(CHECK_JNI_ERR);
#endif
diff --git a/src/hotspot/share/runtime/vm_version.cpp b/src/hotspot/share/runtime/vm_version.cpp
--- a/src/hotspot/share/runtime/vm_version.cpp
+++ b/src/hotspot/share/runtime/vm_version.cpp
@@ -95,11 +95,7 @@
#define VMTYPE "Server"
#else // TIERED
#ifdef ZERO
- #ifdef SHARK
- #define VMTYPE "Shark"
- #else // SHARK
#define VMTYPE "Zero"
- #endif // SHARK
#else // ZERO
#define VMTYPE COMPILER1_PRESENT("Client") \
COMPILER2_PRESENT("Server")
diff --git a/src/hotspot/share/shark/llvmHeaders.hpp b/src/hotspot/share/shark/llvmHeaders.hpp
deleted file mode 100644
--- a/src/hotspot/share/shark/llvmHeaders.hpp
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
- * Copyright 2008, 2009, 2010 Red Hat, Inc.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-#ifndef SHARE_VM_SHARK_LLVMHEADERS_HPP
-#define SHARE_VM_SHARK_LLVMHEADERS_HPP
-
-#ifdef assert
- #undef assert
-#endif
-
-#ifdef DEBUG
- #define SHARK_DEBUG
- #undef DEBUG
-#endif
-
-#include
-#include
-
-// includes specific to each version
-#if SHARK_LLVM_VERSION <= 31
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#elif SHARK_LLVM_VERSION <= 32
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#else // SHARK_LLVM_VERSION <= 34
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#endif
-
-// common includes
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-#include