Changeset 278 for trunk/openjdk/hotspot/src/os/linux
- Timestamp:
- Mar 26, 2011, 8:39:20 PM (14 years ago)
- Location:
- trunk/openjdk
- Files:
-
- 1 deleted
- 33 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/openjdk
- Property svn:ignore
-
old new 1 1 build 2 build-product-release
-
-
Property svn:mergeinfo
set to
/branches/vendor/oracle/openjdk6/b22 merged eligible /branches/vendor/oracle/openjdk6/current merged eligible
- Property svn:ignore
-
trunk/openjdk/hotspot/src/os/linux/launcher/java.c
r2 r278 1 1 /* 2 * Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved.2 * Copyright (c) 1999, 2008, Oracle and/or its affiliates. All rights reserved. 3 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 4 * … … 17 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 18 * 19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,20 * CA 95054 USA or visit www.sun.com if you need additional information or21 * have anyquestions.19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 22 * 23 23 */ -
trunk/openjdk/hotspot/src/os/linux/launcher/java.h
r2 r278 1 1 /* 2 * Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved.2 * Copyright (c) 1999, 2008, Oracle and/or its affiliates. All rights reserved. 3 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 4 * … … 17 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 18 * 19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,20 * CA 95054 USA or visit www.sun.com if you need additional information or21 * have anyquestions.19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 22 * 23 23 */ -
trunk/openjdk/hotspot/src/os/linux/launcher/java_md.c
r2 r278 1 1 /* 2 * Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved.2 * Copyright (c) 1999, 2008, Oracle and/or its affiliates. All rights reserved. 3 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 4 * … … 17 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 18 * 19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,20 * CA 95054 USA or visit www.sun.com if you need additional information or21 * have anyquestions.19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 22 * 23 23 */ … … 80 80 # elif defined(__sparc) 81 81 # define ARCH "sparc" 82 # elif defined(arm) 83 # define ARCH "arm" 84 # elif defined(PPC) 85 # define ARCH "ppc" 82 86 # endif 83 87 -
trunk/openjdk/hotspot/src/os/linux/launcher/java_md.h
r2 r278 1 1 /* 2 * Copyright 1999-2005 Sun Microsystems, Inc. All Rights Reserved.2 * Copyright (c) 1999, 2005, Oracle and/or its affiliates. All rights reserved. 3 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 4 * … … 17 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 18 * 19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,20 * CA 95054 USA or visit www.sun.com if you need additional information or21 * have anyquestions.19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 22 * 23 23 */ -
trunk/openjdk/hotspot/src/os/linux/vm/attachListener_linux.cpp
r2 r278 1 1 /* 2 * Copyright 2005-2008 Sun Microsystems, Inc. All Rights Reserved.2 * Copyright (c) 2005, 2008, Oracle and/or its affiliates. All rights reserved. 3 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 4 * … … 17 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 18 * 19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,20 * CA 95054 USA or visit www.sun.com if you need additional information or21 * have anyquestions.19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 22 * 23 23 */ … … 33 33 #include <sys/stat.h> 34 34 35 #ifndef UNIX_PATH_MAX 36 #define UNIX_PATH_MAX sizeof(((struct sockaddr_un *)0)->sun_path) 37 #endif 38 35 39 // The attach mechanism on Linux uses a UNIX domain socket. An attach listener 36 40 // thread is created at startup or is created on-demand via a signal from 37 41 // the client tool. The attach listener creates a socket and binds it to a file 38 42 // in the filesystem. The attach listener then acts as a simple (single- 39 // threaded) server - tt waits for a client to connect, reads the request,43 // threaded) server - it waits for a client to connect, reads the request, 40 44 // executes it, and returns the response to the client via the socket 41 45 // connection. … … 55 59 private: 56 60 // the path to which we bind the UNIX domain socket 57 static char _path[ PATH_MAX+1];61 static char _path[UNIX_PATH_MAX]; 58 62 static bool _has_path; 59 63 … … 65 69 _has_path = false; 66 70 } else { 67 strncpy(_path, path, PATH_MAX);68 _path[ PATH_MAX] = '\0';71 strncpy(_path, path, UNIX_PATH_MAX); 72 _path[UNIX_PATH_MAX-1] = '\0'; 69 73 _has_path = true; 70 74 } … … 114 118 115 119 // statics 116 char LinuxAttachListener::_path[ PATH_MAX+1];120 char LinuxAttachListener::_path[UNIX_PATH_MAX]; 117 121 bool LinuxAttachListener::_has_path; 118 122 int LinuxAttachListener::_listener = -1; … … 164 168 165 169 int LinuxAttachListener::init() { 166 char path[PATH_MAX+1]; // socket file 167 int listener; // listener socket (file descriptor) 170 char path[UNIX_PATH_MAX]; // socket file 171 char initial_path[UNIX_PATH_MAX]; // socket file during setup 172 int listener; // listener socket (file descriptor) 168 173 169 174 // register function to cleanup 170 175 ::atexit(listener_cleanup); 176 177 int n = snprintf(path, UNIX_PATH_MAX, "%s/.java_pid%d", 178 os::get_temp_directory(), os::current_process_id()); 179 if (n <= (int)UNIX_PATH_MAX) { 180 n = snprintf(initial_path, UNIX_PATH_MAX, "%s.tmp", path); 181 } 182 if (n > (int)UNIX_PATH_MAX) { 183 return -1; 184 } 171 185 172 186 // create the listener socket … … 176 190 } 177 191 178 int res = -1;192 // bind socket 179 193 struct sockaddr_un addr; 180 194 addr.sun_family = AF_UNIX; 181 182 // FIXME: Prior to b39 the tool-side API expected to find the well 183 // known file in the working directory. To allow this libjvm.so work with 184 // a pre-b39 SDK we create it in the working directory if 185 // +StartAttachListener is used is used. All unit tests for this feature 186 // currently used this flag. Once b39 SDK has been promoted we can remove 187 // this code. 188 if (StartAttachListener) { 189 sprintf(path, ".java_pid%d", os::current_process_id()); 190 strcpy(addr.sun_path, path); 191 ::unlink(path); 192 res = ::bind(listener, (struct sockaddr*)&addr, sizeof(addr)); 193 } 194 if (res == -1) { 195 sprintf(path, "%s/.java_pid%d", os::get_temp_directory(), os::current_process_id()); 196 strcpy(addr.sun_path, path); 197 ::unlink(path); 198 res = ::bind(listener, (struct sockaddr*)&addr, sizeof(addr)); 199 } 195 strcpy(addr.sun_path, initial_path); 196 ::unlink(initial_path); 197 int res = ::bind(listener, (struct sockaddr*)&addr, sizeof(addr)); 200 198 if (res == -1) { 201 199 RESTARTABLE(::close(listener), res); 202 200 return -1; 203 201 } 202 203 // put in listen mode, set permissions, and rename into place 204 res = ::listen(listener, 5); 205 if (res == 0) { 206 RESTARTABLE(::chmod(initial_path, S_IREAD|S_IWRITE), res); 207 if (res == 0) { 208 res = ::rename(initial_path, path); 209 } 210 } 211 if (res == -1) { 212 RESTARTABLE(::close(listener), res); 213 ::unlink(initial_path); 214 return -1; 215 } 204 216 set_path(path); 205 206 // put in listen mode and set permission207 if ((::listen(listener, 5) == -1) || (::chmod(path, S_IREAD|S_IWRITE) == -1)) {208 RESTARTABLE(::close(listener), res);209 ::unlink(path);210 set_path(NULL);211 return -1;212 }213 217 set_listener(listener); 214 218 … … 461 465 return false; // initialized at startup or already initialized 462 466 } 463 char fn[ 32];467 char fn[PATH_MAX+1]; 464 468 sprintf(fn, ".attach_pid%d", os::current_process_id()); 465 469 int ret; … … 467 471 RESTARTABLE(::stat64(fn, &st), ret); 468 472 if (ret == -1) { 469 sprintf(fn, "/tmp/.attach_pid%d", os::current_process_id()); 473 snprintf(fn, sizeof(fn), "%s/.attach_pid%d", 474 os::get_temp_directory(), os::current_process_id()); 470 475 RESTARTABLE(::stat64(fn, &st), ret); 471 476 } -
trunk/openjdk/hotspot/src/os/linux/vm/c1_globals_linux.hpp
r2 r278 1 1 /* 2 * Copyright 2000-2001 Sun Microsystems, Inc. All Rights Reserved.2 * Copyright (c) 2000, 2001, Oracle and/or its affiliates. All rights reserved. 3 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 4 * … … 17 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 18 * 19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,20 * CA 95054 USA or visit www.sun.com if you need additional information or21 * have anyquestions.19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 22 * 23 23 */ -
trunk/openjdk/hotspot/src/os/linux/vm/c2_globals_linux.hpp
r2 r278 1 1 /* 2 * Copyright 2000-2001 Sun Microsystems, Inc. All Rights Reserved.2 * Copyright (c) 2000, 2001, Oracle and/or its affiliates. All rights reserved. 3 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 4 * … … 17 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 18 * 19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,20 * CA 95054 USA or visit www.sun.com if you need additional information or21 * have anyquestions.19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 22 * 23 23 */ -
trunk/openjdk/hotspot/src/os/linux/vm/chaitin_linux.cpp
r2 r278 1 1 /* 2 * Copyright 1999-2001 Sun Microsystems, Inc. All Rights Reserved.2 * Copyright (c) 1999, 2001, Oracle and/or its affiliates. All rights reserved. 3 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 4 * … … 17 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 18 * 19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,20 * CA 95054 USA or visit www.sun.com if you need additional information or21 * have anyquestions.19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 22 * 23 23 */ -
trunk/openjdk/hotspot/src/os/linux/vm/dtraceJSDT_linux.cpp
r2 r278 1 1 /* 2 * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved.2 * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved. 3 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 4 * … … 17 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 18 * 19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,20 * CA 95054 USA or visit www.sun.com if you need additional information or21 * have anyquestions.19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 22 * 23 23 */ -
trunk/openjdk/hotspot/src/os/linux/vm/globals_linux.hpp
r2 r278 1 1 /* 2 * Copyright 2005-2008 Sun Microsystems, Inc. All Rights Reserved.2 * Copyright (c) 2005, 2008, Oracle and/or its affiliates. All rights reserved. 3 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 4 * … … 17 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 18 * 19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,20 * CA 95054 USA or visit www.sun.com if you need additional information or21 * have anyquestions.19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 22 * 23 23 */ … … 30 30 "enable support for Oprofile profiler") \ 31 31 \ 32 product(bool, UseLinuxPosixThreadCPUClocks, false, \ 33 "enable fast Linux Posix clocks where available") \ 34 32 product(bool, UseLinuxPosixThreadCPUClocks, true, \ 33 "enable fast Linux Posix clocks where available") 34 // NB: The default value of UseLinuxPosixThreadCPUClocks may be 35 // overridden in Arguments::parse_each_vm_init_arg. 35 36 36 37 // -
trunk/openjdk/hotspot/src/os/linux/vm/hpi_linux.cpp
r2 r278 1 1 /* 2 * Copyright 1999-2006 Sun Microsystems, Inc. All Rights Reserved.2 * Copyright (c) 1999, 2006, Oracle and/or its affiliates. All rights reserved. 3 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 4 * … … 17 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 18 * 19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,20 * CA 95054 USA or visit www.sun.com if you need additional information or21 * have anyquestions.19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 22 * 23 23 */ -
trunk/openjdk/hotspot/src/os/linux/vm/hpi_linux.hpp
r2 r278 1 1 /* 2 * Copyright 1999-2005 Sun Microsystems, Inc. All Rights Reserved.2 * Copyright (c) 1999, 2005, Oracle and/or its affiliates. All rights reserved. 3 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 4 * … … 17 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 18 * 19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,20 * CA 95054 USA or visit www.sun.com if you need additional information or21 * have anyquestions.19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 22 * 23 23 */ -
trunk/openjdk/hotspot/src/os/linux/vm/interfaceSupport_linux.hpp
r2 r278 1 1 /* 2 * Copyright 2005 Sun Microsystems, Inc. All Rights Reserved.2 * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved. 3 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 4 * … … 17 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 18 * 19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,20 * CA 95054 USA or visit www.sun.com if you need additional information or21 * have anyquestions.19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 22 * 23 23 */ -
trunk/openjdk/hotspot/src/os/linux/vm/jsig.c
r2 r278 1 1 /* 2 * Copyright 2001-2006 Sun Microsystems, Inc. All Rights Reserved.2 * Copyright (c) 2001, 2006, Oracle and/or its affiliates. All rights reserved. 3 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 4 * … … 17 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 18 * 19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,20 * CA 95054 USA or visit www.sun.com if you need additional information or21 * have anyquestions.19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 22 * 23 23 */ -
trunk/openjdk/hotspot/src/os/linux/vm/jvm_linux.cpp
r2 r278 1 1 /* 2 * Copyright 1999-2007 Sun Microsystems, Inc. All Rights Reserved.2 * Copyright (c) 1999, 2007, Oracle and/or its affiliates. All rights reserved. 3 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 4 * … … 17 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 18 * 19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,20 * CA 95054 USA or visit www.sun.com if you need additional information or21 * have anyquestions.19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 22 * 23 23 */ -
trunk/openjdk/hotspot/src/os/linux/vm/jvm_linux.h
r2 r278 1 1 /* 2 * Copyright 1999-2005 Sun Microsystems, Inc. All Rights Reserved.2 * Copyright (c) 1999, 2005, Oracle and/or its affiliates. All rights reserved. 3 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 4 * … … 17 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 18 * 19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,20 * CA 95054 USA or visit www.sun.com if you need additional information or21 * have anyquestions.19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 22 * 23 23 */ -
trunk/openjdk/hotspot/src/os/linux/vm/mutex_linux.cpp
r2 r278 1 1 /* 2 * Copyright (c) 2007 Sun Microsystems, Inc. All Rights Reserved.2 * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. 3 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 4 * … … 17 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 18 * 19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,20 * CA 95054 USA or visit www.sun.com if you need additional information or21 * have anyquestions.19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 22 * 23 23 */ -
trunk/openjdk/hotspot/src/os/linux/vm/mutex_linux.inline.hpp
r2 r278 1 1 /* 2 * Copyright 1999-2002 Sun Microsystems, Inc. All Rights Reserved.2 * Copyright (c) 1999, 2002, Oracle and/or its affiliates. All rights reserved. 3 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 4 * … … 17 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 18 * 19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,20 * CA 95054 USA or visit www.sun.com if you need additional information or21 * have anyquestions.19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 22 * 23 23 */ -
trunk/openjdk/hotspot/src/os/linux/vm/objectMonitor_linux.cpp
r2 r278 1 1 2 2 /* 3 * Copyright 1999-2005 Sun Microsystems, Inc. All Rights Reserved.3 * Copyright (c) 1999, 2005, Oracle and/or its affiliates. All rights reserved. 4 4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 5 5 * … … 18 18 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 19 19 * 20 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,21 * CA 95054 USA or visit www.sun.com if you need additional information or22 * have anyquestions.20 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 21 * or visit www.oracle.com if you need additional information or have any 22 * questions. 23 23 * 24 24 */ -
trunk/openjdk/hotspot/src/os/linux/vm/objectMonitor_linux.hpp
r2 r278 1 1 /* 2 * Copyright 1999-2005 Sun Microsystems, Inc. All Rights Reserved.2 * Copyright (c) 1999, 2005, Oracle and/or its affiliates. All rights reserved. 3 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 4 * … … 17 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 18 * 19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,20 * CA 95054 USA or visit www.sun.com if you need additional information or21 * have anyquestions.19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 22 * 23 23 */ -
trunk/openjdk/hotspot/src/os/linux/vm/objectMonitor_linux.inline.hpp
r2 r278 1 1 /* 2 * Copyright 1999-2005 Sun Microsystems, Inc. All Rights Reserved.2 * Copyright (c) 1999, 2005, Oracle and/or its affiliates. All rights reserved. 3 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 4 * … … 17 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 18 * 19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,20 * CA 95054 USA or visit www.sun.com if you need additional information or21 * have anyquestions.19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 22 * 23 23 */ -
trunk/openjdk/hotspot/src/os/linux/vm/osThread_linux.cpp
r2 r278 1 1 /* 2 * Copyright 1999-2004 Sun Microsystems, Inc. All Rights Reserved.2 * Copyright (c) 1999, 2004, Oracle and/or its affiliates. All rights reserved. 3 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 4 * … … 17 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 18 * 19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,20 * CA 95054 USA or visit www.sun.com if you need additional information or21 * have anyquestions.19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 22 * 23 23 */ -
trunk/openjdk/hotspot/src/os/linux/vm/osThread_linux.hpp
r2 r278 1 1 /* 2 * Copyright 1999-2004 Sun Microsystems, Inc. All Rights Reserved.2 * Copyright (c) 1999, 2004, Oracle and/or its affiliates. All rights reserved. 3 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 4 * … … 17 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 18 * 19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,20 * CA 95054 USA or visit www.sun.com if you need additional information or21 * have anyquestions.19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 22 * 23 23 */ -
trunk/openjdk/hotspot/src/os/linux/vm/os_linux.cpp
r2 r278 1 1 /* 2 * Copyright 1999-2009 Sun Microsystems, Inc. All Rights Reserved.2 * Copyright (c) 1999, 2009, Oracle and/or its affiliates. All rights reserved. 3 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 4 * … … 17 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 18 * 19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,20 * CA 95054 USA or visit www.sun.com if you need additional information or21 * have anyquestions.19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 22 * 23 23 */ 24 25 # define __STDC_FORMAT_MACROS 24 26 25 27 // do not include precompiled header file … … 29 31 # include <sys/types.h> 30 32 # include <sys/mman.h> 33 # include <sys/stat.h> 34 # include <sys/select.h> 31 35 # include <pthread.h> 32 36 # include <signal.h> … … 54 58 # include <sys/shm.h> 55 59 # include <link.h> 60 # include <stdint.h> 61 # include <inttypes.h> 56 62 57 63 #define MAX_PATH (2 * K) … … 185 191 #elif defined(AMD64) 186 192 static char cpu_arch[] = "amd64"; 193 #elif defined(ARM) 194 static char cpu_arch[] = "arm"; 195 #elif defined(PPC) 196 static char cpu_arch[] = "ppc"; 187 197 #elif defined(SPARC) 188 198 # ifdef _LP64 … … 224 234 225 235 void os::Linux::initialize_system_info() { 226 _processor_count = sysconf(_SC_NPROCESSORS_CONF);227 if ( _processor_count== 1) {236 set_processor_count(sysconf(_SC_NPROCESSORS_CONF)); 237 if (processor_count() == 1) { 228 238 pid_t pid = os::Linux::gettid(); 229 239 char fname[32]; … … 237 247 } 238 248 _physical_memory = (julong)sysconf(_SC_PHYS_PAGES) * (julong)sysconf(_SC_PAGESIZE); 239 assert( _processor_count> 0, "linux error");249 assert(processor_count() > 0, "linux error"); 240 250 } 241 251 … … 1134 1144 uintptr_t start; 1135 1145 uintptr_t vsize; 1136 uintptr_t rss;1137 u nsigned longrsslim;1146 intptr_t rss; 1147 uintptr_t rsslim; 1138 1148 uintptr_t scodes; 1139 1149 uintptr_t ecode; … … 1165 1175 do s++; while (isspace(*s)); 1166 1176 1167 /* 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 */ 1168 /* 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 */ 1169 i = sscanf(s, "%c %d %d %d %d %d %lu %lu %lu %lu %lu %lu %lu %ld %ld %ld %ld %ld %ld " 1170 UINTX_FORMAT UINTX_FORMAT UINTX_FORMAT1171 " %lu "1172 UINTX_FORMAT UINTX_FORMAT UINTX_FORMAT,1177 #define _UFM UINTX_FORMAT 1178 #define _DFM INTX_FORMAT 1179 1180 /* 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 */ 1181 /* 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 */ 1182 i = sscanf(s, "%c %d %d %d %d %d %lu %lu %lu %lu %lu %lu %lu %ld %ld %ld %ld %ld %ld " _UFM _UFM _DFM _UFM _UFM _UFM _UFM, 1173 1183 &state, /* 3 %c */ 1174 1184 &ppid, /* 4 %d */ … … 1190 1200 &junk, /* 20 %ld */ 1191 1201 &it_real, /* 21 %ld */ 1192 &start, /* 22 UINTX_FORMAT 1193 &vsize, /* 23 UINTX_FORMAT 1194 &rss, /* 24 UINTX_FORMAT */1195 &rsslim, /* 25 %lu*/1196 &scodes, /* 26 UINTX_FORMAT 1197 &ecode, /* 27 UINTX_FORMAT 1198 &stack_start); /* 28 UINTX_FORMAT 1202 &start, /* 22 UINTX_FORMAT */ 1203 &vsize, /* 23 UINTX_FORMAT */ 1204 &rss, /* 24 INTX_FORMAT */ 1205 &rsslim, /* 25 UINTX_FORMAT */ 1206 &scodes, /* 26 UINTX_FORMAT */ 1207 &ecode, /* 27 UINTX_FORMAT */ 1208 &stack_start); /* 28 UINTX_FORMAT */ 1199 1209 } 1210 1211 #undef _UFM 1212 #undef _DFM 1200 1213 1201 1214 if (i != 28 - 2) { … … 1333 1346 #if defined(IA32) || defined(AMD64) 1334 1347 #define SYS_clock_getres IA32_ONLY(266) AMD64_ONLY(229) 1348 #define sys_clock_getres(x,y) ::syscall(SYS_clock_getres, x, y) 1335 1349 #else 1336 #error Value of SYS_clock_getres not known on this platform 1350 #warning "SYS_clock_getres not defined for this platform, disabling fast_thread_cpu_time" 1351 #define sys_clock_getres(x,y) -1 1337 1352 #endif 1338 1353 1354 #else 1355 #define sys_clock_getres(x,y) ::syscall(SYS_clock_getres, x, y) 1339 1356 #endif 1340 1341 #define sys_clock_getres(x,y) ::syscall(SYS_clock_getres, x, y)1342 1357 1343 1358 void os::Linux::fast_thread_clock_init() { … … 1519 1534 const char* os::dll_file_extension() { return ".so"; } 1520 1535 1521 const char* os::get_temp_directory() { return "/tmp/"; } 1536 // This must be hard coded because it's the system's temporary 1537 // directory not the java application's temp directory, ala java.io.tmpdir. 1538 const char* os::get_temp_directory() { return "/tmp"; } 1522 1539 1523 1540 static bool file_exists(const char* filename) { … … 1899 1916 !_print_ascii_file("/etc/turbolinux-release", st) && 1900 1917 !_print_ascii_file("/etc/gentoo-release", st) && 1901 !_print_ascii_file("/etc/debian_version", st)) { 1918 !_print_ascii_file("/etc/debian_version", st) && 1919 !_print_ascii_file("/etc/ltib-release", st) && 1920 !_print_ascii_file("/etc/angstrom-version", st)) { 1902 1921 st->print("Linux"); 1903 1922 } … … 1964 1983 os::loadavg(loadavg, 3); 1965 1984 st->print("%0.02f %0.02f %0.02f", loadavg[0], loadavg[1], loadavg[2]); 1985 st->cr(); 1986 1987 // meminfo 1988 st->print("\n/proc/meminfo:\n"); 1989 _print_ascii_file("/proc/meminfo", st); 1966 1990 st->cr(); 1967 1991 } … … 2073 2097 2074 2098 // Find the full path to the current module, libjvm.so or libjvm_g.so 2075 void os::jvm_path(char *buf, jint len) {2099 void os::jvm_path(char *buf, jint buflen) { 2076 2100 // Error checking. 2077 if ( len < MAXPATHLEN) {2101 if (buflen < MAXPATHLEN) { 2078 2102 assert(false, "must use a large-enough buffer"); 2079 2103 buf[0] = '\0'; … … 2091 2115 dli_fname, sizeof(dli_fname), NULL); 2092 2116 assert(ret != 0, "cannot locate libjvm"); 2093 if (realpath(dli_fname, buf) == NULL) 2117 char *rp = realpath(dli_fname, buf); 2118 if (rp == NULL) 2094 2119 return; 2095 2120 … … 2111 2136 char* java_home_var = ::getenv("JAVA_HOME"); 2112 2137 if (java_home_var != NULL && java_home_var[0] != 0) { 2138 char* jrelib_p; 2139 int len; 2140 2113 2141 // Check the current module name "libjvm.so" or "libjvm_g.so". 2114 2142 p = strrchr(buf, '/'); … … 2116 2144 p = strstr(p, "_g") ? "_g" : ""; 2117 2145 2118 if (realpath(java_home_var, buf) == NULL) 2146 rp = realpath(java_home_var, buf); 2147 if (rp == NULL) 2119 2148 return; 2120 sprintf(buf + strlen(buf), "/jre/lib/%s", cpu_arch); 2149 2150 // determine if this is a legacy image or modules image 2151 // modules image doesn't have "jre" subdirectory 2152 len = strlen(buf); 2153 jrelib_p = buf + len; 2154 snprintf(jrelib_p, buflen-len, "/jre/lib/%s", cpu_arch); 2155 if (0 != access(buf, F_OK)) { 2156 snprintf(jrelib_p, buflen-len, "/lib/%s", cpu_arch); 2157 } 2158 2121 2159 if (0 == access(buf, F_OK)) { 2122 2160 // Use current module name "libjvm[_g].so" instead of … … 2125 2163 // It is used when we are choosing the HPI library's name 2126 2164 // "libhpi[_g].so" in hpi::initialize_get_interface(). 2127 sprintf(buf + strlen(buf), "/hotspot/libjvm%s.so", p); 2165 len = strlen(buf); 2166 snprintf(buf + len, buflen-len, "/hotspot/libjvm%s.so", p); 2128 2167 } else { 2129 2168 // Go back to path of .so 2130 if (realpath(dli_fname, buf) == NULL) 2169 rp = realpath(dli_fname, buf); 2170 if (rp == NULL) 2131 2171 return; 2132 2172 } … … 2299 2339 } 2300 2340 2301 char buf[ 40];2341 char buf[PATH_MAX+1]; 2302 2342 int num = Atomic::add(1, &cnt); 2303 2343 2304 sprintf(buf, "/tmp/hs-vm-%d-%d", os::current_process_id(), num); 2344 snprintf(buf, sizeof(buf), "%s/hs-vm-%d-%d", 2345 os::get_temp_directory(), os::current_process_id(), num); 2305 2346 unlink(buf); 2306 2347 … … 2488 2529 2489 2530 bool os::uncommit_memory(char* addr, size_t size) { 2490 return ::mmap(addr, size, PROT_NONE, 2491 MAP_PRIVATE|MAP_FIXED|MAP_NORESERVE|MAP_ANONYMOUS, -1, 0) 2492 != MAP_FAILED; 2531 uintptr_t res = (uintptr_t) ::mmap(addr, size, PROT_NONE, 2532 MAP_PRIVATE|MAP_FIXED|MAP_NORESERVE|MAP_ANONYMOUS, -1, 0); 2533 return res != (uintptr_t) MAP_FAILED; 2534 } 2535 2536 // Linux uses a growable mapping for the stack, and if the mapping for 2537 // the stack guard pages is not removed when we detach a thread the 2538 // stack cannot grow beyond the pages where the stack guard was 2539 // mapped. If at some point later in the process the stack expands to 2540 // that point, the Linux kernel cannot expand the stack any further 2541 // because the guard pages are in the way, and a segfault occurs. 2542 // 2543 // However, it's essential not to split the stack region by unmapping 2544 // a region (leaving a hole) that's already part of the stack mapping, 2545 // so if the stack mapping has already grown beyond the guard pages at 2546 // the time we create them, we have to truncate the stack mapping. 2547 // So, we need to know the extent of the stack mapping when 2548 // create_stack_guard_pages() is called. 2549 2550 // Find the bounds of the stack mapping. Return true for success. 2551 // 2552 // We only need this for stacks that are growable: at the time of 2553 // writing thread stacks don't use growable mappings (i.e. those 2554 // creeated with MAP_GROWSDOWN), and aren't marked "[stack]", so this 2555 // only applies to the main thread. 2556 static bool 2557 get_stack_bounds(uintptr_t *bottom, uintptr_t *top) 2558 { 2559 FILE *f = fopen("/proc/self/maps", "r"); 2560 if (f == NULL) 2561 return false; 2562 2563 while (!feof(f)) { 2564 size_t dummy; 2565 char *str = NULL; 2566 ssize_t len = getline(&str, &dummy, f); 2567 if (len == -1) { 2568 fclose(f); 2569 return false; 2570 } 2571 2572 if (len > 0 && str[len-1] == '\n') { 2573 str[len-1] = 0; 2574 len--; 2575 } 2576 2577 static const char *stack_str = "[stack]"; 2578 if (len > (ssize_t)strlen(stack_str) 2579 && (strcmp(str + len - strlen(stack_str), stack_str) == 0)) { 2580 if (sscanf(str, "%" SCNxPTR "-%" SCNxPTR, bottom, top) == 2) { 2581 uintptr_t sp = (uintptr_t)__builtin_frame_address(0); 2582 if (sp >= *bottom && sp <= *top) { 2583 free(str); 2584 fclose(f); 2585 return true; 2586 } 2587 } 2588 } 2589 free(str); 2590 } 2591 fclose(f); 2592 return false; 2593 } 2594 2595 // If the (growable) stack mapping already extends beyond the point 2596 // where we're going to put our guard pages, truncate the mapping at 2597 // that point by munmap()ping it. This ensures that when we later 2598 // munmap() the guard pages we don't leave a hole in the stack 2599 // mapping. This only affects the main/initial thread, but guard 2600 // against future OS changes 2601 bool os::create_stack_guard_pages(char* addr, size_t size) { 2602 uintptr_t stack_extent, stack_base; 2603 bool chk_bounds = NOT_DEBUG(os::Linux::is_initial_thread()) DEBUG_ONLY(true); 2604 if (chk_bounds && get_stack_bounds(&stack_extent, &stack_base)) { 2605 assert(os::Linux::is_initial_thread(), 2606 "growable stack in non-initial thread"); 2607 if (stack_extent < (uintptr_t)addr) 2608 ::munmap((void*)stack_extent, (uintptr_t)addr - stack_extent); 2609 } 2610 2611 return os::commit_memory(addr, size); 2612 } 2613 2614 // If this is a growable mapping, remove the guard pages entirely by 2615 // munmap()ping them. If not, just call uncommit_memory(). This only 2616 // affects the main/initial thread, but guard against future OS changes 2617 bool os::remove_stack_guard_pages(char* addr, size_t size) { 2618 uintptr_t stack_extent, stack_base; 2619 bool chk_bounds = NOT_DEBUG(os::Linux::is_initial_thread()) DEBUG_ONLY(true); 2620 if (chk_bounds && get_stack_bounds(&stack_extent, &stack_base)) { 2621 assert(os::Linux::is_initial_thread(), 2622 "growable stack in non-initial thread"); 2623 2624 return ::munmap(addr, size) == 0; 2625 } 2626 2627 return os::uncommit_memory(addr, size); 2493 2628 } 2494 2629 … … 2613 2748 2614 2749 #ifndef ZERO 2615 _large_page_size = IA32_ONLY(4 * M) AMD64_ONLY(2 * M) IA64_ONLY(256 * M) SPARC_ONLY(4 * M); 2750 _large_page_size = IA32_ONLY(4 * M) AMD64_ONLY(2 * M) IA64_ONLY(256 * M) SPARC_ONLY(4 * M) 2751 ARM_ONLY(2 * M) PPC_ONLY(4 * M); 2616 2752 #endif // ZERO 2617 2753 … … 2696 2832 2697 2833 // attach to the region 2698 addr = (char*)shmat(shmid, NULL, 0);2834 addr = (char*)shmat(shmid, req_addr, 0); 2699 2835 int err = errno; 2700 2836 … … 3403 3539 // old sigaction on it own. 3404 3540 } else { 3405 fatal2("Encountered unexpected pre-existing sigaction handler %#lx for signal %d.", (long)oldhand, sig); 3541 fatal(err_msg("Encountered unexpected pre-existing sigaction handler " 3542 "%#lx for signal %d.", (long)oldhand, sig)); 3406 3543 } 3407 3544 } … … 3725 3862 Linux::set_page_size(sysconf(_SC_PAGESIZE)); 3726 3863 if (Linux::page_size() == -1) { 3727 fatal1("os_linux.cpp: os::init: sysconf failed (%s)", strerror(errno)); 3864 fatal(err_msg("os_linux.cpp: os::init: sysconf failed (%s)", 3865 strerror(errno))); 3728 3866 } 3729 3867 init_page_sizes((size_t) Linux::page_size()); … … 3873 4011 return JNI_OK; 3874 4012 } 4013 4014 // this is called at the end of vm_initialization 4015 void os::init_3(void) { } 3875 4016 3876 4017 // Mark the polling page as unreadable … … 3954 4095 // debug support 3955 4096 3956 #ifndef PRODUCT3957 4097 static address same_page(address x, address y) { 3958 4098 int page_bits = -os::vm_page_size(); … … 3965 4105 } 3966 4106 3967 bool os::find(address addr ) {4107 bool os::find(address addr, outputStream* st) { 3968 4108 Dl_info dlinfo; 3969 4109 memset(&dlinfo, 0, sizeof(dlinfo)); 3970 4110 if (dladdr(addr, &dlinfo)) { 3971 tty->print(PTR_FORMAT ": ", addr);4111 st->print(PTR_FORMAT ": ", addr); 3972 4112 if (dlinfo.dli_sname != NULL) { 3973 tty->print("%s+%#x", dlinfo.dli_sname,4113 st->print("%s+%#x", dlinfo.dli_sname, 3974 4114 addr - (intptr_t)dlinfo.dli_saddr); 3975 4115 } else if (dlinfo.dli_fname) { 3976 tty->print("<offset %#x>", addr - (intptr_t)dlinfo.dli_fbase);4116 st->print("<offset %#x>", addr - (intptr_t)dlinfo.dli_fbase); 3977 4117 } else { 3978 tty->print("<absolute address>");4118 st->print("<absolute address>"); 3979 4119 } 3980 4120 if (dlinfo.dli_fname) { 3981 tty->print(" in %s", dlinfo.dli_fname);4121 st->print(" in %s", dlinfo.dli_fname); 3982 4122 } 3983 4123 if (dlinfo.dli_fbase) { 3984 tty->print(" at " PTR_FORMAT, dlinfo.dli_fbase);3985 } 3986 tty->cr();4124 st->print(" at " PTR_FORMAT, dlinfo.dli_fbase); 4125 } 4126 st->cr(); 3987 4127 3988 4128 if (Verbose) { … … 3997 4137 && end > dlinfo2.dli_saddr && dlinfo2.dli_saddr > begin) 3998 4138 end = (address) dlinfo2.dli_saddr; 3999 Disassembler::decode(begin, end );4139 Disassembler::decode(begin, end, st); 4000 4140 } 4001 4141 return true; … … 4003 4143 return false; 4004 4144 } 4005 4006 #endif4007 4145 4008 4146 //////////////////////////////////////////////////////////////////////////////// … … 4214 4352 long sys_time, user_time; 4215 4353 char string[64]; 4354 char cdummy; 4216 4355 int idummy; 4217 4356 long ldummy; … … 4274 4413 do s++; while (isspace(*s)); 4275 4414 4276 count = sscanf(s,"% *c %d %d %d %d %d %lu %lu %lu %lu %lu %lu %lu",4277 & idummy, &idummy, &idummy, &idummy, &idummy,4415 count = sscanf(s,"%c %d %d %d %d %d %lu %lu %lu %lu %lu %lu %lu", 4416 &cdummy, &idummy, &idummy, &idummy, &idummy, &idummy, 4278 4417 &ldummy, &ldummy, &ldummy, &ldummy, &ldummy, 4279 4418 &user_time, &sys_time); 4280 if ( count != 1 2) return -1;4419 if ( count != 13 ) return -1; 4281 4420 if (user_sys_cpu_time) { 4282 4421 return ((jlong)sys_time + (jlong)user_time) * (1000000000 / clock_tics_per_sec); … … 4767 4906 jt->java_suspend_self(); 4768 4907 } 4908 4769 4909 OrderAccess::fence(); 4770 4910 } … … 4872 5012 } 4873 5013 } 5014 5015 // is_headless_jre() 5016 // 5017 // Test for the existence of libmawt in motif21 or xawt directories 5018 // in order to report if we are running in a headless jre 5019 // 5020 bool os::is_headless_jre() { 5021 struct stat statbuf; 5022 char buf[MAXPATHLEN]; 5023 char libmawtpath[MAXPATHLEN]; 5024 const char *xawtstr = "/xawt/libmawt.so"; 5025 const char *motifstr = "/motif21/libmawt.so"; 5026 char *p; 5027 5028 // Get path to libjvm.so 5029 os::jvm_path(buf, sizeof(buf)); 5030 5031 // Get rid of libjvm.so 5032 p = strrchr(buf, '/'); 5033 if (p == NULL) return false; 5034 else *p = '\0'; 5035 5036 // Get rid of client or server 5037 p = strrchr(buf, '/'); 5038 if (p == NULL) return false; 5039 else *p = '\0'; 5040 5041 // check xawt/libmawt.so 5042 strcpy(libmawtpath, buf); 5043 strcat(libmawtpath, xawtstr); 5044 if (::stat(libmawtpath, &statbuf) == 0) return false; 5045 5046 // check motif21/libmawt.so 5047 strcpy(libmawtpath, buf); 5048 strcat(libmawtpath, motifstr); 5049 if (::stat(libmawtpath, &statbuf) == 0) return false; 5050 5051 return true; 5052 } 5053 -
trunk/openjdk/hotspot/src/os/linux/vm/os_linux.hpp
r2 r278 1 1 /* 2 * Copyright 1999-2009 Sun Microsystems, Inc. All Rights Reserved.2 * Copyright (c) 1999, 2009, Oracle and/or its affiliates. All rights reserved. 3 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 4 * … … 17 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 18 * 19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,20 * CA 95054 USA or visit www.sun.com if you need additional information or21 * have anyquestions.19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 22 * 23 23 */ -
trunk/openjdk/hotspot/src/os/linux/vm/os_linux.inline.hpp
r2 r278 1 1 /* 2 * Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved.2 * Copyright (c) 1999, 2008, Oracle and/or its affiliates. All rights reserved. 3 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 4 * … … 17 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 18 * 19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,20 * CA 95054 USA or visit www.sun.com if you need additional information or21 * have anyquestions.19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 22 * 23 23 */ -
trunk/openjdk/hotspot/src/os/linux/vm/os_share_linux.hpp
r2 r278 1 1 /* 2 * Copyright 1999-2003 Sun Microsystems, Inc. All Rights Reserved.2 * Copyright (c) 1999, 2003, Oracle and/or its affiliates. All rights reserved. 3 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 4 * … … 17 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 18 * 19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,20 * CA 95054 USA or visit www.sun.com if you need additional information or21 * have anyquestions.19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 22 * 23 23 */ -
trunk/openjdk/hotspot/src/os/linux/vm/perfMemory_linux.cpp
r2 r278 1 1 /* 2 * Copyright 2001-2006 Sun Microsystems, Inc. All Rights Reserved.2 * Copyright (c) 2001, 2006, Oracle and/or its affiliates. All rights reserved. 3 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 4 * … … 17 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 18 * 19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,20 * CA 95054 USA or visit www.sun.com if you need additional information or21 * have anyquestions.19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 22 * 23 23 */ … … 146 146 const char* tmpdir = os::get_temp_directory(); 147 147 const char* perfdir = PERFDATA_NAME; 148 size_t nbytes = strlen(tmpdir) + strlen(perfdir) + strlen(user) + 2;148 size_t nbytes = strlen(tmpdir) + strlen(perfdir) + strlen(user) + 3; 149 149 char* dirname = NEW_C_HEAP_ARRAY(char, nbytes); 150 150 151 151 // construct the path name to user specific tmp directory 152 snprintf(dirname, nbytes, "%s %s_%s", tmpdir, perfdir, user);152 snprintf(dirname, nbytes, "%s/%s_%s", tmpdir, perfdir, user); 153 153 154 154 return dirname; … … 332 332 333 333 char* usrdir_name = NEW_C_HEAP_ARRAY(char, 334 strlen(tmpdirname) + strlen(dentry->d_name) + 1);334 strlen(tmpdirname) + strlen(dentry->d_name) + 2); 335 335 strcpy(usrdir_name, tmpdirname); 336 strcat(usrdir_name, "/"); 336 337 strcat(usrdir_name, dentry->d_name); 337 338 -
trunk/openjdk/hotspot/src/os/linux/vm/stubRoutines_linux.cpp
r2 r278 1 1 /* 2 * Copyright 2001 Sun Microsystems, Inc. All Rights Reserved.2 * Copyright (c) 2001, Oracle and/or its affiliates. All rights reserved. 3 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 4 * … … 17 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 18 * 19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,20 * CA 95054 USA or visit www.sun.com if you need additional information or21 * have anyquestions.19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 22 * 23 23 */ -
trunk/openjdk/hotspot/src/os/linux/vm/threadCritical_linux.cpp
r2 r278 1 1 /* 2 * Copyright 2001-2006 Sun Microsystems, Inc. All Rights Reserved.2 * Copyright (c) 2001, 2006, Oracle and/or its affiliates. All rights reserved. 3 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 4 * … … 17 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 18 * 19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,20 * CA 95054 USA or visit www.sun.com if you need additional information or21 * have anyquestions.19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 22 * 23 23 */ -
trunk/openjdk/hotspot/src/os/linux/vm/thread_linux.inline.hpp
r2 r278 1 1 /* 2 * Copyright 2002-2003 Sun Microsystems, Inc. All Rights Reserved.2 * Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved. 3 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 4 * … … 17 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 18 * 19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,20 * CA 95054 USA or visit www.sun.com if you need additional information or21 * have anyquestions.19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 22 * 23 23 */ -
trunk/openjdk/hotspot/src/os/linux/vm/vmError_linux.cpp
r2 r278 1 1 /* 2 * Copyright 2003-2006 Sun Microsystems, Inc. All Rights Reserved.2 * Copyright (c) 2003, 2006, Oracle and/or its affiliates. All rights reserved. 3 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 4 * … … 17 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 18 * 19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,20 * CA 95054 USA or visit www.sun.com if you need additional information or21 * have anyquestions.19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 22 * 23 23 */
Note:
See TracChangeset
for help on using the changeset viewer.