提交 800fb33c 编写于 作者: Y ysr

Merge

......@@ -121,15 +121,13 @@ static bool process_get_lwp_regs(struct ps_prochandle* ph, pid_t pid, struct use
#define ptrace_getregs(request, pid, addr, data) ptrace(request, pid, data, addr)
#endif
#ifdef _LP64
#ifdef PTRACE_GETREGS64
#if defined(_LP64) && defined(PTRACE_GETREGS64)
#define PTRACE_GETREGS_REQ PTRACE_GETREGS64
#endif
#else
#if defined(PTRACE_GETREGS) || defined(PT_GETREGS)
#elif defined(PTRACE_GETREGS)
#define PTRACE_GETREGS_REQ PTRACE_GETREGS
#elif defined(PT_GETREGS)
#define PTRACE_GETREGS_REQ PT_GETREGS
#endif
#endif /* _LP64 */
#ifdef PTRACE_GETREGS_REQ
if (ptrace_getregs(PTRACE_GETREGS_REQ, pid, user, NULL) < 0) {
......
......@@ -101,15 +101,14 @@ ifndef HOTSPOT_RELEASE_VERSION
endif
ifdef HOTSPOT_BUILD_VERSION
# specified in command line (PRT build)
# specified in command line
else
ifdef JPRT_BUILD_VERSION
# JPR build
HOTSPOT_BUILD_VERSION=$(JPRT_BUILD_VERSION)
else
ifdef COOKED_BUILD_NUMBER
ifdef COOKED_BUILD_NUMBER
# JRE build
HOTSPOT_BUILD_VERSION=
HOTSPOT_BUILD_VERSION=
else
ifdef USER_RELEASE_SUFFIX
HOTSPOT_BUILD_VERSION=internal-$(USER_RELEASE_SUFFIX)
else
HOTSPOT_BUILD_VERSION=internal
endif
......
......@@ -25,9 +25,6 @@
# JPRT rule to build this workspace
JPRT_ARCHIVE_BUNDLE=$(ABS_OUTPUTDIR)/$(JPRT_BUILD_FLAVOR)-bundle.zip
ifdef JPRT_BUILD_VERSION
MILESTONE=$(JPRT_BUILD_VERSION)
endif
ifeq ($(OSNAME),windows)
ZIPFLAGS=-q
......
......@@ -37,7 +37,7 @@
# OS_FAMILY - operating system
# VARIANT - core, compiler1, compiler2, or tiered
# HOTSPOT_RELEASE_VERSION - <major>.<minor>-b<nn> (11.0-b07)
# HOTSPOT_BUILD_VERSION - internal, PRTjob ID, JPRTjob ID
# HOTSPOT_BUILD_VERSION - internal, internal-$(USER_RELEASE_SUFFIX) or empty
# JRE_RELEASE_VERSION - <major>.<minor>.<micro> (1.7.0)
#
# Builds the directory trees with makefiles plus some convenience files in
......
......@@ -42,11 +42,14 @@ CC_VER_MINOR := $(shell $(CC) -dumpversion | sed 's/egcs-//' | cut -d'.' -f2)
# check for precompiled headers support
ifneq "$(shell expr \( $(CC_VER_MAJOR) \> 3 \) \| \( \( $(CC_VER_MAJOR) = 3 \) \& \( $(CC_VER_MINOR) \>= 4 \) \))" "0"
# Allow the user to turn off precompiled headers from the command line.
ifneq ($(USE_PRECOMPILED_HEADER),0)
USE_PRECOMPILED_HEADER=1
PRECOMPILED_HEADER_DIR=.
PRECOMPILED_HEADER_SRC=$(GAMMADIR)/src/share/vm/precompiled.hpp
PRECOMPILED_HEADER=$(PRECOMPILED_HEADER_DIR)/precompiled.hpp.gch
endif
endif
#------------------------------------------------------------------------
......@@ -150,6 +153,11 @@ ifneq ("${CC_VER_MAJOR}", "2")
DEPFLAGS = -MMD -MP -MF $(DEP_DIR)/$(@:%=%.d)
endif
# -DDONT_USE_PRECOMPILED_HEADER will exclude all includes in precompiled.hpp.
ifneq ($(USE_PRECOMPILED_HEADER),1)
CFLAGS += -DDONT_USE_PRECOMPILED_HEADER
endif
#------------------------------------------------------------------------
# Linker flags
......
......@@ -24,19 +24,23 @@
# Rules to build gamma launcher, used by vm.make
# gamma[_g]: launcher
LAUNCHER_SCRIPT = hotspot
LAUNCHER = gamma
LAUNCHER_G = $(LAUNCHER)$(G_SUFFIX)
LAUNCHERDIR = $(GAMMADIR)/src/os/$(Platform_os_family)/launcher
LAUNCHERFLAGS = $(ARCHFLAG) \
LAUNCHERDIR := $(GAMMADIR)/src/os/posix/launcher
LAUNCHERDIR_SHARE := $(GAMMADIR)/src/share/tools/launcher
LAUNCHERFLAGS := $(ARCHFLAG) \
-I$(LAUNCHERDIR) -I$(GAMMADIR)/src/share/vm/prims \
-I$(LAUNCHERDIR_SHARE) \
-DFULL_VERSION=\"$(HOTSPOT_RELEASE_VERSION)\" \
-DJDK_MAJOR_VERSION=\"$(JDK_MAJOR_VERSION)\" \
-DJDK_MINOR_VERSION=\"$(JDK_MINOR_VERSION)\" \
-DARCH=\"$(LIBARCH)\" \
-DGAMMA \
-DLAUNCHER_TYPE=\"gamma\" \
-DLINK_INTO_$(LINK_INTO)
-DLINK_INTO_$(LINK_INTO) \
$(TARGET_DEFINES)
ifeq ($(LINK_INTO),AOUT)
LAUNCHER.o = launcher.o $(JVM_OBJ_FILES)
......@@ -55,22 +59,35 @@ LINK_LAUNCHER = $(LINK.c)
LINK_LAUNCHER/PRE_HOOK = $(LINK_LIB.CC/PRE_HOOK)
LINK_LAUNCHER/POST_HOOK = $(LINK_LIB.CC/POST_HOOK)
launcher.o: launcher.c $(LAUNCHERDIR)/java.c $(LAUNCHERDIR)/java_md.c
$(CC) -g -c -o $@ launcher.c $(LAUNCHERFLAGS) $(CPPFLAGS) $(TARGET_DEFINES)
launcher.c:
@echo Generating $@
$(QUIETLY) { \
echo '#define debug launcher_debug'; \
echo '#include "java.c"'; \
echo '#include "java_md.c"'; \
} > $@
$(LAUNCHER): $(LAUNCHER.o) $(LIBJVM) $(LAUNCHER_MAPFILE)
$(QUIETLY) { \
echo Linking launcher...; \
$(LINK_LAUNCHER/PRE_HOOK) \
$(LINK_LAUNCHER) $(LFLAGS_LAUNCHER) -o $@ $(LAUNCHER.o) $(LIBS_LAUNCHER); \
$(LINK_LAUNCHER/POST_HOOK) \
[ -f $(LAUNCHER_G) ] || { ln -s $@ $(LAUNCHER_G); }; \
}
LAUNCHER_OUT = launcher
SUFFIXES += .d
SOURCES := $(shell find $(LAUNCHERDIR) -name "*.c")
SOURCES_SHARE := $(shell find $(LAUNCHERDIR_SHARE) -name "*.c")
OBJS := $(patsubst $(LAUNCHERDIR)/%.c,$(LAUNCHER_OUT)/%.o,$(SOURCES)) $(patsubst $(LAUNCHERDIR_SHARE)/%.c,$(LAUNCHER_OUT)/%.o,$(SOURCES_SHARE))
DEPFILES := $(patsubst %.o,%.d,$(OBJS))
-include $(DEPFILES)
$(LAUNCHER_OUT)/%.o: $(LAUNCHERDIR_SHARE)/%.c
$(QUIETLY) [ -d $(LAUNCHER_OUT) ] || { mkdir -p $(LAUNCHER_OUT); }
$(QUIETLY) $(CC) -g -o $@ -c $< -MMD $(LAUNCHERFLAGS) $(CPPFLAGS)
$(LAUNCHER_OUT)/%.o: $(LAUNCHERDIR)/%.c
$(QUIETLY) [ -d $(LAUNCHER_OUT) ] || { mkdir -p $(LAUNCHER_OUT); }
$(QUIETLY) $(CC) -g -o $@ -c $< -MMD $(LAUNCHERFLAGS) $(CPPFLAGS)
$(LAUNCHER): $(OBJS) $(LIBJVM) $(LAUNCHER_MAPFILE)
$(QUIETLY) echo Linking launcher...
$(QUIETLY) $(LINK_LAUNCHER/PRE_HOOK)
$(QUIETLY) $(LINK_LAUNCHER) $(LFLAGS_LAUNCHER) -o $@ $(OBJS) $(LIBS_LAUNCHER)
$(QUIETLY) $(LINK_LAUNCHER/POST_HOOK)
$(LAUNCHER): $(LAUNCHER_SCRIPT)
$(LAUNCHER_SCRIPT): $(LAUNCHERDIR)/launcher.script
$(QUIETLY) sed -e 's/@@LIBARCH@@/$(LIBARCH)/g' $< > $@
$(QUIETLY) chmod +x $@
......@@ -79,6 +79,9 @@ ifeq ($(shell expr $(COMPILER_REV_NUMERIC) \>= 509), 1)
DEPFLAGS = -xMMD -xMF $(DEP_DIR)/$(@:%=%.d)
endif
# -DDONT_USE_PRECOMPILED_HEADER will exclude all includes in precompiled.hpp.
CFLAGS += -DDONT_USE_PRECOMPILED_HEADER
#------------------------------------------------------------------------
# Linker flags
......
......@@ -173,7 +173,7 @@ endef
Src_Files := $(foreach e,$(Src_Dirs),$(call findsrc,$(e)))
Obj_Files = $(addsuffix .o,$(basename $(Src_Files)))
Obj_Files = $(sort $(addsuffix .o,$(basename $(Src_Files))))
JVM_OBJ_FILES = $(Obj_Files)
......
......@@ -37,7 +37,7 @@
# OS_FAMILY - operating system
# VARIANT - core, compiler1, compiler2, or tiered
# HOTSPOT_RELEASE_VERSION - <major>.<minor>-b<nn> (11.0-b07)
# HOTSPOT_BUILD_VERSION - internal, PRTjob ID, JPRTjob ID
# HOTSPOT_BUILD_VERSION - internal, internal-$(USER_RELEASE_SUFFIX) or empty
# JRE_RELEASE_VERSION - <major>.<minor>.<micro> (1.7.0)
#
# Builds the directory trees with makefiles plus some convenience files in
......
......@@ -47,11 +47,14 @@ $(shell $(CC) -dumpversion | sed 's/egcs-//' | cut -d'.' -f2)
# check for precompiled headers support
ifneq "$(shell expr \( $(CC_VER_MAJOR) \> 3 \) \| \( \( $(CC_VER_MAJOR) = 3 \) \& \( $(CC_VER_MINOR) \>= 4 \) \))" "0"
# Allow the user to turn off precompiled headers from the command line.
ifneq ($(USE_PRECOMPILED_HEADER),0)
USE_PRECOMPILED_HEADER=1
PRECOMPILED_HEADER_DIR=.
PRECOMPILED_HEADER_SRC=$(GAMMADIR)/src/share/vm/precompiled.hpp
PRECOMPILED_HEADER=$(PRECOMPILED_HEADER_DIR)/precompiled.hpp.gch
endif
endif
#------------------------------------------------------------------------
......@@ -138,6 +141,11 @@ ifneq ("${CC_VER_MAJOR}", "2")
DEPFLAGS = -MMD -MP -MF $(DEP_DIR)/$(@:%=%.d)
endif
# -DDONT_USE_PRECOMPILED_HEADER will exclude all includes in precompiled.hpp.
ifneq ($(USE_PRECOMPILED_HEADER),1)
CFLAGS += -DDONT_USE_PRECOMPILED_HEADER
endif
#------------------------------------------------------------------------
# Linker flags
......
......@@ -24,18 +24,22 @@
# Rules to build gamma launcher, used by vm.make
# gamma[_g]: launcher
LAUNCHER_SCRIPT = hotspot
LAUNCHER = gamma
LAUNCHER_G = $(LAUNCHER)$(G_SUFFIX)
LAUNCHERDIR = $(GAMMADIR)/src/os/$(Platform_os_family)/launcher
LAUNCHERDIR = $(GAMMADIR)/src/os/posix/launcher
LAUNCHERDIR_SHARE := $(GAMMADIR)/src/share/tools/launcher
LAUNCHERFLAGS = $(ARCHFLAG) \
-I$(LAUNCHERDIR) -I$(GAMMADIR)/src/share/vm/prims \
-I$(LAUNCHERDIR_SHARE) \
-DFULL_VERSION=\"$(HOTSPOT_RELEASE_VERSION)\" \
-DJDK_MAJOR_VERSION=\"$(JDK_MAJOR_VERSION)\" \
-DJDK_MINOR_VERSION=\"$(JDK_MINOR_VERSION)\" \
-DARCH=\"$(LIBARCH)\" \
-DGAMMA \
-DLAUNCHER_TYPE=\"gamma\" \
-DLINK_INTO_$(LINK_INTO)
-DLINK_INTO_$(LINK_INTO) \
$(TARGET_DEFINES)
ifeq ($(LINK_INTO),AOUT)
LAUNCHER.o = launcher.o $(JVM_OBJ_FILES)
......@@ -68,24 +72,37 @@ ifeq ("${Platform_compiler}", "sparcWorks")
#LAUNCHERFLAGS += -W0,-noglobal
endif # Platform_compiler == sparcWorks
launcher.o: launcher.c $(LAUNCHERDIR)/java.c $(LAUNCHERDIR)/java_md.c
$(CC) -g -c -o $@ launcher.c $(LAUNCHERFLAGS) $(CPPFLAGS) ${TARGET_DEFINES}
LAUNCHER_OUT = launcher
launcher.c:
@echo Generating $@
$(QUIETLY) { \
echo '#define debug launcher_debug'; \
echo '#include "java.c"'; \
echo '#include "java_md.c"'; \
} > $@
SUFFIXES += .d
$(LAUNCHER): $(LAUNCHER.o) $(LIBJVM) $(LAUNCHER_MAPFILE)
SOURCES := $(shell find $(LAUNCHERDIR) -name "*.c")
SOURCES_SHARE := $(shell find $(LAUNCHERDIR_SHARE) -name "*.c")
OBJS := $(patsubst $(LAUNCHERDIR)/%.c,$(LAUNCHER_OUT)/%.o,$(SOURCES)) $(patsubst $(LAUNCHERDIR_SHARE)/%.c,$(LAUNCHER_OUT)/%.o,$(SOURCES_SHARE))
DEPFILES := $(patsubst %.o,%.d,$(OBJS))
-include $(DEPFILES)
$(LAUNCHER_OUT)/%.o: $(LAUNCHERDIR_SHARE)/%.c
$(QUIETLY) [ -d $(LAUNCHER_OUT) ] || { mkdir -p $(LAUNCHER_OUT); }
$(QUIETLY) $(CC) -g -o $@ -c $< -MMD $(LAUNCHERFLAGS) $(CPPFLAGS)
$(LAUNCHER_OUT)/%.o: $(LAUNCHERDIR)/%.c
$(QUIETLY) [ -d $(LAUNCHER_OUT) ] || { mkdir -p $(LAUNCHER_OUT); }
$(QUIETLY) $(CC) -g -o $@ -c $< -MMD $(LAUNCHERFLAGS) $(CPPFLAGS)
$(LAUNCHER): $(OBJS) $(LIBJVM) $(LAUNCHER_MAPFILE)
ifeq ($(filter -sbfast -xsbfast, $(CFLAGS_BROWSE)),)
@echo Linking launcher...
$(QUIETLY) echo Linking launcher...
$(QUIETLY) $(LINK_LAUNCHER/PRE_HOOK)
$(QUIETLY) \
$(LINK_LAUNCHER) $(LFLAGS_LAUNCHER) -o $@ $(LAUNCHER.o) $(LIBS_LAUNCHER)
$(QUIETLY) $(LINK_LAUNCHER) $(LFLAGS_LAUNCHER) -o $@ $(OBJS) $(LIBS_LAUNCHER)
$(QUIETLY) $(LINK_LAUNCHER/POST_HOOK)
[ -f $(LAUNCHER_G) ] || ln -s $@ $(LAUNCHER_G)
endif # filter -sbfast -xsbfast
$(LAUNCHER): $(LAUNCHER_SCRIPT)
$(LAUNCHER_SCRIPT): $(LAUNCHERDIR)/launcher.script
$(QUIETLY) sed -e 's/@@LIBARCH@@/$(LIBARCH)/g' $< > $@
$(QUIETLY) chmod +x $@
......@@ -150,6 +150,9 @@ ifeq ($(shell expr $(COMPILER_REV_NUMERIC) \>= 509), 1)
DEPFLAGS = -xMMD -xMF $(DEP_DIR)/$(@:%=%.d)
endif
# -DDONT_USE_PRECOMPILED_HEADER will exclude all includes in precompiled.hpp.
CFLAGS += -DDONT_USE_PRECOMPILED_HEADER
################################################
# Begin current (>=5.9) Forte compiler options #
#################################################
......
......@@ -189,7 +189,7 @@ endef
Src_Files := $(foreach e,$(Src_Dirs),$(call findsrc,$(e)))
Obj_Files = $(addsuffix .o,$(basename $(Src_Files)))
Obj_Files = $(sort $(addsuffix .o,$(basename $(Src_Files))))
JVM_OBJ_FILES = $(Obj_Files) $(DTRACE_OBJS)
......
......@@ -46,7 +46,15 @@ ADLCFLAGS=-q -T -D_LP64
ADLCFLAGS=-q -T -U_LP64
!endif
CPP_FLAGS=$(CPP_FLAGS) /D _CRT_SECURE_NO_WARNINGS /D _CRT_SECURE_NO_DEPRECATE
CPP_FLAGS=$(CPP_FLAGS) \
/D TARGET_OS_FAMILY_windows \
/D TARGET_ARCH_$(Platform_arch) \
/D TARGET_ARCH_MODEL_$(Platform_arch_model) \
/D TARGET_OS_ARCH_windows_$(Platform_arch) \
/D TARGET_OS_ARCH_MODEL_windows_$(Platform_arch_model) \
/D TARGET_COMPILER_visCPP
CPP_FLAGS=$(CPP_FLAGS) /D _CRT_SECURE_NO_WARNINGS /D _CRT_SECURE_NO_DEPRECATE
CPP_INCLUDE_DIRS=\
/I "..\generated" \
......
......@@ -26,9 +26,15 @@ HS_INTERNAL_NAME=jvm
HS_FNAME=$(HS_INTERNAL_NAME).dll
AOUT=$(HS_FNAME)
SAWINDBG=sawindbg.dll
LAUNCHER_NAME=hotspot.exe
GENERATED=../generated
default:: _build_pch_file.obj $(AOUT) checkAndBuildSA
# Allow the user to turn off precompiled headers from the command line.
!if "$(USE_PRECOMPILED_HEADER)" != "0"
BUILD_PCH_FILE=_build_pch_file.obj
!endif
default:: $(BUILD_PCH_FILE) $(AOUT) $(LAUNCHER_NAME) checkAndBuildSA
!include ../local.make
!include compile.make
......@@ -57,3 +63,4 @@ $(AOUT): $(Res_Files) $(Obj_Files)
!include $(WorkSpace)/make/windows/makefiles/shared.make
!include $(WorkSpace)/make/windows/makefiles/sa.make
!include $(WorkSpace)/make/windows/makefiles/launcher.make
......@@ -26,9 +26,15 @@ HS_INTERNAL_NAME=jvm
HS_FNAME=$(HS_INTERNAL_NAME).dll
AOUT=$(HS_FNAME)
SAWINDBG=sawindbg.dll
LAUNCHER_NAME=hotspot.exe
GENERATED=../generated
default:: _build_pch_file.obj $(AOUT) checkAndBuildSA
# Allow the user to turn off precompiled headers from the command line.
!if "$(USE_PRECOMPILED_HEADER)" != "0"
BUILD_PCH_FILE=_build_pch_file.obj
!endif
default:: $(BUILD_PCH_FILE) $(AOUT) $(LAUNCHER_NAME) checkAndBuildSA
!include ../local.make
!include compile.make
......@@ -57,3 +63,4 @@ $(AOUT): $(Res_Files) $(Obj_Files)
!include $(WorkSpace)/make/windows/makefiles/shared.make
!include $(WorkSpace)/make/windows/makefiles/sa.make
!include $(WorkSpace)/make/windows/makefiles/launcher.make
#
# Copyright (c) 2010, 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.
#
#
LAUNCHER_FLAGS=$(ARCHFLAG) \
/D FULL_VERSION=\"$(HOTSPOT_RELEASE_VERSION)\" \
/D JDK_MAJOR_VERSION=\"$(JDK_MAJOR_VERSION)\" \
/D JDK_MINOR_VERSION=\"$(JDK_MINOR_VERSION)\" \
/D GAMMA \
/D LAUNCHER_TYPE=\"gamma\" \
/D _CRT_SECURE_NO_WARNINGS \
/D _CRT_SECURE_NO_DEPRECATE \
/D LINK_INTO_LIBJVM \
/I $(WorkSpace)\src\os\windows\launcher \
/I $(WorkSpace)\src\share\tools\launcher
CPP_FLAGS=$(CPP_FLAGS) $(LAUNCHER_FLAGS)
LINK_FLAGS=/manifest $(HS_INTERNAL_NAME).lib kernel32.lib user32.lib /nologo /machine:$(MACHINE) /map /debug /subsystem:console
!if "$(COMPILER_NAME)" == "VS2005"
# This VS2005 compiler has /GS as a default and requires bufferoverflowU.lib
# on the link command line, otherwise we get missing __security_check_cookie
# externals at link time. Even with /GS-, you need bufferoverflowU.lib.
BUFFEROVERFLOWLIB = bufferoverflowU.lib
LINK_FLAGS = $(LINK_FLAGS) $(BUFFEROVERFLOWLIB)
!endif
LAUNCHERDIR = $(GAMMADIR)/src/os/windows/launcher
LAUNCHERDIR_SHARE = $(GAMMADIR)/src/share/tools/launcher
OUTDIR = launcher
{$(LAUNCHERDIR)}.c{$(OUTDIR)}.obj:
-mkdir $(OUTDIR)
$(CPP) $(CPP_FLAGS) /c /Fo$@ $<
{$(LAUNCHERDIR_SHARE)}.c{$(OUTDIR)}.obj:
-mkdir $(OUTDIR)
$(CPP) $(CPP_FLAGS) /c /Fo$@ $<
$(OUTDIR)\*.obj: $(LAUNCHERDIR)\*.c $(LAUNCHERDIR)\*.h $(LAUNCHERDIR_SHARE)\*.c $(LAUNCHERDIR_SHARE)\*.h
$(LAUNCHER_NAME): $(OUTDIR)\java.obj $(OUTDIR)\java_md.obj $(OUTDIR)\jli_util.obj
$(LINK) $(LINK_FLAGS) /out:$@ $**
......@@ -25,9 +25,15 @@
HS_INTERNAL_NAME=jvm
HS_FNAME=$(HS_INTERNAL_NAME).dll
AOUT=$(HS_FNAME)
LAUNCHER_NAME=hotspot.exe
GENERATED=../generated
default:: _build_pch_file.obj $(AOUT) checkAndBuildSA
# Allow the user to turn off precompiled headers from the command line.
!if "$(USE_PRECOMPILED_HEADER)" != "0"
BUILD_PCH_FILE=_build_pch_file.obj
!endif
default:: $(BUILD_PCH_FILE) $(AOUT) $(LAUNCHER_NAME) checkAndBuildSA
!include ../local.make
!include compile.make
......@@ -68,3 +74,4 @@ $(AOUT): $(Res_Files) $(Obj_Files)
!include $(WorkSpace)/make/windows/makefiles/shared.make
!include $(WorkSpace)/make/windows/makefiles/sa.make
!include $(WorkSpace)/make/windows/makefiles/launcher.make
......@@ -128,7 +128,13 @@ CPP_INCLUDE_DIRS=\
/I "$(WorkSpace)\src\os_cpu\windows_$(Platform_arch)\vm" \
/I "$(WorkSpace)\src\cpu\$(Platform_arch)\vm"
CPP_DONT_USE_PCH=/D DONT_USE_PRECOMPILED_HEADER
!if "$(USE_PRECOMPILED_HEADER)" != "0"
CPP_USE_PCH=/Fp"vm.pch" /Yu"precompiled.hpp"
!else
CPP_USE_PCH=$(CPP_DONT_USE_PCH)
!endif
# Where to find the source code for the virtual machine
VM_PATH=../generated
......@@ -164,31 +170,31 @@ VM_PATH={$(VM_PATH)}
# Special case files not using precompiled header files.
c1_RInfo_$(Platform_arch).obj: $(WorkSpace)\src\cpu\$(Platform_arch)\vm\c1_RInfo_$(Platform_arch).cpp
$(CPP) $(CPP_FLAGS) /c $(WorkSpace)\src\cpu\$(Platform_arch)\vm\c1_RInfo_$(Platform_arch).cpp
$(CPP) $(CPP_FLAGS) $(CPP_DONT_USE_PCH) /c $(WorkSpace)\src\cpu\$(Platform_arch)\vm\c1_RInfo_$(Platform_arch).cpp
os_windows.obj: $(WorkSpace)\src\os\windows\vm\os_windows.cpp
$(CPP) $(CPP_FLAGS) /c $(WorkSpace)\src\os\windows\vm\os_windows.cpp
$(CPP) $(CPP_FLAGS) $(CPP_DONT_USE_PCH) /c $(WorkSpace)\src\os\windows\vm\os_windows.cpp
os_windows_$(Platform_arch).obj: $(WorkSpace)\src\os_cpu\windows_$(Platform_arch)\vm\os_windows_$(Platform_arch).cpp
$(CPP) $(CPP_FLAGS) /c $(WorkSpace)\src\os_cpu\windows_$(Platform_arch)\vm\os_windows_$(Platform_arch).cpp
$(CPP) $(CPP_FLAGS) $(CPP_DONT_USE_PCH) /c $(WorkSpace)\src\os_cpu\windows_$(Platform_arch)\vm\os_windows_$(Platform_arch).cpp
osThread_windows.obj: $(WorkSpace)\src\os\windows\vm\osThread_windows.cpp
$(CPP) $(CPP_FLAGS) /c $(WorkSpace)\src\os\windows\vm\osThread_windows.cpp
$(CPP) $(CPP_FLAGS) $(CPP_DONT_USE_PCH) /c $(WorkSpace)\src\os\windows\vm\osThread_windows.cpp
conditionVar_windows.obj: $(WorkSpace)\src\os\windows\vm\conditionVar_windows.cpp
$(CPP) $(CPP_FLAGS) /c $(WorkSpace)\src\os\windows\vm\conditionVar_windows.cpp
$(CPP) $(CPP_FLAGS) $(CPP_DONT_USE_PCH) /c $(WorkSpace)\src\os\windows\vm\conditionVar_windows.cpp
getThread_windows_$(Platform_arch).obj: $(WorkSpace)\src\os_cpu\windows_$(Platform_arch)\vm\getThread_windows_$(Platform_arch).cpp
$(CPP) $(CPP_FLAGS) /c $(WorkSpace)\src\os_cpu\windows_$(Platform_arch)\vm\getThread_windows_$(Platform_arch).cpp
$(CPP) $(CPP_FLAGS) $(CPP_DONT_USE_PCH) /c $(WorkSpace)\src\os_cpu\windows_$(Platform_arch)\vm\getThread_windows_$(Platform_arch).cpp
opcodes.obj: $(WorkSpace)\src\share\vm\opto\opcodes.cpp
$(CPP) $(CPP_FLAGS) /c $(WorkSpace)\src\share\vm\opto\opcodes.cpp
$(CPP) $(CPP_FLAGS) $(CPP_DONT_USE_PCH) /c $(WorkSpace)\src\share\vm\opto\opcodes.cpp
bytecodeInterpreter.obj: $(WorkSpace)\src\share\vm\interpreter\bytecodeInterpreter.cpp
$(CPP) $(CPP_FLAGS) /c $(WorkSpace)\src\share\vm\interpreter\bytecodeInterpreter.cpp
$(CPP) $(CPP_FLAGS) $(CPP_DONT_USE_PCH) /c $(WorkSpace)\src\share\vm\interpreter\bytecodeInterpreter.cpp
bytecodeInterpreterWithChecks.obj: ..\generated\jvmtifiles\bytecodeInterpreterWithChecks.cpp
$(CPP) $(CPP_FLAGS) /c ..\generated\jvmtifiles\bytecodeInterpreterWithChecks.cpp
$(CPP) $(CPP_FLAGS) $(CPP_DONT_USE_PCH) /c ..\generated\jvmtifiles\bytecodeInterpreterWithChecks.cpp
# Default rules for the Virtual Machine
{$(WorkSpace)\src\share\vm\c1}.cpp.obj::
......
......@@ -65,7 +65,11 @@ HOTSPOT_RELEASE_VERSION="$(HOTSPOT_RELEASE_VERSION)"
!else
HOTSPOT_RELEASE_VERSION="$(HS_MAJOR_VER).$(HS_MINOR_VER)-b$(HS_BUILD_NUMBER)"
!endif
!if "$(USER_RELEASE_SUFFIX)" != ""
HOTSPOT_BUILD_VERSION$(HOTSPOT_BUILD_VERSION) = internal-$(USER_RELEASE_SUFFIX)
!else
HOTSPOT_BUILD_VERSION$(HOTSPOT_BUILD_VERSION) = internal
!endif
!if "$(HOTSPOT_BUILD_VERSION)" != ""
HOTSPOT_RELEASE_VERSION="$(HOTSPOT_RELEASE_VERSION)-$(HOTSPOT_BUILD_VERSION)"
!endif
......
......@@ -25,6 +25,5 @@
#include "precompiled.hpp"
#include "compiler/disassembler.hpp"
#include "depChecker_sparc.hpp"
#include "runtime/hpi.hpp"
// Nothing to do on Sparc
......@@ -5538,17 +5538,14 @@ void MacroAssembler::stop(const char* msg) {
}
void MacroAssembler::warn(const char* msg) {
push(r12);
movq(r12, rsp);
push(rsp);
andq(rsp, -16); // align stack as required by push_CPU_state and call
push_CPU_state(); // keeps alignment at 16 bytes
lea(c_rarg0, ExternalAddress((address) msg));
call_VM_leaf(CAST_FROM_FN_PTR(address, warning), c_rarg0);
pop_CPU_state();
movq(rsp, r12);
pop(r12);
pop(rsp);
}
#ifndef PRODUCT
......@@ -5860,6 +5857,10 @@ void MacroAssembler::call_VM_base(Register oop_result,
// debugging support
assert(number_of_arguments >= 0 , "cannot have negative number of arguments");
LP64_ONLY(assert(java_thread == r15_thread, "unexpected register"));
#ifdef ASSERT
LP64_ONLY(if (UseCompressedOops) verify_heapbase("call_VM_base");)
#endif // ASSERT
assert(java_thread != oop_result , "cannot use the same register for java_thread & oop_result");
assert(java_thread != last_java_sp, "cannot use the same register for java_thread & last_java_sp");
......
......@@ -25,6 +25,5 @@
#include "precompiled.hpp"
#include "compiler/disassembler.hpp"
#include "depChecker_x86.hpp"
#include "runtime/hpi.hpp"
// Nothing to do on i486
......@@ -449,10 +449,9 @@ void InterpreterMacroAssembler::jump_from_interpreted(Register method, Register
// JVMTI events, such as single-stepping, are implemented partly by avoiding running
// compiled code in threads for which the event is enabled. Check here for
// interp_only_mode if these events CAN be enabled.
get_thread(temp);
// interp_only is an int, on little endian it is sufficient to test the byte only
// Is a cmpl faster (ce
cmpb(Address(temp, JavaThread::interp_only_mode_offset()), 0);
// Is a cmpl faster?
cmpb(Address(r15_thread, JavaThread::interp_only_mode_offset()), 0);
jcc(Assembler::zero, run_compiled_code);
jmp(Address(method, methodOopDesc::interpreter_entry_offset()));
bind(run_compiled_code);
......
......@@ -1069,7 +1069,7 @@ address InterpreterGenerator::generate_native_entry(bool synchronized) {
// runtime call by hand.
//
__ mov(c_rarg0, r15_thread);
__ mov(r12, rsp); // remember sp
__ mov(r12, rsp); // remember sp (can only use r12 if not using call_VM)
__ subptr(rsp, frame::arg_reg_save_area_bytes); // windows
__ andptr(rsp, -16); // align stack as required by ABI
__ call(RuntimeAddress(CAST_FROM_FN_PTR(address, JavaThread::check_special_condition_for_native_trans)));
......@@ -1116,7 +1116,7 @@ address InterpreterGenerator::generate_native_entry(bool synchronized) {
__ jcc(Assembler::notEqual, no_reguard);
__ pusha(); // XXX only save smashed registers
__ mov(r12, rsp); // remember sp
__ mov(r12, rsp); // remember sp (can only use r12 if not using call_VM)
__ subptr(rsp, frame::arg_reg_save_area_bytes); // windows
__ andptr(rsp, -16); // align stack as required by ABI
__ call(RuntimeAddress(CAST_FROM_FN_PTR(address, SharedRuntime::reguard_yellow_pages)));
......@@ -1907,7 +1907,7 @@ void TemplateInterpreterGenerator::trace_bytecode(Template* t) {
assert(Interpreter::trace_code(t->tos_in()) != NULL,
"entry must have been generated");
__ mov(r12, rsp); // remember sp
__ mov(r12, rsp); // remember sp (can only use r12 if not using call_VM)
__ andptr(rsp, -16); // align stack as required by ABI
__ call(RuntimeAddress(Interpreter::trace_code(t->tos_in())));
__ mov(rsp, r12); // restore sp
......
......@@ -2762,7 +2762,7 @@ void TemplateTable::fast_accessfield(TosState state) {
// access constant pool cache entry
__ get_cache_entry_pointer_at_bcp(c_rarg2, rcx, 1);
__ verify_oop(rax);
__ mov(r12, rax); // save object pointer before call_VM() clobbers it
__ push_ptr(rax); // save object pointer before call_VM() clobbers it
__ mov(c_rarg1, rax);
// c_rarg1: object pointer copied above
// c_rarg2: cache entry pointer
......@@ -2770,8 +2770,7 @@ void TemplateTable::fast_accessfield(TosState state) {
CAST_FROM_FN_PTR(address,
InterpreterRuntime::post_field_access),
c_rarg1, c_rarg2);
__ mov(rax, r12); // restore object pointer
__ reinit_heapbase();
__ pop_ptr(rax); // restore object pointer
__ bind(L1);
}
......@@ -3365,10 +3364,7 @@ void TemplateTable::checkcast() {
JVM_CONSTANT_Class);
__ jcc(Assembler::equal, quicked);
__ push(atos); // save receiver for result, and for GC
__ mov(r12, rcx); // save rcx XXX
call_VM(rax, CAST_FROM_FN_PTR(address, InterpreterRuntime::quicken_io_cc));
__ movq(rcx, r12); // restore rcx XXX
__ reinit_heapbase();
__ pop_ptr(rdx); // restore receiver
__ jmpb(resolved);
......@@ -3422,11 +3418,9 @@ void TemplateTable::instanceof() {
__ jcc(Assembler::equal, quicked);
__ push(atos); // save receiver for result, and for GC
__ mov(r12, rcx); // save rcx
call_VM(rax, CAST_FROM_FN_PTR(address, InterpreterRuntime::quicken_io_cc));
__ movq(rcx, r12); // restore rcx
__ reinit_heapbase();
__ pop_ptr(rdx); // restore receiver
__ verify_oop(rdx);
__ load_klass(rdx, rdx);
__ jmpb(resolved);
......
......@@ -26,6 +26,5 @@
#include "precompiled.hpp"
#include "compiler/disassembler.hpp"
#include "depChecker_zero.hpp"
#include "runtime/hpi.hpp"
// This file is intentionally empty
/*
* Copyright (c) 1999, 2010, 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 "oops/oop.inline.hpp"
#include "runtime/hpi.hpp"
#include "runtime/os.hpp"
# include <sys/param.h>
# include <dlfcn.h>
typedef jint (JNICALL *init_t)(GetInterfaceFunc *, void *);
void hpi::initialize_get_interface(vm_calls_t *callbacks) {
char buf[JVM_MAXPATHLEN];
void *hpi_handle;
GetInterfaceFunc& getintf = _get_interface;
jint (JNICALL * DLL_Initialize)(GetInterfaceFunc *, void *);
if (HPILibPath && HPILibPath[0]) {
strncpy(buf, HPILibPath, JVM_MAXPATHLEN - 1);
buf[JVM_MAXPATHLEN - 1] = '\0';
} else {
const char *thread_type = "native_threads";
os::jvm_path(buf, JVM_MAXPATHLEN);
#ifdef PRODUCT
const char * hpi_lib = "/libhpi.so";
#else
char * ptr = strrchr(buf, '/');
assert(strstr(ptr, "/libjvm") == ptr, "invalid library name");
const char * hpi_lib = strstr(ptr, "_g") ? "/libhpi_g.so" : "/libhpi.so";
#endif
*(strrchr(buf, '/')) = '\0'; /* get rid of /libjvm.so */
char* p = strrchr(buf, '/');
if (p != NULL) p[1] = '\0'; /* get rid of hotspot */
strcat(buf, thread_type);
strcat(buf, hpi_lib);
}
if (TraceHPI) tty->print_cr("Loading HPI %s ", buf);
#ifdef SPARC
// On 64-bit Ubuntu Sparc RTLD_NOW leads to unresolved deps in libpthread.so
# define OPEN_MODE RTLD_LAZY
#else
// We use RTLD_NOW because of bug 4032715
# define OPEN_MODE RTLD_NOW
#endif
hpi_handle = dlopen(buf, OPEN_MODE);
#undef OPEN_MODE
if (hpi_handle == NULL) {
if (TraceHPI) tty->print_cr("HPI dlopen failed: %s", dlerror());
return;
}
DLL_Initialize = CAST_TO_FN_PTR(jint (JNICALL *)(GetInterfaceFunc *, void *),
dlsym(hpi_handle, "DLL_Initialize"));
if (TraceHPI && DLL_Initialize == NULL) tty->print_cr("HPI dlsym of DLL_Initialize failed: %s", dlerror());
if (DLL_Initialize == NULL ||
(*DLL_Initialize)(&getintf, callbacks) < 0) {
if (TraceHPI) tty->print_cr("HPI DLL_Initialize failed");
return;
}
if (TraceHPI) tty->print_cr("HPI loaded successfully");
}
/*
* Copyright (c) 1999, 2010, 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 OS_LINUX_VM_HPI_LINUX_HPP
#define OS_LINUX_VM_HPI_LINUX_HPP
//
// Because the interruptible IO has been dropped for HotSpot/Linux,
// the following HPI interface is very different from HotSparc.
//
#include <unistd.h>
#include <sys/socket.h>
#include <sys/poll.h>
#include <sys/ioctl.h>
#include <netdb.h>
// HPI_FileInterface
inline int hpi::close(int fd) {
return ::close(fd);
}
inline size_t hpi::read(int fd, void *buf, unsigned int nBytes) {
size_t res;
RESTARTABLE( (size_t) ::read(fd, buf, (size_t) nBytes), res);
return res;
}
inline size_t hpi::write(int fd, const void *buf, unsigned int nBytes) {
size_t res;
RESTARTABLE((size_t) ::write(fd, buf, (size_t) nBytes), res);
return res;
}
// HPI_SocketInterface
inline int hpi::socket_close(int fd) {
return ::close(fd);
}
inline int hpi::socket(int domain, int type, int protocol) {
return ::socket(domain, type, protocol);
}
inline int hpi::recv(int fd, char *buf, int nBytes, int flags) {
RESTARTABLE_RETURN_INT(::recv(fd, buf, nBytes, (unsigned int) flags));
}
inline int hpi::send(int fd, char *buf, int nBytes, int flags) {
RESTARTABLE_RETURN_INT(::send(fd, buf, nBytes, (unsigned int) flags));
}
inline int hpi::raw_send(int fd, char *buf, int nBytes, int flags) {
return send(fd, buf, nBytes, flags);
}
inline int hpi::timeout(int fd, long timeout) {
julong prevtime,newtime;
struct timeval t;
gettimeofday(&t, NULL);
prevtime = ((julong)t.tv_sec * 1000) + t.tv_usec / 1000;
for(;;) {
struct pollfd pfd;
pfd.fd = fd;
pfd.events = POLLIN | POLLERR;
int res = ::poll(&pfd, 1, timeout);
if (res == OS_ERR && errno == EINTR) {
// On Linux any value < 0 means "forever"
if(timeout >= 0) {
gettimeofday(&t, NULL);
newtime = ((julong)t.tv_sec * 1000) + t.tv_usec / 1000;
timeout -= newtime - prevtime;
if(timeout <= 0)
return OS_OK;
prevtime = newtime;
}
} else
return res;
}
}
inline int hpi::listen(int fd, int count) {
return ::listen(fd, count);
}
inline int hpi::connect(int fd, struct sockaddr *him, int len) {
RESTARTABLE_RETURN_INT(::connect(fd, him, len));
}
inline int hpi::accept(int fd, struct sockaddr *him, int *len) {
// This cast is from int to unsigned int on linux. Since we
// only pass the parameter "len" around the vm and don't try to
// fetch it's value, this cast is safe for now. The java.net group
// may need and want to change this interface someday if socklen_t goes
// to 64 bits on some platform that we support.
// Linux doc says this can't return EINTR, unlike accept() on Solaris
return ::accept(fd, him, (socklen_t *)len);
}
inline int hpi::recvfrom(int fd, char *buf, int nBytes, int flags,
sockaddr *from, int *fromlen) {
RESTARTABLE_RETURN_INT(::recvfrom(fd, buf, nBytes, (unsigned int) flags, from, (socklen_t *)fromlen));
}
inline int hpi::sendto(int fd, char *buf, int len, int flags,
struct sockaddr *to, int tolen) {
RESTARTABLE_RETURN_INT(::sendto(fd, buf, len, (unsigned int) flags, to, tolen));
}
inline int hpi::socket_available(int fd, jint *pbytes) {
// Linux doc says EINTR not returned, unlike Solaris
int ret = ::ioctl(fd, FIONREAD, pbytes);
//%% note ioctl can return 0 when successful, JVM_SocketAvailable
// is expected to return 0 on failure and 1 on success to the jdk.
return (ret < 0) ? 0 : 1;
}
// following methods have been updated to avoid problems in
// hpi's sockets calls based on sys_api_td.c (JDK1.3)
/*
HPIDECL(socket_shutdown, "socket_shutdown", _socket, SocketShutdown,
int, "%d",
(int fd, int howto),
("fd = %d, howto = %d", fd, howto),
(fd, howto));
*/
inline int hpi::socket_shutdown(int fd, int howto){
return ::shutdown(fd, howto);
}
/*
HPIDECL(bind, "bind", _socket, Bind,
int, "%d",
(int fd, struct sockaddr *him, int len),
("fd = %d, him = %p, len = %d",
fd, him, len),
(fd, him, len));
*/
inline int hpi::bind(int fd, struct sockaddr *him, int len){
return ::bind(fd, him, len);
}
/*
HPIDECL(get_sock_name, "get_sock_name", _socket, GetSocketName,
int, "%d",
(int fd, struct sockaddr *him, int *len),
("fd = %d, him = %p, len = %p",
fd, him, len),
(fd, him, len));
*/
inline int hpi::get_sock_name(int fd, struct sockaddr *him, int *len){
return ::getsockname(fd, him, (socklen_t *)len);
}
/*
HPIDECL(get_host_name, "get_host_name", _socket, GetHostName, int, "%d",
(char *hostname, int namelen),
("hostname = %p, namelen = %d",
hostname, namelen),
(hostname, namelen));
*/
inline int hpi::get_host_name(char* name, int namelen){
return ::gethostname(name, namelen);
}
/*
HPIDECL(get_sock_opt, "get_sock_opt", _socket, SocketGetOption, int, "%d",
(int fd, int level, int optname, char *optval, int* optlen),
("fd = %d, level = %d, optname = %d, optval = %p, optlen = %p",
fd, level, optname, optval, optlen),
(fd, level, optname, optval, optlen));
*/
inline int hpi::get_sock_opt(int fd, int level, int optname,
char *optval, int* optlen){
return ::getsockopt(fd, level, optname, optval, (socklen_t *)optlen);
}
/*
HPIDECL(set_sock_opt, "set_sock_opt", _socket, SocketSetOption, int, "%d",
(int fd, int level, int optname, const char *optval, int optlen),
("fd = %d, level = %d, optname = %d, optval = %p, optlen = %d",
fd, level, optname, optval, optlen),
(fd, level, optname, optval, optlen));
*/
inline int hpi::set_sock_opt(int fd, int level, int optname,
const char *optval, int optlen){
return ::setsockopt(fd, level, optname, optval, optlen);
}
// Reconciliation History
// hpi_solaris.hpp 1.9 99/08/30 16:31:23
// End
#endif // OS_LINUX_VM_HPI_LINUX_HPP
......@@ -44,7 +44,6 @@
#include "runtime/arguments.hpp"
#include "runtime/extendedPC.hpp"
#include "runtime/globals.hpp"
#include "runtime/hpi.hpp"
#include "runtime/interfaceSupport.hpp"
#include "runtime/java.hpp"
#include "runtime/javaCalls.hpp"
......@@ -1565,6 +1564,24 @@ void os::die() {
// unused on linux for now.
void os::set_error_file(const char *logfile) {}
// This method is a copy of JDK's sysGetLastErrorString
// from src/solaris/hpi/src/system_md.c
size_t os::lasterror(char *buf, size_t len) {
if (errno == 0) return 0;
const char *s = ::strerror(errno);
size_t n = ::strlen(s);
if (n >= len) {
n = len - 1;
}
::strncpy(buf, s, n);
buf[n] = '\0';
return n;
}
intx os::current_thread_id() { return (intx)pthread_self(); }
int os::current_process_id() {
......@@ -1929,19 +1946,19 @@ void* os::dll_lookup(void* handle, const char* name) {
}
bool _print_ascii_file(const char* filename, outputStream* st) {
int fd = open(filename, O_RDONLY);
static bool _print_ascii_file(const char* filename, outputStream* st) {
int fd = ::open(filename, O_RDONLY);
if (fd == -1) {
return false;
}
char buf[32];
int bytes;
while ((bytes = read(fd, buf, sizeof(buf))) > 0) {
while ((bytes = ::read(fd, buf, sizeof(buf))) > 0) {
st->print_raw(buf, bytes);
}
close(fd);
::close(fd);
return true;
}
......@@ -2219,8 +2236,6 @@ void os::jvm_path(char *buf, jint buflen) {
// Use current module name "libjvm[_g].so" instead of
// "libjvm"debug_only("_g")".so" since for fastdebug version
// we should have "libjvm.so" but debug_only("_g") adds "_g"!
// It is used when we are choosing the HPI library's name
// "libhpi[_g].so" in hpi::initialize_get_interface().
len = strlen(buf);
snprintf(buf + len, buflen-len, "/hotspot/libjvm%s.so", p);
} else {
......@@ -2404,18 +2419,18 @@ void linux_wrap_code(char* base, size_t size) {
os::get_temp_directory(), os::current_process_id(), num);
unlink(buf);
int fd = open(buf, O_CREAT | O_RDWR, S_IRWXU);
int fd = ::open(buf, O_CREAT | O_RDWR, S_IRWXU);
if (fd != -1) {
off_t rv = lseek(fd, size-2, SEEK_SET);
off_t rv = ::lseek(fd, size-2, SEEK_SET);
if (rv != (off_t)-1) {
if (write(fd, "", 1) == 1) {
if (::write(fd, "", 1) == 1) {
mmap(base, size,
PROT_READ|PROT_WRITE|PROT_EXEC,
MAP_PRIVATE|MAP_FIXED|MAP_NORESERVE, fd, 0);
}
}
close(fd);
::close(fd);
unlink(buf);
}
}
......@@ -4047,13 +4062,6 @@ jint os::init_2(void)
// Initialize lock used to serialize thread creation (see os::create_thread)
Linux::set_createThread_lock(new Mutex(Mutex::leaf, "createThread_lock", false));
// Initialize HPI.
jint hpi_result = hpi::initialize();
if (hpi_result != JNI_OK) {
tty->print_cr("There was an error trying to initialize the HPI library.");
return hpi_result;
}
// at-exit methods are called in the reverse order of their registration.
// atexit functions are called on return from main or as a result of a
// call to exit(3C). There can be only 32 of these functions registered
......@@ -4251,7 +4259,7 @@ int os::stat(const char *path, struct stat *sbuf) {
errno = ENAMETOOLONG;
return -1;
}
hpi::native_path(strcpy(pathbuf, path));
os::native_path(strcpy(pathbuf, path));
return ::stat(pathbuf, sbuf);
}
......@@ -4283,6 +4291,85 @@ bool os::dir_is_empty(const char* path) {
return result;
}
// This code originates from JDK's sysOpen and open64_w
// from src/solaris/hpi/src/system_md.c
#ifndef O_DELETE
#define O_DELETE 0x10000
#endif
// Open a file. Unlink the file immediately after open returns
// if the specified oflag has the O_DELETE flag set.
// O_DELETE is used only in j2se/src/share/native/java/util/zip/ZipFile.c
int os::open(const char *path, int oflag, int mode) {
if (strlen(path) > MAX_PATH - 1) {
errno = ENAMETOOLONG;
return -1;
}
int fd;
int o_delete = (oflag & O_DELETE);
oflag = oflag & ~O_DELETE;
fd = ::open64(path, oflag, mode);
if (fd == -1) return -1;
//If the open succeeded, the file might still be a directory
{
struct stat64 buf64;
int ret = ::fstat64(fd, &buf64);
int st_mode = buf64.st_mode;
if (ret != -1) {
if ((st_mode & S_IFMT) == S_IFDIR) {
errno = EISDIR;
::close(fd);
return -1;
}
} else {
::close(fd);
return -1;
}
}
/*
* All file descriptors that are opened in the JVM and not
* specifically destined for a subprocess should have the
* close-on-exec flag set. If we don't set it, then careless 3rd
* party native code might fork and exec without closing all
* appropriate file descriptors (e.g. as we do in closeDescriptors in
* UNIXProcess.c), and this in turn might:
*
* - cause end-of-file to fail to be detected on some file
* descriptors, resulting in mysterious hangs, or
*
* - might cause an fopen in the subprocess to fail on a system
* suffering from bug 1085341.
*
* (Yes, the default setting of the close-on-exec flag is a Unix
* design flaw)
*
* See:
* 1085341: 32-bit stdio routines should support file descriptors >255
* 4843136: (process) pipe file descriptor from Runtime.exec not being closed
* 6339493: (process) Runtime.exec does not close all file descriptors on Solaris 9
*/
#ifdef FD_CLOEXEC
{
int flags = ::fcntl(fd, F_GETFD);
if (flags != -1)
::fcntl(fd, F_SETFD, flags | FD_CLOEXEC);
}
#endif
if (o_delete != 0) {
::unlink(path);
}
return fd;
}
// create binary file, rewriting existing file if required
int os::create_binary_file(const char* path, bool rewrite_existing) {
int oflags = O_WRONLY | O_CREAT;
......@@ -4302,6 +4389,40 @@ jlong os::seek_to_file_offset(int fd, jlong offset) {
return (jlong)::lseek64(fd, (off64_t)offset, SEEK_SET);
}
// This code originates from JDK's sysAvailable
// from src/solaris/hpi/src/native_threads/src/sys_api_td.c
int os::available(int fd, jlong *bytes) {
jlong cur, end;
int mode;
struct stat64 buf64;
if (::fstat64(fd, &buf64) >= 0) {
mode = buf64.st_mode;
if (S_ISCHR(mode) || S_ISFIFO(mode) || S_ISSOCK(mode)) {
/*
* XXX: is the following call interruptible? If so, this might
* need to go through the INTERRUPT_IO() wrapper as for other
* blocking, interruptible calls in this file.
*/
int n;
if (::ioctl(fd, FIONREAD, &n) >= 0) {
*bytes = n;
return 1;
}
}
}
if ((cur = ::lseek64(fd, 0L, SEEK_CUR)) == -1) {
return 0;
} else if ((end = ::lseek64(fd, 0L, SEEK_END)) == -1) {
return 0;
} else if (::lseek64(fd, cur, SEEK_SET) == -1) {
return 0;
}
*bytes = end - cur;
return 1;
}
// Map a block of memory.
char* os::map_memory(int fd, const char* file_name, size_t file_offset,
char *addr, size_t bytes, bool read_only,
......@@ -4528,7 +4649,7 @@ void os::pause() {
int fd = ::open(filename, O_WRONLY | O_CREAT | O_TRUNC, 0666);
if (fd != -1) {
struct stat buf;
close(fd);
::close(fd);
while (::stat(filename, &buf) == 0) {
(void)::poll(NULL, 0, 100);
}
......
......@@ -40,6 +40,14 @@
# include "orderAccess_linux_zero.inline.hpp"
#endif
// System includes
#include <unistd.h>
#include <sys/socket.h>
#include <sys/poll.h>
#include <sys/ioctl.h>
#include <netdb.h>
inline void* os::thread_local_storage_at(int index) {
return pthread_getspecific((pthread_key_t)index);
}
......@@ -93,6 +101,12 @@ inline void os::split_reserved_memory(char *base, size_t size,
inline void os::bang_stack_shadow_pages() {
}
inline void os::dll_unload(void *lib) {
::dlclose(lib);
}
inline const int os::default_file_open_flags() { return 0;}
inline DIR* os::opendir(const char* dirname)
{
assert(dirname != NULL, "just checking");
......@@ -104,6 +118,22 @@ inline int os::readdir_buf_size(const char *path)
return NAME_MAX + sizeof(dirent) + 1;
}
inline jlong os::lseek(int fd, jlong offset, int whence) {
return (jlong) ::lseek64(fd, offset, whence);
}
inline int os::fsync(int fd) {
return ::fsync(fd);
}
inline char* os::native_path(char *path) {
return path;
}
inline int os::ftruncate(int fd, jlong length) {
return ::ftruncate64(fd, length);
}
inline struct dirent* os::readdir(DIR* dirp, dirent *dbuf)
{
dirent* p;
......@@ -121,9 +151,8 @@ inline struct dirent* os::readdir(DIR* dirp, dirent *dbuf)
return p;
}
inline int os::closedir(DIR *dirp)
{
assert(dirp != NULL, "just checking");
inline int os::closedir(DIR *dirp) {
assert(dirp != NULL, "argument is NULL");
return ::closedir(dirp);
}
......@@ -142,4 +171,139 @@ inline int os::closedir(DIR *dirp)
inline bool os::numa_has_static_binding() { return true; }
inline bool os::numa_has_group_homing() { return false; }
inline size_t os::restartable_read(int fd, void *buf, unsigned int nBytes) {
size_t res;
RESTARTABLE( (size_t) ::read(fd, buf, (size_t) nBytes), res);
return res;
}
inline size_t os::write(int fd, const void *buf, unsigned int nBytes) {
size_t res;
RESTARTABLE((size_t) ::write(fd, buf, (size_t) nBytes), res);
return res;
}
inline int os::close(int fd) {
return ::close(fd);
}
inline int os::socket_close(int fd) {
return ::close(fd);
}
inline int os::socket(int domain, int type, int protocol) {
return ::socket(domain, type, protocol);
}
inline int os::recv(int fd, char *buf, int nBytes, int flags) {
RESTARTABLE_RETURN_INT(::recv(fd, buf, nBytes, (unsigned int) flags));
}
inline int os::send(int fd, char *buf, int nBytes, int flags) {
RESTARTABLE_RETURN_INT(::send(fd, buf, nBytes, (unsigned int) flags));
}
inline int os::raw_send(int fd, char *buf, int nBytes, int flags) {
return os::send(fd, buf, nBytes, flags);
}
inline int os::timeout(int fd, long timeout) {
julong prevtime,newtime;
struct timeval t;
gettimeofday(&t, NULL);
prevtime = ((julong)t.tv_sec * 1000) + t.tv_usec / 1000;
for(;;) {
struct pollfd pfd;
pfd.fd = fd;
pfd.events = POLLIN | POLLERR;
int res = ::poll(&pfd, 1, timeout);
if (res == OS_ERR && errno == EINTR) {
// On Linux any value < 0 means "forever"
if(timeout >= 0) {
gettimeofday(&t, NULL);
newtime = ((julong)t.tv_sec * 1000) + t.tv_usec / 1000;
timeout -= newtime - prevtime;
if(timeout <= 0)
return OS_OK;
prevtime = newtime;
}
} else
return res;
}
}
inline int os::listen(int fd, int count) {
return ::listen(fd, count);
}
inline int os::connect(int fd, struct sockaddr *him, int len) {
RESTARTABLE_RETURN_INT(::connect(fd, him, len));
}
inline int os::accept(int fd, struct sockaddr *him, int *len) {
// This cast is from int to unsigned int on linux. Since we
// only pass the parameter "len" around the vm and don't try to
// fetch it's value, this cast is safe for now. The java.net group
// may need and want to change this interface someday if socklen_t goes
// to 64 bits on some platform that we support.
// Linux doc says this can't return EINTR, unlike accept() on Solaris
return ::accept(fd, him, (socklen_t *)len);
}
inline int os::recvfrom(int fd, char *buf, int nBytes, int flags,
sockaddr *from, int *fromlen) {
RESTARTABLE_RETURN_INT(::recvfrom(fd, buf, nBytes, (unsigned int) flags, from, (socklen_t *)fromlen));
}
inline int os::sendto(int fd, char *buf, int len, int flags,
struct sockaddr *to, int tolen) {
RESTARTABLE_RETURN_INT(::sendto(fd, buf, len, (unsigned int) flags, to, tolen));
}
inline int os::socket_available(int fd, jint *pbytes) {
// Linux doc says EINTR not returned, unlike Solaris
int ret = ::ioctl(fd, FIONREAD, pbytes);
//%% note ioctl can return 0 when successful, JVM_SocketAvailable
// is expected to return 0 on failure and 1 on success to the jdk.
return (ret < 0) ? 0 : 1;
}
inline int os::socket_shutdown(int fd, int howto){
return ::shutdown(fd, howto);
}
inline int os::bind(int fd, struct sockaddr *him, int len){
return ::bind(fd, him, len);
}
inline int os::get_sock_name(int fd, struct sockaddr *him, int *len){
return ::getsockname(fd, him, (socklen_t *)len);
}
inline int os::get_host_name(char* name, int namelen){
return ::gethostname(name, namelen);
}
inline struct hostent* os::get_host_by_name(char* name) {
return ::gethostbyname(name);
}
inline int os::get_sock_opt(int fd, int level, int optname,
char *optval, int* optlen){
return ::getsockopt(fd, level, optname, optval, (socklen_t *)optlen);
}
inline int os::set_sock_opt(int fd, int level, int optname,
const char *optval, int optlen){
return ::setsockopt(fd, level, optname, optval, optlen);
}
#endif // OS_LINUX_VM_OS_LINUX_INLINE_HPP
......@@ -22,11 +22,6 @@
*
*/
/*
* Gamma (Hotspot internal engineering test) launcher based on 1.6.0-b28 JDK,
* search "GAMMA" for gamma specific changes.
*/
#ifndef JAVA_MD_H
#define JAVA_MD_H
......@@ -36,10 +31,12 @@
#ifndef GAMMA
#include "manifest_info.h"
#endif
#include "jli_util.h"
#define PATH_SEPARATOR ':'
#define FILESEP "/"
#define FILE_SEPARATOR '/'
#define IS_FILE_SEPARATOR(c) ((c) == '/')
#ifndef MAXNAMELEN
#define MAXNAMELEN PATH_MAX
#endif
......@@ -71,7 +68,7 @@
* Function prototypes.
*/
#ifndef GAMMA
char *LocateJRE(manifest_info* info);
char *LocateJRE(manifest_info *info);
void ExecJRE(char *jre, char **argv);
#endif
int UnsetEnv(char *name);
......
#!/bin/bash
# Copyright (c) 2010, 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.
# This script launches HotSpot.
#
# If the first parameter is either "-gdb" or "-gud", HotSpot will be
# launched inside gdb. "-gud" means "open an Emacs window and run gdb
# inside Emacs".
#
# If the first parameter is "-dbx", HotSpot will be launched inside dbx.
#
# If the first parameter is "-valgrind", HotSpot will be launched
# inside Valgrind (http://valgrind.kde.org) using the Memcheck skin,
# and with memory leak detection enabled. This currently (2005jan19)
# requires at least Valgrind 2.3.0. -Xmx16m will also be passed as
# the first parameter to HotSpot, since lowering HotSpot's memory
# consumption makes execution inside of Valgrind *a lot* faster.
#
#
# User changeable parameters ------------------------------------------------
#
# This is the name of the gdb binary to use
if [ ! "$GDB" ]
then
GDB=gdb
fi
# This is the name of the gdb binary to use
if [ ! "$DBX" ]
then
DBX=dbx
fi
# This is the name of the Valgrind binary to use
if [ ! "$VALGRIND" ]
then
VALGRIND=valgrind
fi
# This is the name of Emacs for running GUD
EMACS=emacs
#
# End of user changeable parameters -----------------------------------------
#
# Make sure the paths are fully specified, i.e. they must begin with /.
SCRIPT=$(cd $(dirname $0) && pwd)/$(basename $0)
RUNDIR=$(pwd)
# Look whether the user wants to run inside gdb
case "$1" in
-gdb)
MODE=gdb
shift
;;
-gud)
MODE=gud
shift
;;
-dbx)
MODE=dbx
shift
;;
-valgrind)
MODE=valgrind
shift
;;
*)
MODE=run
;;
esac
if [ "${ALT_JAVA_HOME}" = "" ]; then
if [ "${JAVA_HOME}" = "" ]; then
echo "Neither ALT_JAVA_HOME nor JAVA_HOME is set. Aborting.";
exit 1;
else
JDK=${JAVA_HOME%%/jre};
fi
else
JDK=${ALT_JAVA_HOME%%/jre};
fi
# We will set the LD_LIBRARY_PATH as follows:
# o $JVMPATH (directory portion only)
# o $JRE/lib/$ARCH
# followed by the user's previous effective LD_LIBRARY_PATH, if
# any.
JRE=$JDK/jre
JAVA_HOME=$JDK
ARCH=@@LIBARCH@@
# Find out the absolute path to this script
MYDIR=$(cd $(dirname $SCRIPT) && pwd)
SBP=${MYDIR}:${JRE}/lib/${ARCH}
# Set up a suitable LD_LIBRARY_PATH
if [ -z "$LD_LIBRARY_PATH" ]
then
LD_LIBRARY_PATH="$SBP"
else
LD_LIBRARY_PATH="$SBP:$LD_LIBRARY_PATH"
fi
export LD_LIBRARY_PATH
export JAVA_HOME
JPARMS="$@ $JAVA_ARGS";
# Locate the gamma development launcher
LAUNCHER=${MYDIR}/gamma
if [ ! -x $LAUNCHER ] ; then
echo Error: Cannot find the gamma development launcher \"$LAUNCHER\"
exit 1
fi
GDBSRCDIR=$MYDIR
BASEDIR=$(cd $MYDIR/../../.. && pwd)
init_gdb() {
# Create a gdb script in case we should run inside gdb
GDBSCR=/tmp/hsl.$$
rm -f $GDBSCR
cat >>$GDBSCR <<EOF
cd `pwd`
handle SIGUSR1 nostop noprint
handle SIGUSR2 nostop noprint
set args $JPARMS
file $LAUNCHER
directory $GDBSRCDIR
# Get us to a point where we can set breakpoints in libjvm.so
break InitializeJVM
run
# Stop in InitializeJVM
delete 1
# We can now set breakpoints wherever we like
EOF
}
case "$MODE" in
gdb)
init_gdb
$GDB -x $GDBSCR
rm -f $GDBSCR
;;
gud)
init_gdb
# First find out what emacs version we're using, so that we can
# use the new pretty GDB mode if emacs -version >= 22.1
case $($EMACS -version 2> /dev/null) in
*GNU\ Emacs\ 2[23]*)
emacs_gud_cmd="gdba"
emacs_gud_args="--annotate=3"
;;
*)
emacs_gud_cmd="gdb"
emacs_gud_args=
;;
esac
$EMACS --eval "($emacs_gud_cmd \"$GDB $emacs_gud_args -x $GDBSCR\")";
rm -f $GDBSCR
;;
dbx)
$DBX -s $MYDIR/.dbxrc $LAUNCHER $JPARAMS
;;
valgrind)
echo Warning: Defaulting to 16Mb heap to make Valgrind run faster, use -Xmx for larger heap
echo
$VALGRIND --tool=memcheck --leak-check=yes --num-callers=50 $LAUNCHER -Xmx16m $JPARMS
;;
run)
LD_PRELOAD=$PRELOADING exec $LAUNCHER $JPARMS
;;
*)
echo Error: Internal error, unknown launch mode \"$MODE\"
exit 1
;;
esac
RETVAL=$?
exit $RETVAL
此差异已折叠。
/*
* Copyright (c) 1998, 2010, 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.
*
*/
/*
* Gamma (Hotspot internal engineering test) launcher based on 1.6.0-b28 JDK,
* search "GAMMA" for gamma specific changes.
*/
#ifndef _JAVA_H_
#define _JAVA_H_
/*
* Get system specific defines.
*/
#include "jni.h"
#include "java_md.h"
/*
* Pointers to the needed JNI invocation API, initialized by LoadJavaVM.
*/
typedef jint (JNICALL *CreateJavaVM_t)(JavaVM **pvm, void **env, void *args);
typedef jint (JNICALL *GetDefaultJavaVMInitArgs_t)(void *args);
typedef struct {
CreateJavaVM_t CreateJavaVM;
GetDefaultJavaVMInitArgs_t GetDefaultJavaVMInitArgs;
} InvocationFunctions;
/*
* Prototypes for launcher functions in the system specific java_md.c.
*/
jboolean
LoadJavaVM(const char *jvmpath, InvocationFunctions *ifn);
void
GetXUsagePath(char *buf, jint bufsize);
jboolean
GetApplicationHome(char *buf, jint bufsize);
const char *
GetArch();
void CreateExecutionEnvironment(int *_argc,
char ***_argv,
char jrepath[],
jint so_jrepath,
char jvmpath[],
jint so_jvmpath,
char **original_argv);
/*
* Report an error message to stderr or a window as appropriate. The
* flag always is set to JNI_TRUE if message is to be reported to both
* strerr and windows and set to JNI_FALSE if the message should only
* be sent to a window.
*/
void ReportErrorMessage(char * message, jboolean always);
void ReportErrorMessage2(char * format, char * string, jboolean always);
/*
* Report an exception which terminates the vm to stderr or a window
* as appropriate.
*/
void ReportExceptionDescription(JNIEnv * env);
jboolean RemovableMachineDependentOption(char * option);
void PrintMachineDependentOptions();
/*
* Functions defined in java.c and used in java_md.c.
*/
jint ReadKnownVMs(const char *jrepath, char * arch, jboolean speculative);
char *CheckJvmType(int *argc, char ***argv, jboolean speculative);
void* MemAlloc(size_t size);
/*
* Make launcher spit debug output.
*/
extern jboolean _launcher_debug;
/*
* This allows for finding classes from the VM's bootstrap class loader
* directly, FindClass uses the application class loader internally, this will
* cause unnecessary searching of the classpath for the required classes.
*/
typedef jclass (JNICALL FindClassFromBootLoader_t(JNIEnv *env,
const char *name,
jboolean throwError));
jclass FindBootStrapClass(JNIEnv *env, const char *classname);
#endif /* _JAVA_H_ */
此差异已折叠。
/*
* Copyright (c) 1998, 2010, 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 "oops/oop.inline.hpp"
#include "runtime/hpi.hpp"
#include "runtime/os.hpp"
# include <sys/param.h>
# include <dlfcn.h>
typedef jint (JNICALL *init_t)(GetInterfaceFunc *, void *);
void hpi::initialize_get_interface(vm_calls_t *callbacks)
{
char buf[JVM_MAXPATHLEN];
void *hpi_handle;
GetInterfaceFunc& getintf = _get_interface;
jint (JNICALL * DLL_Initialize)(GetInterfaceFunc *, void *);
if (HPILibPath && HPILibPath[0]) {
strncpy(buf, HPILibPath, JVM_MAXPATHLEN - 1);
buf[JVM_MAXPATHLEN - 1] = '\0';
} else {
const char *thread_type = "native_threads";
os::jvm_path(buf, JVM_MAXPATHLEN);
#ifdef PRODUCT
const char * hpi_lib = "/libhpi.so";
#else
char * ptr = strrchr(buf, '/');
assert(strstr(ptr, "/libjvm") == ptr, "invalid library name");
const char * hpi_lib = strstr(ptr, "_g") ? "/libhpi_g.so" : "/libhpi.so";
#endif
*(strrchr(buf, '/')) = '\0'; /* get rid of /libjvm.so */
char* p = strrchr(buf, '/');
if (p != NULL) p[1] = '\0'; /* get rid of hotspot */
strcat(buf, thread_type);
strcat(buf, hpi_lib);
}
/* we use RTLD_NOW because of bug 4032715 */
if (TraceHPI) tty->print_cr("Loading HPI %s ", buf);
hpi_handle = dlopen(buf, RTLD_NOW);
if (hpi_handle == NULL) {
if (TraceHPI) tty->print_cr("HPI dlopen failed: %s", dlerror());
return;
}
DLL_Initialize = CAST_TO_FN_PTR(jint (JNICALL *)(GetInterfaceFunc *, void *),
dlsym(hpi_handle, "DLL_Initialize"));
if (TraceHPI && DLL_Initialize == NULL) tty->print_cr("HPI dlsym of DLL_Initialize failed: %s", dlerror());
if (DLL_Initialize == NULL ||
(*DLL_Initialize)(&getintf, callbacks) < 0) {
if (TraceHPI) tty->print_cr("HPI DLL_Initialize failed");
return;
}
if (TraceHPI) tty->print_cr("HPI loaded successfully");
}
/*
* Copyright (c) 1998, 2010, 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 OS_SOLARIS_VM_HPI_SOLARIS_HPP
#define OS_SOLARIS_VM_HPI_SOLARIS_HPP
//
// Parts of the HPI interface for which the HotSparc does not use the
// HPI (because the interruptible IO mechanims used are different).
//
#include <sys/socket.h>
#include <sys/poll.h>
#include <sys/filio.h>
#include <unistd.h>
#include <netdb.h>
#include <setjmp.h>
// HPI_FileInterface
// Many system calls can be interrupted by signals and must be restarted.
// Restart support was added without disturbing the extent of thread
// interruption support.
inline int hpi::close(int fd) {
RESTARTABLE_RETURN_INT(::close(fd));
}
inline size_t hpi::read(int fd, void *buf, unsigned int nBytes) {
INTERRUPTIBLE_RETURN_INT(::read(fd, buf, nBytes), os::Solaris::clear_interrupted);
}
inline size_t hpi::write(int fd, const void *buf, unsigned int nBytes) {
INTERRUPTIBLE_RETURN_INT(::write(fd, buf, nBytes), os::Solaris::clear_interrupted);
}
// HPI_SocketInterface
inline int hpi::socket_close(int fd) {
RESTARTABLE_RETURN_INT(::close(fd));
}
inline int hpi::socket(int domain, int type, int protocol) {
return ::socket(domain, type, protocol);
}
inline int hpi::recv(int fd, char *buf, int nBytes, int flags) {
INTERRUPTIBLE_RETURN_INT(::recv(fd, buf, nBytes, flags), os::Solaris::clear_interrupted);
}
inline int hpi::send(int fd, char *buf, int nBytes, int flags) {
INTERRUPTIBLE_RETURN_INT(::send(fd, buf, nBytes, flags), os::Solaris::clear_interrupted);
}
inline int hpi::raw_send(int fd, char *buf, int nBytes, int flags) {
RESTARTABLE_RETURN_INT(::send(fd, buf, nBytes, flags));
}
// As both poll and select can be interrupted by signals, we have to be
// prepared to restart the system call after updating the timeout, unless
// a poll() is done with timeout == -1, in which case we repeat with this
// "wait forever" value.
inline int hpi::timeout(int fd, long timeout) {
int res;
struct timeval t;
julong prevtime, newtime;
static const char* aNull = 0;
struct pollfd pfd;
pfd.fd = fd;
pfd.events = POLLIN;
gettimeofday(&t, &aNull);
prevtime = ((julong)t.tv_sec * 1000) + t.tv_usec / 1000;
for(;;) {
INTERRUPTIBLE_NORESTART(::poll(&pfd, 1, timeout), res, os::Solaris::clear_interrupted);
if(res == OS_ERR && errno == EINTR) {
if(timeout != -1) {
gettimeofday(&t, &aNull);
newtime = ((julong)t.tv_sec * 1000) + t.tv_usec /1000;
timeout -= newtime - prevtime;
if(timeout <= 0)
return OS_OK;
prevtime = newtime;
}
} else
return res;
}
}
inline int hpi::listen(int fd, int count) {
if (fd < 0)
return OS_ERR;
return ::listen(fd, count);
}
inline int
hpi::connect(int fd, struct sockaddr *him, int len) {
do {
int _result;
INTERRUPTIBLE_NORESTART(::connect(fd, him, len), _result,
os::Solaris::clear_interrupted);
// Depending on when thread interruption is reset, _result could be
// one of two values when errno == EINTR
if (((_result == OS_INTRPT) || (_result == OS_ERR)) && (errno == EINTR)) {
/* restarting a connect() changes its errno semantics */
INTERRUPTIBLE(::connect(fd, him, len), _result,
os::Solaris::clear_interrupted);
/* undo these changes */
if (_result == OS_ERR) {
if (errno == EALREADY) errno = EINPROGRESS; /* fall through */
else if (errno == EISCONN) { errno = 0; return OS_OK; }
}
}
return _result;
} while(false);
}
inline int hpi::accept(int fd, struct sockaddr *him, int *len) {
if (fd < 0)
return OS_ERR;
INTERRUPTIBLE_RETURN_INT((int)::accept(fd, him, (socklen_t*) len), os::Solaris::clear_interrupted);
}
inline int hpi::recvfrom(int fd, char *buf, int nBytes, int flags,
sockaddr *from, int *fromlen) {
//%%note jvm_r11
INTERRUPTIBLE_RETURN_INT((int)::recvfrom(fd, buf, nBytes, (unsigned int) flags, from, (socklen_t *)fromlen), os::Solaris::clear_interrupted);
}
inline int hpi::sendto(int fd, char *buf, int len, int flags,
struct sockaddr *to, int tolen) {
//%%note jvm_r11
INTERRUPTIBLE_RETURN_INT((int)::sendto(fd, buf, len, (unsigned int) flags, to, tolen),os::Solaris::clear_interrupted);
}
inline int hpi::socket_available(int fd, jint *pbytes) {
if (fd < 0)
return OS_OK;
int ret;
RESTARTABLE(::ioctl(fd, FIONREAD, pbytes), ret);
//%% note ioctl can return 0 when successful, JVM_SocketAvailable
// is expected to return 0 on failure and 1 on success to the jdk.
return (ret == OS_ERR) ? 0 : 1;
}
/*
HPIDECL(socket_shutdown, "socket_shutdown", _socket, SocketShutdown,
int, "%d",
(int fd, int howto),
("fd = %d, howto = %d", fd, howto),
(fd, howto));
*/
inline int hpi::socket_shutdown(int fd, int howto){
return ::shutdown(fd, howto);
}
/*
HPIDECL(bind, "bind", _socket, Bind,
int, "%d",
(int fd, struct sockaddr *him, int len),
("fd = %d, him = %p, len = %d",
fd, him, len),
(fd, him, len));
*/
inline int hpi::bind(int fd, struct sockaddr *him, int len){
INTERRUPTIBLE_RETURN_INT_NORESTART(::bind(fd, him, len),os::Solaris::clear_interrupted);
}
/*
HPIDECL(get_sock_name, "get_sock_name", _socket, GetSocketName,
int, "%d",
(int fd, struct sockaddr *him, int *len),
("fd = %d, him = %p, len = %p",
fd, him, len),
(fd, him, len));
*/
inline int hpi::get_sock_name(int fd, struct sockaddr *him, int *len){
return ::getsockname(fd, him, (socklen_t*) len);
}
/*
HPIDECL(get_host_name, "get_host_name", _socket, GetHostName, int, "%d",
(char *hostname, int namelen),
("hostname = %p, namelen = %d",
hostname, namelen),
(hostname, namelen));
*/
inline int hpi::get_host_name(char* name, int namelen){
return ::gethostname(name, namelen);
}
/*
HPIDECL(get_sock_opt, "get_sock_opt", _socket, SocketGetOption, int, "%d",
(int fd, int level, int optname, char *optval, int* optlen),
("fd = %d, level = %d, optname = %d, optval = %p, optlen = %p",
fd, level, optname, optval, optlen),
(fd, level, optname, optval, optlen));
*/
inline int hpi::get_sock_opt(int fd, int level, int optname,
char *optval, int* optlen){
return ::getsockopt(fd, level, optname, optval, (socklen_t*) optlen);
}
/*
HPIDECL(set_sock_opt, "set_sock_opt", _socket, SocketSetOption, int, "%d",
(int fd, int level, int optname, const char *optval, int optlen),
("fd = %d, level = %d, optname = %d, optval = %p, optlen = %d",
fd, level, optname, optval, optlen),
(fd, level, optname, optval, optlen));
*/
inline int hpi::set_sock_opt(int fd, int level, int optname,
const char *optval, int optlen){
return ::setsockopt(fd, level, optname, optval, optlen);
}
//Reconciliation History
// 1.3 98/10/21 18:17:14 hpi_win32.hpp
// 1.6 99/06/28 11:01:36 hpi_win32.hpp
//End
#endif // OS_SOLARIS_VM_HPI_SOLARIS_HPP
此差异已折叠。
......@@ -36,6 +36,16 @@
# include "orderAccess_solaris_sparc.inline.hpp"
#endif
// System includes
#include <sys/param.h>
#include <dlfcn.h>
#include <sys/socket.h>
#include <sys/poll.h>
#include <sys/filio.h>
#include <unistd.h>
#include <netdb.h>
#include <setjmp.h>
inline const char* os::file_separator() { return "/"; }
inline const char* os::line_separator() { return "\n"; }
inline const char* os::path_separator() { return ":"; }
......@@ -69,21 +79,19 @@ inline void os::split_reserved_memory(char *base, size_t size,
// Bang the shadow pages if they need to be touched to be mapped.
inline void os::bang_stack_shadow_pages() {
}
inline void os::dll_unload(void *lib) { ::dlclose(lib); }
inline DIR* os::opendir(const char* dirname)
{
inline DIR* os::opendir(const char* dirname) {
assert(dirname != NULL, "just checking");
return ::opendir(dirname);
}
inline int os::readdir_buf_size(const char *path)
{
inline int os::readdir_buf_size(const char *path) {
int size = pathconf(path, _PC_NAME_MAX);
return (size < 0 ? MAXPATHLEN : size) + sizeof(dirent) + 1;
}
inline struct dirent* os::readdir(DIR* dirp, dirent* dbuf)
{
inline struct dirent* os::readdir(DIR* dirp, dirent* dbuf) {
assert(dirp != NULL, "just checking");
#if defined(_LP64) || defined(_GNU_SOURCE)
dirent* p;
......@@ -99,9 +107,8 @@ inline struct dirent* os::readdir(DIR* dirp, dirent* dbuf)
#endif // defined(_LP64) || defined(_GNU_SOURCE)
}
inline int os::closedir(DIR *dirp)
{
assert(dirp != NULL, "just checking");
inline int os::closedir(DIR *dirp) {
assert(dirp != NULL, "argument is NULL");
return ::closedir(dirp);
}
......@@ -222,4 +229,38 @@ do { \
inline bool os::numa_has_static_binding() { return false; }
inline bool os::numa_has_group_homing() { return true; }
inline int os::socket(int domain, int type, int protocol) {
return ::socket(domain, type, protocol);
}
inline int os::listen(int fd, int count) {
if (fd < 0) return OS_ERR;
return ::listen(fd, count);
}
inline int os::socket_shutdown(int fd, int howto){
return ::shutdown(fd, howto);
}
inline int os::get_sock_name(int fd, struct sockaddr *him, int *len){
return ::getsockname(fd, him, (socklen_t*) len);
}
inline int os::get_host_name(char* name, int namelen){
return ::gethostname(name, namelen);
}
inline struct hostent* os::get_host_by_name(char* name) {
return ::gethostbyname(name);
}
inline int os::get_sock_opt(int fd, int level, int optname,
char *optval, int* optlen){
return ::getsockopt(fd, level, optname, optval, (socklen_t*) optlen);
}
inline int os::set_sock_opt(int fd, int level, int optname,
const char *optval, int optlen){
return ::setsockopt(fd, level, optname, optval, optlen);
}
#endif // OS_SOLARIS_VM_OS_SOLARIS_INLINE_HPP
此差异已折叠。
/*
* Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -22,28 +22,31 @@
*
*/
/*
* Gamma (Hotspot internal engineering test) launcher based on 1.6.0-b28 JDK,
* search "GAMMA" for gamma specific changes.
*/
#ifndef JAVA_MD_H
#define JAVA_MD_H
#include <limits.h>
#include <unistd.h>
#include <sys/param.h>
#include <jni.h>
#include <windows.h>
#include <io.h>
#ifndef GAMMA
#include "manifest_info.h"
#endif
#include "jli_util.h"
#define PATH_SEPARATOR ':'
#define FILESEP "/"
#define FILE_SEPARATOR '/'
#ifndef MAXNAMELEN
#define MAXNAMELEN PATH_MAX
#ifdef GAMMA
#define stricmp _stricmp
#define strnicmp _strnicmp
#define snprintf _snprintf
#define strdup _strdup
#endif
#define PATH_SEPARATOR ';'
#define FILESEP "\\"
#define FILE_SEPARATOR '\\'
#define IS_FILE_SEPARATOR(c) ((c) == '\\' || (c) == '/')
#define MAXPATHLEN MAX_PATH
#define MAXNAMELEN MAX_PATH
#ifdef JAVA_ARGS
/*
* ApplicationHome is prepended to each of these entries; the resulting
......@@ -51,27 +54,26 @@
* value of -cp option to the launcher.
*/
#ifndef APP_CLASSPATH
#define APP_CLASSPATH { "/lib/tools.jar", "/classes" }
#define APP_CLASSPATH { "\\lib\\tools.jar", "\\classes" }
#endif
#endif
#ifdef HAVE_GETHRTIME
/*
* Support for doing cheap, accurate interval timing.
*/
#include <sys/time.h>
#define CounterGet() (gethrtime()/1000)
#define Counter2Micros(counts) (counts)
#else
#define CounterGet() (0)
#define Counter2Micros(counts) (1)
#endif /* HAVE_GETHRTIME */
extern jlong CounterGet(void);
extern jlong Counter2Micros(jlong counts);
#ifdef JAVAW
#define main _main
extern int _main(int argc, char **argv);
#endif
/*
* Function prototypes.
*/
#ifndef GAMMA
char *LocateJRE(manifest_info* info);
char *LocateJRE(manifest_info *info);
void ExecJRE(char *jre, char **argv);
#endif
int UnsetEnv(char *name);
......
/*
* Copyright (c) 1998, 2010, 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 OS_WINDOWS_VM_HPI_WINDOWS_HPP
#define OS_WINDOWS_VM_HPI_WINDOWS_HPP
// Win32 delegates these to the HPI. Solaris provides its own
// implementation without using the HPI (for Interrupitble I/O).
// HPI_FileInterface
HPIDECL(close, "close", _file, Close, int, "%d",
(int fd),
("fd = %d", fd),
(fd));
HPIDECL(read, "read", _file, Read, size_t, "%ld",
(int fd, void *buf, unsigned int nBytes),
("fd = %d, buf = %p, nBytes = %u", fd, buf, nBytes),
(fd, buf, nBytes));
HPIDECL(write, "write", _file, Write, size_t, "%ld",
(int fd, const void *buf, unsigned int nBytes),
("fd = %d, buf = %p, nBytes = %u", fd, buf, nBytes),
(fd, buf, nBytes));
// HPI_SocketInterface
HPIDECL(socket_close, "socket_close", _socket, Close, int, "%d",
(int fd),
("fd = %d", fd),
(fd));
HPIDECL(socket_available, "socket_available", _socket, Available,
int, "%d",
(int fd, jint *pbytes),
("fd = %d, pbytes = %p", fd, pbytes),
(fd, pbytes));
HPIDECL(socket, "socket", _socket, Socket, int, "%d",
(int domain, int type, int protocol),
("domain = %d, type = %d, protocol = %d", domain, type, protocol),
(domain, type, protocol));
HPIDECL(listen, "listen", _socket, Listen, int, "%d",
(int fd, int count),
("fd = %d, count = %d", fd, count),
(fd, count));
HPIDECL(connect, "connect", _socket, Connect, int, "%d",
(int fd, struct sockaddr *him, int len),
("fd = %d, him = %p, len = %d", fd, him, len),
(fd, him, len));
HPIDECL(accept, "accept", _socket, Accept, int, "%d",
(int fd, struct sockaddr *him, int *len),
("fd = %d, him = %p, len = %p", fd, him, len),
(fd, him, len));
HPIDECL(sendto, "sendto", _socket, SendTo, int, "%d",
(int fd, char *buf, int len, int flags,
struct sockaddr *to, int tolen),
("fd = %d, buf = %p, len = %d, flags = %d, to = %p, tolen = %d",
fd, buf, len, flags, to, tolen),
(fd, buf, len, flags, to, tolen));
HPIDECL(recvfrom, "recvfrom", _socket, RecvFrom, int, "%d",
(int fd, char *buf, int nbytes, int flags,
struct sockaddr *from, int *fromlen),
("fd = %d, buf = %p, len = %d, flags = %d, frm = %p, frmlen = %d",
fd, buf, nbytes, flags, from, fromlen),
(fd, buf, nbytes, flags, from, fromlen));
HPIDECL(recv, "recv", _socket, Recv, int, "%d",
(int fd, char *buf, int nBytes, int flags),
("fd = %d, buf = %p, nBytes = %d, flags = %d",
fd, buf, nBytes, flags),
(fd, buf, nBytes, flags));
HPIDECL(send, "send", _socket, Send, int, "%d",
(int fd, char *buf, int nBytes, int flags),
("fd = %d, buf = %p, nBytes = %d, flags = %d",
fd, buf, nBytes, flags),
(fd, buf, nBytes, flags));
inline int hpi::raw_send(int fd, char *buf, int nBytes, int flags) {
return send(fd, buf, nBytes, flags);
}
HPIDECL(timeout, "timeout", _socket, Timeout, int, "%d",
(int fd, long timeout),
("fd = %d, timeout = %ld", fd, timeout),
(fd, timeout));
HPIDECL(get_host_by_name, "get_host_by_name", _socket, GetHostByName,
struct hostent *, "(struct hostent *)%p",
(char *name),
("%s", name),
(name));
HPIDECL(socket_shutdown, "socket_shutdown", _socket, SocketShutdown,
int, "%d",
(int fd, int howto),
("fd = %d, howto = %d", fd, howto),
(fd, howto));
HPIDECL(bind, "bind", _socket, Bind,
int, "%d",
(int fd, struct sockaddr *him, int len),
("fd = %d, him = %p, len = %d",
fd, him, len),
(fd, him, len));
HPIDECL(get_sock_name, "get_sock_name", _socket, GetSocketName,
int, "%d",
(int fd, struct sockaddr *him, int *len),
("fd = %d, him = %p, len = %p",
fd, him, len),
(fd, him, len));
HPIDECL(get_host_name, "get_host_name", _socket, GetHostName, int, "%d",
(char *hostname, int namelen),
("hostname = %p, namelen = %d",
hostname, namelen),
(hostname, namelen));
HPIDECL(get_host_by_addr, "get_host_by_addr", _socket, GetHostByAddr,
struct hostent *, "(struct hostent *)%p",
(const char* name, int len, int type),
("name = %p, len = %d, type = %d",
name, len, type),
(name, len, type));
HPIDECL(get_sock_opt, "get_sock_opt", _socket, SocketGetOption, int, "%d",
(int fd, int level, int optname, char *optval, int* optlen),
("fd = %d, level = %d, optname = %d, optval = %p, optlen = %p",
fd, level, optname, optval, optlen),
(fd, level, optname, optval, optlen));
HPIDECL(set_sock_opt, "set_sock_opt", _socket, SocketSetOption, int, "%d",
(int fd, int level, int optname, const char *optval, int optlen),
("fd = %d, level = %d, optname = %d, optval = %p, optlen = %d",
fd, level, optname, optval, optlen),
(fd, level, optname, optval, optlen));
HPIDECL(get_proto_by_name, "get_proto_by_name", _socket, GetProtoByName,
struct protoent *, "(struct protoent *)%p",
(char* name),
("name = %p",
name),
(name));
#endif // OS_WINDOWS_VM_HPI_WINDOWS_HPP
此差异已折叠。
......@@ -35,15 +35,26 @@
inline const char* os::file_separator() { return "\\"; }
inline const char* os::line_separator() { return "\r\n"; }
inline const char* os::path_separator() { return ";"; }
inline const char* os::dll_file_extension() { return ".dll"; }
inline const char* os::jlong_format_specifier() { return "%I64d"; }
inline const char* os::julong_format_specifier() { return "%I64u"; }
inline const int os::default_file_open_flags() { return O_BINARY | O_NOINHERIT;}
// File names are case-insensitive on windows only
inline int os::file_name_strcmp(const char* s, const char* t) {
return _stricmp(s, t);
}
inline void os::dll_unload(void *lib) {
::FreeLibrary((HMODULE)lib);
}
inline void* os::dll_lookup(void *lib, const char *name) {
return (void*)::GetProcAddress((HMODULE)lib, name);
}
// Used to improve time-sharing on some systems
inline void os::loop_breaker(int attempts) {}
......@@ -83,4 +94,19 @@ inline void os::bang_stack_shadow_pages() {
inline bool os::numa_has_static_binding() { return true; }
inline bool os::numa_has_group_homing() { return false; }
inline size_t os::read(int fd, void *buf, unsigned int nBytes) {
return ::read(fd, buf, nBytes);
}
inline size_t os::restartable_read(int fd, void *buf, unsigned int nBytes) {
return ::read(fd, buf, nBytes);
}
inline size_t os::write(int fd, const void *buf, unsigned int nBytes) {
return ::write(fd, buf, nBytes);
}
inline int os::close(int fd) {
return ::close(fd);
}
#endif // OS_WINDOWS_VM_OS_WINDOWS_INLINE_HPP
......@@ -41,7 +41,6 @@
#include "runtime/arguments.hpp"
#include "runtime/extendedPC.hpp"
#include "runtime/frame.inline.hpp"
#include "runtime/hpi.hpp"
#include "runtime/interfaceSupport.hpp"
#include "runtime/java.hpp"
#include "runtime/javaCalls.hpp"
......
......@@ -41,7 +41,6 @@
#include "runtime/arguments.hpp"
#include "runtime/extendedPC.hpp"
#include "runtime/frame.inline.hpp"
#include "runtime/hpi.hpp"
#include "runtime/interfaceSupport.hpp"
#include "runtime/java.hpp"
#include "runtime/javaCalls.hpp"
......
......@@ -42,7 +42,6 @@
#include "runtime/arguments.hpp"
#include "runtime/extendedPC.hpp"
#include "runtime/frame.inline.hpp"
#include "runtime/hpi.hpp"
#include "runtime/interfaceSupport.hpp"
#include "runtime/java.hpp"
#include "runtime/javaCalls.hpp"
......
......@@ -41,7 +41,6 @@
#include "runtime/arguments.hpp"
#include "runtime/extendedPC.hpp"
#include "runtime/frame.inline.hpp"
#include "runtime/hpi.hpp"
#include "runtime/interfaceSupport.hpp"
#include "runtime/java.hpp"
#include "runtime/javaCalls.hpp"
......
......@@ -41,7 +41,6 @@
#include "runtime/arguments.hpp"
#include "runtime/extendedPC.hpp"
#include "runtime/frame.inline.hpp"
#include "runtime/hpi.hpp"
#include "runtime/interfaceSupport.hpp"
#include "runtime/java.hpp"
#include "runtime/javaCalls.hpp"
......
此差异已折叠。
此差异已折叠。
......@@ -26,6 +26,7 @@
#define SHARE_VM_CI_CICALLPROFILE_HPP
#include "ci/ciClassList.hpp"
#include "memory/allocation.hpp"
// ciCallProfile
//
......
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册