changeset 1431:88f9b6ef43ff

. Make changes to BSD to keep it in sync with Linux and/or Solaris.
author Greg Lewis <glewis@eyesbeyond.com>
date Fri, 23 Apr 2010 19:11:02 -0700
parents 0fcfcfd6162e
children 178bf8b51447
files make/bsd/makefiles/mapfile-vers-debug make/bsd/makefiles/mapfile-vers-product make/bsd/makefiles/vm.make src/os/bsd/vm/os_bsd.cpp src/os_cpu/bsd_zero/vm/globals_bsd_zero.hpp test/runtime/6929067/Test6929067.sh
diffstat 6 files changed, 32 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/make/bsd/makefiles/mapfile-vers-debug	Mon Apr 19 20:41:10 2010 -0700
+++ b/make/bsd/makefiles/mapfile-vers-debug	Fri Apr 23 19:11:02 2010 -0700
@@ -290,6 +290,9 @@
 
                 # This is for Forte Analyzer profiling support.
                 AsyncGetCallTrace;
+
+		# INSERT VTABLE SYMBOLS HERE
+
         local:
                 *;
 };
--- a/make/bsd/makefiles/mapfile-vers-product	Mon Apr 19 20:41:10 2010 -0700
+++ b/make/bsd/makefiles/mapfile-vers-product	Fri Apr 23 19:11:02 2010 -0700
@@ -285,6 +285,9 @@
 
                 # This is for Forte Analyzer profiling support.
                 AsyncGetCallTrace;
+
+		# INSERT VTABLE SYMBOLS HERE
+
         local:
                 *;
 };
--- a/make/bsd/makefiles/vm.make	Mon Apr 19 20:41:10 2010 -0700
+++ b/make/bsd/makefiles/vm.make	Fri Apr 23 19:11:02 2010 -0700
@@ -127,14 +127,21 @@
 
 vm_version.o: $(filter-out vm_version.o,$(JVM_OBJ_FILES))
 
-mapfile : $(MAPFILE)
+mapfile : $(MAPFILE) vm.def
 	rm -f $@
-	cat $^ > $@
+	awk '{ if ($$0 ~ "INSERT VTABLE SYMBOLS HERE")	\
+                 { system ("cat vm.def"); }		\
+               else					\
+                 { print $$0 }				\
+             }' > $@ < $(MAPFILE)
 
 mapfile_reorder : mapfile $(REORDERFILE)
 	rm -f $@
 	cat $^ > $@
 
+vm.def: $(Res_Files) $(Obj_Files)
+	sh $(GAMMADIR)/make/bsd/makefiles/build_vm_def.sh *.o > $@
+
 STATIC_CXX = false
 
 ifeq ($(LINK_INTO),AOUT)
--- a/src/os/bsd/vm/os_bsd.cpp	Mon Apr 19 20:41:10 2010 -0700
+++ b/src/os/bsd/vm/os_bsd.cpp	Fri Apr 23 19:11:02 2010 -0700
@@ -22,6 +22,8 @@
  *
  */
 
+# define __STDC_FORMAT_MACROS
+
 // do not include  precompiled  header file
 # include "incls/_os_bsd.cpp.incl"
 
@@ -58,6 +60,8 @@
 #endif
 # include <sys/ipc.h>
 # include <sys/shm.h>
+# include <stdint.h>
+# include <inttypes.h>
 
 #ifndef __APPLE__
 # include <link.h>
@@ -2736,6 +2740,16 @@
 #endif
 }
 
+bool os::create_stack_guard_pages(char* addr, size_t size) {
+  return os::commit_memory(addr, size);
+}
+
+// If this is a growable mapping, remove the guard pages entirely by
+// munmap()ping them.  If not, just call uncommit_memory().
+bool os::remove_stack_guard_pages(char* addr, size_t size) {
+  return os::uncommit_memory(addr, size);
+}
+
 static address _highest_vm_reserved_address = NULL;
 
 // If 'fixed' is true, anon_mmap() will attempt to reserve anonymous memory
--- a/src/os_cpu/bsd_zero/vm/globals_bsd_zero.hpp	Mon Apr 19 20:41:10 2010 -0700
+++ b/src/os_cpu/bsd_zero/vm/globals_bsd_zero.hpp	Fri Apr 23 19:11:02 2010 -0700
@@ -1,6 +1,6 @@
 /*
  * Copyright 2000-2005 Sun Microsystems, Inc.  All Rights Reserved.
- * Copyright 2007, 2008 Red Hat, Inc.
+ * Copyright 2007, 2008, 2010 Red Hat, Inc.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -29,11 +29,10 @@
 //
 
 define_pd_global(bool,  DontYieldALot,           false);
+define_pd_global(intx,  ThreadStackSize,         1536);
 #ifdef _LP64
-define_pd_global(intx,  ThreadStackSize,         1536);
 define_pd_global(intx,  VMThreadStackSize,       1024);
 #else
-define_pd_global(intx,  ThreadStackSize,         1024);
 define_pd_global(intx,  VMThreadStackSize,       512);
 #endif // _LP64
 define_pd_global(intx,  SurvivorRatio,           8);
--- a/test/runtime/6929067/Test6929067.sh	Mon Apr 19 20:41:10 2010 -0700
+++ b/test/runtime/6929067/Test6929067.sh	Fri Apr 23 19:11:02 2010 -0700
@@ -29,7 +29,7 @@
     PS=":"
     FS="/"
     ;;
-  SunOS | Windows_* )
+  SunOS | Windows_* | *BSD)
     NULL=NUL
     PS=";"
     FS="\\"