Wed, 23 Feb 2011 11:18:16 -0800
Merge
make/windows/platform_amd64 | file | annotate | diff | comparison | revisions | |
make/windows/platform_i486 | file | annotate | diff | comparison | revisions | |
make/windows/platform_ia64 | file | annotate | diff | comparison | revisions | |
src/share/tools/ProjectCreator/Macro.java | file | annotate | diff | comparison | revisions | |
src/share/tools/ProjectCreator/MacroDefinitions.java | file | annotate | diff | comparison | revisions | |
src/share/vm/oops/cpCacheOop.cpp | file | annotate | diff | comparison | revisions | |
src/share/vm/oops/methodDataOop.cpp | file | annotate | diff | comparison | revisions | |
src/share/vm/oops/methodDataOop.hpp | file | annotate | diff | comparison | revisions | |
src/share/vm/oops/methodOop.cpp | file | annotate | diff | comparison | revisions | |
src/share/vm/runtime/globals.hpp | file | annotate | diff | comparison | revisions |
1.1 --- a/make/Makefile Tue Feb 22 15:26:36 2011 -0800 1.2 +++ b/make/Makefile Wed Feb 23 11:18:16 2011 -0800 1.3 @@ -1,5 +1,5 @@ 1.4 # 1.5 -# Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. 1.6 +# Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved. 1.7 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.8 # 1.9 # This code is free software; you can redistribute it and/or modify it 1.10 @@ -43,6 +43,7 @@ 1.11 # ALT_OUTPUTDIR Output directory to use for hotspot build 1.12 # ALT_EXPORT_PATH Directory to export hotspot build to 1.13 # ALT_JDK_IMPORT_PATH Current JDK build (only for create_jdk rules) 1.14 +# ALT_JDK_TARGET_IMPORT_PATH Current JDK build when cross-compiling 1.15 # ALT_BUILD_WIN_SA Building SA on Windows is disabled by default. 1.16 # Set ALT_BUILD_WIN_SA=1 to enable building SA on 1.17 # Windows.
2.1 --- a/make/defs.make Tue Feb 22 15:26:36 2011 -0800 2.2 +++ b/make/defs.make Wed Feb 23 11:18:16 2011 -0800 2.3 @@ -1,5 +1,5 @@ 2.4 # 2.5 -# Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved. 2.6 +# Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved. 2.7 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 2.8 # 2.9 # This code is free software; you can redistribute it and/or modify it 2.10 @@ -162,6 +162,13 @@ 2.11 JDK_IMPORT_PATH=$(ALT_JDK_IMPORT_PATH) 2.12 endif 2.13 2.14 +# Other parts of JDK build may require an import JDK that can be executed 2.15 +# on the build host. For cross-compile builds we also need an import JDK 2.16 +# that matches the target arch, so for that we set ALT_JDK_TARGET_IMPORT_PATH 2.17 +ifneq ($(ALT_JDK_TARGET_IMPORT_PATH),) 2.18 + JDK_IMPORT_PATH=$(ALT_JDK_TARGET_IMPORT_PATH) 2.19 +endif 2.20 + 2.21 # Find JDK used for javac compiles 2.22 BOOTDIR=$(SLASH_JAVA)/re/j2se/$(PREVIOUS_JDK_VERSION)/latest/binaries/$(PLATFORM) 2.23 ifneq ($(ALT_BOOTDIR),)
3.1 --- a/make/jprt.properties Tue Feb 22 15:26:36 2011 -0800 3.2 +++ b/make/jprt.properties Wed Feb 23 11:18:16 2011 -0800 3.3 @@ -1,5 +1,5 @@ 3.4 # 3.5 -# Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved. 3.6 +# Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved. 3.7 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3.8 # 3.9 # This code is free software; you can redistribute it and/or modify it 3.10 @@ -437,6 +437,7 @@ 3.11 ${jprt.my.windows.x64}-{product|fastdebug}-c2-GCBasher_ParallelGC, \ 3.12 ${jprt.my.windows.x64}-{product|fastdebug}-c2-GCBasher_ParNewGC, \ 3.13 ${jprt.my.windows.x64}-{product|fastdebug}-c2-GCBasher_CMS, \ 3.14 + ${jprt.my.windows.x64}-{product|fastdebug}-c2-GCBasher_G1, \ 3.15 ${jprt.my.windows.x64}-{product|fastdebug}-c2-GCBasher_ParOldGC, \ 3.16 ${jprt.my.windows.x64}-{product|fastdebug}-c2-GCOld_default, \ 3.17 ${jprt.my.windows.x64}-{product|fastdebug}-c2-GCOld_SerialGC, \
4.1 --- a/make/windows/create.bat Tue Feb 22 15:26:36 2011 -0800 4.2 +++ b/make/windows/create.bat Wed Feb 23 11:18:16 2011 -0800 4.3 @@ -1,6 +1,6 @@ 4.4 @echo off 4.5 REM 4.6 -REM Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. 4.7 +REM Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved. 4.8 REM DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4.9 REM 4.10 REM This code is free software; you can redistribute it and/or modify it 4.11 @@ -50,9 +50,7 @@ 4.12 4.13 4.14 :testit 4.15 -cl 2>&1 | grep "IA-64" >NUL 4.16 -if %errorlevel% == 0 goto isia64 4.17 -cl 2>&1 | grep "AMD64" >NUL 4.18 +cl 2>&1 | grep "x64" >NUL 4.19 if %errorlevel% == 0 goto amd64 4.20 set ARCH=x86 4.21 set BUILDARCH=i486 4.22 @@ -64,12 +62,6 @@ 4.23 set BUILDARCH=amd64 4.24 set Platform_arch=x86 4.25 set Platform_arch_model=x86_64 4.26 -goto done 4.27 -:isia64 4.28 -set ARCH=ia64 4.29 -set BUILDARCH=ia64 4.30 -set Platform_arch=ia64 4.31 -set Platform_arch_model=ia64 4.32 :done 4.33 4.34 setlocal 4.35 @@ -81,7 +73,7 @@ 4.36 REM Set HotSpotWorkSpace to the directy two steps above this script 4.37 for %%i in ("%~dp0..") do ( set HotSpotWorkSpace=%%~dpi) 4.38 set HotSpotBuildRoot=%HotSpotWorkSpace%build 4.39 -set HotSpotBuildSpace=%HotSpotBuildRoot%\vs 4.40 +set HotSpotBuildSpace=%HotSpotBuildRoot%\vs-%BUILDARCH% 4.41 set HotSpotJDKDist=%1 4.42 4.43 4.44 @@ -89,9 +81,9 @@ 4.45 for /F %%i in ('sh %HotSpotWorkSpace%/make/windows/get_msc_ver.sh') do set %%i 4.46 4.47 echo ************************************************************** 4.48 -set ProjectFile=jvm.vcproj 4.49 +set ProjectFile=%HotSpotBuildSpace%\jvm.vcproj 4.50 if "%MSC_VER%" == "1200" ( 4.51 -set ProjectFile=jvm.dsp 4.52 +set ProjectFile=%HotSpotBuildSpace%\jvm.dsp 4.53 echo Will generate VC6 project {unsupported} 4.54 ) else ( 4.55 if "%MSC_VER%" == "1400" ( 4.56 @@ -163,7 +155,7 @@ 4.57 ) 4.58 4.59 REM force regneration of ProjectFile 4.60 -if exist %HotSpotBuildSpace%\%ProjectFile% del %HotSpotBuildSpace%\%ProjectFile% 4.61 +if exist %ProjectFile% del %ProjectFile% 4.62 4.63 for /D %%i in (compiler1, compiler2, tiered, core, kernel) do ( 4.64 echo -- %%i -- 4.65 @@ -182,6 +174,7 @@ 4.66 echo BUILDARCH=%BUILDARCH% >> %HotSpotBuildSpace%\%%i\local.make 4.67 echo Platform_arch=%Platform_arch% >> %HotSpotBuildSpace%\%%i\local.make 4.68 echo Platform_arch_model=%Platform_arch_model% >> %HotSpotBuildSpace%\%%i\local.make 4.69 +echo MSC_VER=%MSC_VER% >> %HotSpotBuildSpace%\%%i\local.make 4.70 4.71 for /D %%j in (debug, fastdebug, product) do ( 4.72 if NOT EXIST %HotSpotBuildSpace%\%%i\%%j mkdir %HotSpotBuildSpace%\%%i\%%j 4.73 @@ -196,7 +189,7 @@ 4.74 pushd %HotSpotBuildRoot% 4.75 4.76 REM It doesn't matter which variant we use here, "compiler1" is as good as any of the others - we need the common variables 4.77 -nmake /nologo /F %HotSpotWorkSpace%/make/windows/projectfiles/common/Makefile LOCAL_MAKE=%HotSpotBuildSpace%\compiler1\local.make %HotSpotBuildRoot%/%ProjectFile% 4.78 +nmake /nologo /F %HotSpotWorkSpace%/make/windows/projectfiles/common/Makefile LOCAL_MAKE=%HotSpotBuildSpace%\compiler1\local.make %ProjectFile% 4.79 4.80 popd 4.81
5.1 --- a/make/windows/makefiles/compile.make Tue Feb 22 15:26:36 2011 -0800 5.2 +++ b/make/windows/makefiles/compile.make Wed Feb 23 11:18:16 2011 -0800 5.3 @@ -1,5 +1,5 @@ 5.4 # 5.5 -# Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. 5.6 +# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. 5.7 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 5.8 # 5.9 # This code is free software; you can redistribute it and/or modify it 5.10 @@ -141,9 +141,6 @@ 5.11 !endif 5.12 !endif 5.13 5.14 -# Add what version of the compiler we think this is to the compile line 5.15 -CPP_FLAGS=$(CPP_FLAGS) /D "MSC_VER=$(MSC_VER)" 5.16 - 5.17 # By default, we do not want to use the debug version of the msvcrt.dll file 5.18 # but if MFC_DEBUG is defined in the environment it will be used. 5.19 MS_RUNTIME_OPTION = /MD
6.1 --- a/make/windows/makefiles/projectcreator.make Tue Feb 22 15:26:36 2011 -0800 6.2 +++ b/make/windows/makefiles/projectcreator.make Wed Feb 23 11:18:16 2011 -0800 6.3 @@ -1,5 +1,5 @@ 6.4 # 6.5 -# Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. 6.6 +# Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved. 6.7 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 6.8 # 6.9 # This code is free software; you can redistribute it and/or modify it 6.10 @@ -36,8 +36,6 @@ 6.11 $(WorkSpace)\src\share\tools\ProjectCreator\DirectoryTree.java \ 6.12 $(WorkSpace)\src\share\tools\ProjectCreator\DirectoryTreeNode.java \ 6.13 $(WorkSpace)\src\share\tools\ProjectCreator\FileFormatException.java \ 6.14 - $(WorkSpace)\src\share\tools\ProjectCreator\Macro.java \ 6.15 - $(WorkSpace)\src\share\tools\ProjectCreator\MacroDefinitions.java \ 6.16 $(WorkSpace)\src\share\tools\ProjectCreator\ProjectCreator.java \ 6.17 $(WorkSpace)\src\share\tools\ProjectCreator\WinGammaPlatform.java \ 6.18 $(WorkSpace)\src\share\tools\ProjectCreator\WinGammaPlatformVC6.java \ 6.19 @@ -50,6 +48,10 @@ 6.20 6.21 # This is only used internally 6.22 ProjectCreatorIncludesPRIVATE=\ 6.23 + -relativeInclude src\closed\share\vm \ 6.24 + -relativeInclude src\closed\os\windows\vm \ 6.25 + -relativeInclude src\closed\os_cpu\windows_$(Platform_arch)\vm \ 6.26 + -relativeInclude src\closed\cpu\$(Platform_arch)\vm \ 6.27 -relativeInclude src\share\vm \ 6.28 -relativeInclude src\share\vm\prims \ 6.29 -relativeInclude src\os\windows\vm \ 6.30 @@ -84,7 +86,7 @@ 6.31 -buildBase $(HOTSPOTBUILDSPACE)\%f\%b \ 6.32 -startAt src \ 6.33 -compiler $(VcVersion) \ 6.34 - -projectFileName $(HOTSPOTBUILDROOT)\$(ProjectFile) \ 6.35 + -projectFileName $(HOTSPOTBUILDSPACE)\$(ProjectFile) \ 6.36 -jdkTargetRoot $(HOTSPOTJDKDIST) \ 6.37 -define ALIGN_STACK_FRAMES \ 6.38 -define VM_LITTLE_ENDIAN \ 6.39 @@ -106,13 +108,20 @@ 6.40 # Add in build-specific options 6.41 !if "$(BUILDARCH)" == "i486" 6.42 ProjectCreatorIDEOptions=$(ProjectCreatorIDEOptions) \ 6.43 + -platformName Win32 \ 6.44 -define IA32 \ 6.45 -ignorePath x86_64 \ 6.46 -define TARGET_ARCH_MODEL_x86_32 6.47 !else 6.48 +!if "$(BUILDARCH)" == "amd64" 6.49 ProjectCreatorIDEOptions=$(ProjectCreatorIDEOptions) \ 6.50 + -platformName x64 \ 6.51 + -define AMD64 \ 6.52 + -define _LP64 \ 6.53 -ignorePath x86_32 \ 6.54 - -define TARGET_ARCH_MODEL_x86_64 6.55 + -define TARGET_ARCH_MODEL_x86_64 \ 6.56 + -define TARGET_OS_ARCH_MODEL_windows_x86_64 6.57 +!endif 6.58 !endif 6.59 6.60 ProjectCreatorIDEOptionsIgnoreCompiler1=\
7.1 --- a/make/windows/makefiles/rules.make Tue Feb 22 15:26:36 2011 -0800 7.2 +++ b/make/windows/makefiles/rules.make Wed Feb 23 11:18:16 2011 -0800 7.3 @@ -1,5 +1,5 @@ 7.4 # 7.5 -# Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. 7.6 +# Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved. 7.7 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 7.8 # 7.9 # This code is free software; you can redistribute it and/or modify it 7.10 @@ -53,7 +53,7 @@ 7.11 !if "$(MSC_VER)" == "1200" 7.12 7.13 VcVersion=VC6 7.14 -ProjectFile=vm.dsp 7.15 +ProjectFile=jvm.dsp 7.16 7.17 !elseif "$(MSC_VER)" == "1400" 7.18
8.1 --- a/make/windows/platform_amd64 Tue Feb 22 15:26:36 2011 -0800 8.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 8.3 @@ -1,15 +0,0 @@ 8.4 -// Platform file for win32 NT platform 8.5 - 8.6 -os_family = windows 8.7 - 8.8 -arch = x86 8.9 - 8.10 -arch_model = x86_64 8.11 - 8.12 -os_arch = windows_x86 8.13 - 8.14 -os_arch_model = windows_x86_64 8.15 - 8.16 -lib_arch = amd64 8.17 - 8.18 -compiler = visCPP
9.1 --- a/make/windows/platform_i486 Tue Feb 22 15:26:36 2011 -0800 9.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 9.3 @@ -1,15 +0,0 @@ 9.4 -// Platform file for windows platform 9.5 - 9.6 -os_family = windows 9.7 - 9.8 -arch = x86 9.9 - 9.10 -arch_model = x86_32 9.11 - 9.12 -os_arch = windows_x86 9.13 - 9.14 -os_arch_model = windows_x86_32 9.15 - 9.16 -lib_arch = i386 9.17 - 9.18 -compiler = visCPP
10.1 --- a/make/windows/platform_ia64 Tue Feb 22 15:26:36 2011 -0800 10.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 10.3 @@ -1,12 +0,0 @@ 10.4 -// Platform file for Itanium Windows platform $Revision: 1.0 $ 10.5 - 10.6 -os_family = win32 10.7 - 10.8 -arch = ia64 10.9 - 10.10 -os_arch = win32_ia64 10.11 - 10.12 -compiler = visCPP 10.13 - 10.14 -gnu_dis_arch = ia64 10.15 -
11.1 --- a/make/windows/projectfiles/common/Makefile Tue Feb 22 15:26:36 2011 -0800 11.2 +++ b/make/windows/projectfiles/common/Makefile Wed Feb 23 11:18:16 2011 -0800 11.3 @@ -1,5 +1,5 @@ 11.4 # 11.5 -# Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. 11.6 +# Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved. 11.7 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 11.8 # 11.9 # This code is free software; you can redistribute it and/or modify it 11.10 @@ -54,8 +54,6 @@ 11.11 JvmtiOutDir=$(HOTSPOTBUILDSPACE)\$(Variant)\generated\jvmtifiles 11.12 !include $(HOTSPOTWORKSPACE)/make/windows/makefiles/jvmti.make 11.13 11.14 -Platform=$(HOTSPOTWORKSPACE)/make/windows/platform_$(BUILDARCH) 11.15 - 11.16 !if "$(Variant)" == "compiler2" 11.17 # Pick up rules for building adlc 11.18 !include $(HOTSPOTWORKSPACE)/make/windows/makefiles/adlc.make 11.19 @@ -105,17 +103,16 @@ 11.20 !endif 11.21 11.22 ProjectCreatorIDEOptions = $(ProjectCreatorIDEOptions) \ 11.23 - -platform $(Platform) \ 11.24 -define HOTSPOT_RELEASE_VERSION=\\\"$(HOTSPOT_RELEASE_VERSION)\\\" \ 11.25 -define JRE_RELEASE_VERSION=\\\"$(JRE_RELEASE_VERSION)\\\" \ 11.26 -define HOTSPOT_VM_DISTRO=\\\"$(HOTSPOT_VM_DISTRO)\\\" 11.27 11.28 -$(HOTSPOTBUILDROOT)/$(ProjectFile): $(HOTSPOTBUILDSPACE)/classes/ProjectCreator.class 11.29 +$(HOTSPOTBUILDSPACE)/$(ProjectFile): $(HOTSPOTBUILDSPACE)/classes/ProjectCreator.class 11.30 @$(RUN_JAVA) -Djava.class.path=$(HOTSPOTBUILDSPACE)/classes ProjectCreator WinGammaPlatform$(VcVersion) $(ProjectCreatorIDEOptions) 11.31 11.32 clean: 11.33 @rm -rf $(HOTSPOTBUILDSPACE)/classes 11.34 - @rm -r ../$(ProjectFile) 11.35 + @rm -r $(HOTSPOTBUILDSPACE)/$(ProjectFile) 11.36 11.37 $(HOTSPOTBUILDSPACE)/classes/ProjectCreator.class: $(ProjectCreatorSources) 11.38 @if exist $(HOTSPOTBUILDSPACE)\classes rmdir /s /q $(HOTSPOTBUILDSPACE)\classes
12.1 --- a/src/os/windows/vm/perfMemory_windows.cpp Tue Feb 22 15:26:36 2011 -0800 12.2 +++ b/src/os/windows/vm/perfMemory_windows.cpp Wed Feb 23 11:18:16 2011 -0800 12.3 @@ -1,5 +1,5 @@ 12.4 /* 12.5 - * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved. 12.6 + * Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved. 12.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 12.8 * 12.9 * This code is free software; you can redistribute it and/or modify it 12.10 @@ -298,8 +298,8 @@ 12.11 static char* get_user_name_slow(int vmid) { 12.12 12.13 // directory search 12.14 - char* oldest_user = NULL; 12.15 - time_t oldest_ctime = 0; 12.16 + char* latest_user = NULL; 12.17 + time_t latest_ctime = 0; 12.18 12.19 const char* tmpdirname = os::get_temp_directory(); 12.20 12.21 @@ -375,18 +375,29 @@ 12.22 continue; 12.23 } 12.24 12.25 - // compare and save filename with latest creation time 12.26 - if (statbuf.st_size > 0 && statbuf.st_ctime > oldest_ctime) { 12.27 + // If we found a matching file with a newer creation time, then 12.28 + // save the user name. The newer creation time indicates that 12.29 + // we found a newer incarnation of the process associated with 12.30 + // vmid. Due to the way that Windows recycles pids and the fact 12.31 + // that we can't delete the file from the file system namespace 12.32 + // until last close, it is possible for there to be more than 12.33 + // one hsperfdata file with a name matching vmid (diff users). 12.34 + // 12.35 + // We no longer ignore hsperfdata files where (st_size == 0). 12.36 + // In this function, all we're trying to do is determine the 12.37 + // name of the user that owns the process associated with vmid 12.38 + // so the size doesn't matter. Very rarely, we have observed 12.39 + // hsperfdata files where (st_size == 0) and the st_size field 12.40 + // later becomes the expected value. 12.41 + // 12.42 + if (statbuf.st_ctime > latest_ctime) { 12.43 + char* user = strchr(dentry->d_name, '_') + 1; 12.44 12.45 - if (statbuf.st_ctime > oldest_ctime) { 12.46 - char* user = strchr(dentry->d_name, '_') + 1; 12.47 + if (latest_user != NULL) FREE_C_HEAP_ARRAY(char, latest_user); 12.48 + latest_user = NEW_C_HEAP_ARRAY(char, strlen(user)+1); 12.49 12.50 - if (oldest_user != NULL) FREE_C_HEAP_ARRAY(char, oldest_user); 12.51 - oldest_user = NEW_C_HEAP_ARRAY(char, strlen(user)+1); 12.52 - 12.53 - strcpy(oldest_user, user); 12.54 - oldest_ctime = statbuf.st_ctime; 12.55 - } 12.56 + strcpy(latest_user, user); 12.57 + latest_ctime = statbuf.st_ctime; 12.58 } 12.59 12.60 FREE_C_HEAP_ARRAY(char, filename); 12.61 @@ -399,7 +410,7 @@ 12.62 os::closedir(tmpdirp); 12.63 FREE_C_HEAP_ARRAY(char, tdbuf); 12.64 12.65 - return(oldest_user); 12.66 + return(latest_user); 12.67 } 12.68 12.69 // return the name of the user that owns the process identified by vmid. 12.70 @@ -1339,6 +1350,38 @@ 12.71 CloseHandle(fh); 12.72 fh = NULL; 12.73 return NULL; 12.74 + } else { 12.75 + // We created the file mapping, but rarely the size of the 12.76 + // backing store file is reported as zero (0) which can cause 12.77 + // failures when trying to use the hsperfdata file. 12.78 + struct stat statbuf; 12.79 + int ret_code = ::stat(filename, &statbuf); 12.80 + if (ret_code == OS_ERR) { 12.81 + if (PrintMiscellaneous && Verbose) { 12.82 + warning("Could not get status information from file %s: %s\n", 12.83 + filename, strerror(errno)); 12.84 + } 12.85 + CloseHandle(fmh); 12.86 + CloseHandle(fh); 12.87 + fh = NULL; 12.88 + fmh = NULL; 12.89 + return NULL; 12.90 + } 12.91 + 12.92 + // We could always call FlushFileBuffers() but the Microsoft 12.93 + // docs indicate that it is considered expensive so we only 12.94 + // call it when we observe the size as zero (0). 12.95 + if (statbuf.st_size == 0 && FlushFileBuffers(fh) != TRUE) { 12.96 + DWORD lasterror = GetLastError(); 12.97 + if (PrintMiscellaneous && Verbose) { 12.98 + warning("could not flush file %s: %d\n", filename, lasterror); 12.99 + } 12.100 + CloseHandle(fmh); 12.101 + CloseHandle(fh); 12.102 + fh = NULL; 12.103 + fmh = NULL; 12.104 + return NULL; 12.105 + } 12.106 } 12.107 12.108 // the file has been successfully created and the file mapping
13.1 --- a/src/os_cpu/windows_x86/vm/unwind_windows_x86.hpp Tue Feb 22 15:26:36 2011 -0800 13.2 +++ b/src/os_cpu/windows_x86/vm/unwind_windows_x86.hpp Wed Feb 23 11:18:16 2011 -0800 13.3 @@ -1,5 +1,5 @@ 13.4 /* 13.5 - * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. 13.6 + * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved. 13.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 13.8 * 13.9 * This code is free software; you can redistribute it and/or modify it 13.10 @@ -71,7 +71,7 @@ 13.11 PVOID HandlerData; 13.12 } DISPATCHER_CONTEXT, *PDISPATCHER_CONTEXT; 13.13 13.14 -#if MSC_VER < 1500 13.15 +#if _MSC_VER < 1500 13.16 13.17 /* Not needed for VS2008 compiler, comes from winnt.h. */ 13.18 typedef EXCEPTION_DISPOSITION (*PEXCEPTION_ROUTINE) (
14.1 --- a/src/share/tools/ProjectCreator/BuildConfig.java Tue Feb 22 15:26:36 2011 -0800 14.2 +++ b/src/share/tools/ProjectCreator/BuildConfig.java Wed Feb 23 11:18:16 2011 -0800 14.3 @@ -1,5 +1,5 @@ 14.4 /* 14.5 - * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. 14.6 + * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved. 14.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 14.8 * 14.9 * This code is free software; you can redistribute it and/or modify it 14.10 @@ -51,12 +51,14 @@ 14.11 if (vars == null) vars = new Hashtable(); 14.12 14.13 String flavourBuild = flavour + "_" + build; 14.14 + String platformName = getFieldString(null, "PlatformName"); 14.15 System.out.println(); 14.16 System.out.println(flavourBuild); 14.17 14.18 - put("Name", getCI().makeCfgName(flavourBuild)); 14.19 + put("Name", getCI().makeCfgName(flavourBuild, platformName)); 14.20 put("Flavour", flavour); 14.21 put("Build", build); 14.22 + put("PlatformName", platformName); 14.23 14.24 // ones mentioned above were needed to expand format 14.25 String buildBase = expandFormat(getFieldString(null, "BuildBase")); 14.26 @@ -93,7 +95,7 @@ 14.27 protected void initDefaultLinkerFlags() { 14.28 Vector linkerFlags = new Vector(); 14.29 14.30 - linkerFlags.addAll(getCI().getBaseLinkerFlags( get("OutputDir"), get("OutputDll"))); 14.31 + linkerFlags.addAll(getCI().getBaseLinkerFlags( get("OutputDir"), get("OutputDll"), get("PlatformName"))); 14.32 14.33 put("LinkerFlags", linkerFlags); 14.34 } 14.35 @@ -115,18 +117,15 @@ 14.36 } 14.37 14.38 14.39 - Vector getPreferredPaths(MacroDefinitions macros) { 14.40 + Vector getPreferredPaths() { 14.41 Vector preferredPaths = new Vector(); 14.42 + 14.43 // In the case of multiple files with the same name in 14.44 - // different subdirectories, prefer the versions specified in 14.45 - // the platform file as the "os_family" and "arch" macros. 14.46 - for (Iterator iter = macros.getMacros(); iter.hasNext(); ) { 14.47 - Macro macro = (Macro) iter.next(); 14.48 - if (macro.name.equals("os_family") || 14.49 - macro.name.equals("arch")) { 14.50 - preferredPaths.add(macro.contents); 14.51 - } 14.52 - } 14.53 + // different subdirectories, prefer these versions 14.54 + preferredPaths.add("windows"); 14.55 + preferredPaths.add("x86"); 14.56 + preferredPaths.add("closed"); 14.57 + 14.58 // Also prefer "opto" over "adlc" for adlcVMDeps.hpp 14.59 preferredPaths.add("opto"); 14.60 14.61 @@ -137,18 +136,7 @@ 14.62 void handleDB() { 14.63 WinGammaPlatform platform = (WinGammaPlatform)getField(null, "PlatformObject"); 14.64 14.65 - File incls = new File(get("OutputDir")+Util.sep+"incls"); 14.66 - 14.67 - incls.mkdirs(); 14.68 - 14.69 - MacroDefinitions macros = new MacroDefinitions(); 14.70 - try { 14.71 - macros.readFrom(getFieldString(null, "Platform"), false); 14.72 - } catch (Exception e) { 14.73 - throw new RuntimeException(e); 14.74 - } 14.75 - 14.76 - putSpecificField("AllFilesHash", computeAllFiles(platform, macros)); 14.77 + putSpecificField("AllFilesHash", computeAllFiles(platform)); 14.78 } 14.79 14.80 14.81 @@ -190,10 +178,10 @@ 14.82 ht.put(expandFormat(key), expandFormat(value)); 14.83 } 14.84 14.85 - Hashtable computeAllFiles(WinGammaPlatform platform, MacroDefinitions macros) { 14.86 + Hashtable computeAllFiles(WinGammaPlatform platform) { 14.87 Hashtable rv = new Hashtable(); 14.88 DirectoryTree tree = getSourceTree(get("SourceBase"), getFieldString(null, "StartAt")); 14.89 - Vector preferredPaths = getPreferredPaths(macros); 14.90 + Vector preferredPaths = getPreferredPaths(); 14.91 14.92 // Hold errors until end 14.93 Vector filesNotFound = new Vector(); 14.94 @@ -228,8 +216,7 @@ 14.95 System.err.println("Error: some files were not found or " + 14.96 "appeared in multiple subdirectories of " + 14.97 "directory " + get("SourceBase") + " and could not " + 14.98 - "be resolved with the os_family and arch " + 14.99 - "macros in the platform file."); 14.100 + "be resolved with os_family and arch."); 14.101 if (filesNotFound.size() != 0) { 14.102 System.err.println("Files not found:"); 14.103 for (Iterator iter = filesNotFound.iterator(); 14.104 @@ -254,10 +241,14 @@ 14.105 Vector sysDefines = new Vector(); 14.106 sysDefines.add("WIN32"); 14.107 sysDefines.add("_WINDOWS"); 14.108 - sysDefines.add("HOTSPOT_BUILD_USER="+System.getProperty("user.name")); 14.109 + sysDefines.add("HOTSPOT_BUILD_USER=\\\""+System.getProperty("user.name")+"\\\""); 14.110 sysDefines.add("HOTSPOT_BUILD_TARGET=\\\""+get("Build")+"\\\""); 14.111 sysDefines.add("_JNI_IMPLEMENTATION_"); 14.112 - sysDefines.add("HOTSPOT_LIB_ARCH=\\\"i386\\\""); 14.113 + if (vars.get("PlatformName").equals("Win32")) { 14.114 + sysDefines.add("HOTSPOT_LIB_ARCH=\\\"i386\\\""); 14.115 + } else { 14.116 + sysDefines.add("HOTSPOT_LIB_ARCH=\\\"amd64\\\""); 14.117 + } 14.118 14.119 sysDefines.addAll(defines); 14.120 14.121 @@ -710,7 +701,7 @@ 14.122 } 14.123 abstract class CompilerInterface { 14.124 abstract Vector getBaseCompilerFlags(Vector defines, Vector includes, String outDir); 14.125 - abstract Vector getBaseLinkerFlags(String outDir, String outDll); 14.126 + abstract Vector getBaseLinkerFlags(String outDir, String outDll, String platformName); 14.127 abstract Vector getDebugCompilerFlags(String opt); 14.128 abstract Vector getDebugLinkerFlags(); 14.129 abstract void getAdditionalNonKernelLinkerFlags(Vector rv); 14.130 @@ -718,7 +709,7 @@ 14.131 abstract Vector getProductLinkerFlags(); 14.132 abstract String getOptFlag(); 14.133 abstract String getNoOptFlag(); 14.134 - abstract String makeCfgName(String flavourBuild); 14.135 + abstract String makeCfgName(String flavourBuild, String platformName); 14.136 14.137 void addAttr(Vector receiver, String attr, String value) { 14.138 receiver.add(attr); receiver.add(value);
15.1 --- a/src/share/tools/ProjectCreator/DirectoryTree.java Tue Feb 22 15:26:36 2011 -0800 15.2 +++ b/src/share/tools/ProjectCreator/DirectoryTree.java Wed Feb 23 11:18:16 2011 -0800 15.3 @@ -1,5 +1,5 @@ 15.4 /* 15.5 - * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. 15.6 + * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved. 15.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 15.8 * 15.9 * This code is free software; you can redistribute it and/or modify it 15.10 @@ -55,6 +55,9 @@ 15.11 private Vector nodes = new Vector(); 15.12 15.13 public FileIterator(Node rootNode) { 15.14 + if(rootNode == null) { 15.15 + return; 15.16 + } 15.17 nodes.add(rootNode); 15.18 prune(); 15.19 } 15.20 @@ -112,10 +115,7 @@ 15.21 throws IllegalArgumentException { 15.22 File root = new File(Util.normalize(baseDirectory)); 15.23 if (!root.isDirectory()) { 15.24 - throw new IllegalArgumentException("baseDirectory \"" + 15.25 - baseDirectory + 15.26 - "\" does not exist or " + 15.27 - "is not a directory"); 15.28 + return; 15.29 } 15.30 try { 15.31 root = root.getCanonicalFile();
16.1 --- a/src/share/tools/ProjectCreator/FileFormatException.java Tue Feb 22 15:26:36 2011 -0800 16.2 +++ b/src/share/tools/ProjectCreator/FileFormatException.java Wed Feb 23 11:18:16 2011 -0800 16.3 @@ -1,5 +1,5 @@ 16.4 /* 16.5 - * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. 16.6 + * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved. 16.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 16.8 * 16.9 * This code is free software; you can redistribute it and/or modify it 16.10 @@ -22,7 +22,9 @@ 16.11 * 16.12 */ 16.13 16.14 +@SuppressWarnings("serial") 16.15 public class FileFormatException extends Exception { 16.16 + 16.17 public FileFormatException() { 16.18 super(); 16.19 }
17.1 --- a/src/share/tools/ProjectCreator/Macro.java Tue Feb 22 15:26:36 2011 -0800 17.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 17.3 @@ -1,28 +0,0 @@ 17.4 -/* 17.5 - * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. 17.6 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 17.7 - * 17.8 - * This code is free software; you can redistribute it and/or modify it 17.9 - * under the terms of the GNU General Public License version 2 only, as 17.10 - * published by the Free Software Foundation. 17.11 - * 17.12 - * This code is distributed in the hope that it will be useful, but WITHOUT 17.13 - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 17.14 - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 17.15 - * version 2 for more details (a copy is included in the LICENSE file that 17.16 - * accompanied this code). 17.17 - * 17.18 - * You should have received a copy of the GNU General Public License version 17.19 - * 2 along with this work; if not, write to the Free Software Foundation, 17.20 - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 17.21 - * 17.22 - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 17.23 - * or visit www.oracle.com if you need additional information or have any 17.24 - * questions. 17.25 - * 17.26 - */ 17.27 - 17.28 -public class Macro { 17.29 - public String name; 17.30 - public String contents; 17.31 -}
18.1 --- a/src/share/tools/ProjectCreator/MacroDefinitions.java Tue Feb 22 15:26:36 2011 -0800 18.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 18.3 @@ -1,154 +0,0 @@ 18.4 -/* 18.5 - * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. 18.6 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 18.7 - * 18.8 - * This code is free software; you can redistribute it and/or modify it 18.9 - * under the terms of the GNU General Public License version 2 only, as 18.10 - * published by the Free Software Foundation. 18.11 - * 18.12 - * This code is distributed in the hope that it will be useful, but WITHOUT 18.13 - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 18.14 - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 18.15 - * version 2 for more details (a copy is included in the LICENSE file that 18.16 - * accompanied this code). 18.17 - * 18.18 - * You should have received a copy of the GNU General Public License version 18.19 - * 2 along with this work; if not, write to the Free Software Foundation, 18.20 - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18.21 - * 18.22 - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 18.23 - * or visit www.oracle.com if you need additional information or have any 18.24 - * questions. 18.25 - * 18.26 - */ 18.27 - 18.28 -import java.io.*; 18.29 -import java.util.*; 18.30 - 18.31 -public class MacroDefinitions { 18.32 - private Vector macros; 18.33 - 18.34 - public MacroDefinitions() { 18.35 - macros = new Vector(); 18.36 - } 18.37 - 18.38 - public void addMacro(String name, String contents) { 18.39 - Macro macro = new Macro(); 18.40 - macro.name = name; 18.41 - macro.contents = contents; 18.42 - macros.add(macro); 18.43 - } 18.44 - 18.45 - private boolean lineIsEmpty(String s) { 18.46 - for (int i = 0; i < s.length(); i++) { 18.47 - if (!Character.isWhitespace(s.charAt(i))) { 18.48 - return false; 18.49 - } 18.50 - } 18.51 - return true; 18.52 - } 18.53 - 18.54 - public void readFrom(String fileName, boolean missingOk) 18.55 - throws FileNotFoundException, FileFormatException, IOException { 18.56 - BufferedReader reader = null; 18.57 - try { 18.58 - reader = new BufferedReader(new FileReader(fileName)); 18.59 - } catch (FileNotFoundException e) { 18.60 - if (missingOk) { 18.61 - return; 18.62 - } else { 18.63 - throw(e); 18.64 - } 18.65 - } 18.66 - String line; 18.67 - do { 18.68 - line = reader.readLine(); 18.69 - if (line != null) { 18.70 - // This had to be rewritten (compare to Database.java) 18.71 - // because the Solaris platform file has been 18.72 - // repurposed and now contains "macros" with spaces in 18.73 - // them. 18.74 - 18.75 - if ((!line.startsWith("//")) && 18.76 - (!lineIsEmpty(line))) { 18.77 - int nameBegin = -1; 18.78 - int nameEnd = -1; 18.79 - boolean gotEquals = false; 18.80 - int contentsBegin = -1; 18.81 - int contentsEnd = -1; 18.82 - 18.83 - int i = 0; 18.84 - // Scan forward for beginning of name 18.85 - while (i < line.length()) { 18.86 - if (!Character.isWhitespace(line.charAt(i))) { 18.87 - break; 18.88 - } 18.89 - i++; 18.90 - } 18.91 - nameBegin = i; 18.92 - 18.93 - // Scan forward for end of name 18.94 - while (i < line.length()) { 18.95 - if (Character.isWhitespace(line.charAt(i))) { 18.96 - break; 18.97 - } 18.98 - i++; 18.99 - } 18.100 - nameEnd = i; 18.101 - 18.102 - // Scan forward for equals sign 18.103 - while (i < line.length()) { 18.104 - if (line.charAt(i) == '=') { 18.105 - gotEquals = true; 18.106 - break; 18.107 - } 18.108 - i++; 18.109 - } 18.110 - 18.111 - // Scan forward for start of contents 18.112 - i++; 18.113 - while (i < line.length()) { 18.114 - if (!Character.isWhitespace(line.charAt(i))) { 18.115 - break; 18.116 - } 18.117 - i++; 18.118 - } 18.119 - contentsBegin = i; 18.120 - 18.121 - // Scan *backward* for end of contents 18.122 - i = line.length() - 1; 18.123 - while (i >= 0) { 18.124 - if (!Character.isWhitespace(line.charAt(i))) { 18.125 - break; 18.126 - } 18.127 - } 18.128 - contentsEnd = i+1; 18.129 - 18.130 - // Now do consistency check 18.131 - if (!((nameBegin < nameEnd) && 18.132 - (nameEnd < contentsBegin) && 18.133 - (contentsBegin < contentsEnd) && 18.134 - (gotEquals == true))) { 18.135 - throw new FileFormatException( 18.136 - "Expected \"macroname = value\", " + 18.137 - "but found: " + line 18.138 - ); 18.139 - } 18.140 - 18.141 - String name = line.substring(nameBegin, nameEnd); 18.142 - String contents = line.substring(contentsBegin, 18.143 - contentsEnd); 18.144 - addMacro(name, contents); 18.145 - } 18.146 - } 18.147 - } while (line != null); 18.148 - reader.close(); 18.149 - } 18.150 - 18.151 - /** This returns an Iterator of Macros. You should not mutate the 18.152 - returned Macro objects or use the Iterator to remove 18.153 - macros. */ 18.154 - public Iterator getMacros() { 18.155 - return macros.iterator(); 18.156 - } 18.157 -}
19.1 --- a/src/share/tools/ProjectCreator/Util.java Tue Feb 22 15:26:36 2011 -0800 19.2 +++ b/src/share/tools/ProjectCreator/Util.java Wed Feb 23 11:18:16 2011 -0800 19.3 @@ -1,5 +1,5 @@ 19.4 /* 19.5 - * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. 19.6 + * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved. 19.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 19.8 * 19.9 * This code is free software; you can redistribute it and/or modify it 19.10 @@ -47,7 +47,7 @@ 19.11 return sb.toString(); 19.12 } 19.13 19.14 - static String join(String padder, String v[]) { 19.15 + static String join(String padder, String v[]) { 19.16 StringBuffer sb = new StringBuffer(); 19.17 19.18 for (int i=0; i<v.length; i++) { 19.19 @@ -80,9 +80,16 @@ 19.20 19.21 19.22 static String normalize(String file) { 19.23 - return file.replace('\\', '/'); 19.24 + file = file.replace('\\', '/'); 19.25 + if (file.length() > 2) { 19.26 + if (file.charAt(1) == ':' && file.charAt(2) == '/') { 19.27 + // convert drive letter to uppercase 19.28 + String drive = file.substring(0, 1).toUpperCase(); 19.29 + return drive + file.substring(1); 19.30 + } 19.31 + } 19.32 + return file; 19.33 } 19.34 19.35 static String sep = File.separator; 19.36 - static String os = "Win32"; //System.getProperty("os.name"); 19.37 }
20.1 --- a/src/share/tools/ProjectCreator/WinGammaPlatform.java Tue Feb 22 15:26:36 2011 -0800 20.2 +++ b/src/share/tools/ProjectCreator/WinGammaPlatform.java Wed Feb 23 11:18:16 2011 -0800 20.3 @@ -1,5 +1,5 @@ 20.4 /* 20.5 - * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. 20.6 + * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved. 20.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 20.8 * 20.9 * This code is free software; you can redistribute it and/or modify it 20.10 @@ -235,13 +235,6 @@ 20.11 (locationsInTree.size() == 0)) { 20.12 filesNotFound.add(fileName); 20.13 } else if (locationsInTree.size() > 1) { 20.14 - // We shouldn't have duplicate file names in our workspace. 20.15 - System.err.println(); 20.16 - System.err.println("There are multiple files named as: " + fileName); 20.17 - System.exit(-1); 20.18 - // The following code could be safely removed if we don't need duplicate 20.19 - // file names. 20.20 - 20.21 // Iterate through them, trying to find one with a 20.22 // preferred path 20.23 search: 20.24 @@ -336,7 +329,7 @@ 20.25 20.26 String projectName = getProjectName(projectFileName, ext); 20.27 20.28 - writeProjectFile(projectFileName, projectName, createAllConfigs()); 20.29 + writeProjectFile(projectFileName, projectName, createAllConfigs(BuildConfig.getFieldString(null, "PlatformName"))); 20.30 } 20.31 20.32 protected void writePrologue(String[] args) { 20.33 @@ -376,7 +369,13 @@ 20.34 HsArgHandler.STRING 20.35 ), 20.36 20.37 - new HsArgRule("-projectFileName", 20.38 + new HsArgRule("-platformName", 20.39 + "PlatformName", 20.40 + null, 20.41 + HsArgHandler.STRING 20.42 + ), 20.43 + 20.44 + new HsArgRule("-projectFileName", 20.45 "ProjectFileName", 20.46 null, 20.47 HsArgHandler.STRING 20.48 @@ -394,12 +393,6 @@ 20.49 HsArgHandler.STRING 20.50 ), 20.51 20.52 - new HsArgRule("-platform", 20.53 - "Platform", 20.54 - null, 20.55 - HsArgHandler.STRING 20.56 - ), 20.57 - 20.58 new HsArgRule("-absoluteInclude", 20.59 "AbsoluteInclude", 20.60 null, 20.61 @@ -590,28 +583,27 @@ 20.62 BuildConfig.putField(null, "PlatformObject", this); 20.63 } 20.64 20.65 - Vector createAllConfigs() { 20.66 + Vector createAllConfigs(String platform) { 20.67 Vector allConfigs = new Vector(); 20.68 20.69 allConfigs.add(new C1DebugConfig()); 20.70 20.71 - boolean b = true; 20.72 - if (b) { 20.73 - allConfigs.add(new C1FastDebugConfig()); 20.74 - allConfigs.add(new C1ProductConfig()); 20.75 + allConfigs.add(new C1FastDebugConfig()); 20.76 + allConfigs.add(new C1ProductConfig()); 20.77 20.78 - allConfigs.add(new C2DebugConfig()); 20.79 - allConfigs.add(new C2FastDebugConfig()); 20.80 - allConfigs.add(new C2ProductConfig()); 20.81 + allConfigs.add(new C2DebugConfig()); 20.82 + allConfigs.add(new C2FastDebugConfig()); 20.83 + allConfigs.add(new C2ProductConfig()); 20.84 20.85 - allConfigs.add(new TieredDebugConfig()); 20.86 - allConfigs.add(new TieredFastDebugConfig()); 20.87 - allConfigs.add(new TieredProductConfig()); 20.88 + allConfigs.add(new TieredDebugConfig()); 20.89 + allConfigs.add(new TieredFastDebugConfig()); 20.90 + allConfigs.add(new TieredProductConfig()); 20.91 20.92 - allConfigs.add(new CoreDebugConfig()); 20.93 - allConfigs.add(new CoreFastDebugConfig()); 20.94 - allConfigs.add(new CoreProductConfig()); 20.95 + allConfigs.add(new CoreDebugConfig()); 20.96 + allConfigs.add(new CoreFastDebugConfig()); 20.97 + allConfigs.add(new CoreProductConfig()); 20.98 20.99 + if (platform.equals("Win32")) { 20.100 allConfigs.add(new KernelDebugConfig()); 20.101 allConfigs.add(new KernelFastDebugConfig()); 20.102 allConfigs.add(new KernelProductConfig());
21.1 --- a/src/share/tools/ProjectCreator/WinGammaPlatformVC6.java Tue Feb 22 15:26:36 2011 -0800 21.2 +++ b/src/share/tools/ProjectCreator/WinGammaPlatformVC6.java Wed Feb 23 11:18:16 2011 -0800 21.3 @@ -1,5 +1,5 @@ 21.4 /* 21.5 - * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. 21.6 + * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved. 21.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 21.8 * 21.9 * This code is free software; you can redistribute it and/or modify it 21.10 @@ -223,7 +223,7 @@ 21.11 return rv; 21.12 } 21.13 21.14 - Vector getBaseLinkerFlags(String outDir, String outDll) { 21.15 + Vector getBaseLinkerFlags(String outDir, String outDll, String platformName) { 21.16 Vector rv = new Vector(); 21.17 21.18 rv.add("PROP Ignore_Export_Lib 0"); 21.19 @@ -231,8 +231,12 @@ 21.20 rv.add("ADD CPP /MD"); 21.21 rv.add("ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib " + 21.22 " advapi32.lib shell32.lib ole32.lib oleaut32.lib winmm.lib"); 21.23 + String machine = "/machine:I386"; 21.24 + if (platformName.equals("x64")) { 21.25 + machine = "/machine:X64"; 21.26 + } 21.27 rv.add("ADD LINK32 /out:\""+outDll+"\" "+ 21.28 - " /nologo /subsystem:windows /machine:I386" + 21.29 + " /nologo /subsystem:windows /machine:" + machine + 21.30 " /nologo /base:\"0x8000000\" /subsystem:windows /dll" + 21.31 " /export:JNI_GetDefaultJavaVMInitArgs /export:JNI_CreateJavaVM /export:JNI_GetCreatedJavaVMs "+ 21.32 " /export:jio_snprintf /export:jio_printf /export:jio_fprintf /export:jio_vfprintf "+ 21.33 @@ -287,7 +291,7 @@ 21.34 return "d"; 21.35 } 21.36 21.37 - String makeCfgName(String flavourBuild) { 21.38 - return "vm - "+ Util.os + " " + flavourBuild; 21.39 + String makeCfgName(String flavourBuild, String platform) { 21.40 + return "vm - "+ platform + " " + flavourBuild; 21.41 } 21.42 }
22.1 --- a/src/share/tools/ProjectCreator/WinGammaPlatformVC7.java Tue Feb 22 15:26:36 2011 -0800 22.2 +++ b/src/share/tools/ProjectCreator/WinGammaPlatformVC7.java Wed Feb 23 11:18:16 2011 -0800 22.3 @@ -1,5 +1,5 @@ 22.4 /* 22.5 - * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. 22.6 + * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved. 22.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 22.8 * 22.9 * This code is free software; you can redistribute it and/or modify it 22.10 @@ -37,7 +37,7 @@ 22.11 public void writeProjectFile(String projectFileName, String projectName, 22.12 Vector allConfigs) throws IOException { 22.13 System.out.println(); 22.14 - System.out.println(" Writing .vcproj file..."); 22.15 + System.out.println(" Writing .vcproj file: "+projectFileName); 22.16 // If we got this far without an error, we're safe to actually 22.17 // write the .vcproj file 22.18 printWriter = new PrintWriter(new FileWriter(projectFileName)); 22.19 @@ -54,9 +54,8 @@ 22.20 "SccLocalPath", "" 22.21 } 22.22 ); 22.23 - 22.24 startTag("Platforms", null); 22.25 - tag("Platform", new String[] {"Name", Util.os}); 22.26 + tag("Platform", new String[] {"Name", (String) BuildConfig.getField(null, "PlatformName")}); 22.27 endTag("Platforms"); 22.28 22.29 startTag("Configurations", null); 22.30 @@ -81,12 +80,47 @@ 22.31 22.32 22.33 abstract class NameFilter { 22.34 - protected String fname; 22.35 + protected String fname; 22.36 22.37 abstract boolean match(FileInfo fi); 22.38 22.39 String filterString() { return ""; } 22.40 String name() { return this.fname;} 22.41 + 22.42 + @Override 22.43 + // eclipse auto-generated 22.44 + public int hashCode() { 22.45 + final int prime = 31; 22.46 + int result = 1; 22.47 + result = prime * result + getOuterType().hashCode(); 22.48 + result = prime * result + ((fname == null) ? 0 : fname.hashCode()); 22.49 + return result; 22.50 + } 22.51 + 22.52 + @Override 22.53 + // eclipse auto-generated 22.54 + public boolean equals(Object obj) { 22.55 + if (this == obj) 22.56 + return true; 22.57 + if (obj == null) 22.58 + return false; 22.59 + if (getClass() != obj.getClass()) 22.60 + return false; 22.61 + NameFilter other = (NameFilter) obj; 22.62 + if (!getOuterType().equals(other.getOuterType())) 22.63 + return false; 22.64 + if (fname == null) { 22.65 + if (other.fname != null) 22.66 + return false; 22.67 + } else if (!fname.equals(other.fname)) 22.68 + return false; 22.69 + return true; 22.70 + } 22.71 + 22.72 + // eclipse auto-generated 22.73 + private WinGammaPlatformVC7 getOuterType() { 22.74 + return WinGammaPlatformVC7.this; 22.75 + } 22.76 } 22.77 22.78 class DirectoryFilter extends NameFilter { 22.79 @@ -109,9 +143,50 @@ 22.80 22.81 22.82 boolean match(FileInfo fi) { 22.83 - int lastSlashIndex = fi.full.lastIndexOf('/'); 22.84 - String fullDir = fi.full.substring(0, lastSlashIndex); 22.85 - return fullDir.endsWith(dir); 22.86 + int lastSlashIndex = fi.full.lastIndexOf('/'); 22.87 + String fullDir = fi.full.substring(0, lastSlashIndex); 22.88 + return fullDir.endsWith(dir); 22.89 + } 22.90 + 22.91 + @Override 22.92 + // eclipse auto-generated 22.93 + public int hashCode() { 22.94 + final int prime = 31; 22.95 + int result = super.hashCode(); 22.96 + result = prime * result + getOuterType().hashCode(); 22.97 + result = prime * result + baseLen; 22.98 + result = prime * result + ((dir == null) ? 0 : dir.hashCode()); 22.99 + result = prime * result + dirLen; 22.100 + return result; 22.101 + } 22.102 + 22.103 + @Override 22.104 + // eclipse auto-generated 22.105 + public boolean equals(Object obj) { 22.106 + if (this == obj) 22.107 + return true; 22.108 + if (!super.equals(obj)) 22.109 + return false; 22.110 + if (getClass() != obj.getClass()) 22.111 + return false; 22.112 + DirectoryFilter other = (DirectoryFilter) obj; 22.113 + if (!getOuterType().equals(other.getOuterType())) 22.114 + return false; 22.115 + if (baseLen != other.baseLen) 22.116 + return false; 22.117 + if (dir == null) { 22.118 + if (other.dir != null) 22.119 + return false; 22.120 + } else if (!dir.equals(other.dir)) 22.121 + return false; 22.122 + if (dirLen != other.dirLen) 22.123 + return false; 22.124 + return true; 22.125 + } 22.126 + 22.127 + // eclipse auto-generated 22.128 + private WinGammaPlatformVC7 getOuterType() { 22.129 + return WinGammaPlatformVC7.this; 22.130 } 22.131 } 22.132 22.133 @@ -232,32 +307,39 @@ 22.134 DirectoryFilter container = null; 22.135 for(FileInfo fileInfo : files) { 22.136 22.137 - if (!fileInfo.full.startsWith(sbase)) { 22.138 - continue; 22.139 - } 22.140 + if (!fileInfo.full.startsWith(sbase)) { 22.141 + continue; 22.142 + } 22.143 22.144 - int lastSlash = fileInfo.full.lastIndexOf('/'); 22.145 - String dir = fileInfo.full.substring(sbase.length(), lastSlash); 22.146 - if(dir.equals("share/vm")) { 22.147 - // skip files directly in share/vm - should only be precompiled.hpp which is handled below 22.148 - continue; 22.149 - } 22.150 - if (!dir.equals(currentDir)) { 22.151 - currentDir = dir; 22.152 - if (container != null) { 22.153 - rv.add(container); 22.154 - } 22.155 + int lastSlash = fileInfo.full.lastIndexOf('/'); 22.156 + String dir = fileInfo.full.substring(sbase.length(), lastSlash); 22.157 + if(dir.equals("share/vm")) { 22.158 + // skip files directly in share/vm - should only be precompiled.hpp which is handled below 22.159 + continue; 22.160 + } 22.161 + if (!dir.equals(currentDir)) { 22.162 + currentDir = dir; 22.163 + if (container != null && !rv.contains(container)) { 22.164 + rv.add(container); 22.165 + } 22.166 22.167 - // remove "share/vm/" from names 22.168 - String name = dir; 22.169 - if (dir.startsWith("share/vm/")) { 22.170 - name = dir.substring("share/vm/".length(), dir.length()); 22.171 - } 22.172 - container = new DirectoryFilter(name, dir, sbase); 22.173 - } 22.174 + // remove "share/vm/" from names 22.175 + String name = dir; 22.176 + if (dir.startsWith("share/vm/")) { 22.177 + name = dir.substring("share/vm/".length(), dir.length()); 22.178 + } 22.179 + DirectoryFilter newfilter = new DirectoryFilter(name, dir, sbase); 22.180 + int i = rv.indexOf(newfilter); 22.181 + if(i == -1) { 22.182 + container = newfilter; 22.183 + } else { 22.184 + // if the filter already exists, reuse it 22.185 + container = (DirectoryFilter) rv.get(i); 22.186 + } 22.187 + } 22.188 } 22.189 - if (container != null) { 22.190 - rv.add(container); 22.191 + if (container != null && !rv.contains(container)) { 22.192 + rv.add(container); 22.193 } 22.194 22.195 ContainerFilter generated = new ContainerFilter("Generated"); 22.196 @@ -583,7 +665,7 @@ 22.197 return rv; 22.198 } 22.199 22.200 - Vector getBaseLinkerFlags(String outDir, String outDll) { 22.201 + Vector getBaseLinkerFlags(String outDir, String outDll, String platformName) { 22.202 Vector rv = new Vector(); 22.203 22.204 addAttr(rv, "Name", "VCLinkerTool"); 22.205 @@ -610,8 +692,13 @@ 22.206 addAttr(rv, "SubSystem", "2"); 22.207 addAttr(rv, "BaseAddress", "0x8000000"); 22.208 addAttr(rv, "ImportLibrary", outDir+Util.sep+"jvm.lib"); 22.209 - // Set /MACHINE option. 1 is machineX86 22.210 - addAttr(rv, "TargetMachine", "1"); 22.211 + if(platformName.equals("Win32")) { 22.212 + // Set /MACHINE option. 1 is X86 22.213 + addAttr(rv, "TargetMachine", "1"); 22.214 + } else { 22.215 + // Set /MACHINE option. 17 is X64 22.216 + addAttr(rv, "TargetMachine", "17"); 22.217 + } 22.218 22.219 return rv; 22.220 } 22.221 @@ -656,12 +743,6 @@ 22.222 addAttr(rv, "Optimization", "2"); 22.223 // Set /Oy- option 22.224 addAttr(rv, "OmitFramePointers", "FALSE"); 22.225 - } 22.226 - 22.227 - Vector getProductCompilerFlags() { 22.228 - Vector rv = new Vector(); 22.229 - 22.230 - getProductCompilerFlags_common(rv); 22.231 // Set /Ob option. 1 is expandOnlyInline 22.232 addAttr(rv, "InlineFunctionExpansion", "1"); 22.233 // Set /GF option. 22.234 @@ -670,6 +751,12 @@ 22.235 addAttr(rv, "RuntimeLibrary", "2"); 22.236 // Set /Gy option 22.237 addAttr(rv, "EnableFunctionLevelLinking", "TRUE"); 22.238 + } 22.239 + 22.240 + Vector getProductCompilerFlags() { 22.241 + Vector rv = new Vector(); 22.242 + 22.243 + getProductCompilerFlags_common(rv); 22.244 22.245 return rv; 22.246 } 22.247 @@ -693,7 +780,7 @@ 22.248 return "0"; 22.249 } 22.250 22.251 - String makeCfgName(String flavourBuild) { 22.252 - return flavourBuild + "|" + Util.os; 22.253 + String makeCfgName(String flavourBuild, String platform) { 22.254 + return flavourBuild + "|" + platform; 22.255 } 22.256 }
23.1 --- a/src/share/vm/adlc/adlc.hpp Tue Feb 22 15:26:36 2011 -0800 23.2 +++ b/src/share/vm/adlc/adlc.hpp Wed Feb 23 11:18:16 2011 -0800 23.3 @@ -1,5 +1,5 @@ 23.4 /* 23.5 - * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved. 23.6 + * Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved. 23.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 23.8 * 23.9 * This code is free software; you can redistribute it and/or modify it 23.10 @@ -42,11 +42,6 @@ 23.11 using namespace std; 23.12 #endif 23.13 23.14 -// make sure the MSC_VER and _MSC_VER settings make sense 23.15 -#if _MSC_VER != MSC_VER && (_MSC_VER != 1400 || MSC_VER != 1399) 23.16 -#error "Something is wrong with the detection of MSC_VER in the makefiles" 23.17 -#endif 23.18 - 23.19 #if _MSC_VER >= 1400 23.20 #define strdup _strdup 23.21 #endif
24.1 --- a/src/share/vm/classfile/classFileParser.cpp Tue Feb 22 15:26:36 2011 -0800 24.2 +++ b/src/share/vm/classfile/classFileParser.cpp Wed Feb 23 11:18:16 2011 -0800 24.3 @@ -331,7 +331,7 @@ 24.4 length, CHECK_(nullHandle)); 24.5 constantPoolOop constant_pool = 24.6 oopFactory::new_constantPool(length, 24.7 - methodOopDesc::IsSafeConc, 24.8 + oopDesc::IsSafeConc, 24.9 CHECK_(nullHandle)); 24.10 constantPoolHandle cp (THREAD, constant_pool); 24.11 24.12 @@ -1929,10 +1929,9 @@ 24.13 } 24.14 24.15 // All sizing information for a methodOop is finally available, now create it 24.16 - methodOop m_oop = oopFactory::new_method( 24.17 - code_length, access_flags, linenumber_table_length, 24.18 - total_lvt_length, checked_exceptions_length, 24.19 - methodOopDesc::IsSafeConc, CHECK_(nullHandle)); 24.20 + methodOop m_oop = oopFactory::new_method(code_length, access_flags, linenumber_table_length, 24.21 + total_lvt_length, checked_exceptions_length, 24.22 + oopDesc::IsSafeConc, CHECK_(nullHandle)); 24.23 methodHandle m (THREAD, m_oop); 24.24 24.25 ClassLoadingService::add_class_method_size(m_oop->size()*HeapWordSize);
25.1 --- a/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp Tue Feb 22 15:26:36 2011 -0800 25.2 +++ b/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp Wed Feb 23 11:18:16 2011 -0800 25.3 @@ -1040,9 +1040,10 @@ 25.4 } else { 25.5 // must read from what 'p' points to in each loop. 25.6 klassOop k = ((volatile oopDesc*)p)->klass_or_null(); 25.7 - if (k != NULL && 25.8 - ((oopDesc*)p)->is_parsable() && 25.9 - ((oopDesc*)p)->is_conc_safe()) { 25.10 + // We trust the size of any object that has a non-NULL 25.11 + // klass and (for those in the perm gen) is parsable 25.12 + // -- irrespective of its conc_safe-ty. 25.13 + if (k != NULL && ((oopDesc*)p)->is_parsable()) { 25.14 assert(k->is_oop(), "Should really be klass oop."); 25.15 oop o = (oop)p; 25.16 assert(o->is_oop(), "Should be an oop"); 25.17 @@ -1051,6 +1052,7 @@ 25.18 assert(res != 0, "Block size should not be 0"); 25.19 return res; 25.20 } else { 25.21 + // May return 0 if P-bits not present. 25.22 return c->block_size_if_printezis_bits(p); 25.23 } 25.24 }
26.1 --- a/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp Tue Feb 22 15:26:36 2011 -0800 26.2 +++ b/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp Wed Feb 23 11:18:16 2011 -0800 26.3 @@ -6360,18 +6360,16 @@ 26.4 // A variant of the above (block_size_using_printezis_bits()) except 26.5 // that we return 0 if the P-bits are not yet set. 26.6 size_t CMSCollector::block_size_if_printezis_bits(HeapWord* addr) const { 26.7 - if (_markBitMap.isMarked(addr)) { 26.8 - assert(_markBitMap.isMarked(addr + 1), "Missing Printezis bit?"); 26.9 + if (_markBitMap.isMarked(addr + 1)) { 26.10 + assert(_markBitMap.isMarked(addr), "P-bit can be set only for marked objects"); 26.11 HeapWord* nextOneAddr = _markBitMap.getNextMarkedWordAddress(addr + 2); 26.12 size_t size = pointer_delta(nextOneAddr + 1, addr); 26.13 assert(size == CompactibleFreeListSpace::adjustObjectSize(size), 26.14 "alignment problem"); 26.15 assert(size >= 3, "Necessary for Printezis marks to work"); 26.16 return size; 26.17 - } else { 26.18 - assert(!_markBitMap.isMarked(addr + 1), "Bit map inconsistency?"); 26.19 - return 0; 26.20 - } 26.21 + } 26.22 + return 0; 26.23 } 26.24 26.25 HeapWord* CMSCollector::next_card_start_after_block(HeapWord* addr) const { 26.26 @@ -9212,7 +9210,6 @@ 26.27 26.28 size_t MarkDeadObjectsClosure::do_blk(HeapWord* addr) { 26.29 size_t res = _sp->block_size_no_stall(addr, _collector); 26.30 - assert(res != 0, "Should always be able to compute a size"); 26.31 if (_sp->block_is_obj(addr)) { 26.32 if (_live_bit_map->isMarked(addr)) { 26.33 // It can't have been dead in a previous cycle 26.34 @@ -9221,6 +9218,7 @@ 26.35 _dead_bit_map->mark(addr); // mark the dead object 26.36 } 26.37 } 26.38 + // Could be 0, if the block size could not be computed without stalling. 26.39 return res; 26.40 } 26.41
27.1 --- a/src/share/vm/gc_implementation/concurrentMarkSweep/vmCMSOperations.hpp Tue Feb 22 15:26:36 2011 -0800 27.2 +++ b/src/share/vm/gc_implementation/concurrentMarkSweep/vmCMSOperations.hpp Wed Feb 23 11:18:16 2011 -0800 27.3 @@ -1,5 +1,5 @@ 27.4 /* 27.5 - * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. 27.6 + * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved. 27.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 27.8 * 27.9 * This code is free software; you can redistribute it and/or modify it 27.10 @@ -132,8 +132,7 @@ 27.11 VM_GenCollectFullConcurrent(unsigned int gc_count_before, 27.12 unsigned int full_gc_count_before, 27.13 GCCause::Cause gc_cause) 27.14 - : VM_GC_Operation(gc_count_before, full_gc_count_before, true /* full */) { 27.15 - _gc_cause = gc_cause; 27.16 + : VM_GC_Operation(gc_count_before, gc_cause, full_gc_count_before, true /* full */) { 27.17 assert(FullGCCount_lock != NULL, "Error"); 27.18 assert(UseAsyncConcMarkSweepGC, "Else will hang caller"); 27.19 }
28.1 --- a/src/share/vm/gc_implementation/g1/vm_operations_g1.hpp Tue Feb 22 15:26:36 2011 -0800 28.2 +++ b/src/share/vm/gc_implementation/g1/vm_operations_g1.hpp Wed Feb 23 11:18:16 2011 -0800 28.3 @@ -1,5 +1,5 @@ 28.4 /* 28.5 - * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved. 28.6 + * Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved. 28.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 28.8 * 28.9 * This code is free software; you can redistribute it and/or modify it 28.10 @@ -44,7 +44,7 @@ 28.11 public: 28.12 VM_G1OperationWithAllocRequest(unsigned int gc_count_before, 28.13 size_t word_size) 28.14 - : VM_GC_Operation(gc_count_before), 28.15 + : VM_GC_Operation(gc_count_before, GCCause::_allocation_failure), 28.16 _word_size(word_size), _result(NULL), _pause_succeeded(false) { } 28.17 HeapWord* result() { return _result; } 28.18 bool pause_succeeded() { return _pause_succeeded; } 28.19 @@ -55,9 +55,7 @@ 28.20 VM_G1CollectFull(unsigned int gc_count_before, 28.21 unsigned int full_gc_count_before, 28.22 GCCause::Cause cause) 28.23 - : VM_GC_Operation(gc_count_before, full_gc_count_before) { 28.24 - _gc_cause = cause; 28.25 - } 28.26 + : VM_GC_Operation(gc_count_before, cause, full_gc_count_before) { } 28.27 virtual VMOp_Type type() const { return VMOp_G1CollectFull; } 28.28 virtual void doit(); 28.29 virtual const char* name() const {
29.1 --- a/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.hpp Tue Feb 22 15:26:36 2011 -0800 29.2 +++ b/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.hpp Wed Feb 23 11:18:16 2011 -0800 29.3 @@ -1,5 +1,5 @@ 29.4 /* 29.5 - * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. 29.6 + * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved. 29.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 29.8 * 29.9 * This code is free software; you can redistribute it and/or modify it 29.10 @@ -1196,11 +1196,6 @@ 29.11 static inline void adjust_pointer(oop* p) { adjust_pointer(p, false); } 29.12 static inline void adjust_pointer(narrowOop* p) { adjust_pointer(p, false); } 29.13 29.14 - template <class T> 29.15 - static inline void adjust_pointer(T* p, 29.16 - HeapWord* beg_addr, 29.17 - HeapWord* end_addr); 29.18 - 29.19 // Reference Processing 29.20 static ReferenceProcessor* const ref_processor() { return _ref_processor; } 29.21 29.22 @@ -1408,15 +1403,6 @@ 29.23 return ((HeapWord*) k) >= dense_prefix(perm_space_id); 29.24 } 29.25 29.26 -template <class T> 29.27 -inline void PSParallelCompact::adjust_pointer(T* p, 29.28 - HeapWord* beg_addr, 29.29 - HeapWord* end_addr) { 29.30 - if (is_in((HeapWord*)p, beg_addr, end_addr)) { 29.31 - adjust_pointer(p); 29.32 - } 29.33 -} 29.34 - 29.35 #ifdef ASSERT 29.36 inline void 29.37 PSParallelCompact::check_new_location(HeapWord* old_addr, HeapWord* new_addr)
30.1 --- a/src/share/vm/gc_implementation/parallelScavenge/vmPSOperations.cpp Tue Feb 22 15:26:36 2011 -0800 30.2 +++ b/src/share/vm/gc_implementation/parallelScavenge/vmPSOperations.cpp Wed Feb 23 11:18:16 2011 -0800 30.3 @@ -1,5 +1,5 @@ 30.4 /* 30.5 - * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. 30.6 + * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. 30.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 30.8 * 30.9 * This code is free software; you can redistribute it and/or modify it 30.10 @@ -34,7 +34,7 @@ 30.11 // The following methods are used by the parallel scavenge collector 30.12 VM_ParallelGCFailedAllocation::VM_ParallelGCFailedAllocation(size_t size, 30.13 bool is_tlab, unsigned int gc_count) : 30.14 - VM_GC_Operation(gc_count), 30.15 + VM_GC_Operation(gc_count, GCCause::_allocation_failure), 30.16 _size(size), 30.17 _is_tlab(is_tlab), 30.18 _result(NULL) 30.19 @@ -57,7 +57,7 @@ 30.20 30.21 VM_ParallelGCFailedPermanentAllocation::VM_ParallelGCFailedPermanentAllocation(size_t size, 30.22 unsigned int gc_count, unsigned int full_gc_count) : 30.23 - VM_GC_Operation(gc_count, full_gc_count, true /* full */), 30.24 + VM_GC_Operation(gc_count, GCCause::_allocation_failure, full_gc_count, true /* full */), 30.25 _size(size), 30.26 _result(NULL) 30.27 { 30.28 @@ -80,9 +80,8 @@ 30.29 VM_ParallelGCSystemGC::VM_ParallelGCSystemGC(unsigned int gc_count, 30.30 unsigned int full_gc_count, 30.31 GCCause::Cause gc_cause) : 30.32 - VM_GC_Operation(gc_count, full_gc_count, true /* full */) 30.33 + VM_GC_Operation(gc_count, gc_cause, full_gc_count, true /* full */) 30.34 { 30.35 - _gc_cause = gc_cause; 30.36 } 30.37 30.38 void VM_ParallelGCSystemGC::doit() {
31.1 --- a/src/share/vm/gc_implementation/shared/vmGCOperations.cpp Tue Feb 22 15:26:36 2011 -0800 31.2 +++ b/src/share/vm/gc_implementation/shared/vmGCOperations.cpp Wed Feb 23 11:18:16 2011 -0800 31.3 @@ -1,5 +1,5 @@ 31.4 /* 31.5 - * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. 31.6 + * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved. 31.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 31.8 * 31.9 * This code is free software; you can redistribute it and/or modify it 31.10 @@ -87,6 +87,8 @@ 31.11 31.12 bool VM_GC_Operation::doit_prologue() { 31.13 assert(Thread::current()->is_Java_thread(), "just checking"); 31.14 + assert(((_gc_cause != GCCause::_no_gc) && 31.15 + (_gc_cause != GCCause::_no_cause_specified)), "Illegal GCCause"); 31.16 31.17 acquire_pending_list_lock(); 31.18 // If the GC count has changed someone beat us to the collection
32.1 --- a/src/share/vm/gc_implementation/shared/vmGCOperations.hpp Tue Feb 22 15:26:36 2011 -0800 32.2 +++ b/src/share/vm/gc_implementation/shared/vmGCOperations.hpp Wed Feb 23 11:18:16 2011 -0800 32.3 @@ -1,5 +1,5 @@ 32.4 /* 32.5 - * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. 32.6 + * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved. 32.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 32.8 * 32.9 * This code is free software; you can redistribute it and/or modify it 32.10 @@ -85,6 +85,7 @@ 32.11 32.12 public: 32.13 VM_GC_Operation(unsigned int gc_count_before, 32.14 + GCCause::Cause _cause, 32.15 unsigned int full_gc_count_before = 0, 32.16 bool full = false) { 32.17 _full = full; 32.18 @@ -92,7 +93,7 @@ 32.19 _gc_count_before = gc_count_before; 32.20 32.21 // A subclass constructor will likely overwrite the following 32.22 - _gc_cause = GCCause::_no_cause_specified; 32.23 + _gc_cause = _cause; 32.24 32.25 _gc_locked = false; 32.26 32.27 @@ -136,6 +137,7 @@ 32.28 VM_GC_HeapInspection(outputStream* out, bool request_full_gc, 32.29 bool need_prologue) : 32.30 VM_GC_Operation(0 /* total collections, dummy, ignored */, 32.31 + GCCause::_heap_inspection /* GC Cause */, 32.32 0 /* total full collections, dummy, ignored */, 32.33 request_full_gc) { 32.34 _out = out; 32.35 @@ -160,7 +162,7 @@ 32.36 VM_GenCollectForAllocation(size_t size, 32.37 bool tlab, 32.38 unsigned int gc_count_before) 32.39 - : VM_GC_Operation(gc_count_before), 32.40 + : VM_GC_Operation(gc_count_before, GCCause::_allocation_failure), 32.41 _size(size), 32.42 _tlab(tlab) { 32.43 _res = NULL; 32.44 @@ -182,9 +184,8 @@ 32.45 unsigned int full_gc_count_before, 32.46 GCCause::Cause gc_cause, 32.47 int max_level) 32.48 - : VM_GC_Operation(gc_count_before, full_gc_count_before, true /* full */), 32.49 - _max_level(max_level) 32.50 - { _gc_cause = gc_cause; } 32.51 + : VM_GC_Operation(gc_count_before, gc_cause, full_gc_count_before, true /* full */), 32.52 + _max_level(max_level) { } 32.53 ~VM_GenCollectFull() {} 32.54 virtual VMOp_Type type() const { return VMOp_GenCollectFull; } 32.55 virtual void doit(); 32.56 @@ -199,7 +200,7 @@ 32.57 unsigned int gc_count_before, 32.58 unsigned int full_gc_count_before, 32.59 GCCause::Cause gc_cause) 32.60 - : VM_GC_Operation(gc_count_before, full_gc_count_before, true), 32.61 + : VM_GC_Operation(gc_count_before, gc_cause, full_gc_count_before, true), 32.62 _size(size) { 32.63 _res = NULL; 32.64 _gc_cause = gc_cause;
33.1 --- a/src/share/vm/gc_interface/collectedHeap.cpp Tue Feb 22 15:26:36 2011 -0800 33.2 +++ b/src/share/vm/gc_interface/collectedHeap.cpp Wed Feb 23 11:18:16 2011 -0800 33.3 @@ -100,8 +100,7 @@ 33.4 } 33.5 } 33.6 33.7 -void CollectedHeap::check_for_non_bad_heap_word_value(HeapWord* addr, size_t size) 33.8 - { 33.9 +void CollectedHeap::check_for_non_bad_heap_word_value(HeapWord* addr, size_t size) { 33.10 if (CheckMemoryInitialization && ZapUnusedHeapArea) { 33.11 for (size_t slot = 0; slot < size; slot += 1) { 33.12 assert((*(intptr_t*) (addr + slot)) == ((intptr_t) badHeapWordVal),
34.1 --- a/src/share/vm/gc_interface/gcCause.cpp Tue Feb 22 15:26:36 2011 -0800 34.2 +++ b/src/share/vm/gc_interface/gcCause.cpp Wed Feb 23 11:18:16 2011 -0800 34.3 @@ -1,5 +1,5 @@ 34.4 /* 34.5 - * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. 34.6 + * Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved. 34.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 34.8 * 34.9 * This code is free software; you can redistribute it and/or modify it 34.10 @@ -92,28 +92,3 @@ 34.11 } 34.12 ShouldNotReachHere(); 34.13 } 34.14 - 34.15 -#ifndef PRODUCT 34.16 - 34.17 -bool GCCause::is_for_full_collection(GCCause::Cause cause) { 34.18 - bool result; 34.19 - 34.20 - // There are more GCCause::Cause types than listed here. 34.21 - // For brevity, we list only those that cause full collections. 34.22 - switch (cause) { 34.23 - case _allocation_failure: 34.24 - case _tenured_generation_full: 34.25 - case _permanent_generation_full: 34.26 - case _cms_generation_full: 34.27 - case _last_ditch_collection: 34.28 - result = true; 34.29 - break; 34.30 - 34.31 - default: 34.32 - result = false; 34.33 - break; 34.34 - } 34.35 - return result; 34.36 -} 34.37 - 34.38 -#endif // PRODUCT
35.1 --- a/src/share/vm/gc_interface/gcCause.hpp Tue Feb 22 15:26:36 2011 -0800 35.2 +++ b/src/share/vm/gc_interface/gcCause.hpp Wed Feb 23 11:18:16 2011 -0800 35.3 @@ -1,5 +1,5 @@ 35.4 /* 35.5 - * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. 35.6 + * Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved. 35.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 35.8 * 35.9 * This code is free software; you can redistribute it and/or modify it 35.10 @@ -85,8 +85,6 @@ 35.11 35.12 // Return a string describing the GCCause. 35.13 static const char* to_string(GCCause::Cause cause); 35.14 - // Return true if the GCCause is for a full collection. 35.15 - static bool is_for_full_collection(GCCause::Cause cause) PRODUCT_RETURN0; 35.16 }; 35.17 35.18 #endif // SHARE_VM_GC_INTERFACE_GCCAUSE_HPP
36.1 --- a/src/share/vm/interpreter/rewriter.cpp Tue Feb 22 15:26:36 2011 -0800 36.2 +++ b/src/share/vm/interpreter/rewriter.cpp Wed Feb 23 11:18:16 2011 -0800 36.3 @@ -67,13 +67,11 @@ 36.4 36.5 36.6 // Creates a constant pool cache given a CPC map 36.7 -// This creates the constant pool cache initially in a state 36.8 -// that is unsafe for concurrent GC processing but sets it to 36.9 -// a safe mode before the constant pool cache is returned. 36.10 void Rewriter::make_constant_pool_cache(TRAPS) { 36.11 const int length = _cp_cache_map.length(); 36.12 constantPoolCacheOop cache = 36.13 - oopFactory::new_constantPoolCache(length, methodOopDesc::IsUnsafeConc, CHECK); 36.14 + oopFactory::new_constantPoolCache(length, CHECK); 36.15 + No_Safepoint_Verifier nsv; 36.16 cache->initialize(_cp_cache_map); 36.17 36.18 // Don't bother with the next pass if there is no JVM_CONSTANT_InvokeDynamic.
37.1 --- a/src/share/vm/memory/oopFactory.cpp Tue Feb 22 15:26:36 2011 -0800 37.2 +++ b/src/share/vm/memory/oopFactory.cpp Wed Feb 23 11:18:16 2011 -0800 37.3 @@ -92,12 +92,21 @@ 37.4 } 37.5 } 37.6 37.7 -objArrayOop oopFactory::new_system_objArray(int length, TRAPS) { 37.8 +objArrayOop oopFactory::new_system_objArray(int length, bool in_perm_gen, TRAPS) { 37.9 int size = objArrayOopDesc::object_size(length); 37.10 KlassHandle klass (THREAD, Universe::systemObjArrayKlassObj()); 37.11 - objArrayOop o = (objArrayOop) 37.12 - Universe::heap()->permanent_array_allocate(klass, size, length, CHECK_NULL); 37.13 + oop o; 37.14 + if (in_perm_gen) { 37.15 + o = Universe::heap()->permanent_array_allocate(klass, size, length, CHECK_NULL); 37.16 + } else { 37.17 + o = Universe::heap()->array_allocate(klass, size, length, CHECK_NULL); 37.18 + } 37.19 // initialization not needed, allocated cleared 37.20 + return (objArrayOop) o; 37.21 +} 37.22 + 37.23 +objArrayOop oopFactory::new_system_objArray(int length, TRAPS) { 37.24 + objArrayOop o = oopFactory::new_system_objArray(length, true, CHECK_NULL); 37.25 return o; 37.26 } 37.27 37.28 @@ -111,10 +120,9 @@ 37.29 37.30 37.31 constantPoolCacheOop oopFactory::new_constantPoolCache(int length, 37.32 - bool is_conc_safe, 37.33 TRAPS) { 37.34 constantPoolCacheKlass* ck = constantPoolCacheKlass::cast(Universe::constantPoolCacheKlassObj()); 37.35 - return ck->allocate(length, is_conc_safe, CHECK_NULL); 37.36 + return ck->allocate(length, CHECK_NULL); 37.37 } 37.38 37.39
38.1 --- a/src/share/vm/memory/oopFactory.hpp Tue Feb 22 15:26:36 2011 -0800 38.2 +++ b/src/share/vm/memory/oopFactory.hpp Wed Feb 23 11:18:16 2011 -0800 38.3 @@ -69,7 +69,6 @@ 38.4 bool is_conc_safe, 38.5 TRAPS); 38.6 static constantPoolCacheOop new_constantPoolCache(int length, 38.7 - bool is_conc_safe, 38.8 TRAPS); 38.9 38.10 // Instance classes 38.11 @@ -103,6 +102,7 @@ 38.12 38.13 // System object arrays 38.14 static objArrayOop new_system_objArray(int length, TRAPS); 38.15 + static objArrayOop new_system_objArray(int length, bool in_perm_gen, TRAPS); 38.16 38.17 // Regular object arrays 38.18 static objArrayOop new_objArray(klassOop klass, int length, TRAPS);
39.1 --- a/src/share/vm/oops/arrayKlassKlass.cpp Tue Feb 22 15:26:36 2011 -0800 39.2 +++ b/src/share/vm/oops/arrayKlassKlass.cpp Wed Feb 23 11:18:16 2011 -0800 39.3 @@ -1,5 +1,5 @@ 39.4 /* 39.5 - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. 39.6 + * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. 39.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 39.8 * 39.9 * This code is free software; you can redistribute it and/or modify it 39.10 @@ -128,27 +128,6 @@ 39.11 } 39.12 return klassKlass::oop_update_pointers(cm, obj); 39.13 } 39.14 - 39.15 -int 39.16 -arrayKlassKlass::oop_update_pointers(ParCompactionManager* cm, oop obj, 39.17 - HeapWord* beg_addr, HeapWord* end_addr) { 39.18 - assert(obj->is_klass(), "must be klass"); 39.19 - arrayKlass* ak = arrayKlass::cast(klassOop(obj)); 39.20 - 39.21 - oop* p; 39.22 - p = ak->adr_component_mirror(); 39.23 - PSParallelCompact::adjust_pointer(p, beg_addr, end_addr); 39.24 - p = ak->adr_lower_dimension(); 39.25 - PSParallelCompact::adjust_pointer(p, beg_addr, end_addr); 39.26 - p = ak->adr_higher_dimension(); 39.27 - PSParallelCompact::adjust_pointer(p, beg_addr, end_addr); 39.28 - 39.29 - { 39.30 - HandleMark hm; 39.31 - ak->vtable()->oop_update_pointers(cm, beg_addr, end_addr); 39.32 - } 39.33 - return klassKlass::oop_update_pointers(cm, obj, beg_addr, end_addr); 39.34 -} 39.35 #endif // SERIALGC 39.36 39.37 // Printing
40.1 --- a/src/share/vm/oops/compiledICHolderKlass.cpp Tue Feb 22 15:26:36 2011 -0800 40.2 +++ b/src/share/vm/oops/compiledICHolderKlass.cpp Wed Feb 23 11:18:16 2011 -0800 40.3 @@ -1,5 +1,5 @@ 40.4 /* 40.5 - * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved. 40.6 + * Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved. 40.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 40.8 * 40.9 * This code is free software; you can redistribute it and/or modify it 40.10 @@ -145,21 +145,6 @@ 40.11 PSParallelCompact::adjust_pointer(c->adr_holder_klass()); 40.12 return c->object_size(); 40.13 } 40.14 - 40.15 -int compiledICHolderKlass::oop_update_pointers(ParCompactionManager* cm, 40.16 - oop obj, 40.17 - HeapWord* beg_addr, 40.18 - HeapWord* end_addr) { 40.19 - assert(obj->is_compiledICHolder(), "must be compiledICHolder"); 40.20 - compiledICHolderOop c = compiledICHolderOop(obj); 40.21 - 40.22 - oop* p; 40.23 - p = c->adr_holder_method(); 40.24 - PSParallelCompact::adjust_pointer(p, beg_addr, end_addr); 40.25 - p = c->adr_holder_klass(); 40.26 - PSParallelCompact::adjust_pointer(p, beg_addr, end_addr); 40.27 - return c->object_size(); 40.28 -} 40.29 #endif // SERIALGC 40.30 40.31 // Printing
41.1 --- a/src/share/vm/oops/constMethodKlass.cpp Tue Feb 22 15:26:36 2011 -0800 41.2 +++ b/src/share/vm/oops/constMethodKlass.cpp Wed Feb 23 11:18:16 2011 -0800 41.3 @@ -1,5 +1,5 @@ 41.4 /* 41.5 - * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. 41.6 + * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved. 41.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 41.8 * 41.9 * This code is free software; you can redistribute it and/or modify it 41.10 @@ -184,21 +184,6 @@ 41.11 } 41.12 return cm_oop->object_size(); 41.13 } 41.14 - 41.15 -int constMethodKlass::oop_update_pointers(ParCompactionManager* cm, oop obj, 41.16 - HeapWord* beg_addr, 41.17 - HeapWord* end_addr) { 41.18 - assert(obj->is_constMethod(), "should be constMethod"); 41.19 - constMethodOop cm_oop = constMethodOop(obj); 41.20 - 41.21 - oop* const beg_oop = MAX2((oop*)beg_addr, cm_oop->oop_block_beg()); 41.22 - oop* const end_oop = MIN2((oop*)end_addr, cm_oop->oop_block_end()); 41.23 - for (oop* cur_oop = beg_oop; cur_oop < end_oop; ++cur_oop) { 41.24 - PSParallelCompact::adjust_pointer(cur_oop); 41.25 - } 41.26 - 41.27 - return cm_oop->object_size(); 41.28 -} 41.29 #endif // SERIALGC 41.30 41.31 // Printing
42.1 --- a/src/share/vm/oops/constantPoolKlass.cpp Tue Feb 22 15:26:36 2011 -0800 42.2 +++ b/src/share/vm/oops/constantPoolKlass.cpp Wed Feb 23 11:18:16 2011 -0800 42.3 @@ -1,5 +1,5 @@ 42.4 /* 42.5 - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. 42.6 + * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. 42.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 42.8 * 42.9 * This code is free software; you can redistribute it and/or modify it 42.10 @@ -55,26 +55,35 @@ 42.11 constantPoolOop constantPoolKlass::allocate(int length, bool is_conc_safe, TRAPS) { 42.12 int size = constantPoolOopDesc::object_size(length); 42.13 KlassHandle klass (THREAD, as_klassOop()); 42.14 - constantPoolOop c = 42.15 - (constantPoolOop)CollectedHeap::permanent_obj_allocate(klass, size, CHECK_NULL); 42.16 + assert(klass()->is_oop(), "Can't be null, else handlizing of c below won't work"); 42.17 + constantPoolHandle pool; 42.18 + { 42.19 + constantPoolOop c = 42.20 + (constantPoolOop)CollectedHeap::permanent_obj_allocate(klass, size, CHECK_NULL); 42.21 + assert(c->klass_or_null() != NULL, "Handlizing below won't work"); 42.22 + pool = constantPoolHandle(THREAD, c); 42.23 + } 42.24 42.25 - c->set_length(length); 42.26 - c->set_tags(NULL); 42.27 - c->set_cache(NULL); 42.28 - c->set_operands(NULL); 42.29 - c->set_pool_holder(NULL); 42.30 - c->set_flags(0); 42.31 + pool->set_length(length); 42.32 + pool->set_tags(NULL); 42.33 + pool->set_cache(NULL); 42.34 + pool->set_operands(NULL); 42.35 + pool->set_pool_holder(NULL); 42.36 + pool->set_flags(0); 42.37 // only set to non-zero if constant pool is merged by RedefineClasses 42.38 - c->set_orig_length(0); 42.39 + pool->set_orig_length(0); 42.40 // if constant pool may change during RedefineClasses, it is created 42.41 // unsafe for GC concurrent processing. 42.42 - c->set_is_conc_safe(is_conc_safe); 42.43 + pool->set_is_conc_safe(is_conc_safe); 42.44 // all fields are initialized; needed for GC 42.45 42.46 + // Note: because we may be in this "conc_unsafe" state when allocating 42.47 + // t_oop below, which may in turn cause a GC, it is imperative that our 42.48 + // size be correct, consistent and henceforth stable, at this stage. 42.49 + assert(pool->is_oop() && pool->is_parsable(), "Else size() below is unreliable"); 42.50 + assert(size == pool->size(), "size() is wrong"); 42.51 + 42.52 // initialize tag array 42.53 - // Note: cannot introduce constant pool handle before since it is not 42.54 - // completely initialized (no class) -> would cause assertion failure 42.55 - constantPoolHandle pool (THREAD, c); 42.56 typeArrayOop t_oop = oopFactory::new_permanent_byteArray(length, CHECK_NULL); 42.57 typeArrayHandle tags (THREAD, t_oop); 42.58 for (int index = 0; index < length; index++) { 42.59 @@ -82,6 +91,8 @@ 42.60 } 42.61 pool->set_tags(tags()); 42.62 42.63 + // Check that our size was stable at its old value. 42.64 + assert(size == pool->size(), "size() changed"); 42.65 return pool(); 42.66 } 42.67 42.68 @@ -271,40 +282,6 @@ 42.69 return cp->object_size(); 42.70 } 42.71 42.72 -int 42.73 -constantPoolKlass::oop_update_pointers(ParCompactionManager* cm, oop obj, 42.74 - HeapWord* beg_addr, HeapWord* end_addr) { 42.75 - assert (obj->is_constantPool(), "obj must be constant pool"); 42.76 - constantPoolOop cp = (constantPoolOop) obj; 42.77 - 42.78 - // If the tags array is null we are in the middle of allocating this constant 42.79 - // pool. 42.80 - if (cp->tags() != NULL) { 42.81 - oop* base = (oop*)cp->base(); 42.82 - oop* const beg_oop = MAX2((oop*)beg_addr, base); 42.83 - oop* const end_oop = MIN2((oop*)end_addr, base + cp->length()); 42.84 - const size_t beg_idx = pointer_delta(beg_oop, base, sizeof(oop*)); 42.85 - const size_t end_idx = pointer_delta(end_oop, base, sizeof(oop*)); 42.86 - for (size_t cur_idx = beg_idx; cur_idx < end_idx; ++cur_idx, ++base) { 42.87 - if (cp->is_pointer_entry(int(cur_idx))) { 42.88 - PSParallelCompact::adjust_pointer(base); 42.89 - } 42.90 - } 42.91 - } 42.92 - 42.93 - oop* p; 42.94 - p = cp->tags_addr(); 42.95 - PSParallelCompact::adjust_pointer(p, beg_addr, end_addr); 42.96 - p = cp->cache_addr(); 42.97 - PSParallelCompact::adjust_pointer(p, beg_addr, end_addr); 42.98 - p = cp->operands_addr(); 42.99 - PSParallelCompact::adjust_pointer(p, beg_addr, end_addr); 42.100 - p = cp->pool_holder_addr(); 42.101 - PSParallelCompact::adjust_pointer(p, beg_addr, end_addr); 42.102 - 42.103 - return cp->object_size(); 42.104 -} 42.105 - 42.106 void constantPoolKlass::oop_push_contents(PSPromotionManager* pm, oop obj) { 42.107 assert(obj->is_constantPool(), "should be constant pool"); 42.108 constantPoolOop cp = (constantPoolOop) obj;
43.1 --- a/src/share/vm/oops/cpCacheKlass.cpp Tue Feb 22 15:26:36 2011 -0800 43.2 +++ b/src/share/vm/oops/cpCacheKlass.cpp Wed Feb 23 11:18:16 2011 -0800 43.3 @@ -1,5 +1,5 @@ 43.4 /* 43.5 - * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved. 43.6 + * Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved. 43.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 43.8 * 43.9 * This code is free software; you can redistribute it and/or modify it 43.10 @@ -49,43 +49,31 @@ 43.11 43.12 43.13 constantPoolCacheOop constantPoolCacheKlass::allocate(int length, 43.14 - bool is_conc_safe, 43.15 TRAPS) { 43.16 // allocate memory 43.17 int size = constantPoolCacheOopDesc::object_size(length); 43.18 43.19 KlassHandle klass (THREAD, as_klassOop()); 43.20 43.21 - // This is the original code. The code from permanent_obj_allocate() 43.22 - // was in-lined to allow the setting of is_conc_safe before the klass 43.23 - // is installed. 43.24 + // Commented out below is the original code. The code from 43.25 + // permanent_obj_allocate() was in-lined so that we could 43.26 + // set the _length field, necessary to correctly compute its 43.27 + // size(), before setting its klass word further below. 43.28 // constantPoolCacheOop cache = (constantPoolCacheOop) 43.29 // CollectedHeap::permanent_obj_allocate(klass, size, CHECK_NULL); 43.30 43.31 oop obj = CollectedHeap::permanent_obj_allocate_no_klass_install(klass, size, CHECK_NULL); 43.32 - constantPoolCacheOop cache = (constantPoolCacheOop) obj; 43.33 - cache->set_is_conc_safe(is_conc_safe); 43.34 - // The store to is_conc_safe must be visible before the klass 43.35 - // is set. This should be done safely because _is_conc_safe has 43.36 - // been declared volatile. If there are any problems, consider adding 43.37 - // OrderAccess::storestore(); 43.38 - CollectedHeap::post_allocation_install_obj_klass(klass, obj, size); 43.39 NOT_PRODUCT(Universe::heap()->check_for_bad_heap_word_value((HeapWord*) obj, 43.40 size)); 43.41 + constantPoolCacheOop cache = (constantPoolCacheOop) obj; 43.42 + assert(!UseConcMarkSweepGC || obj->klass_or_null() == NULL, 43.43 + "klass should be NULL here when using CMS"); 43.44 + cache->set_length(length); // should become visible before klass is set below. 43.45 + cache->set_constant_pool(NULL); 43.46 43.47 - // The length field affects the size of the object. The allocation 43.48 - // above allocates the correct size (see calculation of "size") but 43.49 - // the size() method of the constant pool cache oop will not reflect 43.50 - // that size until the correct length is set. 43.51 - cache->set_length(length); 43.52 - 43.53 - // The store of the length must be visible before is_conc_safe is 43.54 - // set to a safe state. 43.55 - // This should be done safely because _is_conc_safe has 43.56 - // been declared volatile. If there are any problems, consider adding 43.57 - // OrderAccess::storestore(); 43.58 - cache->set_is_conc_safe(methodOopDesc::IsSafeConc); 43.59 - cache->set_constant_pool(NULL); 43.60 + OrderAccess::storestore(); 43.61 + obj->set_klass(klass()); 43.62 + assert(cache->size() == size, "Incorrect cache->size()"); 43.63 return cache; 43.64 } 43.65 43.66 @@ -176,11 +164,6 @@ 43.67 return size; 43.68 } 43.69 43.70 -bool constantPoolCacheKlass::oop_is_conc_safe(oop obj) const { 43.71 - assert(obj->is_constantPoolCache(), "should be constant pool"); 43.72 - return constantPoolCacheOop(obj)->is_conc_safe(); 43.73 -} 43.74 - 43.75 #ifndef SERIALGC 43.76 void constantPoolCacheKlass::oop_push_contents(PSPromotionManager* pm, 43.77 oop obj) { 43.78 @@ -220,25 +203,6 @@ 43.79 43.80 return cache->object_size(); 43.81 } 43.82 - 43.83 -int 43.84 -constantPoolCacheKlass::oop_update_pointers(ParCompactionManager* cm, oop obj, 43.85 - HeapWord* beg_addr, 43.86 - HeapWord* end_addr) { 43.87 - assert(obj->is_constantPoolCache(), "obj must be constant pool cache"); 43.88 - constantPoolCacheOop cache = (constantPoolCacheOop)obj; 43.89 - 43.90 - // Iteration over constant pool cache instance variables 43.91 - oop* p; 43.92 - p = (oop*)cache->constant_pool_addr(); 43.93 - PSParallelCompact::adjust_pointer(p, beg_addr, end_addr); 43.94 - 43.95 - // Iteration over constant pool cache entries 43.96 - for (int i = 0; i < cache->length(); ++i) { 43.97 - cache->entry_at(i)->update_pointers(beg_addr, end_addr); 43.98 - } 43.99 - return cache->object_size(); 43.100 -} 43.101 #endif // SERIALGC 43.102 43.103 void constantPoolCacheKlass::oop_print_on(oop obj, outputStream* st) {
44.1 --- a/src/share/vm/oops/cpCacheKlass.hpp Tue Feb 22 15:26:36 2011 -0800 44.2 +++ b/src/share/vm/oops/cpCacheKlass.hpp Wed Feb 23 11:18:16 2011 -0800 44.3 @@ -39,7 +39,7 @@ 44.4 44.5 // Allocation 44.6 DEFINE_ALLOCATE_PERMANENT(constantPoolCacheKlass); 44.7 - constantPoolCacheOop allocate(int length, bool is_conc_safe, TRAPS); 44.8 + constantPoolCacheOop allocate(int length, TRAPS); 44.9 static klassOop create_klass(TRAPS); 44.10 44.11 // Casting from klassOop 44.12 @@ -55,7 +55,6 @@ 44.13 // Garbage collection 44.14 void oop_follow_contents(oop obj); 44.15 int oop_adjust_pointers(oop obj); 44.16 - virtual bool oop_is_conc_safe(oop obj) const; 44.17 44.18 // Parallel Scavenge and Parallel Old 44.19 PARALLEL_GC_DECLS
45.1 --- a/src/share/vm/oops/cpCacheOop.cpp Tue Feb 22 15:26:36 2011 -0800 45.2 +++ b/src/share/vm/oops/cpCacheOop.cpp Wed Feb 23 11:18:16 2011 -0800 45.3 @@ -368,16 +368,6 @@ 45.4 PSParallelCompact::adjust_pointer((oop*)&_f2); 45.5 } 45.6 } 45.7 - 45.8 -void ConstantPoolCacheEntry::update_pointers(HeapWord* beg_addr, 45.9 - HeapWord* end_addr) { 45.10 - assert(in_words(size()) == 4, "check code below - may need adjustment"); 45.11 - // field[1] is always oop or NULL 45.12 - PSParallelCompact::adjust_pointer((oop*)&_f1, beg_addr, end_addr); 45.13 - if (is_vfinal()) { 45.14 - PSParallelCompact::adjust_pointer((oop*)&_f2, beg_addr, end_addr); 45.15 - } 45.16 -} 45.17 #endif // SERIALGC 45.18 45.19 // RedefineClasses() API support:
46.1 --- a/src/share/vm/oops/cpCacheOop.hpp Tue Feb 22 15:26:36 2011 -0800 46.2 +++ b/src/share/vm/oops/cpCacheOop.hpp Wed Feb 23 11:18:16 2011 -0800 46.3 @@ -1,5 +1,5 @@ 46.4 /* 46.5 - * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved. 46.6 + * Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved. 46.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 46.8 * 46.9 * This code is free software; you can redistribute it and/or modify it 46.10 @@ -287,7 +287,6 @@ 46.11 #endif // SERIALGC 46.12 46.13 void update_pointers(); 46.14 - void update_pointers(HeapWord* beg_addr, HeapWord* end_addr); 46.15 46.16 // RedefineClasses() API support: 46.17 // If this constantPoolCacheEntry refers to old_method then update it 46.18 @@ -321,9 +320,6 @@ 46.19 private: 46.20 int _length; 46.21 constantPoolOop _constant_pool; // the corresponding constant pool 46.22 - // If true, safe for concurrent GC processing, 46.23 - // Set unconditionally in constantPoolCacheKlass::allocate() 46.24 - volatile bool _is_conc_safe; 46.25 46.26 // Sizing 46.27 debug_only(friend class ClassVerifier;) 46.28 @@ -390,12 +386,6 @@ 46.29 return entry_at(primary_index); 46.30 } 46.31 46.32 - // GC support 46.33 - // If the _length field has not been set, the size of the 46.34 - // constantPoolCache cannot be correctly calculated. 46.35 - bool is_conc_safe() { return _is_conc_safe; } 46.36 - void set_is_conc_safe(bool v) { _is_conc_safe = v; } 46.37 - 46.38 // Code generation 46.39 static ByteSize base_offset() { return in_ByteSize(sizeof(constantPoolCacheOopDesc)); } 46.40 static ByteSize entry_offset(int raw_index) {
47.1 --- a/src/share/vm/oops/instanceKlass.cpp Tue Feb 22 15:26:36 2011 -0800 47.2 +++ b/src/share/vm/oops/instanceKlass.cpp Wed Feb 23 11:18:16 2011 -0800 47.3 @@ -1,5 +1,5 @@ 47.4 /* 47.5 - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. 47.6 + * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. 47.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 47.8 * 47.9 * This code is free software; you can redistribute it and/or modify it 47.10 @@ -1736,14 +1736,6 @@ 47.11 PSParallelCompact::adjust_pointer(p), \ 47.12 assert_nothing) 47.13 } 47.14 - 47.15 -void instanceKlass::update_static_fields(HeapWord* beg_addr, HeapWord* end_addr) { 47.16 - InstanceKlass_BOUNDED_OOP_ITERATE( \ 47.17 - start_of_static_fields(), static_oop_field_size(), \ 47.18 - beg_addr, end_addr, \ 47.19 - PSParallelCompact::adjust_pointer(p), \ 47.20 - assert_nothing ) 47.21 -} 47.22 #endif // SERIALGC 47.23 47.24 void instanceKlass::oop_follow_contents(oop obj) { 47.25 @@ -1876,15 +1868,6 @@ 47.26 return size_helper(); 47.27 } 47.28 47.29 -int instanceKlass::oop_update_pointers(ParCompactionManager* cm, oop obj, 47.30 - HeapWord* beg_addr, HeapWord* end_addr) { 47.31 - InstanceKlass_BOUNDED_OOP_MAP_ITERATE( \ 47.32 - obj, beg_addr, end_addr, \ 47.33 - PSParallelCompact::adjust_pointer(p), \ 47.34 - assert_nothing) 47.35 - return size_helper(); 47.36 -} 47.37 - 47.38 void instanceKlass::push_static_fields(PSPromotionManager* pm) { 47.39 InstanceKlass_OOP_ITERATE( \ 47.40 start_of_static_fields(), static_oop_field_size(), \
48.1 --- a/src/share/vm/oops/instanceKlass.hpp Tue Feb 22 15:26:36 2011 -0800 48.2 +++ b/src/share/vm/oops/instanceKlass.hpp Wed Feb 23 11:18:16 2011 -0800 48.3 @@ -1,5 +1,5 @@ 48.4 /* 48.5 - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. 48.6 + * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. 48.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 48.8 * 48.9 * This code is free software; you can redistribute it and/or modify it 48.10 @@ -740,7 +740,6 @@ 48.11 void follow_static_fields(ParCompactionManager* cm); 48.12 void copy_static_fields(ParCompactionManager* cm); 48.13 void update_static_fields(); 48.14 - void update_static_fields(HeapWord* beg_addr, HeapWord* end_addr); 48.15 #endif // SERIALGC 48.16 48.17 // Naming
49.1 --- a/src/share/vm/oops/instanceKlassKlass.cpp Tue Feb 22 15:26:36 2011 -0800 49.2 +++ b/src/share/vm/oops/instanceKlassKlass.cpp Wed Feb 23 11:18:16 2011 -0800 49.3 @@ -1,5 +1,5 @@ 49.4 /* 49.5 - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. 49.6 + * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. 49.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 49.8 * 49.9 * This code is free software; you can redistribute it and/or modify it 49.10 @@ -353,35 +353,6 @@ 49.11 return ik->object_size(); 49.12 } 49.13 49.14 -int instanceKlassKlass::oop_update_pointers(ParCompactionManager* cm, oop obj, 49.15 - HeapWord* beg_addr, 49.16 - HeapWord* end_addr) { 49.17 - assert(obj->is_klass(),"must be a klass"); 49.18 - assert(klassOop(obj)->klass_part()->oop_is_instance_slow(), 49.19 - "must be instance klass"); 49.20 - 49.21 - instanceKlass* ik = instanceKlass::cast(klassOop(obj)); 49.22 - ik->update_static_fields(beg_addr, end_addr); 49.23 - ik->vtable()->oop_update_pointers(cm, beg_addr, end_addr); 49.24 - ik->itable()->oop_update_pointers(cm, beg_addr, end_addr); 49.25 - 49.26 - oop* const beg_oop = MAX2((oop*)beg_addr, ik->oop_block_beg()); 49.27 - oop* const end_oop = MIN2((oop*)end_addr, ik->oop_block_end()); 49.28 - for (oop* cur_oop = beg_oop; cur_oop < end_oop; ++cur_oop) { 49.29 - PSParallelCompact::adjust_pointer(cur_oop); 49.30 - } 49.31 - 49.32 - // The oop_map_cache, jni_ids and jni_id_map are allocated from the C heap, 49.33 - // and so don't lie within any 'Chunk' boundaries. Update them when the 49.34 - // lowest addressed oop in the instanceKlass 'oop_block' is updated. 49.35 - if (beg_oop == ik->oop_block_beg()) { 49.36 - OopClosure* closure = PSParallelCompact::adjust_root_pointer_closure(); 49.37 - iterate_c_heap_oops(ik, closure); 49.38 - } 49.39 - 49.40 - klassKlass::oop_update_pointers(cm, obj, beg_addr, end_addr); 49.41 - return ik->object_size(); 49.42 -} 49.43 #endif // SERIALGC 49.44 49.45 klassOop
50.1 --- a/src/share/vm/oops/instanceRefKlass.cpp Tue Feb 22 15:26:36 2011 -0800 50.2 +++ b/src/share/vm/oops/instanceRefKlass.cpp Wed Feb 23 11:18:16 2011 -0800 50.3 @@ -1,5 +1,5 @@ 50.4 /* 50.5 - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. 50.6 + * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. 50.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 50.8 * 50.9 * This code is free software; you can redistribute it and/or modify it 50.10 @@ -344,33 +344,6 @@ 50.11 } 50.12 return size_helper(); 50.13 } 50.14 - 50.15 - 50.16 -template <class T> void 50.17 -specialized_oop_update_pointers(ParCompactionManager* cm, oop obj, 50.18 - HeapWord* beg_addr, HeapWord* end_addr) { 50.19 - T* p; 50.20 - T* referent_addr = p = (T*)java_lang_ref_Reference::referent_addr(obj); 50.21 - PSParallelCompact::adjust_pointer(p, beg_addr, end_addr); 50.22 - T* next_addr = p = (T*)java_lang_ref_Reference::next_addr(obj); 50.23 - PSParallelCompact::adjust_pointer(p, beg_addr, end_addr); 50.24 - T* discovered_addr = p = (T*)java_lang_ref_Reference::discovered_addr(obj); 50.25 - PSParallelCompact::adjust_pointer(p, beg_addr, end_addr); 50.26 - debug_only(trace_reference_gc("instanceRefKlass::oop_update_ptrs", obj, 50.27 - referent_addr, next_addr, discovered_addr);) 50.28 -} 50.29 - 50.30 -int 50.31 -instanceRefKlass::oop_update_pointers(ParCompactionManager* cm, oop obj, 50.32 - HeapWord* beg_addr, HeapWord* end_addr) { 50.33 - instanceKlass::oop_update_pointers(cm, obj, beg_addr, end_addr); 50.34 - if (UseCompressedOops) { 50.35 - specialized_oop_update_pointers<narrowOop>(cm, obj, beg_addr, end_addr); 50.36 - } else { 50.37 - specialized_oop_update_pointers<oop>(cm, obj, beg_addr, end_addr); 50.38 - } 50.39 - return size_helper(); 50.40 -} 50.41 #endif // SERIALGC 50.42 50.43 void instanceRefKlass::update_nonstatic_oop_maps(klassOop k) {
51.1 --- a/src/share/vm/oops/klassKlass.cpp Tue Feb 22 15:26:36 2011 -0800 51.2 +++ b/src/share/vm/oops/klassKlass.cpp Wed Feb 23 11:18:16 2011 -0800 51.3 @@ -1,5 +1,5 @@ 51.4 /* 51.5 - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. 51.6 + * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. 51.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 51.8 * 51.9 * This code is free software; you can redistribute it and/or modify it 51.10 @@ -188,19 +188,6 @@ 51.11 51.12 return oop_size(obj); 51.13 } 51.14 - 51.15 -int klassKlass::oop_update_pointers(ParCompactionManager* cm, oop obj, 51.16 - HeapWord* beg_addr, HeapWord* end_addr) { 51.17 - Klass* k = Klass::cast(klassOop(obj)); 51.18 - 51.19 - oop* const beg_oop = MAX2((oop*)beg_addr, k->oop_block_beg()); 51.20 - oop* const end_oop = MIN2((oop*)end_addr, k->oop_block_end()); 51.21 - for (oop* cur_oop = beg_oop; cur_oop < end_oop; ++cur_oop) { 51.22 - PSParallelCompact::adjust_pointer(cur_oop); 51.23 - } 51.24 - 51.25 - return oop_size(obj); 51.26 -} 51.27 #endif // SERIALGC 51.28 51.29
52.1 --- a/src/share/vm/oops/klassPS.hpp Tue Feb 22 15:26:36 2011 -0800 52.2 +++ b/src/share/vm/oops/klassPS.hpp Wed Feb 23 11:18:16 2011 -0800 52.3 @@ -1,5 +1,5 @@ 52.4 /* 52.5 - * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. 52.6 + * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. 52.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 52.8 * 52.9 * This code is free software; you can redistribute it and/or modify it 52.10 @@ -37,17 +37,13 @@ 52.11 objects that do (or may) cross chunk boundaries; it updates only those \ 52.12 oops that are in the region [beg_addr, end_addr). */ \ 52.13 virtual void oop_follow_contents(ParCompactionManager* cm, oop obj); \ 52.14 - virtual int oop_update_pointers(ParCompactionManager* cm, oop obj); \ 52.15 - virtual int oop_update_pointers(ParCompactionManager* cm, oop obj, \ 52.16 - HeapWord* beg_addr, HeapWord* end_addr); 52.17 + virtual int oop_update_pointers(ParCompactionManager* cm, oop obj); 52.18 52.19 // Pure virtual version for klass.hpp 52.20 #define PARALLEL_GC_DECLS_PV \ 52.21 virtual void oop_push_contents(PSPromotionManager* pm, oop obj) = 0; \ 52.22 virtual void oop_follow_contents(ParCompactionManager* cm, oop obj) = 0; \ 52.23 - virtual int oop_update_pointers(ParCompactionManager* cm, oop obj) = 0; \ 52.24 - virtual int oop_update_pointers(ParCompactionManager* cm, oop obj, \ 52.25 - HeapWord* beg_addr, HeapWord* end_addr) = 0; 52.26 + virtual int oop_update_pointers(ParCompactionManager* cm, oop obj) = 0; 52.27 #else // SERIALGC 52.28 #define PARALLEL_GC_DECLS 52.29 #define PARALLEL_GC_DECLS_PV
53.1 --- a/src/share/vm/oops/klassVtable.cpp Tue Feb 22 15:26:36 2011 -0800 53.2 +++ b/src/share/vm/oops/klassVtable.cpp Wed Feb 23 11:18:16 2011 -0800 53.3 @@ -1,5 +1,5 @@ 53.4 /* 53.5 - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. 53.6 + * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. 53.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 53.8 * 53.9 * This code is free software; you can redistribute it and/or modify it 53.10 @@ -677,25 +677,6 @@ 53.11 PSParallelCompact::adjust_pointer(adr_method_at(i)); 53.12 } 53.13 } 53.14 - 53.15 -void klassVtable::oop_update_pointers(ParCompactionManager* cm, 53.16 - HeapWord* beg_addr, HeapWord* end_addr) { 53.17 - const int n = length(); 53.18 - const int entry_size = vtableEntry::size(); 53.19 - 53.20 - int beg_idx = 0; 53.21 - HeapWord* const method_0 = (HeapWord*)adr_method_at(0); 53.22 - if (beg_addr > method_0) { 53.23 - // it's safe to use cast, as we have guarantees on vtable size to be sane 53.24 - beg_idx = int((pointer_delta(beg_addr, method_0) + entry_size - 1) / entry_size); 53.25 - } 53.26 - 53.27 - oop* const beg_oop = adr_method_at(beg_idx); 53.28 - oop* const end_oop = MIN2((oop*)end_addr, adr_method_at(n)); 53.29 - for (oop* cur_oop = beg_oop; cur_oop < end_oop; cur_oop += entry_size) { 53.30 - PSParallelCompact::adjust_pointer(cur_oop); 53.31 - } 53.32 -} 53.33 #endif // SERIALGC 53.34 53.35 // Iterators 53.36 @@ -820,25 +801,6 @@ 53.37 ime++; 53.38 } 53.39 } 53.40 - 53.41 -void klassItable::oop_update_pointers(ParCompactionManager* cm, 53.42 - HeapWord* beg_addr, HeapWord* end_addr) { 53.43 - // offset table 53.44 - itableOffsetEntry* ioe = offset_entry(0); 53.45 - for(int i = 0; i < _size_offset_table; i++) { 53.46 - oop* p = (oop*)&ioe->_interface; 53.47 - PSParallelCompact::adjust_pointer(p, beg_addr, end_addr); 53.48 - ioe++; 53.49 - } 53.50 - 53.51 - // method table 53.52 - itableMethodEntry* ime = method_entry(0); 53.53 - for(int j = 0; j < _size_method_table; j++) { 53.54 - oop* p = (oop*)&ime->_method; 53.55 - PSParallelCompact::adjust_pointer(p, beg_addr, end_addr); 53.56 - ime++; 53.57 - } 53.58 -} 53.59 #endif // SERIALGC 53.60 53.61 // Iterators
54.1 --- a/src/share/vm/oops/klassVtable.hpp Tue Feb 22 15:26:36 2011 -0800 54.2 +++ b/src/share/vm/oops/klassVtable.hpp Wed Feb 23 11:18:16 2011 -0800 54.3 @@ -1,5 +1,5 @@ 54.4 /* 54.5 - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. 54.6 + * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. 54.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 54.8 * 54.9 * This code is free software; you can redistribute it and/or modify it 54.10 @@ -99,8 +99,6 @@ 54.11 // Parallel Old 54.12 void oop_follow_contents(ParCompactionManager* cm); 54.13 void oop_update_pointers(ParCompactionManager* cm); 54.14 - void oop_update_pointers(ParCompactionManager* cm, 54.15 - HeapWord* beg_addr, HeapWord* end_addr); 54.16 #endif // SERIALGC 54.17 54.18 // Iterators 54.19 @@ -295,8 +293,6 @@ 54.20 // Parallel Old 54.21 void oop_follow_contents(ParCompactionManager* cm); 54.22 void oop_update_pointers(ParCompactionManager* cm); 54.23 - void oop_update_pointers(ParCompactionManager* cm, 54.24 - HeapWord* beg_addr, HeapWord* end_addr); 54.25 #endif // SERIALGC 54.26 54.27 // Iterators
55.1 --- a/src/share/vm/oops/methodDataKlass.cpp Tue Feb 22 15:26:36 2011 -0800 55.2 +++ b/src/share/vm/oops/methodDataKlass.cpp Wed Feb 23 11:18:16 2011 -0800 55.3 @@ -1,5 +1,5 @@ 55.4 /* 55.5 - * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. 55.6 + * Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. 55.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 55.8 * 55.9 * This code is free software; you can redistribute it and/or modify it 55.10 @@ -188,25 +188,6 @@ 55.11 } 55.12 return m->object_size(); 55.13 } 55.14 - 55.15 -int 55.16 -methodDataKlass::oop_update_pointers(ParCompactionManager* cm, oop obj, 55.17 - HeapWord* beg_addr, HeapWord* end_addr) { 55.18 - assert(obj->is_methodData(), "should be method data"); 55.19 - 55.20 - oop* p; 55.21 - methodDataOop m = methodDataOop(obj); 55.22 - 55.23 - p = m->adr_method(); 55.24 - PSParallelCompact::adjust_pointer(p, beg_addr, end_addr); 55.25 - 55.26 - ResourceMark rm; 55.27 - ProfileData* data; 55.28 - for (data = m->first_data(); m->is_valid(data); data = m->next_data(data)) { 55.29 - data->update_pointers(beg_addr, end_addr); 55.30 - } 55.31 - return m->object_size(); 55.32 -} 55.33 #endif // SERIALGC 55.34 55.35 #ifndef PRODUCT
56.1 --- a/src/share/vm/oops/methodDataOop.cpp Tue Feb 22 15:26:36 2011 -0800 56.2 +++ b/src/share/vm/oops/methodDataOop.cpp Wed Feb 23 11:18:16 2011 -0800 56.3 @@ -271,17 +271,6 @@ 56.4 } 56.5 } 56.6 } 56.7 - 56.8 -void ReceiverTypeData::update_pointers(HeapWord* beg_addr, HeapWord* end_addr) { 56.9 - // The loop bounds could be computed based on beg_addr/end_addr and the 56.10 - // boundary test hoisted outside the loop (see klassVTable for an example); 56.11 - // however, row_limit() is small enough (2) to make that less efficient. 56.12 - for (uint row = 0; row < row_limit(); row++) { 56.13 - if (receiver_unchecked(row) != NULL) { 56.14 - PSParallelCompact::adjust_pointer(adr_receiver(row), beg_addr, end_addr); 56.15 - } 56.16 - } 56.17 -} 56.18 #endif // SERIALGC 56.19 56.20 #ifndef PRODUCT
57.1 --- a/src/share/vm/oops/methodDataOop.hpp Tue Feb 22 15:26:36 2011 -0800 57.2 +++ b/src/share/vm/oops/methodDataOop.hpp Wed Feb 23 11:18:16 2011 -0800 57.3 @@ -1,5 +1,5 @@ 57.4 /* 57.5 - * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. 57.6 + * Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. 57.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 57.8 * 57.9 * This code is free software; you can redistribute it and/or modify it 57.10 @@ -452,7 +452,6 @@ 57.11 // Parallel old support 57.12 virtual void follow_contents(ParCompactionManager* cm) {} 57.13 virtual void update_pointers() {} 57.14 - virtual void update_pointers(HeapWord* beg_addr, HeapWord* end_addr) {} 57.15 #endif // SERIALGC 57.16 57.17 // CI translation: ProfileData can represent both MethodDataOop data 57.18 @@ -748,7 +747,6 @@ 57.19 // Parallel old support 57.20 virtual void follow_contents(ParCompactionManager* cm); 57.21 virtual void update_pointers(); 57.22 - virtual void update_pointers(HeapWord* beg_addr, HeapWord* end_addr); 57.23 #endif // SERIALGC 57.24 57.25 oop* adr_receiver(uint row) {
58.1 --- a/src/share/vm/oops/methodKlass.cpp Tue Feb 22 15:26:36 2011 -0800 58.2 +++ b/src/share/vm/oops/methodKlass.cpp Wed Feb 23 11:18:16 2011 -0800 58.3 @@ -1,5 +1,5 @@ 58.4 /* 58.5 - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. 58.6 + * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. 58.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 58.8 * 58.9 * This code is free software; you can redistribute it and/or modify it 58.10 @@ -214,27 +214,6 @@ 58.11 #endif // COMPILER2 58.12 return m->object_size(); 58.13 } 58.14 - 58.15 -int methodKlass::oop_update_pointers(ParCompactionManager* cm, oop obj, 58.16 - HeapWord* beg_addr, HeapWord* end_addr) { 58.17 - assert(obj->is_method(), "should be method"); 58.18 - 58.19 - oop* p; 58.20 - methodOop m = methodOop(obj); 58.21 - 58.22 - p = m->adr_constMethod(); 58.23 - PSParallelCompact::adjust_pointer(p, beg_addr, end_addr); 58.24 - p = m->adr_constants(); 58.25 - PSParallelCompact::adjust_pointer(p, beg_addr, end_addr); 58.26 - 58.27 -#ifdef COMPILER2 58.28 - if (m->method_data() != NULL) { 58.29 - p = m->adr_method_data(); 58.30 - PSParallelCompact::adjust_pointer(p, beg_addr, end_addr); 58.31 - } 58.32 -#endif // COMPILER2 58.33 - return m->object_size(); 58.34 -} 58.35 #endif // SERIALGC 58.36 58.37 #ifndef PRODUCT
59.1 --- a/src/share/vm/oops/methodOop.cpp Tue Feb 22 15:26:36 2011 -0800 59.2 +++ b/src/share/vm/oops/methodOop.cpp Wed Feb 23 11:18:16 2011 -0800 59.3 @@ -985,9 +985,11 @@ 59.4 IsUnsafeConc, 59.5 CHECK_(methodHandle())); 59.6 methodHandle newm (THREAD, newm_oop); 59.7 + NOT_PRODUCT(int nmsz = newm->is_parsable() ? newm->size() : -1;) 59.8 int new_method_size = newm->method_size(); 59.9 // Create a shallow copy of methodOopDesc part, but be careful to preserve the new constMethodOop 59.10 constMethodOop newcm = newm->constMethod(); 59.11 + NOT_PRODUCT(int ncmsz = newcm->is_parsable() ? newcm->size() : -1;) 59.12 int new_const_method_size = newm->constMethod()->object_size(); 59.13 59.14 memcpy(newm(), m(), sizeof(methodOopDesc)); 59.15 @@ -999,9 +1001,19 @@ 59.16 // or concurrent marking but those phases will be correct. Setting and 59.17 // resetting is done in preference to a careful copying into newcm to 59.18 // avoid having to know the precise layout of a constMethodOop. 59.19 - m->constMethod()->set_is_conc_safe(false); 59.20 + m->constMethod()->set_is_conc_safe(oopDesc::IsUnsafeConc); 59.21 + assert(m->constMethod()->is_parsable(), "Should remain parsable"); 59.22 + 59.23 + // NOTE: this is a reachable object that transiently signals "conc_unsafe" 59.24 + // However, no allocations are done during this window 59.25 + // during which it is tagged conc_unsafe, so we are assured that any concurrent 59.26 + // thread will not wait forever for the object to revert to "conc_safe". 59.27 + // Further, any such conc_unsafe object will indicate a stable size 59.28 + // through the transition. 59.29 memcpy(newcm, m->constMethod(), sizeof(constMethodOopDesc)); 59.30 - m->constMethod()->set_is_conc_safe(true); 59.31 + m->constMethod()->set_is_conc_safe(oopDesc::IsSafeConc); 59.32 + assert(m->constMethod()->is_parsable(), "Should remain parsable"); 59.33 + 59.34 // Reset correct method/const method, method size, and parameter info 59.35 newcm->set_method(newm()); 59.36 newm->set_constMethod(newcm); 59.37 @@ -1035,6 +1047,8 @@ 59.38 59.39 // Only set is_conc_safe to true when changes to newcm are 59.40 // complete. 59.41 + assert(!newm->is_parsable() || nmsz < 0 || newm->size() == nmsz, "newm->size() inconsistency"); 59.42 + assert(!newcm->is_parsable() || ncmsz < 0 || newcm->size() == ncmsz, "newcm->size() inconsistency"); 59.43 newcm->set_is_conc_safe(true); 59.44 return newm; 59.45 } 59.46 @@ -1372,7 +1386,7 @@ 59.47 } 59.48 59.49 // See comment in methodOop.hpp which explains why this exists. 59.50 -#if defined(_M_AMD64) && MSC_VER >= 1400 59.51 +#if defined(_M_AMD64) && _MSC_VER >= 1400 59.52 #pragma optimize("", off) 59.53 void CompressedLineNumberWriteStream::write_pair(int bci, int line) { 59.54 write_pair_inline(bci, line);
60.1 --- a/src/share/vm/oops/methodOop.hpp Tue Feb 22 15:26:36 2011 -0800 60.2 +++ b/src/share/vm/oops/methodOop.hpp Wed Feb 23 11:18:16 2011 -0800 60.3 @@ -144,9 +144,6 @@ 60.4 60.5 public: 60.6 60.7 - static const bool IsUnsafeConc = false; 60.8 - static const bool IsSafeConc = true; 60.9 - 60.10 // accessors for instance variables 60.11 constMethodOop constMethod() const { return _constMethod; } 60.12 void set_constMethod(constMethodOop xconst) { oop_store_without_check((oop*)&_constMethod, (oop)xconst); } 60.13 @@ -732,8 +729,8 @@ 60.14 // Disabling optimization doesn't work for methods in header files 60.15 // so we force it to call through the non-optimized version in the .cpp. 60.16 // It's gross, but it's the only way we can ensure that all callers are 60.17 -// fixed. MSC_VER is defined in build/windows/makefiles/compile.make. 60.18 -#if defined(_M_AMD64) && MSC_VER >= 1400 60.19 +// fixed. _MSC_VER is defined by the windows compiler 60.20 +#if defined(_M_AMD64) && _MSC_VER >= 1400 60.21 void write_pair(int bci, int line); 60.22 #else 60.23 void write_pair(int bci, int line) { write_pair_inline(bci, line); }
61.1 --- a/src/share/vm/oops/objArrayKlass.cpp Tue Feb 22 15:26:36 2011 -0800 61.2 +++ b/src/share/vm/oops/objArrayKlass.cpp Wed Feb 23 11:18:16 2011 -0800 61.3 @@ -470,16 +470,6 @@ 61.4 ObjArrayKlass_OOP_ITERATE(a, p, PSParallelCompact::adjust_pointer(p)) 61.5 return a->object_size(); 61.6 } 61.7 - 61.8 -int objArrayKlass::oop_update_pointers(ParCompactionManager* cm, oop obj, 61.9 - HeapWord* beg_addr, HeapWord* end_addr) { 61.10 - assert (obj->is_objArray(), "obj must be obj array"); 61.11 - objArrayOop a = objArrayOop(obj); 61.12 - ObjArrayKlass_BOUNDED_OOP_ITERATE( \ 61.13 - a, p, beg_addr, end_addr, \ 61.14 - PSParallelCompact::adjust_pointer(p)) 61.15 - return a->object_size(); 61.16 -} 61.17 #endif // SERIALGC 61.18 61.19 // JVM support
62.1 --- a/src/share/vm/oops/objArrayKlassKlass.cpp Tue Feb 22 15:26:36 2011 -0800 62.2 +++ b/src/share/vm/oops/objArrayKlassKlass.cpp Wed Feb 23 11:18:16 2011 -0800 62.3 @@ -1,5 +1,5 @@ 62.4 /* 62.5 - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. 62.6 + * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. 62.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 62.8 * 62.9 * This code is free software; you can redistribute it and/or modify it 62.10 @@ -254,22 +254,6 @@ 62.11 62.12 return arrayKlassKlass::oop_update_pointers(cm, obj); 62.13 } 62.14 - 62.15 -int objArrayKlassKlass::oop_update_pointers(ParCompactionManager* cm, oop obj, 62.16 - HeapWord* beg_addr, 62.17 - HeapWord* end_addr) { 62.18 - assert(obj->is_klass(), "must be klass"); 62.19 - assert(klassOop(obj)->klass_part()->oop_is_objArray_slow(), "must be obj array"); 62.20 - 62.21 - oop* p; 62.22 - objArrayKlass* oak = objArrayKlass::cast((klassOop)obj); 62.23 - p = oak->element_klass_addr(); 62.24 - PSParallelCompact::adjust_pointer(p, beg_addr, end_addr); 62.25 - p = oak->bottom_klass_addr(); 62.26 - PSParallelCompact::adjust_pointer(p, beg_addr, end_addr); 62.27 - 62.28 - return arrayKlassKlass::oop_update_pointers(cm, obj, beg_addr, end_addr); 62.29 -} 62.30 #endif // SERIALGC 62.31 62.32 #ifndef PRODUCT
63.1 --- a/src/share/vm/oops/oop.hpp Tue Feb 22 15:26:36 2011 -0800 63.2 +++ b/src/share/vm/oops/oop.hpp Wed Feb 23 11:18:16 2011 -0800 63.3 @@ -1,5 +1,5 @@ 63.4 /* 63.5 - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. 63.6 + * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. 63.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 63.8 * 63.9 * This code is free software; you can redistribute it and/or modify it 63.10 @@ -71,6 +71,11 @@ 63.11 static BarrierSet* _bs; 63.12 63.13 public: 63.14 + enum ConcSafeType { 63.15 + IsUnsafeConc = false, 63.16 + IsSafeConc = true 63.17 + }; 63.18 + 63.19 markOop mark() const { return _mark; } 63.20 markOop* mark_addr() const { return (markOop*) &_mark; } 63.21 63.22 @@ -317,13 +322,6 @@ 63.23 63.24 // Parallel Old 63.25 void update_contents(ParCompactionManager* cm); 63.26 - void update_contents(ParCompactionManager* cm, 63.27 - HeapWord* begin_limit, 63.28 - HeapWord* end_limit); 63.29 - void update_contents(ParCompactionManager* cm, 63.30 - klassOop old_klass, 63.31 - HeapWord* begin_limit, 63.32 - HeapWord* end_limit); 63.33 63.34 void follow_contents(ParCompactionManager* cm); 63.35 void follow_header(ParCompactionManager* cm); 63.36 @@ -364,7 +362,6 @@ 63.37 #ifndef SERIALGC 63.38 // Parallel old 63.39 void update_header(); 63.40 - void update_header(HeapWord* beg_addr, HeapWord* end_addr); 63.41 #endif // SERIALGC 63.42 63.43 // mark-sweep support
64.1 --- a/src/share/vm/oops/oop.pcgc.inline.hpp Tue Feb 22 15:26:36 2011 -0800 64.2 +++ b/src/share/vm/oops/oop.pcgc.inline.hpp Wed Feb 23 11:18:16 2011 -0800 64.3 @@ -1,5 +1,5 @@ 64.4 /* 64.5 - * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. 64.6 + * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved. 64.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 64.8 * 64.9 * This code is free software; you can redistribute it and/or modify it 64.10 @@ -57,41 +57,6 @@ 64.11 // Else skip it. The typeArrayKlass in the header never needs scavenging. 64.12 } 64.13 64.14 -inline void oopDesc::update_contents(ParCompactionManager* cm, 64.15 - HeapWord* begin_limit, 64.16 - HeapWord* end_limit) { 64.17 - // The klass field must be updated before anything else 64.18 - // can be done. 64.19 - debug_only(klassOopDesc* original_klass = klass()); 64.20 - 64.21 - update_contents(cm, klass(), begin_limit, end_limit); 64.22 -} 64.23 - 64.24 -inline void oopDesc::update_contents(ParCompactionManager* cm, 64.25 - klassOop old_klass, 64.26 - HeapWord* begin_limit, 64.27 - HeapWord* end_limit) { 64.28 - 64.29 - klassOop updated_klass = 64.30 - PSParallelCompact::summary_data().calc_new_klass(old_klass); 64.31 - 64.32 - // Needs to be boundary aware for the 64 bit case 64.33 - // update_header(); 64.34 - // The klass has moved. Is the location of the klass 64.35 - // within the limits? 64.36 - if ((((HeapWord*)&_metadata._klass) >= begin_limit) && 64.37 - (((HeapWord*)&_metadata._klass) < end_limit)) { 64.38 - set_klass(updated_klass); 64.39 - } 64.40 - 64.41 - Klass* klass = updated_klass->klass_part(); 64.42 - if (!klass->oop_is_typeArray()) { 64.43 - // It might contain oops beyond the header, so take the virtual call. 64.44 - klass->oop_update_pointers(cm, this, begin_limit, end_limit); 64.45 - } 64.46 - // Else skip it. The typeArrayKlass in the header never needs scavenging. 64.47 -} 64.48 - 64.49 inline void oopDesc::follow_contents(ParCompactionManager* cm) { 64.50 assert (PSParallelCompact::mark_bitmap()->is_marked(this), 64.51 "should be marked"); 64.52 @@ -140,13 +105,4 @@ 64.53 } 64.54 } 64.55 64.56 -inline void oopDesc::update_header(HeapWord* beg_addr, HeapWord* end_addr) { 64.57 - if (UseCompressedOops) { 64.58 - PSParallelCompact::adjust_pointer(compressed_klass_addr(), 64.59 - beg_addr, end_addr); 64.60 - } else { 64.61 - PSParallelCompact::adjust_pointer(klass_addr(), beg_addr, end_addr); 64.62 - } 64.63 -} 64.64 - 64.65 #endif // SHARE_VM_OOPS_OOP_PCGC_INLINE_HPP
65.1 --- a/src/share/vm/oops/typeArrayKlass.cpp Tue Feb 22 15:26:36 2011 -0800 65.2 +++ b/src/share/vm/oops/typeArrayKlass.cpp Wed Feb 23 11:18:16 2011 -0800 65.3 @@ -250,13 +250,6 @@ 65.4 assert(obj->is_typeArray(),"must be a type array"); 65.5 return typeArrayOop(obj)->object_size(); 65.6 } 65.7 - 65.8 -int 65.9 -typeArrayKlass::oop_update_pointers(ParCompactionManager* cm, oop obj, 65.10 - HeapWord* beg_addr, HeapWord* end_addr) { 65.11 - assert(obj->is_typeArray(),"must be a type array"); 65.12 - return typeArrayOop(obj)->object_size(); 65.13 -} 65.14 #endif // SERIALGC 65.15 65.16 void typeArrayKlass::initialize(TRAPS) {
66.1 --- a/src/share/vm/prims/jvmtiRedefineClasses.cpp Tue Feb 22 15:26:36 2011 -0800 66.2 +++ b/src/share/vm/prims/jvmtiRedefineClasses.cpp Wed Feb 23 11:18:16 2011 -0800 66.3 @@ -1247,12 +1247,12 @@ 66.4 // Constant pools are not easily reused so we allocate a new one 66.5 // each time. 66.6 // merge_cp is created unsafe for concurrent GC processing. It 66.7 - // should be marked safe before discarding it because, even if 66.8 - // garbage. If it crosses a card boundary, it may be scanned 66.9 + // should be marked safe before discarding it. Even though 66.10 + // garbage, if it crosses a card boundary, it may be scanned 66.11 // in order to find the start of the first complete object on the card. 66.12 constantPoolHandle merge_cp(THREAD, 66.13 oopFactory::new_constantPool(merge_cp_length, 66.14 - methodOopDesc::IsUnsafeConc, 66.15 + oopDesc::IsUnsafeConc, 66.16 THREAD)); 66.17 int orig_length = old_cp->orig_length(); 66.18 if (orig_length == 0) { 66.19 @@ -2343,7 +2343,7 @@ 66.20 // sized constant pool with the klass to save space. 66.21 constantPoolHandle smaller_cp(THREAD, 66.22 oopFactory::new_constantPool(scratch_cp_length, 66.23 - methodOopDesc::IsUnsafeConc, 66.24 + oopDesc::IsUnsafeConc, 66.25 THREAD)); 66.26 // preserve orig_length() value in the smaller copy 66.27 int orig_length = scratch_cp->orig_length();
67.1 --- a/src/share/vm/prims/methodHandleWalk.cpp Tue Feb 22 15:26:36 2011 -0800 67.2 +++ b/src/share/vm/prims/methodHandleWalk.cpp Wed Feb 23 11:18:16 2011 -0800 67.3 @@ -1134,8 +1134,9 @@ 67.4 67.5 constantPoolHandle MethodHandleCompiler::get_constant_pool(TRAPS) const { 67.6 constantPoolHandle nullHandle; 67.7 - bool is_conc_safe = true; 67.8 - constantPoolOop cpool_oop = oopFactory::new_constantPool(_constants.length(), is_conc_safe, CHECK_(nullHandle)); 67.9 + constantPoolOop cpool_oop = oopFactory::new_constantPool(_constants.length(), 67.10 + oopDesc::IsSafeConc, 67.11 + CHECK_(nullHandle)); 67.12 constantPoolHandle cpool(THREAD, cpool_oop); 67.13 67.14 // Fill the real constant pool skipping the zero element. 67.15 @@ -1180,10 +1181,9 @@ 67.16 else 67.17 flags_bits = (/*JVM_MH_INVOKE_BITS |*/ JVM_ACC_PUBLIC | JVM_ACC_FINAL | JVM_ACC_SYNTHETIC); 67.18 67.19 - bool is_conc_safe = true; 67.20 methodOop m_oop = oopFactory::new_method(bytecode_length(), 67.21 accessFlags_from(flags_bits), 67.22 - 0, 0, 0, is_conc_safe, CHECK_(nullHandle)); 67.23 + 0, 0, 0, oopDesc::IsSafeConc, CHECK_(nullHandle)); 67.24 methodHandle m(THREAD, m_oop); 67.25 m_oop = NULL; // oop not GC safe 67.26
68.1 --- a/src/share/vm/runtime/arguments.cpp Tue Feb 22 15:26:36 2011 -0800 68.2 +++ b/src/share/vm/runtime/arguments.cpp Wed Feb 23 11:18:16 2011 -0800 68.3 @@ -1410,7 +1410,7 @@ 68.4 // by ergonomics. 68.5 if (MaxHeapSize <= max_heap_for_compressed_oops()) { 68.6 #if !defined(COMPILER1) || defined(TIERED) 68.7 - if (FLAG_IS_DEFAULT(UseCompressedOops) && !UseG1GC) { 68.8 + if (FLAG_IS_DEFAULT(UseCompressedOops)) { 68.9 FLAG_SET_ERGO(bool, UseCompressedOops, true); 68.10 } 68.11 #endif 68.12 @@ -3103,6 +3103,19 @@ 68.13 // Set flags if Aggressive optimization flags (-XX:+AggressiveOpts) enabled. 68.14 set_aggressive_opts_flags(); 68.15 68.16 + // Turn off biased locking for locking debug mode flags, 68.17 + // which are subtlely different from each other but neither works with 68.18 + // biased locking. 68.19 + if (!UseFastLocking || UseHeavyMonitors) { 68.20 + if (!FLAG_IS_DEFAULT(UseBiasedLocking) && UseBiasedLocking) { 68.21 + // flag set to true on command line; warn the user that they 68.22 + // can't enable biased locking here 68.23 + warning("Biased Locking is not supported with locking debug flags" 68.24 + "; ignoring UseBiasedLocking flag." ); 68.25 + } 68.26 + UseBiasedLocking = false; 68.27 + } 68.28 + 68.29 #ifdef CC_INTERP 68.30 // Clear flags not supported by the C++ interpreter 68.31 FLAG_SET_DEFAULT(ProfileInterpreter, false);
69.1 --- a/src/share/vm/runtime/globals.hpp Tue Feb 22 15:26:36 2011 -0800 69.2 +++ b/src/share/vm/runtime/globals.hpp Wed Feb 23 11:18:16 2011 -0800 69.3 @@ -3661,10 +3661,10 @@ 69.4 manageable(bool, PrintConcurrentLocks, false, \ 69.5 "Print java.util.concurrent locks in thread dump") \ 69.6 \ 69.7 - diagnostic(bool, TransmitErrorReport, false, \ 69.8 + product(bool, TransmitErrorReport, false, \ 69.9 "Enable error report transmission on erroneous termination") \ 69.10 \ 69.11 - diagnostic(ccstr, ErrorReportServer, NULL, \ 69.12 + product(ccstr, ErrorReportServer, NULL, \ 69.13 "Override built-in error report server address") \ 69.14 \ 69.15 /* Shared spaces */ \ 69.16 @@ -3695,7 +3695,7 @@ 69.17 product(uintx, SharedReadOnlySize, 10*M, \ 69.18 "Size of read-only space in permanent generation (in bytes)") \ 69.19 \ 69.20 - product(uintx, SharedMiscDataSize, 4*M, \ 69.21 + product(uintx, SharedMiscDataSize, NOT_LP64(4*M) LP64_ONLY(5*M), \ 69.22 "Size of the shared data area adjacent to the heap (in bytes)") \ 69.23 \ 69.24 product(uintx, SharedMiscCodeSize, 4*M, \
70.1 --- a/src/share/vm/services/heapDumper.cpp Tue Feb 22 15:26:36 2011 -0800 70.2 +++ b/src/share/vm/services/heapDumper.cpp Wed Feb 23 11:18:16 2011 -0800 70.3 @@ -1,5 +1,5 @@ 70.4 /* 70.5 - * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. 70.6 + * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved. 70.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 70.8 * 70.9 * This code is free software; you can redistribute it and/or modify it 70.10 @@ -1397,6 +1397,7 @@ 70.11 public: 70.12 VM_HeapDumper(DumpWriter* writer, bool gc_before_heap_dump, bool oome) : 70.13 VM_GC_Operation(0 /* total collections, dummy, ignored */, 70.14 + GCCause::_heap_dump /* GC Cause */, 70.15 0 /* total full collections, dummy, ignored */, 70.16 gc_before_heap_dump) { 70.17 _local_writer = writer;
71.1 --- a/src/share/vm/services/management.cpp Tue Feb 22 15:26:36 2011 -0800 71.2 +++ b/src/share/vm/services/management.cpp Wed Feb 23 11:18:16 2011 -0800 71.3 @@ -1311,7 +1311,7 @@ 71.4 if (locked_monitors) { 71.5 // Constructs Object[] and int[] to contain the object monitor and the stack depth 71.6 // where the thread locked it 71.7 - objArrayOop array = oopFactory::new_system_objArray(num_locked_monitors, CHECK_NULL); 71.8 + objArrayOop array = oopFactory::new_system_objArray(num_locked_monitors, false, CHECK_NULL); 71.9 objArrayHandle mh(THREAD, array); 71.10 monitors_array = mh; 71.11 71.12 @@ -1353,7 +1353,7 @@ 71.13 GrowableArray<instanceOop>* locks = (tcl != NULL ? tcl->owned_locks() : NULL); 71.14 int num_locked_synchronizers = (locks != NULL ? locks->length() : 0); 71.15 71.16 - objArrayOop array = oopFactory::new_system_objArray(num_locked_synchronizers, CHECK_NULL); 71.17 + objArrayOop array = oopFactory::new_system_objArray(num_locked_synchronizers, false, CHECK_NULL); 71.18 objArrayHandle sh(THREAD, array); 71.19 synchronizers_array = sh; 71.20
72.1 --- a/src/share/vm/utilities/errorReporter.hpp Tue Feb 22 15:26:36 2011 -0800 72.2 +++ b/src/share/vm/utilities/errorReporter.hpp Wed Feb 23 11:18:16 2011 -0800 72.3 @@ -26,6 +26,7 @@ 72.4 #define SHARE_VM_UTILITIES_ERRORREPORTER_HPP 72.5 72.6 #include "utilities/globalDefinitions.hpp" 72.7 +#include "memory/allocation.hpp" 72.8 72.9 class ErrorReporter : public StackObj { 72.10
73.1 --- a/src/share/vm/utilities/hashtable.hpp Tue Feb 22 15:26:36 2011 -0800 73.2 +++ b/src/share/vm/utilities/hashtable.hpp Wed Feb 23 11:18:16 2011 -0800 73.3 @@ -276,7 +276,7 @@ 73.4 } 73.5 73.6 int index_for(Symbol* name, Handle loader) { 73.7 - return hash_to_index(compute_hash(name, loader)); 73.8 + return this->hash_to_index(compute_hash(name, loader)); 73.9 } 73.10 }; 73.11