Wed, 24 Apr 2013 14:26:09 +0200
8012292: optimized build with GCC broken
Summary: Some #ifndef PRODUCT should be #ifdef ASSERT
Reviewed-by: kvn, twisti
Contributed-by: gdub <duboscq@ssw.jku.at>
1.1 --- a/make/jprt.properties Fri May 03 09:32:50 2013 +0200 1.2 +++ b/make/jprt.properties Wed Apr 24 14:26:09 2013 +0200 1.3 @@ -134,14 +134,14 @@ 1.4 1.5 jprt.build.targets.standard= \ 1.6 ${jprt.my.solaris.sparc}-{product|fastdebug}, \ 1.7 - ${jprt.my.solaris.sparcv9}-{product|fastdebug}, \ 1.8 + ${jprt.my.solaris.sparcv9}-{product|fastdebug|optimized}, \ 1.9 ${jprt.my.solaris.i586}-{product|fastdebug}, \ 1.10 ${jprt.my.solaris.x64}-{product|fastdebug}, \ 1.11 ${jprt.my.linux.i586}-{product|fastdebug}, \ 1.12 - ${jprt.my.linux.x64}-{product|fastdebug}, \ 1.13 + ${jprt.my.linux.x64}-{product|fastdebug|optimized}, \ 1.14 ${jprt.my.macosx.x64}-{product|fastdebug}, \ 1.15 ${jprt.my.windows.i586}-{product|fastdebug}, \ 1.16 - ${jprt.my.windows.x64}-{product|fastdebug}, \ 1.17 + ${jprt.my.windows.x64}-{product|fastdebug|optimized}, \ 1.18 ${jprt.my.linux.armvh}-{product|fastdebug} 1.19 1.20 jprt.build.targets.open= \
2.1 --- a/src/share/vm/classfile/classFileParser.cpp Fri May 03 09:32:50 2013 +0200 2.2 +++ b/src/share/vm/classfile/classFileParser.cpp Wed Apr 24 14:26:09 2013 +0200 2.3 @@ -3046,7 +3046,7 @@ 2.4 } 2.5 2.6 2.7 -#ifndef PRODUCT 2.8 +#ifdef ASSERT 2.9 static void parseAndPrintGenericSignatures( 2.10 instanceKlassHandle this_klass, TRAPS) { 2.11 assert(ParseAllGenericSignatures == true, "Shouldn't call otherwise"); 2.12 @@ -3071,7 +3071,7 @@ 2.13 } 2.14 } 2.15 } 2.16 -#endif // ndef PRODUCT 2.17 +#endif // def ASSERT 2.18 2.19 2.20 instanceKlassHandle ClassFileParser::parse_super_class(int super_class_index,
3.1 --- a/src/share/vm/classfile/vmSymbols.cpp Fri May 03 09:32:50 2013 +0200 3.2 +++ b/src/share/vm/classfile/vmSymbols.cpp Wed Apr 24 14:26:09 2013 +0200 3.3 @@ -49,7 +49,7 @@ 3.4 } 3.5 } 3.6 3.7 -#ifndef PRODUCT 3.8 +#ifdef ASSERT 3.9 #define VM_SYMBOL_ENUM_NAME_BODY(name, string) #name "\0" 3.10 static const char* vm_symbol_enum_names = 3.11 VM_SYMBOLS_DO(VM_SYMBOL_ENUM_NAME_BODY, VM_ALIAS_IGNORE) 3.12 @@ -64,7 +64,7 @@ 3.13 } 3.14 return string; 3.15 } 3.16 -#endif //PRODUCT 3.17 +#endif //ASSERT 3.18 3.19 // Put all the VM symbol strings in one place. 3.20 // Makes for a more compact libjvm.
4.1 --- a/src/share/vm/opto/runtime.cpp Fri May 03 09:32:50 2013 +0200 4.2 +++ b/src/share/vm/opto/runtime.cpp Wed Apr 24 14:26:09 2013 +0200 4.3 @@ -126,17 +126,15 @@ 4.4 4.5 // This should be called in an assertion at the start of OptoRuntime routines 4.6 // which are entered from compiled code (all of them) 4.7 -#ifndef PRODUCT 4.8 +#ifdef ASSERT 4.9 static bool check_compiled_frame(JavaThread* thread) { 4.10 assert(thread->last_frame().is_runtime_frame(), "cannot call runtime directly from compiled code"); 4.11 -#ifdef ASSERT 4.12 RegisterMap map(thread, false); 4.13 frame caller = thread->last_frame().sender(&map); 4.14 assert(caller.is_compiled_frame(), "not being called from compiled like code"); 4.15 -#endif /* ASSERT */ 4.16 return true; 4.17 } 4.18 -#endif 4.19 +#endif // ASSERT 4.20 4.21 4.22 #define gen(env, var, type_func_gen, c_func, fancy_jump, pass_tls, save_arg_regs, return_pc) \
5.1 --- a/src/share/vm/utilities/quickSort.cpp Fri May 03 09:32:50 2013 +0200 5.2 +++ b/src/share/vm/utilities/quickSort.cpp Wed Apr 24 14:26:09 2013 +0200 5.3 @@ -32,6 +32,7 @@ 5.4 #include "utilities/quickSort.hpp" 5.5 #include <stdlib.h> 5.6 5.7 +#ifdef ASSERT 5.8 static int test_comparator(int a, int b) { 5.9 if (a == b) { 5.10 return 0; 5.11 @@ -41,6 +42,7 @@ 5.12 } 5.13 return 1; 5.14 } 5.15 +#endif // ASSERT 5.16 5.17 static int test_even_odd_comparator(int a, int b) { 5.18 bool a_is_odd = (a % 2) == 1;