Mercurial > hg > graal-compiler
changeset 5940:f96bddf3d3f3
Merge
author | jcoomes |
---|---|
date | Fri, 16 Mar 2012 23:45:05 -0700 |
parents | 970cbbba54b0 (diff) c7a555a9449a (current diff) |
children | f4767e53d6e0 1a11548571e8 6522ad563f99 |
files | |
diffstat | 11 files changed, 47 insertions(+), 19 deletions(-) [+] |
line wrap: on
line diff
--- a/agent/src/share/classes/sun/jvm/hotspot/jdi/ConnectorImpl.java Wed Mar 14 12:49:27 2012 +0100 +++ b/agent/src/share/classes/sun/jvm/hotspot/jdi/ConnectorImpl.java Fri Mar 16 23:45:05 2012 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -217,8 +217,8 @@ } protected void checkNativeLink(SecurityManager sm, String os) { - if (os.equals("SunOS") || os.equals("Linux")) { - // link "saproc" - SA native library on SunOS and Linux? + if (os.equals("SunOS") || os.equals("Linux") || os.contains("OS X")) { + // link "saproc" - SA native library on SunOS, Linux, and Mac OS X sm.checkLink("saproc"); } else if (os.startsWith("Windows")) { // link "sawindbg" - SA native library on Windows.
--- a/agent/src/share/classes/sun/jvm/hotspot/utilities/PlatformInfo.java Wed Mar 14 12:49:27 2012 +0100 +++ b/agent/src/share/classes/sun/jvm/hotspot/utilities/PlatformInfo.java Fri Mar 16 23:45:05 2012 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -43,7 +43,7 @@ return "bsd"; } else if (os.equals("OpenBSD")) { return "bsd"; - } else if (os.equals("Darwin") || os.startsWith("Mac OS X")) { + } else if (os.equals("Darwin") || os.contains("OS X")) { return "bsd"; } else if (os.startsWith("Windows")) { return "win32"; @@ -52,17 +52,17 @@ } } - /* Returns "sparc" if on SPARC, "x86" if on x86. */ + /* Returns "sparc" for SPARC based platforms and "x86" for x86 based + platforms. Otherwise returns the value of os.arch. If the value + is not recognized as supported, an exception is thrown instead. */ public static String getCPU() throws UnsupportedPlatformException { String cpu = System.getProperty("os.arch"); - if (cpu.equals("i386")) { + if (cpu.equals("i386") || cpu.equals("x86")) { return "x86"; - } else if (cpu.equals("sparc") || cpu.equals("x86") || cpu.equals("ia64")) { + } else if (cpu.equals("sparc") || cpu.equals("sparcv9")) { + return "sparc"; + } else if (cpu.equals("ia64") || cpu.equals("amd64") || cpu.equals("x86_64")) { return cpu; - } else if (cpu.equals("sparcv9")) { - return "sparc"; - } else if (cpu.equals("x86_64") || cpu.equals("amd64")) { - return "amd64"; } else { throw new UnsupportedPlatformException("CPU type " + cpu + " not yet supported"); }
--- a/src/cpu/sparc/vm/sparc.ad Wed Mar 14 12:49:27 2012 +0100 +++ b/src/cpu/sparc/vm/sparc.ad Fri Mar 16 23:45:05 2012 -0700 @@ -1832,6 +1832,8 @@ case Op_CountLeadingZerosL: case Op_CountTrailingZerosI: case Op_CountTrailingZerosL: + case Op_PopCountI: + case Op_PopCountL: if (!UsePopCountInstruction) return false; break;
--- a/src/cpu/x86/vm/x86_32.ad Wed Mar 14 12:49:27 2012 +0100 +++ b/src/cpu/x86/vm/x86_32.ad Fri Mar 16 23:45:05 2012 -0700 @@ -1293,6 +1293,14 @@ if (!has_match_rule(opcode)) return false; + switch (opcode) { + case Op_PopCountI: + case Op_PopCountL: + if (!UsePopCountInstruction) + return false; + break; + } + return true; // Per default match rules are supported. }
--- a/src/cpu/x86/vm/x86_64.ad Wed Mar 14 12:49:27 2012 +0100 +++ b/src/cpu/x86/vm/x86_64.ad Fri Mar 16 23:45:05 2012 -0700 @@ -1714,6 +1714,14 @@ if (!has_match_rule(opcode)) return false; + switch (opcode) { + case Op_PopCountI: + case Op_PopCountL: + if (!UsePopCountInstruction) + return false; + break; + } + return true; // Per default match rules are supported. }
--- a/src/share/vm/oops/arrayKlass.cpp Wed Mar 14 12:49:27 2012 +0100 +++ b/src/share/vm/oops/arrayKlass.cpp Fri Mar 16 23:45:05 2012 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -153,6 +153,7 @@ } if (length > arrayOopDesc::max_array_length(T_ARRAY)) { report_java_out_of_memory("Requested array size exceeds VM limit"); + JvmtiExport::post_array_size_exhausted(); THROW_OOP_0(Universe::out_of_memory_error_array_size()); } int size = objArrayOopDesc::object_size(length);
--- a/src/share/vm/oops/instanceKlass.cpp Wed Mar 14 12:49:27 2012 +0100 +++ b/src/share/vm/oops/instanceKlass.cpp Fri Mar 16 23:45:05 2012 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -669,6 +669,7 @@ if (length < 0) THROW_0(vmSymbols::java_lang_NegativeArraySizeException()); if (length > arrayOopDesc::max_array_length(T_OBJECT)) { report_java_out_of_memory("Requested array size exceeds VM limit"); + JvmtiExport::post_array_size_exhausted(); THROW_OOP_0(Universe::out_of_memory_error_array_size()); } int size = objArrayOopDesc::object_size(length);
--- a/src/share/vm/oops/objArrayKlass.cpp Wed Mar 14 12:49:27 2012 +0100 +++ b/src/share/vm/oops/objArrayKlass.cpp Fri Mar 16 23:45:05 2012 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -68,6 +68,7 @@ return a; } else { report_java_out_of_memory("Requested array size exceeds VM limit"); + JvmtiExport::post_array_size_exhausted(); THROW_OOP_0(Universe::out_of_memory_error_array_size()); } } else {
--- a/src/share/vm/oops/typeArrayKlass.cpp Wed Mar 14 12:49:27 2012 +0100 +++ b/src/share/vm/oops/typeArrayKlass.cpp Fri Mar 16 23:45:05 2012 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -93,6 +93,7 @@ return t; } else { report_java_out_of_memory("Requested array size exceeds VM limit"); + JvmtiExport::post_array_size_exhausted(); THROW_OOP_0(Universe::out_of_memory_error_array_size()); } } else {
--- a/src/share/vm/opto/library_call.cpp Wed Mar 14 12:49:27 2012 +0100 +++ b/src/share/vm/opto/library_call.cpp Fri Mar 16 23:45:05 2012 -0700 @@ -338,11 +338,11 @@ break; case vmIntrinsics::_bitCount_i: - if (!Matcher::has_match_rule(Op_PopCountI)) return NULL; + if (!Matcher::match_rule_supported(Op_PopCountI)) return NULL; break; case vmIntrinsics::_bitCount_l: - if (!Matcher::has_match_rule(Op_PopCountL)) return NULL; + if (!Matcher::match_rule_supported(Op_PopCountL)) return NULL; break; case vmIntrinsics::_numberOfLeadingZeros_i:
--- a/src/share/vm/prims/jvmtiExport.hpp Wed Mar 14 12:49:27 2012 +0100 +++ b/src/share/vm/prims/jvmtiExport.hpp Fri Mar 16 23:45:05 2012 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -324,6 +324,12 @@ record_vm_internal_object_allocation(object); } } + inline static void post_array_size_exhausted() { + if (should_post_resource_exhausted()) { + post_resource_exhausted(JVMTI_RESOURCE_EXHAUSTED_OOM_ERROR, + "Requested array size exceeds VM limit"); + } + } static void cleanup_thread (JavaThread* thread) KERNEL_RETURN;