--- a/hotspot/make/lib/CompileJvm.gmk Thu Jun 22 23:39:18 2017 +0000
+++ b/hotspot/make/lib/CompileJvm.gmk Fri Jun 23 01:08:42 2017 +0000
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2013, 2017, 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
@@ -69,6 +69,7 @@
-DTARGET_ARCH_$(HOTSPOT_TARGET_CPU_ARCH) \
-DINCLUDE_SUFFIX_OS=_$(HOTSPOT_TARGET_OS) \
-DINCLUDE_SUFFIX_CPU=_$(HOTSPOT_TARGET_CPU_ARCH) \
+ -DINCLUDE_SUFFIX_COMPILER=_$(HOTSPOT_TOOLCHAIN_TYPE) \
-DTARGET_COMPILER_$(HOTSPOT_TOOLCHAIN_TYPE) \
-D$(HOTSPOT_TARGET_CPU_DEFINE) \
-DHOTSPOT_LIB_ARCH='"$(OPENJDK_TARGET_CPU_LEGACY_LIB)"' \
--- a/hotspot/src/cpu/aarch64/vm/macroAssembler_aarch64.cpp Thu Jun 22 23:39:18 2017 +0000
+++ b/hotspot/src/cpu/aarch64/vm/macroAssembler_aarch64.cpp Fri Jun 23 01:08:42 2017 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2017, 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.
*
@@ -38,6 +38,7 @@
#include "opto/compile.hpp"
#include "opto/intrinsicnode.hpp"
#include "opto/node.hpp"
+#include "prims/jvm.h"
#include "runtime/biasedLocking.hpp"
#include "runtime/icache.hpp"
#include "runtime/interfaceSupport.hpp"
@@ -2011,6 +2012,12 @@
hlt(0);
}
+void MacroAssembler::unimplemented(const char* what) {
+ char* b = new char[1024];
+ jio_snprintf(b, 1024, "unimplemented: %s", what);
+ stop(b);
+}
+
// If a constant does not fit in an immediate field, generate some
// number of MOV instructions and then perform the operation.
void MacroAssembler::wrap_add_sub_imm_insn(Register Rd, Register Rn, unsigned imm,
--- a/hotspot/src/cpu/aarch64/vm/macroAssembler_aarch64.hpp Thu Jun 22 23:39:18 2017 +0000
+++ b/hotspot/src/cpu/aarch64/vm/macroAssembler_aarch64.hpp Fri Jun 23 01:08:42 2017 +0000
@@ -941,7 +941,7 @@
void untested() { stop("untested"); }
- void unimplemented(const char* what = "") { char* b = new char[1024]; jio_snprintf(b, 1024, "unimplemented: %s", what); stop(b); }
+ void unimplemented(const char* what = "");
void should_not_reach_here() { stop("should not reach here"); }
--- a/hotspot/src/cpu/arm/vm/methodHandles_arm.cpp Thu Jun 22 23:39:18 2017 +0000
+++ b/hotspot/src/cpu/arm/vm/methodHandles_arm.cpp Fri Jun 23 01:08:42 2017 +0000
@@ -32,6 +32,7 @@
#include "interpreter/interpreterRuntime.hpp"
#include "memory/allocation.inline.hpp"
#include "memory/resourceArea.hpp"
+#include "prims/jvm.h"
#include "prims/methodHandles.hpp"
#define __ _masm->
--- a/hotspot/src/cpu/arm/vm/vm_version_arm_32.cpp Thu Jun 22 23:39:18 2017 +0000
+++ b/hotspot/src/cpu/arm/vm/vm_version_arm_32.cpp Fri Jun 23 01:08:42 2017 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2017, 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,7 @@
#include "precompiled.hpp"
#include "asm/macroAssembler.inline.hpp"
#include "memory/resourceArea.hpp"
+#include "prims/jvm.h"
#include "runtime/java.hpp"
#include "runtime/os.inline.hpp"
#include "runtime/stubCodeGenerator.hpp"
--- a/hotspot/src/cpu/arm/vm/vm_version_arm_64.cpp Thu Jun 22 23:39:18 2017 +0000
+++ b/hotspot/src/cpu/arm/vm/vm_version_arm_64.cpp Fri Jun 23 01:08:42 2017 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2017, 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,7 @@
#include "precompiled.hpp"
#include "asm/macroAssembler.inline.hpp"
#include "memory/resourceArea.hpp"
+#include "prims/jvm.h"
#include "runtime/java.hpp"
#include "runtime/os.inline.hpp"
#include "runtime/stubCodeGenerator.hpp"
--- a/hotspot/src/cpu/ppc/vm/methodHandles_ppc.cpp Thu Jun 22 23:39:18 2017 +0000
+++ b/hotspot/src/cpu/ppc/vm/methodHandles_ppc.cpp Fri Jun 23 01:08:42 2017 +0000
@@ -29,6 +29,7 @@
#include "interpreter/interpreter.hpp"
#include "memory/allocation.inline.hpp"
#include "memory/resourceArea.hpp"
+#include "prims/jvm.h"
#include "prims/methodHandles.hpp"
#define __ _masm->
--- a/hotspot/src/cpu/ppc/vm/vm_version_ppc.cpp Thu Jun 22 23:39:18 2017 +0000
+++ b/hotspot/src/cpu/ppc/vm/vm_version_ppc.cpp Fri Jun 23 01:08:42 2017 +0000
@@ -28,6 +28,7 @@
#include "asm/macroAssembler.inline.hpp"
#include "compiler/disassembler.hpp"
#include "memory/resourceArea.hpp"
+#include "prims/jvm.h"
#include "runtime/java.hpp"
#include "runtime/os.hpp"
#include "runtime/stubCodeGenerator.hpp"
--- a/hotspot/src/cpu/s390/vm/methodHandles_s390.cpp Thu Jun 22 23:39:18 2017 +0000
+++ b/hotspot/src/cpu/s390/vm/methodHandles_s390.cpp Fri Jun 23 01:08:42 2017 +0000
@@ -29,6 +29,7 @@
#include "interpreter/interpreter.hpp"
#include "memory/allocation.inline.hpp"
#include "memory/resourceArea.hpp"
+#include "prims/jvm.h"
#include "prims/methodHandles.hpp"
#ifdef PRODUCT
--- a/hotspot/src/cpu/s390/vm/vm_version_s390.cpp Thu Jun 22 23:39:18 2017 +0000
+++ b/hotspot/src/cpu/s390/vm/vm_version_s390.cpp Fri Jun 23 01:08:42 2017 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2017, 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,6 +28,7 @@
#include "compiler/disassembler.hpp"
#include "code/compiledIC.hpp"
#include "memory/resourceArea.hpp"
+#include "prims/jvm.h"
#include "runtime/java.hpp"
#include "runtime/stubCodeGenerator.hpp"
#include "vm_version_s390.hpp"
--- a/hotspot/src/cpu/sparc/vm/macroAssembler_sparc.cpp Thu Jun 22 23:39:18 2017 +0000
+++ b/hotspot/src/cpu/sparc/vm/macroAssembler_sparc.cpp Fri Jun 23 01:08:42 2017 +0000
@@ -31,6 +31,7 @@
#include "memory/resourceArea.hpp"
#include "memory/universe.hpp"
#include "oops/klass.inline.hpp"
+#include "prims/jvm.h"
#include "prims/methodHandles.hpp"
#include "runtime/biasedLocking.hpp"
#include "runtime/interfaceSupport.hpp"
@@ -1392,6 +1393,13 @@
}
+void MacroAssembler::unimplemented(const char* what) {
+ char* b = new char[1024];
+ jio_snprintf(b, 1024, "unimplemented: %s", what);
+ stop(b);
+}
+
+
void MacroAssembler::stop_subroutine() {
RegistersForDebugging::save_registers(this);
--- a/hotspot/src/cpu/sparc/vm/macroAssembler_sparc.hpp Thu Jun 22 23:39:18 2017 +0000
+++ b/hotspot/src/cpu/sparc/vm/macroAssembler_sparc.hpp Fri Jun 23 01:08:42 2017 +0000
@@ -1130,7 +1130,7 @@
void stop(const char* msg); // prints msg, dumps registers and stops execution
void warn(const char* msg); // prints msg, but don't stop
void untested(const char* what = "");
- void unimplemented(const char* what = "") { char* b = new char[1024]; jio_snprintf(b, 1024, "unimplemented: %s", what); stop(b); }
+ void unimplemented(const char* what = "");
void should_not_reach_here() { stop("should not reach here"); }
void print_CPU_state();
--- a/hotspot/src/cpu/sparc/vm/methodHandles_sparc.cpp Thu Jun 22 23:39:18 2017 +0000
+++ b/hotspot/src/cpu/sparc/vm/methodHandles_sparc.cpp Fri Jun 23 01:08:42 2017 +0000
@@ -29,6 +29,7 @@
#include "interpreter/interp_masm.hpp"
#include "memory/allocation.inline.hpp"
#include "memory/resourceArea.hpp"
+#include "prims/jvm.h"
#include "prims/methodHandles.hpp"
#define __ _masm->
--- a/hotspot/src/cpu/sparc/vm/vm_version_sparc.cpp Thu Jun 22 23:39:18 2017 +0000
+++ b/hotspot/src/cpu/sparc/vm/vm_version_sparc.cpp Fri Jun 23 01:08:42 2017 +0000
@@ -26,6 +26,7 @@
#include "asm/macroAssembler.inline.hpp"
#include "logging/log.hpp"
#include "memory/resourceArea.hpp"
+#include "prims/jvm.h"
#include "runtime/java.hpp"
#include "runtime/os.hpp"
#include "runtime/stubCodeGenerator.hpp"
--- a/hotspot/src/cpu/x86/vm/macroAssembler_x86.cpp Thu Jun 22 23:39:18 2017 +0000
+++ b/hotspot/src/cpu/x86/vm/macroAssembler_x86.cpp Fri Jun 23 01:08:42 2017 +0000
@@ -32,6 +32,7 @@
#include "memory/resourceArea.hpp"
#include "memory/universe.hpp"
#include "oops/klass.inline.hpp"
+#include "prims/jvm.h"
#include "prims/methodHandles.hpp"
#include "runtime/biasedLocking.hpp"
#include "runtime/interfaceSupport.hpp"
@@ -3640,6 +3641,12 @@
call(RuntimeAddress(CAST_FROM_FN_PTR(address, os::breakpoint)));
}
+void MacroAssembler::unimplemented(const char* what) {
+ char* b = new char[1024];
+ jio_snprintf(b, 1024, "unimplemented: %s", what);
+ stop(b);
+}
+
#ifdef _LP64
#define XSTATE_BV 0x200
#endif
--- a/hotspot/src/cpu/x86/vm/macroAssembler_x86.hpp Thu Jun 22 23:39:18 2017 +0000
+++ b/hotspot/src/cpu/x86/vm/macroAssembler_x86.hpp Fri Jun 23 01:08:42 2017 +0000
@@ -628,7 +628,7 @@
void untested() { stop("untested"); }
- void unimplemented(const char* what = "") { char* b = new char[1024]; jio_snprintf(b, 1024, "unimplemented: %s", what); stop(b); }
+ void unimplemented(const char* what = "");
void should_not_reach_here() { stop("should not reach here"); }
--- a/hotspot/src/cpu/x86/vm/methodHandles_x86.cpp Thu Jun 22 23:39:18 2017 +0000
+++ b/hotspot/src/cpu/x86/vm/methodHandles_x86.cpp Fri Jun 23 01:08:42 2017 +0000
@@ -29,6 +29,7 @@
#include "interpreter/interpreterRuntime.hpp"
#include "memory/allocation.inline.hpp"
#include "memory/resourceArea.hpp"
+#include "prims/jvm.h"
#include "prims/methodHandles.hpp"
#define __ _masm->
--- a/hotspot/src/cpu/x86/vm/vm_version_x86.cpp Thu Jun 22 23:39:18 2017 +0000
+++ b/hotspot/src/cpu/x86/vm/vm_version_x86.cpp Fri Jun 23 01:08:42 2017 +0000
@@ -27,6 +27,7 @@
#include "asm/macroAssembler.inline.hpp"
#include "logging/log.hpp"
#include "memory/resourceArea.hpp"
+#include "prims/jvm.h"
#include "runtime/java.hpp"
#include "runtime/os.hpp"
#include "runtime/stubCodeGenerator.hpp"
--- a/hotspot/src/os/bsd/vm/decoder_machO.cpp Thu Jun 22 23:39:18 2017 +0000
+++ b/hotspot/src/os/bsd/vm/decoder_machO.cpp Fri Jun 23 01:08:42 2017 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2017, 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,7 @@
#include "precompiled.hpp"
#ifdef __APPLE__
+#include "prims/jvm.h"
#include "decoder_machO.hpp"
#include <cxxabi.h>
--- a/hotspot/src/share/vm/aot/aotLoader.cpp Thu Jun 22 23:39:18 2017 +0000
+++ b/hotspot/src/share/vm/aot/aotLoader.cpp Fri Jun 23 01:08:42 2017 +0000
@@ -27,6 +27,7 @@
#include "aot/aotLoader.inline.hpp"
#include "jvmci/jvmciRuntime.hpp"
#include "oops/method.hpp"
+#include "prims/jvm.h"
#include "runtime/os.hpp"
GrowableArray<AOTCodeHeap*>* AOTLoader::_heaps = new(ResourceObj::C_HEAP, mtCode) GrowableArray<AOTCodeHeap*> (2, true);
--- a/hotspot/src/share/vm/c1/c1_CFGPrinter.cpp Thu Jun 22 23:39:18 2017 +0000
+++ b/hotspot/src/share/vm/c1/c1_CFGPrinter.cpp Fri Jun 23 01:08:42 2017 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2017, 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,6 +29,7 @@
#include "c1/c1_LIR.hpp"
#include "c1/c1_LinearScan.hpp"
#include "c1/c1_ValueStack.hpp"
+#include "prims/jvm.h"
#ifndef PRODUCT
--- a/hotspot/src/share/vm/ci/ciEnv.cpp Thu Jun 22 23:39:18 2017 +0000
+++ b/hotspot/src/share/vm/ci/ciEnv.cpp Fri Jun 23 01:08:42 2017 +0000
@@ -49,6 +49,7 @@
#include "oops/objArrayKlass.hpp"
#include "oops/objArrayOop.inline.hpp"
#include "oops/oop.inline.hpp"
+#include "prims/jvm.h"
#include "prims/jvmtiExport.hpp"
#include "runtime/init.hpp"
#include "runtime/reflection.hpp"
--- a/hotspot/src/share/vm/ci/ciReplay.cpp Thu Jun 22 23:39:18 2017 +0000
+++ b/hotspot/src/share/vm/ci/ciReplay.cpp Fri Jun 23 01:08:42 2017 +0000
@@ -33,6 +33,7 @@
#include "memory/oopFactory.hpp"
#include "memory/resourceArea.hpp"
#include "oops/oop.inline.hpp"
+#include "prims/jvm.h"
#include "utilities/copy.hpp"
#include "utilities/macros.hpp"
--- a/hotspot/src/share/vm/classfile/classLoader.cpp Thu Jun 22 23:39:18 2017 +0000
+++ b/hotspot/src/share/vm/classfile/classLoader.cpp Fri Jun 23 01:08:42 2017 +0000
@@ -51,6 +51,7 @@
#include "oops/objArrayOop.inline.hpp"
#include "oops/oop.inline.hpp"
#include "oops/symbol.hpp"
+#include "prims/jvm.h"
#include "prims/jvm_misc.hpp"
#include "runtime/arguments.hpp"
#include "runtime/compilationPolicy.hpp"
--- a/hotspot/src/share/vm/classfile/modules.cpp Thu Jun 22 23:39:18 2017 +0000
+++ b/hotspot/src/share/vm/classfile/modules.cpp Fri Jun 23 01:08:42 2017 +0000
@@ -39,6 +39,7 @@
#include "logging/log.hpp"
#include "memory/resourceArea.hpp"
#include "oops/instanceKlass.hpp"
+#include "prims/jvm.h"
#include "runtime/arguments.hpp"
#include "runtime/handles.inline.hpp"
#include "runtime/javaCalls.hpp"
--- a/hotspot/src/share/vm/classfile/systemDictionary.cpp Thu Jun 22 23:39:18 2017 +0000
+++ b/hotspot/src/share/vm/classfile/systemDictionary.cpp Fri Jun 23 01:08:42 2017 +0000
@@ -58,6 +58,7 @@
#include "oops/oop.inline.hpp"
#include "oops/symbol.hpp"
#include "oops/typeArrayKlass.hpp"
+#include "prims/jvm.h"
#include "prims/jvmtiEnvBase.hpp"
#include "prims/resolvedMethodTable.hpp"
#include "prims/methodHandles.hpp"
--- a/hotspot/src/share/vm/classfile/vmSymbols.cpp Thu Jun 22 23:39:18 2017 +0000
+++ b/hotspot/src/share/vm/classfile/vmSymbols.cpp Fri Jun 23 01:08:42 2017 +0000
@@ -27,6 +27,7 @@
#include "compiler/compilerDirectives.hpp"
#include "memory/oopFactory.hpp"
#include "oops/oop.inline.hpp"
+#include "prims/jvm.h"
#include "runtime/handles.inline.hpp"
#include "utilities/xmlstream.hpp"
--- a/hotspot/src/share/vm/code/codeBlob.cpp Thu Jun 22 23:39:18 2017 +0000
+++ b/hotspot/src/share/vm/code/codeBlob.cpp Fri Jun 23 01:08:42 2017 +0000
@@ -33,6 +33,7 @@
#include "memory/resourceArea.hpp"
#include "oops/oop.inline.hpp"
#include "prims/forte.hpp"
+#include "prims/jvm.h"
#include "runtime/handles.inline.hpp"
#include "runtime/interfaceSupport.hpp"
#include "runtime/mutexLocker.hpp"
--- a/hotspot/src/share/vm/code/nmethod.cpp Thu Jun 22 23:39:18 2017 +0000
+++ b/hotspot/src/share/vm/code/nmethod.cpp Fri Jun 23 01:08:42 2017 +0000
@@ -40,6 +40,7 @@
#include "memory/resourceArea.hpp"
#include "oops/methodData.hpp"
#include "oops/oop.inline.hpp"
+#include "prims/jvm.h"
#include "prims/jvmtiImpl.hpp"
#include "runtime/atomic.hpp"
#include "runtime/orderAccess.inline.hpp"
--- a/hotspot/src/share/vm/compiler/compileBroker.cpp Thu Jun 22 23:39:18 2017 +0000
+++ b/hotspot/src/share/vm/compiler/compileBroker.cpp Fri Jun 23 01:08:42 2017 +0000
@@ -38,6 +38,7 @@
#include "oops/methodData.hpp"
#include "oops/method.hpp"
#include "oops/oop.inline.hpp"
+#include "prims/jvm.h"
#include "prims/nativeLookup.hpp"
#include "prims/whitebox.hpp"
#include "runtime/arguments.hpp"
@@ -51,8 +52,10 @@
#include "runtime/sweeper.hpp"
#include "runtime/timerTrace.hpp"
#include "trace/tracing.hpp"
+#include "utilities/debug.hpp"
#include "utilities/dtrace.hpp"
#include "utilities/events.hpp"
+#include "utilities/formatBuffer.hpp"
#ifdef COMPILER1
#include "c1/c1_Compiler.hpp"
#endif
--- a/hotspot/src/share/vm/compiler/compileLog.cpp Thu Jun 22 23:39:18 2017 +0000
+++ b/hotspot/src/share/vm/compiler/compileLog.cpp Fri Jun 23 01:08:42 2017 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2017, 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/compileLog.hpp"
#include "memory/allocation.inline.hpp"
#include "oops/method.hpp"
+#include "prims/jvm.h"
#include "runtime/mutexLocker.hpp"
#include "runtime/os.hpp"
--- a/hotspot/src/share/vm/compiler/compilerOracle.cpp Thu Jun 22 23:39:18 2017 +0000
+++ b/hotspot/src/share/vm/compiler/compilerOracle.cpp Fri Jun 23 01:08:42 2017 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, 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
@@ -31,6 +31,7 @@
#include "oops/klass.hpp"
#include "oops/method.hpp"
#include "oops/symbol.hpp"
+#include "prims/jvm.h"
#include "runtime/handles.inline.hpp"
#include "runtime/jniHandles.hpp"
#include "runtime/os.hpp"
--- a/hotspot/src/share/vm/gc/g1/heapRegionRemSet.cpp Thu Jun 22 23:39:18 2017 +0000
+++ b/hotspot/src/share/vm/gc/g1/heapRegionRemSet.cpp Fri Jun 23 01:08:42 2017 +0000
@@ -35,6 +35,8 @@
#include "oops/oop.inline.hpp"
#include "runtime/atomic.hpp"
#include "utilities/bitMap.inline.hpp"
+#include "utilities/debug.hpp"
+#include "utilities/formatBuffer.hpp"
#include "utilities/globalDefinitions.hpp"
#include "utilities/growableArray.hpp"
--- a/hotspot/src/share/vm/gc/g1/satbMarkQueue.cpp Thu Jun 22 23:39:18 2017 +0000
+++ b/hotspot/src/share/vm/gc/g1/satbMarkQueue.cpp Fri Jun 23 01:08:42 2017 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2017, 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 "gc/shared/collectedHeap.hpp"
#include "memory/allocation.inline.hpp"
#include "oops/oop.inline.hpp"
+#include "prims/jvm.h"
#include "runtime/mutexLocker.hpp"
#include "runtime/safepoint.hpp"
#include "runtime/thread.hpp"
--- a/hotspot/src/share/vm/gc/parallel/psParallelCompact.cpp Thu Jun 22 23:39:18 2017 +0000
+++ b/hotspot/src/share/vm/gc/parallel/psParallelCompact.cpp Fri Jun 23 01:08:42 2017 +0000
@@ -66,7 +66,9 @@
#include "services/management.hpp"
#include "services/memTracker.hpp"
#include "services/memoryService.hpp"
+#include "utilities/debug.hpp"
#include "utilities/events.hpp"
+#include "utilities/formatBuffer.hpp"
#include "utilities/stack.inline.hpp"
#include <math.h>
--- a/hotspot/src/share/vm/gc/shared/ageTable.cpp Thu Jun 22 23:39:18 2017 +0000
+++ b/hotspot/src/share/vm/gc/shared/ageTable.cpp Fri Jun 23 01:08:42 2017 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2017, 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,6 +30,7 @@
#include "memory/resourceArea.hpp"
#include "logging/log.hpp"
#include "oops/oop.inline.hpp"
+#include "prims/jvm.h"
#include "utilities/copy.hpp"
/* Copyright (c) 1992, 2016, Oracle and/or its affiliates, and Stanford University.
--- a/hotspot/src/share/vm/gc/shared/collectedHeap.hpp Thu Jun 22 23:39:18 2017 +0000
+++ b/hotspot/src/share/vm/gc/shared/collectedHeap.hpp Fri Jun 23 01:08:42 2017 +0000
@@ -31,7 +31,9 @@
#include "runtime/handles.hpp"
#include "runtime/perfData.hpp"
#include "runtime/safepoint.hpp"
+#include "utilities/debug.hpp"
#include "utilities/events.hpp"
+#include "utilities/formatBuffer.hpp"
// A "CollectedHeap" is an implementation of a java heap for HotSpot. This
// is an abstract class: there may be many different kinds of heaps. This
--- a/hotspot/src/share/vm/gc/shared/gcId.cpp Thu Jun 22 23:39:18 2017 +0000
+++ b/hotspot/src/share/vm/gc/shared/gcId.cpp Fri Jun 23 01:08:42 2017 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2017, 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
@@ -24,6 +24,7 @@
#include "precompiled.hpp"
#include "gc/shared/gcId.hpp"
+#include "prims/jvm.h"
#include "runtime/safepoint.hpp"
#include "runtime/thread.inline.hpp"
--- a/hotspot/src/share/vm/gc/shared/genCollectedHeap.cpp Thu Jun 22 23:39:18 2017 +0000
+++ b/hotspot/src/share/vm/gc/shared/genCollectedHeap.cpp Fri Jun 23 01:08:42 2017 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2017, 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,6 +53,8 @@
#include "runtime/vmThread.hpp"
#include "services/management.hpp"
#include "services/memoryService.hpp"
+#include "utilities/debug.hpp"
+#include "utilities/formatBuffer.hpp"
#include "utilities/macros.hpp"
#include "utilities/stack.inline.hpp"
#include "utilities/vmError.hpp"
--- a/hotspot/src/share/vm/interpreter/linkResolver.cpp Thu Jun 22 23:39:18 2017 +0000
+++ b/hotspot/src/share/vm/interpreter/linkResolver.cpp Fri Jun 23 01:08:42 2017 +0000
@@ -40,6 +40,7 @@
#include "oops/method.hpp"
#include "oops/objArrayOop.hpp"
#include "oops/oop.inline.hpp"
+#include "prims/jvm.h"
#include "prims/methodHandles.hpp"
#include "prims/nativeLookup.hpp"
#include "runtime/compilationPolicy.hpp"
--- a/hotspot/src/share/vm/jvmci/jvmciCompiler.cpp Thu Jun 22 23:39:18 2017 +0000
+++ b/hotspot/src/share/vm/jvmci/jvmciCompiler.cpp Fri Jun 23 01:08:42 2017 +0000
@@ -25,6 +25,7 @@
#include "memory/oopFactory.hpp"
#include "memory/resourceArea.hpp"
#include "oops/oop.inline.hpp"
+#include "prims/jvm.h"
#include "runtime/javaCalls.hpp"
#include "runtime/handles.hpp"
#include "jvmci/jvmciJavaClasses.hpp"
--- a/hotspot/src/share/vm/jvmci/jvmci_globals.cpp Thu Jun 22 23:39:18 2017 +0000
+++ b/hotspot/src/share/vm/jvmci/jvmci_globals.cpp Fri Jun 23 01:08:42 2017 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2017, 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
@@ -24,6 +24,7 @@
#include "precompiled.hpp"
#include "jvmci/jvmci_globals.hpp"
+#include "prims/jvm.h"
#include "utilities/defaultStream.hpp"
#include "runtime/globals_extension.hpp"
--- a/hotspot/src/share/vm/logging/logConfiguration.cpp Thu Jun 22 23:39:18 2017 +0000
+++ b/hotspot/src/share/vm/logging/logConfiguration.cpp Fri Jun 23 01:08:42 2017 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017, 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
@@ -34,6 +34,7 @@
#include "logging/logTagSet.hpp"
#include "memory/allocation.inline.hpp"
#include "memory/resourceArea.hpp"
+#include "prims/jvm.h"
#include "runtime/os.inline.hpp"
#include "runtime/semaphore.hpp"
#include "utilities/globalDefinitions.hpp"
--- a/hotspot/src/share/vm/logging/logDecorations.cpp Thu Jun 22 23:39:18 2017 +0000
+++ b/hotspot/src/share/vm/logging/logDecorations.cpp Fri Jun 23 01:08:42 2017 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017, 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
@@ -24,6 +24,7 @@
#include "precompiled.hpp"
#include "logging/logConfiguration.hpp"
#include "logging/logDecorations.hpp"
+#include "prims/jvm.h"
#include "runtime/os.inline.hpp"
#include "runtime/thread.inline.hpp"
#include "services/management.hpp"
--- a/hotspot/src/share/vm/logging/logFileOutput.cpp Thu Jun 22 23:39:18 2017 +0000
+++ b/hotspot/src/share/vm/logging/logFileOutput.cpp Fri Jun 23 01:08:42 2017 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017, 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 "logging/logConfiguration.hpp"
#include "logging/logFileOutput.hpp"
#include "memory/allocation.inline.hpp"
+#include "prims/jvm.h"
#include "runtime/arguments.hpp"
#include "runtime/os.inline.hpp"
#include "utilities/globalDefinitions.hpp"
--- a/hotspot/src/share/vm/logging/logFileStreamOutput.cpp Thu Jun 22 23:39:18 2017 +0000
+++ b/hotspot/src/share/vm/logging/logFileStreamOutput.cpp Fri Jun 23 01:08:42 2017 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017, 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,6 +27,7 @@
#include "logging/logFileStreamOutput.hpp"
#include "logging/logMessageBuffer.hpp"
#include "memory/allocation.inline.hpp"
+#include "prims/jvm.h"
static bool initialized;
static union {
--- a/hotspot/src/share/vm/logging/logOutput.cpp Thu Jun 22 23:39:18 2017 +0000
+++ b/hotspot/src/share/vm/logging/logOutput.cpp Fri Jun 23 01:08:42 2017 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017, 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 "logging/logOutput.hpp"
#include "logging/logTagSet.hpp"
#include "memory/allocation.inline.hpp"
+#include "prims/jvm.h"
#include "runtime/mutexLocker.hpp"
#include "runtime/os.inline.hpp"
--- a/hotspot/src/share/vm/logging/logTagSet.cpp Thu Jun 22 23:39:18 2017 +0000
+++ b/hotspot/src/share/vm/logging/logTagSet.cpp Fri Jun 23 01:08:42 2017 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017, 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
@@ -31,6 +31,7 @@
#include "logging/logTagSet.hpp"
#include "logging/logTagSetDescriptions.hpp"
#include "memory/allocation.inline.hpp"
+#include "prims/jvm.h"
#include "utilities/ostream.hpp"
LogTagSet* LogTagSet::_list = NULL;
--- a/hotspot/src/share/vm/memory/filemap.cpp Thu Jun 22 23:39:18 2017 +0000
+++ b/hotspot/src/share/vm/memory/filemap.cpp Fri Jun 23 01:08:42 2017 +0000
@@ -38,6 +38,7 @@
#include "memory/metadataFactory.hpp"
#include "memory/oopFactory.hpp"
#include "oops/objArrayOop.hpp"
+#include "prims/jvm.h"
#include "prims/jvmtiExport.hpp"
#include "runtime/arguments.hpp"
#include "runtime/java.hpp"
--- a/hotspot/src/share/vm/memory/metaspaceShared.cpp Thu Jun 22 23:39:18 2017 +0000
+++ b/hotspot/src/share/vm/memory/metaspaceShared.cpp Fri Jun 23 01:08:42 2017 +0000
@@ -49,6 +49,7 @@
#include "oops/objArrayOop.hpp"
#include "oops/oop.inline.hpp"
#include "oops/typeArrayKlass.hpp"
+#include "prims/jvm.h"
#include "runtime/timerTrace.hpp"
#include "runtime/os.hpp"
#include "runtime/signature.hpp"
--- a/hotspot/src/share/vm/memory/universe.cpp Thu Jun 22 23:39:18 2017 +0000
+++ b/hotspot/src/share/vm/memory/universe.cpp Fri Jun 23 01:08:42 2017 +0000
@@ -73,7 +73,9 @@
#include "runtime/vm_operations.hpp"
#include "services/memoryService.hpp"
#include "utilities/copy.hpp"
+#include "utilities/debug.hpp"
#include "utilities/events.hpp"
+#include "utilities/formatBuffer.hpp"
#include "utilities/hashtable.inline.hpp"
#include "utilities/macros.hpp"
#include "utilities/ostream.hpp"
--- a/hotspot/src/share/vm/oops/constantPool.cpp Thu Jun 22 23:39:18 2017 +0000
+++ b/hotspot/src/share/vm/oops/constantPool.cpp Fri Jun 23 01:08:42 2017 +0000
@@ -39,6 +39,7 @@
#include "oops/objArrayKlass.hpp"
#include "oops/objArrayOop.inline.hpp"
#include "oops/oop.inline.hpp"
+#include "prims/jvm.h"
#include "runtime/fieldType.hpp"
#include "runtime/init.hpp"
#include "runtime/javaCalls.hpp"
--- a/hotspot/src/share/vm/oops/generateOopMap.cpp Thu Jun 22 23:39:18 2017 +0000
+++ b/hotspot/src/share/vm/oops/generateOopMap.cpp Fri Jun 23 01:08:42 2017 +0000
@@ -28,6 +28,7 @@
#include "oops/generateOopMap.hpp"
#include "oops/oop.inline.hpp"
#include "oops/symbol.hpp"
+#include "prims/jvm.h"
#include "runtime/handles.inline.hpp"
#include "runtime/java.hpp"
#include "runtime/relocator.hpp"
--- a/hotspot/src/share/vm/oops/instanceKlass.cpp Thu Jun 22 23:39:18 2017 +0000
+++ b/hotspot/src/share/vm/oops/instanceKlass.cpp Fri Jun 23 01:08:42 2017 +0000
@@ -57,6 +57,7 @@
#include "oops/method.hpp"
#include "oops/oop.inline.hpp"
#include "oops/symbol.hpp"
+#include "prims/jvm.h"
#include "prims/jvmtiExport.hpp"
#include "prims/jvmtiRedefineClasses.hpp"
#include "prims/jvmtiThreadState.hpp"
--- a/hotspot/src/share/vm/oops/klassVtable.cpp Thu Jun 22 23:39:18 2017 +0000
+++ b/hotspot/src/share/vm/oops/klassVtable.cpp Fri Jun 23 01:08:42 2017 +0000
@@ -35,6 +35,7 @@
#include "oops/method.hpp"
#include "oops/objArrayOop.hpp"
#include "oops/oop.inline.hpp"
+#include "prims/jvm.h"
#include "runtime/arguments.hpp"
#include "runtime/handles.inline.hpp"
#include "utilities/copy.hpp"
--- a/hotspot/src/share/vm/prims/jniCheck.cpp Thu Jun 22 23:39:18 2017 +0000
+++ b/hotspot/src/share/vm/prims/jniCheck.cpp Fri Jun 23 01:08:42 2017 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2017, 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,6 +32,7 @@
#include "oops/symbol.hpp"
#include "prims/jni.h"
#include "prims/jniCheck.hpp"
+#include "prims/jvm.h"
#include "prims/jvm_misc.hpp"
#include "runtime/fieldDescriptor.hpp"
#include "runtime/handles.hpp"
--- a/hotspot/src/share/vm/prims/methodHandles.hpp Thu Jun 22 23:39:18 2017 +0000
+++ b/hotspot/src/share/vm/prims/methodHandles.hpp Fri Jun 23 01:08:42 2017 +0000
@@ -27,6 +27,7 @@
#include "classfile/javaClasses.hpp"
#include "classfile/vmSymbols.hpp"
+#include "prims/jvm.h"
#include "runtime/frame.inline.hpp"
#include "runtime/globals.hpp"
#include "runtime/interfaceSupport.hpp"
--- a/hotspot/src/share/vm/runtime/arguments.cpp Thu Jun 22 23:39:18 2017 +0000
+++ b/hotspot/src/share/vm/runtime/arguments.cpp Fri Jun 23 01:08:42 2017 +0000
@@ -39,6 +39,7 @@
#include "memory/allocation.inline.hpp"
#include "memory/universe.inline.hpp"
#include "oops/oop.inline.hpp"
+#include "prims/jvm.h"
#include "prims/jvmtiExport.hpp"
#include "runtime/arguments.hpp"
#include "runtime/arguments_ext.hpp"
--- a/hotspot/src/share/vm/runtime/commandLineFlagRangeList.cpp Thu Jun 22 23:39:18 2017 +0000
+++ b/hotspot/src/share/vm/runtime/commandLineFlagRangeList.cpp Fri Jun 23 01:08:42 2017 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017, 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 "classfile/stringTable.hpp"
#include "classfile/symbolTable.hpp"
#include "gc/shared/referenceProcessor.hpp"
+#include "prims/jvm.h"
#include "runtime/arguments.hpp"
#include "runtime/commandLineFlagConstraintList.hpp"
#include "runtime/commandLineFlagRangeList.hpp"
--- a/hotspot/src/share/vm/runtime/deoptimization.cpp Thu Jun 22 23:39:18 2017 +0000
+++ b/hotspot/src/share/vm/runtime/deoptimization.cpp Fri Jun 23 01:08:42 2017 +0000
@@ -40,6 +40,7 @@
#include "oops/oop.inline.hpp"
#include "oops/fieldStreams.hpp"
#include "oops/verifyOopClosure.hpp"
+#include "prims/jvm.h"
#include "prims/jvmtiThreadState.hpp"
#include "runtime/biasedLocking.hpp"
#include "runtime/compilationPolicy.hpp"
--- a/hotspot/src/share/vm/runtime/frame.cpp Thu Jun 22 23:39:18 2017 +0000
+++ b/hotspot/src/share/vm/runtime/frame.cpp Fri Jun 23 01:08:42 2017 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2017, 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
@@ -48,7 +48,9 @@
#include "runtime/stubCodeGenerator.hpp"
#include "runtime/stubRoutines.hpp"
#include "runtime/thread.inline.hpp"
+#include "utilities/debug.hpp"
#include "utilities/decoder.hpp"
+#include "utilities/formatBuffer.hpp"
RegisterMap::RegisterMap(JavaThread *thread, bool update_map) {
_thread = thread;
--- a/hotspot/src/share/vm/runtime/globals.cpp Thu Jun 22 23:39:18 2017 +0000
+++ b/hotspot/src/share/vm/runtime/globals.cpp Fri Jun 23 01:08:42 2017 +0000
@@ -25,6 +25,7 @@
#include "precompiled.hpp"
#include "memory/allocation.inline.hpp"
#include "oops/oop.inline.hpp"
+#include "prims/jvm.h"
#include "runtime/arguments.hpp"
#include "runtime/globals.hpp"
#include "runtime/globals_extension.hpp"
--- a/hotspot/src/share/vm/runtime/globals.hpp Thu Jun 22 23:39:18 2017 +0000
+++ b/hotspot/src/share/vm/runtime/globals.hpp Fri Jun 23 01:08:42 2017 +0000
@@ -25,7 +25,7 @@
#ifndef SHARE_VM_RUNTIME_GLOBALS_HPP
#define SHARE_VM_RUNTIME_GLOBALS_HPP
-#include "utilities/debug.hpp"
+#include "utilities/globalDefinitions.hpp"
#include "utilities/macros.hpp"
#include <float.h> // for DBL_MAX
--- a/hotspot/src/share/vm/runtime/java.cpp Thu Jun 22 23:39:18 2017 +0000
+++ b/hotspot/src/share/vm/runtime/java.cpp Fri Jun 23 01:08:42 2017 +0000
@@ -48,6 +48,7 @@
#include "oops/objArrayOop.hpp"
#include "oops/oop.inline.hpp"
#include "oops/symbol.hpp"
+#include "prims/jvm.h"
#include "prims/jvmtiExport.hpp"
#include "runtime/arguments.hpp"
#include "runtime/biasedLocking.hpp"
--- a/hotspot/src/share/vm/runtime/perfData.cpp Thu Jun 22 23:39:18 2017 +0000
+++ b/hotspot/src/share/vm/runtime/perfData.cpp Fri Jun 23 01:08:42 2017 +0000
@@ -26,6 +26,7 @@
#include "classfile/vmSymbols.hpp"
#include "logging/log.hpp"
#include "oops/oop.inline.hpp"
+#include "prims/jvm.h"
#include "runtime/handles.inline.hpp"
#include "runtime/java.hpp"
#include "runtime/mutex.hpp"
--- a/hotspot/src/share/vm/runtime/perfMemory.cpp Thu Jun 22 23:39:18 2017 +0000
+++ b/hotspot/src/share/vm/runtime/perfMemory.cpp Fri Jun 23 01:08:42 2017 +0000
@@ -25,6 +25,7 @@
#include "precompiled.hpp"
#include "logging/log.hpp"
#include "memory/allocation.inline.hpp"
+#include "prims/jvm.h"
#include "runtime/arguments.hpp"
#include "runtime/java.hpp"
#include "runtime/mutex.hpp"
--- a/hotspot/src/share/vm/runtime/sharedRuntime.cpp Thu Jun 22 23:39:18 2017 +0000
+++ b/hotspot/src/share/vm/runtime/sharedRuntime.cpp Fri Jun 23 01:08:42 2017 +0000
@@ -45,6 +45,7 @@
#include "oops/objArrayKlass.hpp"
#include "oops/oop.inline.hpp"
#include "prims/forte.hpp"
+#include "prims/jvm.h"
#include "prims/jvmtiExport.hpp"
#include "prims/methodHandles.hpp"
#include "prims/nativeLookup.hpp"
--- a/hotspot/src/share/vm/runtime/thread.cpp Thu Jun 22 23:39:18 2017 +0000
+++ b/hotspot/src/share/vm/runtime/thread.cpp Fri Jun 23 01:08:42 2017 +0000
@@ -50,6 +50,7 @@
#include "oops/oop.inline.hpp"
#include "oops/symbol.hpp"
#include "oops/verifyOopClosure.hpp"
+#include "prims/jvm.h"
#include "prims/jvm_misc.hpp"
#include "prims/jvmtiExport.hpp"
#include "prims/jvmtiThreadState.hpp"
--- a/hotspot/src/share/vm/services/attachListener.cpp Thu Jun 22 23:39:18 2017 +0000
+++ b/hotspot/src/share/vm/services/attachListener.cpp Fri Jun 23 01:08:42 2017 +0000
@@ -38,6 +38,8 @@
#include "services/diagnosticCommand.hpp"
#include "services/heapDumper.hpp"
#include "services/writeableFlags.hpp"
+#include "utilities/debug.hpp"
+#include "utilities/formatBuffer.hpp"
volatile bool AttachListener::_initialized;
--- a/hotspot/src/share/vm/services/diagnosticArgument.cpp Thu Jun 22 23:39:18 2017 +0000
+++ b/hotspot/src/share/vm/services/diagnosticArgument.cpp Fri Jun 23 01:08:42 2017 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2017, 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,7 @@
#include "precompiled.hpp"
#include "memory/allocation.inline.hpp"
#include "memory/resourceArea.hpp"
+#include "prims/jvm.h"
#include "runtime/thread.hpp"
#include "services/diagnosticArgument.hpp"
--- a/hotspot/src/share/vm/services/diagnosticCommand.cpp Thu Jun 22 23:39:18 2017 +0000
+++ b/hotspot/src/share/vm/services/diagnosticCommand.cpp Fri Jun 23 01:08:42 2017 +0000
@@ -30,6 +30,7 @@
#include "gc/shared/vmGCOperations.hpp"
#include "memory/resourceArea.hpp"
#include "oops/oop.inline.hpp"
+#include "prims/jvm.h"
#include "runtime/globals.hpp"
#include "runtime/javaCalls.hpp"
#include "runtime/os.hpp"
@@ -39,6 +40,8 @@
#include "services/heapDumper.hpp"
#include "services/management.hpp"
#include "services/writeableFlags.hpp"
+#include "utilities/debug.hpp"
+#include "utilities/formatBuffer.hpp"
#include "utilities/macros.hpp"
#include "oops/objArrayOop.inline.hpp"
--- a/hotspot/src/share/vm/services/diagnosticFramework.cpp Thu Jun 22 23:39:18 2017 +0000
+++ b/hotspot/src/share/vm/services/diagnosticFramework.cpp Fri Jun 23 01:08:42 2017 +0000
@@ -26,6 +26,7 @@
#include "memory/oopFactory.hpp"
#include "memory/resourceArea.hpp"
#include "oops/oop.inline.hpp"
+#include "prims/jvm.h"
#include "runtime/javaCalls.hpp"
#include "runtime/mutexLocker.hpp"
#include "services/diagnosticArgument.hpp"
--- a/hotspot/src/share/vm/services/heapDumper.cpp Thu Jun 22 23:39:18 2017 +0000
+++ b/hotspot/src/share/vm/services/heapDumper.cpp Fri Jun 23 01:08:42 2017 +0000
@@ -34,6 +34,7 @@
#include "oops/objArrayKlass.hpp"
#include "oops/objArrayOop.inline.hpp"
#include "oops/oop.inline.hpp"
+#include "prims/jvm.h"
#include "runtime/javaCalls.hpp"
#include "runtime/jniHandles.hpp"
#include "runtime/os.hpp"
--- a/hotspot/src/share/vm/services/management.cpp Thu Jun 22 23:39:18 2017 +0000
+++ b/hotspot/src/share/vm/services/management.cpp Fri Jun 23 01:08:42 2017 +0000
@@ -56,6 +56,8 @@
#include "services/memoryService.hpp"
#include "services/runtimeService.hpp"
#include "services/threadService.hpp"
+#include "utilities/debug.hpp"
+#include "utilities/formatBuffer.hpp"
#include "utilities/macros.hpp"
PerfVariable* Management::_begin_vm_creation_time = NULL;
--- a/hotspot/src/share/vm/services/memTracker.cpp Thu Jun 22 23:39:18 2017 +0000
+++ b/hotspot/src/share/vm/services/memTracker.cpp Fri Jun 23 01:08:42 2017 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2017, 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
@@ -23,6 +23,7 @@
*/
#include "precompiled.hpp"
+#include "prims/jvm.h"
#include "runtime/mutex.hpp"
#include "services/memBaseline.hpp"
#include "services/memReporter.hpp"
--- a/hotspot/src/share/vm/services/writeableFlags.hpp Thu Jun 22 23:39:18 2017 +0000
+++ b/hotspot/src/share/vm/services/writeableFlags.hpp Fri Jun 23 01:08:42 2017 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017, 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,9 @@
#ifndef SHARE_VM_SERVICES_WRITEABLEFLAG_HPP
#define SHARE_VM_SERVICES_WRITEABLEFLAG_HPP
+#include "runtime/globals.hpp"
+#include "utilities/formatBuffer.hpp"
+
class WriteableFlags : AllStatic {
private:
// a writeable flag setter accepting either 'jvalue' or 'char *' values
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/src/share/vm/utilities/breakpoint.hpp Fri Jun 23 01:08:42 2017 +0000
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2017, 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
+ * 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_UTILITIES_BREAKPOINT_HPP
+#define SHARE_VM_UTILITIES_BREAKPOINT_HPP
+
+// Provide BREAKPOINT macro for requesting stop in the debugger.
+
+// We presently only have one non-default definition, so it's not
+// worth going through the COMPILER_HEADER() dispatch, with all
+// non-visCPP files being empty.
+#ifdef TARGET_COMPILER_visCPP
+#ifndef _WIN64
+#define BREAKPOINT __asm { int 3 }
+#endif // _WIN64
+#endif // TARGET_COMPILER_visCPP
+
+// If no more specific definition provided, default to calling a
+// function that is defined per-platform. See also os::breakpoint().
+#ifndef BREAKPOINT
+extern "C" void breakpoint();
+#define BREAKPOINT ::breakpoint()
+#endif
+
+#endif // SHARE_VM_UTILITIES_BREAKPOINT_HPP
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/src/share/vm/utilities/compilerWarnings.hpp Fri Jun 23 01:08:42 2017 +0000
@@ -0,0 +1,87 @@
+/*
+ * Copyright (c) 2017, 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
+ * 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_UTILITIES_COMPILERWARNINGS_HPP
+#define SHARE_VM_UTILITIES_COMPILERWARNINGS_HPP
+
+// Macros related to control of compiler warnings.
+
+// We presently only have interesting macros here for gcc and variants,
+// so it's not worth going through the COMPILER_HEADER() dispatch, with
+// all the non-gcc files being empty.
+#ifdef TARGET_COMPILER_gcc
+
+// Diagnostic pragmas like the ones defined below in PRAGMA_FORMAT_NONLITERAL_IGNORED
+// were only introduced in GCC 4.2. Because we have no other possibility to ignore
+// these warnings for older versions of GCC, we simply don't decorate our printf-style
+// functions with __attribute__(format) in that case.
+#if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 2)) || (__GNUC__ > 4)
+#ifndef ATTRIBUTE_PRINTF
+#define ATTRIBUTE_PRINTF(fmt,vargs) __attribute__((format(printf, fmt, vargs)))
+#endif
+#ifndef ATTRIBUTE_SCANF
+#define ATTRIBUTE_SCANF(fmt,vargs) __attribute__((format(scanf, fmt, vargs)))
+#endif
+#endif // gcc version check
+
+#define PRAGMA_FORMAT_NONLITERAL_IGNORED _Pragma("GCC diagnostic ignored \"-Wformat-nonliteral\"") \
+ _Pragma("GCC diagnostic ignored \"-Wformat-security\"")
+#define PRAGMA_FORMAT_IGNORED _Pragma("GCC diagnostic ignored \"-Wformat\"")
+
+#if defined(__clang_major__) && \
+ (__clang_major__ >= 4 || \
+ (__clang_major__ >= 3 && __clang_minor__ >= 1)) || \
+ ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4)
+// Tested to work with clang version 3.1 and better.
+#define PRAGMA_DIAG_PUSH _Pragma("GCC diagnostic push")
+#define PRAGMA_DIAG_POP _Pragma("GCC diagnostic pop")
+
+#endif // clang/gcc version check
+
+#endif // TARGET_COMPILER_gcc
+
+// Defaults when not defined for the TARGET_COMPILER_xxx.
+
+#ifndef ATTRIBUTE_PRINTF
+#define ATTRIBUTE_PRINTF(fmt, vargs)
+#endif
+#ifndef ATTRIBUTE_SCANF
+#define ATTRIBUTE_SCANF(fmt, vargs)
+#endif
+
+#ifndef PRAGMA_FORMAT_NONLITERAL_IGNORED
+#define PRAGMA_FORMAT_NONLITERAL_IGNORED
+#endif
+#ifndef PRAGMA_FORMAT_IGNORED
+#define PRAGMA_FORMAT_IGNORED
+#endif
+
+#ifndef PRAGMA_DIAG_PUSH
+#define PRAGMA_DIAG_PUSH
+#endif
+#ifndef PRAGMA_DIAG_POP
+#define PRAGMA_DIAG_POP
+#endif
+
+#endif // SHARE_VM_UTILITIES_COMPILERWARNINGS_HPP
--- a/hotspot/src/share/vm/utilities/debug.cpp Thu Jun 22 23:39:18 2017 +0000
+++ b/hotspot/src/share/vm/utilities/debug.cpp Fri Jun 23 01:08:42 2017 +0000
@@ -36,6 +36,7 @@
#include "memory/resourceArea.hpp"
#include "memory/universe.hpp"
#include "oops/oop.inline.hpp"
+#include "prims/jvm.h"
#include "prims/privilegedStack.hpp"
#include "runtime/arguments.hpp"
#include "runtime/atomic.hpp"
@@ -51,6 +52,7 @@
#include "services/heapDumper.hpp"
#include "utilities/defaultStream.hpp"
#include "utilities/events.hpp"
+#include "utilities/formatBuffer.hpp"
#include "utilities/macros.hpp"
#include "utilities/vmError.hpp"
@@ -80,14 +82,6 @@
# endif
#endif // PRODUCT
-FormatBufferResource::FormatBufferResource(const char * format, ...)
- : FormatBufferBase((char*)resource_allocate_bytes(FormatBufferBase::BufferSize)) {
- va_list argp;
- va_start(argp, format);
- jio_vsnprintf(_buf, FormatBufferBase::BufferSize, format, argp);
- va_end(argp);
-}
-
ATTRIBUTE_PRINTF(1, 2)
void warning(const char* format, ...) {
if (PrintWarnings) {
@@ -601,7 +595,7 @@
f = f.sender(®_map);
tty->print("(guessing starting frame id=" PTR_FORMAT " based on current fp)\n", p2i(f.id()));
p->trace_stack_from(vframe::new_vframe(&f, ®_map, p));
- pd_ps(f);
+ pd_ps(f);
#endif // PRODUCT
}
@@ -765,57 +759,13 @@
tty->print_cr(" ndebug() - undo debug");
}
-#endif // !PRODUCT
-
-void print_native_stack(outputStream* st, frame fr, Thread* t, char* buf, int buf_size) {
-
- // see if it's a valid frame
- if (fr.pc()) {
- st->print_cr("Native frames: (J=compiled Java code, A=aot compiled Java code, j=interpreted, Vv=VM code, C=native code)");
-
- int count = 0;
- while (count++ < StackPrintLimit) {
- fr.print_on_error(st, buf, buf_size);
- st->cr();
- // Compiled code may use EBP register on x86 so it looks like
- // non-walkable C frame. Use frame.sender() for java frames.
- if (t && t->is_Java_thread()) {
- // Catch very first native frame by using stack address.
- // For JavaThread stack_base and stack_size should be set.
- if (!t->on_local_stack((address)(fr.real_fp() + 1))) {
- break;
- }
- if (fr.is_java_frame() || fr.is_native_frame() || fr.is_runtime_frame()) {
- RegisterMap map((JavaThread*)t, false); // No update
- fr = fr.sender(&map);
- } else {
- fr = os::get_sender_for_C_frame(&fr);
- }
- } else {
- // is_first_C_frame() does only simple checks for frame pointer,
- // it will pass if java compiled code has a pointer in EBP.
- if (os::is_first_C_frame(&fr)) break;
- fr = os::get_sender_for_C_frame(&fr);
- }
- }
-
- if (count > StackPrintLimit) {
- st->print_cr("...<more frames>...");
- }
-
- st->cr();
- }
-}
-
-#ifndef PRODUCT
-
extern "C" void pns(void* sp, void* fp, void* pc) { // print native stack
Command c("pns");
static char buf[O_BUFLEN];
Thread* t = Thread::current_or_null();
// Call generic frame constructor (certain arguments may be ignored)
frame fr(sp, fp, pc);
- print_native_stack(tty, fr, t, buf, sizeof(buf));
+ VMError::print_native_stack(tty, fr, t, buf, sizeof(buf));
}
#endif // !PRODUCT
--- a/hotspot/src/share/vm/utilities/debug.hpp Thu Jun 22 23:39:18 2017 +0000
+++ b/hotspot/src/share/vm/utilities/debug.hpp Fri Jun 23 01:08:42 2017 +0000
@@ -25,97 +25,11 @@
#ifndef SHARE_VM_UTILITIES_DEBUG_HPP
#define SHARE_VM_UTILITIES_DEBUG_HPP
-#include "utilities/globalDefinitions.hpp"
-#include "prims/jvm.h"
-
-#include <stdarg.h>
-
-// Simple class to format the ctor arguments into a fixed-sized buffer.
-class FormatBufferBase {
- protected:
- char* _buf;
- inline FormatBufferBase(char* buf) : _buf(buf) {}
- public:
- static const int BufferSize = 256;
- operator const char *() const { return _buf; }
-};
-
-// Use resource area for buffer
-class FormatBufferResource : public FormatBufferBase {
- public:
- FormatBufferResource(const char * format, ...) ATTRIBUTE_PRINTF(2, 3);
-};
-
-class FormatBufferDummy {};
-
-// Use stack for buffer
-template <size_t bufsz = FormatBufferBase::BufferSize>
-class FormatBuffer : public FormatBufferBase {
- public:
- inline FormatBuffer(const char* format, ...) ATTRIBUTE_PRINTF(2, 3);
- // since va_list is unspecified type (can be char*), we use FormatBufferDummy to disambiguate these constructors
- inline FormatBuffer(FormatBufferDummy dummy, const char* format, va_list ap) ATTRIBUTE_PRINTF(3, 0);
- inline void append(const char* format, ...) ATTRIBUTE_PRINTF(2, 3);
- inline void print(const char* format, ...) ATTRIBUTE_PRINTF(2, 3);
- inline void printv(const char* format, va_list ap) ATTRIBUTE_PRINTF(2, 0);
-
- char* buffer() { return _buf; }
- int size() { return bufsz; }
-
- private:
- FormatBuffer(const FormatBuffer &); // prevent copies
- char _buffer[bufsz];
-
- protected:
- inline FormatBuffer();
-};
+#include "utilities/breakpoint.hpp"
+#include "utilities/compilerWarnings.hpp"
+#include "utilities/macros.hpp"
-template <size_t bufsz>
-FormatBuffer<bufsz>::FormatBuffer(const char * format, ...) : FormatBufferBase(_buffer) {
- va_list argp;
- va_start(argp, format);
- jio_vsnprintf(_buf, bufsz, format, argp);
- va_end(argp);
-}
-
-template <size_t bufsz>
-FormatBuffer<bufsz>::FormatBuffer(FormatBufferDummy dummy, const char * format, va_list ap) : FormatBufferBase(_buffer) {
- jio_vsnprintf(_buf, bufsz, format, ap);
-}
-
-template <size_t bufsz>
-FormatBuffer<bufsz>::FormatBuffer() : FormatBufferBase(_buffer) {
- _buf[0] = '\0';
-}
-
-template <size_t bufsz>
-void FormatBuffer<bufsz>::print(const char * format, ...) {
- va_list argp;
- va_start(argp, format);
- jio_vsnprintf(_buf, bufsz, format, argp);
- va_end(argp);
-}
-
-template <size_t bufsz>
-void FormatBuffer<bufsz>::printv(const char * format, va_list argp) {
- jio_vsnprintf(_buf, bufsz, format, argp);
-}
-
-template <size_t bufsz>
-void FormatBuffer<bufsz>::append(const char* format, ...) {
- // Given that the constructor does a vsnprintf we can assume that
- // _buf is already initialized.
- size_t len = strlen(_buf);
- char* buf_end = _buf + len;
-
- va_list argp;
- va_start(argp, format);
- jio_vsnprintf(buf_end, bufsz - len, format, argp);
- va_end(argp);
-}
-
-// Used to format messages.
-typedef FormatBuffer<> err_msg;
+#include <stddef.h>
// assertions
#ifndef ASSERT
@@ -311,10 +225,7 @@
// for test purposes, which is not NULL and contains bits in every word
NOT_PRODUCT(void* get_segfault_address();)
+class frame;
void pd_ps(frame f);
-void pd_obfuscate_location(char *buf, size_t buflen);
-
-class outputStream;
-void print_native_stack(outputStream* st, frame fr, Thread* t, char* buf, int buf_size);
#endif // SHARE_VM_UTILITIES_DEBUG_HPP
--- a/hotspot/src/share/vm/utilities/elfStringTable.cpp Thu Jun 22 23:39:18 2017 +0000
+++ b/hotspot/src/share/vm/utilities/elfStringTable.cpp Fri Jun 23 01:08:42 2017 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2017, 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,6 +27,7 @@
#if !defined(_WINDOWS) && !defined(__APPLE__)
#include "memory/allocation.inline.hpp"
+#include "prims/jvm.h"
#include "runtime/os.hpp"
#include "utilities/elfStringTable.hpp"
--- a/hotspot/src/share/vm/utilities/events.hpp Thu Jun 22 23:39:18 2017 +0000
+++ b/hotspot/src/share/vm/utilities/events.hpp Fri Jun 23 01:08:42 2017 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2017, 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 "memory/allocation.hpp"
#include "runtime/mutexLocker.hpp"
#include "runtime/thread.hpp"
+#include "utilities/formatBuffer.hpp"
#include "utilities/vmError.hpp"
// Events and EventMark provide interfaces to log events taking place in the vm.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/src/share/vm/utilities/formatBuffer.cpp Fri Jun 23 01:08:42 2017 +0000
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2017, 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
+ * 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.
+ *
+ */
+
+#include "precompiled.hpp"
+#include "memory/allocation.hpp"
+#include "prims/jvm.h"
+#include "utilities/formatBuffer.hpp"
+
+#include <stdarg.h>
+
+FormatBufferResource::FormatBufferResource(const char * format, ...)
+ : FormatBufferBase((char*)resource_allocate_bytes(FormatBufferBase::BufferSize)) {
+ va_list argp;
+ va_start(argp, format);
+ jio_vsnprintf(_buf, FormatBufferBase::BufferSize, format, argp);
+ va_end(argp);
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/src/share/vm/utilities/formatBuffer.hpp Fri Jun 23 01:08:42 2017 +0000
@@ -0,0 +1,119 @@
+/*
+ * Copyright (c) 2017, 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
+ * 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_UTILITIES_FORMATBUFFER_HPP
+#define SHARE_VM_UTILITIES_FORMATBUFFER_HPP
+
+#include "utilities/globalDefinitions.hpp"
+#include "prims/jvm.h"
+#include <stdarg.h>
+
+// Simple class to format the ctor arguments into a fixed-sized buffer.
+class FormatBufferBase {
+ protected:
+ char* _buf;
+ inline FormatBufferBase(char* buf) : _buf(buf) {}
+ public:
+ static const int BufferSize = 256;
+ operator const char *() const { return _buf; }
+};
+
+// Use resource area for buffer
+class FormatBufferResource : public FormatBufferBase {
+ public:
+ FormatBufferResource(const char * format, ...) ATTRIBUTE_PRINTF(2, 3);
+};
+
+class FormatBufferDummy {};
+
+// Use stack for buffer
+template <size_t bufsz = FormatBufferBase::BufferSize>
+class FormatBuffer : public FormatBufferBase {
+ public:
+ inline FormatBuffer(const char* format, ...) ATTRIBUTE_PRINTF(2, 3);
+ // since va_list is unspecified type (can be char*), we use FormatBufferDummy to disambiguate these constructors
+ inline FormatBuffer(FormatBufferDummy dummy, const char* format, va_list ap) ATTRIBUTE_PRINTF(3, 0);
+ inline void append(const char* format, ...) ATTRIBUTE_PRINTF(2, 3);
+ inline void print(const char* format, ...) ATTRIBUTE_PRINTF(2, 3);
+ inline void printv(const char* format, va_list ap) ATTRIBUTE_PRINTF(2, 0);
+
+ char* buffer() { return _buf; }
+ int size() { return bufsz; }
+
+ private:
+ FormatBuffer(const FormatBuffer &); // prevent copies
+ char _buffer[bufsz];
+
+ protected:
+ inline FormatBuffer();
+};
+
+template <size_t bufsz>
+FormatBuffer<bufsz>::FormatBuffer(const char * format, ...) : FormatBufferBase(_buffer) {
+ va_list argp;
+ va_start(argp, format);
+ jio_vsnprintf(_buf, bufsz, format, argp);
+ va_end(argp);
+}
+
+template <size_t bufsz>
+FormatBuffer<bufsz>::FormatBuffer(FormatBufferDummy dummy, const char * format, va_list ap) : FormatBufferBase(_buffer) {
+ jio_vsnprintf(_buf, bufsz, format, ap);
+}
+
+template <size_t bufsz>
+FormatBuffer<bufsz>::FormatBuffer() : FormatBufferBase(_buffer) {
+ _buf[0] = '\0';
+}
+
+template <size_t bufsz>
+void FormatBuffer<bufsz>::print(const char * format, ...) {
+ va_list argp;
+ va_start(argp, format);
+ jio_vsnprintf(_buf, bufsz, format, argp);
+ va_end(argp);
+}
+
+template <size_t bufsz>
+void FormatBuffer<bufsz>::printv(const char * format, va_list argp) {
+ jio_vsnprintf(_buf, bufsz, format, argp);
+}
+
+template <size_t bufsz>
+void FormatBuffer<bufsz>::append(const char* format, ...) {
+ // Given that the constructor does a vsnprintf we can assume that
+ // _buf is already initialized.
+ size_t len = strlen(_buf);
+ char* buf_end = _buf + len;
+
+ va_list argp;
+ va_start(argp, format);
+ jio_vsnprintf(buf_end, bufsz - len, format, argp);
+ va_end(argp);
+}
+
+// Used to format messages.
+typedef FormatBuffer<> err_msg;
+
+#endif // SHARE_VM_UTILITIES_FORMATBUFFER_HPP
--- a/hotspot/src/share/vm/utilities/globalDefinitions.hpp Thu Jun 22 23:39:18 2017 +0000
+++ b/hotspot/src/share/vm/utilities/globalDefinitions.hpp Fri Jun 23 01:08:42 2017 +0000
@@ -25,56 +25,84 @@
#ifndef SHARE_VM_UTILITIES_GLOBALDEFINITIONS_HPP
#define SHARE_VM_UTILITIES_GLOBALDEFINITIONS_HPP
-#ifdef TARGET_COMPILER_gcc
-# include "utilities/globalDefinitions_gcc.hpp"
-#endif
-#ifdef TARGET_COMPILER_visCPP
-# include "utilities/globalDefinitions_visCPP.hpp"
-#endif
-#ifdef TARGET_COMPILER_sparcWorks
-# include "utilities/globalDefinitions_sparcWorks.hpp"
-#endif
-#ifdef TARGET_COMPILER_xlc
-# include "utilities/globalDefinitions_xlc.hpp"
-#endif
+#include "utilities/compilerWarnings.hpp"
+#include "utilities/debug.hpp"
+#include "utilities/macros.hpp"
+#include COMPILER_HEADER(utilities/globalDefinitions)
+
+// Defaults for macros that might be defined per compiler.
#ifndef NOINLINE
#define NOINLINE
#endif
#ifndef ALWAYSINLINE
#define ALWAYSINLINE inline
#endif
-#ifndef PRAGMA_DIAG_PUSH
-#define PRAGMA_DIAG_PUSH
-#endif
-#ifndef PRAGMA_DIAG_POP
-#define PRAGMA_DIAG_POP
-#endif
-#ifndef PRAGMA_FORMAT_NONLITERAL_IGNORED
-#define PRAGMA_FORMAT_NONLITERAL_IGNORED
-#endif
-#ifndef PRAGMA_FORMAT_IGNORED
-#define PRAGMA_FORMAT_IGNORED
-#endif
-#ifndef PRAGMA_FORMAT_NONLITERAL_IGNORED_INTERNAL
-#define PRAGMA_FORMAT_NONLITERAL_IGNORED_INTERNAL
-#endif
-#ifndef PRAGMA_FORMAT_NONLITERAL_IGNORED_EXTERNAL
-#define PRAGMA_FORMAT_NONLITERAL_IGNORED_EXTERNAL
-#endif
-#ifndef ATTRIBUTE_PRINTF
-#define ATTRIBUTE_PRINTF(fmt, vargs)
-#endif
-#ifndef ATTRIBUTE_SCANF
-#define ATTRIBUTE_SCANF(fmt, vargs)
-#endif
-
-#include "utilities/macros.hpp"
// This file holds all globally used constants & types, class (forward)
// declarations and a few frequently used utility functions.
//----------------------------------------------------------------------------------------------------
+// Printf-style formatters for fixed- and variable-width types as pointers and
+// integers. These are derived from the definitions in inttypes.h. If the platform
+// doesn't provide appropriate definitions, they should be provided in
+// the compiler-specific definitions file (e.g., globalDefinitions_gcc.hpp)
+
+#define BOOL_TO_STR(_b_) ((_b_) ? "true" : "false")
+
+// Format 32-bit quantities.
+#define INT32_FORMAT "%" PRId32
+#define UINT32_FORMAT "%" PRIu32
+#define INT32_FORMAT_W(width) "%" #width PRId32
+#define UINT32_FORMAT_W(width) "%" #width PRIu32
+
+#define PTR32_FORMAT "0x%08" PRIx32
+#define PTR32_FORMAT_W(width) "0x%" #width PRIx32
+
+// Format 64-bit quantities.
+#define INT64_FORMAT "%" PRId64
+#define UINT64_FORMAT "%" PRIu64
+#define UINT64_FORMAT_X "%" PRIx64
+#define INT64_FORMAT_W(width) "%" #width PRId64
+#define UINT64_FORMAT_W(width) "%" #width PRIu64
+
+#define PTR64_FORMAT "0x%016" PRIx64
+
+// Format jlong, if necessary
+#ifndef JLONG_FORMAT
+#define JLONG_FORMAT INT64_FORMAT
+#endif
+#ifndef JULONG_FORMAT
+#define JULONG_FORMAT UINT64_FORMAT
+#endif
+#ifndef JULONG_FORMAT_X
+#define JULONG_FORMAT_X UINT64_FORMAT_X
+#endif
+
+// Format pointers which change size between 32- and 64-bit.
+#ifdef _LP64
+#define INTPTR_FORMAT "0x%016" PRIxPTR
+#define PTR_FORMAT "0x%016" PRIxPTR
+#else // !_LP64
+#define INTPTR_FORMAT "0x%08" PRIxPTR
+#define PTR_FORMAT "0x%08" PRIxPTR
+#endif // _LP64
+
+#define INTPTR_FORMAT_W(width) "%" #width PRIxPTR
+
+#define SSIZE_FORMAT "%" PRIdPTR
+#define SIZE_FORMAT "%" PRIuPTR
+#define SIZE_FORMAT_HEX "0x%" PRIxPTR
+#define SSIZE_FORMAT_W(width) "%" #width PRIdPTR
+#define SIZE_FORMAT_W(width) "%" #width PRIuPTR
+#define SIZE_FORMAT_HEX_W(width) "0x%" #width PRIxPTR
+
+#define INTX_FORMAT "%" PRIdPTR
+#define UINTX_FORMAT "%" PRIuPTR
+#define INTX_FORMAT_W(width) "%" #width PRIdPTR
+#define UINTX_FORMAT_W(width) "%" #width PRIuPTR
+
+//----------------------------------------------------------------------------------------------------
// Constants
const int LogBytesPerShort = 1;
@@ -950,8 +978,6 @@
class CompiledRFrame;
class InterpretedRFrame;
-class frame;
-
class vframe;
class javaVFrame;
class interpretedVFrame;
@@ -1012,11 +1038,9 @@
class methodHandle;
class JavaCallArguments;
-// Basic support for errors (general debug facilities not defined at this point fo the include phase)
-
+// Basic support for errors.
extern void basic_fatal(const char* msg);
-
//----------------------------------------------------------------------------------------------------
// Special constants for debugging
@@ -1152,35 +1176,27 @@
//* the argument must be exactly a power of 2
inline int exact_log2(intptr_t x) {
- #ifdef ASSERT
- if (!is_power_of_2(x)) basic_fatal("x must be a power of 2");
- #endif
+ assert(is_power_of_2(x), "x must be a power of 2: " INTPTR_FORMAT, x);
return log2_intptr(x);
}
//* the argument must be exactly a power of 2
inline int exact_log2_long(jlong x) {
- #ifdef ASSERT
- if (!is_power_of_2_long(x)) basic_fatal("x must be a power of 2");
- #endif
+ assert(is_power_of_2_long(x), "x must be a power of 2: " JLONG_FORMAT, x);
return log2_long(x);
}
// returns integer round-up to the nearest multiple of s (s must be a power of two)
inline intptr_t round_to(intptr_t x, uintx s) {
- #ifdef ASSERT
- if (!is_power_of_2(s)) basic_fatal("s must be a power of 2");
- #endif
+ assert(is_power_of_2(s), "s must be a power of 2: " UINTX_FORMAT, s);
const uintx m = s - 1;
return mask_bits(x + m, ~m);
}
// returns integer round-down to the nearest multiple of s (s must be a power of two)
inline intptr_t round_down(intptr_t x, uintx s) {
- #ifdef ASSERT
- if (!is_power_of_2(s)) basic_fatal("s must be a power of 2");
- #endif
+ assert(is_power_of_2(s), "s must be a power of 2: " UINTX_FORMAT, s);
const uintx m = s - 1;
return mask_bits(x, ~m);
}
@@ -1332,66 +1348,6 @@
b = tmp;
}
-// Printf-style formatters for fixed- and variable-width types as pointers and
-// integers. These are derived from the definitions in inttypes.h. If the platform
-// doesn't provide appropriate definitions, they should be provided in
-// the compiler-specific definitions file (e.g., globalDefinitions_gcc.hpp)
-
-#define BOOL_TO_STR(_b_) ((_b_) ? "true" : "false")
-
-// Format 32-bit quantities.
-#define INT32_FORMAT "%" PRId32
-#define UINT32_FORMAT "%" PRIu32
-#define INT32_FORMAT_W(width) "%" #width PRId32
-#define UINT32_FORMAT_W(width) "%" #width PRIu32
-
-#define PTR32_FORMAT "0x%08" PRIx32
-#define PTR32_FORMAT_W(width) "0x%" #width PRIx32
-
-// Format 64-bit quantities.
-#define INT64_FORMAT "%" PRId64
-#define UINT64_FORMAT "%" PRIu64
-#define UINT64_FORMAT_X "%" PRIx64
-#define INT64_FORMAT_W(width) "%" #width PRId64
-#define UINT64_FORMAT_W(width) "%" #width PRIu64
-
-#define PTR64_FORMAT "0x%016" PRIx64
-
-// Format jlong, if necessary
-#ifndef JLONG_FORMAT
-#define JLONG_FORMAT INT64_FORMAT
-#endif
-#ifndef JULONG_FORMAT
-#define JULONG_FORMAT UINT64_FORMAT
-#endif
-#ifndef JULONG_FORMAT_X
-#define JULONG_FORMAT_X UINT64_FORMAT_X
-#endif
-
-// Format pointers which change size between 32- and 64-bit.
-#ifdef _LP64
-#define INTPTR_FORMAT "0x%016" PRIxPTR
-#define PTR_FORMAT "0x%016" PRIxPTR
-#else // !_LP64
-#define INTPTR_FORMAT "0x%08" PRIxPTR
-#define PTR_FORMAT "0x%08" PRIxPTR
-#endif // _LP64
-
-#define INTPTR_FORMAT_W(width) "%" #width PRIxPTR
-
-#define SSIZE_FORMAT "%" PRIdPTR
-#define SIZE_FORMAT "%" PRIuPTR
-#define SIZE_FORMAT_HEX "0x%" PRIxPTR
-#define SSIZE_FORMAT_W(width) "%" #width PRIdPTR
-#define SIZE_FORMAT_W(width) "%" #width PRIuPTR
-#define SIZE_FORMAT_HEX_W(width) "0x%" #width PRIxPTR
-
-#define INTX_FORMAT "%" PRIdPTR
-#define UINTX_FORMAT "%" PRIuPTR
-#define INTX_FORMAT_W(width) "%" #width PRIdPTR
-#define UINTX_FORMAT_W(width) "%" #width PRIuPTR
-
-
#define ARRAY_SIZE(array) (sizeof(array)/sizeof((array)[0]))
//----------------------------------------------------------------------------------------------------
--- a/hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp Thu Jun 22 23:39:18 2017 +0000
+++ b/hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp Fri Jun 23 01:08:42 2017 +0000
@@ -158,7 +158,6 @@
#ifdef SOLARIS
-//----------------------------------------------------------------------------------------------------
// ANSI C++ fixes
// NOTE:In the ANSI committee's continuing attempt to make each version
// of C++ incompatible with the previous version, you can no longer cast
@@ -193,14 +192,6 @@
};
#endif // SOLARIS
-//----------------------------------------------------------------------------------------------------
-// Debugging
-
-#define DEBUG_EXCEPTION ::abort();
-
-extern "C" void breakpoint();
-#define BREAKPOINT ::breakpoint()
-
// checking for nanness
#ifdef SOLARIS
#ifdef SPARC
@@ -241,40 +232,6 @@
#define PRAGMA_IMPLEMENTATION #pragma implementation
#define VALUE_OBJ_CLASS_SPEC
-// Diagnostic pragmas like the ones defined below in PRAGMA_FORMAT_NONLITERAL_IGNORED
-// were only introduced in GCC 4.2. Because we have no other possibility to ignore
-// these warnings for older versions of GCC, we simply don't decorate our printf-style
-// functions with __attribute__(format) in that case.
-#if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 2)) || (__GNUC__ > 4)
-#ifndef ATTRIBUTE_PRINTF
-#define ATTRIBUTE_PRINTF(fmt,vargs) __attribute__((format(printf, fmt, vargs)))
-#endif
-#ifndef ATTRIBUTE_SCANF
-#define ATTRIBUTE_SCANF(fmt,vargs) __attribute__((format(scanf, fmt, vargs)))
-#endif
-#endif
-
-#define PRAGMA_FORMAT_NONLITERAL_IGNORED _Pragma("GCC diagnostic ignored \"-Wformat-nonliteral\"") \
- _Pragma("GCC diagnostic ignored \"-Wformat-security\"")
-#define PRAGMA_FORMAT_IGNORED _Pragma("GCC diagnostic ignored \"-Wformat\"")
-
-#if defined(__clang_major__) && \
- (__clang_major__ >= 4 || \
- (__clang_major__ >= 3 && __clang_minor__ >= 1)) || \
- ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4)
-// Tested to work with clang version 3.1 and better.
-#define PRAGMA_DIAG_PUSH _Pragma("GCC diagnostic push")
-#define PRAGMA_DIAG_POP _Pragma("GCC diagnostic pop")
-
-// Hack to deal with gcc yammering about non-security format stuff
-#else
-// Old versions of gcc don't do push/pop, also do not cope with this pragma within a function
-// One method does so much varied printing that it is decorated with both internal and external
-// versions of the macro-pragma to obtain better checking with newer compilers.
-#define PRAGMA_DIAG_PUSH
-#define PRAGMA_DIAG_POP
-#endif
-
#if (__GNUC__ == 2) && (__GNUC_MINOR__ < 95)
#define TEMPLATE_TABLE_BUG
#endif
--- a/hotspot/src/share/vm/utilities/globalDefinitions_sparcWorks.hpp Thu Jun 22 23:39:18 2017 +0000
+++ b/hotspot/src/share/vm/utilities/globalDefinitions_sparcWorks.hpp Fri Jun 23 01:08:42 2017 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2017, 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
@@ -175,7 +175,6 @@
#ifdef SOLARIS
-//----------------------------------------------------------------------------------------------------
// ANSI C++ fixes
// NOTE:In the ANSI committee's continuing attempt to make each version
// of C++ incompatible with the previous version, you can no longer cast
@@ -210,14 +209,6 @@
};
#endif
-//----------------------------------------------------------------------------------------------------
-// Debugging
-
-#define DEBUG_EXCEPTION ::abort();
-
-extern "C" void breakpoint();
-#define BREAKPOINT ::breakpoint()
-
// checking for nanness
#ifdef SOLARIS
#ifdef SPARC
--- a/hotspot/src/share/vm/utilities/globalDefinitions_visCPP.hpp Thu Jun 22 23:39:18 2017 +0000
+++ b/hotspot/src/share/vm/utilities/globalDefinitions_visCPP.hpp Fri Jun 23 01:08:42 2017 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2017, 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
@@ -108,7 +108,6 @@
#endif
#endif
-//----------------------------------------------------------------------------------------------------
// Additional Java basic types
typedef unsigned char jubyte;
@@ -116,38 +115,22 @@
typedef unsigned int juint;
typedef unsigned __int64 julong;
-
-//----------------------------------------------------------------------------------------------------
// Non-standard stdlib-like stuff:
inline int strcasecmp(const char *s1, const char *s2) { return _stricmp(s1,s2); }
inline int strncasecmp(const char *s1, const char *s2, size_t n) {
return _strnicmp(s1,s2,n);
}
-
-//----------------------------------------------------------------------------------------------------
-// Debugging
-
-#if _WIN64
-extern "C" void breakpoint();
-#define BREAKPOINT ::breakpoint()
-#else
-#define BREAKPOINT __asm { int 3 }
-#endif
-
-//----------------------------------------------------------------------------------------------------
// Checking for nanness
inline int g_isnan(jfloat f) { return _isnan(f); }
inline int g_isnan(jdouble f) { return _isnan(f); }
-//----------------------------------------------------------------------------------------------------
// Checking for finiteness
inline int g_isfinite(jfloat f) { return _finite(f); }
inline int g_isfinite(jdouble f) { return _finite(f); }
-//----------------------------------------------------------------------------------------------------
// Miscellaneous
// Visual Studio 2005 deprecates POSIX names - use ISO C++ names instead
--- a/hotspot/src/share/vm/utilities/globalDefinitions_xlc.hpp Thu Jun 22 23:39:18 2017 +0000
+++ b/hotspot/src/share/vm/utilities/globalDefinitions_xlc.hpp Fri Jun 23 01:08:42 2017 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, 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.
*
@@ -106,15 +106,6 @@
typedef uint32_t juint;
typedef uint64_t julong;
-
-//----------------------------------------------------------------------------------------------------
-// Debugging
-
-#define DEBUG_EXCEPTION ::abort();
-
-extern "C" void breakpoint();
-#define BREAKPOINT ::breakpoint()
-
// checking for nanness
#ifdef AIX
inline int g_isnan(float f) { return isnan(f); }
--- a/hotspot/src/share/vm/utilities/macros.hpp Thu Jun 22 23:39:18 2017 +0000
+++ b/hotspot/src/share/vm/utilities/macros.hpp Fri Jun 23 01:08:42 2017 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2017, 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
@@ -490,12 +490,13 @@
#define CPU_HEADER_STEM(basename) PASTE_TOKENS(basename, INCLUDE_SUFFIX_CPU)
#define OS_HEADER_STEM(basename) PASTE_TOKENS(basename, INCLUDE_SUFFIX_OS)
#define OS_CPU_HEADER_STEM(basename) PASTE_TOKENS(basename, PASTE_TOKENS(INCLUDE_SUFFIX_OS, INCLUDE_SUFFIX_CPU))
+#define COMPILER_HEADER_STEM(basename) PASTE_TOKENS(basename, INCLUDE_SUFFIX_COMPILER)
// Include platform dependent files.
//
// This macro constructs from basename and INCLUDE_SUFFIX_OS /
-// INCLUDE_SUFFIX_CPU, which are set on the command line, the name of
-// platform dependent files to be included.
+// INCLUDE_SUFFIX_CPU / INCLUDE_SUFFIX_COMPILER, which are set on
+// the command line, the name of platform dependent files to be included.
// Example: INCLUDE_SUFFIX_OS=_linux / INCLUDE_SUFFIX_CPU=_sparc
// CPU_HEADER_INLINE(macroAssembler) --> macroAssembler_sparc.inline.hpp
// OS_CPU_HEADER(vmStructs) --> vmStructs_linux_sparc.hpp
@@ -511,6 +512,9 @@
// basename<os><cpu>.hpp / basename<os><cpu>.inline.hpp
#define OS_CPU_HEADER(basename) XSTR(OS_CPU_HEADER_STEM(basename).hpp)
#define OS_CPU_HEADER_INLINE(basename) XSTR(OS_CPU_HEADER_STEM(basename).inline.hpp)
+// basename<compiler>.hpp / basename<compiler>.inline.hpp
+#define COMPILER_HEADER(basename) XSTR(COMPILER_HEADER_STEM(basename).hpp)
+#define COMPILER_HEADER_INLINE(basename) XSTR(COMPILER_HEADER_STEM(basename).inline.hpp)
// To use Atomic::inc(jshort* dest) and Atomic::dec(jshort* dest), the address must be specially
// aligned, such that (*dest) occupies the upper 16 bits of an aligned 32-bit word. The best way to
--- a/hotspot/src/share/vm/utilities/ostream.cpp Thu Jun 22 23:39:18 2017 +0000
+++ b/hotspot/src/share/vm/utilities/ostream.cpp Fri Jun 23 01:08:42 2017 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2017, 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,7 @@
#include "precompiled.hpp"
#include "compiler/compileLog.hpp"
#include "oops/oop.inline.hpp"
+#include "prims/jvm.h"
#include "runtime/arguments.hpp"
#include "runtime/os.hpp"
#include "runtime/vm_version.hpp"
--- a/hotspot/src/share/vm/utilities/vmError.cpp Thu Jun 22 23:39:18 2017 +0000
+++ b/hotspot/src/share/vm/utilities/vmError.cpp Fri Jun 23 01:08:42 2017 +0000
@@ -29,6 +29,7 @@
#include "compiler/disassembler.hpp"
#include "gc/shared/collectedHeap.hpp"
#include "logging/logConfiguration.hpp"
+#include "prims/jvm.h"
#include "prims/whitebox.hpp"
#include "runtime/arguments.hpp"
#include "runtime/atomic.hpp"
@@ -203,6 +204,46 @@
#endif // ZERO
}
+void VMError::print_native_stack(outputStream* st, frame fr, Thread* t, char* buf, int buf_size) {
+
+ // see if it's a valid frame
+ if (fr.pc()) {
+ st->print_cr("Native frames: (J=compiled Java code, A=aot compiled Java code, j=interpreted, Vv=VM code, C=native code)");
+
+ int count = 0;
+ while (count++ < StackPrintLimit) {
+ fr.print_on_error(st, buf, buf_size);
+ st->cr();
+ // Compiled code may use EBP register on x86 so it looks like
+ // non-walkable C frame. Use frame.sender() for java frames.
+ if (t && t->is_Java_thread()) {
+ // Catch very first native frame by using stack address.
+ // For JavaThread stack_base and stack_size should be set.
+ if (!t->on_local_stack((address)(fr.real_fp() + 1))) {
+ break;
+ }
+ if (fr.is_java_frame() || fr.is_native_frame() || fr.is_runtime_frame()) {
+ RegisterMap map((JavaThread*)t, false); // No update
+ fr = fr.sender(&map);
+ } else {
+ fr = os::get_sender_for_C_frame(&fr);
+ }
+ } else {
+ // is_first_C_frame() does only simple checks for frame pointer,
+ // it will pass if java compiled code has a pointer in EBP.
+ if (os::is_first_C_frame(&fr)) break;
+ fr = os::get_sender_for_C_frame(&fr);
+ }
+ }
+
+ if (count > StackPrintLimit) {
+ st->print_cr("...<more frames>...");
+ }
+
+ st->cr();
+ }
+}
+
static void print_oom_reasons(outputStream* st) {
st->print_cr("# Possible reasons:");
st->print_cr("# The system is out of physical RAM or swap space");
--- a/hotspot/src/share/vm/utilities/vmError.hpp Thu Jun 22 23:39:18 2017 +0000
+++ b/hotspot/src/share/vm/utilities/vmError.hpp Fri Jun 23 01:08:42 2017 +0000
@@ -28,6 +28,7 @@
#include "utilities/globalDefinitions.hpp"
class Decoder;
+class frame;
class VM_ReportJavaOutOfMemory;
class VMError : public AllStatic {
@@ -99,6 +100,12 @@
static void print_stack_trace(outputStream* st, JavaThread* jt,
char* buf, int buflen, bool verbose = false);
+ // public for use by the internal non-product debugger.
+ NOT_PRODUCT(public:)
+ static void print_native_stack(outputStream* st, frame fr, Thread* t,
+ char* buf, int buf_size);
+ NOT_PRODUCT(private:)
+
static bool should_report_bug(unsigned int id) {
return (id != OOM_MALLOC_ERROR) && (id != OOM_MMAP_ERROR);
}
--- a/hotspot/test/native/logging/logTestFixture.cpp Thu Jun 22 23:39:18 2017 +0000
+++ b/hotspot/test/native/logging/logTestFixture.cpp Fri Jun 23 01:08:42 2017 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2017, 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 "logTestUtils.inline.hpp"
#include "logging/logConfiguration.hpp"
#include "memory/resourceArea.hpp"
+#include "prims/jvm.h"
#include "unittest.hpp"
#include "utilities/ostream.hpp"
--- a/hotspot/test/native/logging/test_log.cpp Thu Jun 22 23:39:18 2017 +0000
+++ b/hotspot/test/native/logging/test_log.cpp Fri Jun 23 01:08:42 2017 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017, 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 "logTestFixture.hpp"
#include "logTestUtils.inline.hpp"
#include "logging/log.hpp"
+#include "prims/jvm.h"
#include "unittest.hpp"
class LogTest : public LogTestFixture {
--- a/hotspot/test/native/logging/test_logConfiguration.cpp Thu Jun 22 23:39:18 2017 +0000
+++ b/hotspot/test/native/logging/test_logConfiguration.cpp Fri Jun 23 01:08:42 2017 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2017, 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
@@ -31,6 +31,7 @@
#include "logging/logTag.hpp"
#include "logging/logTagSet.hpp"
#include "memory/resourceArea.hpp"
+#include "prims/jvm.h"
#include "unittest.hpp"
#include "utilities/ostream.hpp"
--- a/hotspot/test/native/logging/test_logDecorators.cpp Thu Jun 22 23:39:18 2017 +0000
+++ b/hotspot/test/native/logging/test_logDecorators.cpp Fri Jun 23 01:08:42 2017 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2017, 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
@@ -23,6 +23,7 @@
#include "precompiled.hpp"
#include "logging/logDecorators.hpp"
+#include "prims/jvm.h"
#include "unittest.hpp"
static LogDecorators::Decorator decorator_array[] = {
--- a/hotspot/test/native/logging/test_logFileOutput.cpp Thu Jun 22 23:39:18 2017 +0000
+++ b/hotspot/test/native/logging/test_logFileOutput.cpp Fri Jun 23 01:08:42 2017 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2017, 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,7 @@
#include "logTestUtils.inline.hpp"
#include "logging/logFileOutput.hpp"
#include "memory/resourceArea.hpp"
+#include "prims/jvm.h"
#include "runtime/os.hpp"
#include "unittest.hpp"
#include "utilities/globalDefinitions.hpp"
--- a/hotspot/test/native/logging/test_logMessageTest.cpp Thu Jun 22 23:39:18 2017 +0000
+++ b/hotspot/test/native/logging/test_logMessageTest.cpp Fri Jun 23 01:08:42 2017 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017, 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 "logTestUtils.inline.hpp"
#include "logging/log.hpp"
#include "logging/logMessage.hpp"
+#include "prims/jvm.h"
#include "unittest.hpp"
#include "utilities/globalDefinitions.hpp"
--- a/hotspot/test/native/logging/test_logTagLevelExpression.cpp Thu Jun 22 23:39:18 2017 +0000
+++ b/hotspot/test/native/logging/test_logTagLevelExpression.cpp Fri Jun 23 01:08:42 2017 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2017, 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,7 @@
#include "logging/logLevel.hpp"
#include "logging/logTagLevelExpression.hpp"
#include "logging/logTagSet.hpp"
+#include "prims/jvm.h"
#include "unittest.hpp"
#include "utilities/globalDefinitions.hpp"
--- a/hotspot/test/native/logging/test_logTagSetDescriptions.cpp Thu Jun 22 23:39:18 2017 +0000
+++ b/hotspot/test/native/logging/test_logTagSetDescriptions.cpp Fri Jun 23 01:08:42 2017 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017, 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,6 +27,7 @@
#include "logging/logTagSet.hpp"
#include "logging/logTagSetDescriptions.hpp"
#include "memory/resourceArea.hpp"
+#include "prims/jvm.h"
#include "unittest.hpp"
#include "utilities/ostream.hpp"
--- a/hotspot/test/native/runtime/test_arguments.cpp Thu Jun 22 23:39:18 2017 +0000
+++ b/hotspot/test/native/runtime/test_arguments.cpp Fri Jun 23 01:08:42 2017 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2017, 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
@@ -22,6 +22,7 @@
*/
#include "precompiled.hpp"
+#include "prims/jvm.h"
#include "runtime/arguments.hpp"
#include "unittest.hpp"
#include "utilities/globalDefinitions.hpp"