Ignore:
Timestamp:
Mar 26, 2011, 8:39:20 PM (14 years ago)
Author:
dmik
Message:

trunk: Merged in openjdk6 b22 from branches/vendor/oracle.

Location:
trunk/openjdk
Files:
3 deleted
104 edited

Legend:

Unmodified
Added
Removed
  • trunk/openjdk

  • trunk/openjdk/hotspot/src/os/linux/launcher/java.c

    r2 r278  
    11/*
    2  * Copyright 1999-2008 Sun Microsystems, Inc.  All Rights Reserved.
     2 * Copyright (c) 1999, 2008, Oracle and/or its affiliates. All rights reserved.
    33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    44 *
     
    1717 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1818 *
    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 or
    21  * have any questions.
     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.
    2222 *
    2323 */
  • trunk/openjdk/hotspot/src/os/linux/launcher/java.h

    r2 r278  
    11/*
    2  * Copyright 1999-2008 Sun Microsystems, Inc.  All Rights Reserved.
     2 * Copyright (c) 1999, 2008, Oracle and/or its affiliates. All rights reserved.
    33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    44 *
     
    1717 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1818 *
    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 or
    21  * have any questions.
     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.
    2222 *
    2323 */
  • trunk/openjdk/hotspot/src/os/linux/launcher/java_md.c

    r2 r278  
    11/*
    2  * Copyright 1999-2008 Sun Microsystems, Inc.  All Rights Reserved.
     2 * Copyright (c) 1999, 2008, Oracle and/or its affiliates. All rights reserved.
    33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    44 *
     
    1717 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1818 *
    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 or
    21  * have any questions.
     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.
    2222 *
    2323 */
     
    8080#  elif defined(__sparc)
    8181#    define ARCH "sparc"
     82#  elif defined(arm)
     83#    define ARCH "arm"
     84#  elif defined(PPC)
     85#    define ARCH "ppc"
    8286#  endif
    8387
  • trunk/openjdk/hotspot/src/os/linux/launcher/java_md.h

    r2 r278  
    11/*
    2  * Copyright 1999-2005 Sun Microsystems, Inc.  All Rights Reserved.
     2 * Copyright (c) 1999, 2005, Oracle and/or its affiliates. All rights reserved.
    33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    44 *
     
    1717 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1818 *
    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 or
    21  * have any questions.
     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.
    2222 *
    2323 */
  • trunk/openjdk/hotspot/src/os/linux/vm/attachListener_linux.cpp

    r2 r278  
    11/*
    2  * Copyright 2005-2008 Sun Microsystems, Inc.  All Rights Reserved.
     2 * Copyright (c) 2005, 2008, Oracle and/or its affiliates. All rights reserved.
    33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    44 *
     
    1717 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1818 *
    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 or
    21  * have any questions.
     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.
    2222 *
    2323 */
     
    3333#include <sys/stat.h>
    3434
     35#ifndef UNIX_PATH_MAX
     36#define UNIX_PATH_MAX   sizeof(((struct sockaddr_un *)0)->sun_path)
     37#endif
     38
    3539// The attach mechanism on Linux uses a UNIX domain socket. An attach listener
    3640// thread is created at startup or is created on-demand via a signal from
    3741// the client tool. The attach listener creates a socket and binds it to a file
    3842// 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,
    4044// executes it, and returns the response to the client via the socket
    4145// connection.
     
    5559 private:
    5660  // the path to which we bind the UNIX domain socket
    57   static char _path[PATH_MAX+1];
     61  static char _path[UNIX_PATH_MAX];
    5862  static bool _has_path;
    5963
     
    6569      _has_path = false;
    6670    } 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';
    6973      _has_path = true;
    7074    }
     
    114118
    115119// statics
    116 char LinuxAttachListener::_path[PATH_MAX+1];
     120char LinuxAttachListener::_path[UNIX_PATH_MAX];
    117121bool LinuxAttachListener::_has_path;
    118122int LinuxAttachListener::_listener = -1;
     
    164168
    165169int 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)
    168173
    169174  // register function to cleanup
    170175  ::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  }
    171185
    172186  // create the listener socket
     
    176190  }
    177191
    178   int res = -1;
     192  // bind socket
    179193  struct sockaddr_un addr;
    180194  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));
    200198  if (res == -1) {
    201199    RESTARTABLE(::close(listener), res);
    202200    return -1;
    203201  }
     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  }
    204216  set_path(path);
    205 
    206   // put in listen mode and set permission
    207   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   }
    213217  set_listener(listener);
    214218
     
    461465    return false;               // initialized at startup or already initialized
    462466  }
    463   char fn[32];
     467  char fn[PATH_MAX+1];
    464468  sprintf(fn, ".attach_pid%d", os::current_process_id());
    465469  int ret;
     
    467471  RESTARTABLE(::stat64(fn, &st), ret);
    468472  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());
    470475    RESTARTABLE(::stat64(fn, &st), ret);
    471476  }
  • trunk/openjdk/hotspot/src/os/linux/vm/c1_globals_linux.hpp

    r2 r278  
    11/*
    2  * Copyright 2000-2001 Sun Microsystems, Inc.  All Rights Reserved.
     2 * Copyright (c) 2000, 2001, Oracle and/or its affiliates. All rights reserved.
    33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    44 *
     
    1717 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1818 *
    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 or
    21  * have any questions.
     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.
    2222 *
    2323 */
  • trunk/openjdk/hotspot/src/os/linux/vm/c2_globals_linux.hpp

    r2 r278  
    11/*
    2  * Copyright 2000-2001 Sun Microsystems, Inc.  All Rights Reserved.
     2 * Copyright (c) 2000, 2001, Oracle and/or its affiliates. All rights reserved.
    33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    44 *
     
    1717 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1818 *
    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 or
    21  * have any questions.
     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.
    2222 *
    2323 */
  • trunk/openjdk/hotspot/src/os/linux/vm/chaitin_linux.cpp

    r2 r278  
    11/*
    2  * Copyright 1999-2001 Sun Microsystems, Inc.  All Rights Reserved.
     2 * Copyright (c) 1999, 2001, Oracle and/or its affiliates. All rights reserved.
    33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    44 *
     
    1717 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1818 *
    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 or
    21  * have any questions.
     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.
    2222 *
    2323 */
  • trunk/openjdk/hotspot/src/os/linux/vm/dtraceJSDT_linux.cpp

    r2 r278  
    11/*
    2  * Copyright 1997-2008 Sun Microsystems, Inc.  All Rights Reserved.
     2 * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
    33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    44 *
     
    1717 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1818 *
    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 or
    21  * have any questions.
     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.
    2222 *
    2323 */
  • trunk/openjdk/hotspot/src/os/linux/vm/globals_linux.hpp

    r2 r278  
    11/*
    2  * Copyright 2005-2008 Sun Microsystems, Inc.  All Rights Reserved.
     2 * Copyright (c) 2005, 2008, Oracle and/or its affiliates. All rights reserved.
    33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    44 *
     
    1717 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1818 *
    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 or
    21  * have any questions.
     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.
    2222 *
    2323 */
     
    3030        "enable support for Oprofile profiler")                     \
    3131                                                                    \
    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.
    3536
    3637//
  • trunk/openjdk/hotspot/src/os/linux/vm/hpi_linux.cpp

    r2 r278  
    11/*
    2  * Copyright 1999-2006 Sun Microsystems, Inc.  All Rights Reserved.
     2 * Copyright (c) 1999, 2006, Oracle and/or its affiliates. All rights reserved.
    33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    44 *
     
    1717 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1818 *
    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 or
    21  * have any questions.
     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.
    2222 *
    2323 */
  • trunk/openjdk/hotspot/src/os/linux/vm/hpi_linux.hpp

    r2 r278  
    11/*
    2  * Copyright 1999-2005 Sun Microsystems, Inc.  All Rights Reserved.
     2 * Copyright (c) 1999, 2005, Oracle and/or its affiliates. All rights reserved.
    33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    44 *
     
    1717 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1818 *
    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 or
    21  * have any questions.
     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.
    2222 *
    2323 */
  • trunk/openjdk/hotspot/src/os/linux/vm/interfaceSupport_linux.hpp

    r2 r278  
    11/*
    2  * Copyright 2005 Sun Microsystems, Inc.  All Rights Reserved.
     2 * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
    33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    44 *
     
    1717 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1818 *
    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 or
    21  * have any questions.
     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.
    2222 *
    2323 */
  • trunk/openjdk/hotspot/src/os/linux/vm/jsig.c

    r2 r278  
    11/*
    2  * Copyright 2001-2006 Sun Microsystems, Inc.  All Rights Reserved.
     2 * Copyright (c) 2001, 2006, Oracle and/or its affiliates. All rights reserved.
    33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    44 *
     
    1717 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1818 *
    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 or
    21  * have any questions.
     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.
    2222 *
    2323 */
  • trunk/openjdk/hotspot/src/os/linux/vm/jvm_linux.cpp

    r2 r278  
    11/*
    2  * Copyright 1999-2007 Sun Microsystems, Inc.  All Rights Reserved.
     2 * Copyright (c) 1999, 2007, Oracle and/or its affiliates. All rights reserved.
    33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    44 *
     
    1717 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1818 *
    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 or
    21  * have any questions.
     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.
    2222 *
    2323 */
  • trunk/openjdk/hotspot/src/os/linux/vm/jvm_linux.h

    r2 r278  
    11/*
    2  * Copyright 1999-2005 Sun Microsystems, Inc.  All Rights Reserved.
     2 * Copyright (c) 1999, 2005, Oracle and/or its affiliates. All rights reserved.
    33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    44 *
     
    1717 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1818 *
    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 or
    21  * have any questions.
     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.
    2222 *
    2323 */
  • trunk/openjdk/hotspot/src/os/linux/vm/mutex_linux.cpp

    r2 r278  
    11/*
    2  * Copyright (c) 2007 Sun Microsystems, Inc.  All Rights Reserved.
     2 * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
    33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    44 *
     
    1717 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1818 *
    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 or
    21  * have any questions.
     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.
    2222 *
    2323 */
  • trunk/openjdk/hotspot/src/os/linux/vm/mutex_linux.inline.hpp

    r2 r278  
    11/*
    2  * Copyright 1999-2002 Sun Microsystems, Inc.  All Rights Reserved.
     2 * Copyright (c) 1999, 2002, Oracle and/or its affiliates. All rights reserved.
    33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    44 *
     
    1717 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1818 *
    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 or
    21  * have any questions.
     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.
    2222 *
    2323 */
  • trunk/openjdk/hotspot/src/os/linux/vm/objectMonitor_linux.cpp

    r2 r278  
    11
    22/*
    3  * Copyright 1999-2005 Sun Microsystems, Inc.  All Rights Reserved.
     3 * Copyright (c) 1999, 2005, Oracle and/or its affiliates. All rights reserved.
    44 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    55 *
     
    1818 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1919 *
    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 or
    22  * have any questions.
     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.
    2323 *
    2424 */
  • trunk/openjdk/hotspot/src/os/linux/vm/objectMonitor_linux.hpp

    r2 r278  
    11/*
    2  * Copyright 1999-2005 Sun Microsystems, Inc.  All Rights Reserved.
     2 * Copyright (c) 1999, 2005, Oracle and/or its affiliates. All rights reserved.
    33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    44 *
     
    1717 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1818 *
    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 or
    21  * have any questions.
     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.
    2222 *
    2323 */
  • trunk/openjdk/hotspot/src/os/linux/vm/objectMonitor_linux.inline.hpp

    r2 r278  
    11/*
    2  * Copyright 1999-2005 Sun Microsystems, Inc.  All Rights Reserved.
     2 * Copyright (c) 1999, 2005, Oracle and/or its affiliates. All rights reserved.
    33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    44 *
     
    1717 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1818 *
    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 or
    21  * have any questions.
     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.
    2222 *
    2323 */
  • trunk/openjdk/hotspot/src/os/linux/vm/osThread_linux.cpp

    r2 r278  
    11/*
    2  * Copyright 1999-2004 Sun Microsystems, Inc.  All Rights Reserved.
     2 * Copyright (c) 1999, 2004, Oracle and/or its affiliates. All rights reserved.
    33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    44 *
     
    1717 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1818 *
    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 or
    21  * have any questions.
     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.
    2222 *
    2323 */
  • trunk/openjdk/hotspot/src/os/linux/vm/osThread_linux.hpp

    r2 r278  
    11/*
    2  * Copyright 1999-2004 Sun Microsystems, Inc.  All Rights Reserved.
     2 * Copyright (c) 1999, 2004, Oracle and/or its affiliates. All rights reserved.
    33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    44 *
     
    1717 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1818 *
    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 or
    21  * have any questions.
     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.
    2222 *
    2323 */
  • trunk/openjdk/hotspot/src/os/linux/vm/os_linux.cpp

    r2 r278  
    11/*
    2  * Copyright 1999-2009 Sun Microsystems, Inc.  All Rights Reserved.
     2 * Copyright (c) 1999, 2009, Oracle and/or its affiliates. All rights reserved.
    33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    44 *
     
    1717 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1818 *
    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 or
    21  * have any questions.
     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.
    2222 *
    2323 */
     24
     25# define __STDC_FORMAT_MACROS
    2426
    2527// do not include  precompiled  header file
     
    2931# include <sys/types.h>
    3032# include <sys/mman.h>
     33# include <sys/stat.h>
     34# include <sys/select.h>
    3135# include <pthread.h>
    3236# include <signal.h>
     
    5458# include <sys/shm.h>
    5559# include <link.h>
     60# include <stdint.h>
     61# include <inttypes.h>
    5662
    5763#define MAX_PATH    (2 * K)
     
    185191#elif defined(AMD64)
    186192static char cpu_arch[] = "amd64";
     193#elif defined(ARM)
     194static char cpu_arch[] = "arm";
     195#elif defined(PPC)
     196static char cpu_arch[] = "ppc";
    187197#elif defined(SPARC)
    188198#  ifdef _LP64
     
    224234
    225235void 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) {
    228238    pid_t pid = os::Linux::gettid();
    229239    char fname[32];
     
    237247  }
    238248  _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");
    240250}
    241251
     
    11341144    uintptr_t start;
    11351145    uintptr_t vsize;
    1136     uintptr_t rss;
    1137     unsigned long rsslim;
     1146    intptr_t rss;
     1147    uintptr_t rsslim;
    11381148    uintptr_t scodes;
    11391149    uintptr_t ecode;
     
    11651175        do s++; while (isspace(*s));
    11661176
    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_FORMAT
    1171                    " %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,
    11731183             &state,          /* 3  %c  */
    11741184             &ppid,           /* 4  %d  */
     
    11901200             &junk,           /* 20 %ld  */
    11911201             &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 */
    11991209      }
     1210
     1211#undef _UFM
     1212#undef _DFM
    12001213
    12011214      if (i != 28 - 2) {
     
    13331346#if defined(IA32) || defined(AMD64)
    13341347#define SYS_clock_getres IA32_ONLY(266)  AMD64_ONLY(229)
     1348#define sys_clock_getres(x,y)  ::syscall(SYS_clock_getres, x, y)
    13351349#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
    13371352#endif
    13381353
     1354#else
     1355#define sys_clock_getres(x,y)  ::syscall(SYS_clock_getres, x, y)
    13391356#endif
    1340 
    1341 #define sys_clock_getres(x,y)  ::syscall(SYS_clock_getres, x, y)
    13421357
    13431358void os::Linux::fast_thread_clock_init() {
     
    15191534const char* os::dll_file_extension() { return ".so"; }
    15201535
    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.
     1538const char* os::get_temp_directory() { return "/tmp"; }
    15221539
    15231540static bool file_exists(const char* filename) {
     
    18991916      !_print_ascii_file("/etc/turbolinux-release", st) &&
    19001917      !_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)) {
    19021921      st->print("Linux");
    19031922  }
     
    19641983  os::loadavg(loadavg, 3);
    19651984  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);
    19661990  st->cr();
    19671991}
     
    20732097
    20742098// Find the full path to the current module, libjvm.so or libjvm_g.so
    2075 void os::jvm_path(char *buf, jint len) {
     2099void os::jvm_path(char *buf, jint buflen) {
    20762100  // Error checking.
    2077   if (len < MAXPATHLEN) {
     2101  if (buflen < MAXPATHLEN) {
    20782102    assert(false, "must use a large-enough buffer");
    20792103    buf[0] = '\0';
     
    20912115                dli_fname, sizeof(dli_fname), NULL);
    20922116  assert(ret != 0, "cannot locate libjvm");
    2093   if (realpath(dli_fname, buf) == NULL)
     2117  char *rp = realpath(dli_fname, buf);
     2118  if (rp == NULL)
    20942119    return;
    20952120
     
    21112136      char* java_home_var = ::getenv("JAVA_HOME");
    21122137      if (java_home_var != NULL && java_home_var[0] != 0) {
     2138        char* jrelib_p;
     2139        int len;
     2140
    21132141        // Check the current module name "libjvm.so" or "libjvm_g.so".
    21142142        p = strrchr(buf, '/');
     
    21162144        p = strstr(p, "_g") ? "_g" : "";
    21172145
    2118         if (realpath(java_home_var, buf) == NULL)
     2146        rp = realpath(java_home_var, buf);
     2147        if (rp == NULL)
    21192148          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
    21212159        if (0 == access(buf, F_OK)) {
    21222160          // Use current module name "libjvm[_g].so" instead of
     
    21252163          // It is used when we are choosing the HPI library's name
    21262164          // "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);
    21282167        } else {
    21292168          // Go back to path of .so
    2130           if (realpath(dli_fname, buf) == NULL)
     2169          rp = realpath(dli_fname, buf);
     2170          if (rp == NULL)
    21312171            return;
    21322172        }
     
    22992339  }
    23002340
    2301   char buf[40];
     2341  char buf[PATH_MAX+1];
    23022342  int num = Atomic::add(1, &cnt);
    23032343
    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);
    23052346  unlink(buf);
    23062347
     
    24882529
    24892530bool 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.
     2556static bool
     2557get_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
     2601bool 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
     2617bool 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);
    24932628}
    24942629
     
    26132748
    26142749#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);
    26162752#endif // ZERO
    26172753
     
    26962832
    26972833  // attach to the region
    2698   addr = (char*)shmat(shmid, NULL, 0);
     2834  addr = (char*)shmat(shmid, req_addr, 0);
    26992835  int err = errno;
    27002836
     
    34033539      // old sigaction on it own.
    34043540    } 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));
    34063543    }
    34073544  }
     
    37253862  Linux::set_page_size(sysconf(_SC_PAGESIZE));
    37263863  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)));
    37283866  }
    37293867  init_page_sizes((size_t) Linux::page_size());
     
    38734011  return JNI_OK;
    38744012}
     4013
     4014// this is called at the end of vm_initialization
     4015void os::init_3(void) { }
    38754016
    38764017// Mark the polling page as unreadable
     
    39544095// debug support
    39554096
    3956 #ifndef PRODUCT
    39574097static address same_page(address x, address y) {
    39584098  int page_bits = -os::vm_page_size();
     
    39654105}
    39664106
    3967 bool os::find(address addr) {
     4107bool os::find(address addr, outputStream* st) {
    39684108  Dl_info dlinfo;
    39694109  memset(&dlinfo, 0, sizeof(dlinfo));
    39704110  if (dladdr(addr, &dlinfo)) {
    3971     tty->print(PTR_FORMAT ": ", addr);
     4111    st->print(PTR_FORMAT ": ", addr);
    39724112    if (dlinfo.dli_sname != NULL) {
    3973       tty->print("%s+%#x", dlinfo.dli_sname,
     4113      st->print("%s+%#x", dlinfo.dli_sname,
    39744114                 addr - (intptr_t)dlinfo.dli_saddr);
    39754115    } 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);
    39774117    } else {
    3978       tty->print("<absolute address>");
     4118      st->print("<absolute address>");
    39794119    }
    39804120    if (dlinfo.dli_fname) {
    3981       tty->print(" in %s", dlinfo.dli_fname);
     4121      st->print(" in %s", dlinfo.dli_fname);
    39824122    }
    39834123    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();
    39874127
    39884128    if (Verbose) {
     
    39974137          && end > dlinfo2.dli_saddr && dlinfo2.dli_saddr > begin)
    39984138        end = (address) dlinfo2.dli_saddr;
    3999       Disassembler::decode(begin, end);
     4139      Disassembler::decode(begin, end, st);
    40004140    }
    40014141    return true;
     
    40034143  return false;
    40044144}
    4005 
    4006 #endif
    40074145
    40084146////////////////////////////////////////////////////////////////////////////////
     
    42144352  long sys_time, user_time;
    42154353  char string[64];
     4354  char cdummy;
    42164355  int idummy;
    42174356  long ldummy;
     
    42744413  do s++; while (isspace(*s));
    42754414
    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,
    42784417                 &ldummy, &ldummy, &ldummy, &ldummy, &ldummy,
    42794418                 &user_time, &sys_time);
    4280   if ( count != 12 ) return -1;
     4419  if ( count != 13 ) return -1;
    42814420  if (user_sys_cpu_time) {
    42824421    return ((jlong)sys_time + (jlong)user_time) * (1000000000 / clock_tics_per_sec);
     
    47674906    jt->java_suspend_self();
    47684907  }
     4908
    47694909  OrderAccess::fence();
    47704910}
     
    48725012  }
    48735013}
     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//
     5020bool 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  
    11/*
    2  * Copyright 1999-2009 Sun Microsystems, Inc.  All Rights Reserved.
     2 * Copyright (c) 1999, 2009, Oracle and/or its affiliates. All rights reserved.
    33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    44 *
     
    1717 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1818 *
    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 or
    21  * have any questions.
     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.
    2222 *
    2323 */
  • trunk/openjdk/hotspot/src/os/linux/vm/os_linux.inline.hpp

    r2 r278  
    11/*
    2  * Copyright 1999-2008 Sun Microsystems, Inc.  All Rights Reserved.
     2 * Copyright (c) 1999, 2008, Oracle and/or its affiliates. All rights reserved.
    33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    44 *
     
    1717 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1818 *
    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 or
    21  * have any questions.
     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.
    2222 *
    2323 */
  • trunk/openjdk/hotspot/src/os/linux/vm/os_share_linux.hpp

    r2 r278  
    11/*
    2  * Copyright 1999-2003 Sun Microsystems, Inc.  All Rights Reserved.
     2 * Copyright (c) 1999, 2003, Oracle and/or its affiliates. All rights reserved.
    33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    44 *
     
    1717 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1818 *
    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 or
    21  * have any questions.
     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.
    2222 *
    2323 */
  • trunk/openjdk/hotspot/src/os/linux/vm/perfMemory_linux.cpp

    r2 r278  
    11/*
    2  * Copyright 2001-2006 Sun Microsystems, Inc.  All Rights Reserved.
     2 * Copyright (c) 2001, 2006, Oracle and/or its affiliates. All rights reserved.
    33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    44 *
     
    1717 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1818 *
    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 or
    21  * have any questions.
     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.
    2222 *
    2323 */
     
    146146  const char* tmpdir = os::get_temp_directory();
    147147  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;
    149149  char* dirname = NEW_C_HEAP_ARRAY(char, nbytes);
    150150
    151151  // 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);
    153153
    154154  return dirname;
     
    332332
    333333    char* usrdir_name = NEW_C_HEAP_ARRAY(char,
    334                               strlen(tmpdirname) + strlen(dentry->d_name) + 1);
     334                              strlen(tmpdirname) + strlen(dentry->d_name) + 2);
    335335    strcpy(usrdir_name, tmpdirname);
     336    strcat(usrdir_name, "/");
    336337    strcat(usrdir_name, dentry->d_name);
    337338
  • trunk/openjdk/hotspot/src/os/linux/vm/stubRoutines_linux.cpp

    r2 r278  
    11/*
    2  * Copyright 2001 Sun Microsystems, Inc.  All Rights Reserved.
     2 * Copyright (c) 2001, Oracle and/or its affiliates. All rights reserved.
    33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    44 *
     
    1717 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1818 *
    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 or
    21  * have any questions.
     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.
    2222 *
    2323 */
  • trunk/openjdk/hotspot/src/os/linux/vm/threadCritical_linux.cpp

    r2 r278  
    11/*
    2  * Copyright 2001-2006 Sun Microsystems, Inc.  All Rights Reserved.
     2 * Copyright (c) 2001, 2006, Oracle and/or its affiliates. All rights reserved.
    33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    44 *
     
    1717 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1818 *
    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 or
    21  * have any questions.
     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.
    2222 *
    2323 */
  • trunk/openjdk/hotspot/src/os/linux/vm/thread_linux.inline.hpp

    r2 r278  
    11/*
    2  * Copyright 2002-2003 Sun Microsystems, Inc.  All Rights Reserved.
     2 * Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved.
    33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    44 *
     
    1717 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1818 *
    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 or
    21  * have any questions.
     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.
    2222 *
    2323 */
  • trunk/openjdk/hotspot/src/os/linux/vm/vmError_linux.cpp

    r2 r278  
    11/*
    2  * Copyright 2003-2006 Sun Microsystems, Inc.  All Rights Reserved.
     2 * Copyright (c) 2003, 2006, Oracle and/or its affiliates. All rights reserved.
    33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    44 *
     
    1717 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1818 *
    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 or
    21  * have any questions.
     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.
    2222 *
    2323 */
  • trunk/openjdk/hotspot/src/os/solaris/dtrace/generateJvmOffsets.cpp

    r2 r278  
    11/*
    2  * Copyright 2003-2009 Sun Microsystems, Inc.  All Rights Reserved.
     2 * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
    33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    44 *
     
    1717 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1818 *
    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 or
    21  * have any questions.
     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.
    2222 *
    2323 */
     
    233233  GEN_OFFS(CodeBlob, _instructions_offset);
    234234  GEN_OFFS(CodeBlob, _data_offset);
    235   GEN_OFFS(CodeBlob, _oops_offset);
    236   GEN_OFFS(CodeBlob, _oops_length);
    237235  GEN_OFFS(CodeBlob, _frame_size);
    238236  printf("\n");
    239237
    240238  GEN_OFFS(nmethod, _method);
     239  GEN_OFFS(nmethod, _oops_offset);
    241240  GEN_OFFS(nmethod, _scopes_data_offset);
    242241  GEN_OFFS(nmethod, _scopes_pcs_offset);
  • trunk/openjdk/hotspot/src/os/solaris/dtrace/generateJvmOffsets.h

    r2 r278  
    11/*
    2  * Copyright 2003 Sun Microsystems, Inc.  All Rights Reserved.
     2 * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
    33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    44 *
     
    1717 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1818 *
    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 or
    21  * have any questions.
     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.
    2222 *
    2323 */
  • trunk/openjdk/hotspot/src/os/solaris/dtrace/generateJvmOffsetsMain.c

    r2 r278  
    11/*
    2  * Copyright 2003-2007 Sun Microsystems, Inc.  All Rights Reserved.
     2 * Copyright (c) 2003, 2007, Oracle and/or its affiliates. All rights reserved.
    33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    44 *
     
    1717 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1818 *
    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 or
    21  * have any questions.
     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.
    2222 *
    2323 */
  • trunk/openjdk/hotspot/src/os/solaris/dtrace/hotspot.d

    r2 r278  
    11/*
    2  * Copyright 2005 Sun Microsystems, Inc.  All Rights Reserved.
     2 * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
    33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    44 *
     
    1717 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1818 *
    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 or
    21  * have any questions.
     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.
    2222 * 
    2323 */
     
    2626  probe class__loaded(char*, uintptr_t, void*, uintptr_t);
    2727  probe class__unloaded(char*, uintptr_t, void*, uintptr_t);
     28  probe class__initialization__required(char*, uintptr_t, void*, intptr_t,int);
     29  probe class__initialization__recursive(char*, uintptr_t, void*, intptr_t,int);
     30  probe class__initialization__concurrent(char*, uintptr_t, void*, intptr_t,int);
     31  probe class__initialization__erroneous(char*, uintptr_t, void*, intptr_t, int);
     32  probe class__initialization__super__failed(char*, uintptr_t, void*, intptr_t,int);
     33  probe class__initialization__clinit(char*, uintptr_t, void*, intptr_t,int);
     34  probe class__initialization__error(char*, uintptr_t, void*, intptr_t,int);
     35  probe class__initialization__end(char*, uintptr_t, void*, intptr_t,int);
    2836  probe vm__init__begin();
    2937  probe vm__init__end();
    3038  probe vm__shutdown();
     39  probe vmops__request(char*, uintptr_t, int);
     40  probe vmops__begin(char*, uintptr_t, int);
     41  probe vmops__end(char*, uintptr_t, int);
    3142  probe gc__begin(uintptr_t);
    3243  probe gc__end();
     
    3950  probe thread__start(char*, uintptr_t, uintptr_t, uintptr_t, uintptr_t);
    4051  probe thread__stop(char*, uintptr_t, uintptr_t, uintptr_t, uintptr_t);
     52  probe thread__sleep__begin(long long);
     53  probe thread__sleep__end(int);
     54  probe thread__yield();
     55  probe thread__park__begin(uintptr_t, int, long long);
     56  probe thread__park__end(uintptr_t);
     57  probe thread__unpark(uintptr_t);
    4158  probe method__compile__begin(
    4259    char*, uintptr_t, char*, uintptr_t, char*, uintptr_t, char*, uintptr_t);
  • trunk/openjdk/hotspot/src/os/solaris/dtrace/hotspot_jni.d

    r2 r278  
    11/*
    2  * Copyright 2005 Sun Microsystems, Inc.  All Rights Reserved.
     2 * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
    33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    44 *
     
    1717 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1818 *
    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 or
    21  * have any questions.
     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.
    2222 * 
    2323 */
  • trunk/openjdk/hotspot/src/os/solaris/dtrace/hs_private.d

    r2 r278  
    11/*
    2  * Copyright 2005 Sun Microsystems, Inc.  All Rights Reserved.
     2 * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
    33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    44 *
     
    1717 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1818 *
    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 or
    21  * have any questions.
     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.
    2222 * 
    2323 */
  • trunk/openjdk/hotspot/src/os/solaris/dtrace/jhelper.d

    r2 r278  
    11/*
    2  * Copyright 2003-2009 Sun Microsystems, Inc.  All Rights Reserved.
     2 * Copyright (c) 2003, 2009, Oracle and/or its affiliates. All rights reserved.
    33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    44 *
     
    1717 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1818 *
    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 or
    21  * have any questions.
     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.
    2222 * 
    2323 */
  • trunk/openjdk/hotspot/src/os/solaris/dtrace/jvm_dtrace.c

    r2 r278  
    11/*
    2  * Copyright 2006 Sun Microsystems, Inc.  All Rights Reserved.
     2 * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
    33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    44 *
     
    1717 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1818 *
    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 or
    21  * have any questions.
     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.
    2222 *
    2323 */
  • trunk/openjdk/hotspot/src/os/solaris/dtrace/jvm_dtrace.h

    r2 r278  
    11/*
    2  * Copyright 2006 Sun Microsystems, Inc.  All Rights Reserved.
     2 * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
    33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    44 *
     
    1717 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1818 *
    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 or
    21  * have any questions.
     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.
    2222 *
    2323 */
  • trunk/openjdk/hotspot/src/os/solaris/dtrace/libjvm_db.c

    r2 r278  
    11/*
    2  * Copyright 2003-2009 Sun Microsystems, Inc.  All Rights Reserved.
     2 * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
    33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    44 *
     
    1717 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1818 *
    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 or
    21  * have any questions.
     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.
    2222 *
    2323 */
     
    131131  int32_t  scopes_data_end;
    132132  int32_t  oops_beg;            /* _oops_offset */
    133   int32_t  oops_len;            /* _oops_length */
     133  int32_t  oops_end;
    134134  int32_t  scopes_pcs_beg;      /* _scopes_pcs_offset */
    135135  int32_t  scopes_pcs_end;
     
    598598
    599599  /* Oops */
    600   err = ps_pread(J->P, nm + OFFSET_CodeBlob_oops_offset, &N->oops_beg, SZ32);
    601   CHECK_FAIL(err);
    602   err = ps_pread(J->P, nm + OFFSET_CodeBlob_oops_length, &N->oops_len, SZ32);
     600  err = ps_pread(J->P, nm + OFFSET_nmethod_oops_offset, &N->oops_beg, SZ32);
     601  CHECK_FAIL(err);
     602  err = ps_pread(J->P, nm + OFFSET_nmethod_scopes_data_offset, &N->oops_end, SZ32);
    603603  CHECK_FAIL(err);
    604604
     
    625625                       N->orig_pc_offset);
    626626
    627       fprintf(stderr, "\t nmethod_info: oops_beg: %#x, oops_len: %#x\n",
    628                        N->oops_beg, N->oops_len);
     627      fprintf(stderr, "\t nmethod_info: oops_beg: %#x, oops_end: %#x\n",
     628                       N->oops_beg, N->oops_end);
    629629
    630630      fprintf(stderr, "\t nmethod_info: scopes_data_beg: %#x, scopes_data_end: %#x\n",
     
    938938}
    939939
    940 static int
    941 scopeDesc_chain(Nmethod_t *N)
    942 {
     940static int scopeDesc_chain(Nmethod_t *N) {
    943941  int32_t decode_offset = 0;
    944942  int32_t err;
    945943
    946   if (debug > 2)
    947       fprintf(stderr, "\t scopeDesc_chain: BEGIN\n");
     944  if (debug > 2) {
     945    fprintf(stderr, "\t scopeDesc_chain: BEGIN\n");
     946  }
    948947
    949948  err = ps_pread(N->J->P, N->pc_desc + OFFSET_PcDesc_scope_decode_offset,
     
    952951
    953952  while (decode_offset > 0) {
    954       if (debug > 2)
    955           fprintf(stderr, "\t scopeDesc_chain: decode_offset: %#x\n", decode_offset);
    956 
    957       Vframe_t *vf = &N->vframes[N->vf_cnt];
    958 
    959       err = scope_desc_at(N, decode_offset, vf);
     953    Vframe_t *vf = &N->vframes[N->vf_cnt];
     954
     955    if (debug > 2) {
     956      fprintf(stderr, "\t scopeDesc_chain: decode_offset: %#x\n", decode_offset);
     957    }
     958
     959    err = scope_desc_at(N, decode_offset, vf);
     960    CHECK_FAIL(err);
     961
     962    if (vf->methodIdx > ((N->oops_end - N->oops_beg) / POINTER_SIZE)) {
     963      fprintf(stderr, "\t scopeDesc_chain: (methodIdx > oops length) !\n");
     964      return -1;
     965    }
     966    err = read_pointer(N->J, N->nm + N->oops_beg + (vf->methodIdx-1)*POINTER_SIZE,
     967                       &vf->methodOop);
     968    CHECK_FAIL(err);
     969
     970    if (vf->methodOop) {
     971      N->vf_cnt++;
     972      err = line_number_from_bci(N->J, vf);
    960973      CHECK_FAIL(err);
    961 
    962       if (vf->methodIdx > N->oops_len) {
    963           fprintf(stderr, "\t scopeDesc_chain: (methodIdx > oops_len) !\n");
    964           return -1;
     974      if (debug > 2) {
     975        fprintf(stderr, "\t scopeDesc_chain: methodOop: %#8llx, line: %ld\n",
     976                vf->methodOop, vf->line);
    965977      }
    966       err = read_pointer(N->J, N->nm + N->oops_beg + (vf->methodIdx-1)*POINTER_SIZE,
    967                                &vf->methodOop);
    968       CHECK_FAIL(err);
    969 
    970       if (vf->methodOop) {
    971           N->vf_cnt++;
    972           err = line_number_from_bci(N->J, vf);
    973           CHECK_FAIL(err);
    974           if (debug > 2) {
    975               fprintf(stderr, "\t scopeDesc_chain: methodOop: %#8llx, line: %ld\n",
    976                               vf->methodOop, vf->line);
    977           }
    978       }
    979       decode_offset = vf->sender_decode_offset;
    980   }
    981   if (debug > 2)
    982       fprintf(stderr, "\t scopeDesc_chain: END \n\n");
    983   return PS_OK;
    984 
    985  fail:
    986   if (debug)
    987       fprintf(stderr, "\t scopeDesc_chain: FAIL \n\n");
     978    }
     979    decode_offset = vf->sender_decode_offset;
     980  }
     981  if (debug > 2) {
     982    fprintf(stderr, "\t scopeDesc_chain: END \n\n");
     983  }
     984  return PS_OK;
     985
     986 fail:
     987  if (debug) {
     988    fprintf(stderr, "\t scopeDesc_chain: FAIL \n\n");
     989  }
    988990  return err;
    989991}
  • trunk/openjdk/hotspot/src/os/solaris/dtrace/libjvm_db.h

    r2 r278  
    11/*
    2  * Copyright 2003-2004 Sun Microsystems, Inc.  All Rights Reserved.
     2 * Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved.
    33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    44 *
     
    1717 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1818 *
    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 or
    21  * have any questions.
     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.
    2222 *
    2323 */
  • trunk/openjdk/hotspot/src/os/solaris/launcher/java.c

    r2 r278  
    11/*
    2  * Copyright 1998-2008 Sun Microsystems, Inc.  All Rights Reserved.
     2 * Copyright (c) 1998, 2008, Oracle and/or its affiliates. All rights reserved.
    33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    44 *
     
    1717 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1818 *
    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 or
    21  * have any questions.
     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.
    2222 *
    2323 */
  • trunk/openjdk/hotspot/src/os/solaris/launcher/java.h

    r2 r278  
    11/*
    2  * Copyright 1998-2008 Sun Microsystems, Inc.  All Rights Reserved.
     2 * Copyright (c) 1998, 2008, Oracle and/or its affiliates. All rights reserved.
    33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    44 *
     
    1717 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1818 *
    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 or
    21  * have any questions.
     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.
    2222 *
    2323 */
  • trunk/openjdk/hotspot/src/os/solaris/launcher/java_md.c

    r2 r278  
    11/*
    2  * Copyright 1998-2008 Sun Microsystems, Inc.  All Rights Reserved.
     2 * Copyright (c) 1998, 2008, Oracle and/or its affiliates. All rights reserved.
    33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    44 *
     
    1717 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1818 *
    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 or
    21  * have any questions.
     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.
    2222 *
    2323 */
  • trunk/openjdk/hotspot/src/os/solaris/launcher/java_md.h

    r2 r278  
    11/*
    2  * Copyright 1998-2005 Sun Microsystems, Inc.  All Rights Reserved.
     2 * Copyright (c) 1998, 2005, Oracle and/or its affiliates. All rights reserved.
    33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    44 *
     
    1717 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1818 *
    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 or
    21  * have any questions.
     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.
    2222 *
    2323 */
  • trunk/openjdk/hotspot/src/os/solaris/vm/attachListener_solaris.cpp

    r2 r278  
    11/*
    2  * Copyright 2005-2006 Sun Microsystems, Inc.  All Rights Reserved.
     2 * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
    33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    44 *
     
    1717 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1818 *
    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 or
    21  * have any questions.
     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.
    2222 *
    2323 */
     
    365365int SolarisAttachListener::create_door() {
    366366  char door_path[PATH_MAX+1];
     367  char initial_path[PATH_MAX+1];
    367368  int fd, res;
    368369
     
    376377  }
    377378
    378   sprintf(door_path, "%s/.java_pid%d", os::get_temp_directory(), os::current_process_id());
    379   RESTARTABLE(::creat(door_path, S_IRUSR | S_IWUSR), fd);
    380 
     379  // create initial file to attach door descriptor
     380  snprintf(door_path, sizeof(door_path), "%s/.java_pid%d",
     381           os::get_temp_directory(), os::current_process_id());
     382  snprintf(initial_path, sizeof(initial_path), "%s.tmp", door_path);
     383  RESTARTABLE(::creat(initial_path, S_IRUSR | S_IWUSR), fd);
    381384  if (fd == -1) {
    382     debug_only(warning("attempt to create %s failed", door_path));
     385    debug_only(warning("attempt to create %s failed", initial_path));
     386    ::door_revoke(dd);
    383387    return -1;
    384388  }
    385389  assert(fd >= 0, "bad file descriptor");
    386   set_door_path(door_path);
    387390  RESTARTABLE(::close(fd), res);
    388391
    389392  // attach the door descriptor to the file
    390   if ((res = ::fattach(dd, door_path)) == -1) {
     393  if ((res = ::fattach(dd, initial_path)) == -1) {
    391394    // if busy then detach and try again
    392395    if (errno == EBUSY) {
    393       ::fdetach(door_path);
    394       res = ::fattach(dd, door_path);
     396      ::fdetach(initial_path);
     397      res = ::fattach(dd, initial_path);
    395398    }
    396399    if (res == -1) {
     
    399402    }
    400403  }
     404
     405  // rename file so that clients can attach
     406  if (dd >= 0) {
     407    if (::rename(initial_path, door_path) == -1) {
     408        RESTARTABLE(::close(dd), res);
     409        ::fdetach(initial_path);
     410        dd = -1;
     411    }
     412  }
    401413  if (dd >= 0) {
    402414    set_door_descriptor(dd);
     415    set_door_path(door_path);
    403416  } else {
    404     // unable to create door or attach it to the file
    405     ::unlink(door_path);
    406     set_door_path(NULL);
     417    // unable to create door, attach it to file, or rename file into place
     418    ::unlink(initial_path);
    407419    return -1;
    408420  }
     
    592604    return false;               // initialized at startup or already initialized
    593605  }
    594   char fn[32];
     606  char fn[PATH_MAX+1];
    595607  sprintf(fn, ".attach_pid%d", os::current_process_id());
    596608  int ret;
     
    598610  RESTARTABLE(::stat64(fn, &st), ret);
    599611  if (ret == -1) {
    600     sprintf(fn, "/tmp/.attach_pid%d", os::current_process_id());
     612    snprintf(fn, sizeof(fn), "%s/.attach_pid%d",
     613             os::get_temp_directory(), os::current_process_id());
    601614    RESTARTABLE(::stat64(fn, &st), ret);
    602615  }
     
    669682  }
    670683
    671   if (strcmp(name, "ExtendedDTraceProbes") != 0) {
    672     out->print_cr("flag '%s' cannot be changed", name);
    673     return JNI_ERR;
    674   }
    675 
    676   DTrace::set_extended_dprobes(flag);
    677   return JNI_OK;
     684  if (strcmp(name, "ExtendedDTraceProbes") == 0) {
     685    DTrace::set_extended_dprobes(flag);
     686    return JNI_OK;
     687  }
     688
     689  if (strcmp(name, "DTraceMonitorProbes") == 0) {
     690    DTrace::set_monitor_dprobes(flag);
     691    return JNI_OK;
     692  }
     693
     694  out->print_cr("flag '%s' cannot be changed", name);
     695  return JNI_ERR;
    678696}
    679697
  • trunk/openjdk/hotspot/src/os/solaris/vm/c1_globals_solaris.hpp

    r2 r278  
    11/*
    2  * Copyright 2000-2001 Sun Microsystems, Inc.  All Rights Reserved.
     2 * Copyright (c) 2000, 2001, Oracle and/or its affiliates. All rights reserved.
    33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    44 *
     
    1717 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1818 *
    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 or
    21  * have any questions.
     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.
    2222 *
    2323 */
  • trunk/openjdk/hotspot/src/os/solaris/vm/c2_globals_solaris.hpp

    r2 r278  
    11/*
    2  * Copyright 2000-2001 Sun Microsystems, Inc.  All Rights Reserved.
     2 * Copyright (c) 2000, 2001, Oracle and/or its affiliates. All rights reserved.
    33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    44 *
     
    1717 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1818 *
    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 or
    21  * have any questions.
     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.
    2222 *
    2323 */
  • trunk/openjdk/hotspot/src/os/solaris/vm/chaitin_solaris.cpp

    r2 r278  
    11/*
    2  * Copyright 1999-2001 Sun Microsystems, Inc.  All Rights Reserved.
     2 * Copyright (c) 1999, 2001, Oracle and/or its affiliates. All rights reserved.
    33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    44 *
     
    1717 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1818 *
    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 or
    21  * have any questions.
     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.
    2222 *
    2323 */
  • trunk/openjdk/hotspot/src/os/solaris/vm/dtraceJSDT_solaris.cpp

    r2 r278  
    11/*
    2  * Copyright 2005-2008 Sun Microsystems, Inc.  All Rights Reserved.
     2 * Copyright (c) 2005, 2008, Oracle and/or its affiliates. All rights reserved.
    33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    44 *
     
    1717 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1818 *
    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 or
    21  * have any questions.
     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.
    2222 *
    2323 */
  • trunk/openjdk/hotspot/src/os/solaris/vm/globals_solaris.hpp

    r2 r278  
    11/*
    2  * Copyright 2005-2008 Sun Microsystems, Inc.  All Rights Reserved.
     2 * Copyright (c) 2005, 2008, Oracle and/or its affiliates. All rights reserved.
    33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    44 *
     
    1717 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1818 *
    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 or
    21  * have any questions.
     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.
    2222 *
    2323 */
  • trunk/openjdk/hotspot/src/os/solaris/vm/hpi_solaris.cpp

    r2 r278  
    11/*
    2  * Copyright 1998-2006 Sun Microsystems, Inc.  All Rights Reserved.
     2 * Copyright (c) 1998, 2006, Oracle and/or its affiliates. All rights reserved.
    33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    44 *
     
    1717 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1818 *
    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 or
    21  * have any questions.
     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.
    2222 *
    2323 */
  • trunk/openjdk/hotspot/src/os/solaris/vm/hpi_solaris.hpp

    r2 r278  
    11/*
    2  * Copyright 1998-2007 Sun Microsystems, Inc.  All Rights Reserved.
     2 * Copyright (c) 1998, 2007, Oracle and/or its affiliates. All rights reserved.
    33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    44 *
     
    1717 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1818 *
    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 or
    21  * have any questions.
     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.
    2222 *
    2323 */
  • trunk/openjdk/hotspot/src/os/solaris/vm/interfaceSupport_solaris.hpp

    r2 r278  
    11/*
    2  * Copyright 2005 Sun Microsystems, Inc.  All Rights Reserved.
     2 * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
    33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    44 *
     
    1717 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1818 *
    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 or
    21  * have any questions.
     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.
    2222 *
    2323 */
  • trunk/openjdk/hotspot/src/os/solaris/vm/jsig.c

    r2 r278  
    11/*
    2  * Copyright 2001-2003 Sun Microsystems, Inc.  All Rights Reserved.
     2 * Copyright (c) 2001, 2003, Oracle and/or its affiliates. All rights reserved.
    33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    44 *
     
    1717 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1818 *
    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 or
    21  * have any questions.
     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.
    2222 *
    2323 */
  • trunk/openjdk/hotspot/src/os/solaris/vm/jvm_solaris.cpp

    r2 r278  
    11/*
    2  * Copyright 1998-2007 Sun Microsystems, Inc.  All Rights Reserved.
     2 * Copyright (c) 1998, 2007, Oracle and/or its affiliates. All rights reserved.
    33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    44 *
     
    1717 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1818 *
    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 or
    21  * have any questions.
     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.
    2222 *
    2323 */
  • trunk/openjdk/hotspot/src/os/solaris/vm/jvm_solaris.h

    r2 r278  
    11/*
    2  * Copyright 1998-2005 Sun Microsystems, Inc.  All Rights Reserved.
     2 * Copyright (c) 1998, 2005, Oracle and/or its affiliates. All rights reserved.
    33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    44 *
     
    1717 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1818 *
    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 or
    21  * have any questions.
     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.
    2222 *
    2323 */
  • trunk/openjdk/hotspot/src/os/solaris/vm/mutex_solaris.cpp

    r2 r278  
    11/*
    2  * Copyright (c) 2007 Sun Microsystems, Inc.  All Rights Reserved.
     2 * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
    33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    44 *
     
    1717 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1818 *
    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 or
    21  * have any questions.
     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.
    2222 *
    2323 */
  • trunk/openjdk/hotspot/src/os/solaris/vm/mutex_solaris.inline.hpp

    r2 r278  
    11/*
    2  * Copyright 1998-2002 Sun Microsystems, Inc.  All Rights Reserved.
     2 * Copyright (c) 1998, 2002, Oracle and/or its affiliates. All rights reserved.
    33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    44 *
     
    1717 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1818 *
    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 or
    21  * have any questions.
     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.
    2222 *
    2323 */
  • trunk/openjdk/hotspot/src/os/solaris/vm/objectMonitor_solaris.cpp

    r2 r278  
    11/*
    2  * Copyright 1998-2005 Sun Microsystems, Inc.  All Rights Reserved.
     2 * Copyright (c) 1998, 2005, Oracle and/or its affiliates. All rights reserved.
    33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    44 *
     
    1717 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1818 *
    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 or
    21  * have any questions.
     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.
    2222 *
    2323 */
  • trunk/openjdk/hotspot/src/os/solaris/vm/objectMonitor_solaris.hpp

    r2 r278  
    11/*
    2  * Copyright 1998-2005 Sun Microsystems, Inc.  All Rights Reserved.
     2 * Copyright (c) 1998, 2005, Oracle and/or its affiliates. All rights reserved.
    33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    44 *
     
    1717 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1818 *
    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 or
    21  * have any questions.
     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.
    2222 *
    2323 */
  • trunk/openjdk/hotspot/src/os/solaris/vm/objectMonitor_solaris.inline.hpp

    r2 r278  
    11/*
    2  * Copyright 1998-2005 Sun Microsystems, Inc.  All Rights Reserved.
     2 * Copyright (c) 1998, 2005, Oracle and/or its affiliates. All rights reserved.
    33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    44 *
     
    1717 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1818 *
    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 or
    21  * have any questions.
     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.
    2222 *
    2323 */
  • trunk/openjdk/hotspot/src/os/solaris/vm/osThread_solaris.cpp

    r2 r278  
    11/*
    2  * Copyright 1998-2008 Sun Microsystems, Inc.  All Rights Reserved.
     2 * Copyright (c) 1998, 2008, Oracle and/or its affiliates. All rights reserved.
    33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    44 *
     
    1717 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1818 *
    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 or
    21  * have any questions.
     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.
    2222 *
    2323 */
  • trunk/openjdk/hotspot/src/os/solaris/vm/osThread_solaris.hpp

    r2 r278  
    11/*
    2  * Copyright 1997-2006 Sun Microsystems, Inc.  All Rights Reserved.
     2 * Copyright (c) 1997, 2006, Oracle and/or its affiliates. All rights reserved.
    33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    44 *
     
    1717 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1818 *
    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 or
    21  * have any questions.
     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.
    2222 *
    2323 */
     
    124124  int set_interrupt_callback    (Sync_Interrupt_Callback * cb);
    125125  void remove_interrupt_callback(Sync_Interrupt_Callback * cb);
    126   void OSThread::do_interrupt_callbacks_at_interrupt(InterruptArguments *args);
     126  void do_interrupt_callbacks_at_interrupt(InterruptArguments *args);
    127127
    128128 // ***************************************************************
  • trunk/openjdk/hotspot/src/os/solaris/vm/os_share_solaris.hpp

    r2 r278  
    11/*
    2  * Copyright 1999-2007 Sun Microsystems, Inc.  All Rights Reserved.
     2 * Copyright (c) 1999, 2007, Oracle and/or its affiliates. All rights reserved.
    33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    44 *
     
    1717 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1818 *
    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 or
    21  * have any questions.
     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.
    2222 *
    2323 */
  • trunk/openjdk/hotspot/src/os/solaris/vm/os_solaris.cpp

    r2 r278  
    11/*
    2  * Copyright 1997-2009 Sun Microsystems, Inc.  All Rights Reserved.
     2 * Copyright (c) 1997, 2009, Oracle and/or its affiliates. All rights reserved.
    33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    44 *
     
    1717 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1818 *
    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 or
    21  * have any questions.
     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.
    2222 *
    2323 */
     
    458458
    459459void os::Solaris::initialize_system_info() {
    460   _processor_count = sysconf(_SC_NPROCESSORS_CONF);
     460  set_processor_count(sysconf(_SC_NPROCESSORS_CONF));
    461461  _processors_online = sysconf (_SC_NPROCESSORS_ONLN);
    462462  _physical_memory = (julong)sysconf(_SC_PHYS_PAGES) * (julong)sysconf(_SC_PAGESIZE);
     
    674674  }
    675675  return privileges;
    676 }
    677 
    678 
    679 static char* get_property(char* name, char* buffer, int buffer_size) {
    680   if (os::getenv(name, buffer, buffer_size)) {
    681     return buffer;
    682   }
    683   static char empty[] = "";
    684   return empty;
    685676}
    686677
     
    15771568  thread_key_t tk;
    15781569  if (thr_keycreate( &tk, NULL ) )
    1579     fatal1("os::allocate_thread_local_storage: thr_keycreate failed (%s)", strerror(errno));
     1570    fatal(err_msg("os::allocate_thread_local_storage: thr_keycreate failed "
     1571                  "(%s)", strerror(errno)));
    15801572  return int(tk);
    15811573}
     
    15951587       vm_exit_out_of_memory(SMALLINT, "thr_setspecific: out of swap space");
    15961588    } else {
    1597       fatal1("os::thread_local_storage_at_put: thr_setspecific failed (%s)", strerror(errno));
     1589      fatal(err_msg("os::thread_local_storage_at_put: thr_setspecific failed "
     1590                    "(%s)", strerror(errno)));
    15981591    }
    15991592  } else {
     
    17481741  timeval t;
    17491742  if (gettimeofday( &t, NULL) == -1)
    1750     fatal1("os::javaTimeMillis: gettimeofday (%s)", strerror(errno));
     1743    fatal(err_msg("os::javaTimeMillis: gettimeofday (%s)", strerror(errno)));
    17511744  return jlong(t.tv_sec) * 1000  +  jlong(t.tv_usec) / 1000;
    17521745}
     
    18271820const char* os::dll_file_extension() { return ".so"; }
    18281821
    1829 const char* os::get_temp_directory() { return "/tmp/"; }
     1822// This must be hard coded because it's the system's temporary
     1823// directory not the java application's temp directory, ala java.io.tmpdir.
     1824const char* os::get_temp_directory() { return "/tmp"; }
    18301825
    18311826static bool file_exists(const char* filename) {
     
    20562051    {EM_SPARCV9,     EM_SPARCV9, ELFCLASS64, ELFDATA2MSB, (char*)"Sparc v9 64"},
    20572052    {EM_PPC,         EM_PPC,     ELFCLASS32, ELFDATA2MSB, (char*)"Power PC 32"},
    2058     {EM_PPC64,       EM_PPC64,   ELFCLASS64, ELFDATA2MSB, (char*)"Power PC 64"}
     2053    {EM_PPC64,       EM_PPC64,   ELFCLASS64, ELFDATA2MSB, (char*)"Power PC 64"},
     2054    {EM_ARM,         EM_ARM,     ELFCLASS32, ELFDATA2LSB, (char*)"ARM 32"}
    20592055  };
    20602056
     
    20732069  #elif  (defined __powerpc__)
    20742070    static  Elf32_Half running_arch_code=EM_PPC;
     2071  #elif (defined ARM)
     2072    static  Elf32_Half running_arch_code=EM_ARM;
    20752073  #else
    20762074    #error Method os::dll_load requires that one of following is defined:\
    2077          IA32, AMD64, IA64, __sparc, __powerpc__
     2075         IA32, AMD64, IA64, __sparc, __powerpc__, ARM, ARM
    20782076  #endif
    20792077
     
    24402438      if (java_home_var != NULL && java_home_var[0] != 0) {
    24412439        char cpu_arch[12];
     2440        char* jrelib_p;
     2441        int   len;
    24422442        sysinfo(SI_ARCHITECTURE, cpu_arch, sizeof(cpu_arch));
    24432443#ifdef _LP64
     
    24552455
    24562456        realpath(java_home_var, buf);
    2457         sprintf(buf + strlen(buf), "/jre/lib/%s", cpu_arch);
     2457        // determine if this is a legacy image or modules image
     2458        // modules image doesn't have "jre" subdirectory
     2459        len = strlen(buf);
     2460        jrelib_p = buf + len;
     2461        snprintf(jrelib_p, buflen-len, "/jre/lib/%s", cpu_arch);
     2462        if (0 != access(buf, F_OK)) {
     2463          snprintf(jrelib_p, buflen-len, "/lib/%s", cpu_arch);
     2464        }
     2465
    24582466        if (0 == access(buf, F_OK)) {
    24592467          // Use current module name "libjvm[_g].so" instead of
     
    24622470          // It is used when we are choosing the HPI library's name
    24632471          // "libhpi[_g].so" in hpi::initialize_get_interface().
    2464           sprintf(buf + strlen(buf), "/hotspot/libjvm%s.so", p);
     2472          len = strlen(buf);
     2473          snprintf(buf + len, buflen-len, "/hotspot/libjvm%s.so", p);
    24652474        } else {
    24662475          // Go back to path of .so
     
    26972706    return;
    26982707  }
     2708}
     2709
     2710bool os::create_stack_guard_pages(char* addr, size_t size) {
     2711  return os::commit_memory(addr, size);
     2712}
     2713
     2714bool os::remove_stack_guard_pages(char* addr, size_t size) {
     2715  return os::uncommit_memory(addr, size);
    26992716}
    27002717
     
    31353152  // Simply choose a conservative value as default.
    31363153  *page_size = LargePageSizeInBytes ? LargePageSizeInBytes :
    3137                SPARC_ONLY(4 * M) IA32_ONLY(4 * M) AMD64_ONLY(2 * M);
     3154               SPARC_ONLY(4 * M) IA32_ONLY(4 * M) AMD64_ONLY(2 * M)
     3155               ARM_ONLY(2 * M);
    31383156
    31393157  // ISM is available on all supported Solaris versions
     
    42324250      // old sigaction on it own.
    42334251    } else {
    4234       fatal2("Encountered unexpected pre-existing sigaction handler %#lx for signal %d.", (long)oldhand, sig);
     4252      fatal(err_msg("Encountered unexpected pre-existing sigaction handler "
     4253                    "%#lx for signal %d.", (long)oldhand, sig));
    42354254    }
    42364255  }
     
    47634782  page_size = sysconf(_SC_PAGESIZE);
    47644783  if (page_size == -1)
    4765     fatal1("os_solaris.cpp: os::init: sysconf failed (%s)", strerror(errno));
     4784    fatal(err_msg("os_solaris.cpp: os::init: sysconf failed (%s)",
     4785                  strerror(errno)));
    47664786  init_page_sizes((size_t) page_size);
    47674787
     
    47744794  int fd = open("/dev/zero", O_RDWR);
    47754795  if (fd < 0) {
    4776     fatal1("os::init: cannot open /dev/zero (%s)", strerror(errno));
     4796    fatal(err_msg("os::init: cannot open /dev/zero (%s)", strerror(errno)));
    47774797  } else {
    47784798    Solaris::set_dev_zero_fd(fd);
     
    49915011}
    49925012
     5013void os::init_3(void) {
     5014  return;
     5015}
    49935016
    49945017// Mark the polling page as unreadable
     
    53965419
    53975420//---------------------------------------------------------------------------------
    5398 #ifndef PRODUCT
    53995421
    54005422static address same_page(address x, address y) {
     
    54085430}
    54095431
    5410 bool os::find(address addr) {
     5432bool os::find(address addr, outputStream* st) {
    54115433  Dl_info dlinfo;
    54125434  memset(&dlinfo, 0, sizeof(dlinfo));
    54135435  if (dladdr(addr, &dlinfo)) {
    54145436#ifdef _LP64
    5415     tty->print("0x%016lx: ", addr);
     5437    st->print("0x%016lx: ", addr);
    54165438#else
    5417     tty->print("0x%08x: ", addr);
     5439    st->print("0x%08x: ", addr);
    54185440#endif
    54195441    if (dlinfo.dli_sname != NULL)
    5420       tty->print("%s+%#lx", dlinfo.dli_sname, addr-(intptr_t)dlinfo.dli_saddr);
     5442      st->print("%s+%#lx", dlinfo.dli_sname, addr-(intptr_t)dlinfo.dli_saddr);
    54215443    else if (dlinfo.dli_fname)
    5422       tty->print("<offset %#lx>", addr-(intptr_t)dlinfo.dli_fbase);
     5444      st->print("<offset %#lx>", addr-(intptr_t)dlinfo.dli_fbase);
    54235445    else
    5424       tty->print("<absolute address>");
    5425     if (dlinfo.dli_fname)  tty->print(" in %s", dlinfo.dli_fname);
     5446      st->print("<absolute address>");
     5447    if (dlinfo.dli_fname)  st->print(" in %s", dlinfo.dli_fname);
    54265448#ifdef _LP64
    5427     if (dlinfo.dli_fbase)  tty->print(" at 0x%016lx", dlinfo.dli_fbase);
     5449    if (dlinfo.dli_fbase)  st->print(" at 0x%016lx", dlinfo.dli_fbase);
    54285450#else
    5429     if (dlinfo.dli_fbase)  tty->print(" at 0x%08x", dlinfo.dli_fbase);
     5451    if (dlinfo.dli_fbase)  st->print(" at 0x%08x", dlinfo.dli_fbase);
    54305452#endif
    5431     tty->cr();
     5453    st->cr();
    54325454
    54335455    if (Verbose) {
     
    54425464          && end > dlinfo2.dli_saddr && dlinfo2.dli_saddr > begin)
    54435465        end = (address) dlinfo2.dli_saddr;
    5444       Disassembler::decode(begin, end);
     5466      Disassembler::decode(begin, end, st);
    54455467    }
    54465468    return true;
     
    54485470  return false;
    54495471}
    5450 
    5451 #endif
    5452 
    54535472
    54545473// Following function has been added to support HotSparc's libjvm.so running
     
    59805999  }
    59816000}
     6001
     6002// is_headless_jre()
     6003//
     6004// Test for the existence of libmawt in motif21 or xawt directories
     6005// in order to report if we are running in a headless jre
     6006//
     6007bool os::is_headless_jre() {
     6008    struct stat statbuf;
     6009    char buf[MAXPATHLEN];
     6010    char libmawtpath[MAXPATHLEN];
     6011    const char *xawtstr  = "/xawt/libmawt.so";
     6012    const char *motifstr = "/motif21/libmawt.so";
     6013    char *p;
     6014
     6015    // Get path to libjvm.so
     6016    os::jvm_path(buf, sizeof(buf));
     6017
     6018    // Get rid of libjvm.so
     6019    p = strrchr(buf, '/');
     6020    if (p == NULL) return false;
     6021    else *p = '\0';
     6022
     6023    // Get rid of client or server
     6024    p = strrchr(buf, '/');
     6025    if (p == NULL) return false;
     6026    else *p = '\0';
     6027
     6028    // check xawt/libmawt.so
     6029    strcpy(libmawtpath, buf);
     6030    strcat(libmawtpath, xawtstr);
     6031    if (::stat(libmawtpath, &statbuf) == 0) return false;
     6032
     6033    // check motif21/libmawt.so
     6034    strcpy(libmawtpath, buf);
     6035    strcat(libmawtpath, motifstr);
     6036    if (::stat(libmawtpath, &statbuf) == 0) return false;
     6037
     6038    return true;
     6039}
     6040
     6041
  • trunk/openjdk/hotspot/src/os/solaris/vm/os_solaris.hpp

    r2 r278  
    11/*
    2  * Copyright 1997-2009 Sun Microsystems, Inc.  All Rights Reserved.
     2 * Copyright (c) 1997, 2009, Oracle and/or its affiliates. All rights reserved.
    33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    44 *
     
    1717 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1818 *
    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 or
    21  * have any questions.
     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.
    2222 *
    2323 */
  • trunk/openjdk/hotspot/src/os/solaris/vm/os_solaris.inline.hpp

    r2 r278  
    11/*
    2  * Copyright 1997-2008 Sun Microsystems, Inc.  All Rights Reserved.
     2 * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
    33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    44 *
     
    1717 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1818 *
    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 or
    21  * have any questions.
     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.
    2222 *
    2323 */
  • trunk/openjdk/hotspot/src/os/solaris/vm/perfMemory_solaris.cpp

    r2 r278  
    11/*
    2  * Copyright 2001-2007 Sun Microsystems, Inc.  All Rights Reserved.
     2 * Copyright (c) 2001, 2007, Oracle and/or its affiliates. All rights reserved.
    33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    44 *
     
    1717 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1818 *
    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 or
    21  * have any questions.
     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.
    2222 *
    2323 */
     
    148148  const char* tmpdir = os::get_temp_directory();
    149149  const char* perfdir = PERFDATA_NAME;
    150   size_t nbytes = strlen(tmpdir) + strlen(perfdir) + strlen(user) + 2;
     150  size_t nbytes = strlen(tmpdir) + strlen(perfdir) + strlen(user) + 3;
    151151  char* dirname = NEW_C_HEAP_ARRAY(char, nbytes);
    152152
    153153  // construct the path name to user specific tmp directory
    154   snprintf(dirname, nbytes, "%s%s_%s", tmpdir, perfdir, user);
     154  snprintf(dirname, nbytes, "%s/%s_%s", tmpdir, perfdir, user);
    155155
    156156  return dirname;
     
    323323
    324324    char* usrdir_name = NEW_C_HEAP_ARRAY(char,
    325                               strlen(tmpdirname) + strlen(dentry->d_name) + 1);
     325                              strlen(tmpdirname) + strlen(dentry->d_name) + 2);
    326326    strcpy(usrdir_name, tmpdirname);
     327    strcat(usrdir_name, "/");
    327328    strcat(usrdir_name, dentry->d_name);
    328329
  • trunk/openjdk/hotspot/src/os/solaris/vm/stubRoutines_solaris.cpp

    r2 r278  
    11/*
    2  * Copyright 2001-2002 Sun Microsystems, Inc.  All Rights Reserved.
     2 * Copyright (c) 2001, 2002, Oracle and/or its affiliates. All rights reserved.
    33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    44 *
     
    1717 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1818 *
    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 or
    21  * have any questions.
     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.
    2222 *
    2323 */
  • trunk/openjdk/hotspot/src/os/solaris/vm/threadCritical_solaris.cpp

    r2 r278  
    11/*
    2  * Copyright 2001-2003 Sun Microsystems, Inc.  All Rights Reserved.
     2 * Copyright (c) 2001, 2003, Oracle and/or its affiliates. All rights reserved.
    33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    44 *
     
    1717 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1818 *
    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 or
    21  * have any questions.
     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.
    2222 *
    2323 */
     
    4848    if (global_mut_owner != owner) {
    4949      if (os::Solaris::mutex_lock(&global_mut))
    50         fatal1("ThreadCritical::ThreadCritical: mutex_lock failed (%s)", strerror(errno));
     50        fatal(err_msg("ThreadCritical::ThreadCritical: mutex_lock failed (%s)",
     51                      strerror(errno)));
    5152      assert(global_mut_count == 0, "must have clean count");
    5253      assert(global_mut_owner == -1, "must have clean owner");
     
    6768      global_mut_owner = -1;
    6869      if (os::Solaris::mutex_unlock(&global_mut))
    69         fatal1("ThreadCritical::~ThreadCritical: mutex_unlock failed (%s)", strerror(errno));
     70        fatal(err_msg("ThreadCritical::~ThreadCritical: mutex_unlock failed "
     71                      "(%s)", strerror(errno)));
    7072    }
    7173  } else {
  • trunk/openjdk/hotspot/src/os/solaris/vm/thread_solaris.inline.hpp

    r2 r278  
    11/*
    2  * Copyright 2002-2003 Sun Microsystems, Inc.  All Rights Reserved.
     2 * Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved.
    33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    44 *
     
    1717 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1818 *
    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 or
    21  * have any questions.
     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.
    2222 *
    2323 */
  • trunk/openjdk/hotspot/src/os/solaris/vm/vmError_solaris.cpp

    r2 r278  
    11/*
    2  * Copyright 2003-2006 Sun Microsystems, Inc.  All Rights Reserved.
     2 * Copyright (c) 2003, 2006, Oracle and/or its affiliates. All rights reserved.
    33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    44 *
     
    1717 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1818 *
    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 or
    21  * have any questions.
     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.
    2222 *
    2323 */
  • trunk/openjdk/hotspot/src/os/windows/vm/attachListener_windows.cpp

    r50 r278  
    11/*
    2  * Copyright 2005-2006 Sun Microsystems, Inc.  All Rights Reserved.
     2 * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
    33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    44 *
     
    1717 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1818 *
    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 or
    21  * have any questions.
     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.
    2222 *
    2323 */
  • trunk/openjdk/hotspot/src/os/windows/vm/c1_globals_windows.hpp

    r2 r278  
    11/*
    2  * Copyright 2000-2001 Sun Microsystems, Inc.  All Rights Reserved.
     2 * Copyright (c) 2000, 2001, Oracle and/or its affiliates. All rights reserved.
    33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    44 *
     
    1717 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1818 *
    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 or
    21  * have any questions.
     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.
    2222 *
    2323 */
  • trunk/openjdk/hotspot/src/os/windows/vm/c2_globals_windows.hpp

    r2 r278  
    11/*
    2  * Copyright 2000-2001 Sun Microsystems, Inc.  All Rights Reserved.
     2 * Copyright (c) 2000, 2001, Oracle and/or its affiliates. All rights reserved.
    33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    44 *
     
    1717 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1818 *
    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 or
    21  * have any questions.
     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.
    2222 *
    2323 */
  • trunk/openjdk/hotspot/src/os/windows/vm/chaitin_windows.cpp

    r2 r278  
    11/*
    2  * Copyright 1999-2006 Sun Microsystems, Inc.  All Rights Reserved.
     2 * Copyright (c) 1999, 2006, Oracle and/or its affiliates. All rights reserved.
    33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    44 *
     
    1717 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1818 *
    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 or
    21  * have any questions.
     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.
    2222 *
    2323 */
  • trunk/openjdk/hotspot/src/os/windows/vm/dtraceJSDT_windows.cpp

    r2 r278  
    11/*
    2  * Copyright 1997-2008 Sun Microsystems, Inc.  All Rights Reserved.
     2 * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
    33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    44 *
     
    1717 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1818 *
    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 or
    21  * have any questions.
     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.
    2222 *
    2323 */
  • trunk/openjdk/hotspot/src/os/windows/vm/globals_windows.hpp

    r2 r278  
    11/*
    2  * Copyright 2005-2008 Sun Microsystems, Inc.  All Rights Reserved.
     2 * Copyright (c) 2005, 2008, Oracle and/or its affiliates. All rights reserved.
    33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    44 *
     
    1717 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1818 *
    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 or
    21  * have any questions.
     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.
    2222 *
    2323 */
  • trunk/openjdk/hotspot/src/os/windows/vm/hpi_windows.cpp

    r263 r278  
    11/*
    2  * Copyright 1998-2006 Sun Microsystems, Inc.  All Rights Reserved.
     2 * Copyright (c) 1998, 2006, Oracle and/or its affiliates. All rights reserved.
    33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    44 *
     
    1717 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1818 *
    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 or
    21  * have any questions.
     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.
    2222 *
    2323 */
  • trunk/openjdk/hotspot/src/os/windows/vm/hpi_windows.hpp

    r2 r278  
    11/*
    2  * Copyright 1998-2005 Sun Microsystems, Inc.  All Rights Reserved.
     2 * Copyright (c) 1998, 2005, Oracle and/or its affiliates. All rights reserved.
    33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    44 *
     
    1717 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1818 *
    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 or
    21  * have any questions.
     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.
    2222 *
    2323 */
  • trunk/openjdk/hotspot/src/os/windows/vm/interfaceSupport_windows.hpp

    r2 r278  
    11/*
    2  * Copyright 2005 Sun Microsystems, Inc.  All Rights Reserved.
     2 * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
    33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    44 *
     
    1717 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1818 *
    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 or
    21  * have any questions.
     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.
    2222 *
    2323 */
  • trunk/openjdk/hotspot/src/os/windows/vm/jvm_windows.cpp

    r2 r278  
    11/*
    2  * Copyright 1998-2007 Sun Microsystems, Inc.  All Rights Reserved.
     2 * Copyright (c) 1998, 2007, Oracle and/or its affiliates. All rights reserved.
    33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    44 *
     
    1717 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1818 *
    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 or
    21  * have any questions.
     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.
    2222 *
    2323 */
  • trunk/openjdk/hotspot/src/os/windows/vm/jvm_windows.h

    r2 r278  
    11/*
    2  * Copyright 1998-2005 Sun Microsystems, Inc.  All Rights Reserved.
     2 * Copyright (c) 1998, 2005, Oracle and/or its affiliates. All rights reserved.
    33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    44 *
     
    1717 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1818 *
    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 or
    21  * have any questions.
     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.
    2222 *
    2323 */
  • trunk/openjdk/hotspot/src/os/windows/vm/mutex_windows.cpp

    r2 r278  
    11/*
    2  * Copyright 1998-2006 Sun Microsystems, Inc.  All Rights Reserved.
     2 * Copyright (c) 1998, 2006, Oracle and/or its affiliates. All rights reserved.
    33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    44 *
     
    1717 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1818 *
    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 or
    21  * have any questions.
     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.
    2222 *
    2323 */
  • trunk/openjdk/hotspot/src/os/windows/vm/mutex_windows.inline.hpp

    r2 r278  
    11/*
    2  * Copyright 1998-2003 Sun Microsystems, Inc.  All Rights Reserved.
     2 * Copyright (c) 1998, 2003, Oracle and/or its affiliates. All rights reserved.
    33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    44 *
     
    1717 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1818 *
    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 or
    21  * have any questions.
     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.
    2222 *
    2323 */
  • trunk/openjdk/hotspot/src/os/windows/vm/objectMonitor_windows.cpp

    r2 r278  
    11/*
    2  * Copyright 1998-2005 Sun Microsystems, Inc.  All Rights Reserved.
     2 * Copyright (c) 1998, 2005, Oracle and/or its affiliates. All rights reserved.
    33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    44 *
     
    1717 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1818 *
    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 or
    21  * have any questions.
     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.
    2222 *
    2323 */
  • trunk/openjdk/hotspot/src/os/windows/vm/objectMonitor_windows.hpp

    r2 r278  
    11/*
    2  * Copyright 1998-2005 Sun Microsystems, Inc.  All Rights Reserved.
     2 * Copyright (c) 1998, 2005, Oracle and/or its affiliates. All rights reserved.
    33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    44 *
     
    1717 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1818 *
    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 or
    21  * have any questions.
     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.
    2222 *
    2323 */
  • trunk/openjdk/hotspot/src/os/windows/vm/objectMonitor_windows.inline.hpp

    r2 r278  
    11/*
    2  * Copyright 1998-2005 Sun Microsystems, Inc.  All Rights Reserved.
     2 * Copyright (c) 1998, 2005, Oracle and/or its affiliates. All rights reserved.
    33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    44 *
     
    1717 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1818 *
    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 or
    21  * have any questions.
     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.
    2222 *
    2323 */
  • trunk/openjdk/hotspot/src/os/windows/vm/osThread_windows.cpp

    r2 r278  
    11/*
    2  * Copyright 1998-2000 Sun Microsystems, Inc.  All Rights Reserved.
     2 * Copyright (c) 1998, 2000, Oracle and/or its affiliates. All rights reserved.
    33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    44 *
     
    1717 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1818 *
    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 or
    21  * have any questions.
     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.
    2222 *
    2323 */
  • trunk/openjdk/hotspot/src/os/windows/vm/osThread_windows.hpp

    r2 r278  
    11/*
    2  * Copyright 1997-2001 Sun Microsystems, Inc.  All Rights Reserved.
     2 * Copyright (c) 1997, 2001, Oracle and/or its affiliates. All rights reserved.
    33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    44 *
     
    1717 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1818 *
    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 or
    21  * have any questions.
     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.
    2222 *
    2323 */
  • trunk/openjdk/hotspot/src/os/windows/vm/os_share_windows.hpp

    r2 r278  
    11/*
    2  * Copyright 1999-2001 Sun Microsystems, Inc.  All Rights Reserved.
     2 * Copyright (c) 1999, 2001, Oracle and/or its affiliates. All rights reserved.
    33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    44 *
     
    1717 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1818 *
    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 or
    21  * have any questions.
     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.
    2222 *
    2323 */
  • trunk/openjdk/hotspot/src/os/windows/vm/os_windows.cpp

    r277 r278  
    11/*
    2  * Copyright 1997-2010 Sun Microsystems, Inc.  All Rights Reserved.
     2 * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
    33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    44 *
     
    1717 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1818 *
    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 or
    21  * have any questions.
     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.
    2222 *
    2323 */
     
    779779  FILETIME jot;
    780780  if (!SystemTimeToFileTime(&java_origin, &jot)) {
    781     fatal1("Error = %d\nWindows error", GetLastError());
     781    fatal(err_msg("Error = %d\nWindows error", GetLastError()));
    782782  }
    783783  _calculated_offset = jlong_from(jot.dwHighDateTime, jot.dwLowDateTime);
     
    10531053const char* os::dll_file_extension() { return ".dll"; }
    10541054
    1055 const char * os::get_temp_directory()
    1056 {
    1057     static char path_buf[MAX_PATH];
    1058     if (GetTempPath(MAX_PATH, path_buf)>0)
    1059       return path_buf;
    1060     else{
    1061       path_buf[0]='\0';
    1062       return path_buf;
    1063     }
     1055// This must be hard coded because it's the system's temporary
     1056// directory not the java application's temp directory, ala java.io.tmpdir.
     1057const char* os::get_temp_directory() {
     1058  static char path_buf[MAX_PATH];
     1059  if (GetTempPath(MAX_PATH, path_buf)>0)
     1060    return path_buf;
     1061  else{
     1062    path_buf[0]='\0';
     1063    return path_buf;
     1064  }
    10641065}
    10651066
     
    16351636        if (si.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64)
    16361637            st->print(" , 64 bit");
    1637       } else { // os_vers == 6001
     1638      } else if (os_vers == 6001) {
    16381639        if (osvi.wProductType == VER_NT_WORKSTATION) {
    16391640            st->print(" Windows 7");
     
    16411642            st->print(" Windows Server 2008 R2");
    16421643        }
     1644        if (si.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64)
     1645            st->print(" , 64 bit");
     1646      } else { // future os
     1647        // Unrecognized windows, print out its major and minor versions
     1648        st->print(" Windows NT %d.%d", osvi.dwMajorVersion, osvi.dwMinorVersion);
    16431649        if (si.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64)
    16441650            st->print(" , 64 bit");
     
    29052911}
    29062912
     2913bool os::create_stack_guard_pages(char* addr, size_t size) {
     2914  return os::commit_memory(addr, size);
     2915}
     2916
     2917bool os::remove_stack_guard_pages(char* addr, size_t size) {
     2918  return os::uncommit_memory(addr, size);
     2919}
     2920
    29072921// Set protections specified
    29082922bool os::protect_memory(char* addr, size_t bytes, ProtType prot,
     
    32633277  _processor_type  = si.dwProcessorType;
    32643278  _processor_level = si.wProcessorLevel;
    3265   _processor_count = si.dwNumberOfProcessors;
     3279  set_processor_count(si.dwNumberOfProcessors);
    32663280
    32673281#ifdef __WIN32OS2__
     
    35633577}
    35643578
     3579void os::init_3(void) {
     3580  return;
     3581}
    35653582
    35663583// Mark the polling page as unreadable
     
    42144231      int err = GetLastError();
    42154232      if (err != ERROR_NO_MORE_ITEMS && err != ERROR_CALL_NOT_IMPLEMENTED) {
    4216         fatal1("heap walk aborted with error %d", err);
     4233        fatal(err_msg("heap walk aborted with error %d", err));
    42174234      }
    42184235      HeapUnlock(heap);
     
    42244241
    42254242
    4226 #ifndef PRODUCT
    4227 bool os::find(address addr) {
     4243bool os::find(address addr, outputStream* st) {
    42284244  // Nothing yet
    42294245  return false;
    42304246}
    4231 #endif
    42324247
    42334248LONG WINAPI os::win32::serialize_fault_filter(struct _EXCEPTION_POINTERS* e) {
     
    42834298    return 0;
    42844299}
     4300
     4301
     4302// We don't build a headless jre for Windows
     4303bool os::is_headless_jre() { return false; }
     4304
  • trunk/openjdk/hotspot/src/os/windows/vm/os_windows.hpp

    r2 r278  
    11/*
    2  * Copyright 1997-2008 Sun Microsystems, Inc.  All Rights Reserved.
     2 * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
    33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    44 *
     
    1717 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1818 *
    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 or
    21  * have any questions.
     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.
    2222 *
    2323 */
  • trunk/openjdk/hotspot/src/os/windows/vm/os_windows.inline.hpp

    r138 r278  
    11/*
    2  * Copyright 1997-2008 Sun Microsystems, Inc.  All Rights Reserved.
     2 * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
    33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    44 *
     
    1717 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1818 *
    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 or
    21  * have any questions.
     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.
    2222 *
    2323 */
  • trunk/openjdk/hotspot/src/os/windows/vm/perfMemory_windows.cpp

    r58 r278  
    11/*
    2  * Copyright 2001-2007 Sun Microsystems, Inc.  All Rights Reserved.
     2 * Copyright (c) 2001, 2007, Oracle and/or its affiliates. All rights reserved.
    33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    44 *
     
    1717 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1818 *
    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 or
    21  * have any questions.
     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.
    2222 *
    2323 */
     
    150150  const char* tmpdir = os::get_temp_directory();
    151151  const char* perfdir = PERFDATA_NAME;
    152   size_t nbytes = strlen(tmpdir) + strlen(perfdir) + strlen(user) + 2;
     152  size_t nbytes = strlen(tmpdir) + strlen(perfdir) + strlen(user) + 3;
    153153  char* dirname = NEW_C_HEAP_ARRAY(char, nbytes);
    154154
    155155  // construct the path name to user specific tmp directory
    156   _snprintf(dirname, nbytes, "%s%s_%s", tmpdir, perfdir, user);
     156  _snprintf(dirname, nbytes, "%s\\%s_%s", tmpdir, perfdir, user);
    157157
    158158  return dirname;
     
    321321
    322322    char* usrdir_name = NEW_C_HEAP_ARRAY(char,
    323                               strlen(tmpdirname) + strlen(dentry->d_name) + 1);
     323                              strlen(tmpdirname) + strlen(dentry->d_name) + 2);
    324324    strcpy(usrdir_name, tmpdirname);
     325    strcat(usrdir_name, "\\");
    325326    strcat(usrdir_name, dentry->d_name);
    326327
  • trunk/openjdk/hotspot/src/os/windows/vm/stubRoutines_windows.cpp

    r2 r278  
    11/*
    2  * Copyright 2001 Sun Microsystems, Inc.  All Rights Reserved.
     2 * Copyright (c) 2001, Oracle and/or its affiliates. All rights reserved.
    33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    44 *
     
    1717 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1818 *
    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 or
    21  * have any questions.
     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.
    2222 *
    2323 */
  • trunk/openjdk/hotspot/src/os/windows/vm/threadCritical_windows.cpp

    r2 r278  
    11/*
    2  * Copyright 2001-2003 Sun Microsystems, Inc.  All Rights Reserved.
     2 * Copyright (c) 2001, 2003, Oracle and/or its affiliates. All rights reserved.
    33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    44 *
     
    1717 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1818 *
    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 or
    21  * have any questions.
     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.
    2222 *
    2323 */
  • trunk/openjdk/hotspot/src/os/windows/vm/thread_windows.inline.hpp

    r2 r278  
    11/*
    2  * Copyright 2002-2003 Sun Microsystems, Inc.  All Rights Reserved.
     2 * Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved.
    33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    44 *
     
    1717 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1818 *
    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 or
    21  * have any questions.
     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.
    2222 *
    2323 */
  • trunk/openjdk/hotspot/src/os/windows/vm/version.rc

    r2 r278  
    11//
    2 // Copyright 2004 Sun Microsystems, Inc.  All Rights Reserved.
     2// Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
    33// DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    44//
     
    1717// Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1818//
    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 or
    21 // have any questions.
     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.
    2222// 
    2323//
  • trunk/openjdk/hotspot/src/os/windows/vm/vmError_windows.cpp

    r2 r278  
    11/*
    2  * Copyright 2003-2007 Sun Microsystems, Inc.  All Rights Reserved.
     2 * Copyright (c) 2003, 2007, Oracle and/or its affiliates. All rights reserved.
    33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    44 *
     
    1717 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1818 *
    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 or
    21  * have any questions.
     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.
    2222 *
    2323 */
Note: See TracChangeset for help on using the changeset viewer.