Changeset 278 for trunk/openjdk/hotspot/src/os/solaris
- Timestamp:
- Mar 26, 2011, 8:39:20 PM (14 years ago)
- Location:
- trunk/openjdk
- Files:
-
- 1 deleted
- 44 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/openjdk
- Property svn:ignore
-
old new 1 1 build 2 build-product-release
-
-
Property svn:mergeinfo
set to
/branches/vendor/oracle/openjdk6/b22 merged eligible /branches/vendor/oracle/openjdk6/current merged eligible
- Property svn:ignore
-
trunk/openjdk/hotspot/src/os/solaris/dtrace/generateJvmOffsets.cpp
r2 r278 1 1 /* 2 * Copyright 2003-2009 Sun Microsystems, Inc. All Rights Reserved.2 * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. 3 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 4 * … … 17 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 18 * 19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,20 * CA 95054 USA or visit www.sun.com if you need additional information or21 * have anyquestions.19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 22 * 23 23 */ … … 233 233 GEN_OFFS(CodeBlob, _instructions_offset); 234 234 GEN_OFFS(CodeBlob, _data_offset); 235 GEN_OFFS(CodeBlob, _oops_offset);236 GEN_OFFS(CodeBlob, _oops_length);237 235 GEN_OFFS(CodeBlob, _frame_size); 238 236 printf("\n"); 239 237 240 238 GEN_OFFS(nmethod, _method); 239 GEN_OFFS(nmethod, _oops_offset); 241 240 GEN_OFFS(nmethod, _scopes_data_offset); 242 241 GEN_OFFS(nmethod, _scopes_pcs_offset); -
trunk/openjdk/hotspot/src/os/solaris/dtrace/generateJvmOffsets.h
r2 r278 1 1 /* 2 * Copyright 2003 Sun Microsystems, Inc. All Rights Reserved.2 * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved. 3 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 4 * … … 17 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 18 * 19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,20 * CA 95054 USA or visit www.sun.com if you need additional information or21 * have anyquestions.19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 22 * 23 23 */ -
trunk/openjdk/hotspot/src/os/solaris/dtrace/generateJvmOffsetsMain.c
r2 r278 1 1 /* 2 * Copyright 2003-2007 Sun Microsystems, Inc. All Rights Reserved.2 * Copyright (c) 2003, 2007, Oracle and/or its affiliates. All rights reserved. 3 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 4 * … … 17 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 18 * 19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,20 * CA 95054 USA or visit www.sun.com if you need additional information or21 * have anyquestions.19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 22 * 23 23 */ -
trunk/openjdk/hotspot/src/os/solaris/dtrace/hotspot.d
r2 r278 1 1 /* 2 * Copyright 2005 Sun Microsystems, Inc. All Rights Reserved.2 * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved. 3 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 4 * … … 17 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 18 * 19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,20 * CA 95054 USA or visit www.sun.com if you need additional information or21 * have anyquestions.19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 22 * 23 23 */ … … 26 26 probe class__loaded(char*, uintptr_t, void*, uintptr_t); 27 27 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); 28 36 probe vm__init__begin(); 29 37 probe vm__init__end(); 30 38 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); 31 42 probe gc__begin(uintptr_t); 32 43 probe gc__end(); … … 39 50 probe thread__start(char*, uintptr_t, uintptr_t, uintptr_t, uintptr_t); 40 51 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); 41 58 probe method__compile__begin( 42 59 char*, uintptr_t, char*, uintptr_t, char*, uintptr_t, char*, uintptr_t); -
trunk/openjdk/hotspot/src/os/solaris/dtrace/hotspot_jni.d
r2 r278 1 1 /* 2 * Copyright 2005 Sun Microsystems, Inc. All Rights Reserved.2 * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved. 3 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 4 * … … 17 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 18 * 19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,20 * CA 95054 USA or visit www.sun.com if you need additional information or21 * have anyquestions.19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 22 * 23 23 */ -
trunk/openjdk/hotspot/src/os/solaris/dtrace/hs_private.d
r2 r278 1 1 /* 2 * Copyright 2005 Sun Microsystems, Inc. All Rights Reserved.2 * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved. 3 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 4 * … … 17 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 18 * 19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,20 * CA 95054 USA or visit www.sun.com if you need additional information or21 * have anyquestions.19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 22 * 23 23 */ -
trunk/openjdk/hotspot/src/os/solaris/dtrace/jhelper.d
r2 r278 1 1 /* 2 * Copyright 2003-2009 Sun Microsystems, Inc. All Rights Reserved.2 * Copyright (c) 2003, 2009, Oracle and/or its affiliates. All rights reserved. 3 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 4 * … … 17 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 18 * 19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,20 * CA 95054 USA or visit www.sun.com if you need additional information or21 * have anyquestions.19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 22 * 23 23 */ -
trunk/openjdk/hotspot/src/os/solaris/dtrace/jvm_dtrace.c
r2 r278 1 1 /* 2 * Copyright 2006 Sun Microsystems, Inc. All Rights Reserved.2 * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. 3 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 4 * … … 17 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 18 * 19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,20 * CA 95054 USA or visit www.sun.com if you need additional information or21 * have anyquestions.19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 22 * 23 23 */ -
trunk/openjdk/hotspot/src/os/solaris/dtrace/jvm_dtrace.h
r2 r278 1 1 /* 2 * Copyright 2006 Sun Microsystems, Inc. All Rights Reserved.2 * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. 3 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 4 * … … 17 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 18 * 19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,20 * CA 95054 USA or visit www.sun.com if you need additional information or21 * have anyquestions.19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 22 * 23 23 */ -
trunk/openjdk/hotspot/src/os/solaris/dtrace/libjvm_db.c
r2 r278 1 1 /* 2 * Copyright 2003-2009 Sun Microsystems, Inc. All Rights Reserved.2 * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. 3 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 4 * … … 17 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 18 * 19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,20 * CA 95054 USA or visit www.sun.com if you need additional information or21 * have anyquestions.19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 22 * 23 23 */ … … 131 131 int32_t scopes_data_end; 132 132 int32_t oops_beg; /* _oops_offset */ 133 int32_t oops_ len; /* _oops_length */133 int32_t oops_end; 134 134 int32_t scopes_pcs_beg; /* _scopes_pcs_offset */ 135 135 int32_t scopes_pcs_end; … … 598 598 599 599 /* 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); 603 603 CHECK_FAIL(err); 604 604 … … 625 625 N->orig_pc_offset); 626 626 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); 629 629 630 630 fprintf(stderr, "\t nmethod_info: scopes_data_beg: %#x, scopes_data_end: %#x\n", … … 938 938 } 939 939 940 static int 941 scopeDesc_chain(Nmethod_t *N) 942 { 940 static int scopeDesc_chain(Nmethod_t *N) { 943 941 int32_t decode_offset = 0; 944 942 int32_t err; 945 943 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 } 948 947 949 948 err = ps_pread(N->J->P, N->pc_desc + OFFSET_PcDesc_scope_decode_offset, … … 952 951 953 952 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); 960 973 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); 965 977 } 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 } 988 990 return err; 989 991 } -
trunk/openjdk/hotspot/src/os/solaris/dtrace/libjvm_db.h
r2 r278 1 1 /* 2 * Copyright 2003-2004 Sun Microsystems, Inc. All Rights Reserved.2 * Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved. 3 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 4 * … … 17 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 18 * 19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,20 * CA 95054 USA or visit www.sun.com if you need additional information or21 * have anyquestions.19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 22 * 23 23 */ -
trunk/openjdk/hotspot/src/os/solaris/launcher/java.c
r2 r278 1 1 /* 2 * Copyright 1998-2008 Sun Microsystems, Inc. All Rights Reserved.2 * Copyright (c) 1998, 2008, Oracle and/or its affiliates. All rights reserved. 3 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 4 * … … 17 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 18 * 19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,20 * CA 95054 USA or visit www.sun.com if you need additional information or21 * have anyquestions.19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 22 * 23 23 */ -
trunk/openjdk/hotspot/src/os/solaris/launcher/java.h
r2 r278 1 1 /* 2 * Copyright 1998-2008 Sun Microsystems, Inc. All Rights Reserved.2 * Copyright (c) 1998, 2008, Oracle and/or its affiliates. All rights reserved. 3 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 4 * … … 17 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 18 * 19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,20 * CA 95054 USA or visit www.sun.com if you need additional information or21 * have anyquestions.19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 22 * 23 23 */ -
trunk/openjdk/hotspot/src/os/solaris/launcher/java_md.c
r2 r278 1 1 /* 2 * Copyright 1998-2008 Sun Microsystems, Inc. All Rights Reserved.2 * Copyright (c) 1998, 2008, Oracle and/or its affiliates. All rights reserved. 3 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 4 * … … 17 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 18 * 19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,20 * CA 95054 USA or visit www.sun.com if you need additional information or21 * have anyquestions.19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 22 * 23 23 */ -
trunk/openjdk/hotspot/src/os/solaris/launcher/java_md.h
r2 r278 1 1 /* 2 * Copyright 1998-2005 Sun Microsystems, Inc. All Rights Reserved.2 * Copyright (c) 1998, 2005, Oracle and/or its affiliates. All rights reserved. 3 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 4 * … … 17 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 18 * 19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,20 * CA 95054 USA or visit www.sun.com if you need additional information or21 * have anyquestions.19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 22 * 23 23 */ -
trunk/openjdk/hotspot/src/os/solaris/vm/attachListener_solaris.cpp
r2 r278 1 1 /* 2 * Copyright 2005-2006 Sun Microsystems, Inc. All Rights Reserved.2 * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. 3 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 4 * … … 17 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 18 * 19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,20 * CA 95054 USA or visit www.sun.com if you need additional information or21 * have anyquestions.19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 22 * 23 23 */ … … 365 365 int SolarisAttachListener::create_door() { 366 366 char door_path[PATH_MAX+1]; 367 char initial_path[PATH_MAX+1]; 367 368 int fd, res; 368 369 … … 376 377 } 377 378 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); 381 384 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); 383 387 return -1; 384 388 } 385 389 assert(fd >= 0, "bad file descriptor"); 386 set_door_path(door_path);387 390 RESTARTABLE(::close(fd), res); 388 391 389 392 // attach the door descriptor to the file 390 if ((res = ::fattach(dd, door_path)) == -1) {393 if ((res = ::fattach(dd, initial_path)) == -1) { 391 394 // if busy then detach and try again 392 395 if (errno == EBUSY) { 393 ::fdetach( door_path);394 res = ::fattach(dd, door_path);396 ::fdetach(initial_path); 397 res = ::fattach(dd, initial_path); 395 398 } 396 399 if (res == -1) { … … 399 402 } 400 403 } 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 } 401 413 if (dd >= 0) { 402 414 set_door_descriptor(dd); 415 set_door_path(door_path); 403 416 } 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); 407 419 return -1; 408 420 } … … 592 604 return false; // initialized at startup or already initialized 593 605 } 594 char fn[ 32];606 char fn[PATH_MAX+1]; 595 607 sprintf(fn, ".attach_pid%d", os::current_process_id()); 596 608 int ret; … … 598 610 RESTARTABLE(::stat64(fn, &st), ret); 599 611 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()); 601 614 RESTARTABLE(::stat64(fn, &st), ret); 602 615 } … … 669 682 } 670 683 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; 678 696 } 679 697 -
trunk/openjdk/hotspot/src/os/solaris/vm/c1_globals_solaris.hpp
r2 r278 1 1 /* 2 * Copyright 2000-2001 Sun Microsystems, Inc. All Rights Reserved.2 * Copyright (c) 2000, 2001, Oracle and/or its affiliates. All rights reserved. 3 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 4 * … … 17 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 18 * 19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,20 * CA 95054 USA or visit www.sun.com if you need additional information or21 * have anyquestions.19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 22 * 23 23 */ -
trunk/openjdk/hotspot/src/os/solaris/vm/c2_globals_solaris.hpp
r2 r278 1 1 /* 2 * Copyright 2000-2001 Sun Microsystems, Inc. All Rights Reserved.2 * Copyright (c) 2000, 2001, Oracle and/or its affiliates. All rights reserved. 3 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 4 * … … 17 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 18 * 19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,20 * CA 95054 USA or visit www.sun.com if you need additional information or21 * have anyquestions.19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 22 * 23 23 */ -
trunk/openjdk/hotspot/src/os/solaris/vm/chaitin_solaris.cpp
r2 r278 1 1 /* 2 * Copyright 1999-2001 Sun Microsystems, Inc. All Rights Reserved.2 * Copyright (c) 1999, 2001, Oracle and/or its affiliates. All rights reserved. 3 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 4 * … … 17 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 18 * 19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,20 * CA 95054 USA or visit www.sun.com if you need additional information or21 * have anyquestions.19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 22 * 23 23 */ -
trunk/openjdk/hotspot/src/os/solaris/vm/dtraceJSDT_solaris.cpp
r2 r278 1 1 /* 2 * Copyright 2005-2008 Sun Microsystems, Inc. All Rights Reserved.2 * Copyright (c) 2005, 2008, Oracle and/or its affiliates. All rights reserved. 3 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 4 * … … 17 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 18 * 19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,20 * CA 95054 USA or visit www.sun.com if you need additional information or21 * have anyquestions.19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 22 * 23 23 */ -
trunk/openjdk/hotspot/src/os/solaris/vm/globals_solaris.hpp
r2 r278 1 1 /* 2 * Copyright 2005-2008 Sun Microsystems, Inc. All Rights Reserved.2 * Copyright (c) 2005, 2008, Oracle and/or its affiliates. All rights reserved. 3 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 4 * … … 17 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 18 * 19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,20 * CA 95054 USA or visit www.sun.com if you need additional information or21 * have anyquestions.19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 22 * 23 23 */ -
trunk/openjdk/hotspot/src/os/solaris/vm/hpi_solaris.cpp
r2 r278 1 1 /* 2 * Copyright 1998-2006 Sun Microsystems, Inc. All Rights Reserved.2 * Copyright (c) 1998, 2006, Oracle and/or its affiliates. All rights reserved. 3 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 4 * … … 17 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 18 * 19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,20 * CA 95054 USA or visit www.sun.com if you need additional information or21 * have anyquestions.19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 22 * 23 23 */ -
trunk/openjdk/hotspot/src/os/solaris/vm/hpi_solaris.hpp
r2 r278 1 1 /* 2 * Copyright 1998-2007 Sun Microsystems, Inc. All Rights Reserved.2 * Copyright (c) 1998, 2007, Oracle and/or its affiliates. All rights reserved. 3 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 4 * … … 17 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 18 * 19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,20 * CA 95054 USA or visit www.sun.com if you need additional information or21 * have anyquestions.19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 22 * 23 23 */ -
trunk/openjdk/hotspot/src/os/solaris/vm/interfaceSupport_solaris.hpp
r2 r278 1 1 /* 2 * Copyright 2005 Sun Microsystems, Inc. All Rights Reserved.2 * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved. 3 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 4 * … … 17 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 18 * 19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,20 * CA 95054 USA or visit www.sun.com if you need additional information or21 * have anyquestions.19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 22 * 23 23 */ -
trunk/openjdk/hotspot/src/os/solaris/vm/jsig.c
r2 r278 1 1 /* 2 * Copyright 2001-2003 Sun Microsystems, Inc. All Rights Reserved.2 * Copyright (c) 2001, 2003, Oracle and/or its affiliates. All rights reserved. 3 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 4 * … … 17 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 18 * 19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,20 * CA 95054 USA or visit www.sun.com if you need additional information or21 * have anyquestions.19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 22 * 23 23 */ -
trunk/openjdk/hotspot/src/os/solaris/vm/jvm_solaris.cpp
r2 r278 1 1 /* 2 * Copyright 1998-2007 Sun Microsystems, Inc. All Rights Reserved.2 * Copyright (c) 1998, 2007, Oracle and/or its affiliates. All rights reserved. 3 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 4 * … … 17 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 18 * 19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,20 * CA 95054 USA or visit www.sun.com if you need additional information or21 * have anyquestions.19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 22 * 23 23 */ -
trunk/openjdk/hotspot/src/os/solaris/vm/jvm_solaris.h
r2 r278 1 1 /* 2 * Copyright 1998-2005 Sun Microsystems, Inc. All Rights Reserved.2 * Copyright (c) 1998, 2005, Oracle and/or its affiliates. All rights reserved. 3 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 4 * … … 17 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 18 * 19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,20 * CA 95054 USA or visit www.sun.com if you need additional information or21 * have anyquestions.19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 22 * 23 23 */ -
trunk/openjdk/hotspot/src/os/solaris/vm/mutex_solaris.cpp
r2 r278 1 1 /* 2 * Copyright (c) 2007 Sun Microsystems, Inc. All Rights Reserved.2 * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. 3 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 4 * … … 17 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 18 * 19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,20 * CA 95054 USA or visit www.sun.com if you need additional information or21 * have anyquestions.19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 22 * 23 23 */ -
trunk/openjdk/hotspot/src/os/solaris/vm/mutex_solaris.inline.hpp
r2 r278 1 1 /* 2 * Copyright 1998-2002 Sun Microsystems, Inc. All Rights Reserved.2 * Copyright (c) 1998, 2002, Oracle and/or its affiliates. All rights reserved. 3 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 4 * … … 17 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 18 * 19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,20 * CA 95054 USA or visit www.sun.com if you need additional information or21 * have anyquestions.19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 22 * 23 23 */ -
trunk/openjdk/hotspot/src/os/solaris/vm/objectMonitor_solaris.cpp
r2 r278 1 1 /* 2 * Copyright 1998-2005 Sun Microsystems, Inc. All Rights Reserved.2 * Copyright (c) 1998, 2005, Oracle and/or its affiliates. All rights reserved. 3 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 4 * … … 17 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 18 * 19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,20 * CA 95054 USA or visit www.sun.com if you need additional information or21 * have anyquestions.19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 22 * 23 23 */ -
trunk/openjdk/hotspot/src/os/solaris/vm/objectMonitor_solaris.hpp
r2 r278 1 1 /* 2 * Copyright 1998-2005 Sun Microsystems, Inc. All Rights Reserved.2 * Copyright (c) 1998, 2005, Oracle and/or its affiliates. All rights reserved. 3 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 4 * … … 17 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 18 * 19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,20 * CA 95054 USA or visit www.sun.com if you need additional information or21 * have anyquestions.19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 22 * 23 23 */ -
trunk/openjdk/hotspot/src/os/solaris/vm/objectMonitor_solaris.inline.hpp
r2 r278 1 1 /* 2 * Copyright 1998-2005 Sun Microsystems, Inc. All Rights Reserved.2 * Copyright (c) 1998, 2005, Oracle and/or its affiliates. All rights reserved. 3 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 4 * … … 17 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 18 * 19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,20 * CA 95054 USA or visit www.sun.com if you need additional information or21 * have anyquestions.19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 22 * 23 23 */ -
trunk/openjdk/hotspot/src/os/solaris/vm/osThread_solaris.cpp
r2 r278 1 1 /* 2 * Copyright 1998-2008 Sun Microsystems, Inc. All Rights Reserved.2 * Copyright (c) 1998, 2008, Oracle and/or its affiliates. All rights reserved. 3 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 4 * … … 17 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 18 * 19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,20 * CA 95054 USA or visit www.sun.com if you need additional information or21 * have anyquestions.19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 22 * 23 23 */ -
trunk/openjdk/hotspot/src/os/solaris/vm/osThread_solaris.hpp
r2 r278 1 1 /* 2 * Copyright 1997-2006 Sun Microsystems, Inc. All Rights Reserved.2 * Copyright (c) 1997, 2006, Oracle and/or its affiliates. All rights reserved. 3 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 4 * … … 17 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 18 * 19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,20 * CA 95054 USA or visit www.sun.com if you need additional information or21 * have anyquestions.19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 22 * 23 23 */ … … 124 124 int set_interrupt_callback (Sync_Interrupt_Callback * cb); 125 125 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); 127 127 128 128 // *************************************************************** -
trunk/openjdk/hotspot/src/os/solaris/vm/os_share_solaris.hpp
r2 r278 1 1 /* 2 * Copyright 1999-2007 Sun Microsystems, Inc. All Rights Reserved.2 * Copyright (c) 1999, 2007, Oracle and/or its affiliates. All rights reserved. 3 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 4 * … … 17 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 18 * 19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,20 * CA 95054 USA or visit www.sun.com if you need additional information or21 * have anyquestions.19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 22 * 23 23 */ -
trunk/openjdk/hotspot/src/os/solaris/vm/os_solaris.cpp
r2 r278 1 1 /* 2 * Copyright 1997-2009 Sun Microsystems, Inc. All Rights Reserved.2 * Copyright (c) 1997, 2009, Oracle and/or its affiliates. All rights reserved. 3 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 4 * … … 17 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 18 * 19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,20 * CA 95054 USA or visit www.sun.com if you need additional information or21 * have anyquestions.19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 22 * 23 23 */ … … 458 458 459 459 void os::Solaris::initialize_system_info() { 460 _processor_count = sysconf(_SC_NPROCESSORS_CONF);460 set_processor_count(sysconf(_SC_NPROCESSORS_CONF)); 461 461 _processors_online = sysconf (_SC_NPROCESSORS_ONLN); 462 462 _physical_memory = (julong)sysconf(_SC_PHYS_PAGES) * (julong)sysconf(_SC_PAGESIZE); … … 674 674 } 675 675 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;685 676 } 686 677 … … 1577 1568 thread_key_t tk; 1578 1569 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))); 1580 1572 return int(tk); 1581 1573 } … … 1595 1587 vm_exit_out_of_memory(SMALLINT, "thr_setspecific: out of swap space"); 1596 1588 } 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))); 1598 1591 } 1599 1592 } else { … … 1748 1741 timeval t; 1749 1742 if (gettimeofday( &t, NULL) == -1) 1750 fatal 1("os::javaTimeMillis: gettimeofday (%s)", strerror(errno));1743 fatal(err_msg("os::javaTimeMillis: gettimeofday (%s)", strerror(errno))); 1751 1744 return jlong(t.tv_sec) * 1000 + jlong(t.tv_usec) / 1000; 1752 1745 } … … 1827 1820 const char* os::dll_file_extension() { return ".so"; } 1828 1821 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. 1824 const char* os::get_temp_directory() { return "/tmp"; } 1830 1825 1831 1826 static bool file_exists(const char* filename) { … … 2056 2051 {EM_SPARCV9, EM_SPARCV9, ELFCLASS64, ELFDATA2MSB, (char*)"Sparc v9 64"}, 2057 2052 {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"} 2059 2055 }; 2060 2056 … … 2073 2069 #elif (defined __powerpc__) 2074 2070 static Elf32_Half running_arch_code=EM_PPC; 2071 #elif (defined ARM) 2072 static Elf32_Half running_arch_code=EM_ARM; 2075 2073 #else 2076 2074 #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 2078 2076 #endif 2079 2077 … … 2440 2438 if (java_home_var != NULL && java_home_var[0] != 0) { 2441 2439 char cpu_arch[12]; 2440 char* jrelib_p; 2441 int len; 2442 2442 sysinfo(SI_ARCHITECTURE, cpu_arch, sizeof(cpu_arch)); 2443 2443 #ifdef _LP64 … … 2455 2455 2456 2456 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 2458 2466 if (0 == access(buf, F_OK)) { 2459 2467 // Use current module name "libjvm[_g].so" instead of … … 2462 2470 // It is used when we are choosing the HPI library's name 2463 2471 // "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); 2465 2474 } else { 2466 2475 // Go back to path of .so … … 2697 2706 return; 2698 2707 } 2708 } 2709 2710 bool os::create_stack_guard_pages(char* addr, size_t size) { 2711 return os::commit_memory(addr, size); 2712 } 2713 2714 bool os::remove_stack_guard_pages(char* addr, size_t size) { 2715 return os::uncommit_memory(addr, size); 2699 2716 } 2700 2717 … … 3135 3152 // Simply choose a conservative value as default. 3136 3153 *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); 3138 3156 3139 3157 // ISM is available on all supported Solaris versions … … 4232 4250 // old sigaction on it own. 4233 4251 } 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)); 4235 4254 } 4236 4255 } … … 4763 4782 page_size = sysconf(_SC_PAGESIZE); 4764 4783 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))); 4766 4786 init_page_sizes((size_t) page_size); 4767 4787 … … 4774 4794 int fd = open("/dev/zero", O_RDWR); 4775 4795 if (fd < 0) { 4776 fatal 1("os::init: cannot open /dev/zero (%s)", strerror(errno));4796 fatal(err_msg("os::init: cannot open /dev/zero (%s)", strerror(errno))); 4777 4797 } else { 4778 4798 Solaris::set_dev_zero_fd(fd); … … 4991 5011 } 4992 5012 5013 void os::init_3(void) { 5014 return; 5015 } 4993 5016 4994 5017 // Mark the polling page as unreadable … … 5396 5419 5397 5420 //--------------------------------------------------------------------------------- 5398 #ifndef PRODUCT5399 5421 5400 5422 static address same_page(address x, address y) { … … 5408 5430 } 5409 5431 5410 bool os::find(address addr ) {5432 bool os::find(address addr, outputStream* st) { 5411 5433 Dl_info dlinfo; 5412 5434 memset(&dlinfo, 0, sizeof(dlinfo)); 5413 5435 if (dladdr(addr, &dlinfo)) { 5414 5436 #ifdef _LP64 5415 tty->print("0x%016lx: ", addr);5437 st->print("0x%016lx: ", addr); 5416 5438 #else 5417 tty->print("0x%08x: ", addr);5439 st->print("0x%08x: ", addr); 5418 5440 #endif 5419 5441 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); 5421 5443 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); 5423 5445 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); 5426 5448 #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); 5428 5450 #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); 5430 5452 #endif 5431 tty->cr();5453 st->cr(); 5432 5454 5433 5455 if (Verbose) { … … 5442 5464 && end > dlinfo2.dli_saddr && dlinfo2.dli_saddr > begin) 5443 5465 end = (address) dlinfo2.dli_saddr; 5444 Disassembler::decode(begin, end );5466 Disassembler::decode(begin, end, st); 5445 5467 } 5446 5468 return true; … … 5448 5470 return false; 5449 5471 } 5450 5451 #endif5452 5453 5472 5454 5473 // Following function has been added to support HotSparc's libjvm.so running … … 5980 5999 } 5981 6000 } 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 // 6007 bool 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 1 1 /* 2 * Copyright 1997-2009 Sun Microsystems, Inc. All Rights Reserved.2 * Copyright (c) 1997, 2009, Oracle and/or its affiliates. All rights reserved. 3 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 4 * … … 17 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 18 * 19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,20 * CA 95054 USA or visit www.sun.com if you need additional information or21 * have anyquestions.19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 22 * 23 23 */ -
trunk/openjdk/hotspot/src/os/solaris/vm/os_solaris.inline.hpp
r2 r278 1 1 /* 2 * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved.2 * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved. 3 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 4 * … … 17 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 18 * 19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,20 * CA 95054 USA or visit www.sun.com if you need additional information or21 * have anyquestions.19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 22 * 23 23 */ -
trunk/openjdk/hotspot/src/os/solaris/vm/perfMemory_solaris.cpp
r2 r278 1 1 /* 2 * Copyright 2001-2007 Sun Microsystems, Inc. All Rights Reserved.2 * Copyright (c) 2001, 2007, Oracle and/or its affiliates. All rights reserved. 3 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 4 * … … 17 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 18 * 19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,20 * CA 95054 USA or visit www.sun.com if you need additional information or21 * have anyquestions.19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 22 * 23 23 */ … … 148 148 const char* tmpdir = os::get_temp_directory(); 149 149 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; 151 151 char* dirname = NEW_C_HEAP_ARRAY(char, nbytes); 152 152 153 153 // 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); 155 155 156 156 return dirname; … … 323 323 324 324 char* usrdir_name = NEW_C_HEAP_ARRAY(char, 325 strlen(tmpdirname) + strlen(dentry->d_name) + 1);325 strlen(tmpdirname) + strlen(dentry->d_name) + 2); 326 326 strcpy(usrdir_name, tmpdirname); 327 strcat(usrdir_name, "/"); 327 328 strcat(usrdir_name, dentry->d_name); 328 329 -
trunk/openjdk/hotspot/src/os/solaris/vm/stubRoutines_solaris.cpp
r2 r278 1 1 /* 2 * Copyright 2001-2002 Sun Microsystems, Inc. All Rights Reserved.2 * Copyright (c) 2001, 2002, Oracle and/or its affiliates. All rights reserved. 3 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 4 * … … 17 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 18 * 19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,20 * CA 95054 USA or visit www.sun.com if you need additional information or21 * have anyquestions.19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 22 * 23 23 */ -
trunk/openjdk/hotspot/src/os/solaris/vm/threadCritical_solaris.cpp
r2 r278 1 1 /* 2 * Copyright 2001-2003 Sun Microsystems, Inc. All Rights Reserved.2 * Copyright (c) 2001, 2003, Oracle and/or its affiliates. All rights reserved. 3 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 4 * … … 17 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 18 * 19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,20 * CA 95054 USA or visit www.sun.com if you need additional information or21 * have anyquestions.19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 22 * 23 23 */ … … 48 48 if (global_mut_owner != owner) { 49 49 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))); 51 52 assert(global_mut_count == 0, "must have clean count"); 52 53 assert(global_mut_owner == -1, "must have clean owner"); … … 67 68 global_mut_owner = -1; 68 69 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))); 70 72 } 71 73 } else { -
trunk/openjdk/hotspot/src/os/solaris/vm/thread_solaris.inline.hpp
r2 r278 1 1 /* 2 * Copyright 2002-2003 Sun Microsystems, Inc. All Rights Reserved.2 * Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved. 3 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 4 * … … 17 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 18 * 19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,20 * CA 95054 USA or visit www.sun.com if you need additional information or21 * have anyquestions.19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 22 * 23 23 */ -
trunk/openjdk/hotspot/src/os/solaris/vm/vmError_solaris.cpp
r2 r278 1 1 /* 2 * Copyright 2003-2006 Sun Microsystems, Inc. All Rights Reserved.2 * Copyright (c) 2003, 2006, Oracle and/or its affiliates. All rights reserved. 3 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 4 * … … 17 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 18 * 19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,20 * CA 95054 USA or visit www.sun.com if you need additional information or21 * have anyquestions.19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 22 * 23 23 */
Note:
See TracChangeset
for help on using the changeset viewer.