8181449: Fix debug.hpp / globalDefinitions.hpp dependency inversion

Refactor debug.hpp and reverse include dependency.

Reviewed-by: coleenp, stefank, dcubed
This commit is contained in:
Kim Barrett 2017-06-22 20:47:22 -04:00
parent 98923cb4c4
commit 6cc7e33ce7
102 changed files with 587 additions and 389 deletions

View file

@ -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. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -69,6 +69,7 @@ JVM_CFLAGS_TARGET_DEFINES += \
-DTARGET_ARCH_$(HOTSPOT_TARGET_CPU_ARCH) \ -DTARGET_ARCH_$(HOTSPOT_TARGET_CPU_ARCH) \
-DINCLUDE_SUFFIX_OS=_$(HOTSPOT_TARGET_OS) \ -DINCLUDE_SUFFIX_OS=_$(HOTSPOT_TARGET_OS) \
-DINCLUDE_SUFFIX_CPU=_$(HOTSPOT_TARGET_CPU_ARCH) \ -DINCLUDE_SUFFIX_CPU=_$(HOTSPOT_TARGET_CPU_ARCH) \
-DINCLUDE_SUFFIX_COMPILER=_$(HOTSPOT_TOOLCHAIN_TYPE) \
-DTARGET_COMPILER_$(HOTSPOT_TOOLCHAIN_TYPE) \ -DTARGET_COMPILER_$(HOTSPOT_TOOLCHAIN_TYPE) \
-D$(HOTSPOT_TARGET_CPU_DEFINE) \ -D$(HOTSPOT_TARGET_CPU_DEFINE) \
-DHOTSPOT_LIB_ARCH='"$(OPENJDK_TARGET_CPU_LEGACY_LIB)"' \ -DHOTSPOT_LIB_ARCH='"$(OPENJDK_TARGET_CPU_LEGACY_LIB)"' \

View file

@ -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. * Copyright (c) 2014, 2015, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
@ -38,6 +38,7 @@
#include "opto/compile.hpp" #include "opto/compile.hpp"
#include "opto/intrinsicnode.hpp" #include "opto/intrinsicnode.hpp"
#include "opto/node.hpp" #include "opto/node.hpp"
#include "prims/jvm.h"
#include "runtime/biasedLocking.hpp" #include "runtime/biasedLocking.hpp"
#include "runtime/icache.hpp" #include "runtime/icache.hpp"
#include "runtime/interfaceSupport.hpp" #include "runtime/interfaceSupport.hpp"
@ -2011,6 +2012,12 @@ void MacroAssembler::stop(const char* msg) {
hlt(0); 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 // If a constant does not fit in an immediate field, generate some
// number of MOV instructions and then perform the operation. // number of MOV instructions and then perform the operation.
void MacroAssembler::wrap_add_sub_imm_insn(Register Rd, Register Rn, unsigned imm, void MacroAssembler::wrap_add_sub_imm_insn(Register Rd, Register Rn, unsigned imm,

View file

@ -941,7 +941,7 @@ public:
void untested() { stop("untested"); } 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"); } void should_not_reach_here() { stop("should not reach here"); }

View file

@ -32,6 +32,7 @@
#include "interpreter/interpreterRuntime.hpp" #include "interpreter/interpreterRuntime.hpp"
#include "memory/allocation.inline.hpp" #include "memory/allocation.inline.hpp"
#include "memory/resourceArea.hpp" #include "memory/resourceArea.hpp"
#include "prims/jvm.h"
#include "prims/methodHandles.hpp" #include "prims/methodHandles.hpp"
#define __ _masm-> #define __ _masm->

View file

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -25,6 +25,7 @@
#include "precompiled.hpp" #include "precompiled.hpp"
#include "asm/macroAssembler.inline.hpp" #include "asm/macroAssembler.inline.hpp"
#include "memory/resourceArea.hpp" #include "memory/resourceArea.hpp"
#include "prims/jvm.h"
#include "runtime/java.hpp" #include "runtime/java.hpp"
#include "runtime/os.inline.hpp" #include "runtime/os.inline.hpp"
#include "runtime/stubCodeGenerator.hpp" #include "runtime/stubCodeGenerator.hpp"

View file

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -25,6 +25,7 @@
#include "precompiled.hpp" #include "precompiled.hpp"
#include "asm/macroAssembler.inline.hpp" #include "asm/macroAssembler.inline.hpp"
#include "memory/resourceArea.hpp" #include "memory/resourceArea.hpp"
#include "prims/jvm.h"
#include "runtime/java.hpp" #include "runtime/java.hpp"
#include "runtime/os.inline.hpp" #include "runtime/os.inline.hpp"
#include "runtime/stubCodeGenerator.hpp" #include "runtime/stubCodeGenerator.hpp"

View file

@ -29,6 +29,7 @@
#include "interpreter/interpreter.hpp" #include "interpreter/interpreter.hpp"
#include "memory/allocation.inline.hpp" #include "memory/allocation.inline.hpp"
#include "memory/resourceArea.hpp" #include "memory/resourceArea.hpp"
#include "prims/jvm.h"
#include "prims/methodHandles.hpp" #include "prims/methodHandles.hpp"
#define __ _masm-> #define __ _masm->

View file

@ -28,6 +28,7 @@
#include "asm/macroAssembler.inline.hpp" #include "asm/macroAssembler.inline.hpp"
#include "compiler/disassembler.hpp" #include "compiler/disassembler.hpp"
#include "memory/resourceArea.hpp" #include "memory/resourceArea.hpp"
#include "prims/jvm.h"
#include "runtime/java.hpp" #include "runtime/java.hpp"
#include "runtime/os.hpp" #include "runtime/os.hpp"
#include "runtime/stubCodeGenerator.hpp" #include "runtime/stubCodeGenerator.hpp"

View file

@ -29,6 +29,7 @@
#include "interpreter/interpreter.hpp" #include "interpreter/interpreter.hpp"
#include "memory/allocation.inline.hpp" #include "memory/allocation.inline.hpp"
#include "memory/resourceArea.hpp" #include "memory/resourceArea.hpp"
#include "prims/jvm.h"
#include "prims/methodHandles.hpp" #include "prims/methodHandles.hpp"
#ifdef PRODUCT #ifdef PRODUCT

View file

@ -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. * Copyright (c) 2016 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
@ -28,6 +28,7 @@
#include "compiler/disassembler.hpp" #include "compiler/disassembler.hpp"
#include "code/compiledIC.hpp" #include "code/compiledIC.hpp"
#include "memory/resourceArea.hpp" #include "memory/resourceArea.hpp"
#include "prims/jvm.h"
#include "runtime/java.hpp" #include "runtime/java.hpp"
#include "runtime/stubCodeGenerator.hpp" #include "runtime/stubCodeGenerator.hpp"
#include "vm_version_s390.hpp" #include "vm_version_s390.hpp"

View file

@ -31,6 +31,7 @@
#include "memory/resourceArea.hpp" #include "memory/resourceArea.hpp"
#include "memory/universe.hpp" #include "memory/universe.hpp"
#include "oops/klass.inline.hpp" #include "oops/klass.inline.hpp"
#include "prims/jvm.h"
#include "prims/methodHandles.hpp" #include "prims/methodHandles.hpp"
#include "runtime/biasedLocking.hpp" #include "runtime/biasedLocking.hpp"
#include "runtime/interfaceSupport.hpp" #include "runtime/interfaceSupport.hpp"
@ -1392,6 +1393,13 @@ void MacroAssembler::untested(const char* what) {
} }
void MacroAssembler::unimplemented(const char* what) {
char* b = new char[1024];
jio_snprintf(b, 1024, "unimplemented: %s", what);
stop(b);
}
void MacroAssembler::stop_subroutine() { void MacroAssembler::stop_subroutine() {
RegistersForDebugging::save_registers(this); RegistersForDebugging::save_registers(this);

View file

@ -1130,7 +1130,7 @@ public:
void stop(const char* msg); // prints msg, dumps registers and stops execution void stop(const char* msg); // prints msg, dumps registers and stops execution
void warn(const char* msg); // prints msg, but don't stop void warn(const char* msg); // prints msg, but don't stop
void untested(const char* what = ""); 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 should_not_reach_here() { stop("should not reach here"); }
void print_CPU_state(); void print_CPU_state();

View file

@ -29,6 +29,7 @@
#include "interpreter/interp_masm.hpp" #include "interpreter/interp_masm.hpp"
#include "memory/allocation.inline.hpp" #include "memory/allocation.inline.hpp"
#include "memory/resourceArea.hpp" #include "memory/resourceArea.hpp"
#include "prims/jvm.h"
#include "prims/methodHandles.hpp" #include "prims/methodHandles.hpp"
#define __ _masm-> #define __ _masm->

View file

@ -26,6 +26,7 @@
#include "asm/macroAssembler.inline.hpp" #include "asm/macroAssembler.inline.hpp"
#include "logging/log.hpp" #include "logging/log.hpp"
#include "memory/resourceArea.hpp" #include "memory/resourceArea.hpp"
#include "prims/jvm.h"
#include "runtime/java.hpp" #include "runtime/java.hpp"
#include "runtime/os.hpp" #include "runtime/os.hpp"
#include "runtime/stubCodeGenerator.hpp" #include "runtime/stubCodeGenerator.hpp"

View file

@ -32,6 +32,7 @@
#include "memory/resourceArea.hpp" #include "memory/resourceArea.hpp"
#include "memory/universe.hpp" #include "memory/universe.hpp"
#include "oops/klass.inline.hpp" #include "oops/klass.inline.hpp"
#include "prims/jvm.h"
#include "prims/methodHandles.hpp" #include "prims/methodHandles.hpp"
#include "runtime/biasedLocking.hpp" #include "runtime/biasedLocking.hpp"
#include "runtime/interfaceSupport.hpp" #include "runtime/interfaceSupport.hpp"
@ -3640,6 +3641,12 @@ void MacroAssembler::os_breakpoint() {
call(RuntimeAddress(CAST_FROM_FN_PTR(address, os::breakpoint))); 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 #ifdef _LP64
#define XSTATE_BV 0x200 #define XSTATE_BV 0x200
#endif #endif

View file

@ -628,7 +628,7 @@ class MacroAssembler: public Assembler {
void untested() { stop("untested"); } 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"); } void should_not_reach_here() { stop("should not reach here"); }

View file

@ -29,6 +29,7 @@
#include "interpreter/interpreterRuntime.hpp" #include "interpreter/interpreterRuntime.hpp"
#include "memory/allocation.inline.hpp" #include "memory/allocation.inline.hpp"
#include "memory/resourceArea.hpp" #include "memory/resourceArea.hpp"
#include "prims/jvm.h"
#include "prims/methodHandles.hpp" #include "prims/methodHandles.hpp"
#define __ _masm-> #define __ _masm->

View file

@ -27,6 +27,7 @@
#include "asm/macroAssembler.inline.hpp" #include "asm/macroAssembler.inline.hpp"
#include "logging/log.hpp" #include "logging/log.hpp"
#include "memory/resourceArea.hpp" #include "memory/resourceArea.hpp"
#include "prims/jvm.h"
#include "runtime/java.hpp" #include "runtime/java.hpp"
#include "runtime/os.hpp" #include "runtime/os.hpp"
#include "runtime/stubCodeGenerator.hpp" #include "runtime/stubCodeGenerator.hpp"

View file

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -25,6 +25,7 @@
#include "precompiled.hpp" #include "precompiled.hpp"
#ifdef __APPLE__ #ifdef __APPLE__
#include "prims/jvm.h"
#include "decoder_machO.hpp" #include "decoder_machO.hpp"
#include <cxxabi.h> #include <cxxabi.h>

View file

@ -27,6 +27,7 @@
#include "aot/aotLoader.inline.hpp" #include "aot/aotLoader.inline.hpp"
#include "jvmci/jvmciRuntime.hpp" #include "jvmci/jvmciRuntime.hpp"
#include "oops/method.hpp" #include "oops/method.hpp"
#include "prims/jvm.h"
#include "runtime/os.hpp" #include "runtime/os.hpp"
GrowableArray<AOTCodeHeap*>* AOTLoader::_heaps = new(ResourceObj::C_HEAP, mtCode) GrowableArray<AOTCodeHeap*> (2, true); GrowableArray<AOTCodeHeap*>* AOTLoader::_heaps = new(ResourceObj::C_HEAP, mtCode) GrowableArray<AOTCodeHeap*> (2, true);

View file

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * 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_LIR.hpp"
#include "c1/c1_LinearScan.hpp" #include "c1/c1_LinearScan.hpp"
#include "c1/c1_ValueStack.hpp" #include "c1/c1_ValueStack.hpp"
#include "prims/jvm.h"
#ifndef PRODUCT #ifndef PRODUCT

View file

@ -49,6 +49,7 @@
#include "oops/objArrayKlass.hpp" #include "oops/objArrayKlass.hpp"
#include "oops/objArrayOop.inline.hpp" #include "oops/objArrayOop.inline.hpp"
#include "oops/oop.inline.hpp" #include "oops/oop.inline.hpp"
#include "prims/jvm.h"
#include "prims/jvmtiExport.hpp" #include "prims/jvmtiExport.hpp"
#include "runtime/init.hpp" #include "runtime/init.hpp"
#include "runtime/reflection.hpp" #include "runtime/reflection.hpp"

View file

@ -33,6 +33,7 @@
#include "memory/oopFactory.hpp" #include "memory/oopFactory.hpp"
#include "memory/resourceArea.hpp" #include "memory/resourceArea.hpp"
#include "oops/oop.inline.hpp" #include "oops/oop.inline.hpp"
#include "prims/jvm.h"
#include "utilities/copy.hpp" #include "utilities/copy.hpp"
#include "utilities/macros.hpp" #include "utilities/macros.hpp"

View file

@ -51,6 +51,7 @@
#include "oops/objArrayOop.inline.hpp" #include "oops/objArrayOop.inline.hpp"
#include "oops/oop.inline.hpp" #include "oops/oop.inline.hpp"
#include "oops/symbol.hpp" #include "oops/symbol.hpp"
#include "prims/jvm.h"
#include "prims/jvm_misc.hpp" #include "prims/jvm_misc.hpp"
#include "runtime/arguments.hpp" #include "runtime/arguments.hpp"
#include "runtime/compilationPolicy.hpp" #include "runtime/compilationPolicy.hpp"

View file

@ -39,6 +39,7 @@
#include "logging/log.hpp" #include "logging/log.hpp"
#include "memory/resourceArea.hpp" #include "memory/resourceArea.hpp"
#include "oops/instanceKlass.hpp" #include "oops/instanceKlass.hpp"
#include "prims/jvm.h"
#include "runtime/arguments.hpp" #include "runtime/arguments.hpp"
#include "runtime/handles.inline.hpp" #include "runtime/handles.inline.hpp"
#include "runtime/javaCalls.hpp" #include "runtime/javaCalls.hpp"

View file

@ -58,6 +58,7 @@
#include "oops/oop.inline.hpp" #include "oops/oop.inline.hpp"
#include "oops/symbol.hpp" #include "oops/symbol.hpp"
#include "oops/typeArrayKlass.hpp" #include "oops/typeArrayKlass.hpp"
#include "prims/jvm.h"
#include "prims/jvmtiEnvBase.hpp" #include "prims/jvmtiEnvBase.hpp"
#include "prims/resolvedMethodTable.hpp" #include "prims/resolvedMethodTable.hpp"
#include "prims/methodHandles.hpp" #include "prims/methodHandles.hpp"

View file

@ -27,6 +27,7 @@
#include "compiler/compilerDirectives.hpp" #include "compiler/compilerDirectives.hpp"
#include "memory/oopFactory.hpp" #include "memory/oopFactory.hpp"
#include "oops/oop.inline.hpp" #include "oops/oop.inline.hpp"
#include "prims/jvm.h"
#include "runtime/handles.inline.hpp" #include "runtime/handles.inline.hpp"
#include "utilities/xmlstream.hpp" #include "utilities/xmlstream.hpp"

View file

@ -33,6 +33,7 @@
#include "memory/resourceArea.hpp" #include "memory/resourceArea.hpp"
#include "oops/oop.inline.hpp" #include "oops/oop.inline.hpp"
#include "prims/forte.hpp" #include "prims/forte.hpp"
#include "prims/jvm.h"
#include "runtime/handles.inline.hpp" #include "runtime/handles.inline.hpp"
#include "runtime/interfaceSupport.hpp" #include "runtime/interfaceSupport.hpp"
#include "runtime/mutexLocker.hpp" #include "runtime/mutexLocker.hpp"

View file

@ -40,6 +40,7 @@
#include "memory/resourceArea.hpp" #include "memory/resourceArea.hpp"
#include "oops/methodData.hpp" #include "oops/methodData.hpp"
#include "oops/oop.inline.hpp" #include "oops/oop.inline.hpp"
#include "prims/jvm.h"
#include "prims/jvmtiImpl.hpp" #include "prims/jvmtiImpl.hpp"
#include "runtime/atomic.hpp" #include "runtime/atomic.hpp"
#include "runtime/orderAccess.inline.hpp" #include "runtime/orderAccess.inline.hpp"

View file

@ -38,6 +38,7 @@
#include "oops/methodData.hpp" #include "oops/methodData.hpp"
#include "oops/method.hpp" #include "oops/method.hpp"
#include "oops/oop.inline.hpp" #include "oops/oop.inline.hpp"
#include "prims/jvm.h"
#include "prims/nativeLookup.hpp" #include "prims/nativeLookup.hpp"
#include "prims/whitebox.hpp" #include "prims/whitebox.hpp"
#include "runtime/arguments.hpp" #include "runtime/arguments.hpp"
@ -51,8 +52,10 @@
#include "runtime/sweeper.hpp" #include "runtime/sweeper.hpp"
#include "runtime/timerTrace.hpp" #include "runtime/timerTrace.hpp"
#include "trace/tracing.hpp" #include "trace/tracing.hpp"
#include "utilities/debug.hpp"
#include "utilities/dtrace.hpp" #include "utilities/dtrace.hpp"
#include "utilities/events.hpp" #include "utilities/events.hpp"
#include "utilities/formatBuffer.hpp"
#ifdef COMPILER1 #ifdef COMPILER1
#include "c1/c1_Compiler.hpp" #include "c1/c1_Compiler.hpp"
#endif #endif

View file

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -28,6 +28,7 @@
#include "compiler/compileLog.hpp" #include "compiler/compileLog.hpp"
#include "memory/allocation.inline.hpp" #include "memory/allocation.inline.hpp"
#include "oops/method.hpp" #include "oops/method.hpp"
#include "prims/jvm.h"
#include "runtime/mutexLocker.hpp" #include "runtime/mutexLocker.hpp"
#include "runtime/os.hpp" #include "runtime/os.hpp"

View file

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -31,6 +31,7 @@
#include "oops/klass.hpp" #include "oops/klass.hpp"
#include "oops/method.hpp" #include "oops/method.hpp"
#include "oops/symbol.hpp" #include "oops/symbol.hpp"
#include "prims/jvm.h"
#include "runtime/handles.inline.hpp" #include "runtime/handles.inline.hpp"
#include "runtime/jniHandles.hpp" #include "runtime/jniHandles.hpp"
#include "runtime/os.hpp" #include "runtime/os.hpp"

View file

@ -35,6 +35,8 @@
#include "oops/oop.inline.hpp" #include "oops/oop.inline.hpp"
#include "runtime/atomic.hpp" #include "runtime/atomic.hpp"
#include "utilities/bitMap.inline.hpp" #include "utilities/bitMap.inline.hpp"
#include "utilities/debug.hpp"
#include "utilities/formatBuffer.hpp"
#include "utilities/globalDefinitions.hpp" #include "utilities/globalDefinitions.hpp"
#include "utilities/growableArray.hpp" #include "utilities/growableArray.hpp"

View file

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -28,6 +28,7 @@
#include "gc/shared/collectedHeap.hpp" #include "gc/shared/collectedHeap.hpp"
#include "memory/allocation.inline.hpp" #include "memory/allocation.inline.hpp"
#include "oops/oop.inline.hpp" #include "oops/oop.inline.hpp"
#include "prims/jvm.h"
#include "runtime/mutexLocker.hpp" #include "runtime/mutexLocker.hpp"
#include "runtime/safepoint.hpp" #include "runtime/safepoint.hpp"
#include "runtime/thread.hpp" #include "runtime/thread.hpp"

View file

@ -66,7 +66,9 @@
#include "services/management.hpp" #include "services/management.hpp"
#include "services/memTracker.hpp" #include "services/memTracker.hpp"
#include "services/memoryService.hpp" #include "services/memoryService.hpp"
#include "utilities/debug.hpp"
#include "utilities/events.hpp" #include "utilities/events.hpp"
#include "utilities/formatBuffer.hpp"
#include "utilities/stack.inline.hpp" #include "utilities/stack.inline.hpp"
#include <math.h> #include <math.h>

View file

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -30,6 +30,7 @@
#include "memory/resourceArea.hpp" #include "memory/resourceArea.hpp"
#include "logging/log.hpp" #include "logging/log.hpp"
#include "oops/oop.inline.hpp" #include "oops/oop.inline.hpp"
#include "prims/jvm.h"
#include "utilities/copy.hpp" #include "utilities/copy.hpp"
/* Copyright (c) 1992, 2016, Oracle and/or its affiliates, and Stanford University. /* Copyright (c) 1992, 2016, Oracle and/or its affiliates, and Stanford University.

View file

@ -31,7 +31,9 @@
#include "runtime/handles.hpp" #include "runtime/handles.hpp"
#include "runtime/perfData.hpp" #include "runtime/perfData.hpp"
#include "runtime/safepoint.hpp" #include "runtime/safepoint.hpp"
#include "utilities/debug.hpp"
#include "utilities/events.hpp" #include "utilities/events.hpp"
#include "utilities/formatBuffer.hpp"
// A "CollectedHeap" is an implementation of a java heap for HotSpot. This // 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 // is an abstract class: there may be many different kinds of heaps. This

View file

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -24,6 +24,7 @@
#include "precompiled.hpp" #include "precompiled.hpp"
#include "gc/shared/gcId.hpp" #include "gc/shared/gcId.hpp"
#include "prims/jvm.h"
#include "runtime/safepoint.hpp" #include "runtime/safepoint.hpp"
#include "runtime/thread.inline.hpp" #include "runtime/thread.inline.hpp"

View file

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -53,6 +53,8 @@
#include "runtime/vmThread.hpp" #include "runtime/vmThread.hpp"
#include "services/management.hpp" #include "services/management.hpp"
#include "services/memoryService.hpp" #include "services/memoryService.hpp"
#include "utilities/debug.hpp"
#include "utilities/formatBuffer.hpp"
#include "utilities/macros.hpp" #include "utilities/macros.hpp"
#include "utilities/stack.inline.hpp" #include "utilities/stack.inline.hpp"
#include "utilities/vmError.hpp" #include "utilities/vmError.hpp"

View file

@ -40,6 +40,7 @@
#include "oops/method.hpp" #include "oops/method.hpp"
#include "oops/objArrayOop.hpp" #include "oops/objArrayOop.hpp"
#include "oops/oop.inline.hpp" #include "oops/oop.inline.hpp"
#include "prims/jvm.h"
#include "prims/methodHandles.hpp" #include "prims/methodHandles.hpp"
#include "prims/nativeLookup.hpp" #include "prims/nativeLookup.hpp"
#include "runtime/compilationPolicy.hpp" #include "runtime/compilationPolicy.hpp"

View file

@ -25,6 +25,7 @@
#include "memory/oopFactory.hpp" #include "memory/oopFactory.hpp"
#include "memory/resourceArea.hpp" #include "memory/resourceArea.hpp"
#include "oops/oop.inline.hpp" #include "oops/oop.inline.hpp"
#include "prims/jvm.h"
#include "runtime/javaCalls.hpp" #include "runtime/javaCalls.hpp"
#include "runtime/handles.hpp" #include "runtime/handles.hpp"
#include "jvmci/jvmciJavaClasses.hpp" #include "jvmci/jvmciJavaClasses.hpp"

View file

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -24,6 +24,7 @@
#include "precompiled.hpp" #include "precompiled.hpp"
#include "jvmci/jvmci_globals.hpp" #include "jvmci/jvmci_globals.hpp"
#include "prims/jvm.h"
#include "utilities/defaultStream.hpp" #include "utilities/defaultStream.hpp"
#include "runtime/globals_extension.hpp" #include "runtime/globals_extension.hpp"

View file

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -34,6 +34,7 @@
#include "logging/logTagSet.hpp" #include "logging/logTagSet.hpp"
#include "memory/allocation.inline.hpp" #include "memory/allocation.inline.hpp"
#include "memory/resourceArea.hpp" #include "memory/resourceArea.hpp"
#include "prims/jvm.h"
#include "runtime/os.inline.hpp" #include "runtime/os.inline.hpp"
#include "runtime/semaphore.hpp" #include "runtime/semaphore.hpp"
#include "utilities/globalDefinitions.hpp" #include "utilities/globalDefinitions.hpp"

View file

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -24,6 +24,7 @@
#include "precompiled.hpp" #include "precompiled.hpp"
#include "logging/logConfiguration.hpp" #include "logging/logConfiguration.hpp"
#include "logging/logDecorations.hpp" #include "logging/logDecorations.hpp"
#include "prims/jvm.h"
#include "runtime/os.inline.hpp" #include "runtime/os.inline.hpp"
#include "runtime/thread.inline.hpp" #include "runtime/thread.inline.hpp"
#include "services/management.hpp" #include "services/management.hpp"

View file

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -26,6 +26,7 @@
#include "logging/logConfiguration.hpp" #include "logging/logConfiguration.hpp"
#include "logging/logFileOutput.hpp" #include "logging/logFileOutput.hpp"
#include "memory/allocation.inline.hpp" #include "memory/allocation.inline.hpp"
#include "prims/jvm.h"
#include "runtime/arguments.hpp" #include "runtime/arguments.hpp"
#include "runtime/os.inline.hpp" #include "runtime/os.inline.hpp"
#include "utilities/globalDefinitions.hpp" #include "utilities/globalDefinitions.hpp"

View file

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -27,6 +27,7 @@
#include "logging/logFileStreamOutput.hpp" #include "logging/logFileStreamOutput.hpp"
#include "logging/logMessageBuffer.hpp" #include "logging/logMessageBuffer.hpp"
#include "memory/allocation.inline.hpp" #include "memory/allocation.inline.hpp"
#include "prims/jvm.h"
static bool initialized; static bool initialized;
static union { static union {

View file

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -26,6 +26,7 @@
#include "logging/logOutput.hpp" #include "logging/logOutput.hpp"
#include "logging/logTagSet.hpp" #include "logging/logTagSet.hpp"
#include "memory/allocation.inline.hpp" #include "memory/allocation.inline.hpp"
#include "prims/jvm.h"
#include "runtime/mutexLocker.hpp" #include "runtime/mutexLocker.hpp"
#include "runtime/os.inline.hpp" #include "runtime/os.inline.hpp"

View file

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -31,6 +31,7 @@
#include "logging/logTagSet.hpp" #include "logging/logTagSet.hpp"
#include "logging/logTagSetDescriptions.hpp" #include "logging/logTagSetDescriptions.hpp"
#include "memory/allocation.inline.hpp" #include "memory/allocation.inline.hpp"
#include "prims/jvm.h"
#include "utilities/ostream.hpp" #include "utilities/ostream.hpp"
LogTagSet* LogTagSet::_list = NULL; LogTagSet* LogTagSet::_list = NULL;

View file

@ -38,6 +38,7 @@
#include "memory/metadataFactory.hpp" #include "memory/metadataFactory.hpp"
#include "memory/oopFactory.hpp" #include "memory/oopFactory.hpp"
#include "oops/objArrayOop.hpp" #include "oops/objArrayOop.hpp"
#include "prims/jvm.h"
#include "prims/jvmtiExport.hpp" #include "prims/jvmtiExport.hpp"
#include "runtime/arguments.hpp" #include "runtime/arguments.hpp"
#include "runtime/java.hpp" #include "runtime/java.hpp"

View file

@ -49,6 +49,7 @@
#include "oops/objArrayOop.hpp" #include "oops/objArrayOop.hpp"
#include "oops/oop.inline.hpp" #include "oops/oop.inline.hpp"
#include "oops/typeArrayKlass.hpp" #include "oops/typeArrayKlass.hpp"
#include "prims/jvm.h"
#include "runtime/timerTrace.hpp" #include "runtime/timerTrace.hpp"
#include "runtime/os.hpp" #include "runtime/os.hpp"
#include "runtime/signature.hpp" #include "runtime/signature.hpp"

View file

@ -73,7 +73,9 @@
#include "runtime/vm_operations.hpp" #include "runtime/vm_operations.hpp"
#include "services/memoryService.hpp" #include "services/memoryService.hpp"
#include "utilities/copy.hpp" #include "utilities/copy.hpp"
#include "utilities/debug.hpp"
#include "utilities/events.hpp" #include "utilities/events.hpp"
#include "utilities/formatBuffer.hpp"
#include "utilities/hashtable.inline.hpp" #include "utilities/hashtable.inline.hpp"
#include "utilities/macros.hpp" #include "utilities/macros.hpp"
#include "utilities/ostream.hpp" #include "utilities/ostream.hpp"

View file

@ -39,6 +39,7 @@
#include "oops/objArrayKlass.hpp" #include "oops/objArrayKlass.hpp"
#include "oops/objArrayOop.inline.hpp" #include "oops/objArrayOop.inline.hpp"
#include "oops/oop.inline.hpp" #include "oops/oop.inline.hpp"
#include "prims/jvm.h"
#include "runtime/fieldType.hpp" #include "runtime/fieldType.hpp"
#include "runtime/init.hpp" #include "runtime/init.hpp"
#include "runtime/javaCalls.hpp" #include "runtime/javaCalls.hpp"

View file

@ -28,6 +28,7 @@
#include "oops/generateOopMap.hpp" #include "oops/generateOopMap.hpp"
#include "oops/oop.inline.hpp" #include "oops/oop.inline.hpp"
#include "oops/symbol.hpp" #include "oops/symbol.hpp"
#include "prims/jvm.h"
#include "runtime/handles.inline.hpp" #include "runtime/handles.inline.hpp"
#include "runtime/java.hpp" #include "runtime/java.hpp"
#include "runtime/relocator.hpp" #include "runtime/relocator.hpp"

View file

@ -57,6 +57,7 @@
#include "oops/method.hpp" #include "oops/method.hpp"
#include "oops/oop.inline.hpp" #include "oops/oop.inline.hpp"
#include "oops/symbol.hpp" #include "oops/symbol.hpp"
#include "prims/jvm.h"
#include "prims/jvmtiExport.hpp" #include "prims/jvmtiExport.hpp"
#include "prims/jvmtiRedefineClasses.hpp" #include "prims/jvmtiRedefineClasses.hpp"
#include "prims/jvmtiThreadState.hpp" #include "prims/jvmtiThreadState.hpp"

View file

@ -35,6 +35,7 @@
#include "oops/method.hpp" #include "oops/method.hpp"
#include "oops/objArrayOop.hpp" #include "oops/objArrayOop.hpp"
#include "oops/oop.inline.hpp" #include "oops/oop.inline.hpp"
#include "prims/jvm.h"
#include "runtime/arguments.hpp" #include "runtime/arguments.hpp"
#include "runtime/handles.inline.hpp" #include "runtime/handles.inline.hpp"
#include "utilities/copy.hpp" #include "utilities/copy.hpp"

View file

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -32,6 +32,7 @@
#include "oops/symbol.hpp" #include "oops/symbol.hpp"
#include "prims/jni.h" #include "prims/jni.h"
#include "prims/jniCheck.hpp" #include "prims/jniCheck.hpp"
#include "prims/jvm.h"
#include "prims/jvm_misc.hpp" #include "prims/jvm_misc.hpp"
#include "runtime/fieldDescriptor.hpp" #include "runtime/fieldDescriptor.hpp"
#include "runtime/handles.hpp" #include "runtime/handles.hpp"

View file

@ -27,6 +27,7 @@
#include "classfile/javaClasses.hpp" #include "classfile/javaClasses.hpp"
#include "classfile/vmSymbols.hpp" #include "classfile/vmSymbols.hpp"
#include "prims/jvm.h"
#include "runtime/frame.inline.hpp" #include "runtime/frame.inline.hpp"
#include "runtime/globals.hpp" #include "runtime/globals.hpp"
#include "runtime/interfaceSupport.hpp" #include "runtime/interfaceSupport.hpp"

View file

@ -39,6 +39,7 @@
#include "memory/allocation.inline.hpp" #include "memory/allocation.inline.hpp"
#include "memory/universe.inline.hpp" #include "memory/universe.inline.hpp"
#include "oops/oop.inline.hpp" #include "oops/oop.inline.hpp"
#include "prims/jvm.h"
#include "prims/jvmtiExport.hpp" #include "prims/jvmtiExport.hpp"
#include "runtime/arguments.hpp" #include "runtime/arguments.hpp"
#include "runtime/arguments_ext.hpp" #include "runtime/arguments_ext.hpp"

View file

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -26,6 +26,7 @@
#include "classfile/stringTable.hpp" #include "classfile/stringTable.hpp"
#include "classfile/symbolTable.hpp" #include "classfile/symbolTable.hpp"
#include "gc/shared/referenceProcessor.hpp" #include "gc/shared/referenceProcessor.hpp"
#include "prims/jvm.h"
#include "runtime/arguments.hpp" #include "runtime/arguments.hpp"
#include "runtime/commandLineFlagConstraintList.hpp" #include "runtime/commandLineFlagConstraintList.hpp"
#include "runtime/commandLineFlagRangeList.hpp" #include "runtime/commandLineFlagRangeList.hpp"

View file

@ -40,6 +40,7 @@
#include "oops/oop.inline.hpp" #include "oops/oop.inline.hpp"
#include "oops/fieldStreams.hpp" #include "oops/fieldStreams.hpp"
#include "oops/verifyOopClosure.hpp" #include "oops/verifyOopClosure.hpp"
#include "prims/jvm.h"
#include "prims/jvmtiThreadState.hpp" #include "prims/jvmtiThreadState.hpp"
#include "runtime/biasedLocking.hpp" #include "runtime/biasedLocking.hpp"
#include "runtime/compilationPolicy.hpp" #include "runtime/compilationPolicy.hpp"

View file

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -48,7 +48,9 @@
#include "runtime/stubCodeGenerator.hpp" #include "runtime/stubCodeGenerator.hpp"
#include "runtime/stubRoutines.hpp" #include "runtime/stubRoutines.hpp"
#include "runtime/thread.inline.hpp" #include "runtime/thread.inline.hpp"
#include "utilities/debug.hpp"
#include "utilities/decoder.hpp" #include "utilities/decoder.hpp"
#include "utilities/formatBuffer.hpp"
RegisterMap::RegisterMap(JavaThread *thread, bool update_map) { RegisterMap::RegisterMap(JavaThread *thread, bool update_map) {
_thread = thread; _thread = thread;

View file

@ -25,6 +25,7 @@
#include "precompiled.hpp" #include "precompiled.hpp"
#include "memory/allocation.inline.hpp" #include "memory/allocation.inline.hpp"
#include "oops/oop.inline.hpp" #include "oops/oop.inline.hpp"
#include "prims/jvm.h"
#include "runtime/arguments.hpp" #include "runtime/arguments.hpp"
#include "runtime/globals.hpp" #include "runtime/globals.hpp"
#include "runtime/globals_extension.hpp" #include "runtime/globals_extension.hpp"

View file

@ -25,7 +25,7 @@
#ifndef SHARE_VM_RUNTIME_GLOBALS_HPP #ifndef SHARE_VM_RUNTIME_GLOBALS_HPP
#define SHARE_VM_RUNTIME_GLOBALS_HPP #define SHARE_VM_RUNTIME_GLOBALS_HPP
#include "utilities/debug.hpp" #include "utilities/globalDefinitions.hpp"
#include "utilities/macros.hpp" #include "utilities/macros.hpp"
#include <float.h> // for DBL_MAX #include <float.h> // for DBL_MAX

View file

@ -48,6 +48,7 @@
#include "oops/objArrayOop.hpp" #include "oops/objArrayOop.hpp"
#include "oops/oop.inline.hpp" #include "oops/oop.inline.hpp"
#include "oops/symbol.hpp" #include "oops/symbol.hpp"
#include "prims/jvm.h"
#include "prims/jvmtiExport.hpp" #include "prims/jvmtiExport.hpp"
#include "runtime/arguments.hpp" #include "runtime/arguments.hpp"
#include "runtime/biasedLocking.hpp" #include "runtime/biasedLocking.hpp"

View file

@ -26,6 +26,7 @@
#include "classfile/vmSymbols.hpp" #include "classfile/vmSymbols.hpp"
#include "logging/log.hpp" #include "logging/log.hpp"
#include "oops/oop.inline.hpp" #include "oops/oop.inline.hpp"
#include "prims/jvm.h"
#include "runtime/handles.inline.hpp" #include "runtime/handles.inline.hpp"
#include "runtime/java.hpp" #include "runtime/java.hpp"
#include "runtime/mutex.hpp" #include "runtime/mutex.hpp"

View file

@ -25,6 +25,7 @@
#include "precompiled.hpp" #include "precompiled.hpp"
#include "logging/log.hpp" #include "logging/log.hpp"
#include "memory/allocation.inline.hpp" #include "memory/allocation.inline.hpp"
#include "prims/jvm.h"
#include "runtime/arguments.hpp" #include "runtime/arguments.hpp"
#include "runtime/java.hpp" #include "runtime/java.hpp"
#include "runtime/mutex.hpp" #include "runtime/mutex.hpp"

View file

@ -45,6 +45,7 @@
#include "oops/objArrayKlass.hpp" #include "oops/objArrayKlass.hpp"
#include "oops/oop.inline.hpp" #include "oops/oop.inline.hpp"
#include "prims/forte.hpp" #include "prims/forte.hpp"
#include "prims/jvm.h"
#include "prims/jvmtiExport.hpp" #include "prims/jvmtiExport.hpp"
#include "prims/methodHandles.hpp" #include "prims/methodHandles.hpp"
#include "prims/nativeLookup.hpp" #include "prims/nativeLookup.hpp"

View file

@ -50,6 +50,7 @@
#include "oops/oop.inline.hpp" #include "oops/oop.inline.hpp"
#include "oops/symbol.hpp" #include "oops/symbol.hpp"
#include "oops/verifyOopClosure.hpp" #include "oops/verifyOopClosure.hpp"
#include "prims/jvm.h"
#include "prims/jvm_misc.hpp" #include "prims/jvm_misc.hpp"
#include "prims/jvmtiExport.hpp" #include "prims/jvmtiExport.hpp"
#include "prims/jvmtiThreadState.hpp" #include "prims/jvmtiThreadState.hpp"

View file

@ -38,6 +38,8 @@
#include "services/diagnosticCommand.hpp" #include "services/diagnosticCommand.hpp"
#include "services/heapDumper.hpp" #include "services/heapDumper.hpp"
#include "services/writeableFlags.hpp" #include "services/writeableFlags.hpp"
#include "utilities/debug.hpp"
#include "utilities/formatBuffer.hpp"
volatile bool AttachListener::_initialized; volatile bool AttachListener::_initialized;

View file

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -25,6 +25,7 @@
#include "precompiled.hpp" #include "precompiled.hpp"
#include "memory/allocation.inline.hpp" #include "memory/allocation.inline.hpp"
#include "memory/resourceArea.hpp" #include "memory/resourceArea.hpp"
#include "prims/jvm.h"
#include "runtime/thread.hpp" #include "runtime/thread.hpp"
#include "services/diagnosticArgument.hpp" #include "services/diagnosticArgument.hpp"

View file

@ -30,6 +30,7 @@
#include "gc/shared/vmGCOperations.hpp" #include "gc/shared/vmGCOperations.hpp"
#include "memory/resourceArea.hpp" #include "memory/resourceArea.hpp"
#include "oops/oop.inline.hpp" #include "oops/oop.inline.hpp"
#include "prims/jvm.h"
#include "runtime/globals.hpp" #include "runtime/globals.hpp"
#include "runtime/javaCalls.hpp" #include "runtime/javaCalls.hpp"
#include "runtime/os.hpp" #include "runtime/os.hpp"
@ -39,6 +40,8 @@
#include "services/heapDumper.hpp" #include "services/heapDumper.hpp"
#include "services/management.hpp" #include "services/management.hpp"
#include "services/writeableFlags.hpp" #include "services/writeableFlags.hpp"
#include "utilities/debug.hpp"
#include "utilities/formatBuffer.hpp"
#include "utilities/macros.hpp" #include "utilities/macros.hpp"
#include "oops/objArrayOop.inline.hpp" #include "oops/objArrayOop.inline.hpp"

View file

@ -26,6 +26,7 @@
#include "memory/oopFactory.hpp" #include "memory/oopFactory.hpp"
#include "memory/resourceArea.hpp" #include "memory/resourceArea.hpp"
#include "oops/oop.inline.hpp" #include "oops/oop.inline.hpp"
#include "prims/jvm.h"
#include "runtime/javaCalls.hpp" #include "runtime/javaCalls.hpp"
#include "runtime/mutexLocker.hpp" #include "runtime/mutexLocker.hpp"
#include "services/diagnosticArgument.hpp" #include "services/diagnosticArgument.hpp"

View file

@ -34,6 +34,7 @@
#include "oops/objArrayKlass.hpp" #include "oops/objArrayKlass.hpp"
#include "oops/objArrayOop.inline.hpp" #include "oops/objArrayOop.inline.hpp"
#include "oops/oop.inline.hpp" #include "oops/oop.inline.hpp"
#include "prims/jvm.h"
#include "runtime/javaCalls.hpp" #include "runtime/javaCalls.hpp"
#include "runtime/jniHandles.hpp" #include "runtime/jniHandles.hpp"
#include "runtime/os.hpp" #include "runtime/os.hpp"

View file

@ -56,6 +56,8 @@
#include "services/memoryService.hpp" #include "services/memoryService.hpp"
#include "services/runtimeService.hpp" #include "services/runtimeService.hpp"
#include "services/threadService.hpp" #include "services/threadService.hpp"
#include "utilities/debug.hpp"
#include "utilities/formatBuffer.hpp"
#include "utilities/macros.hpp" #include "utilities/macros.hpp"
PerfVariable* Management::_begin_vm_creation_time = NULL; PerfVariable* Management::_begin_vm_creation_time = NULL;

View file

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -23,6 +23,7 @@
*/ */
#include "precompiled.hpp" #include "precompiled.hpp"
#include "prims/jvm.h"
#include "runtime/mutex.hpp" #include "runtime/mutex.hpp"
#include "services/memBaseline.hpp" #include "services/memBaseline.hpp"
#include "services/memReporter.hpp" #include "services/memReporter.hpp"

View file

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -25,6 +25,9 @@
#ifndef SHARE_VM_SERVICES_WRITEABLEFLAG_HPP #ifndef SHARE_VM_SERVICES_WRITEABLEFLAG_HPP
#define SHARE_VM_SERVICES_WRITEABLEFLAG_HPP #define SHARE_VM_SERVICES_WRITEABLEFLAG_HPP
#include "runtime/globals.hpp"
#include "utilities/formatBuffer.hpp"
class WriteableFlags : AllStatic { class WriteableFlags : AllStatic {
private: private:
// a writeable flag setter accepting either 'jvalue' or 'char *' values // a writeable flag setter accepting either 'jvalue' or 'char *' values

View file

@ -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

View file

@ -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

View file

@ -36,6 +36,7 @@
#include "memory/resourceArea.hpp" #include "memory/resourceArea.hpp"
#include "memory/universe.hpp" #include "memory/universe.hpp"
#include "oops/oop.inline.hpp" #include "oops/oop.inline.hpp"
#include "prims/jvm.h"
#include "prims/privilegedStack.hpp" #include "prims/privilegedStack.hpp"
#include "runtime/arguments.hpp" #include "runtime/arguments.hpp"
#include "runtime/atomic.hpp" #include "runtime/atomic.hpp"
@ -51,6 +52,7 @@
#include "services/heapDumper.hpp" #include "services/heapDumper.hpp"
#include "utilities/defaultStream.hpp" #include "utilities/defaultStream.hpp"
#include "utilities/events.hpp" #include "utilities/events.hpp"
#include "utilities/formatBuffer.hpp"
#include "utilities/macros.hpp" #include "utilities/macros.hpp"
#include "utilities/vmError.hpp" #include "utilities/vmError.hpp"
@ -80,14 +82,6 @@
# endif # endif
#endif // PRODUCT #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) ATTRIBUTE_PRINTF(1, 2)
void warning(const char* format, ...) { void warning(const char* format, ...) {
if (PrintWarnings) { if (PrintWarnings) {
@ -601,7 +595,7 @@ extern "C" void ps() { // print stack
f = f.sender(&reg_map); f = f.sender(&reg_map);
tty->print("(guessing starting frame id=" PTR_FORMAT " based on current fp)\n", p2i(f.id())); tty->print("(guessing starting frame id=" PTR_FORMAT " based on current fp)\n", p2i(f.id()));
p->trace_stack_from(vframe::new_vframe(&f, &reg_map, p)); p->trace_stack_from(vframe::new_vframe(&f, &reg_map, p));
pd_ps(f); pd_ps(f);
#endif // PRODUCT #endif // PRODUCT
} }
@ -765,57 +759,13 @@ void help() {
tty->print_cr(" ndebug() - undo debug"); 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 extern "C" void pns(void* sp, void* fp, void* pc) { // print native stack
Command c("pns"); Command c("pns");
static char buf[O_BUFLEN]; static char buf[O_BUFLEN];
Thread* t = Thread::current_or_null(); Thread* t = Thread::current_or_null();
// Call generic frame constructor (certain arguments may be ignored) // Call generic frame constructor (certain arguments may be ignored)
frame fr(sp, fp, pc); 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 #endif // !PRODUCT

View file

@ -25,97 +25,11 @@
#ifndef SHARE_VM_UTILITIES_DEBUG_HPP #ifndef SHARE_VM_UTILITIES_DEBUG_HPP
#define SHARE_VM_UTILITIES_DEBUG_HPP #define SHARE_VM_UTILITIES_DEBUG_HPP
#include "utilities/globalDefinitions.hpp" #include "utilities/breakpoint.hpp"
#include "prims/jvm.h" #include "utilities/compilerWarnings.hpp"
#include "utilities/macros.hpp"
#include <stdarg.h> #include <stddef.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;
// assertions // assertions
#ifndef ASSERT #ifndef ASSERT
@ -311,10 +225,7 @@ NOT_PRODUCT(void controlled_crash(int how);)
// for test purposes, which is not NULL and contains bits in every word // for test purposes, which is not NULL and contains bits in every word
NOT_PRODUCT(void* get_segfault_address();) NOT_PRODUCT(void* get_segfault_address();)
class frame;
void pd_ps(frame f); 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 #endif // SHARE_VM_UTILITIES_DEBUG_HPP

View file

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -27,6 +27,7 @@
#if !defined(_WINDOWS) && !defined(__APPLE__) #if !defined(_WINDOWS) && !defined(__APPLE__)
#include "memory/allocation.inline.hpp" #include "memory/allocation.inline.hpp"
#include "prims/jvm.h"
#include "runtime/os.hpp" #include "runtime/os.hpp"
#include "utilities/elfStringTable.hpp" #include "utilities/elfStringTable.hpp"

View file

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -28,6 +28,7 @@
#include "memory/allocation.hpp" #include "memory/allocation.hpp"
#include "runtime/mutexLocker.hpp" #include "runtime/mutexLocker.hpp"
#include "runtime/thread.hpp" #include "runtime/thread.hpp"
#include "utilities/formatBuffer.hpp"
#include "utilities/vmError.hpp" #include "utilities/vmError.hpp"
// Events and EventMark provide interfaces to log events taking place in the vm. // Events and EventMark provide interfaces to log events taking place in the vm.

View file

@ -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);
}

View file

@ -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

View file

@ -25,55 +25,83 @@
#ifndef SHARE_VM_UTILITIES_GLOBALDEFINITIONS_HPP #ifndef SHARE_VM_UTILITIES_GLOBALDEFINITIONS_HPP
#define SHARE_VM_UTILITIES_GLOBALDEFINITIONS_HPP #define SHARE_VM_UTILITIES_GLOBALDEFINITIONS_HPP
#ifdef TARGET_COMPILER_gcc #include "utilities/compilerWarnings.hpp"
# include "utilities/globalDefinitions_gcc.hpp" #include "utilities/debug.hpp"
#endif #include "utilities/macros.hpp"
#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 COMPILER_HEADER(utilities/globalDefinitions)
// Defaults for macros that might be defined per compiler.
#ifndef NOINLINE #ifndef NOINLINE
#define NOINLINE #define NOINLINE
#endif #endif
#ifndef ALWAYSINLINE #ifndef ALWAYSINLINE
#define ALWAYSINLINE inline #define ALWAYSINLINE inline
#endif #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) // This file holds all globally used constants & types, class (forward)
// declarations and a few frequently used utility functions. // 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 // Constants
@ -950,8 +978,6 @@ class RFrame;
class CompiledRFrame; class CompiledRFrame;
class InterpretedRFrame; class InterpretedRFrame;
class frame;
class vframe; class vframe;
class javaVFrame; class javaVFrame;
class interpretedVFrame; class interpretedVFrame;
@ -1012,11 +1038,9 @@ class JavaValue;
class methodHandle; class methodHandle;
class JavaCallArguments; 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); extern void basic_fatal(const char* msg);
//---------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------
// Special constants for debugging // Special constants for debugging
@ -1152,35 +1176,27 @@ inline int log2_long(jlong x) {
//* the argument must be exactly a power of 2 //* the argument must be exactly a power of 2
inline int exact_log2(intptr_t x) { inline int exact_log2(intptr_t x) {
#ifdef ASSERT assert(is_power_of_2(x), "x must be a power of 2: " INTPTR_FORMAT, x);
if (!is_power_of_2(x)) basic_fatal("x must be a power of 2");
#endif
return log2_intptr(x); return log2_intptr(x);
} }
//* the argument must be exactly a power of 2 //* the argument must be exactly a power of 2
inline int exact_log2_long(jlong x) { inline int exact_log2_long(jlong x) {
#ifdef ASSERT assert(is_power_of_2_long(x), "x must be a power of 2: " JLONG_FORMAT, x);
if (!is_power_of_2_long(x)) basic_fatal("x must be a power of 2");
#endif
return log2_long(x); return log2_long(x);
} }
// returns integer round-up to the nearest multiple of s (s must be a power of two) // 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) { inline intptr_t round_to(intptr_t x, uintx s) {
#ifdef ASSERT assert(is_power_of_2(s), "s must be a power of 2: " UINTX_FORMAT, s);
if (!is_power_of_2(s)) basic_fatal("s must be a power of 2");
#endif
const uintx m = s - 1; const uintx m = s - 1;
return mask_bits(x + m, ~m); return mask_bits(x + m, ~m);
} }
// returns integer round-down to the nearest multiple of s (s must be a power of two) // 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) { inline intptr_t round_down(intptr_t x, uintx s) {
#ifdef ASSERT assert(is_power_of_2(s), "s must be a power of 2: " UINTX_FORMAT, s);
if (!is_power_of_2(s)) basic_fatal("s must be a power of 2");
#endif
const uintx m = s - 1; const uintx m = s - 1;
return mask_bits(x, ~m); return mask_bits(x, ~m);
} }
@ -1332,66 +1348,6 @@ template<class T> static void swap(T& a, T& b) {
b = tmp; 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])) #define ARRAY_SIZE(array) (sizeof(array)/sizeof((array)[0]))
//---------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------

View file

@ -158,7 +158,6 @@ typedef uint64_t julong;
#ifdef SOLARIS #ifdef SOLARIS
//----------------------------------------------------------------------------------------------------
// ANSI C++ fixes // ANSI C++ fixes
// NOTE:In the ANSI committee's continuing attempt to make each version // NOTE:In the ANSI committee's continuing attempt to make each version
// of C++ incompatible with the previous version, you can no longer cast // of C++ incompatible with the previous version, you can no longer cast
@ -193,14 +192,6 @@ extern "C" {
}; };
#endif // SOLARIS #endif // SOLARIS
//----------------------------------------------------------------------------------------------------
// Debugging
#define DEBUG_EXCEPTION ::abort();
extern "C" void breakpoint();
#define BREAKPOINT ::breakpoint()
// checking for nanness // checking for nanness
#ifdef SOLARIS #ifdef SOLARIS
#ifdef SPARC #ifdef SPARC
@ -241,40 +232,6 @@ inline int wcslen(const jchar* x) { return wcslen((const wchar_t*)x); }
#define PRAGMA_IMPLEMENTATION #pragma implementation #define PRAGMA_IMPLEMENTATION #pragma implementation
#define VALUE_OBJ_CLASS_SPEC #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) #if (__GNUC__ == 2) && (__GNUC_MINOR__ < 95)
#define TEMPLATE_TABLE_BUG #define TEMPLATE_TABLE_BUG
#endif #endif

View file

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -175,7 +175,6 @@ typedef unsigned long long julong;
#ifdef SOLARIS #ifdef SOLARIS
//----------------------------------------------------------------------------------------------------
// ANSI C++ fixes // ANSI C++ fixes
// NOTE:In the ANSI committee's continuing attempt to make each version // NOTE:In the ANSI committee's continuing attempt to make each version
// of C++ incompatible with the previous version, you can no longer cast // of C++ incompatible with the previous version, you can no longer cast
@ -210,14 +209,6 @@ extern "C" {
}; };
#endif #endif
//----------------------------------------------------------------------------------------------------
// Debugging
#define DEBUG_EXCEPTION ::abort();
extern "C" void breakpoint();
#define BREAKPOINT ::breakpoint()
// checking for nanness // checking for nanness
#ifdef SOLARIS #ifdef SOLARIS
#ifdef SPARC #ifdef SPARC

View file

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -108,7 +108,6 @@ typedef signed int ssize_t;
#endif #endif
#endif #endif
//----------------------------------------------------------------------------------------------------
// Additional Java basic types // Additional Java basic types
typedef unsigned char jubyte; typedef unsigned char jubyte;
@ -116,38 +115,22 @@ typedef unsigned short jushort;
typedef unsigned int juint; typedef unsigned int juint;
typedef unsigned __int64 julong; typedef unsigned __int64 julong;
//----------------------------------------------------------------------------------------------------
// Non-standard stdlib-like stuff: // Non-standard stdlib-like stuff:
inline int strcasecmp(const char *s1, const char *s2) { return _stricmp(s1,s2); } 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) { inline int strncasecmp(const char *s1, const char *s2, size_t n) {
return _strnicmp(s1,s2,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 // Checking for nanness
inline int g_isnan(jfloat f) { return _isnan(f); } inline int g_isnan(jfloat f) { return _isnan(f); }
inline int g_isnan(jdouble f) { return _isnan(f); } inline int g_isnan(jdouble f) { return _isnan(f); }
//----------------------------------------------------------------------------------------------------
// Checking for finiteness // Checking for finiteness
inline int g_isfinite(jfloat f) { return _finite(f); } inline int g_isfinite(jfloat f) { return _finite(f); }
inline int g_isfinite(jdouble f) { return _finite(f); } inline int g_isfinite(jdouble f) { return _finite(f); }
//----------------------------------------------------------------------------------------------------
// Miscellaneous // Miscellaneous
// Visual Studio 2005 deprecates POSIX names - use ISO C++ names instead // Visual Studio 2005 deprecates POSIX names - use ISO C++ names instead

View file

@ -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. * Copyright (c) 2012, 2017 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
@ -106,15 +106,6 @@ typedef uint16_t jushort;
typedef uint32_t juint; typedef uint32_t juint;
typedef uint64_t julong; typedef uint64_t julong;
//----------------------------------------------------------------------------------------------------
// Debugging
#define DEBUG_EXCEPTION ::abort();
extern "C" void breakpoint();
#define BREAKPOINT ::breakpoint()
// checking for nanness // checking for nanness
#ifdef AIX #ifdef AIX
inline int g_isnan(float f) { return isnan(f); } inline int g_isnan(float f) { return isnan(f); }

View file

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * 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 CPU_HEADER_STEM(basename) PASTE_TOKENS(basename, INCLUDE_SUFFIX_CPU)
#define OS_HEADER_STEM(basename) PASTE_TOKENS(basename, INCLUDE_SUFFIX_OS) #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 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. // Include platform dependent files.
// //
// This macro constructs from basename and INCLUDE_SUFFIX_OS / // This macro constructs from basename and INCLUDE_SUFFIX_OS /
// INCLUDE_SUFFIX_CPU, which are set on the command line, the name of // INCLUDE_SUFFIX_CPU / INCLUDE_SUFFIX_COMPILER, which are set on
// platform dependent files to be included. // the command line, the name of platform dependent files to be included.
// Example: INCLUDE_SUFFIX_OS=_linux / INCLUDE_SUFFIX_CPU=_sparc // Example: INCLUDE_SUFFIX_OS=_linux / INCLUDE_SUFFIX_CPU=_sparc
// CPU_HEADER_INLINE(macroAssembler) --> macroAssembler_sparc.inline.hpp // CPU_HEADER_INLINE(macroAssembler) --> macroAssembler_sparc.inline.hpp
// OS_CPU_HEADER(vmStructs) --> vmStructs_linux_sparc.hpp // OS_CPU_HEADER(vmStructs) --> vmStructs_linux_sparc.hpp
@ -511,6 +512,9 @@
// basename<os><cpu>.hpp / basename<os><cpu>.inline.hpp // 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(basename) XSTR(OS_CPU_HEADER_STEM(basename).hpp)
#define OS_CPU_HEADER_INLINE(basename) XSTR(OS_CPU_HEADER_STEM(basename).inline.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 // 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 // aligned, such that (*dest) occupies the upper 16 bits of an aligned 32-bit word. The best way to

View file

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -25,6 +25,7 @@
#include "precompiled.hpp" #include "precompiled.hpp"
#include "compiler/compileLog.hpp" #include "compiler/compileLog.hpp"
#include "oops/oop.inline.hpp" #include "oops/oop.inline.hpp"
#include "prims/jvm.h"
#include "runtime/arguments.hpp" #include "runtime/arguments.hpp"
#include "runtime/os.hpp" #include "runtime/os.hpp"
#include "runtime/vm_version.hpp" #include "runtime/vm_version.hpp"

View file

@ -29,6 +29,7 @@
#include "compiler/disassembler.hpp" #include "compiler/disassembler.hpp"
#include "gc/shared/collectedHeap.hpp" #include "gc/shared/collectedHeap.hpp"
#include "logging/logConfiguration.hpp" #include "logging/logConfiguration.hpp"
#include "prims/jvm.h"
#include "prims/whitebox.hpp" #include "prims/whitebox.hpp"
#include "runtime/arguments.hpp" #include "runtime/arguments.hpp"
#include "runtime/atomic.hpp" #include "runtime/atomic.hpp"
@ -203,6 +204,46 @@ void VMError::print_stack_trace(outputStream* st, JavaThread* jt,
#endif // ZERO #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) { static void print_oom_reasons(outputStream* st) {
st->print_cr("# Possible reasons:"); st->print_cr("# Possible reasons:");
st->print_cr("# The system is out of physical RAM or swap space"); st->print_cr("# The system is out of physical RAM or swap space");

View file

@ -28,6 +28,7 @@
#include "utilities/globalDefinitions.hpp" #include "utilities/globalDefinitions.hpp"
class Decoder; class Decoder;
class frame;
class VM_ReportJavaOutOfMemory; class VM_ReportJavaOutOfMemory;
class VMError : public AllStatic { class VMError : public AllStatic {
@ -99,6 +100,12 @@ class VMError : public AllStatic {
static void print_stack_trace(outputStream* st, JavaThread* jt, static void print_stack_trace(outputStream* st, JavaThread* jt,
char* buf, int buflen, bool verbose = false); 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) { static bool should_report_bug(unsigned int id) {
return (id != OOM_MALLOC_ERROR) && (id != OOM_MMAP_ERROR); return (id != OOM_MALLOC_ERROR) && (id != OOM_MMAP_ERROR);
} }

View file

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -26,6 +26,7 @@
#include "logTestUtils.inline.hpp" #include "logTestUtils.inline.hpp"
#include "logging/logConfiguration.hpp" #include "logging/logConfiguration.hpp"
#include "memory/resourceArea.hpp" #include "memory/resourceArea.hpp"
#include "prims/jvm.h"
#include "unittest.hpp" #include "unittest.hpp"
#include "utilities/ostream.hpp" #include "utilities/ostream.hpp"

View file

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -26,6 +26,7 @@
#include "logTestFixture.hpp" #include "logTestFixture.hpp"
#include "logTestUtils.inline.hpp" #include "logTestUtils.inline.hpp"
#include "logging/log.hpp" #include "logging/log.hpp"
#include "prims/jvm.h"
#include "unittest.hpp" #include "unittest.hpp"
class LogTest : public LogTestFixture { class LogTest : public LogTestFixture {

View file

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -31,6 +31,7 @@
#include "logging/logTag.hpp" #include "logging/logTag.hpp"
#include "logging/logTagSet.hpp" #include "logging/logTagSet.hpp"
#include "memory/resourceArea.hpp" #include "memory/resourceArea.hpp"
#include "prims/jvm.h"
#include "unittest.hpp" #include "unittest.hpp"
#include "utilities/ostream.hpp" #include "utilities/ostream.hpp"

View file

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -23,6 +23,7 @@
#include "precompiled.hpp" #include "precompiled.hpp"
#include "logging/logDecorators.hpp" #include "logging/logDecorators.hpp"
#include "prims/jvm.h"
#include "unittest.hpp" #include "unittest.hpp"
static LogDecorators::Decorator decorator_array[] = { static LogDecorators::Decorator decorator_array[] = {

View file

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -25,6 +25,7 @@
#include "logTestUtils.inline.hpp" #include "logTestUtils.inline.hpp"
#include "logging/logFileOutput.hpp" #include "logging/logFileOutput.hpp"
#include "memory/resourceArea.hpp" #include "memory/resourceArea.hpp"
#include "prims/jvm.h"
#include "runtime/os.hpp" #include "runtime/os.hpp"
#include "unittest.hpp" #include "unittest.hpp"
#include "utilities/globalDefinitions.hpp" #include "utilities/globalDefinitions.hpp"

View file

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -26,6 +26,7 @@
#include "logTestUtils.inline.hpp" #include "logTestUtils.inline.hpp"
#include "logging/log.hpp" #include "logging/log.hpp"
#include "logging/logMessage.hpp" #include "logging/logMessage.hpp"
#include "prims/jvm.h"
#include "unittest.hpp" #include "unittest.hpp"
#include "utilities/globalDefinitions.hpp" #include "utilities/globalDefinitions.hpp"

View file

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -25,6 +25,7 @@
#include "logging/logLevel.hpp" #include "logging/logLevel.hpp"
#include "logging/logTagLevelExpression.hpp" #include "logging/logTagLevelExpression.hpp"
#include "logging/logTagSet.hpp" #include "logging/logTagSet.hpp"
#include "prims/jvm.h"
#include "unittest.hpp" #include "unittest.hpp"
#include "utilities/globalDefinitions.hpp" #include "utilities/globalDefinitions.hpp"

Some files were not shown because too many files have changed in this diff Show more