Mon, 04 Apr 2011 03:02:00 -0700
7032458: Zero and Shark fixes
Reviewed-by: twisti
Contributed-by: Gary Benson <gbenson@redhat.com>
1.1 --- a/src/cpu/zero/vm/globals_zero.hpp Sun Apr 03 12:00:54 2011 +0200 1.2 +++ b/src/cpu/zero/vm/globals_zero.hpp Mon Apr 04 03:02:00 2011 -0700 1.3 @@ -1,6 +1,6 @@ 1.4 /* 1.5 * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. 1.6 - * Copyright 2007, 2008, 2009, 2010 Red Hat, Inc. 1.7 + * Copyright 2007, 2008, 2009, 2010, 2011 Red Hat, Inc. 1.8 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.9 * 1.10 * This code is free software; you can redistribute it and/or modify it 1.11 @@ -54,4 +54,6 @@ 1.12 1.13 define_pd_global(bool, UseMembar, false); 1.14 1.15 +// GC Ergo Flags 1.16 +define_pd_global(intx, CMSYoungGenPerWorker, 16*M); // default max size of CMS young gen, per GC worker thread 1.17 #endif // CPU_ZERO_VM_GLOBALS_ZERO_HPP
2.1 --- a/src/cpu/zero/vm/relocInfo_zero.cpp Sun Apr 03 12:00:54 2011 +0200 2.2 +++ b/src/cpu/zero/vm/relocInfo_zero.cpp Mon Apr 04 03:02:00 2011 -0700 2.3 @@ -1,6 +1,6 @@ 2.4 /* 2.5 * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. 2.6 - * Copyright 2007, 2009 Red Hat, Inc. 2.7 + * Copyright 2007, 2009, 2010, 2011 Red Hat, Inc. 2.8 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 2.9 * 2.10 * This code is free software; you can redistribute it and/or modify it 2.11 @@ -31,7 +31,7 @@ 2.12 #include "oops/oop.inline.hpp" 2.13 #include "runtime/safepoint.hpp" 2.14 2.15 -void Relocation::pd_set_data_value(address x, intptr_t o) { 2.16 +void Relocation::pd_set_data_value(address x, intptr_t o, bool verify_only) { 2.17 ShouldNotCallThis(); 2.18 } 2.19
3.1 --- a/src/cpu/zero/vm/sharedRuntime_zero.cpp Sun Apr 03 12:00:54 2011 +0200 3.2 +++ b/src/cpu/zero/vm/sharedRuntime_zero.cpp Mon Apr 04 03:02:00 2011 -0700 3.3 @@ -1,6 +1,6 @@ 3.4 /* 3.5 * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. 3.6 - * Copyright 2007, 2008, 2009, 2010 Red Hat, Inc. 3.7 + * Copyright 2007, 2008, 2009, 2010, 2011 Red Hat, Inc. 3.8 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3.9 * 3.10 * This code is free software; you can redistribute it and/or modify it 3.11 @@ -78,15 +78,17 @@ 3.12 3.13 nmethod *SharedRuntime::generate_native_wrapper(MacroAssembler *masm, 3.14 methodHandle method, 3.15 - int total_in_args, 3.16 - int comp_args_on_stack, 3.17 - BasicType *in_sig_bt, 3.18 - VMRegPair *in_regs, 3.19 + int compile_id, 3.20 + int total_args_passed, 3.21 + int max_arg, 3.22 + BasicType *sig_bt, 3.23 + VMRegPair *regs, 3.24 BasicType ret_type) { 3.25 #ifdef SHARK 3.26 return SharkCompiler::compiler()->generate_native_wrapper(masm, 3.27 method, 3.28 - in_sig_bt, 3.29 + compile_id, 3.30 + sig_bt, 3.31 ret_type); 3.32 #else 3.33 ShouldNotCallThis();
4.1 --- a/src/share/vm/ci/ciTypeFlow.hpp Sun Apr 03 12:00:54 2011 +0200 4.2 +++ b/src/share/vm/ci/ciTypeFlow.hpp Mon Apr 04 03:02:00 2011 -0700 4.3 @@ -34,6 +34,7 @@ 4.4 #include "ci/ciEnv.hpp" 4.5 #include "ci/ciKlass.hpp" 4.6 #include "ci/ciMethodBlocks.hpp" 4.7 +#include "shark/shark_globals.hpp" 4.8 #endif 4.9 4.10
5.1 --- a/src/share/vm/compiler/compileBroker.cpp Sun Apr 03 12:00:54 2011 +0200 5.2 +++ b/src/share/vm/compiler/compileBroker.cpp Mon Apr 04 03:02:00 2011 -0700 5.3 @@ -847,9 +847,9 @@ 5.4 // Initialize the compilation queue 5.5 void CompileBroker::init_compiler_threads(int c1_compiler_count, int c2_compiler_count) { 5.6 EXCEPTION_MARK; 5.7 -#ifndef ZERO 5.8 +#if !defined(ZERO) && !defined(SHARK) 5.9 assert(c2_compiler_count > 0 || c1_compiler_count > 0, "No compilers?"); 5.10 -#endif // !ZERO 5.11 +#endif // !ZERO && !SHARK 5.12 if (c2_compiler_count > 0) { 5.13 _c2_method_queue = new CompileQueue("C2MethodQueue", MethodCompileQueue_lock); 5.14 } 5.15 @@ -1118,7 +1118,7 @@ 5.16 5.17 assert(!HAS_PENDING_EXCEPTION, "No exception should be present"); 5.18 // some prerequisites that are compiler specific 5.19 - if (compiler(comp_level)->is_c2()) { 5.20 + if (compiler(comp_level)->is_c2() || compiler(comp_level)->is_shark()) { 5.21 method->constants()->resolve_string_constants(CHECK_0); 5.22 // Resolve all classes seen in the signature of the method 5.23 // we are compiling.
6.1 --- a/src/share/vm/interpreter/bytecodeInterpreter.cpp Sun Apr 03 12:00:54 2011 +0200 6.2 +++ b/src/share/vm/interpreter/bytecodeInterpreter.cpp Mon Apr 04 03:02:00 2011 -0700 6.3 @@ -568,7 +568,7 @@ 6.4 /* 0xDC */ &&opc_default, &&opc_default, &&opc_default, &&opc_default, 6.5 6.6 /* 0xE0 */ &&opc_default, &&opc_default, &&opc_default, &&opc_default, 6.7 -/* 0xE4 */ &&opc_default, &&opc_return_register_finalizer, &&opc_default, &&opc_default, 6.8 +/* 0xE4 */ &&opc_default, &&opc_default, &&opc_default, &&opc_return_register_finalizer, 6.9 /* 0xE8 */ &&opc_default, &&opc_default, &&opc_default, &&opc_default, 6.10 /* 0xEC */ &&opc_default, &&opc_default, &&opc_default, &&opc_default, 6.11
7.1 --- a/src/share/vm/shark/sharkCompiler.cpp Sun Apr 03 12:00:54 2011 +0200 7.2 +++ b/src/share/vm/shark/sharkCompiler.cpp Mon Apr 04 03:02:00 2011 -0700 7.3 @@ -1,6 +1,6 @@ 7.4 /* 7.5 * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. 7.6 - * Copyright 2008, 2009, 2010 Red Hat, Inc. 7.7 + * Copyright 2008, 2009, 2010, 2011 Red Hat, Inc. 7.8 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 7.9 * 7.10 * This code is free software; you can redistribute it and/or modify it 7.11 @@ -218,6 +218,7 @@ 7.12 7.13 nmethod* SharkCompiler::generate_native_wrapper(MacroAssembler* masm, 7.14 methodHandle target, 7.15 + int compile_id, 7.16 BasicType* arg_types, 7.17 BasicType return_type) { 7.18 assert(is_initialized(), "should be"); 7.19 @@ -241,6 +242,7 @@ 7.20 7.21 // Return the nmethod for installation in the VM 7.22 return nmethod::new_native_nmethod(target, 7.23 + compile_id, 7.24 masm->code(), 7.25 0, 7.26 0,
8.1 --- a/src/share/vm/shark/sharkCompiler.hpp Sun Apr 03 12:00:54 2011 +0200 8.2 +++ b/src/share/vm/shark/sharkCompiler.hpp Mon Apr 04 03:02:00 2011 -0700 8.3 @@ -1,6 +1,6 @@ 8.4 /* 8.5 * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. 8.6 - * Copyright 2008, 2009 Red Hat, Inc. 8.7 + * Copyright 2008, 2009, 2010, 2011 Red Hat, Inc. 8.8 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 8.9 * 8.10 * This code is free software; you can redistribute it and/or modify it 8.11 @@ -60,6 +60,7 @@ 8.12 // Generate a wrapper for a native (JNI) method 8.13 nmethod* generate_native_wrapper(MacroAssembler* masm, 8.14 methodHandle target, 8.15 + int compile_id, 8.16 BasicType* arg_types, 8.17 BasicType return_type); 8.18 8.19 @@ -113,7 +114,8 @@ 8.20 // Global access 8.21 public: 8.22 static SharkCompiler* compiler() { 8.23 - AbstractCompiler *compiler = CompileBroker::compiler(CompLevel_simple); 8.24 + AbstractCompiler *compiler = 8.25 + CompileBroker::compiler(CompLevel_full_optimization); 8.26 assert(compiler->is_shark() && compiler->is_initialized(), "should be"); 8.27 return (SharkCompiler *) compiler; 8.28 }
9.1 --- a/src/share/vm/utilities/globalDefinitions.hpp Sun Apr 03 12:00:54 2011 +0200 9.2 +++ b/src/share/vm/utilities/globalDefinitions.hpp Mon Apr 04 03:02:00 2011 -0700 9.3 @@ -746,9 +746,9 @@ 9.4 CompLevel_simple = 1, // C1 9.5 CompLevel_limited_profile = 2, // C1, invocation & backedge counters 9.6 CompLevel_full_profile = 3, // C1, invocation & backedge counters + mdo 9.7 - CompLevel_full_optimization = 4, // C2 9.8 + CompLevel_full_optimization = 4, // C2 or Shark 9.9 9.10 -#if defined(COMPILER2) 9.11 +#if defined(COMPILER2) || defined(SHARK) 9.12 CompLevel_highest_tier = CompLevel_full_optimization, // pure C2 and tiered 9.13 #elif defined(COMPILER1) 9.14 CompLevel_highest_tier = CompLevel_simple, // pure C1 9.15 @@ -760,7 +760,7 @@ 9.16 CompLevel_initial_compile = CompLevel_full_profile // tiered 9.17 #elif defined(COMPILER1) 9.18 CompLevel_initial_compile = CompLevel_simple // pure C1 9.19 -#elif defined(COMPILER2) 9.20 +#elif defined(COMPILER2) || defined(SHARK) 9.21 CompLevel_initial_compile = CompLevel_full_optimization // pure C2 9.22 #else 9.23 CompLevel_initial_compile = CompLevel_none
10.1 --- a/src/share/vm/utilities/globalDefinitions_gcc.hpp Sun Apr 03 12:00:54 2011 +0200 10.2 +++ b/src/share/vm/utilities/globalDefinitions_gcc.hpp Mon Apr 04 03:02:00 2011 -0700 10.3 @@ -77,7 +77,9 @@ 10.4 # endif 10.5 10.6 #ifdef LINUX 10.7 +#ifndef __STDC_LIMIT_MACROS 10.8 #define __STDC_LIMIT_MACROS 10.9 +#endif // __STDC_LIMIT_MACROS 10.10 #include <inttypes.h> 10.11 #include <signal.h> 10.12 #include <ucontext.h>