Thu, 22 May 2014 15:52:41 -0400
8037816: Fix for 8036122 breaks build with Xcode5/clang
8043029: Change 8037816 breaks HS build with older GCC versions which don't support diagnostic pragmas
8043164: Format warning in traceStream.hpp
Summary: Backport of main fix + two corrections, enables clang compilation, turns on format attributes, corrects/mutes warnings
Reviewed-by: kvn, coleenp, iveresov, twisti
1.1 --- a/src/cpu/ppc/vm/vm_version_ppc.cpp Thu May 15 18:23:26 2014 -0400 1.2 +++ b/src/cpu/ppc/vm/vm_version_ppc.cpp Thu May 22 15:52:41 2014 -0400 1.3 @@ -1,5 +1,5 @@ 1.4 /* 1.5 - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 1.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 1.7 * Copyright 2012, 2014 SAP AG. All rights reserved. 1.8 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.9 * 1.10 @@ -149,7 +149,7 @@ 1.11 } 1.12 1.13 void VM_Version::print_features() { 1.14 - tty->print_cr("Version: %s cache_line_size = %d", cpu_features(), get_cache_line_size()); 1.15 + tty->print_cr("Version: %s cache_line_size = %d", cpu_features(), (int) get_cache_line_size()); 1.16 } 1.17 1.18 #ifdef COMPILER2
2.1 --- a/src/cpu/sparc/vm/vm_version_sparc.cpp Thu May 15 18:23:26 2014 -0400 2.2 +++ b/src/cpu/sparc/vm/vm_version_sparc.cpp Thu May 22 15:52:41 2014 -0400 2.3 @@ -318,22 +318,22 @@ 2.4 tty->print("BIS"); 2.5 } 2.6 if (AllocatePrefetchLines > 1) { 2.7 - tty->print_cr(" at distance %d, %d lines of %d bytes", AllocatePrefetchDistance, AllocatePrefetchLines, AllocatePrefetchStepSize); 2.8 + tty->print_cr(" at distance %d, %d lines of %d bytes", (int) AllocatePrefetchDistance, (int) AllocatePrefetchLines, (int) AllocatePrefetchStepSize); 2.9 } else { 2.10 - tty->print_cr(" at distance %d, one line of %d bytes", AllocatePrefetchDistance, AllocatePrefetchStepSize); 2.11 + tty->print_cr(" at distance %d, one line of %d bytes", (int) AllocatePrefetchDistance, (int) AllocatePrefetchStepSize); 2.12 } 2.13 } 2.14 if (PrefetchCopyIntervalInBytes > 0) { 2.15 - tty->print_cr("PrefetchCopyIntervalInBytes %d", PrefetchCopyIntervalInBytes); 2.16 + tty->print_cr("PrefetchCopyIntervalInBytes %d", (int) PrefetchCopyIntervalInBytes); 2.17 } 2.18 if (PrefetchScanIntervalInBytes > 0) { 2.19 - tty->print_cr("PrefetchScanIntervalInBytes %d", PrefetchScanIntervalInBytes); 2.20 + tty->print_cr("PrefetchScanIntervalInBytes %d", (int) PrefetchScanIntervalInBytes); 2.21 } 2.22 if (PrefetchFieldsAhead > 0) { 2.23 - tty->print_cr("PrefetchFieldsAhead %d", PrefetchFieldsAhead); 2.24 + tty->print_cr("PrefetchFieldsAhead %d", (int) PrefetchFieldsAhead); 2.25 } 2.26 if (ContendedPaddingWidth > 0) { 2.27 - tty->print_cr("ContendedPaddingWidth %d", ContendedPaddingWidth); 2.28 + tty->print_cr("ContendedPaddingWidth %d", (int) ContendedPaddingWidth); 2.29 } 2.30 } 2.31 #endif // PRODUCT
3.1 --- a/src/cpu/x86/vm/assembler_x86.cpp Thu May 15 18:23:26 2014 -0400 3.2 +++ b/src/cpu/x86/vm/assembler_x86.cpp Thu May 22 15:52:41 2014 -0400 3.3 @@ -1,5 +1,5 @@ 3.4 /* 3.5 - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 3.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 3.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3.8 * 3.9 * This code is free software; you can redistribute it and/or modify it 3.10 @@ -522,11 +522,11 @@ 3.11 // these asserts are somewhat nonsensical 3.12 #ifndef _LP64 3.13 assert(which == imm_operand || which == disp32_operand, 3.14 - err_msg("which %d is_64_bit %d ip " INTPTR_FORMAT, which, is_64bit, ip)); 3.15 + err_msg("which %d is_64_bit %d ip " INTPTR_FORMAT, which, is_64bit, p2i(ip))); 3.16 #else 3.17 assert((which == call32_operand || which == imm_operand) && is_64bit || 3.18 which == narrow_oop_operand && !is_64bit, 3.19 - err_msg("which %d is_64_bit %d ip " INTPTR_FORMAT, which, is_64bit, ip)); 3.20 + err_msg("which %d is_64_bit %d ip " INTPTR_FORMAT, which, is_64bit, p2i(ip))); 3.21 #endif // _LP64 3.22 return ip; 3.23
4.1 --- a/src/cpu/x86/vm/c1_LinearScan_x86.cpp Thu May 15 18:23:26 2014 -0400 4.2 +++ b/src/cpu/x86/vm/c1_LinearScan_x86.cpp Thu May 22 15:52:41 2014 -0400 4.3 @@ -1,5 +1,5 @@ 4.4 /* 4.5 - * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. 4.6 + * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved. 4.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4.8 * 4.9 * This code is free software; you can redistribute it and/or modify it 4.10 @@ -95,7 +95,7 @@ 4.11 4.12 #ifndef PRODUCT 4.13 if (TraceFPURegisterUsage) { 4.14 - tty->print("FPU regs for block %d, LIR instr %d): ", b->block_id(), id); regs.print_on(tty); tty->print_cr(""); 4.15 + tty->print("FPU regs for block %d, LIR instr %d): ", b->block_id(), id); regs.print_on(tty); tty->cr(); 4.16 } 4.17 #endif 4.18 }
5.1 --- a/src/cpu/x86/vm/compiledIC_x86.cpp Thu May 15 18:23:26 2014 -0400 5.2 +++ b/src/cpu/x86/vm/compiledIC_x86.cpp Thu May 22 15:52:41 2014 -0400 5.3 @@ -1,5 +1,5 @@ 5.4 /* 5.5 - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 5.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 5.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 5.8 * 5.9 * This code is free software; you can redistribute it and/or modify it 5.10 @@ -122,7 +122,7 @@ 5.11 if (TraceICs) { 5.12 ResourceMark rm; 5.13 tty->print_cr("CompiledStaticCall@" INTPTR_FORMAT ": set_to_interpreted %s", 5.14 - instruction_address(), 5.15 + p2i(instruction_address()), 5.16 callee->name_and_sig_as_C_string()); 5.17 } 5.18
6.1 --- a/src/cpu/x86/vm/frame_x86.cpp Thu May 15 18:23:26 2014 -0400 6.2 +++ b/src/cpu/x86/vm/frame_x86.cpp Thu May 22 15:52:41 2014 -0400 6.3 @@ -1,5 +1,5 @@ 6.4 /* 6.5 - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 6.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 6.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 6.8 * 6.9 * This code is free software; you can redistribute it and/or modify it 6.10 @@ -48,6 +48,7 @@ 6.11 } 6.12 #endif 6.13 6.14 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 6.15 6.16 // Profiling/safepoint support 6.17
7.1 --- a/src/cpu/x86/vm/interpreter_x86_64.cpp Thu May 15 18:23:26 2014 -0400 7.2 +++ b/src/cpu/x86/vm/interpreter_x86_64.cpp Thu May 22 15:52:41 2014 -0400 7.3 @@ -1,5 +1,5 @@ 7.4 /* 7.5 - * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. 7.6 + * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved. 7.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 7.8 * 7.9 * This code is free software; you can redistribute it and/or modify it 7.10 @@ -51,6 +51,7 @@ 7.11 7.12 #define __ _masm-> 7.13 7.14 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 7.15 7.16 #ifdef _WIN64 7.17 address AbstractInterpreterGenerator::generate_slow_signature_handler() {
8.1 --- a/src/cpu/x86/vm/macroAssembler_x86.cpp Thu May 15 18:23:26 2014 -0400 8.2 +++ b/src/cpu/x86/vm/macroAssembler_x86.cpp Thu May 22 15:52:41 2014 -0400 8.3 @@ -1,5 +1,5 @@ 8.4 /* 8.5 - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 8.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 8.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 8.8 * 8.9 * This code is free software; you can redistribute it and/or modify it 8.10 @@ -55,6 +55,7 @@ 8.11 8.12 #define BIND(label) bind(label); BLOCK_COMMENT(#label ":") 8.13 8.14 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 8.15 8.16 #ifdef ASSERT 8.17 bool AbstractAssembler::pd_check_instruction_mark() { return true; }
9.1 --- a/src/cpu/x86/vm/methodHandles_x86.cpp Thu May 15 18:23:26 2014 -0400 9.2 +++ b/src/cpu/x86/vm/methodHandles_x86.cpp Thu May 22 15:52:41 2014 -0400 9.3 @@ -1,5 +1,5 @@ 9.4 /* 9.5 - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 9.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 9.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 9.8 * 9.9 * This code is free software; you can redistribute it and/or modify it 9.10 @@ -29,6 +29,8 @@ 9.11 #include "memory/allocation.inline.hpp" 9.12 #include "prims/methodHandles.hpp" 9.13 9.14 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 9.15 + 9.16 #define __ _masm-> 9.17 9.18 #ifdef PRODUCT
10.1 --- a/src/cpu/x86/vm/nativeInst_x86.cpp Thu May 15 18:23:26 2014 -0400 10.2 +++ b/src/cpu/x86/vm/nativeInst_x86.cpp Thu May 22 15:52:41 2014 -0400 10.3 @@ -1,5 +1,5 @@ 10.4 /* 10.5 - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. 10.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 10.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 10.8 * 10.9 * This code is free software; you can redistribute it and/or modify it 10.10 @@ -35,6 +35,8 @@ 10.11 #include "c1/c1_Runtime1.hpp" 10.12 #endif 10.13 10.14 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 10.15 + 10.16 void NativeInstruction::wrote(int offset) { 10.17 ICache::invalidate_word(addr_at(offset)); 10.18 }
11.1 --- a/src/cpu/x86/vm/vm_version_x86.cpp Thu May 15 18:23:26 2014 -0400 11.2 +++ b/src/cpu/x86/vm/vm_version_x86.cpp Thu May 22 15:52:41 2014 -0400 11.3 @@ -1,5 +1,5 @@ 11.4 /* 11.5 - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 11.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 11.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 11.8 * 11.9 * This code is free software; you can redistribute it and/or modify it 11.10 @@ -925,16 +925,16 @@ 11.11 if (PrintMiscellaneous && Verbose) { 11.12 tty->print_cr("Logical CPUs per core: %u", 11.13 logical_processors_per_package()); 11.14 - tty->print("UseSSE=%d",UseSSE); 11.15 + tty->print("UseSSE=%d", (int) UseSSE); 11.16 if (UseAVX > 0) { 11.17 - tty->print(" UseAVX=%d",UseAVX); 11.18 + tty->print(" UseAVX=%d", (int) UseAVX); 11.19 } 11.20 if (UseAES) { 11.21 tty->print(" UseAES=1"); 11.22 } 11.23 #ifdef COMPILER2 11.24 if (MaxVectorSize > 0) { 11.25 - tty->print(" MaxVectorSize=%d", MaxVectorSize); 11.26 + tty->print(" MaxVectorSize=%d", (int) MaxVectorSize); 11.27 } 11.28 #endif 11.29 tty->cr(); 11.30 @@ -957,23 +957,23 @@ 11.31 } 11.32 } 11.33 if (AllocatePrefetchLines > 1) { 11.34 - tty->print_cr(" at distance %d, %d lines of %d bytes", AllocatePrefetchDistance, AllocatePrefetchLines, AllocatePrefetchStepSize); 11.35 + tty->print_cr(" at distance %d, %d lines of %d bytes", (int) AllocatePrefetchDistance, (int) AllocatePrefetchLines, (int) AllocatePrefetchStepSize); 11.36 } else { 11.37 - tty->print_cr(" at distance %d, one line of %d bytes", AllocatePrefetchDistance, AllocatePrefetchStepSize); 11.38 + tty->print_cr(" at distance %d, one line of %d bytes", (int) AllocatePrefetchDistance, (int) AllocatePrefetchStepSize); 11.39 } 11.40 } 11.41 11.42 if (PrefetchCopyIntervalInBytes > 0) { 11.43 - tty->print_cr("PrefetchCopyIntervalInBytes %d", PrefetchCopyIntervalInBytes); 11.44 + tty->print_cr("PrefetchCopyIntervalInBytes %d", (int) PrefetchCopyIntervalInBytes); 11.45 } 11.46 if (PrefetchScanIntervalInBytes > 0) { 11.47 - tty->print_cr("PrefetchScanIntervalInBytes %d", PrefetchScanIntervalInBytes); 11.48 + tty->print_cr("PrefetchScanIntervalInBytes %d", (int) PrefetchScanIntervalInBytes); 11.49 } 11.50 if (PrefetchFieldsAhead > 0) { 11.51 - tty->print_cr("PrefetchFieldsAhead %d", PrefetchFieldsAhead); 11.52 + tty->print_cr("PrefetchFieldsAhead %d", (int) PrefetchFieldsAhead); 11.53 } 11.54 if (ContendedPaddingWidth > 0) { 11.55 - tty->print_cr("ContendedPaddingWidth %d", ContendedPaddingWidth); 11.56 + tty->print_cr("ContendedPaddingWidth %d", (int) ContendedPaddingWidth); 11.57 } 11.58 } 11.59 #endif // !PRODUCT
12.1 --- a/src/cpu/x86/vm/vtableStubs_x86_32.cpp Thu May 15 18:23:26 2014 -0400 12.2 +++ b/src/cpu/x86/vm/vtableStubs_x86_32.cpp Thu May 22 15:52:41 2014 -0400 12.3 @@ -1,5 +1,5 @@ 12.4 /* 12.5 - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 12.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 12.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 12.8 * 12.9 * This code is free software; you can redistribute it and/or modify it 12.10 @@ -118,7 +118,7 @@ 12.11 12.12 if (PrintMiscellaneous && (WizardMode || Verbose)) { 12.13 tty->print_cr("vtable #%d at "PTR_FORMAT"[%d] left over: %d", 12.14 - vtable_index, s->entry_point(), 12.15 + vtable_index, p2i(s->entry_point()), 12.16 (int)(s->code_end() - s->entry_point()), 12.17 (int)(s->code_end() - __ pc())); 12.18 } 12.19 @@ -199,7 +199,7 @@ 12.20 12.21 if (PrintMiscellaneous && (WizardMode || Verbose)) { 12.22 tty->print_cr("itable #%d at "PTR_FORMAT"[%d] left over: %d", 12.23 - itable_index, s->entry_point(), 12.24 + itable_index, p2i(s->entry_point()), 12.25 (int)(s->code_end() - s->entry_point()), 12.26 (int)(s->code_end() - __ pc())); 12.27 }
13.1 --- a/src/cpu/x86/vm/vtableStubs_x86_64.cpp Thu May 15 18:23:26 2014 -0400 13.2 +++ b/src/cpu/x86/vm/vtableStubs_x86_64.cpp Thu May 22 15:52:41 2014 -0400 13.3 @@ -1,5 +1,5 @@ 13.4 /* 13.5 - * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. 13.6 + * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved. 13.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 13.8 * 13.9 * This code is free software; you can redistribute it and/or modify it 13.10 @@ -35,6 +35,8 @@ 13.11 #include "opto/runtime.hpp" 13.12 #endif 13.13 13.14 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 13.15 + 13.16 // machine-dependent part of VtableStubs: create VtableStub of correct size and 13.17 // initialize its code 13.18
14.1 --- a/src/os/bsd/vm/decoder_machO.cpp Thu May 15 18:23:26 2014 -0400 14.2 +++ b/src/os/bsd/vm/decoder_machO.cpp Thu May 22 15:52:41 2014 -0400 14.3 @@ -1,5 +1,5 @@ 14.4 /* 14.5 - * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. 14.6 + * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved. 14.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 14.8 * 14.9 * This code is free software; you can redistribute it and/or modify it 14.10 @@ -53,7 +53,7 @@ 14.11 struct symtab_command * symt = (struct symtab_command *) 14.12 mach_find_command((struct mach_header_64 *)mach_base, LC_SYMTAB); 14.13 if (symt == NULL) { 14.14 - DEBUG_ONLY(tty->print_cr("no symtab in mach file at 0x%lx", mach_base)); 14.15 + DEBUG_ONLY(tty->print_cr("no symtab in mach file at 0x%lx", p2i(mach_base))); 14.16 return false; 14.17 } 14.18 uint32_t off = symt->symoff; /* symbol table offset (within this mach file) */
15.1 --- a/src/os/bsd/vm/os_bsd.cpp Thu May 15 18:23:26 2014 -0400 15.2 +++ b/src/os/bsd/vm/os_bsd.cpp Thu May 22 15:52:41 2014 -0400 15.3 @@ -1,5 +1,5 @@ 15.4 /* 15.5 - * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. 15.6 + * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved. 15.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 15.8 * 15.9 * This code is free software; you can redistribute it and/or modify it 15.10 @@ -123,6 +123,9 @@ 15.11 #define ALL_64_BITS CONST64(0xFFFFFFFFFFFFFFFF) 15.12 15.13 #define LARGEPAGES_BIT (1 << 6) 15.14 + 15.15 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 15.16 + 15.17 //////////////////////////////////////////////////////////////////////////////// 15.18 // global variables 15.19 julong os::Bsd::_physical_memory = 0; 15.20 @@ -2390,7 +2393,6 @@ 15.21 (!FLAG_IS_DEFAULT(UseLargePages) || 15.22 !FLAG_IS_DEFAULT(LargePageSizeInBytes) 15.23 ); 15.24 - char msg[128]; 15.25 15.26 // Create a large shared memory region to attach to based on size. 15.27 // Currently, size is the total size of the heap 15.28 @@ -2411,8 +2413,7 @@ 15.29 // coalesce into large pages. Try to reserve large pages when 15.30 // the system is still "fresh". 15.31 if (warn_on_failure) { 15.32 - jio_snprintf(msg, sizeof(msg), "Failed to reserve shared memory (errno = %d).", errno); 15.33 - warning(msg); 15.34 + warning("Failed to reserve shared memory (errno = %d).", errno); 15.35 } 15.36 return NULL; 15.37 } 15.38 @@ -2429,8 +2430,7 @@ 15.39 15.40 if ((intptr_t)addr == -1) { 15.41 if (warn_on_failure) { 15.42 - jio_snprintf(msg, sizeof(msg), "Failed to attach shared memory (errno = %d).", err); 15.43 - warning(msg); 15.44 + warning("Failed to attach shared memory (errno = %d).", err); 15.45 } 15.46 return NULL; 15.47 } 15.48 @@ -3929,6 +3929,7 @@ 15.49 return true; 15.50 } 15.51 15.52 +ATTRIBUTE_PRINTF(3, 0) 15.53 int local_vsnprintf(char* buf, size_t count, const char* format, va_list args) { 15.54 return ::vsnprintf(buf, count, format, args); 15.55 }
16.1 --- a/src/os/bsd/vm/perfMemory_bsd.cpp Thu May 15 18:23:26 2014 -0400 16.2 +++ b/src/os/bsd/vm/perfMemory_bsd.cpp Thu May 22 15:52:41 2014 -0400 16.3 @@ -1,5 +1,5 @@ 16.4 /* 16.5 - * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. 16.6 + * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved. 16.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 16.8 * 16.9 * This code is free software; you can redistribute it and/or modify it 16.10 @@ -925,7 +925,7 @@ 16.11 16.12 if (PerfTraceMemOps) { 16.13 tty->print("mapped " SIZE_FORMAT " bytes for vmid %d at " 16.14 - INTPTR_FORMAT "\n", size, vmid, (void*)mapAddress); 16.15 + INTPTR_FORMAT "\n", size, vmid, p2i((void*)mapAddress)); 16.16 } 16.17 } 16.18
17.1 --- a/src/os/linux/vm/os_linux.cpp Thu May 15 18:23:26 2014 -0400 17.2 +++ b/src/os/linux/vm/os_linux.cpp Thu May 22 15:52:41 2014 -0400 17.3 @@ -101,6 +101,8 @@ 17.4 # include <inttypes.h> 17.5 # include <sys/ioctl.h> 17.6 17.7 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 17.8 + 17.9 // if RUSAGE_THREAD for getrusage() has not been defined, do it here. The code calling 17.10 // getrusage() is prepared to handle the associated failure. 17.11 #ifndef RUSAGE_THREAD 17.12 @@ -2137,7 +2139,7 @@ 17.13 // Print warning if unsafe chroot environment detected 17.14 if (unsafe_chroot_detected) { 17.15 st->print("WARNING!! "); 17.16 - st->print_cr(unstable_chroot_error); 17.17 + st->print_cr("%s", unstable_chroot_error); 17.18 } 17.19 17.20 os::Linux::print_libversion_info(st); 17.21 @@ -2198,8 +2200,8 @@ 17.22 void os::Linux::print_libversion_info(outputStream* st) { 17.23 // libc, pthread 17.24 st->print("libc:"); 17.25 - st->print(os::Linux::glibc_version()); st->print(" "); 17.26 - st->print(os::Linux::libpthread_version()); st->print(" "); 17.27 + st->print("%s ", os::Linux::glibc_version()); 17.28 + st->print("%s ", os::Linux::libpthread_version()); 17.29 if (os::Linux::is_LinuxThreads()) { 17.30 st->print("(%s stack)", os::Linux::is_floating_stack() ? "floating" : "fixed"); 17.31 } 17.32 @@ -3415,7 +3417,7 @@ 17.33 // the system is still "fresh". 17.34 if (warn_on_failure) { 17.35 jio_snprintf(msg, sizeof(msg), "Failed to reserve shared memory (errno = %d).", errno); 17.36 - warning(msg); 17.37 + warning("%s", msg); 17.38 } 17.39 return NULL; 17.40 } 17.41 @@ -3433,7 +3435,7 @@ 17.42 if ((intptr_t)addr == -1) { 17.43 if (warn_on_failure) { 17.44 jio_snprintf(msg, sizeof(msg), "Failed to attach shared memory (errno = %d).", err); 17.45 - warning(msg); 17.46 + warning("%s", msg); 17.47 } 17.48 return NULL; 17.49 } 17.50 @@ -3453,7 +3455,7 @@ 17.51 char msg[128]; 17.52 jio_snprintf(msg, sizeof(msg), "Failed to reserve large pages memory req_addr: " 17.53 PTR_FORMAT " bytes: " SIZE_FORMAT " (errno = %d).", req_addr, bytes, error); 17.54 - warning(msg); 17.55 + warning("%s", msg); 17.56 } 17.57 } 17.58 17.59 @@ -5392,6 +5394,8 @@ 17.60 // -1 on error. 17.61 // 17.62 17.63 +PRAGMA_DIAG_PUSH 17.64 +PRAGMA_FORMAT_NONLITERAL_IGNORED 17.65 static jlong slow_thread_cpu_time(Thread *thread, bool user_sys_cpu_time) { 17.66 static bool proc_task_unchecked = true; 17.67 static const char *proc_stat_path = "/proc/%d/stat"; 17.68 @@ -5453,6 +5457,7 @@ 17.69 return (jlong)user_time * (1000000000 / clock_tics_per_sec); 17.70 } 17.71 } 17.72 +PRAGMA_DIAG_POP 17.73 17.74 void os::current_thread_cpu_time_info(jvmtiTimerInfo *info_ptr) { 17.75 info_ptr->max_value = ALL_64_BITS; // will not wrap in less than 64 bits
18.1 --- a/src/os/linux/vm/perfMemory_linux.cpp Thu May 15 18:23:26 2014 -0400 18.2 +++ b/src/os/linux/vm/perfMemory_linux.cpp Thu May 22 15:52:41 2014 -0400 18.3 @@ -931,7 +931,7 @@ 18.4 18.5 if (PerfTraceMemOps) { 18.6 tty->print("mapped " SIZE_FORMAT " bytes for vmid %d at " 18.7 - INTPTR_FORMAT "\n", size, vmid, (void*)mapAddress); 18.8 + INTPTR_FORMAT "\n", size, vmid, p2i((void*)mapAddress)); 18.9 } 18.10 } 18.11
19.1 --- a/src/os/posix/vm/os_posix.cpp Thu May 15 18:23:26 2014 -0400 19.2 +++ b/src/os/posix/vm/os_posix.cpp Thu May 22 15:52:41 2014 -0400 19.3 @@ -1,5 +1,5 @@ 19.4 /* 19.5 -* Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. 19.6 +* Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved. 19.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 19.8 * 19.9 * This code is free software; you can redistribute it and/or modify it 19.10 @@ -35,6 +35,8 @@ 19.11 #include <pthread.h> 19.12 #include <signal.h> 19.13 19.14 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 19.15 + 19.16 // Todo: provide a os::get_max_process_id() or similar. Number of processes 19.17 // may have been configured, can be read more accurately from proc fs etc. 19.18 #ifndef MAX_PID 19.19 @@ -191,10 +193,10 @@ 19.20 st->print("uname:"); 19.21 struct utsname name; 19.22 uname(&name); 19.23 - st->print(name.sysname); st->print(" "); 19.24 - st->print(name.release); st->print(" "); 19.25 - st->print(name.version); st->print(" "); 19.26 - st->print(name.machine); 19.27 + st->print("%s ", name.sysname); 19.28 + st->print("%s ", name.release); 19.29 + st->print("%s ", name.version); 19.30 + st->print("%s", name.machine); 19.31 st->cr(); 19.32 } 19.33 19.34 @@ -552,7 +554,7 @@ 19.35 void os::Posix::print_signal_set_short(outputStream* st, const sigset_t* set) { 19.36 char buf[NUM_IMPORTANT_SIGS + 1]; 19.37 os::Posix::describe_signal_set_short(set, buf, sizeof(buf)); 19.38 - st->print(buf); 19.39 + st->print("%s", buf); 19.40 } 19.41 19.42 // Writes one-line description of a combination of sigaction.sa_flags into a user 19.43 @@ -612,7 +614,7 @@ 19.44 void os::Posix::print_sa_flags(outputStream* st, int flags) { 19.45 char buffer[0x100]; 19.46 os::Posix::describe_sa_flags(flags, buffer, sizeof(buffer)); 19.47 - st->print(buffer); 19.48 + st->print("%s", buffer); 19.49 } 19.50 19.51 // Helper function for os::Posix::print_siginfo_...():
20.1 --- a/src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp Thu May 15 18:23:26 2014 -0400 20.2 +++ b/src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp Thu May 22 15:52:41 2014 -0400 20.3 @@ -1,5 +1,5 @@ 20.4 /* 20.5 - * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. 20.6 + * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved. 20.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 20.8 * 20.9 * This code is free software; you can redistribute it and/or modify it 20.10 @@ -276,6 +276,8 @@ 20.11 # endif 20.12 #endif 20.13 20.14 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 20.15 + 20.16 address os::current_stack_pointer() { 20.17 #if defined(__clang__) || defined(__llvm__) 20.18 register void *esp;
21.1 --- a/src/os_cpu/linux_x86/vm/os_linux_x86.cpp Thu May 15 18:23:26 2014 -0400 21.2 +++ b/src/os_cpu/linux_x86/vm/os_linux_x86.cpp Thu May 22 15:52:41 2014 -0400 21.3 @@ -1,5 +1,5 @@ 21.4 /* 21.5 - * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. 21.6 + * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved. 21.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 21.8 * 21.9 * This code is free software; you can redistribute it and/or modify it 21.10 @@ -88,6 +88,8 @@ 21.11 #define SPELL_REG_FP "ebp" 21.12 #endif // AMD64 21.13 21.14 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 21.15 + 21.16 address os::current_stack_pointer() { 21.17 #ifdef SPARC_WORKS 21.18 register void *esp;
22.1 --- a/src/share/vm/adlc/formssel.cpp Thu May 15 18:23:26 2014 -0400 22.2 +++ b/src/share/vm/adlc/formssel.cpp Thu May 22 15:52:41 2014 -0400 22.3 @@ -1,5 +1,5 @@ 22.4 /* 22.5 - * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. 22.6 + * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved. 22.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 22.8 * 22.9 * This code is free software; you can redistribute it and/or modify it 22.10 @@ -1322,7 +1322,7 @@ 22.11 OperandForm* oper = form->is_operand(); 22.12 if (oper != NULL && oper->is_bound_register()) { 22.13 const RegDef* first = oper->get_RegClass()->find_first_elem(); 22.14 - fprintf(fp, " st->print(\"%s\");\n", first->_regname); 22.15 + fprintf(fp, " st->print_raw(\"%s\");\n", first->_regname); 22.16 } else { 22.17 globalAD->syntax_err(_linenum, "In %s can't find format for %s %s", _ident, opc->_ident, rep_var); 22.18 } 22.19 @@ -2530,7 +2530,7 @@ 22.20 case Form::idealP: fprintf(fp," if (_c%d) _c%d->dump_on(st);\n", const_index, const_index); break; 22.21 case Form::idealNKlass: 22.22 case Form::idealN: fprintf(fp," if (_c%d) _c%d->dump_on(st);\n", const_index, const_index); break; 22.23 - case Form::idealL: fprintf(fp," st->print(\"#%%lld\", _c%d);\n", const_index); break; 22.24 + case Form::idealL: fprintf(fp," st->print(\"#\" INT64_FORMAT, (int64_t)_c%d);\n", const_index); break; 22.25 case Form::idealF: fprintf(fp," st->print(\"#%%f\", _c%d);\n", const_index); break; 22.26 case Form::idealD: fprintf(fp," st->print(\"#%%f\", _c%d);\n", const_index); break; 22.27 default:
23.1 --- a/src/share/vm/adlc/output_h.cpp Thu May 15 18:23:26 2014 -0400 23.2 +++ b/src/share/vm/adlc/output_h.cpp Thu May 22 15:52:41 2014 -0400 23.3 @@ -1,5 +1,5 @@ 23.4 /* 23.5 - * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. 23.6 + * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved. 23.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 23.8 * 23.9 * This code is free software; you can redistribute it and/or modify it 23.10 @@ -386,14 +386,14 @@ 23.11 static void defineCCodeDump(OperandForm* oper, FILE *fp, int i) { 23.12 assert(oper != NULL, "what"); 23.13 CondInterface* cond = oper->_interface->is_CondInterface(); 23.14 - fprintf(fp, " if( _c%d == BoolTest::eq ) st->print(\"%s\");\n",i,cond->_equal_format); 23.15 - fprintf(fp, " else if( _c%d == BoolTest::ne ) st->print(\"%s\");\n",i,cond->_not_equal_format); 23.16 - fprintf(fp, " else if( _c%d == BoolTest::le ) st->print(\"%s\");\n",i,cond->_less_equal_format); 23.17 - fprintf(fp, " else if( _c%d == BoolTest::ge ) st->print(\"%s\");\n",i,cond->_greater_equal_format); 23.18 - fprintf(fp, " else if( _c%d == BoolTest::lt ) st->print(\"%s\");\n",i,cond->_less_format); 23.19 - fprintf(fp, " else if( _c%d == BoolTest::gt ) st->print(\"%s\");\n",i,cond->_greater_format); 23.20 - fprintf(fp, " else if( _c%d == BoolTest::overflow ) st->print(\"%s\");\n",i,cond->_overflow_format); 23.21 - fprintf(fp, " else if( _c%d == BoolTest::no_overflow ) st->print(\"%s\");\n",i,cond->_no_overflow_format); 23.22 + fprintf(fp, " if( _c%d == BoolTest::eq ) st->print_raw(\"%s\");\n",i,cond->_equal_format); 23.23 + fprintf(fp, " else if( _c%d == BoolTest::ne ) st->print_raw(\"%s\");\n",i,cond->_not_equal_format); 23.24 + fprintf(fp, " else if( _c%d == BoolTest::le ) st->print_raw(\"%s\");\n",i,cond->_less_equal_format); 23.25 + fprintf(fp, " else if( _c%d == BoolTest::ge ) st->print_raw(\"%s\");\n",i,cond->_greater_equal_format); 23.26 + fprintf(fp, " else if( _c%d == BoolTest::lt ) st->print_raw(\"%s\");\n",i,cond->_less_format); 23.27 + fprintf(fp, " else if( _c%d == BoolTest::gt ) st->print_raw(\"%s\");\n",i,cond->_greater_format); 23.28 + fprintf(fp, " else if( _c%d == BoolTest::overflow ) st->print_raw(\"%s\");\n",i,cond->_overflow_format); 23.29 + fprintf(fp, " else if( _c%d == BoolTest::no_overflow ) st->print_raw(\"%s\");\n",i,cond->_no_overflow_format); 23.30 } 23.31 23.32 // Output code that dumps constant values, increment "i" if type is constant 23.33 @@ -416,8 +416,8 @@ 23.34 ++i; 23.35 } 23.36 else if (!strcmp(ideal_type, "ConL")) { 23.37 - fprintf(fp," st->print(\"#\" INT64_FORMAT, _c%d);\n", i); 23.38 - fprintf(fp," st->print(\"/\" PTR64_FORMAT, _c%d);\n", i); 23.39 + fprintf(fp," st->print(\"#\" INT64_FORMAT, (int64_t)_c%d);\n", i); 23.40 + fprintf(fp," st->print(\"/\" PTR64_FORMAT, (uint64_t)_c%d);\n", i); 23.41 ++i; 23.42 } 23.43 else if (!strcmp(ideal_type, "ConF")) { 23.44 @@ -429,7 +429,7 @@ 23.45 else if (!strcmp(ideal_type, "ConD")) { 23.46 fprintf(fp," st->print(\"#%%f\", _c%d);\n", i); 23.47 fprintf(fp," jlong _c%dl = JavaValue(_c%d).get_jlong();\n", i, i); 23.48 - fprintf(fp," st->print(\"/\" PTR64_FORMAT, _c%dl);\n", i); 23.49 + fprintf(fp," st->print(\"/\" PTR64_FORMAT, (uint64_t)_c%dl);\n", i); 23.50 ++i; 23.51 } 23.52 else if (!strcmp(ideal_type, "Bool")) { 23.53 @@ -471,7 +471,7 @@ 23.54 if ( string != NameList::_signal ) { 23.55 // Normal string 23.56 // Pass through to st->print 23.57 - fprintf(fp," st->print(\"%s\");\n", string); 23.58 + fprintf(fp," st->print_raw(\"%s\");\n", string); 23.59 } else { 23.60 // Replacement variable 23.61 const char *rep_var = oper._format->_rep_vars.iter(); 23.62 @@ -542,7 +542,7 @@ 23.63 if ( string != NameList::_signal ) { 23.64 // Normal string 23.65 // Pass through to st->print 23.66 - fprintf(fp," st->print(\"%s\");\n", string); 23.67 + fprintf(fp," st->print_raw(\"%s\");\n", string); 23.68 } else { 23.69 // Replacement variable 23.70 const char *rep_var = oper._format->_rep_vars.iter(); 23.71 @@ -669,7 +669,7 @@ 23.72 } else if( string == NameList::_signal2 ) // Raw program text 23.73 fputs(inst._format->_strings.iter(), fp); 23.74 else 23.75 - fprintf(fp,"st->print(\"%s\");\n", string); 23.76 + fprintf(fp,"st->print_raw(\"%s\");\n", string); 23.77 } // Done with all format strings 23.78 } // Done generating the user-defined portion of the format 23.79 23.80 @@ -696,13 +696,13 @@ 23.81 default: 23.82 assert(0,"ShouldNotReachHere"); 23.83 } 23.84 - fprintf(fp, " st->print_cr(\"\");\n" ); 23.85 + fprintf(fp, " st->cr();\n" ); 23.86 fprintf(fp, " if (_jvms) _jvms->format(ra, this, st); else st->print_cr(\" No JVM State Info\");\n" ); 23.87 fprintf(fp, " st->print(\" # \");\n" ); 23.88 fprintf(fp, " if( _jvms && _oop_map ) _oop_map->print_on(st);\n"); 23.89 } 23.90 else if(inst.is_ideal_safepoint()) { 23.91 - fprintf(fp, " st->print(\"\");\n" ); 23.92 + fprintf(fp, " st->print_raw(\"\");\n" ); 23.93 fprintf(fp, " if (_jvms) _jvms->format(ra, this, st); else st->print_cr(\" No JVM State Info\");\n" ); 23.94 fprintf(fp, " st->print(\" # \");\n" ); 23.95 fprintf(fp, " if( _jvms && _oop_map ) _oop_map->print_on(st);\n");
24.1 --- a/src/share/vm/asm/codeBuffer.cpp Thu May 15 18:23:26 2014 -0400 24.2 +++ b/src/share/vm/asm/codeBuffer.cpp Thu May 22 15:52:41 2014 -0400 24.3 @@ -1,5 +1,5 @@ 24.4 /* 24.5 - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 24.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 24.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 24.8 * 24.9 * This code is free software; you can redistribute it and/or modify it 24.10 @@ -987,7 +987,7 @@ 24.11 for (csize_t step; ptr < end(); ptr += step) { 24.12 step = end() - ptr; 24.13 if (step > jintSize * 4) step = jintSize * 4; 24.14 - tty->print(PTR_FORMAT ": ", ptr); 24.15 + tty->print(INTPTR_FORMAT ": ", p2i(ptr)); 24.16 while (step > 0) { 24.17 tty->print(" " PTR32_FORMAT, *(jint*)ptr); 24.18 ptr += jintSize; 24.19 @@ -1097,7 +1097,7 @@ 24.20 while (c && c->offset() == offset) { 24.21 stream->bol(); 24.22 stream->print(" ;; "); 24.23 - stream->print_cr(c->string()); 24.24 + stream->print_cr("%s", c->string()); 24.25 c = c->next_comment(); 24.26 } 24.27 } 24.28 @@ -1153,10 +1153,10 @@ 24.29 void CodeSection::print(const char* name) { 24.30 csize_t locs_size = locs_end() - locs_start(); 24.31 tty->print_cr(" %7s.code = " PTR_FORMAT " : " PTR_FORMAT " : " PTR_FORMAT " (%d of %d)%s", 24.32 - name, start(), end(), limit(), size(), capacity(), 24.33 + name, p2i(start()), p2i(end()), p2i(limit()), size(), capacity(), 24.34 is_frozen()? " [frozen]": ""); 24.35 tty->print_cr(" %7s.locs = " PTR_FORMAT " : " PTR_FORMAT " : " PTR_FORMAT " (%d of %d) point=%d", 24.36 - name, locs_start(), locs_end(), locs_limit(), locs_size, locs_capacity(), locs_point_off()); 24.37 + name, p2i(locs_start()), p2i(locs_end()), p2i(locs_limit()), locs_size, locs_capacity(), locs_point_off()); 24.38 if (PrintRelocations) { 24.39 RelocIterator iter(this); 24.40 iter.print();
25.1 --- a/src/share/vm/asm/codeBuffer.hpp Thu May 15 18:23:26 2014 -0400 25.2 +++ b/src/share/vm/asm/codeBuffer.hpp Thu May 22 15:52:41 2014 -0400 25.3 @@ -1,5 +1,5 @@ 25.4 /* 25.5 - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 25.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 25.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 25.8 * 25.9 * This code is free software; you can redistribute it and/or modify it 25.10 @@ -173,7 +173,7 @@ 25.11 bool allocates(address pc) const { return pc >= _start && pc < _limit; } 25.12 bool allocates2(address pc) const { return pc >= _start && pc <= _limit; } 25.13 25.14 - void set_end(address pc) { assert(allocates2(pc), err_msg("not in CodeBuffer memory: " PTR_FORMAT " <= " PTR_FORMAT " <= " PTR_FORMAT, _start, pc, _limit)); _end = pc; } 25.15 + void set_end(address pc) { assert(allocates2(pc), err_msg("not in CodeBuffer memory: " PTR_FORMAT " <= " PTR_FORMAT " <= " INTPTR_FORMAT, p2i(_start), p2i(pc), p2i(_limit))); _end = pc; } 25.16 void set_mark(address pc) { assert(contains2(pc), "not in codeBuffer"); 25.17 _mark = pc; } 25.18 void set_mark_off(int offset) { assert(contains2(offset+_start),"not in codeBuffer");
26.1 --- a/src/share/vm/asm/register.hpp Thu May 15 18:23:26 2014 -0400 26.2 +++ b/src/share/vm/asm/register.hpp Thu May 22 15:52:41 2014 -0400 26.3 @@ -1,5 +1,5 @@ 26.4 /* 26.5 - * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved. 26.6 + * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. 26.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 26.8 * 26.9 * This code is free software; you can redistribute it and/or modify it 26.10 @@ -118,8 +118,8 @@ 26.11 ) { 26.12 assert( 26.13 a != b, 26.14 - err_msg_res("registers must be different: a=%d, b=%d", 26.15 - a, b) 26.16 + err_msg_res("registers must be different: a=" INTPTR_FORMAT ", b=" INTPTR_FORMAT "", 26.17 + p2i(a), p2i(b)) 26.18 ); 26.19 } 26.20 26.21 @@ -132,8 +132,9 @@ 26.22 assert( 26.23 a != b && a != c 26.24 && b != c, 26.25 - err_msg_res("registers must be different: a=%d, b=%d, c=%d", 26.26 - a, b, c) 26.27 + err_msg_res("registers must be different: a=" INTPTR_FORMAT ", b=" INTPTR_FORMAT 26.28 + ", c=" INTPTR_FORMAT "", 26.29 + p2i(a), p2i(b), p2i(c)) 26.30 ); 26.31 } 26.32 26.33 @@ -148,8 +149,9 @@ 26.34 a != b && a != c && a != d 26.35 && b != c && b != d 26.36 && c != d, 26.37 - err_msg_res("registers must be different: a=%d, b=%d, c=%d, d=%d", 26.38 - a, b, c, d) 26.39 + err_msg_res("registers must be different: a=" INTPTR_FORMAT ", b=" INTPTR_FORMAT 26.40 + ", c=" INTPTR_FORMAT ", d=" INTPTR_FORMAT "", 26.41 + p2i(a), p2i(b), p2i(c), p2i(d)) 26.42 ); 26.43 } 26.44 26.45 @@ -166,8 +168,9 @@ 26.46 && b != c && b != d && b != e 26.47 && c != d && c != e 26.48 && d != e, 26.49 - err_msg_res("registers must be different: a=%d, b=%d, c=%d, d=%d, e=%d", 26.50 - a, b, c, d, e) 26.51 + err_msg_res("registers must be different: a=" INTPTR_FORMAT ", b=" INTPTR_FORMAT 26.52 + ", c=" INTPTR_FORMAT ", d=" INTPTR_FORMAT ", e=" INTPTR_FORMAT "", 26.53 + p2i(a), p2i(b), p2i(c), p2i(d), p2i(e)) 26.54 ); 26.55 } 26.56 26.57 @@ -186,8 +189,10 @@ 26.58 && c != d && c != e && c != f 26.59 && d != e && d != f 26.60 && e != f, 26.61 - err_msg_res("registers must be different: a=%d, b=%d, c=%d, d=%d, e=%d, f=%d", 26.62 - a, b, c, d, e, f) 26.63 + err_msg_res("registers must be different: a=" INTPTR_FORMAT ", b=" INTPTR_FORMAT 26.64 + ", c=" INTPTR_FORMAT ", d=" INTPTR_FORMAT ", e=" INTPTR_FORMAT 26.65 + ", f=" INTPTR_FORMAT "", 26.66 + p2i(a), p2i(b), p2i(c), p2i(d), p2i(e), p2i(f)) 26.67 ); 26.68 } 26.69 26.70 @@ -208,8 +213,10 @@ 26.71 && d != e && d != f && d != g 26.72 && e != f && e != g 26.73 && f != g, 26.74 - err_msg_res("registers must be different: a=%d, b=%d, c=%d, d=%d, e=%d, f=%d, g=%d", 26.75 - a, b, c, d, e, f, g) 26.76 + err_msg_res("registers must be different: a=" INTPTR_FORMAT ", b=" INTPTR_FORMAT 26.77 + ", c=" INTPTR_FORMAT ", d=" INTPTR_FORMAT ", e=" INTPTR_FORMAT 26.78 + ", f=" INTPTR_FORMAT ", g=" INTPTR_FORMAT "", 26.79 + p2i(a), p2i(b), p2i(c), p2i(d), p2i(e), p2i(f), p2i(g)) 26.80 ); 26.81 } 26.82 26.83 @@ -232,8 +239,10 @@ 26.84 && e != f && e != g && e != h 26.85 && f != g && f != h 26.86 && g != h, 26.87 - err_msg_res("registers must be different: a=%d, b=%d, c=%d, d=%d, e=%d, f=%d, g=%d, h=%d", 26.88 - a, b, c, d, e, f, g, h) 26.89 + err_msg_res("registers must be different: a=" INTPTR_FORMAT ", b=" INTPTR_FORMAT 26.90 + ", c=" INTPTR_FORMAT ", d=" INTPTR_FORMAT ", e=" INTPTR_FORMAT 26.91 + ", f=" INTPTR_FORMAT ", g=" INTPTR_FORMAT ", h=" INTPTR_FORMAT "", 26.92 + p2i(a), p2i(b), p2i(c), p2i(d), p2i(e), p2i(f), p2i(g), p2i(h)) 26.93 ); 26.94 } 26.95 26.96 @@ -258,8 +267,11 @@ 26.97 && f != g && f != h && f != i 26.98 && g != h && g != i 26.99 && h != i, 26.100 - err_msg_res("registers must be different: a=%d, b=%d, c=%d, d=%d, e=%d, f=%d, g=%d, h=%d, i=%d", 26.101 - a, b, c, d, e, f, g, h, i) 26.102 + err_msg_res("registers must be different: a=" INTPTR_FORMAT ", b=" INTPTR_FORMAT 26.103 + ", c=" INTPTR_FORMAT ", d=" INTPTR_FORMAT ", e=" INTPTR_FORMAT 26.104 + ", f=" INTPTR_FORMAT ", g=" INTPTR_FORMAT ", h=" INTPTR_FORMAT 26.105 + ", i=" INTPTR_FORMAT "", 26.106 + p2i(a), p2i(b), p2i(c), p2i(d), p2i(e), p2i(f), p2i(g), p2i(h), p2i(i)) 26.107 ); 26.108 } 26.109
27.1 --- a/src/share/vm/c1/c1_CFGPrinter.cpp Thu May 15 18:23:26 2014 -0400 27.2 +++ b/src/share/vm/c1/c1_CFGPrinter.cpp Thu May 22 15:52:41 2014 -0400 27.3 @@ -1,5 +1,5 @@ 27.4 /* 27.5 - * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. 27.6 + * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved. 27.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 27.8 * 27.9 * This code is free software; you can redistribute it and/or modify it 27.10 @@ -50,7 +50,7 @@ 27.11 27.12 void inc_indent(); 27.13 void dec_indent(); 27.14 - void print(const char* format, ...); 27.15 + void print(const char* format, ...) ATTRIBUTE_PRINTF(2, 3); 27.16 void print_begin(const char* tag); 27.17 void print_end(const char* tag); 27.18 27.19 @@ -161,7 +161,7 @@ 27.20 27.21 print("name \"%s\"", method_name(_compilation->method(), true)); 27.22 print("method \"%s\"", method_name(_compilation->method())); 27.23 - print("date "INT64_FORMAT, os::javaTimeMillis()); 27.24 + print("date "INT64_FORMAT, (int64_t) os::javaTimeMillis()); 27.25 27.26 print_end("compilation"); 27.27 }
28.1 --- a/src/share/vm/c1/c1_InstructionPrinter.cpp Thu May 15 18:23:26 2014 -0400 28.2 +++ b/src/share/vm/c1/c1_InstructionPrinter.cpp Thu May 22 15:52:41 2014 -0400 28.3 @@ -1,5 +1,5 @@ 28.4 /* 28.5 - * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. 28.6 + * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved. 28.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 28.8 * 28.9 * This code is free software; you can redistribute it and/or modify it 28.10 @@ -134,23 +134,23 @@ 28.11 if (value->is_null_object()) { 28.12 output()->print("null"); 28.13 } else if (!value->is_loaded()) { 28.14 - output()->print("<unloaded object " PTR_FORMAT ">", value); 28.15 + output()->print("<unloaded object " INTPTR_FORMAT ">", p2i(value)); 28.16 } else { 28.17 - output()->print("<object " PTR_FORMAT " klass=", value->constant_encoding()); 28.18 + output()->print("<object " INTPTR_FORMAT " klass=", p2i(value->constant_encoding())); 28.19 print_klass(value->klass()); 28.20 output()->print(">"); 28.21 } 28.22 } else if (type->as_InstanceConstant() != NULL) { 28.23 ciInstance* value = type->as_InstanceConstant()->value(); 28.24 if (value->is_loaded()) { 28.25 - output()->print("<instance " PTR_FORMAT " klass=", value->constant_encoding()); 28.26 + output()->print("<instance " INTPTR_FORMAT " klass=", p2i(value->constant_encoding())); 28.27 print_klass(value->klass()); 28.28 output()->print(">"); 28.29 } else { 28.30 - output()->print("<unloaded instance " PTR_FORMAT ">", value); 28.31 + output()->print("<unloaded instance " INTPTR_FORMAT ">", p2i(value)); 28.32 } 28.33 } else if (type->as_ArrayConstant() != NULL) { 28.34 - output()->print("<array " PTR_FORMAT ">", type->as_ArrayConstant()->value()->constant_encoding()); 28.35 + output()->print("<array " INTPTR_FORMAT ">", p2i(type->as_ArrayConstant()->value()->constant_encoding())); 28.36 } else if (type->as_ClassConstant() != NULL) { 28.37 ciInstanceKlass* klass = type->as_ClassConstant()->value(); 28.38 if (!klass->is_loaded()) { 28.39 @@ -268,7 +268,7 @@ 28.40 28.41 28.42 void InstructionPrinter::print_unsafe_op(UnsafeOp* op, const char* name) { 28.43 - output()->print(name); 28.44 + output()->print("%s", name); 28.45 output()->print(".("); 28.46 } 28.47 28.48 @@ -479,7 +479,7 @@ 28.49 if (x->declared_type()->is_klass()) 28.50 print_klass(x->declared_type()->as_klass()); 28.51 else 28.52 - output()->print(type2name(x->declared_type()->basic_type())); 28.53 + output()->print("%s", type2name(x->declared_type()->basic_type())); 28.54 } 28.55 28.56
29.1 --- a/src/share/vm/c1/c1_LIR.cpp Thu May 15 18:23:26 2014 -0400 29.2 +++ b/src/share/vm/c1/c1_LIR.cpp Thu May 22 15:52:41 2014 -0400 29.3 @@ -1,5 +1,5 @@ 29.4 /* 29.5 - * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. 29.6 + * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. 29.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 29.8 * 29.9 * This code is free software; you can redistribute it and/or modify it 29.10 @@ -1563,15 +1563,15 @@ 29.11 } else if (is_virtual()) { 29.12 out->print("R%d", vreg_number()); 29.13 } else if (is_single_cpu()) { 29.14 - out->print(as_register()->name()); 29.15 + out->print("%s", as_register()->name()); 29.16 } else if (is_double_cpu()) { 29.17 - out->print(as_register_hi()->name()); 29.18 - out->print(as_register_lo()->name()); 29.19 + out->print("%s", as_register_hi()->name()); 29.20 + out->print("%s", as_register_lo()->name()); 29.21 #if defined(X86) 29.22 } else if (is_single_xmm()) { 29.23 - out->print(as_xmm_float_reg()->name()); 29.24 + out->print("%s", as_xmm_float_reg()->name()); 29.25 } else if (is_double_xmm()) { 29.26 - out->print(as_xmm_double_reg()->name()); 29.27 + out->print("%s", as_xmm_double_reg()->name()); 29.28 } else if (is_single_fpu()) { 29.29 out->print("fpu%d", fpu_regnr()); 29.30 } else if (is_double_fpu()) { 29.31 @@ -1583,9 +1583,9 @@ 29.32 out->print("d%d", fpu_regnrLo() >> 1); 29.33 #else 29.34 } else if (is_single_fpu()) { 29.35 - out->print(as_float_reg()->name()); 29.36 + out->print("%s", as_float_reg()->name()); 29.37 } else if (is_double_fpu()) { 29.38 - out->print(as_double_reg()->name()); 29.39 + out->print("%s", as_double_reg()->name()); 29.40 #endif 29.41 29.42 } else if (is_illegal()) { 29.43 @@ -1611,9 +1611,9 @@ 29.44 case T_LONG: out->print("lng:" JLONG_FORMAT, as_jlong()); break; 29.45 case T_FLOAT: out->print("flt:%f", as_jfloat()); break; 29.46 case T_DOUBLE: out->print("dbl:%f", as_jdouble()); break; 29.47 - case T_OBJECT: out->print("obj:0x%x", as_jobject()); break; 29.48 - case T_METADATA: out->print("metadata:0x%x", as_metadata());break; 29.49 - default: out->print("%3d:0x%x",type(), as_jdouble()); break; 29.50 + case T_OBJECT: out->print("obj:" INTPTR_FORMAT, p2i(as_jobject())); break; 29.51 + case T_METADATA: out->print("metadata:" INTPTR_FORMAT, p2i(as_metadata()));break; 29.52 + default: out->print("%3d:0x" UINT64_FORMAT_X, type(), (uint64_t)as_jlong()); break; 29.53 } 29.54 } 29.55 29.56 @@ -1629,7 +1629,7 @@ 29.57 case times_8: out->print(" * 8"); break; 29.58 } 29.59 } 29.60 - out->print(" Disp: %d", _disp); 29.61 + out->print(" Disp: " INTX_FORMAT, _disp); 29.62 } 29.63 29.64 // debug output of block header without InstructionPrinter 29.65 @@ -1703,7 +1703,7 @@ 29.66 } else { 29.67 out->print(" "); 29.68 } 29.69 - out->print(name()); out->print(" "); 29.70 + out->print("%s ", name()); 29.71 print_instr(out); 29.72 if (info() != NULL) out->print(" [bci:%d]", info()->stack()->bci()); 29.73 #ifdef ASSERT 29.74 @@ -1833,7 +1833,7 @@ 29.75 // LIR_OpJavaCall 29.76 void LIR_OpJavaCall::print_instr(outputStream* out) const { 29.77 out->print("call: "); 29.78 - out->print("[addr: 0x%x]", address()); 29.79 + out->print("[addr: " INTPTR_FORMAT "]", p2i(address())); 29.80 if (receiver()->is_valid()) { 29.81 out->print(" [recv: "); receiver()->print(out); out->print("]"); 29.82 } 29.83 @@ -1844,7 +1844,7 @@ 29.84 29.85 // LIR_OpLabel 29.86 void LIR_OpLabel::print_instr(outputStream* out) const { 29.87 - out->print("[label:0x%x]", _label); 29.88 + out->print("[label:" INTPTR_FORMAT "]", p2i(_label)); 29.89 } 29.90 29.91 // LIR_OpArrayCopy 29.92 @@ -1911,7 +1911,7 @@ 29.93 // LIR_Op1 29.94 void LIR_OpRTCall::print_instr(outputStream* out) const { 29.95 intx a = (intx)addr(); 29.96 - out->print(Runtime1::name_for_address(addr())); 29.97 + out->print("%s", Runtime1::name_for_address(addr())); 29.98 out->print(" "); 29.99 tmp()->print(out); 29.100 } 29.101 @@ -1934,10 +1934,10 @@ 29.102 } else if (stub() != NULL) { 29.103 out->print("["); 29.104 stub()->print_name(out); 29.105 - out->print(": 0x%x]", stub()); 29.106 + out->print(": " INTPTR_FORMAT "]", p2i(stub())); 29.107 if (stub()->info() != NULL) out->print(" [bci:%d]", stub()->info()->stack()->bci()); 29.108 } else { 29.109 - out->print("[label:0x%x] ", label()); 29.110 + out->print("[label:" INTPTR_FORMAT "] ", p2i(label())); 29.111 } 29.112 if (ublock() != NULL) { 29.113 out->print("unordered: [B%d] ", ublock()->block_id()); 29.114 @@ -2004,7 +2004,7 @@ 29.115 tmp4()->print(out); out->print(" "); 29.116 out->print("[hdr:%d]", header_size()); out->print(" "); 29.117 out->print("[obj:%d]", object_size()); out->print(" "); 29.118 - out->print("[lbl:0x%x]", stub()->entry()); 29.119 + out->print("[lbl:" INTPTR_FORMAT "]", p2i(stub()->entry())); 29.120 } 29.121 29.122 void LIR_OpRoundFP::print_instr(outputStream* out) const { 29.123 @@ -2037,7 +2037,7 @@ 29.124 tmp3()->print(out); out->print(" "); 29.125 tmp4()->print(out); out->print(" "); 29.126 out->print("[type:0x%x]", type()); out->print(" "); 29.127 - out->print("[label:0x%x]", stub()->entry()); 29.128 + out->print("[label:" INTPTR_FORMAT "]", p2i(stub()->entry())); 29.129 } 29.130 29.131 29.132 @@ -2074,7 +2074,7 @@ 29.133 if (_scratch->is_valid()) { 29.134 _scratch->print(out); out->print(" "); 29.135 } 29.136 - out->print("[lbl:0x%x]", stub()->entry()); 29.137 + out->print("[lbl:" INTPTR_FORMAT "]", p2i(stub()->entry())); 29.138 } 29.139 29.140 #ifdef ASSERT 29.141 @@ -2082,7 +2082,7 @@ 29.142 print_condition(out, condition()); out->print(" "); 29.143 in_opr1()->print(out); out->print(" "); 29.144 in_opr2()->print(out); out->print(", \""); 29.145 - out->print(msg()); out->print("\""); 29.146 + out->print("%s", msg()); out->print("\""); 29.147 } 29.148 #endif 29.149
30.1 --- a/src/share/vm/c1/c1_RangeCheckElimination.cpp Thu May 15 18:23:26 2014 -0400 30.2 +++ b/src/share/vm/c1/c1_RangeCheckElimination.cpp Thu May 22 15:52:41 2014 -0400 30.3 @@ -1,5 +1,5 @@ 30.4 /* 30.5 - * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. 30.6 + * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved. 30.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 30.8 * 30.9 * This code is free software; you can redistribute it and/or modify it 30.10 @@ -62,10 +62,10 @@ 30.11 _optimistic = ir->compilation()->is_optimistic(); 30.12 30.13 TRACE_RANGE_CHECK_ELIMINATION( 30.14 - tty->print_cr(""); 30.15 + tty->cr(); 30.16 tty->print_cr("Range check elimination"); 30.17 ir->method()->print_name(tty); 30.18 - tty->print_cr(""); 30.19 + tty->cr(); 30.20 ); 30.21 30.22 TRACE_RANGE_CHECK_ELIMINATION( 30.23 @@ -1024,7 +1024,7 @@ 30.24 tty->print("i%d", phi->id()); 30.25 tty->print(": "); 30.26 bound->print(); 30.27 - tty->print_cr(""); 30.28 + tty->cr(); 30.29 ); 30.30 } 30.31 }); 30.32 @@ -1039,7 +1039,7 @@ 30.33 tty->print("i%d", instr->id()); 30.34 tty->print(": "); 30.35 bound->print(); 30.36 - tty->print_cr(""); 30.37 + tty->cr(); 30.38 ); 30.39 } 30.40 } 30.41 @@ -1400,7 +1400,7 @@ 30.42 30.43 // print 30.44 void RangeCheckEliminator::Bound::print() { 30.45 - tty->print(""); 30.46 + tty->print("%s", ""); 30.47 if (this->_lower_instr || this->_lower != min_jint) { 30.48 if (this->_lower_instr) { 30.49 tty->print("i%d", this->_lower_instr->id());
31.1 --- a/src/share/vm/c1/c1_Runtime1.cpp Thu May 15 18:23:26 2014 -0400 31.2 +++ b/src/share/vm/c1/c1_Runtime1.cpp Thu May 22 15:52:41 2014 -0400 31.3 @@ -1,5 +1,5 @@ 31.4 /* 31.5 - * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. 31.6 + * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved. 31.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 31.8 * 31.9 * This code is free software; you can redistribute it and/or modify it 31.10 @@ -532,8 +532,8 @@ 31.11 if (TraceExceptions) { 31.12 ttyLocker ttyl; 31.13 ResourceMark rm; 31.14 - tty->print_cr("Exception <%s> (0x%x) thrown in compiled method <%s> at PC " PTR_FORMAT " for thread 0x%x", 31.15 - exception->print_value_string(), (address)exception(), nm->method()->print_value_string(), pc, thread); 31.16 + tty->print_cr("Exception <%s> (" INTPTR_FORMAT ") thrown in compiled method <%s> at PC " INTPTR_FORMAT " for thread " INTPTR_FORMAT "", 31.17 + exception->print_value_string(), p2i((address)exception()), nm->method()->print_value_string(), p2i(pc), p2i(thread)); 31.18 } 31.19 // for AbortVMOnException flag 31.20 NOT_PRODUCT(Exceptions::debug_check_abort(exception)); 31.21 @@ -563,7 +563,7 @@ 31.22 ttyLocker ttyl; 31.23 ResourceMark rm; 31.24 tty->print_cr("Thread " PTR_FORMAT " continuing at PC " PTR_FORMAT " for exception thrown at PC " PTR_FORMAT, 31.25 - thread, continuation, pc); 31.26 + p2i(thread), p2i(continuation), p2i(pc)); 31.27 } 31.28 31.29 return continuation; 31.30 @@ -970,8 +970,8 @@ 31.31 address copy_buff = stub_location - *byte_skip - *byte_count; 31.32 address being_initialized_entry = stub_location - *being_initialized_entry_offset; 31.33 if (TracePatching) { 31.34 - tty->print_cr(" Patching %s at bci %d at address 0x%x (%s)", Bytecodes::name(code), bci, 31.35 - instr_pc, (stub_id == Runtime1::access_field_patching_id) ? "field" : "klass"); 31.36 + tty->print_cr(" Patching %s at bci %d at address " INTPTR_FORMAT " (%s)", Bytecodes::name(code), bci, 31.37 + p2i(instr_pc), (stub_id == Runtime1::access_field_patching_id) ? "field" : "klass"); 31.38 nmethod* caller_code = CodeCache::find_nmethod(caller_frame.pc()); 31.39 assert(caller_code != NULL, "nmethod not found"); 31.40 31.41 @@ -1430,7 +1430,7 @@ 31.42 methodHandle inlinee = methodHandle(vfst.method()); 31.43 inlinee->print_short_name(&ss1); 31.44 m->print_short_name(&ss2); 31.45 - tty->print_cr("Predicate failed trap in method %s at bci %d inlined in %s at pc %x", ss1.as_string(), vfst.bci(), ss2.as_string(), caller_frame.pc()); 31.46 + tty->print_cr("Predicate failed trap in method %s at bci %d inlined in %s at pc " INTPTR_FORMAT, ss1.as_string(), vfst.bci(), ss2.as_string(), p2i(caller_frame.pc())); 31.47 } 31.48 31.49
32.1 --- a/src/share/vm/c1/c1_ValueType.hpp Thu May 15 18:23:26 2014 -0400 32.2 +++ b/src/share/vm/c1/c1_ValueType.hpp Thu May 22 15:52:41 2014 -0400 32.3 @@ -1,5 +1,5 @@ 32.4 /* 32.5 - * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved. 32.6 + * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved. 32.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 32.8 * 32.9 * This code is free software; you can redistribute it and/or modify it 32.10 @@ -175,7 +175,7 @@ 32.11 ValueType* join(ValueType* y) const; 32.12 32.13 // debugging 32.14 - void print(outputStream* s = tty) { s->print(name()); } 32.15 + void print(outputStream* s = tty) { s->print("%s", name()); } 32.16 }; 32.17 32.18
33.1 --- a/src/share/vm/ci/bcEscapeAnalyzer.cpp Thu May 15 18:23:26 2014 -0400 33.2 +++ b/src/share/vm/ci/bcEscapeAnalyzer.cpp Thu May 22 15:52:41 2014 -0400 33.3 @@ -1,5 +1,5 @@ 33.4 /* 33.5 - * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. 33.6 + * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved. 33.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 33.8 * 33.9 * This code is free software; you can redistribute it and/or modify it 33.10 @@ -1287,10 +1287,10 @@ 33.11 tty->print_cr("class of method is not initialized."); 33.12 else if (_level > MaxBCEAEstimateLevel) 33.13 tty->print_cr("level (%d) exceeds MaxBCEAEstimateLevel (%d).", 33.14 - _level, MaxBCEAEstimateLevel); 33.15 + _level, (int) MaxBCEAEstimateLevel); 33.16 else if (method()->code_size() > MaxBCEAEstimateSize) 33.17 - tty->print_cr("code size (%d) exceeds MaxBCEAEstimateSize.", 33.18 - method()->code_size(), MaxBCEAEstimateSize); 33.19 + tty->print_cr("code size (%d) exceeds MaxBCEAEstimateSize (%d).", 33.20 + method()->code_size(), (int) MaxBCEAEstimateSize); 33.21 else 33.22 ShouldNotReachHere(); 33.23 }
34.1 --- a/src/share/vm/ci/ciConstant.cpp Thu May 15 18:23:26 2014 -0400 34.2 +++ b/src/share/vm/ci/ciConstant.cpp Thu May 22 15:52:41 2014 -0400 34.3 @@ -1,5 +1,5 @@ 34.4 /* 34.5 - * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. 34.6 + * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved. 34.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 34.8 * 34.9 * This code is free software; you can redistribute it and/or modify it 34.10 @@ -48,7 +48,7 @@ 34.11 tty->print("%d", _value._int); 34.12 break; 34.13 case T_LONG: 34.14 - tty->print(INT64_FORMAT, _value._long); 34.15 + tty->print(INT64_FORMAT, (int64_t)(_value._long)); 34.16 break; 34.17 case T_FLOAT: 34.18 tty->print("%f", _value._float);
35.1 --- a/src/share/vm/ci/ciEnv.cpp Thu May 15 18:23:26 2014 -0400 35.2 +++ b/src/share/vm/ci/ciEnv.cpp Thu May 22 15:52:41 2014 -0400 35.3 @@ -1,5 +1,5 @@ 35.4 /* 35.5 - * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. 35.6 + * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved. 35.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 35.8 * 35.9 * This code is free software; you can redistribute it and/or modify it 35.10 @@ -1220,8 +1220,7 @@ 35.11 if (replay_data_file != NULL) { 35.12 fileStream replay_data_stream(replay_data_file, /*need_close=*/true); 35.13 dump_replay_data(&replay_data_stream); 35.14 - tty->print("# Compiler replay data is saved as: "); 35.15 - tty->print_cr(buffer); 35.16 + tty->print_cr("# Compiler replay data is saved as: %s", buffer); 35.17 } else { 35.18 tty->print_cr("# Can't open file to dump replay data."); 35.19 } 35.20 @@ -1244,7 +1243,7 @@ 35.21 ) 35.22 replay_data_stream.flush(); 35.23 tty->print("# Compiler inline data is saved as: "); 35.24 - tty->print_cr(buffer); 35.25 + tty->print_cr("%s", buffer); 35.26 } else { 35.27 tty->print_cr("# Can't open file to dump inline data."); 35.28 }
36.1 --- a/src/share/vm/ci/ciInstanceKlass.cpp Thu May 15 18:23:26 2014 -0400 36.2 +++ b/src/share/vm/ci/ciInstanceKlass.cpp Thu May 22 15:52:41 2014 -0400 36.3 @@ -1,5 +1,5 @@ 36.4 /* 36.5 - * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. 36.6 + * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved. 36.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 36.8 * 36.9 * This code is free software; you can redistribute it and/or modify it 36.10 @@ -292,7 +292,7 @@ 36.11 // Implementation of the print method. 36.12 void ciInstanceKlass::print_impl(outputStream* st) { 36.13 ciKlass::print_impl(st); 36.14 - GUARDED_VM_ENTRY(st->print(" loader=0x%x", (address)loader());) 36.15 + GUARDED_VM_ENTRY(st->print(" loader=" INTPTR_FORMAT, p2i((address)loader()));) 36.16 if (is_loaded()) { 36.17 st->print(" loaded=true initialized=%s finalized=%s subklass=%s size=%d flags=", 36.18 bool_to_str(is_initialized()), 36.19 @@ -618,7 +618,7 @@ 36.20 case T_SHORT: _out->print_cr("%d", mirror->short_field(fd->offset())); break; 36.21 case T_CHAR: _out->print_cr("%d", mirror->char_field(fd->offset())); break; 36.22 case T_INT: _out->print_cr("%d", mirror->int_field(fd->offset())); break; 36.23 - case T_LONG: _out->print_cr(INT64_FORMAT, mirror->long_field(fd->offset())); break; 36.24 + case T_LONG: _out->print_cr(INT64_FORMAT, (int64_t)(mirror->long_field(fd->offset()))); break; 36.25 case T_FLOAT: { 36.26 float f = mirror->float_field(fd->offset()); 36.27 _out->print_cr("%d", *(int*)&f); 36.28 @@ -626,7 +626,7 @@ 36.29 } 36.30 case T_DOUBLE: { 36.31 double d = mirror->double_field(fd->offset()); 36.32 - _out->print_cr(INT64_FORMAT, *(jlong*)&d); 36.33 + _out->print_cr(INT64_FORMAT, *(int64_t*)&d); 36.34 break; 36.35 } 36.36 case T_ARRAY: { 36.37 @@ -656,7 +656,7 @@ 36.38 _out->print_cr("\""); 36.39 } else { 36.40 const char* klass_name = value->klass()->name()->as_quoted_ascii(); 36.41 - _out->print_cr(klass_name); 36.42 + _out->print_cr("%s", klass_name); 36.43 } 36.44 } else { 36.45 ShouldNotReachHere();
37.1 --- a/src/share/vm/ci/ciMetadata.cpp Thu May 15 18:23:26 2014 -0400 37.2 +++ b/src/share/vm/ci/ciMetadata.cpp Thu May 22 15:52:41 2014 -0400 37.3 @@ -1,5 +1,5 @@ 37.4 /* 37.5 - * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved. 37.6 + * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved. 37.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 37.8 * 37.9 * This code is free software; you can redistribute it and/or modify it 37.10 @@ -38,7 +38,7 @@ 37.11 void ciMetadata::print(outputStream* st) { 37.12 st->print("<%s", type_string()); 37.13 GUARDED_VM_ENTRY(print_impl(st);) 37.14 - st->print(" ident=%d address=0x%x>", ident(), (address)this); 37.15 + st->print(" ident=%d address=" INTPTR_FORMAT ">", ident(), p2i((address)this)); 37.16 } 37.17 37.18
38.1 --- a/src/share/vm/ci/ciMethodData.cpp Thu May 15 18:23:26 2014 -0400 38.2 +++ b/src/share/vm/ci/ciMethodData.cpp Thu May 22 15:52:41 2014 -0400 38.3 @@ -1,5 +1,5 @@ 38.4 /* 38.5 - * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. 38.6 + * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved. 38.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 38.8 * 38.9 * This code is free software; you can redistribute it and/or modify it 38.10 @@ -557,7 +557,7 @@ 38.11 if (round == 0) { 38.12 count++; 38.13 } else { 38.14 - out->print(" %d %s", dp_to_di(vdata->dp() + in_bytes(vdata->receiver_offset(i))) / sizeof(intptr_t), k->name()->as_quoted_ascii()); 38.15 + out->print(" %d %s", (int)(dp_to_di(vdata->dp() + in_bytes(vdata->receiver_offset(i))) / sizeof(intptr_t)), k->name()->as_quoted_ascii()); 38.16 } 38.17 } 38.18 } 38.19 @@ -569,7 +569,7 @@ 38.20 if (round == 0) { 38.21 count++; 38.22 } else { 38.23 - out->print(" %d %s", dp_to_di(vdata->dp() + in_bytes(vdata->receiver_offset(i))) / sizeof(intptr_t), k->name()->as_quoted_ascii()); 38.24 + out->print(" %d %s", (int)(dp_to_di(vdata->dp() + in_bytes(vdata->receiver_offset(i))) / sizeof(intptr_t)), k->name()->as_quoted_ascii()); 38.25 } 38.26 } 38.27 }
39.1 --- a/src/share/vm/ci/ciObject.cpp Thu May 15 18:23:26 2014 -0400 39.2 +++ b/src/share/vm/ci/ciObject.cpp Thu May 22 15:52:41 2014 -0400 39.3 @@ -1,5 +1,5 @@ 39.4 /* 39.5 - * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved. 39.6 + * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved. 39.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 39.8 * 39.9 * This code is free software; you can redistribute it and/or modify it 39.10 @@ -214,9 +214,9 @@ 39.11 void ciObject::print(outputStream* st) { 39.12 st->print("<%s", type_string()); 39.13 GUARDED_VM_ENTRY(print_impl(st);) 39.14 - st->print(" ident=%d %s address=0x%x>", ident(), 39.15 + st->print(" ident=%d %s address=" INTPTR_FORMAT ">", ident(), 39.16 is_scavengable() ? "SCAVENGABLE" : "", 39.17 - (address)this); 39.18 + p2i((address)this)); 39.19 } 39.20 39.21 // ------------------------------------------------------------------
40.1 --- a/src/share/vm/ci/ciSignature.cpp Thu May 15 18:23:26 2014 -0400 40.2 +++ b/src/share/vm/ci/ciSignature.cpp Thu May 22 15:52:41 2014 -0400 40.3 @@ -1,5 +1,5 @@ 40.4 /* 40.5 - * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved. 40.6 + * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved. 40.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 40.8 * 40.9 * This code is free software; you can redistribute it and/or modify it 40.10 @@ -148,5 +148,5 @@ 40.11 print_signature(); 40.12 tty->print(" accessing_klass="); 40.13 _accessing_klass->print(); 40.14 - tty->print(" address=0x%x>", (address)this); 40.15 + tty->print(" address=" INTPTR_FORMAT ">", p2i((address)this)); 40.16 }
41.1 --- a/src/share/vm/ci/ciType.cpp Thu May 15 18:23:26 2014 -0400 41.2 +++ b/src/share/vm/ci/ciType.cpp Thu May 22 15:52:41 2014 -0400 41.3 @@ -1,5 +1,5 @@ 41.4 /* 41.5 - * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. 41.6 + * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. 41.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 41.8 * 41.9 * This code is free software; you can redistribute it and/or modify it 41.10 @@ -87,7 +87,7 @@ 41.11 // Print the name of this type 41.12 void ciType::print_name_on(outputStream* st) { 41.13 ResourceMark rm; 41.14 - st->print(name()); 41.15 + st->print("%s", name()); 41.16 } 41.17 41.18
42.1 --- a/src/share/vm/classfile/classFileError.cpp Thu May 15 18:23:26 2014 -0400 42.2 +++ b/src/share/vm/classfile/classFileError.cpp Thu May 22 15:52:41 2014 -0400 42.3 @@ -1,5 +1,5 @@ 42.4 /* 42.5 - * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved. 42.6 + * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved. 42.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 42.8 * 42.9 * This code is free software; you can redistribute it and/or modify it 42.10 @@ -29,6 +29,9 @@ 42.11 42.12 // Keep these in a separate file to prevent inlining 42.13 42.14 +PRAGMA_DIAG_PUSH 42.15 +PRAGMA_FORMAT_NONLITERAL_IGNORED 42.16 + 42.17 void ClassFileParser::classfile_parse_error(const char* msg, TRAPS) { 42.18 ResourceMark rm(THREAD); 42.19 Exceptions::fthrow(THREAD_AND_LOCATION, vmSymbols::java_lang_ClassFormatError(), 42.20 @@ -53,6 +56,8 @@ 42.21 msg, index, name, _class_name->as_C_string()); 42.22 } 42.23 42.24 +PRAGMA_DIAG_POP 42.25 + 42.26 void StackMapStream::stackmap_format_error(const char* msg, TRAPS) { 42.27 ResourceMark rm(THREAD); 42.28 Exceptions::fthrow(
43.1 --- a/src/share/vm/classfile/classFileParser.hpp Thu May 15 18:23:26 2014 -0400 43.2 +++ b/src/share/vm/classfile/classFileParser.hpp Thu May 22 15:52:41 2014 -0400 43.3 @@ -1,5 +1,5 @@ 43.4 /* 43.5 - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 43.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 43.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 43.8 * 43.9 * This code is free software; you can redistribute it and/or modify it 43.10 @@ -312,7 +312,9 @@ 43.11 if (!b) { classfile_parse_error(msg, CHECK); } 43.12 } 43.13 43.14 - inline void assert_property(bool b, const char* msg, TRAPS) { 43.15 +PRAGMA_DIAG_PUSH 43.16 +PRAGMA_FORMAT_NONLITERAL_IGNORED 43.17 +inline void assert_property(bool b, const char* msg, TRAPS) { 43.18 #ifdef ASSERT 43.19 if (!b) { 43.20 ResourceMark rm(THREAD); 43.21 @@ -329,6 +331,7 @@ 43.22 } 43.23 #endif 43.24 } 43.25 +PRAGMA_DIAG_POP 43.26 43.27 inline void check_property(bool property, const char* msg, int index, TRAPS) { 43.28 if (_need_verify) {
44.1 --- a/src/share/vm/classfile/classLoader.cpp Thu May 15 18:23:26 2014 -0400 44.2 +++ b/src/share/vm/classfile/classLoader.cpp Thu May 22 15:52:41 2014 -0400 44.3 @@ -1,5 +1,5 @@ 44.4 /* 44.5 - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 44.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 44.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 44.8 * 44.9 * This code is free software; you can redistribute it and/or modify it 44.10 @@ -343,7 +343,7 @@ 44.11 tty->print("[Meta index for %s=", entry->name()); 44.12 for (int i = 0; i < meta_packages.length(); i++) { 44.13 if (i > 0) tty->print(" "); 44.14 - tty->print(meta_packages.at(i)); 44.15 + tty->print("%s", meta_packages.at(i)); 44.16 } 44.17 tty->print_cr("]"); 44.18 } 44.19 @@ -1299,7 +1299,7 @@ 44.20 e = e->next(); 44.21 } 44.22 jlong end = os::javaTimeMillis(); 44.23 - tty->print_cr("CompileTheWorld : Done (%d classes, %d methods, %d ms)", 44.24 + tty->print_cr("CompileTheWorld : Done (%d classes, %d methods, " JLONG_FORMAT " ms)", 44.25 _compile_the_world_class_counter, _compile_the_world_method_counter, (end - start)); 44.26 { 44.27 // Print statistics as if before normal exit:
45.1 --- a/src/share/vm/classfile/classLoaderData.cpp Thu May 15 18:23:26 2014 -0400 45.2 +++ b/src/share/vm/classfile/classLoaderData.cpp Thu May 22 15:52:41 2014 -0400 45.3 @@ -269,10 +269,10 @@ 45.4 ResourceMark rm; 45.5 tty->print_cr("[TraceClassLoaderData] Adding k: " PTR_FORMAT " %s to CLD: " 45.6 PTR_FORMAT " loader: " PTR_FORMAT " %s", 45.7 - k, 45.8 + p2i(k), 45.9 k->external_name(), 45.10 - k->class_loader_data(), 45.11 - (void *)k->class_loader(), 45.12 + p2i(k->class_loader_data()), 45.13 + p2i((void *)k->class_loader()), 45.14 loader_name()); 45.15 } 45.16 } 45.17 @@ -307,11 +307,11 @@ 45.18 45.19 if (TraceClassLoaderData) { 45.20 ResourceMark rm; 45.21 - tty->print("[ClassLoaderData: unload loader data "PTR_FORMAT, this); 45.22 - tty->print(" for instance "PTR_FORMAT" of %s", (void *)class_loader(), 45.23 + tty->print("[ClassLoaderData: unload loader data " INTPTR_FORMAT, p2i(this)); 45.24 + tty->print(" for instance " INTPTR_FORMAT " of %s", p2i((void *)class_loader()), 45.25 loader_name()); 45.26 if (is_anonymous()) { 45.27 - tty->print(" for anonymous class "PTR_FORMAT " ", _klasses); 45.28 + tty->print(" for anonymous class " INTPTR_FORMAT " ", p2i(_klasses)); 45.29 } 45.30 tty->print_cr("]"); 45.31 } 45.32 @@ -469,14 +469,14 @@ 45.33 void ClassLoaderData::dump(outputStream * const out) { 45.34 ResourceMark rm; 45.35 out->print("ClassLoaderData CLD: "PTR_FORMAT", loader: "PTR_FORMAT", loader_klass: "PTR_FORMAT" %s {", 45.36 - this, (void *)class_loader(), 45.37 - class_loader() != NULL ? class_loader()->klass() : NULL, loader_name()); 45.38 + p2i(this), p2i((void *)class_loader()), 45.39 + p2i(class_loader() != NULL ? class_loader()->klass() : NULL), loader_name()); 45.40 if (claimed()) out->print(" claimed "); 45.41 if (is_unloading()) out->print(" unloading "); 45.42 - out->print(" handles " INTPTR_FORMAT, handles()); 45.43 + out->print(" handles " INTPTR_FORMAT, p2i(handles())); 45.44 out->cr(); 45.45 if (metaspace_or_null() != NULL) { 45.46 - out->print_cr("metaspace: " PTR_FORMAT, metaspace_or_null()); 45.47 + out->print_cr("metaspace: " INTPTR_FORMAT, p2i(metaspace_or_null())); 45.48 metaspace_or_null()->dump(out); 45.49 } else { 45.50 out->print_cr("metaspace: NULL"); 45.51 @@ -572,8 +572,8 @@ 45.52 if (TraceClassLoaderData) { 45.53 ResourceMark rm; 45.54 tty->print("[ClassLoaderData: "); 45.55 - tty->print("create class loader data "PTR_FORMAT, cld); 45.56 - tty->print(" for instance "PTR_FORMAT" of %s", (void *)cld->class_loader(), 45.57 + tty->print("create class loader data " INTPTR_FORMAT, p2i(cld)); 45.58 + tty->print(" for instance " INTPTR_FORMAT " of %s", p2i((void *)cld->class_loader()), 45.59 cld->loader_name()); 45.60 tty->print_cr("]"); 45.61 } 45.62 @@ -804,7 +804,7 @@ 45.63 if (class_loader() == NULL) { 45.64 out->print("NULL class_loader"); 45.65 } else { 45.66 - out->print("class loader "PTR_FORMAT, this); 45.67 + out->print("class loader " INTPTR_FORMAT, p2i(this)); 45.68 class_loader()->print_value_on(out); 45.69 } 45.70 }
46.1 --- a/src/share/vm/classfile/defaultMethods.cpp Thu May 15 18:23:26 2014 -0400 46.2 +++ b/src/share/vm/classfile/defaultMethods.cpp Thu May 22 15:52:41 2014 -0400 46.3 @@ -436,7 +436,7 @@ 46.4 _exception_name = vmSymbols::java_lang_IncompatibleClassChangeError(); 46.5 if (TraceDefaultMethods) { 46.6 _exception_message->print_value_on(tty); 46.7 - tty->print_cr(""); 46.8 + tty->cr(); 46.9 } 46.10 } 46.11 } 46.12 @@ -463,7 +463,7 @@ 46.13 if (_members.at(i).second == DISQUALIFIED) { 46.14 str->print(" (disqualified)"); 46.15 } 46.16 - str->print_cr(""); 46.17 + str->cr(); 46.18 } 46.19 46.20 if (_selected_target != NULL) { 46.21 @@ -480,7 +480,7 @@ 46.22 if (!method_holder->is_interface()) { 46.23 tty->print(" : in superclass"); 46.24 } 46.25 - str->print_cr(""); 46.26 + str->cr(); 46.27 } 46.28 46.29 void print_exception(outputStream* str, int indent) { 46.30 @@ -688,7 +688,7 @@ 46.31 for (int i = 0; i < slots->length(); ++i) { 46.32 tty->indent(); 46.33 slots->at(i)->print_on(tty); 46.34 - tty->print_cr(""); 46.35 + tty->cr(); 46.36 } 46.37 } 46.38 #endif // ndef PRODUCT 46.39 @@ -828,7 +828,7 @@ 46.40 streamIndentor si(tty, 2); 46.41 tty->indent().print("Looking for default methods for slot "); 46.42 slot->print_on(tty); 46.43 - tty->print_cr(""); 46.44 + tty->cr(); 46.45 } 46.46 #endif // ndef PRODUCT 46.47 46.48 @@ -946,7 +946,7 @@ 46.49 if (TraceDefaultMethods) { 46.50 tty->print("for slot: "); 46.51 slot->print_on(tty); 46.52 - tty->print_cr(""); 46.53 + tty->cr(); 46.54 if (method->has_target()) { 46.55 method->print_selected(tty, 1); 46.56 } else if (method->throws_exception()) {
47.1 --- a/src/share/vm/classfile/dictionary.cpp Thu May 15 18:23:26 2014 -0400 47.2 +++ b/src/share/vm/classfile/dictionary.cpp Thu May 22 15:52:41 2014 -0400 47.3 @@ -30,6 +30,7 @@ 47.4 #include "prims/jvmtiRedefineClassesTrace.hpp" 47.5 #include "utilities/hashtable.inline.hpp" 47.6 47.7 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 47.8 47.9 DictionaryEntry* Dictionary::_current_class_entry = NULL; 47.10 int Dictionary::_current_class_index = 0;
48.1 --- a/src/share/vm/classfile/dictionary.hpp Thu May 15 18:23:26 2014 -0400 48.2 +++ b/src/share/vm/classfile/dictionary.hpp Thu May 22 15:52:41 2014 -0400 48.3 @@ -1,5 +1,5 @@ 48.4 /* 48.5 - * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. 48.6 + * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved. 48.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 48.8 * 48.9 * This code is free software; you can redistribute it and/or modify it 48.10 @@ -379,7 +379,7 @@ 48.11 } 48.12 if (method_type() != NULL) { 48.13 if (printed) st->print(" and "); 48.14 - st->print(INTPTR_FORMAT, (void *)method_type()); 48.15 + st->print(INTPTR_FORMAT, p2i((void *)method_type())); 48.16 printed = true; 48.17 } 48.18 st->print_cr(printed ? "" : "(empty)");
49.1 --- a/src/share/vm/classfile/javaClasses.cpp Thu May 15 18:23:26 2014 -0400 49.2 +++ b/src/share/vm/classfile/javaClasses.cpp Thu May 22 15:52:41 2014 -0400 49.3 @@ -51,6 +51,8 @@ 49.4 #include "runtime/vframe.hpp" 49.5 #include "utilities/preserveException.hpp" 49.6 49.7 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 49.8 + 49.9 #define INJECTED_FIELD_COMPUTE_OFFSET(klass, name, signature, may_be_java) \ 49.10 klass::_##name##_offset = JavaClasses::compute_injected_offset(JavaClasses::klass##_##name##_enum); 49.11 49.12 @@ -1481,7 +1483,7 @@ 49.13 while (h_throwable.not_null()) { 49.14 objArrayHandle result (THREAD, objArrayOop(backtrace(h_throwable()))); 49.15 if (result.is_null()) { 49.16 - st->print_cr(no_stack_trace_message()); 49.17 + st->print_cr("%s", no_stack_trace_message()); 49.18 return; 49.19 } 49.20
50.1 --- a/src/share/vm/classfile/symbolTable.cpp Thu May 15 18:23:26 2014 -0400 50.2 +++ b/src/share/vm/classfile/symbolTable.cpp Thu May 22 15:52:41 2014 -0400 50.3 @@ -39,6 +39,8 @@ 50.4 #include "gc_implementation/g1/g1StringDedup.hpp" 50.5 #endif 50.6 50.7 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 50.8 + 50.9 // -------------------------------------------------------------------------- 50.10 50.11 // the number of buckets a thread claims
51.1 --- a/src/share/vm/classfile/systemDictionary.cpp Thu May 15 18:23:26 2014 -0400 51.2 +++ b/src/share/vm/classfile/systemDictionary.cpp Thu May 22 15:52:41 2014 -0400 51.3 @@ -2268,7 +2268,7 @@ 51.4 oop appendix = appendix_box->obj_at(0); 51.5 if (TraceMethodHandles) { 51.6 #ifndef PRODUCT 51.7 - tty->print("Linked method="INTPTR_FORMAT": ", m); 51.8 + tty->print("Linked method=" INTPTR_FORMAT ": ", p2i(m)); 51.9 m->print(); 51.10 if (appendix != NULL) { tty->print("appendix = "); appendix->print(); } 51.11 tty->cr();
52.1 --- a/src/share/vm/classfile/verifier.cpp Thu May 15 18:23:26 2014 -0400 52.2 +++ b/src/share/vm/classfile/verifier.cpp Thu May 22 15:52:41 2014 -0400 52.3 @@ -364,7 +364,7 @@ 52.4 52.5 void ErrorContext::details(outputStream* ss, const Method* method) const { 52.6 if (is_valid()) { 52.7 - ss->print_cr(""); 52.8 + ss->cr(); 52.9 ss->print_cr("Exception Details:"); 52.10 location_details(ss, method); 52.11 reason_details(ss); 52.12 @@ -379,7 +379,7 @@ 52.13 streamIndentor si(ss); 52.14 ss->indent().print_cr("Reason:"); 52.15 streamIndentor si2(ss); 52.16 - ss->indent().print(""); 52.17 + ss->indent().print("%s", ""); 52.18 switch (_fault) { 52.19 case INVALID_BYTECODE: 52.20 ss->print("Error exists in the bytecode"); 52.21 @@ -432,7 +432,7 @@ 52.22 ShouldNotReachHere(); 52.23 ss->print_cr("Unknown"); 52.24 } 52.25 - ss->print_cr(""); 52.26 + ss->cr(); 52.27 } 52.28 52.29 void ErrorContext::location_details(outputStream* ss, const Method* method) const { 52.30 @@ -507,7 +507,7 @@ 52.31 for (u2 i = 0; i < sm_table->number_of_entries(); ++i) { 52.32 ss->indent(); 52.33 sm_frame->print_on(ss, current_offset); 52.34 - ss->print_cr(""); 52.35 + ss->cr(); 52.36 current_offset += sm_frame->offset_delta(); 52.37 sm_frame = sm_frame->next(); 52.38 } 52.39 @@ -579,7 +579,8 @@ 52.40 tty->print_cr("Verifying method %s", m->name_and_sig_as_C_string()); 52.41 } 52.42 52.43 - const char* bad_type_msg = "Bad type on operand stack in %s"; 52.44 +// For clang, the only good constant format string is a literal constant format string. 52.45 +#define bad_type_msg "Bad type on operand stack in %s" 52.46 52.47 int32_t max_stack = m->verifier_max_stack(); 52.48 int32_t max_locals = m->max_locals(); 52.49 @@ -1676,6 +1677,8 @@ 52.50 } 52.51 } 52.52 52.53 +#undef bad_type_message 52.54 + 52.55 char* ClassVerifier::generate_code_data(methodHandle m, u4 code_length, TRAPS) { 52.56 char* code_data = NEW_RESOURCE_ARRAY(char, code_length); 52.57 memset(code_data, 0, sizeof(char) * code_length); 52.58 @@ -2363,11 +2366,12 @@ 52.59 if (opcode == Bytecodes::_invokedynamic) { 52.60 if (!EnableInvokeDynamic || 52.61 _klass->major_version() < Verifier::INVOKEDYNAMIC_MAJOR_VERSION) { 52.62 - class_format_error( 52.63 - (!EnableInvokeDynamic ? 52.64 - "invokedynamic instructions not enabled in this JVM" : 52.65 - "invokedynamic instructions not supported by this class file version"), 52.66 - _klass->external_name()); 52.67 + if (!EnableInvokeDynamic) { 52.68 + class_format_error("invokedynamic instructions not enabled in this JVM"); 52.69 + } else { 52.70 + class_format_error("invokedynamic instructions not supported by this class file version (%d), class %s", 52.71 + _klass->major_version(), _klass->external_name()); 52.72 + } 52.73 return; 52.74 } 52.75 } else {
53.1 --- a/src/share/vm/classfile/verifier.hpp Thu May 15 18:23:26 2014 -0400 53.2 +++ b/src/share/vm/classfile/verifier.hpp Thu May 22 15:52:41 2014 -0400 53.3 @@ -1,5 +1,5 @@ 53.4 /* 53.5 - * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. 53.6 + * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved. 53.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 53.8 * 53.9 * This code is free software; you can redistribute it and/or modify it 53.10 @@ -375,15 +375,15 @@ 53.11 bool has_error() const { return result() != NULL; } 53.12 char* exception_message() { 53.13 stringStream ss; 53.14 - ss.print(_message); 53.15 + ss.print("%s", _message); 53.16 _error_context.details(&ss, _method()); 53.17 return ss.as_string(); 53.18 } 53.19 53.20 // Called when verify or class format errors are encountered. 53.21 // May throw an exception based upon the mode. 53.22 - void verify_error(ErrorContext ctx, const char* fmt, ...); 53.23 - void class_format_error(const char* fmt, ...); 53.24 + void verify_error(ErrorContext ctx, const char* fmt, ...) ATTRIBUTE_PRINTF(3, 4); 53.25 + void class_format_error(const char* fmt, ...) ATTRIBUTE_PRINTF(2, 3); 53.26 53.27 Klass* load_class(Symbol* name, TRAPS); 53.28
54.1 --- a/src/share/vm/classfile/vmSymbols.cpp Thu May 15 18:23:26 2014 -0400 54.2 +++ b/src/share/vm/classfile/vmSymbols.cpp Thu May 22 15:52:41 2014 -0400 54.3 @@ -1,5 +1,5 @@ 54.4 /* 54.5 - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 54.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 54.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 54.8 * 54.9 * This code is free software; you can redistribute it and/or modify it 54.10 @@ -533,7 +533,7 @@ 54.11 xtty->begin_elem("intrinsic_misdeclared actual='%s' declared='%s'", 54.12 actual_name, declared_name); 54.13 xtty->method(mh); 54.14 - xtty->end_elem(""); 54.15 + xtty->end_elem("%s", ""); 54.16 } 54.17 if (PrintMiscellaneous && (WizardMode || Verbose)) { 54.18 tty->print_cr("*** misidentified method; %s(%d) should be %s(%d):",
55.1 --- a/src/share/vm/code/codeBlob.cpp Thu May 15 18:23:26 2014 -0400 55.2 +++ b/src/share/vm/code/codeBlob.cpp Thu May 22 15:52:41 2014 -0400 55.3 @@ -1,5 +1,5 @@ 55.4 /* 55.5 - * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. 55.6 + * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved. 55.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 55.8 * 55.9 * This code is free software; you can redistribute it and/or modify it 55.10 @@ -530,7 +530,7 @@ 55.11 } 55.12 55.13 void CodeBlob::print_on(outputStream* st) const { 55.14 - st->print_cr("[CodeBlob (" INTPTR_FORMAT ")]", this); 55.15 + st->print_cr("[CodeBlob (" INTPTR_FORMAT ")]", p2i(this)); 55.16 st->print_cr("Framesize: %d", _frame_size); 55.17 } 55.18 55.19 @@ -548,7 +548,7 @@ 55.20 } 55.21 55.22 void BufferBlob::print_value_on(outputStream* st) const { 55.23 - st->print_cr("BufferBlob (" INTPTR_FORMAT ") used for %s", this, name()); 55.24 + st->print_cr("BufferBlob (" INTPTR_FORMAT ") used for %s", p2i(this), name()); 55.25 } 55.26 55.27 void RuntimeStub::verify() { 55.28 @@ -558,13 +558,13 @@ 55.29 void RuntimeStub::print_on(outputStream* st) const { 55.30 ttyLocker ttyl; 55.31 CodeBlob::print_on(st); 55.32 - st->print("Runtime Stub (" INTPTR_FORMAT "): ", this); 55.33 - st->print_cr(name()); 55.34 + st->print("Runtime Stub (" INTPTR_FORMAT "): ", p2i(this)); 55.35 + st->print_cr("%s", name()); 55.36 Disassembler::decode((CodeBlob*)this, st); 55.37 } 55.38 55.39 void RuntimeStub::print_value_on(outputStream* st) const { 55.40 - st->print("RuntimeStub (" INTPTR_FORMAT "): ", this); st->print(name()); 55.41 + st->print("RuntimeStub (" INTPTR_FORMAT "): ", p2i(this)); st->print("%s", name()); 55.42 } 55.43 55.44 void SingletonBlob::verify() { 55.45 @@ -574,12 +574,12 @@ 55.46 void SingletonBlob::print_on(outputStream* st) const { 55.47 ttyLocker ttyl; 55.48 CodeBlob::print_on(st); 55.49 - st->print_cr(name()); 55.50 + st->print_cr("%s", name()); 55.51 Disassembler::decode((CodeBlob*)this, st); 55.52 } 55.53 55.54 void SingletonBlob::print_value_on(outputStream* st) const { 55.55 - st->print_cr(name()); 55.56 + st->print_cr("%s", name()); 55.57 } 55.58 55.59 void DeoptimizationBlob::print_value_on(outputStream* st) const {
56.1 --- a/src/share/vm/code/codeCache.cpp Thu May 15 18:23:26 2014 -0400 56.2 +++ b/src/share/vm/code/codeCache.cpp Thu May 22 15:52:41 2014 -0400 56.3 @@ -1,5 +1,5 @@ 56.4 /* 56.5 - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 56.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 56.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 56.8 * 56.9 * This code is free software; you can redistribute it and/or modify it 56.10 @@ -81,10 +81,10 @@ 56.11 bool is_empty() { return count == 0; } 56.12 56.13 void print(const char* title) { 56.14 - tty->print_cr(" #%d %s = %dK (hdr %d%%, loc %d%%, code %d%%, stub %d%%, [oops %d%%, data %d%%, pcs %d%%])", 56.15 + tty->print_cr(" #%d %s = %dK (hdr %d%%, loc %d%%, code %d%%, stub %d%%, [oops %d%%, metadata %d%%, data %d%%, pcs %d%%])", 56.16 count, 56.17 title, 56.18 - total() / K, 56.19 + (int)(total() / K), 56.20 header_size * 100 / total_size, 56.21 relocation_size * 100 / total_size, 56.22 code_size * 100 / total_size, 56.23 @@ -191,7 +191,7 @@ 56.24 } 56.25 if (PrintCodeCacheExtension) { 56.26 ResourceMark rm; 56.27 - tty->print_cr("code cache extended to [" INTPTR_FORMAT ", " INTPTR_FORMAT "] (%d bytes)", 56.28 + tty->print_cr("code cache extended to [" INTPTR_FORMAT ", " INTPTR_FORMAT "] (" SSIZE_FORMAT " bytes)", 56.29 (intptr_t)_heap->low_boundary(), (intptr_t)_heap->high(), 56.30 (address)_heap->high() - (address)_heap->low_boundary()); 56.31 } 56.32 @@ -496,7 +496,7 @@ 56.33 if (CompiledIC::is_icholder_call_site(iter.virtual_call_reloc())) { 56.34 CompiledIC *ic = CompiledIC_at(iter.reloc()); 56.35 if (TraceCompiledIC) { 56.36 - tty->print("noticed icholder " INTPTR_FORMAT " ", ic->cached_icholder()); 56.37 + tty->print("noticed icholder " INTPTR_FORMAT " ", p2i(ic->cached_icholder())); 56.38 ic->print(); 56.39 } 56.40 assert(ic->cached_icholder() != NULL, "must be non-NULL"); 56.41 @@ -775,7 +775,7 @@ 56.42 if (PrintCodeCache2) { // Need to add a new flag 56.43 ResourceMark rm; 56.44 if (size == 0) size = cb->size(); 56.45 - tty->print_cr("CodeCache %s: addr: " INTPTR_FORMAT ", size: 0x%x", event, cb, size); 56.46 + tty->print_cr("CodeCache %s: addr: " INTPTR_FORMAT ", size: 0x%x", event, p2i(cb), size); 56.47 } 56.48 } 56.49 56.50 @@ -900,7 +900,7 @@ 56.51 56.52 tty->print_cr("CodeCache:"); 56.53 56.54 - tty->print_cr("nmethod dependency checking time %f", dependentCheckTime.seconds(), 56.55 + tty->print_cr("nmethod dependency checking time %f, per dependent %f", dependentCheckTime.seconds(), 56.56 dependentCheckTime.seconds() / dependentCheckCount); 56.57 56.58 if (!live.is_empty()) { 56.59 @@ -947,9 +947,9 @@ 56.60 56.61 if (detailed) { 56.62 st->print_cr(" bounds [" INTPTR_FORMAT ", " INTPTR_FORMAT ", " INTPTR_FORMAT "]", 56.63 - _heap->low_boundary(), 56.64 - _heap->high(), 56.65 - _heap->high_boundary()); 56.66 + p2i(_heap->low_boundary()), 56.67 + p2i(_heap->high()), 56.68 + p2i(_heap->high_boundary())); 56.69 st->print_cr(" total_blobs=" UINT32_FORMAT " nmethods=" UINT32_FORMAT 56.70 " adapters=" UINT32_FORMAT, 56.71 nof_blobs(), nof_nmethods(), nof_adapters());
57.1 --- a/src/share/vm/code/compiledIC.cpp Thu May 15 18:23:26 2014 -0400 57.2 +++ b/src/share/vm/code/compiledIC.cpp Thu May 22 15:52:41 2014 -0400 57.3 @@ -1,5 +1,5 @@ 57.4 /* 57.5 - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 57.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 57.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 57.8 * 57.9 * This code is free software; you can redistribute it and/or modify it 57.10 @@ -88,9 +88,9 @@ 57.11 if (TraceCompiledIC) { 57.12 tty->print(" "); 57.13 print_compiled_ic(); 57.14 - tty->print(" changing destination to " INTPTR_FORMAT, entry_point); 57.15 + tty->print(" changing destination to " INTPTR_FORMAT, p2i(entry_point)); 57.16 if (!is_optimized()) { 57.17 - tty->print(" changing cached %s to " INTPTR_FORMAT, is_icholder ? "icholder" : "metadata", (address)cache); 57.18 + tty->print(" changing cached %s to " INTPTR_FORMAT, is_icholder ? "icholder" : "metadata", p2i((address)cache)); 57.19 } 57.20 if (is_icstub) { 57.21 tty->print(" (icstub)"); 57.22 @@ -195,7 +195,7 @@ 57.23 if (TraceICs) { 57.24 ResourceMark rm; 57.25 tty->print_cr ("IC@" INTPTR_FORMAT ": to megamorphic %s entry: " INTPTR_FORMAT, 57.26 - instruction_address(), call_info->selected_method()->print_value_string(), entry); 57.27 + p2i(instruction_address()), call_info->selected_method()->print_value_string(), p2i(entry)); 57.28 } 57.29 57.30 // We can't check this anymore. With lazy deopt we could have already 57.31 @@ -272,7 +272,7 @@ 57.32 void CompiledIC::set_to_clean() { 57.33 assert(SafepointSynchronize::is_at_safepoint() || CompiledIC_lock->is_locked() , "MT-unsafe call"); 57.34 if (TraceInlineCacheClearing || TraceICs) { 57.35 - tty->print_cr("IC@" INTPTR_FORMAT ": set to clean", instruction_address()); 57.36 + tty->print_cr("IC@" INTPTR_FORMAT ": set to clean", p2i(instruction_address())); 57.37 print(); 57.38 } 57.39 57.40 @@ -354,7 +354,7 @@ 57.41 if (TraceICs) { 57.42 ResourceMark rm(thread); 57.43 tty->print_cr ("IC@" INTPTR_FORMAT ": monomorphic to interpreter: %s", 57.44 - instruction_address(), 57.45 + p2i(instruction_address()), 57.46 method->print_value_string()); 57.47 } 57.48 } else { 57.49 @@ -362,7 +362,7 @@ 57.50 InlineCacheBuffer::create_transition_stub(this, info.claim_cached_icholder(), info.entry()); 57.51 if (TraceICs) { 57.52 ResourceMark rm(thread); 57.53 - tty->print_cr ("IC@" INTPTR_FORMAT ": monomorphic to interpreter via icholder ", instruction_address()); 57.54 + tty->print_cr ("IC@" INTPTR_FORMAT ": monomorphic to interpreter via icholder ", p2i(instruction_address())); 57.55 } 57.56 } 57.57 } else { 57.58 @@ -392,7 +392,7 @@ 57.59 ResourceMark rm(thread); 57.60 assert(info.cached_metadata() == NULL || info.cached_metadata()->is_klass(), "must be"); 57.61 tty->print_cr ("IC@" INTPTR_FORMAT ": monomorphic to compiled (rcvr klass) %s: %s", 57.62 - instruction_address(), 57.63 + p2i(instruction_address()), 57.64 ((Klass*)info.cached_metadata())->print_value_string(), 57.65 (safe) ? "" : "via stub"); 57.66 } 57.67 @@ -530,8 +530,8 @@ 57.68 if (TraceICs) { 57.69 ResourceMark rm; 57.70 tty->print_cr("CompiledStaticCall@" INTPTR_FORMAT ": set_to_compiled " INTPTR_FORMAT, 57.71 - instruction_address(), 57.72 - info.entry()); 57.73 + p2i(instruction_address()), 57.74 + p2i(info.entry())); 57.75 } 57.76 // Call to compiled code 57.77 assert (CodeCache::contains(info.entry()), "wrong entry point"); 57.78 @@ -600,11 +600,11 @@ 57.79 57.80 void CompiledIC::print_compiled_ic() { 57.81 tty->print("Inline cache at " INTPTR_FORMAT ", calling %s " INTPTR_FORMAT " cached_value " INTPTR_FORMAT, 57.82 - instruction_address(), is_call_to_interpreted() ? "interpreted " : "", ic_destination(), is_optimized() ? NULL : cached_value()); 57.83 + p2i(instruction_address()), is_call_to_interpreted() ? "interpreted " : "", p2i(ic_destination()), p2i(is_optimized() ? NULL : cached_value())); 57.84 } 57.85 57.86 void CompiledStaticCall::print() { 57.87 - tty->print("static call at " INTPTR_FORMAT " -> ", instruction_address()); 57.88 + tty->print("static call at " INTPTR_FORMAT " -> ", p2i(instruction_address())); 57.89 if (is_clean()) { 57.90 tty->print("clean"); 57.91 } else if (is_call_to_compiled()) {
58.1 --- a/src/share/vm/code/compressedStream.cpp Thu May 15 18:23:26 2014 -0400 58.2 +++ b/src/share/vm/code/compressedStream.cpp Thu May 22 15:52:41 2014 -0400 58.3 @@ -1,5 +1,5 @@ 58.4 /* 58.5 - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 58.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 58.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 58.8 * 58.9 * This code is free software; you can redistribute it and/or modify it 58.10 @@ -212,6 +212,8 @@ 58.11 return h ^ l; 58.12 } 58.13 58.14 +PRAGMA_DIAG_PUSH 58.15 +PRAGMA_FORMAT_IGNORED // Someone needs to deal with this. 58.16 void test_compressed_stream(int trace) { 58.17 CompressedWriteStream bytes(stretch_limit * 100); 58.18 jint n; 58.19 @@ -275,6 +277,7 @@ 58.20 guarantee(length == length2, "bad length"); 58.21 guarantee(fails == 0, "test failures"); 58.22 } 58.23 +PRAGMA_DIAG_POP 58.24 58.25 #if defined(_MSC_VER) &&_MSC_VER >=1400 && !defined(_WIN64) 58.26 #pragma warning(default: 4748)
59.1 --- a/src/share/vm/code/debugInfo.cpp Thu May 15 18:23:26 2014 -0400 59.2 +++ b/src/share/vm/code/debugInfo.cpp Thu May 22 15:52:41 2014 -0400 59.3 @@ -1,5 +1,5 @@ 59.4 /* 59.5 - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. 59.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 59.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 59.8 * 59.9 * This code is free software; you can redistribute it and/or modify it 59.10 @@ -28,7 +28,9 @@ 59.11 #include "code/nmethod.hpp" 59.12 #include "runtime/handles.inline.hpp" 59.13 59.14 -// Comstructors 59.15 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 59.16 + 59.17 +// Constructors 59.18 59.19 DebugInfoWriteStream::DebugInfoWriteStream(DebugInformationRecorder* recorder, int initial_size) 59.20 : CompressedWriteStream(initial_size) {
60.1 --- a/src/share/vm/code/exceptionHandlerTable.cpp Thu May 15 18:23:26 2014 -0400 60.2 +++ b/src/share/vm/code/exceptionHandlerTable.cpp Thu May 22 15:52:41 2014 -0400 60.3 @@ -1,5 +1,5 @@ 60.4 /* 60.5 - * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved. 60.6 + * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved. 60.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 60.8 * 60.9 * This code is free software; you can redistribute it and/or modify it 60.10 @@ -27,6 +27,8 @@ 60.11 #include "code/nmethod.hpp" 60.12 #include "memory/allocation.inline.hpp" 60.13 60.14 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 60.15 + 60.16 void ExceptionHandlerTable::add_entry(HandlerTableEntry entry) { 60.17 _nesting.check(); 60.18 if (_length >= _size) {
61.1 --- a/src/share/vm/code/icBuffer.cpp Thu May 15 18:23:26 2014 -0400 61.2 +++ b/src/share/vm/code/icBuffer.cpp Thu May 22 15:52:41 2014 -0400 61.3 @@ -1,5 +1,5 @@ 61.4 /* 61.5 - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. 61.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 61.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 61.8 * 61.9 * This code is free software; you can redistribute it and/or modify it 61.10 @@ -39,6 +39,7 @@ 61.11 #include "runtime/mutexLocker.hpp" 61.12 #include "runtime/stubRoutines.hpp" 61.13 61.14 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 61.15 61.16 DEF_STUB_INTERFACE(ICStub); 61.17
62.1 --- a/src/share/vm/code/nmethod.cpp Thu May 15 18:23:26 2014 -0400 62.2 +++ b/src/share/vm/code/nmethod.cpp Thu May 22 15:52:41 2014 -0400 62.3 @@ -1,5 +1,5 @@ 62.4 /* 62.5 - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 62.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 62.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 62.8 * 62.9 * This code is free software; you can redistribute it and/or modify it 62.10 @@ -46,6 +46,8 @@ 62.11 #include "shark/sharkCompiler.hpp" 62.12 #endif 62.13 62.14 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 62.15 + 62.16 #ifdef DTRACE_ENABLED 62.17 62.18 // Only bother with this argument setup if dtrace is available
63.1 --- a/src/share/vm/code/pcDesc.cpp Thu May 15 18:23:26 2014 -0400 63.2 +++ b/src/share/vm/code/pcDesc.cpp Thu May 22 15:52:41 2014 -0400 63.3 @@ -1,5 +1,5 @@ 63.4 /* 63.5 - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. 63.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 63.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 63.8 * 63.9 * This code is free software; you can redistribute it and/or modify it 63.10 @@ -29,6 +29,8 @@ 63.11 #include "code/scopeDesc.hpp" 63.12 #include "memory/resourceArea.hpp" 63.13 63.14 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 63.15 + 63.16 PcDesc::PcDesc(int pc_offset, int scope_decode_offset, int obj_decode_offset) { 63.17 _pc_offset = pc_offset; 63.18 _scope_decode_offset = scope_decode_offset;
64.1 --- a/src/share/vm/code/relocInfo.cpp Thu May 15 18:23:26 2014 -0400 64.2 +++ b/src/share/vm/code/relocInfo.cpp Thu May 22 15:52:41 2014 -0400 64.3 @@ -1,5 +1,5 @@ 64.4 /* 64.5 - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 64.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 64.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 64.8 * 64.9 * This code is free software; you can redistribute it and/or modify it 64.10 @@ -31,6 +31,7 @@ 64.11 #include "runtime/stubCodeGenerator.hpp" 64.12 #include "utilities/copy.hpp" 64.13 64.14 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 64.15 64.16 const RelocationHolder RelocationHolder::none; // its type is relocInfo::none 64.17
65.1 --- a/src/share/vm/code/scopeDesc.cpp Thu May 15 18:23:26 2014 -0400 65.2 +++ b/src/share/vm/code/scopeDesc.cpp Thu May 22 15:52:41 2014 -0400 65.3 @@ -1,5 +1,5 @@ 65.4 /* 65.5 - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. 65.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 65.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 65.8 * 65.9 * This code is free software; you can redistribute it and/or modify it 65.10 @@ -30,6 +30,7 @@ 65.11 #include "oops/oop.inline.hpp" 65.12 #include "runtime/handles.inline.hpp" 65.13 65.14 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 65.15 65.16 ScopeDesc::ScopeDesc(const nmethod* code, int decode_offset, int obj_decode_offset, bool reexecute, bool return_oop) { 65.17 _code = code;
66.1 --- a/src/share/vm/code/vtableStubs.cpp Thu May 15 18:23:26 2014 -0400 66.2 +++ b/src/share/vm/code/vtableStubs.cpp Thu May 22 15:52:41 2014 -0400 66.3 @@ -1,5 +1,5 @@ 66.4 /* 66.5 - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 66.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 66.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 66.8 * 66.9 * This code is free software; you can redistribute it and/or modify it 66.10 @@ -39,6 +39,8 @@ 66.11 #include "opto/matcher.hpp" 66.12 #endif 66.13 66.14 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 66.15 + 66.16 // ----------------------------------------------------------------------------------------- 66.17 // Implementation of VtableStub 66.18
67.1 --- a/src/share/vm/compiler/compileBroker.cpp Thu May 15 18:23:26 2014 -0400 67.2 +++ b/src/share/vm/compiler/compileBroker.cpp Thu May 22 15:52:41 2014 -0400 67.3 @@ -1,5 +1,5 @@ 67.4 /* 67.5 - * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. 67.6 + * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved. 67.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 67.8 * 67.9 * This code is free software; you can redistribute it and/or modify it 67.10 @@ -206,7 +206,7 @@ 67.11 void log_nmethod(JavaThread* thread, nmethod* nm) { 67.12 log(thread, "nmethod %d%s " INTPTR_FORMAT " code ["INTPTR_FORMAT ", " INTPTR_FORMAT "]", 67.13 nm->compile_id(), nm->is_osr_method() ? "%" : "", 67.14 - nm, nm->code_begin(), nm->code_end()); 67.15 + p2i(nm), p2i(nm->code_begin()), p2i(nm->code_end())); 67.16 } 67.17 67.18 void log_failure(JavaThread* thread, CompileTask* task, const char* reason, const char* retry_message) { 67.19 @@ -1791,7 +1791,7 @@ 67.20 if (xtty != NULL) { 67.21 ttyLocker ttyl; 67.22 // Record any per thread log files 67.23 - xtty->elem("thread_logfile thread='%d' filename='%s'", thread_id, file_name); 67.24 + xtty->elem("thread_logfile thread='" INTX_FORMAT "' filename='%s'", thread_id, file_name); 67.25 } 67.26 return; 67.27 } 67.28 @@ -1822,7 +1822,7 @@ 67.29 if (_should_block) { 67.30 #ifndef PRODUCT 67.31 if (PrintCompilation && (Verbose || WizardMode)) 67.32 - tty->print_cr("compiler thread " INTPTR_FORMAT " poll detects block request", Thread::current()); 67.33 + tty->print_cr("compiler thread " INTPTR_FORMAT " poll detects block request", p2i(Thread::current())); 67.34 #endif 67.35 ThreadInVMfromNative tivfn(JavaThread::current()); 67.36 } 67.37 @@ -1839,7 +1839,7 @@ 67.38 CodeCache::print_summary(&s, detailed); 67.39 } 67.40 ttyLocker ttyl; 67.41 - tty->print(s.as_string()); 67.42 + tty->print("%s", s.as_string()); 67.43 } 67.44 67.45 // ------------------------------------------------------------------ 67.46 @@ -2044,7 +2044,7 @@ 67.47 // Lock to prevent tearing 67.48 ttyLocker ttyl; 67.49 xtty->begin_elem("code_cache_full"); 67.50 - xtty->print(s.as_string()); 67.51 + xtty->print("%s", s.as_string()); 67.52 xtty->stamp(); 67.53 xtty->end_elem(); 67.54 }
68.1 --- a/src/share/vm/compiler/compileLog.cpp Thu May 15 18:23:26 2014 -0400 68.2 +++ b/src/share/vm/compiler/compileLog.cpp Thu May 22 15:52:41 2014 -0400 68.3 @@ -1,5 +1,5 @@ 68.4 /* 68.5 - * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved. 68.6 + * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved. 68.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 68.8 * 68.9 * This code is free software; you can redistribute it and/or modify it 68.10 @@ -294,7 +294,7 @@ 68.11 // Print about successful method inlining. 68.12 void CompileLog::inline_success(const char* reason) { 68.13 begin_elem("inline_success reason='"); 68.14 - text(reason); 68.15 + text("%s", reason); 68.16 end_elem("'"); 68.17 } 68.18 68.19 @@ -304,7 +304,7 @@ 68.20 // Print about failed method inlining. 68.21 void CompileLog::inline_fail(const char* reason) { 68.22 begin_elem("inline_fail reason='"); 68.23 - text(reason); 68.24 + text("%s", reason); 68.25 end_elem("'"); 68.26 } 68.27 68.28 @@ -330,5 +330,5 @@ 68.29 void CompileLog::code_cache_state() { 68.30 begin_elem("code_cache"); 68.31 CodeCache::log_state(this); 68.32 - end_elem(""); 68.33 + end_elem("%s", ""); 68.34 }
69.1 --- a/src/share/vm/compiler/compileLog.hpp Thu May 15 18:23:26 2014 -0400 69.2 +++ b/src/share/vm/compiler/compileLog.hpp Thu May 22 15:52:41 2014 -0400 69.3 @@ -1,5 +1,5 @@ 69.4 /* 69.5 - * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved. 69.6 + * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved. 69.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 69.8 * 69.9 * This code is free software; you can redistribute it and/or modify it 69.10 @@ -54,7 +54,7 @@ 69.11 69.12 static CompileLog* _first; // head of static chain 69.13 69.14 - void va_tag(bool push, const char* format, va_list ap); 69.15 + void va_tag(bool push, const char* format, va_list ap) ATTRIBUTE_PRINTF(3, 0); 69.16 69.17 public: 69.18 CompileLog(const char* file_name, FILE* fp, intx thread_id); 69.19 @@ -68,7 +68,7 @@ 69.20 // or reset, context string will be silently ignored 69.21 stringStream* context() { return &_context; } 69.22 void clear_context() { context()->reset(); } 69.23 - void set_context(const char* format, ...); 69.24 + void set_context(const char* format, ...) ATTRIBUTE_PRINTF(2, 3); 69.25 69.26 void name(ciSymbol* s); // name='s' 69.27 void name(Symbol* s) { xmlStream::name(s); }
70.1 --- a/src/share/vm/compiler/compilerOracle.cpp Thu May 15 18:23:26 2014 -0400 70.2 +++ b/src/share/vm/compiler/compilerOracle.cpp Thu May 22 15:52:41 2014 -0400 70.3 @@ -1,5 +1,5 @@ 70.4 /* 70.5 - * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. 70.6 + * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved. 70.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 70.8 * 70.9 * This code is free software; you can redistribute it and/or modify it 70.10 @@ -539,7 +539,7 @@ 70.11 tty->print_cr("CompilerOracle: unrecognized line"); 70.12 tty->print_cr(" \"%s\"", original_line); 70.13 if (error_msg != NULL) { 70.14 - tty->print_cr(error_msg); 70.15 + tty->print_cr("%s", error_msg); 70.16 } 70.17 } 70.18 } 70.19 @@ -661,7 +661,7 @@ 70.20 char method_sep = have_colon ? ':' : '.'; 70.21 70.22 if (Verbose) { 70.23 - tty->print_cr(line); 70.24 + tty->print_cr("%s", line); 70.25 } 70.26 70.27 ResourceMark rm;
71.1 --- a/src/share/vm/compiler/disassembler.cpp Thu May 15 18:23:26 2014 -0400 71.2 +++ b/src/share/vm/compiler/disassembler.cpp Thu May 22 15:52:41 2014 -0400 71.3 @@ -1,5 +1,5 @@ 71.4 /* 71.5 - * Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved. 71.6 + * Copyright (c) 2008, 2014, Oracle and/or its affiliates. All rights reserved. 71.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 71.8 * 71.9 * This code is free software; you can redistribute it and/or modify it 71.10 @@ -51,6 +51,8 @@ 71.11 #include "shark/sharkEntry.hpp" 71.12 #endif 71.13 71.14 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 71.15 + 71.16 void* Disassembler::_library = NULL; 71.17 bool Disassembler::_tried_to_load_library = false; 71.18 71.19 @@ -411,6 +413,7 @@ 71.20 return env->handle_event(event, (address) arg); 71.21 } 71.22 71.23 +ATTRIBUTE_PRINTF(2, 3) 71.24 static int printf_to_env(void* env_pv, const char* format, ...) { 71.25 decode_env* env = (decode_env*) env_pv; 71.26 outputStream* st = env->output();
72.1 --- a/src/share/vm/compiler/methodLiveness.cpp Thu May 15 18:23:26 2014 -0400 72.2 +++ b/src/share/vm/compiler/methodLiveness.cpp Thu May 22 15:52:41 2014 -0400 72.3 @@ -1,5 +1,5 @@ 72.4 /* 72.5 - * Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved. 72.6 + * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved. 72.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 72.8 * 72.9 * This code is free software; you can redistribute it and/or modify it 72.10 @@ -32,6 +32,8 @@ 72.11 #include "memory/allocation.inline.hpp" 72.12 #include "utilities/bitMap.inline.hpp" 72.13 72.14 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 72.15 + 72.16 // The MethodLiveness class performs a simple liveness analysis on a method 72.17 // in order to decide which locals are live (that is, will be used again) at 72.18 // a particular bytecode index (bci).
73.1 --- a/src/share/vm/compiler/oopMap.cpp Thu May 15 18:23:26 2014 -0400 73.2 +++ b/src/share/vm/compiler/oopMap.cpp Thu May 22 15:52:41 2014 -0400 73.3 @@ -1,5 +1,5 @@ 73.4 /* 73.5 - * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. 73.6 + * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved. 73.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 73.8 * 73.9 * This code is free software; you can redistribute it and/or modify it 73.10 @@ -646,8 +646,8 @@ 73.11 tty->print_cr( 73.12 "Add derived pointer@" INTPTR_FORMAT 73.13 " - Derived: " INTPTR_FORMAT 73.14 - " Base: " INTPTR_FORMAT " (@" INTPTR_FORMAT ") (Offset: %d)", 73.15 - derived_loc, (address)*derived_loc, (address)*base_loc, base_loc, offset 73.16 + " Base: " INTPTR_FORMAT " (@" INTPTR_FORMAT ") (Offset: " INTX_FORMAT ")", 73.17 + p2i(derived_loc), p2i((address)*derived_loc), p2i((address)*base_loc), p2i(base_loc), offset 73.18 ); 73.19 } 73.20 // Set derived oop location to point to base. 73.21 @@ -674,8 +674,8 @@ 73.22 73.23 if (TraceDerivedPointers) { 73.24 tty->print_cr("Updating derived pointer@" INTPTR_FORMAT 73.25 - " - Derived: " INTPTR_FORMAT " Base: " INTPTR_FORMAT " (Offset: %d)", 73.26 - derived_loc, (address)*derived_loc, (address)base, offset); 73.27 + " - Derived: " INTPTR_FORMAT " Base: " INTPTR_FORMAT " (Offset: " INTX_FORMAT ")", 73.28 + p2i(derived_loc), p2i((address)*derived_loc), p2i((address)base), offset); 73.29 } 73.30 73.31 // Delete entry
74.1 --- a/src/share/vm/gc_implementation/concurrentMarkSweep/adaptiveFreeList.cpp Thu May 15 18:23:26 2014 -0400 74.2 +++ b/src/share/vm/gc_implementation/concurrentMarkSweep/adaptiveFreeList.cpp Thu May 22 15:52:41 2014 -0400 74.3 @@ -1,5 +1,5 @@ 74.4 /* 74.5 - * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. 74.6 + * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved. 74.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 74.8 * 74.9 * This code is free software; you can redistribute it and/or modify it 74.10 @@ -157,7 +157,7 @@ 74.11 " split_deaths(" SIZE_FORMAT ")" 74.12 " coal_deaths(" SIZE_FORMAT ")" 74.13 " + count(" SSIZE_FORMAT ")", 74.14 - this, size(), _allocation_stats.prev_sweep(), _allocation_stats.split_births(), 74.15 + p2i(this), size(), _allocation_stats.prev_sweep(), _allocation_stats.split_births(), 74.16 _allocation_stats.split_births(), _allocation_stats.split_deaths(), 74.17 _allocation_stats.coal_deaths(), count())); 74.18 }
75.1 --- a/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp Thu May 15 18:23:26 2014 -0400 75.2 +++ b/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp Thu May 22 15:52:41 2014 -0400 75.3 @@ -1,5 +1,5 @@ 75.4 /* 75.5 - * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. 75.6 + * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved. 75.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 75.8 * 75.9 * This code is free software; you can redistribute it and/or modify it 75.10 @@ -427,7 +427,7 @@ 75.11 void LinearAllocBlock::print_on(outputStream* st) const { 75.12 st->print_cr(" LinearAllocBlock: ptr = " PTR_FORMAT ", word_size = " SIZE_FORMAT 75.13 ", refillsize = " SIZE_FORMAT ", allocation_size_limit = " SIZE_FORMAT, 75.14 - _ptr, _word_size, _refillSize, _allocation_size_limit); 75.15 + p2i(_ptr), _word_size, _refillSize, _allocation_size_limit); 75.16 } 75.17 75.18 void CompactibleFreeListSpace::print_on(outputStream* st) const { 75.19 @@ -458,7 +458,7 @@ 75.20 for (FreeChunk* fc = _indexedFreeList[i].head(); fc != NULL; 75.21 fc = fc->next()) { 75.22 gclog_or_tty->print_cr("\t[" PTR_FORMAT "," PTR_FORMAT ") %s", 75.23 - fc, (HeapWord*)fc + i, 75.24 + p2i(fc), p2i((HeapWord*)fc + i), 75.25 fc->cantCoalesce() ? "\t CC" : ""); 75.26 } 75.27 } 75.28 @@ -502,7 +502,7 @@ 75.29 if (_sp->block_is_obj(addr)) { 75.30 const bool dead = _post_remark && !_live_bit_map->isMarked(addr); 75.31 _st->print_cr(PTR_FORMAT ": %s object of size " SIZE_FORMAT "%s", 75.32 - addr, 75.33 + p2i(addr), 75.34 dead ? "dead" : "live", 75.35 sz, 75.36 (!dead && CMSPrintObjectsInDump) ? ":" : "."); 75.37 @@ -512,7 +512,7 @@ 75.38 } 75.39 } else { // free block 75.40 _st->print_cr(PTR_FORMAT ": free block of size " SIZE_FORMAT "%s", 75.41 - addr, sz, CMSPrintChunksInDump ? ":" : "."); 75.42 + p2i(addr), sz, CMSPrintChunksInDump ? ":" : "."); 75.43 if (CMSPrintChunksInDump) { 75.44 ((FreeChunk*)addr)->print_on(_st); 75.45 _st->print_cr("--------------------------------------"); 75.46 @@ -564,11 +564,11 @@ 75.47 "--------------------------------\n"); 75.48 size_t total_size = totalSizeInIndexedFreeLists(); 75.49 size_t free_blocks = numFreeBlocksInIndexedFreeLists(); 75.50 - gclog_or_tty->print("Total Free Space: %d\n", total_size); 75.51 - gclog_or_tty->print("Max Chunk Size: %d\n", maxChunkSizeInIndexedFreeLists()); 75.52 - gclog_or_tty->print("Number of Blocks: %d\n", free_blocks); 75.53 + gclog_or_tty->print("Total Free Space: " SIZE_FORMAT "\n", total_size); 75.54 + gclog_or_tty->print("Max Chunk Size: " SIZE_FORMAT "\n", maxChunkSizeInIndexedFreeLists()); 75.55 + gclog_or_tty->print("Number of Blocks: " SIZE_FORMAT "\n", free_blocks); 75.56 if (free_blocks != 0) { 75.57 - gclog_or_tty->print("Av. Block Size: %d\n", total_size/free_blocks); 75.58 + gclog_or_tty->print("Av. Block Size: " SIZE_FORMAT "\n", total_size/free_blocks); 75.59 } 75.60 } 75.61 75.62 @@ -2011,7 +2011,7 @@ 75.63 assert(ur.contains(urasm), 75.64 err_msg(" Error at save_marks(): [" PTR_FORMAT "," PTR_FORMAT ")" 75.65 " should contain [" PTR_FORMAT "," PTR_FORMAT ")", 75.66 - ur.start(), ur.end(), urasm.start(), urasm.end())); 75.67 + p2i(ur.start()), p2i(ur.end()), p2i(urasm.start()), p2i(urasm.end()))); 75.68 #endif 75.69 // inform allocator that promotions should be tracked. 75.70 assert(_promoInfo.noPromotions(), "_promoInfo inconsistency"); 75.71 @@ -2181,7 +2181,7 @@ 75.72 for (i = IndexSetStart; i < IndexSetSize; i += IndexSetStride) { 75.73 AdaptiveFreeList<FreeChunk>* fl = &_indexedFreeList[i]; 75.74 if (PrintFLSStatistics > 1) { 75.75 - gclog_or_tty->print("size[%d] : ", i); 75.76 + gclog_or_tty->print("size[" SIZE_FORMAT "] : ", i); 75.77 } 75.78 fl->compute_desired(inter_sweep_current, inter_sweep_estimate, intra_sweep_estimate); 75.79 fl->set_coal_desired((ssize_t)((double)fl->desired() * CMSSmallCoalSurplusPercent)); 75.80 @@ -2234,7 +2234,7 @@ 75.81 if (PrintFLSStatistics > 0) { 75.82 HeapWord* largestAddr = (HeapWord*) dictionary()->find_largest_dict(); 75.83 gclog_or_tty->print_cr("CMS: Large block " PTR_FORMAT, 75.84 - largestAddr); 75.85 + p2i(largestAddr)); 75.86 } 75.87 setFLSurplus(); 75.88 setFLHints(); 75.89 @@ -2383,8 +2383,8 @@ 75.90 gclog_or_tty->print_cr( 75.91 " Current: addr = " PTR_FORMAT ", size = " SIZE_FORMAT ", obj = %s, live = %s \n" 75.92 " Previous: addr = " PTR_FORMAT ", size = " SIZE_FORMAT ", obj = %s, live = %s \n", 75.93 - addr, res, was_obj ?"true":"false", was_live ?"true":"false", 75.94 - _last_addr, _last_size, _last_was_obj?"true":"false", _last_was_live?"true":"false"); 75.95 + p2i(addr), res, was_obj ?"true":"false", was_live ?"true":"false", 75.96 + p2i(_last_addr), _last_size, _last_was_obj?"true":"false", _last_was_live?"true":"false"); 75.97 _sp->print_on(gclog_or_tty); 75.98 guarantee(false, "Seppuku!"); 75.99 } 75.100 @@ -2712,7 +2712,7 @@ 75.101 _global_num_workers[i] = 0; 75.102 _global_num_blocks[i] = 0; 75.103 if (PrintOldPLAB) { 75.104 - gclog_or_tty->print_cr("[%d]: %d", i, (size_t)_blocks_to_claim[i].average()); 75.105 + gclog_or_tty->print_cr("[" SIZE_FORMAT "]: " SIZE_FORMAT, i, (size_t)_blocks_to_claim[i].average()); 75.106 } 75.107 } 75.108 } 75.109 @@ -2751,7 +2751,7 @@ 75.110 } 75.111 } 75.112 if (PrintOldPLAB) { 75.113 - gclog_or_tty->print_cr("%d[%d]: %d/%d/%d", 75.114 + gclog_or_tty->print_cr("%d[" SIZE_FORMAT "]: " SIZE_FORMAT "/" SIZE_FORMAT "/" SIZE_FORMAT, 75.115 tid, i, num_retire, _num_blocks[i], (size_t)_blocks_to_claim[i].average()); 75.116 } 75.117 // Reset stats for next round
76.1 --- a/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.hpp Thu May 15 18:23:26 2014 -0400 76.2 +++ b/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.hpp Thu May 22 15:52:41 2014 -0400 76.3 @@ -1,5 +1,5 @@ 76.4 /* 76.5 - * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. 76.6 + * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved. 76.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 76.8 * 76.9 * This code is free software; you can redistribute it and/or modify it 76.10 @@ -404,7 +404,7 @@ 76.11 if (CMSTraceSweeper) { 76.12 gclog_or_tty->print_cr(">>>>> Saving sweep limit " PTR_FORMAT 76.13 " for space [" PTR_FORMAT "," PTR_FORMAT ") <<<<<<", 76.14 - _sweep_limit, bottom(), end()); 76.15 + p2i(_sweep_limit), p2i(bottom()), p2i(end())); 76.16 } 76.17 } 76.18 NOT_PRODUCT(
77.1 --- a/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp Thu May 15 18:23:26 2014 -0400 77.2 +++ b/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp Thu May 22 15:52:41 2014 -0400 77.3 @@ -1,5 +1,5 @@ 77.4 /* 77.5 - * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. 77.6 + * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved. 77.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 77.8 * 77.9 * This code is free software; you can redistribute it and/or modify it 77.10 @@ -63,6 +63,8 @@ 77.11 #include "services/memoryService.hpp" 77.12 #include "services/runtimeService.hpp" 77.13 77.14 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 77.15 + 77.16 // statics 77.17 CMSCollector* ConcurrentMarkSweepGeneration::_collector = NULL; 77.18 bool CMSCollector::_full_gc_requested = false; 77.19 @@ -1181,7 +1183,7 @@ 77.20 gclog_or_tty->print(" icms alloc limits: " 77.21 PTR_FORMAT "," PTR_FORMAT 77.22 " (" SIZE_FORMAT "%%," SIZE_FORMAT "%%) ", 77.23 - _icms_start_limit, _icms_stop_limit, 77.24 + p2i(_icms_start_limit), p2i(_icms_stop_limit), 77.25 percent_of_space(eden, _icms_start_limit), 77.26 percent_of_space(eden, _icms_stop_limit)); 77.27 if (Verbose) { 77.28 @@ -1209,7 +1211,7 @@ 77.29 gclog_or_tty->print_cr(" start limit top=" PTR_FORMAT 77.30 ", new limit=" PTR_FORMAT 77.31 " (" SIZE_FORMAT "%%)", 77.32 - top, _icms_stop_limit, 77.33 + p2i(top), p2i(_icms_stop_limit), 77.34 percent_of_space(space, _icms_stop_limit)); 77.35 } 77.36 ConcurrentMarkSweepThread::start_icms(); 77.37 @@ -1226,7 +1228,7 @@ 77.38 gclog_or_tty->print_cr(" +stop limit top=" PTR_FORMAT 77.39 ", new limit=" PTR_FORMAT 77.40 " (" SIZE_FORMAT "%%)", 77.41 - top, space->end(), 77.42 + p2i(top), p2i(space->end()), 77.43 percent_of_space(space, space->end())); 77.44 } 77.45 ConcurrentMarkSweepThread::stop_icms(); 77.46 @@ -1501,7 +1503,7 @@ 77.47 if (PrintCMSInitiationStatistics && stats().valid()) { 77.48 gclog_or_tty->print("CMSCollector shouldConcurrentCollect: "); 77.49 gclog_or_tty->stamp(); 77.50 - gclog_or_tty->print_cr(""); 77.51 + gclog_or_tty->cr(); 77.52 stats().print_on(gclog_or_tty); 77.53 gclog_or_tty->print_cr("time_until_cms_gen_full %3.7f", 77.54 stats().time_until_cms_gen_full()); 77.55 @@ -3577,7 +3579,7 @@ 77.56 _collector->cmsGen()->short_name(), 77.57 _phase, _collector->timerValue(), _wallclock.seconds()); 77.58 if (_print_cr) { 77.59 - gclog_or_tty->print_cr(""); 77.60 + gclog_or_tty->cr(); 77.61 } 77.62 if (PrintCMSStatistics != 0) { 77.63 gclog_or_tty->print_cr(" (CMS-concurrent-%s yielded %d times)", _phase,
78.1 --- a/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepThread.cpp Thu May 15 18:23:26 2014 -0400 78.2 +++ b/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepThread.cpp Thu May 22 15:52:41 2014 -0400 78.3 @@ -1,5 +1,5 @@ 78.4 /* 78.5 - * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. 78.6 + * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved. 78.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 78.8 * 78.9 * This code is free software; you can redistribute it and/or modify it 78.10 @@ -111,7 +111,7 @@ 78.11 // From this time Thread::current() should be working. 78.12 assert(this == Thread::current(), "just checking"); 78.13 if (BindCMSThreadToCPU && !os::bind_to_processor(CPUForCMSThread)) { 78.14 - warning("Couldn't bind CMS thread to processor %u", CPUForCMSThread); 78.15 + warning("Couldn't bind CMS thread to processor " UINTX_FORMAT, CPUForCMSThread); 78.16 } 78.17 // Wait until Universe::is_fully_initialized() 78.18 {
79.1 --- a/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepThread.hpp Thu May 15 18:23:26 2014 -0400 79.2 +++ b/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepThread.hpp Thu May 22 15:52:41 2014 -0400 79.3 @@ -1,5 +1,5 @@ 79.4 /* 79.5 - * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. 79.6 + * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved. 79.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 79.8 * 79.9 * This code is free software; you can redistribute it and/or modify it 79.10 @@ -241,7 +241,7 @@ 79.11 jio_snprintf(buf, sizeof(buf), " [%.3f: CMSThread %s] ", 79.12 ts.seconds(), desc); 79.13 buf[sizeof(buf) - 1] = '\0'; 79.14 - gclog_or_tty->print(buf); 79.15 + gclog_or_tty->print("%s", buf); 79.16 } 79.17 } 79.18 79.19 @@ -273,7 +273,7 @@ 79.20 inline void tick() { 79.21 _ticks++; 79.22 if (CMSLoopWarn && _ticks % _threshold == 0) { 79.23 - warning("%s has looped %d times %s", _src, _ticks, _msg); 79.24 + warning("%s has looped " INTX_FORMAT " times %s", _src, _ticks, _msg); 79.25 } 79.26 } 79.27 };
80.1 --- a/src/share/vm/gc_implementation/concurrentMarkSweep/freeChunk.cpp Thu May 15 18:23:26 2014 -0400 80.2 +++ b/src/share/vm/gc_implementation/concurrentMarkSweep/freeChunk.cpp Thu May 22 15:52:41 2014 -0400 80.3 @@ -1,5 +1,5 @@ 80.4 /* 80.5 - * Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved. 80.6 + * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved. 80.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 80.8 * 80.9 * This code is free software; you can redistribute it and/or modify it 80.10 @@ -27,6 +27,8 @@ 80.11 #include "memory/freeBlockDictionary.hpp" 80.12 #include "utilities/copy.hpp" 80.13 80.14 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 80.15 + 80.16 #ifndef PRODUCT 80.17 80.18 #define baadbabeHeapWord badHeapWordVal
81.1 --- a/src/share/vm/gc_implementation/concurrentMarkSweep/promotionInfo.cpp Thu May 15 18:23:26 2014 -0400 81.2 +++ b/src/share/vm/gc_implementation/concurrentMarkSweep/promotionInfo.cpp Thu May 22 15:52:41 2014 -0400 81.3 @@ -1,5 +1,5 @@ 81.4 /* 81.5 - * Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved. 81.6 + * Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved. 81.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 81.8 * 81.9 * This code is free software; you can redistribute it and/or modify it 81.10 @@ -28,6 +28,8 @@ 81.11 #include "oops/markOop.inline.hpp" 81.12 #include "oops/oop.inline.hpp" 81.13 81.14 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 81.15 + 81.16 ///////////////////////////////////////////////////////////////////////// 81.17 //// PromotionInfo 81.18 /////////////////////////////////////////////////////////////////////////
82.1 --- a/src/share/vm/gc_implementation/concurrentMarkSweep/vmCMSOperations.cpp Thu May 15 18:23:26 2014 -0400 82.2 +++ b/src/share/vm/gc_implementation/concurrentMarkSweep/vmCMSOperations.cpp Thu May 22 15:52:41 2014 -0400 82.3 @@ -1,5 +1,5 @@ 82.4 /* 82.5 - * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. 82.6 + * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved. 82.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 82.8 * 82.9 * This code is free software; you can redistribute it and/or modify it 82.10 @@ -34,6 +34,7 @@ 82.11 #include "runtime/os.hpp" 82.12 #include "utilities/dtrace.hpp" 82.13 82.14 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 82.15 82.16 #ifndef USDT2 82.17 HS_DTRACE_PROBE_DECL(hs_private, cms__initmark__begin);
83.1 --- a/src/share/vm/gc_implementation/g1/concurrentMark.cpp Thu May 15 18:23:26 2014 -0400 83.2 +++ b/src/share/vm/gc_implementation/g1/concurrentMark.cpp Thu May 22 15:52:41 2014 -0400 83.3 @@ -1,5 +1,5 @@ 83.4 /* 83.5 - * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. 83.6 + * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved. 83.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 83.8 * 83.9 * This code is free software; you can redistribute it and/or modify it 83.10 @@ -537,7 +537,7 @@ 83.11 83.12 if (verbose_low()) { 83.13 gclog_or_tty->print_cr("[global] init, heap start = "PTR_FORMAT", " 83.14 - "heap end = "PTR_FORMAT, _heap_start, _heap_end); 83.15 + "heap end = " INTPTR_FORMAT, p2i(_heap_start), p2i(_heap_end)); 83.16 } 83.17 83.18 if (!_markBitMap1.allocate(heap_rs)) { 83.19 @@ -567,8 +567,8 @@ 83.20 _root_regions.init(_g1h, this); 83.21 83.22 if (ConcGCThreads > ParallelGCThreads) { 83.23 - warning("Can't have more ConcGCThreads (" UINT32_FORMAT ") " 83.24 - "than ParallelGCThreads (" UINT32_FORMAT ").", 83.25 + warning("Can't have more ConcGCThreads (" UINTX_FORMAT ") " 83.26 + "than ParallelGCThreads (" UINTX_FORMAT ").", 83.27 ConcGCThreads, ParallelGCThreads); 83.28 return; 83.29 } 83.30 @@ -651,7 +651,7 @@ 83.31 if (!(mark_stack_size >= 1 && mark_stack_size <= MarkStackSizeMax)) { 83.32 warning("Invalid value calculated for MarkStackSize (" UINTX_FORMAT "): " 83.33 "must be between " UINTX_FORMAT " and " UINTX_FORMAT, 83.34 - mark_stack_size, 1, MarkStackSizeMax); 83.35 + mark_stack_size, (uintx) 1, MarkStackSizeMax); 83.36 return; 83.37 } 83.38 FLAG_SET_ERGO(uintx, MarkStackSize, mark_stack_size); 83.39 @@ -662,7 +662,7 @@ 83.40 if (!(MarkStackSize >= 1 && MarkStackSize <= MarkStackSizeMax)) { 83.41 warning("Invalid value specified for MarkStackSize (" UINTX_FORMAT "): " 83.42 "must be between " UINTX_FORMAT " and " UINTX_FORMAT, 83.43 - MarkStackSize, 1, MarkStackSizeMax); 83.44 + MarkStackSize, (uintx) 1, MarkStackSizeMax); 83.45 return; 83.46 } 83.47 } else if (FLAG_IS_CMDLINE(MarkStackSizeMax)) { 83.48 @@ -821,7 +821,7 @@ 83.49 assert(!concurrent_marking_in_progress(), "invariant"); 83.50 assert(_finger == _heap_end, 83.51 err_msg("only way to get here: _finger: "PTR_FORMAT", _heap_end: "PTR_FORMAT, 83.52 - _finger, _heap_end)); 83.53 + p2i(_finger), p2i(_heap_end))); 83.54 update_g1_committed(true); 83.55 } 83.56 } 83.57 @@ -1422,7 +1422,7 @@ 83.58 assert(start <= hr->end() && start <= ntams && ntams <= hr->end(), 83.59 err_msg("Preconditions not met - " 83.60 "start: "PTR_FORMAT", ntams: "PTR_FORMAT", end: "PTR_FORMAT, 83.61 - start, ntams, hr->end())); 83.62 + p2i(start), p2i(ntams), p2i(hr->end()))); 83.63 83.64 // Find the first marked object at or after "start". 83.65 start = _bm->getNextMarkedWordAddress(start, ntams); 83.66 @@ -1607,7 +1607,7 @@ 83.67 if (failures > 0 && _verbose) { 83.68 gclog_or_tty->print_cr("Region " HR_FORMAT ", ntams: " PTR_FORMAT ", " 83.69 "marked_bytes: calc/actual " SIZE_FORMAT "/" SIZE_FORMAT, 83.70 - HR_FORMAT_PARAMS(hr), hr->next_top_at_mark_start(), 83.71 + HR_FORMAT_PARAMS(hr), p2i(hr->next_top_at_mark_start()), 83.72 _calc_cl.region_marked_bytes(), hr->next_marked_bytes()); 83.73 } 83.74 83.75 @@ -2237,7 +2237,7 @@ 83.76 if (_cm->verbose_high()) { 83.77 gclog_or_tty->print_cr("\t[%u] we're looking at location " 83.78 "*"PTR_FORMAT" = "PTR_FORMAT, 83.79 - _task->worker_id(), p, (void*) obj); 83.80 + _task->worker_id(), p2i(p), p2i((void*) obj)); 83.81 } 83.82 83.83 _task->deal_with_reference(obj); 83.84 @@ -2672,7 +2672,7 @@ 83.85 } 83.86 83.87 _out->print_cr(" "PTR_FORMAT": "PTR_FORMAT"%s%s", 83.88 - p, (void*) obj, str, str2); 83.89 + p2i(p), p2i((void*) obj), str, str2); 83.90 } 83.91 }; 83.92 83.93 @@ -2699,7 +2699,7 @@ 83.94 83.95 if (print_it) { 83.96 _out->print_cr(" "PTR_FORMAT"%s", 83.97 - (void *)o, (over_tams) ? " >" : (marked) ? " M" : ""); 83.98 + p2i((void *)o), (over_tams) ? " >" : (marked) ? " M" : ""); 83.99 PrintReachableOopClosure oopCl(_out, _vo, _all); 83.100 o->oop_iterate_no_header(&oopCl); 83.101 } 83.102 @@ -2720,14 +2720,14 @@ 83.103 HeapWord* t = hr->top(); 83.104 HeapWord* p = _g1h->top_at_mark_start(hr, _vo); 83.105 _out->print_cr("** ["PTR_FORMAT", "PTR_FORMAT"] top: "PTR_FORMAT" " 83.106 - "TAMS: "PTR_FORMAT, b, e, t, p); 83.107 + "TAMS: " PTR_FORMAT, p2i(b), p2i(e), p2i(t), p2i(p)); 83.108 _out->cr(); 83.109 83.110 HeapWord* from = b; 83.111 HeapWord* to = t; 83.112 83.113 if (to > from) { 83.114 - _out->print_cr("Objects in ["PTR_FORMAT", "PTR_FORMAT"]", from, to); 83.115 + _out->print_cr("Objects in [" PTR_FORMAT ", " PTR_FORMAT "]", p2i(from), p2i(to)); 83.116 _out->cr(); 83.117 PrintReachableObjectClosure ocl(_out, _vo, _all, hr); 83.118 hr->object_iterate_mem_careful(MemRegion(from, to), &ocl); 83.119 @@ -2843,7 +2843,7 @@ 83.120 gclog_or_tty->print_cr("[%u] curr_region = "PTR_FORMAT" " 83.121 "["PTR_FORMAT", "PTR_FORMAT"), " 83.122 "limit = "PTR_FORMAT, 83.123 - worker_id, curr_region, bottom, end, limit); 83.124 + worker_id, p2i(curr_region), p2i(bottom), p2i(end), p2i(limit)); 83.125 } 83.126 83.127 // Is the gap between reading the finger and doing the CAS too long? 83.128 @@ -2857,13 +2857,13 @@ 83.129 83.130 if (verbose_low()) { 83.131 gclog_or_tty->print_cr("[%u] we were successful with region = " 83.132 - PTR_FORMAT, worker_id, curr_region); 83.133 + PTR_FORMAT, worker_id, p2i(curr_region)); 83.134 } 83.135 83.136 if (limit > bottom) { 83.137 if (verbose_low()) { 83.138 gclog_or_tty->print_cr("[%u] region "PTR_FORMAT" is not empty, " 83.139 - "returning it ", worker_id, curr_region); 83.140 + "returning it ", worker_id, p2i(curr_region)); 83.141 } 83.142 return curr_region; 83.143 } else { 83.144 @@ -2871,7 +2871,7 @@ 83.145 "the region limit should be at bottom"); 83.146 if (verbose_low()) { 83.147 gclog_or_tty->print_cr("[%u] region "PTR_FORMAT" is empty, " 83.148 - "returning NULL", worker_id, curr_region); 83.149 + "returning NULL", worker_id, p2i(curr_region)); 83.150 } 83.151 // we return NULL and the caller should try calling 83.152 // claim_region() again. 83.153 @@ -2883,7 +2883,7 @@ 83.154 gclog_or_tty->print_cr("[%u] somebody else moved the finger, " 83.155 "global finger = "PTR_FORMAT", " 83.156 "our finger = "PTR_FORMAT, 83.157 - worker_id, _finger, finger); 83.158 + worker_id, p2i(_finger), p2i(finger)); 83.159 } 83.160 83.161 // read it again 83.162 @@ -2922,7 +2922,7 @@ 83.163 void do_object_work(oop obj) { 83.164 guarantee(!_g1h->obj_in_cs(obj), 83.165 err_msg("obj: "PTR_FORMAT" in CSet, phase: %s, info: %d", 83.166 - (void*) obj, phase_str(), _info)); 83.167 + p2i((void*) obj), phase_str(), _info)); 83.168 } 83.169 83.170 public: 83.171 @@ -3001,7 +3001,7 @@ 83.172 HeapRegion* global_hr = _g1h->heap_region_containing_raw(global_finger); 83.173 guarantee(global_finger == global_hr->bottom(), 83.174 err_msg("global finger: "PTR_FORMAT" region: "HR_FORMAT, 83.175 - global_finger, HR_FORMAT_PARAMS(global_hr))); 83.176 + p2i(global_finger), HR_FORMAT_PARAMS(global_hr))); 83.177 } 83.178 83.179 // Verify the task fingers 83.180 @@ -3015,7 +3015,7 @@ 83.181 guarantee(task_finger == task_hr->bottom() || 83.182 !task_hr->in_collection_set(), 83.183 err_msg("task finger: "PTR_FORMAT" region: "HR_FORMAT, 83.184 - task_finger, HR_FORMAT_PARAMS(task_hr))); 83.185 + p2i(task_finger), HR_FORMAT_PARAMS(task_hr))); 83.186 } 83.187 } 83.188 } 83.189 @@ -3059,7 +3059,7 @@ 83.190 err_msg("Preconditions not met - " 83.191 "start: "PTR_FORMAT", limit: "PTR_FORMAT", " 83.192 "top: "PTR_FORMAT", end: "PTR_FORMAT, 83.193 - start, limit, hr->top(), hr->end())); 83.194 + p2i(start), p2i(limit), p2i(hr->top()), p2i(hr->end()))); 83.195 83.196 assert(hr->next_marked_bytes() == 0, "Precondition"); 83.197 83.198 @@ -3295,7 +3295,7 @@ 83.199 83.200 void ConcurrentMark::print_on_error(outputStream* st) const { 83.201 st->print_cr("Marking Bits (Prev, Next): (CMBitMap*) " PTR_FORMAT ", (CMBitMap*) " PTR_FORMAT, 83.202 - _prevMarkBitMap, _nextMarkBitMap); 83.203 + p2i(_prevMarkBitMap), p2i(_nextMarkBitMap)); 83.204 _prevMarkBitMap->print_on_error(st, " Prev Bits: "); 83.205 _nextMarkBitMap->print_on_error(st, " Next Bits: "); 83.206 } 83.207 @@ -3332,11 +3332,11 @@ 83.208 // for debugging purposes 83.209 void ConcurrentMark::print_finger() { 83.210 gclog_or_tty->print_cr("heap ["PTR_FORMAT", "PTR_FORMAT"), global finger = "PTR_FORMAT, 83.211 - _heap_start, _heap_end, _finger); 83.212 + p2i(_heap_start), p2i(_heap_end), p2i(_finger)); 83.213 for (uint i = 0; i < _max_worker_id; ++i) { 83.214 - gclog_or_tty->print(" %u: "PTR_FORMAT, i, _tasks[i]->finger()); 83.215 + gclog_or_tty->print(" %u: " PTR_FORMAT, i, p2i(_tasks[i]->finger())); 83.216 } 83.217 - gclog_or_tty->print_cr(""); 83.218 + gclog_or_tty->cr(); 83.219 } 83.220 #endif 83.221 83.222 @@ -3345,7 +3345,7 @@ 83.223 83.224 if (_cm->verbose_high()) { 83.225 gclog_or_tty->print_cr("[%u] we're scanning object "PTR_FORMAT, 83.226 - _worker_id, (void*) obj); 83.227 + _worker_id, p2i((void*) obj)); 83.228 } 83.229 83.230 size_t obj_size = obj->size(); 83.231 @@ -3425,7 +3425,7 @@ 83.232 83.233 if (_cm->verbose_low()) { 83.234 gclog_or_tty->print_cr("[%u] setting up for region "PTR_FORMAT, 83.235 - _worker_id, hr); 83.236 + _worker_id, p2i(hr)); 83.237 } 83.238 83.239 _curr_region = hr; 83.240 @@ -3442,7 +3442,7 @@ 83.241 if (_cm->verbose_low()) { 83.242 gclog_or_tty->print_cr("[%u] found an empty region " 83.243 "["PTR_FORMAT", "PTR_FORMAT")", 83.244 - _worker_id, bottom, limit); 83.245 + _worker_id, p2i(bottom), p2i(limit)); 83.246 } 83.247 // The region was collected underneath our feet. 83.248 // We set the finger to bottom to ensure that the bitmap 83.249 @@ -3474,7 +3474,7 @@ 83.250 assert(_curr_region != NULL, "invariant"); 83.251 if (_cm->verbose_low()) { 83.252 gclog_or_tty->print_cr("[%u] giving up region "PTR_FORMAT, 83.253 - _worker_id, _curr_region); 83.254 + _worker_id, p2i(_curr_region)); 83.255 } 83.256 clear_region_fields(); 83.257 } 83.258 @@ -3754,7 +3754,7 @@ 83.259 83.260 if (_task_queue->size() > target_size) { 83.261 if (_cm->verbose_high()) { 83.262 - gclog_or_tty->print_cr("[%u] draining local queue, target size = %d", 83.263 + gclog_or_tty->print_cr("[%u] draining local queue, target size = " SIZE_FORMAT, 83.264 _worker_id, target_size); 83.265 } 83.266 83.267 @@ -3765,7 +3765,7 @@ 83.268 83.269 if (_cm->verbose_high()) { 83.270 gclog_or_tty->print_cr("[%u] popped "PTR_FORMAT, _worker_id, 83.271 - (void*) obj); 83.272 + p2i((void*) obj)); 83.273 } 83.274 83.275 assert(_g1h->is_in_g1_reserved((HeapWord*) obj), "invariant" ); 83.276 @@ -3810,7 +3810,7 @@ 83.277 83.278 if (_cm->mark_stack_size() > target_size) { 83.279 if (_cm->verbose_low()) { 83.280 - gclog_or_tty->print_cr("[%u] draining global_stack, target size %d", 83.281 + gclog_or_tty->print_cr("[%u] draining global_stack, target size " SIZE_FORMAT, 83.282 _worker_id, target_size); 83.283 } 83.284 83.285 @@ -3820,7 +3820,7 @@ 83.286 } 83.287 83.288 if (_cm->verbose_low()) { 83.289 - gclog_or_tty->print_cr("[%u] drained global stack, size = %d", 83.290 + gclog_or_tty->print_cr("[%u] drained global stack, size = " SIZE_FORMAT, 83.291 _worker_id, _cm->mark_stack_size()); 83.292 } 83.293 } 83.294 @@ -4150,7 +4150,7 @@ 83.295 gclog_or_tty->print_cr("[%u] we're scanning part " 83.296 "["PTR_FORMAT", "PTR_FORMAT") " 83.297 "of region "HR_FORMAT, 83.298 - _worker_id, _finger, _region_limit, 83.299 + _worker_id, p2i(_finger), p2i(_region_limit), 83.300 HR_FORMAT_PARAMS(_curr_region)); 83.301 } 83.302 83.303 @@ -4237,7 +4237,7 @@ 83.304 if (_cm->verbose_low()) { 83.305 gclog_or_tty->print_cr("[%u] we successfully claimed " 83.306 "region "PTR_FORMAT, 83.307 - _worker_id, claimed_region); 83.308 + _worker_id, p2i(claimed_region)); 83.309 } 83.310 83.311 setup_for_region(claimed_region); 83.312 @@ -4298,7 +4298,7 @@ 83.313 if (_cm->try_stealing(_worker_id, &_hash_seed, obj)) { 83.314 if (_cm->verbose_medium()) { 83.315 gclog_or_tty->print_cr("[%u] stolen "PTR_FORMAT" successfully", 83.316 - _worker_id, (void*) obj); 83.317 + _worker_id, p2i((void*) obj)); 83.318 } 83.319 83.320 statsOnly( ++_steals ); 83.321 @@ -4546,8 +4546,8 @@ 83.322 G1PPRL_SUM_ADDR_FORMAT("committed") 83.323 G1PPRL_SUM_ADDR_FORMAT("reserved") 83.324 G1PPRL_SUM_BYTE_FORMAT("region-size"), 83.325 - g1_committed.start(), g1_committed.end(), 83.326 - g1_reserved.start(), g1_reserved.end(), 83.327 + p2i(g1_committed.start()), p2i(g1_committed.end()), 83.328 + p2i(g1_reserved.start()), p2i(g1_reserved.end()), 83.329 HeapRegion::GrainBytes); 83.330 _out->print_cr(G1PPRL_LINE_PREFIX); 83.331 _out->print_cr(G1PPRL_LINE_PREFIX 83.332 @@ -4664,7 +4664,7 @@ 83.333 G1PPRL_DOUBLE_FORMAT 83.334 G1PPRL_BYTE_FORMAT 83.335 G1PPRL_BYTE_FORMAT, 83.336 - type, bottom, end, 83.337 + type, p2i(bottom), p2i(end), 83.338 used_bytes, prev_live_bytes, next_live_bytes, gc_eff, 83.339 remset_bytes, strong_code_roots_bytes); 83.340
84.1 --- a/src/share/vm/gc_implementation/g1/concurrentMark.inline.hpp Thu May 15 18:23:26 2014 -0400 84.2 +++ b/src/share/vm/gc_implementation/g1/concurrentMark.inline.hpp Thu May 22 15:52:41 2014 -0400 84.3 @@ -1,5 +1,5 @@ 84.4 /* 84.5 - * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. 84.6 + * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved. 84.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 84.8 * 84.9 * This code is free software; you can redistribute it and/or modify it 84.10 @@ -277,7 +277,7 @@ 84.11 assert(_nextMarkBitMap->isMarked(objAddr), "invariant"); 84.12 84.13 if (_cm->verbose_high()) { 84.14 - gclog_or_tty->print_cr("[%u] pushing "PTR_FORMAT, _worker_id, (void*) obj); 84.15 + gclog_or_tty->print_cr("[%u] pushing " PTR_FORMAT, _worker_id, p2i((void*) obj)); 84.16 } 84.17 84.18 if (!_task_queue->push(obj)) { 84.19 @@ -317,7 +317,7 @@ 84.20 inline void CMTask::deal_with_reference(oop obj) { 84.21 if (_cm->verbose_high()) { 84.22 gclog_or_tty->print_cr("[%u] we're dealing with reference = "PTR_FORMAT, 84.23 - _worker_id, (void*) obj); 84.24 + _worker_id, p2i((void*) obj)); 84.25 } 84.26 84.27 ++_refs_reached; 84.28 @@ -334,7 +334,7 @@ 84.29 if (!hr->obj_allocated_since_next_marking(obj)) { 84.30 if (_cm->verbose_high()) { 84.31 gclog_or_tty->print_cr("[%u] "PTR_FORMAT" is not considered marked", 84.32 - _worker_id, (void*) obj); 84.33 + _worker_id, p2i((void*) obj)); 84.34 } 84.35 84.36 // we need to mark it first 84.37 @@ -349,7 +349,7 @@ 84.38 if (_finger != NULL && objAddr < _finger) { 84.39 if (_cm->verbose_high()) { 84.40 gclog_or_tty->print_cr("[%u] below the local finger ("PTR_FORMAT"), " 84.41 - "pushing it", _worker_id, _finger); 84.42 + "pushing it", _worker_id, p2i(_finger)); 84.43 } 84.44 push(obj); 84.45 } else if (_curr_region != NULL && objAddr < _region_limit) { 84.46 @@ -367,7 +367,7 @@ 84.47 if (_cm->verbose_high()) { 84.48 gclog_or_tty->print_cr("[%u] below the global finger " 84.49 "("PTR_FORMAT"), pushing it", 84.50 - _worker_id, global_finger); 84.51 + _worker_id, p2i(global_finger)); 84.52 } 84.53 push(obj); 84.54 } else { 84.55 @@ -382,7 +382,7 @@ 84.56 if (_cm->verbose_high()) { 84.57 gclog_or_tty->print_cr("[%u] below the global finger " 84.58 "("PTR_FORMAT"), pushing it", 84.59 - _worker_id, global_finger); 84.60 + _worker_id, p2i(global_finger)); 84.61 } 84.62 push(obj); 84.63 }
85.1 --- a/src/share/vm/gc_implementation/g1/g1AllocRegion.cpp Thu May 15 18:23:26 2014 -0400 85.2 +++ b/src/share/vm/gc_implementation/g1/g1AllocRegion.cpp Thu May 22 15:52:41 2014 -0400 85.3 @@ -1,5 +1,5 @@ 85.4 /* 85.5 - * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. 85.6 + * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved. 85.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 85.8 * 85.9 * This code is free software; you can redistribute it and/or modify it 85.10 @@ -142,7 +142,7 @@ 85.11 void G1AllocRegion::fill_in_ext_msg(ar_ext_msg* msg, const char* message) { 85.12 msg->append("[%s] %s c: %u b: %s r: "PTR_FORMAT" u: "SIZE_FORMAT, 85.13 _name, message, _count, BOOL_TO_STR(_bot_updates), 85.14 - _alloc_region, _used_bytes_before); 85.15 + p2i(_alloc_region), _used_bytes_before); 85.16 } 85.17 85.18 void G1AllocRegion::init() {
86.1 --- a/src/share/vm/gc_implementation/g1/g1AllocRegion.hpp Thu May 15 18:23:26 2014 -0400 86.2 +++ b/src/share/vm/gc_implementation/g1/g1AllocRegion.hpp Thu May 22 15:52:41 2014 -0400 86.3 @@ -1,5 +1,5 @@ 86.4 /* 86.5 - * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. 86.6 + * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved. 86.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 86.8 * 86.9 * This code is free software; you can redistribute it and/or modify it 86.10 @@ -184,7 +184,7 @@ 86.11 86.12 class ar_ext_msg : public err_msg { 86.13 public: 86.14 - ar_ext_msg(G1AllocRegion* alloc_region, const char *message) : err_msg("") { 86.15 + ar_ext_msg(G1AllocRegion* alloc_region, const char *message) : err_msg("%s", "") { 86.16 alloc_region->fill_in_ext_msg(this, message); 86.17 } 86.18 };
87.1 --- a/src/share/vm/gc_implementation/g1/g1BiasedArray.cpp Thu May 15 18:23:26 2014 -0400 87.2 +++ b/src/share/vm/gc_implementation/g1/g1BiasedArray.cpp Thu May 22 15:52:41 2014 -0400 87.3 @@ -1,5 +1,5 @@ 87.4 /* 87.5 - * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. 87.6 + * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved. 87.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 87.8 * 87.9 * This code is free software; you can redistribute it and/or modify it 87.10 @@ -65,7 +65,7 @@ 87.11 REGION_SIZE_IN_WORDS * HeapWordSize); 87.12 // Check address calculation (bounds) 87.13 assert(array.bottom_address_mapped() == fake_heap, 87.14 - err_msg("bottom mapped address should be "PTR_FORMAT", but is "PTR_FORMAT, fake_heap, array.bottom_address_mapped())); 87.15 + err_msg("bottom mapped address should be " PTR_FORMAT ", but is " PTR_FORMAT, p2i(fake_heap), p2i(array.bottom_address_mapped()))); 87.16 assert(array.end_address_mapped() == (fake_heap + REGION_SIZE_IN_WORDS * NUM_REGIONS), "must be"); 87.17 87.18 int* bottom = array.address_mapped_to(fake_heap);
88.1 --- a/src/share/vm/gc_implementation/g1/g1BiasedArray.hpp Thu May 15 18:23:26 2014 -0400 88.2 +++ b/src/share/vm/gc_implementation/g1/g1BiasedArray.hpp Thu May 22 15:52:41 2014 -0400 88.3 @@ -1,5 +1,5 @@ 88.4 /* 88.5 - * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. 88.6 + * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved. 88.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 88.8 * 88.9 * This code is free software; you can redistribute it and/or modify it 88.10 @@ -55,7 +55,7 @@ 88.11 void initialize_base(address base, size_t length, size_t bias, size_t elem_size, uint shift_by) { 88.12 assert(base != NULL, "just checking"); 88.13 assert(length > 0, "just checking"); 88.14 - assert(shift_by < sizeof(uintptr_t) * 8, err_msg("Shifting by %zd, larger than word size?", shift_by)); 88.15 + assert(shift_by < sizeof(uintptr_t) * 8, err_msg("Shifting by " SSIZE_FORMAT ", larger than word size?", (size_t) shift_by)); 88.16 _base = base; 88.17 _length = length; 88.18 _biased_base = base - (bias * elem_size); 88.19 @@ -70,11 +70,11 @@ 88.20 assert(is_power_of_2(mapping_granularity_in_bytes), 88.21 err_msg("mapping granularity must be power of 2, is %zd", mapping_granularity_in_bytes)); 88.22 assert((uintptr_t)bottom % mapping_granularity_in_bytes == 0, 88.23 - err_msg("bottom mapping area address must be a multiple of mapping granularity %zd, is "PTR_FORMAT, 88.24 - mapping_granularity_in_bytes, bottom)); 88.25 + err_msg("bottom mapping area address must be a multiple of mapping granularity %zd, is " PTR_FORMAT, 88.26 + mapping_granularity_in_bytes, p2i(bottom))); 88.27 assert((uintptr_t)end % mapping_granularity_in_bytes == 0, 88.28 - err_msg("end mapping area address must be a multiple of mapping granularity %zd, is "PTR_FORMAT, 88.29 - mapping_granularity_in_bytes, end)); 88.30 + err_msg("end mapping area address must be a multiple of mapping granularity %zd, is " PTR_FORMAT, 88.31 + mapping_granularity_in_bytes, p2i(end))); 88.32 size_t num_target_elems = (end - bottom) / (mapping_granularity_in_bytes / HeapWordSize); 88.33 idx_t bias = (uintptr_t)bottom / mapping_granularity_in_bytes; 88.34 address base = create_new_base_array(num_target_elems, target_elem_size_in_bytes);
89.1 --- a/src/share/vm/gc_implementation/g1/g1BlockOffsetTable.cpp Thu May 15 18:23:26 2014 -0400 89.2 +++ b/src/share/vm/gc_implementation/g1/g1BlockOffsetTable.cpp Thu May 22 15:52:41 2014 -0400 89.3 @@ -1,5 +1,5 @@ 89.4 /* 89.5 - * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. 89.6 + * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved. 89.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 89.8 * 89.9 * This code is free software; you can redistribute it and/or modify it 89.10 @@ -29,6 +29,8 @@ 89.11 #include "runtime/java.hpp" 89.12 #include "services/memTracker.hpp" 89.13 89.14 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 89.15 + 89.16 ////////////////////////////////////////////////////////////////////// 89.17 // G1BlockOffsetSharedArray 89.18 //////////////////////////////////////////////////////////////////////
90.1 --- a/src/share/vm/gc_implementation/g1/g1BlockOffsetTable.hpp Thu May 15 18:23:26 2014 -0400 90.2 +++ b/src/share/vm/gc_implementation/g1/g1BlockOffsetTable.hpp Thu May 22 15:52:41 2014 -0400 90.3 @@ -1,5 +1,5 @@ 90.4 /* 90.5 - * Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved. 90.6 + * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved. 90.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 90.8 * 90.9 * This code is free software; you can redistribute it and/or modify it 90.10 @@ -80,7 +80,7 @@ 90.11 virtual void set_bottom(HeapWord* new_bottom) { 90.12 assert(new_bottom <= _end, 90.13 err_msg("new_bottom (" PTR_FORMAT ") > _end (" PTR_FORMAT ")", 90.14 - new_bottom, _end)); 90.15 + p2i(new_bottom), p2i(_end))); 90.16 _bottom = new_bottom; 90.17 resize(pointer_delta(_end, _bottom)); 90.18 } 90.19 @@ -146,7 +146,7 @@ 90.20 void check_offset(size_t offset, const char* msg) const { 90.21 assert(offset <= N_words, 90.22 err_msg("%s - " 90.23 - "offset: " UINT32_FORMAT", N_words: " UINT32_FORMAT, 90.24 + "offset: " SIZE_FORMAT ", N_words: " UINT32_FORMAT, 90.25 msg, offset, N_words)); 90.26 } 90.27
91.1 --- a/src/share/vm/gc_implementation/g1/g1BlockOffsetTable.inline.hpp Thu May 15 18:23:26 2014 -0400 91.2 +++ b/src/share/vm/gc_implementation/g1/g1BlockOffsetTable.inline.hpp Thu May 22 15:52:41 2014 -0400 91.3 @@ -1,5 +1,5 @@ 91.4 /* 91.5 - * Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved. 91.6 + * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved. 91.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 91.8 * 91.9 * This code is free software; you can redistribute it and/or modify it 91.10 @@ -50,7 +50,7 @@ 91.11 assert(pc >= (char*)_reserved.start() && 91.12 pc < (char*)_reserved.end(), 91.13 err_msg("p (" PTR_FORMAT ") not in reserved [" PTR_FORMAT ", " PTR_FORMAT ")", 91.14 - p, (char*)_reserved.start(), (char*)_reserved.end())); 91.15 + p2i(p), p2i(_reserved.start()), p2i(_reserved.end()))); 91.16 size_t delta = pointer_delta(pc, _reserved.start(), sizeof(char)); 91.17 size_t result = delta >> LogN; 91.18 check_index(result, "bad index from address"); 91.19 @@ -65,7 +65,7 @@ 91.20 err_msg("bad address from index result " PTR_FORMAT 91.21 " _reserved.start() " PTR_FORMAT " _reserved.end() " 91.22 PTR_FORMAT, 91.23 - result, _reserved.start(), _reserved.end())); 91.24 + p2i(result), p2i(_reserved.start()), p2i(_reserved.end()))); 91.25 return result; 91.26 } 91.27
92.1 --- a/src/share/vm/gc_implementation/g1/g1CardCounts.cpp Thu May 15 18:23:26 2014 -0400 92.2 +++ b/src/share/vm/gc_implementation/g1/g1CardCounts.cpp Thu May 22 15:52:41 2014 -0400 92.3 @@ -1,5 +1,5 @@ 92.4 /* 92.5 - * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. 92.6 + * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved. 92.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 92.8 * 92.9 * This code is free software; you can redistribute it and/or modify it 92.10 @@ -31,6 +31,8 @@ 92.11 #include "services/memTracker.hpp" 92.12 #include "utilities/copy.hpp" 92.13 92.14 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 92.15 + 92.16 void G1CardCounts::clear_range(size_t from_card_num, size_t to_card_num) { 92.17 if (has_count_table()) { 92.18 assert(from_card_num >= 0 && from_card_num < _committed_max_card_num,
93.1 --- a/src/share/vm/gc_implementation/g1/g1CardCounts.hpp Thu May 15 18:23:26 2014 -0400 93.2 +++ b/src/share/vm/gc_implementation/g1/g1CardCounts.hpp Thu May 22 15:52:41 2014 -0400 93.3 @@ -1,5 +1,5 @@ 93.4 /* 93.5 - * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. 93.6 + * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved. 93.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 93.8 * 93.9 * This code is free software; you can redistribute it and/or modify it 93.10 @@ -77,10 +77,10 @@ 93.11 err_msg("Invalid card pointer: " 93.12 "card_ptr: " PTR_FORMAT ", " 93.13 "_ct_bot: " PTR_FORMAT, 93.14 - card_ptr, _ct_bot)); 93.15 + p2i(card_ptr), p2i(_ct_bot))); 93.16 size_t card_num = pointer_delta(card_ptr, _ct_bot, sizeof(jbyte)); 93.17 assert(card_num >= 0 && card_num < _committed_max_card_num, 93.18 - err_msg("card pointer out of range: " PTR_FORMAT, card_ptr)); 93.19 + err_msg("card pointer out of range: " PTR_FORMAT, p2i(card_ptr))); 93.20 return card_num; 93.21 } 93.22
94.1 --- a/src/share/vm/gc_implementation/g1/g1CodeCacheRemSet.cpp Thu May 15 18:23:26 2014 -0400 94.2 +++ b/src/share/vm/gc_implementation/g1/g1CodeCacheRemSet.cpp Thu May 22 15:52:41 2014 -0400 94.3 @@ -28,6 +28,8 @@ 94.4 #include "gc_implementation/g1/g1CodeCacheRemSet.hpp" 94.5 #include "memory/iterator.hpp" 94.6 94.7 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 94.8 + 94.9 G1CodeRootChunk::G1CodeRootChunk() : _top(NULL), _next(NULL), _prev(NULL) { 94.10 _top = bottom(); 94.11 }
95.1 --- a/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp Thu May 15 18:23:26 2014 -0400 95.2 +++ b/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp Thu May 22 15:52:41 2014 -0400 95.3 @@ -22,6 +22,10 @@ 95.4 * 95.5 */ 95.6 95.7 +#if !defined(__clang_major__) && defined(__GNUC__) 95.8 +#define ATTRIBUTE_PRINTF(x,y) // FIXME, formats are a mess. 95.9 +#endif 95.10 + 95.11 #include "precompiled.hpp" 95.12 #include "code/codeCache.hpp" 95.13 #include "code/icBuffer.hpp" 95.14 @@ -372,7 +376,7 @@ 95.15 } 95.16 } 95.17 95.18 - gclog_or_tty->print_cr(""); 95.19 + gclog_or_tty->cr(); 95.20 } 95.21 95.22 void G1CollectedHeap::push_dirty_cards_region(HeapRegion* hr) 95.23 @@ -3488,7 +3492,7 @@ 95.24 // help us track down what went wrong. This is why we call 95.25 // print_extended_on() instead of print_on(). 95.26 print_extended_on(gclog_or_tty); 95.27 - gclog_or_tty->print_cr(""); 95.28 + gclog_or_tty->cr(); 95.29 #ifndef PRODUCT 95.30 if (VerifyDuringGC && G1VerifyDuringGCPrintReachable) { 95.31 concurrent_mark()->print_reachable("at-verification-failure", 95.32 @@ -3682,7 +3686,7 @@ 95.33 PrintRSetsClosure(const char* msg) : _msg(msg), _occupied_sum(0) { 95.34 gclog_or_tty->cr(); 95.35 gclog_or_tty->print_cr("========================================"); 95.36 - gclog_or_tty->print_cr(msg); 95.37 + gclog_or_tty->print_cr("%s", msg); 95.38 gclog_or_tty->cr(); 95.39 } 95.40
96.1 --- a/src/share/vm/gc_implementation/g1/g1CollectedHeap.inline.hpp Thu May 15 18:23:26 2014 -0400 96.2 +++ b/src/share/vm/gc_implementation/g1/g1CollectedHeap.inline.hpp Thu May 22 15:52:41 2014 -0400 96.3 @@ -1,5 +1,5 @@ 96.4 /* 96.5 - * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. 96.6 + * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved. 96.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 96.8 * 96.9 * This code is free software; you can redistribute it and/or modify it 96.10 @@ -165,7 +165,7 @@ 96.11 // points into the heap. 96.12 inline bool G1CollectedHeap::in_cset_fast_test(oop obj) { 96.13 assert(_in_cset_fast_test != NULL, "sanity"); 96.14 - assert(_g1_committed.contains((HeapWord*) obj), err_msg("Given reference outside of heap, is "PTR_FORMAT, (HeapWord*)obj)); 96.15 + assert(_g1_committed.contains((HeapWord*) obj), err_msg("Given reference outside of heap, is "PTR_FORMAT, p2i((HeapWord*)obj))); 96.16 // no need to subtract the bottom of the heap from obj, 96.17 // _in_cset_fast_test is biased 96.18 uintx index = cast_from_oop<uintx>(obj) >> HeapRegion::LogOfHRGrainBytes;
97.1 --- a/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp Thu May 15 18:23:26 2014 -0400 97.2 +++ b/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp Thu May 22 15:52:41 2014 -0400 97.3 @@ -1,5 +1,5 @@ 97.4 /* 97.5 - * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. 97.6 + * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved. 97.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 97.8 * 97.9 * This code is free software; you can redistribute it and/or modify it 97.10 @@ -22,6 +22,10 @@ 97.11 * 97.12 */ 97.13 97.14 +#ifndef __clang_major__ 97.15 +#define ATTRIBUTE_PRINTF(x,y) // FIXME, formats are a mess. 97.16 +#endif 97.17 + 97.18 #include "precompiled.hpp" 97.19 #include "gc_implementation/g1/concurrentG1Refine.hpp" 97.20 #include "gc_implementation/g1/concurrentMark.hpp" 97.21 @@ -965,7 +969,7 @@ 97.22 97.23 #ifndef PRODUCT 97.24 if (G1YoungSurvRateVerbose) { 97.25 - gclog_or_tty->print_cr(""); 97.26 + gclog_or_tty->cr(); 97.27 _short_lived_surv_rate_group->print(); 97.28 // do that for any other surv rate groups too 97.29 } 97.30 @@ -2222,11 +2226,11 @@ 97.31 97.32 gclog_or_tty->print_cr("ALL PAUSES"); 97.33 print_summary_sd(" Total", &_total); 97.34 - gclog_or_tty->print_cr(""); 97.35 - gclog_or_tty->print_cr(""); 97.36 + gclog_or_tty->cr(); 97.37 + gclog_or_tty->cr(); 97.38 gclog_or_tty->print_cr(" Young GC Pauses: %8d", _young_pause_num); 97.39 gclog_or_tty->print_cr(" Mixed GC Pauses: %8d", _mixed_pause_num); 97.40 - gclog_or_tty->print_cr(""); 97.41 + gclog_or_tty->cr(); 97.42 97.43 gclog_or_tty->print_cr("EVACUATION PAUSES"); 97.44 97.45 @@ -2246,7 +2250,7 @@ 97.46 print_summary(" Clear CT", &_clear_ct); 97.47 print_summary(" Other", &_other); 97.48 } 97.49 - gclog_or_tty->print_cr(""); 97.50 + gclog_or_tty->cr(); 97.51 97.52 gclog_or_tty->print_cr("MISC"); 97.53 print_summary_sd(" Stop World", &_all_stop_world_times_ms);
98.1 --- a/src/share/vm/gc_implementation/g1/g1GCPhaseTimes.cpp Thu May 15 18:23:26 2014 -0400 98.2 +++ b/src/share/vm/gc_implementation/g1/g1GCPhaseTimes.cpp Thu May 22 15:52:41 2014 -0400 98.3 @@ -39,7 +39,7 @@ 98.4 int _indent_level; 98.5 int _cur; 98.6 98.7 - void vappend(const char* format, va_list ap) { 98.8 + void vappend(const char* format, va_list ap) ATTRIBUTE_PRINTF(2, 0) { 98.9 int res = vsnprintf(&_buffer[_cur], BUFFER_LEN - _cur, format, ap); 98.10 if (res != -1) { 98.11 _cur += res; 98.12 @@ -63,14 +63,14 @@ 98.13 } 98.14 #endif 98.15 98.16 - void append(const char* format, ...) { 98.17 + void append(const char* format, ...) ATTRIBUTE_PRINTF(2, 3) { 98.18 va_list ap; 98.19 va_start(ap, format); 98.20 vappend(format, ap); 98.21 va_end(ap); 98.22 } 98.23 98.24 - void append_and_print_cr(const char* format, ...) { 98.25 + void append_and_print_cr(const char* format, ...) ATTRIBUTE_PRINTF(2, 3) { 98.26 va_list ap; 98.27 va_start(ap, format); 98.28 vappend(format, ap); 98.29 @@ -80,6 +80,8 @@ 98.30 } 98.31 }; 98.32 98.33 +PRAGMA_DIAG_PUSH 98.34 +PRAGMA_FORMAT_NONLITERAL_IGNORED 98.35 template <class T> 98.36 void WorkerDataArray<T>::print(int level, const char* title) { 98.37 if (_length == 1) { 98.38 @@ -109,7 +111,7 @@ 98.39 } 98.40 98.41 if (G1Log::finest()) { 98.42 - buf.append_and_print_cr(""); 98.43 + buf.append_and_print_cr("%s", ""); 98.44 } 98.45 98.46 double avg = (double)sum / (double)_length; 98.47 @@ -129,6 +131,7 @@ 98.48 } 98.49 buf.append_and_print_cr("]"); 98.50 } 98.51 +PRAGMA_DIAG_POP 98.52 98.53 #ifndef PRODUCT 98.54
99.1 --- a/src/share/vm/gc_implementation/g1/g1HRPrinter.cpp Thu May 15 18:23:26 2014 -0400 99.2 +++ b/src/share/vm/gc_implementation/g1/g1HRPrinter.cpp Thu May 22 15:52:41 2014 -0400 99.3 @@ -1,5 +1,5 @@ 99.4 /* 99.5 - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. 99.6 + * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved. 99.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 99.8 * 99.9 * This code is free software; you can redistribute it and/or modify it 99.10 @@ -27,6 +27,8 @@ 99.11 #include "gc_implementation/g1/heapRegion.hpp" 99.12 #include "utilities/ostream.hpp" 99.13 99.14 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 99.15 + 99.16 const char* G1HRPrinter::action_name(ActionType action) { 99.17 switch(action) { 99.18 case Alloc: return "ALLOC";
100.1 --- a/src/share/vm/gc_implementation/g1/g1OopClosures.inline.hpp Thu May 15 18:23:26 2014 -0400 100.2 +++ b/src/share/vm/gc_implementation/g1/g1OopClosures.inline.hpp Thu May 22 15:52:41 2014 -0400 100.3 @@ -1,5 +1,5 @@ 100.4 /* 100.5 - * Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved. 100.6 + * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved. 100.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 100.8 * 100.9 * This code is free software; you can redistribute it and/or modify it 100.10 @@ -114,7 +114,7 @@ 100.11 if (_cm->verbose_high()) { 100.12 gclog_or_tty->print_cr("[%u] we're looking at location " 100.13 "*"PTR_FORMAT" = "PTR_FORMAT, 100.14 - _task->worker_id(), p, (void*) obj); 100.15 + _task->worker_id(), p2i(p), p2i((void*) obj)); 100.16 } 100.17 _task->deal_with_reference(obj); 100.18 }
101.1 --- a/src/share/vm/gc_implementation/g1/g1RemSet.cpp Thu May 15 18:23:26 2014 -0400 101.2 +++ b/src/share/vm/gc_implementation/g1/g1RemSet.cpp Thu May 22 15:52:41 2014 -0400 101.3 @@ -1,5 +1,5 @@ 101.4 /* 101.5 - * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. 101.6 + * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved. 101.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 101.8 * 101.9 * This code is free software; you can redistribute it and/or modify it 101.10 @@ -39,6 +39,8 @@ 101.11 #include "oops/oop.inline.hpp" 101.12 #include "utilities/intHisto.hpp" 101.13 101.14 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 101.15 + 101.16 #define CARD_REPEAT_HISTO 0 101.17 101.18 #if CARD_REPEAT_HISTO
102.1 --- a/src/share/vm/gc_implementation/g1/heapRegion.cpp Thu May 15 18:23:26 2014 -0400 102.2 +++ b/src/share/vm/gc_implementation/g1/heapRegion.cpp Thu May 22 15:52:41 2014 -0400 102.3 @@ -34,6 +34,8 @@ 102.4 #include "memory/iterator.hpp" 102.5 #include "oops/oop.inline.hpp" 102.6 102.7 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 102.8 + 102.9 int HeapRegion::LogOfHRGrainBytes = 0; 102.10 int HeapRegion::LogOfHRGrainWords = 0; 102.11 size_t HeapRegion::GrainBytes = 0; 102.12 @@ -829,7 +831,7 @@ 102.13 Mutex::_no_safepoint_check_flag); 102.14 102.15 if (!_failures) { 102.16 - gclog_or_tty->print_cr(""); 102.17 + gclog_or_tty->cr(); 102.18 gclog_or_tty->print_cr("----------"); 102.19 } 102.20 if (!_g1h->is_in_closed_subset(obj)) { 102.21 @@ -884,7 +886,7 @@ 102.22 Mutex::_no_safepoint_check_flag); 102.23 102.24 if (!_failures) { 102.25 - gclog_or_tty->print_cr(""); 102.26 + gclog_or_tty->cr(); 102.27 gclog_or_tty->print_cr("----------"); 102.28 } 102.29 gclog_or_tty->print_cr("Missing rem set entry:");
103.1 --- a/src/share/vm/gc_implementation/g1/heapRegion.hpp Thu May 15 18:23:26 2014 -0400 103.2 +++ b/src/share/vm/gc_implementation/g1/heapRegion.hpp Thu May 22 15:52:41 2014 -0400 103.3 @@ -1,5 +1,5 @@ 103.4 /* 103.5 - * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. 103.6 + * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved. 103.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 103.8 * 103.9 * This code is free software; you can redistribute it and/or modify it 103.10 @@ -61,7 +61,7 @@ 103.11 (_hr_)->startsHumongous() ? "HS" : \ 103.12 (_hr_)->continuesHumongous() ? "HC" : \ 103.13 !(_hr_)->is_empty() ? "O" : "F", \ 103.14 - (_hr_)->bottom(), (_hr_)->top(), (_hr_)->end() 103.15 + p2i((_hr_)->bottom()), p2i((_hr_)->top()), p2i((_hr_)->end()) 103.16 103.17 // sentinel value for hrs_index 103.18 #define G1_NULL_HRS_INDEX ((uint) -1) 103.19 @@ -550,7 +550,7 @@ 103.20 (containing_set != NULL && _containing_set == NULL), 103.21 err_msg("containing_set: "PTR_FORMAT" " 103.22 "_containing_set: "PTR_FORMAT, 103.23 - containing_set, _containing_set)); 103.24 + p2i(containing_set), p2i(_containing_set))); 103.25 103.26 _containing_set = containing_set; 103.27 }
104.1 --- a/src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp Thu May 15 18:23:26 2014 -0400 104.2 +++ b/src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp Thu May 22 15:52:41 2014 -0400 104.3 @@ -36,6 +36,8 @@ 104.4 #include "utilities/globalDefinitions.hpp" 104.5 #include "utilities/growableArray.hpp" 104.6 104.7 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 104.8 + 104.9 class PerRegionTable: public CHeapObj<mtGC> { 104.10 friend class OtherRegionsTable; 104.11 friend class HeapRegionRemSetIterator; 104.12 @@ -1244,7 +1246,7 @@ 104.13 while (cur_evnt < _n_recorded_events && i == cur_evnt_ind) { 104.14 gclog_or_tty->print("Event: "); 104.15 print_event(gclog_or_tty, cur_evnt_kind); 104.16 - gclog_or_tty->print_cr(""); 104.17 + gclog_or_tty->cr(); 104.18 cur_evnt++; 104.19 if (cur_evnt < MaxRecordedEvents) { 104.20 cur_evnt_kind = _recorded_events[cur_evnt];
105.1 --- a/src/share/vm/gc_implementation/g1/heapRegionSeq.cpp Thu May 15 18:23:26 2014 -0400 105.2 +++ b/src/share/vm/gc_implementation/g1/heapRegionSeq.cpp Thu May 22 15:52:41 2014 -0400 105.3 @@ -1,5 +1,5 @@ 105.4 /* 105.5 - * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. 105.6 + * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved. 105.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 105.8 * 105.9 * This code is free software; you can redistribute it and/or modify it 105.10 @@ -233,7 +233,7 @@ 105.11 guarantee(hr != NULL, err_msg("invariant: i: %u", i)); 105.12 guarantee(hr->bottom() == prev_end, 105.13 err_msg("invariant i: %u "HR_FORMAT" prev_end: "PTR_FORMAT, 105.14 - i, HR_FORMAT_PARAMS(hr), prev_end)); 105.15 + i, HR_FORMAT_PARAMS(hr), p2i(prev_end))); 105.16 guarantee(hr->hrs_index() == i, 105.17 err_msg("invariant: i: %u hrs_index(): %u", i, hr->hrs_index())); 105.18 if (i < length()) {
106.1 --- a/src/share/vm/gc_implementation/g1/heapRegionSeq.inline.hpp Thu May 15 18:23:26 2014 -0400 106.2 +++ b/src/share/vm/gc_implementation/g1/heapRegionSeq.inline.hpp Thu May 22 15:52:41 2014 -0400 106.3 @@ -1,5 +1,5 @@ 106.4 /* 106.5 - * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. 106.6 + * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved. 106.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 106.8 * 106.9 * This code is free software; you can redistribute it and/or modify it 106.10 @@ -37,7 +37,7 @@ 106.11 inline HeapRegion* HeapRegionSeq::addr_to_region(HeapWord* addr) const { 106.12 if (addr != NULL && addr < heap_end()) { 106.13 assert(addr >= heap_bottom(), 106.14 - err_msg("addr: "PTR_FORMAT" bottom: "PTR_FORMAT, addr, heap_bottom())); 106.15 + err_msg("addr: " PTR_FORMAT " bottom: " PTR_FORMAT, p2i(addr), p2i(heap_bottom()))); 106.16 return addr_to_region_unsafe(addr); 106.17 } 106.18 return NULL;
107.1 --- a/src/share/vm/gc_implementation/g1/heapRegionSet.cpp Thu May 15 18:23:26 2014 -0400 107.2 +++ b/src/share/vm/gc_implementation/g1/heapRegionSet.cpp Thu May 22 15:52:41 2014 -0400 107.3 @@ -26,6 +26,8 @@ 107.4 #include "gc_implementation/g1/heapRegionRemSet.hpp" 107.5 #include "gc_implementation/g1/heapRegionSet.inline.hpp" 107.6 107.7 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 107.8 + 107.9 uint FreeRegionList::_unrealistically_long_length = 0; 107.10 107.11 void HeapRegionSetBase::fill_in_ext_msg(hrs_ext_msg* msg, const char* message) {
108.1 --- a/src/share/vm/gc_implementation/g1/heapRegionSet.hpp Thu May 15 18:23:26 2014 -0400 108.2 +++ b/src/share/vm/gc_implementation/g1/heapRegionSet.hpp Thu May 22 15:52:41 2014 -0400 108.3 @@ -162,7 +162,7 @@ 108.4 // diagnosing failures. 108.5 class hrs_ext_msg : public hrs_err_msg { 108.6 public: 108.7 - hrs_ext_msg(HeapRegionSetBase* set, const char* message) : hrs_err_msg("") { 108.8 + hrs_ext_msg(HeapRegionSetBase* set, const char* message) : hrs_err_msg("%s","") { 108.9 set->fill_in_ext_msg(this, message); 108.10 } 108.11 };
109.1 --- a/src/share/vm/gc_implementation/g1/satbQueue.cpp Thu May 15 18:23:26 2014 -0400 109.2 +++ b/src/share/vm/gc_implementation/g1/satbQueue.cpp Thu May 22 15:52:41 2014 -0400 109.3 @@ -1,5 +1,5 @@ 109.4 /* 109.5 - * Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved. 109.6 + * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved. 109.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 109.8 * 109.9 * This code is free software; you can redistribute it and/or modify it 109.10 @@ -32,6 +32,8 @@ 109.11 #include "runtime/thread.hpp" 109.12 #include "runtime/vmThread.hpp" 109.13 109.14 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 109.15 + 109.16 void ObjPtrQueue::flush() { 109.17 // The buffer might contain refs into the CSet. We have to filter it 109.18 // first before we flush it, otherwise we might end up with an
110.1 --- a/src/share/vm/gc_implementation/g1/survRateGroup.cpp Thu May 15 18:23:26 2014 -0400 110.2 +++ b/src/share/vm/gc_implementation/g1/survRateGroup.cpp Thu May 22 15:52:41 2014 -0400 110.3 @@ -1,5 +1,5 @@ 110.4 /* 110.5 - * Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved. 110.6 + * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved. 110.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 110.8 * 110.9 * This code is free software; you can redistribute it and/or modify it 110.10 @@ -29,6 +29,8 @@ 110.11 #include "gc_implementation/g1/survRateGroup.hpp" 110.12 #include "memory/allocation.hpp" 110.13 110.14 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 110.15 + 110.16 SurvRateGroup::SurvRateGroup(G1CollectorPolicy* g1p, 110.17 const char* name, 110.18 size_t summary_surv_rates_len) : 110.19 @@ -202,7 +204,7 @@ 110.20 if (length == 0) 110.21 return; 110.22 110.23 - gclog_or_tty->print_cr(""); 110.24 + gclog_or_tty->cr(); 110.25 gclog_or_tty->print_cr("%s Rate Summary (for up to age %d)", _name, length-1); 110.26 gclog_or_tty->print_cr(" age range survival rate (avg) samples (avg)"); 110.27 gclog_or_tty->print_cr(" ---------------------------------------------------------");
111.1 --- a/src/share/vm/gc_implementation/parNew/asParNewGeneration.cpp Thu May 15 18:23:26 2014 -0400 111.2 +++ b/src/share/vm/gc_implementation/parNew/asParNewGeneration.cpp Thu May 22 15:52:41 2014 -0400 111.3 @@ -1,5 +1,5 @@ 111.4 /* 111.5 - * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. 111.6 + * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved. 111.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 111.8 * 111.9 * This code is free software; you can redistribute it and/or modify it 111.10 @@ -259,22 +259,22 @@ 111.11 requested_eden_size, requested_survivor_size); 111.12 gclog_or_tty->print_cr(" eden: [" PTR_FORMAT ".." PTR_FORMAT ") " 111.13 SIZE_FORMAT, 111.14 - eden()->bottom(), 111.15 - eden()->end(), 111.16 + p2i(eden()->bottom()), 111.17 + p2i(eden()->end()), 111.18 pointer_delta(eden()->end(), 111.19 eden()->bottom(), 111.20 sizeof(char))); 111.21 gclog_or_tty->print_cr(" from: [" PTR_FORMAT ".." PTR_FORMAT ") " 111.22 SIZE_FORMAT, 111.23 - from()->bottom(), 111.24 - from()->end(), 111.25 + p2i(from()->bottom()), 111.26 + p2i(from()->end()), 111.27 pointer_delta(from()->end(), 111.28 from()->bottom(), 111.29 sizeof(char))); 111.30 gclog_or_tty->print_cr(" to: [" PTR_FORMAT ".." PTR_FORMAT ") " 111.31 SIZE_FORMAT, 111.32 - to()->bottom(), 111.33 - to()->end(), 111.34 + p2i(to()->bottom()), 111.35 + p2i(to()->end()), 111.36 pointer_delta( to()->end(), 111.37 to()->bottom(), 111.38 sizeof(char))); 111.39 @@ -382,18 +382,18 @@ 111.40 if (PrintAdaptiveSizePolicy && Verbose) { 111.41 gclog_or_tty->print_cr(" [eden_start .. eden_end): " 111.42 "[" PTR_FORMAT " .. " PTR_FORMAT ") " SIZE_FORMAT, 111.43 - eden_start, 111.44 - eden_end, 111.45 + p2i(eden_start), 111.46 + p2i(eden_end), 111.47 pointer_delta(eden_end, eden_start, sizeof(char))); 111.48 gclog_or_tty->print_cr(" [from_start .. from_end): " 111.49 "[" PTR_FORMAT " .. " PTR_FORMAT ") " SIZE_FORMAT, 111.50 - from_start, 111.51 - from_end, 111.52 + p2i(from_start), 111.53 + p2i(from_end), 111.54 pointer_delta(from_end, from_start, sizeof(char))); 111.55 gclog_or_tty->print_cr(" [ to_start .. to_end): " 111.56 "[" PTR_FORMAT " .. " PTR_FORMAT ") " SIZE_FORMAT, 111.57 - to_start, 111.58 - to_end, 111.59 + p2i(to_start), 111.60 + p2i(to_end), 111.61 pointer_delta( to_end, to_start, sizeof(char))); 111.62 } 111.63 } else { 111.64 @@ -473,18 +473,18 @@ 111.65 if (PrintAdaptiveSizePolicy && Verbose) { 111.66 gclog_or_tty->print_cr(" [eden_start .. eden_end): " 111.67 "[" PTR_FORMAT " .. " PTR_FORMAT ") " SIZE_FORMAT, 111.68 - eden_start, 111.69 - eden_end, 111.70 + p2i(eden_start), 111.71 + p2i(eden_end), 111.72 pointer_delta(eden_end, eden_start, sizeof(char))); 111.73 gclog_or_tty->print_cr(" [ to_start .. to_end): " 111.74 "[" PTR_FORMAT " .. " PTR_FORMAT ") " SIZE_FORMAT, 111.75 - to_start, 111.76 - to_end, 111.77 + p2i(to_start), 111.78 + p2i(to_end), 111.79 pointer_delta( to_end, to_start, sizeof(char))); 111.80 gclog_or_tty->print_cr(" [from_start .. from_end): " 111.81 "[" PTR_FORMAT " .. " PTR_FORMAT ") " SIZE_FORMAT, 111.82 - from_start, 111.83 - from_end, 111.84 + p2i(from_start), 111.85 + p2i(from_end), 111.86 pointer_delta(from_end, from_start, sizeof(char))); 111.87 } 111.88 }
112.1 --- a/src/share/vm/gc_implementation/parNew/parCardTableModRefBS.cpp Thu May 15 18:23:26 2014 -0400 112.2 +++ b/src/share/vm/gc_implementation/parNew/parCardTableModRefBS.cpp Thu May 22 15:52:41 2014 -0400 112.3 @@ -1,5 +1,5 @@ 112.4 /* 112.5 - * Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved. 112.6 + * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved. 112.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 112.8 * 112.9 * This code is free software; you can redistribute it and/or modify it 112.10 @@ -35,6 +35,8 @@ 112.11 #include "runtime/virtualspace.hpp" 112.12 #include "runtime/vmThread.hpp" 112.13 112.14 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 112.15 + 112.16 void CardTableModRefBS::non_clean_card_iterate_parallel_work(Space* sp, MemRegion mr, 112.17 OopsInGenClosure* cl, 112.18 CardTableRS* ct,
113.1 --- a/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp Thu May 15 18:23:26 2014 -0400 113.2 +++ b/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp Thu May 22 15:52:41 2014 -0400 113.3 @@ -1,5 +1,5 @@ 113.4 /* 113.5 - * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. 113.6 + * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved. 113.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 113.8 * 113.9 * This code is free software; you can redistribute it and/or modify it 113.10 @@ -55,6 +55,8 @@ 113.11 #include "utilities/globalDefinitions.hpp" 113.12 #include "utilities/workgroup.hpp" 113.13 113.14 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 113.15 + 113.16 #ifdef _MSC_VER 113.17 #pragma warning( push ) 113.18 #pragma warning( disable:4355 ) // 'this' : used in base member initializer list
114.1 --- a/src/share/vm/gc_implementation/parNew/parOopClosures.inline.hpp Thu May 15 18:23:26 2014 -0400 114.2 +++ b/src/share/vm/gc_implementation/parNew/parOopClosures.inline.hpp Thu May 22 15:52:41 2014 -0400 114.3 @@ -1,5 +1,5 @@ 114.4 /* 114.5 - * Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved. 114.6 + * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved. 114.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 114.8 * 114.9 * This code is free software; you can redistribute it and/or modify it 114.10 @@ -79,12 +79,12 @@ 114.11 if ((HeapWord*)obj < _boundary) { 114.12 #ifndef PRODUCT 114.13 if (_g->to()->is_in_reserved(obj)) { 114.14 - tty->print_cr("Scanning field (" PTR_FORMAT ") twice?", p); 114.15 + tty->print_cr("Scanning field (" PTR_FORMAT ") twice?", p2i(p)); 114.16 GenCollectedHeap* gch = (GenCollectedHeap*)Universe::heap(); 114.17 Space* sp = gch->space_containing(p); 114.18 oop obj = oop(sp->block_start(p)); 114.19 assert((HeapWord*)obj < (HeapWord*)p, "Error"); 114.20 - tty->print_cr("Object: " PTR_FORMAT, (void *)obj); 114.21 + tty->print_cr("Object: " PTR_FORMAT, p2i((void *)obj)); 114.22 tty->print_cr("-------"); 114.23 obj->print(); 114.24 tty->print_cr("-----"); 114.25 @@ -110,7 +110,7 @@ 114.26 if (TraceScavenge) { 114.27 gclog_or_tty->print_cr("{%s %s ( " PTR_FORMAT " ) " PTR_FORMAT " -> " PTR_FORMAT " (%d)}", 114.28 "forwarded ", 114.29 - new_obj->klass()->internal_name(), p, (void *)obj, (void *)new_obj, new_obj->size()); 114.30 + new_obj->klass()->internal_name(), p2i(p), p2i((void *)obj), p2i((void *)new_obj), new_obj->size()); 114.31 } 114.32 #endif 114.33
115.1 --- a/src/share/vm/gc_implementation/parallelScavenge/adjoiningGenerations.cpp Thu May 15 18:23:26 2014 -0400 115.2 +++ b/src/share/vm/gc_implementation/parallelScavenge/adjoiningGenerations.cpp Thu May 22 15:52:41 2014 -0400 115.3 @@ -1,5 +1,5 @@ 115.4 /* 115.5 - * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. 115.6 + * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved. 115.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 115.8 * 115.9 * This code is free software; you can redistribute it and/or modify it 115.10 @@ -143,7 +143,7 @@ 115.11 115.12 if (TraceAdaptiveGCBoundary) { 115.13 gclog_or_tty->print_cr("Before expansion of old gen with boundary move"); 115.14 - gclog_or_tty->print_cr(" Requested change: 0x%x Attempted change: 0x%x", 115.15 + gclog_or_tty->print_cr(" Requested change: " SIZE_FORMAT_HEX " Attempted change: " SIZE_FORMAT_HEX, 115.16 expand_in_bytes, change_in_bytes); 115.17 if (!PrintHeapAtGC) { 115.18 Universe::print_on(gclog_or_tty); 115.19 @@ -201,7 +201,7 @@ 115.20 115.21 if (TraceAdaptiveGCBoundary) { 115.22 gclog_or_tty->print_cr("Before expansion of young gen with boundary move"); 115.23 - gclog_or_tty->print_cr(" Requested change: 0x%x Attempted change: 0x%x", 115.24 + gclog_or_tty->print_cr(" Requested change: " SIZE_FORMAT_HEX " Attempted change: " SIZE_FORMAT_HEX, 115.25 expand_in_bytes, change_in_bytes); 115.26 if (!PrintHeapAtGC) { 115.27 Universe::print_on(gclog_or_tty);
116.1 --- a/src/share/vm/gc_implementation/parallelScavenge/asPSOldGen.cpp Thu May 15 18:23:26 2014 -0400 116.2 +++ b/src/share/vm/gc_implementation/parallelScavenge/asPSOldGen.cpp Thu May 22 15:52:41 2014 -0400 116.3 @@ -1,5 +1,5 @@ 116.4 /* 116.5 - * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. 116.6 + * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved. 116.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 116.8 * 116.9 * This code is free software; you can redistribute it and/or modify it 116.10 @@ -127,22 +127,22 @@ 116.11 size_t result_aligned = align_size_down(result, gen_alignment); 116.12 if (PrintAdaptiveSizePolicy && Verbose) { 116.13 gclog_or_tty->print_cr("\nASPSOldGen::available_for_contraction:" 116.14 - " %d K / 0x%x", result_aligned/K, result_aligned); 116.15 - gclog_or_tty->print_cr(" reserved().byte_size() %d K / 0x%x ", 116.16 - reserved().byte_size()/K, reserved().byte_size()); 116.17 + " " SSIZE_FORMAT " K / " SIZE_FORMAT_HEX, (result_aligned/K), result_aligned); 116.18 + gclog_or_tty->print_cr(" reserved().byte_size() " SSIZE_FORMAT " K / " SIZE_FORMAT_HEX " ", 116.19 + (reserved().byte_size()/K), reserved().byte_size()); 116.20 size_t working_promoted = (size_t) policy->avg_promoted()->padded_average(); 116.21 - gclog_or_tty->print_cr(" padded promoted %d K / 0x%x", 116.22 - working_promoted/K, working_promoted); 116.23 - gclog_or_tty->print_cr(" used %d K / 0x%x", 116.24 - used_in_bytes()/K, used_in_bytes()); 116.25 - gclog_or_tty->print_cr(" min_gen_size() %d K / 0x%x", 116.26 - min_gen_size()/K, min_gen_size()); 116.27 - gclog_or_tty->print_cr(" max_contraction %d K / 0x%x", 116.28 - max_contraction/K, max_contraction); 116.29 - gclog_or_tty->print_cr(" without alignment %d K / 0x%x", 116.30 - policy->promo_increment(max_contraction)/K, 116.31 + gclog_or_tty->print_cr(" padded promoted " SSIZE_FORMAT " K / " SIZE_FORMAT_HEX, 116.32 + (working_promoted/K), working_promoted); 116.33 + gclog_or_tty->print_cr(" used " SSIZE_FORMAT " K / " SIZE_FORMAT_HEX, 116.34 + (used_in_bytes()/K), used_in_bytes()); 116.35 + gclog_or_tty->print_cr(" min_gen_size() " SSIZE_FORMAT " K / " SIZE_FORMAT_HEX, 116.36 + (min_gen_size()/K), min_gen_size()); 116.37 + gclog_or_tty->print_cr(" max_contraction " SSIZE_FORMAT " K / " SIZE_FORMAT_HEX, 116.38 + (max_contraction/K), max_contraction); 116.39 + gclog_or_tty->print_cr(" without alignment " SSIZE_FORMAT " K / " SIZE_FORMAT_HEX, 116.40 + (policy->promo_increment(max_contraction)/K), 116.41 policy->promo_increment(max_contraction)); 116.42 - gclog_or_tty->print_cr(" alignment 0x%x", gen_alignment); 116.43 + gclog_or_tty->print_cr(" alignment " SIZE_FORMAT_HEX, gen_alignment); 116.44 } 116.45 assert(result_aligned <= max_contraction, "arithmetic is wrong"); 116.46 return result_aligned;
117.1 --- a/src/share/vm/gc_implementation/parallelScavenge/asPSYoungGen.cpp Thu May 15 18:23:26 2014 -0400 117.2 +++ b/src/share/vm/gc_implementation/parallelScavenge/asPSYoungGen.cpp Thu May 22 15:52:41 2014 -0400 117.3 @@ -1,5 +1,5 @@ 117.4 /* 117.5 - * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. 117.6 + * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved. 117.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 117.8 * 117.9 * This code is free software; you can redistribute it and/or modify it 117.10 @@ -112,11 +112,11 @@ 117.11 size_t result = policy->eden_increment_aligned_down(max_contraction); 117.12 size_t result_aligned = align_size_down(result, gen_alignment); 117.13 if (PrintAdaptiveSizePolicy && Verbose) { 117.14 - gclog_or_tty->print_cr("ASPSYoungGen::available_for_contraction: %d K", 117.15 + gclog_or_tty->print_cr("ASPSYoungGen::available_for_contraction: " SIZE_FORMAT " K", 117.16 result_aligned/K); 117.17 - gclog_or_tty->print_cr(" max_contraction %d K", max_contraction/K); 117.18 - gclog_or_tty->print_cr(" eden_avail %d K", eden_avail/K); 117.19 - gclog_or_tty->print_cr(" gen_avail %d K", gen_avail/K); 117.20 + gclog_or_tty->print_cr(" max_contraction " SIZE_FORMAT " K", max_contraction/K); 117.21 + gclog_or_tty->print_cr(" eden_avail " SIZE_FORMAT " K", eden_avail/K); 117.22 + gclog_or_tty->print_cr(" gen_avail " SIZE_FORMAT " K", gen_avail/K); 117.23 } 117.24 return result_aligned; 117.25 } 117.26 @@ -252,22 +252,22 @@ 117.27 requested_eden_size, requested_survivor_size); 117.28 gclog_or_tty->print_cr(" eden: [" PTR_FORMAT ".." PTR_FORMAT ") " 117.29 SIZE_FORMAT, 117.30 - eden_space()->bottom(), 117.31 - eden_space()->end(), 117.32 + p2i(eden_space()->bottom()), 117.33 + p2i(eden_space()->end()), 117.34 pointer_delta(eden_space()->end(), 117.35 eden_space()->bottom(), 117.36 sizeof(char))); 117.37 gclog_or_tty->print_cr(" from: [" PTR_FORMAT ".." PTR_FORMAT ") " 117.38 SIZE_FORMAT, 117.39 - from_space()->bottom(), 117.40 - from_space()->end(), 117.41 + p2i(from_space()->bottom()), 117.42 + p2i(from_space()->end()), 117.43 pointer_delta(from_space()->end(), 117.44 from_space()->bottom(), 117.45 sizeof(char))); 117.46 gclog_or_tty->print_cr(" to: [" PTR_FORMAT ".." PTR_FORMAT ") " 117.47 SIZE_FORMAT, 117.48 - to_space()->bottom(), 117.49 - to_space()->end(), 117.50 + p2i(to_space()->bottom()), 117.51 + p2i(to_space()->end()), 117.52 pointer_delta( to_space()->end(), 117.53 to_space()->bottom(), 117.54 sizeof(char))); 117.55 @@ -373,18 +373,18 @@ 117.56 if (PrintAdaptiveSizePolicy && Verbose) { 117.57 gclog_or_tty->print_cr(" [eden_start .. eden_end): " 117.58 "[" PTR_FORMAT " .. " PTR_FORMAT ") " SIZE_FORMAT, 117.59 - eden_start, 117.60 - eden_end, 117.61 + p2i(eden_start), 117.62 + p2i(eden_end), 117.63 pointer_delta(eden_end, eden_start, sizeof(char))); 117.64 gclog_or_tty->print_cr(" [from_start .. from_end): " 117.65 "[" PTR_FORMAT " .. " PTR_FORMAT ") " SIZE_FORMAT, 117.66 - from_start, 117.67 - from_end, 117.68 + p2i(from_start), 117.69 + p2i(from_end), 117.70 pointer_delta(from_end, from_start, sizeof(char))); 117.71 gclog_or_tty->print_cr(" [ to_start .. to_end): " 117.72 "[" PTR_FORMAT " .. " PTR_FORMAT ") " SIZE_FORMAT, 117.73 - to_start, 117.74 - to_end, 117.75 + p2i(to_start), 117.76 + p2i(to_end), 117.77 pointer_delta( to_end, to_start, sizeof(char))); 117.78 } 117.79 } else { 117.80 @@ -427,18 +427,18 @@ 117.81 if (PrintAdaptiveSizePolicy && Verbose) { 117.82 gclog_or_tty->print_cr(" [eden_start .. eden_end): " 117.83 "[" PTR_FORMAT " .. " PTR_FORMAT ") " SIZE_FORMAT, 117.84 - eden_start, 117.85 - eden_end, 117.86 + p2i(eden_start), 117.87 + p2i(eden_end), 117.88 pointer_delta(eden_end, eden_start, sizeof(char))); 117.89 gclog_or_tty->print_cr(" [ to_start .. to_end): " 117.90 "[" PTR_FORMAT " .. " PTR_FORMAT ") " SIZE_FORMAT, 117.91 - to_start, 117.92 - to_end, 117.93 + p2i(to_start), 117.94 + p2i(to_end), 117.95 pointer_delta( to_end, to_start, sizeof(char))); 117.96 gclog_or_tty->print_cr(" [from_start .. from_end): " 117.97 "[" PTR_FORMAT " .. " PTR_FORMAT ") " SIZE_FORMAT, 117.98 - from_start, 117.99 - from_end, 117.100 + p2i(from_start), 117.101 + p2i(from_end), 117.102 pointer_delta(from_end, from_start, sizeof(char))); 117.103 } 117.104 }
118.1 --- a/src/share/vm/gc_implementation/parallelScavenge/cardTableExtension.cpp Thu May 15 18:23:26 2014 -0400 118.2 +++ b/src/share/vm/gc_implementation/parallelScavenge/cardTableExtension.cpp Thu May 22 15:52:41 2014 -0400 118.3 @@ -1,5 +1,5 @@ 118.4 /* 118.5 - * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. 118.6 + * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved. 118.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 118.8 * 118.9 * This code is free software; you can redistribute it and/or modify it 118.10 @@ -478,23 +478,23 @@ 118.11 gclog_or_tty->print_cr(" " 118.12 " _covered[%d].start(): " INTPTR_FORMAT 118.13 " _covered[%d].last(): " INTPTR_FORMAT, 118.14 - ind, _covered[ind].start(), 118.15 - ind, _covered[ind].last()); 118.16 + ind, p2i(_covered[ind].start()), 118.17 + ind, p2i(_covered[ind].last())); 118.18 gclog_or_tty->print_cr(" " 118.19 " _committed[%d].start(): " INTPTR_FORMAT 118.20 " _committed[%d].last(): " INTPTR_FORMAT, 118.21 - ind, _committed[ind].start(), 118.22 - ind, _committed[ind].last()); 118.23 + ind, p2i(_committed[ind].start()), 118.24 + ind, p2i(_committed[ind].last())); 118.25 gclog_or_tty->print_cr(" " 118.26 " byte_for(start): " INTPTR_FORMAT 118.27 " byte_for(last): " INTPTR_FORMAT, 118.28 - byte_for(_covered[ind].start()), 118.29 - byte_for(_covered[ind].last())); 118.30 + p2i(byte_for(_covered[ind].start())), 118.31 + p2i(byte_for(_covered[ind].last()))); 118.32 gclog_or_tty->print_cr(" " 118.33 " addr_for(start): " INTPTR_FORMAT 118.34 " addr_for(last): " INTPTR_FORMAT, 118.35 - addr_for((jbyte*) _committed[ind].start()), 118.36 - addr_for((jbyte*) _committed[ind].last())); 118.37 + p2i(addr_for((jbyte*) _committed[ind].start())), 118.38 + p2i(addr_for((jbyte*) _committed[ind].last()))); 118.39 } 118.40 debug_only(verify_guard();) 118.41 }
119.1 --- a/src/share/vm/gc_implementation/parallelScavenge/gcTaskManager.cpp Thu May 15 18:23:26 2014 -0400 119.2 +++ b/src/share/vm/gc_implementation/parallelScavenge/gcTaskManager.cpp Thu May 22 15:52:41 2014 -0400 119.3 @@ -1,5 +1,5 @@ 119.4 /* 119.5 - * Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved. 119.6 + * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved. 119.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 119.8 * 119.9 * This code is free software; you can redistribute it and/or modify it 119.10 @@ -31,6 +31,8 @@ 119.11 #include "runtime/mutex.hpp" 119.12 #include "runtime/mutexLocker.hpp" 119.13 119.14 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 119.15 + 119.16 // 119.17 // GCTask 119.18 //
120.1 --- a/src/share/vm/gc_implementation/parallelScavenge/gcTaskThread.cpp Thu May 15 18:23:26 2014 -0400 120.2 +++ b/src/share/vm/gc_implementation/parallelScavenge/gcTaskThread.cpp Thu May 22 15:52:41 2014 -0400 120.3 @@ -1,6 +1,6 @@ 120.4 120.5 /* 120.6 - * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved. 120.7 + * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved. 120.8 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 120.9 * 120.10 * This code is free software; you can redistribute it and/or modify it 120.11 @@ -34,6 +34,8 @@ 120.12 #include "runtime/os.hpp" 120.13 #include "runtime/thread.hpp" 120.14 120.15 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 120.16 + 120.17 GCTaskThread::GCTaskThread(GCTaskManager* manager, 120.18 uint which, 120.19 uint processor_id) :
121.1 --- a/src/share/vm/gc_implementation/parallelScavenge/parMarkBitMap.hpp Thu May 15 18:23:26 2014 -0400 121.2 +++ b/src/share/vm/gc_implementation/parallelScavenge/parMarkBitMap.hpp Thu May 22 15:52:41 2014 -0400 121.3 @@ -1,5 +1,5 @@ 121.4 /* 121.5 - * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. 121.6 + * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved. 121.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 121.8 * 121.9 * This code is free software; you can redistribute it and/or modify it 121.10 @@ -155,7 +155,7 @@ 121.11 static inline idx_t bits_required(MemRegion covered_region); 121.12 121.13 void print_on_error(outputStream* st) const { 121.14 - st->print_cr("Marking Bits: (ParMarkBitMap*) " PTR_FORMAT, this); 121.15 + st->print_cr("Marking Bits: (ParMarkBitMap*) " PTR_FORMAT, p2i(this)); 121.16 _beg_bits.print_on_error(st, " Begin Bits: "); 121.17 _end_bits.print_on_error(st, " End Bits: "); 121.18 } 121.19 @@ -390,9 +390,9 @@ 121.20 inline void ParMarkBitMap::verify_addr(HeapWord* addr) const { 121.21 // Allow one past the last valid address; useful for loop bounds. 121.22 assert(addr >= region_start(), 121.23 - err_msg("addr too small, addr: " PTR_FORMAT " region start: " PTR_FORMAT, addr, region_start())); 121.24 + err_msg("addr too small, addr: " PTR_FORMAT " region start: " PTR_FORMAT, p2i(addr), p2i(region_start()))); 121.25 assert(addr <= region_end(), 121.26 - err_msg("addr too big, addr: " PTR_FORMAT " region end: " PTR_FORMAT, addr, region_end())); 121.27 + err_msg("addr too big, addr: " PTR_FORMAT " region end: " PTR_FORMAT, p2i(addr), p2i(region_end()))); 121.28 } 121.29 #endif // #ifdef ASSERT 121.30
122.1 --- a/src/share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.cpp Thu May 15 18:23:26 2014 -0400 122.2 +++ b/src/share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.cpp Thu May 22 15:52:41 2014 -0400 122.3 @@ -1,5 +1,5 @@ 122.4 /* 122.5 - * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. 122.6 + * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved. 122.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 122.8 * 122.9 * This code is free software; you can redistribute it and/or modify it 122.10 @@ -373,7 +373,7 @@ 122.11 if ((result == NULL) && (QueuedAllocationWarningCount > 0) && 122.12 (loop_count % QueuedAllocationWarningCount == 0)) { 122.13 warning("ParallelScavengeHeap::mem_allocate retries %d times \n\t" 122.14 - " size=%d", loop_count, size); 122.15 + " size=" SIZE_FORMAT, loop_count, size); 122.16 } 122.17 } 122.18
123.1 --- a/src/share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.inline.hpp Thu May 15 18:23:26 2014 -0400 123.2 +++ b/src/share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.inline.hpp Thu May 22 15:52:41 2014 -0400 123.3 @@ -1,5 +1,5 @@ 123.4 /* 123.5 - * Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved. 123.6 + * Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved. 123.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 123.8 * 123.9 * This code is free software; you can redistribute it and/or modify it 123.10 @@ -52,7 +52,7 @@ 123.11 const void* loc = (void*) p; 123.12 bool result = ((HeapWord*)p) >= young_gen()->reserved().start(); 123.13 assert(result == young_gen()->is_in_reserved(p), 123.14 - err_msg("incorrect test - result=%d, p=" PTR_FORMAT, result, (void*)p)); 123.15 + err_msg("incorrect test - result=%d, p=" PTR_FORMAT, result, p2i((void*)p))); 123.16 return result; 123.17 } 123.18 #endif // SHARE_VM_GC_IMPLEMENTATION_PARALLELSCAVENGE_PARALLELSCAVENGEHEAP_INLINE_HPP
124.1 --- a/src/share/vm/gc_implementation/parallelScavenge/pcTasks.cpp Thu May 15 18:23:26 2014 -0400 124.2 +++ b/src/share/vm/gc_implementation/parallelScavenge/pcTasks.cpp Thu May 22 15:52:41 2014 -0400 124.3 @@ -1,5 +1,5 @@ 124.4 /* 124.5 - * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. 124.6 + * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved. 124.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 124.8 * 124.9 * This code is free software; you can redistribute it and/or modify it 124.10 @@ -41,6 +41,8 @@ 124.11 #include "runtime/vmThread.hpp" 124.12 #include "services/management.hpp" 124.13 124.14 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 124.15 + 124.16 // 124.17 // ThreadRootsMarkingTask 124.18 //
125.1 --- a/src/share/vm/gc_implementation/parallelScavenge/psAdaptiveSizePolicy.cpp Thu May 15 18:23:26 2014 -0400 125.2 +++ b/src/share/vm/gc_implementation/parallelScavenge/psAdaptiveSizePolicy.cpp Thu May 22 15:52:41 2014 -0400 125.3 @@ -1,5 +1,5 @@ 125.4 /* 125.5 - * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved. 125.6 + * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved. 125.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 125.8 * 125.9 * This code is free software; you can redistribute it and/or modify it 125.10 @@ -35,6 +35,8 @@ 125.11 125.12 #include <math.h> 125.13 125.14 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 125.15 + 125.16 PSAdaptiveSizePolicy::PSAdaptiveSizePolicy(size_t init_eden_size, 125.17 size_t init_promo_size, 125.18 size_t init_survivor_size, 125.19 @@ -1033,7 +1035,7 @@ 125.20 "AdaptiveSizePolicy::adjust_promo_for_footprint " 125.21 "adjusting tenured gen for footprint. " 125.22 "starting promo size " SIZE_FORMAT 125.23 - " reduced promo size " SIZE_FORMAT, 125.24 + " reduced promo size " SIZE_FORMAT 125.25 " promo delta " SIZE_FORMAT, 125.26 desired_promo_size, reduced_size, change ); 125.27 }
126.1 --- a/src/share/vm/gc_implementation/parallelScavenge/psMarkSweep.cpp Thu May 15 18:23:26 2014 -0400 126.2 +++ b/src/share/vm/gc_implementation/parallelScavenge/psMarkSweep.cpp Thu May 22 15:52:41 2014 -0400 126.3 @@ -1,5 +1,5 @@ 126.4 /* 126.5 - * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. 126.6 + * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved. 126.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 126.8 * 126.9 * This code is free software; you can redistribute it and/or modify it 126.10 @@ -54,6 +54,8 @@ 126.11 #include "utilities/events.hpp" 126.12 #include "utilities/stack.inline.hpp" 126.13 126.14 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 126.15 + 126.16 elapsedTimer PSMarkSweep::_accumulated_time; 126.17 jlong PSMarkSweep::_time_of_last_gc = 0; 126.18 CollectorCounters* PSMarkSweep::_counters = NULL;
127.1 --- a/src/share/vm/gc_implementation/parallelScavenge/psOldGen.cpp Thu May 15 18:23:26 2014 -0400 127.2 +++ b/src/share/vm/gc_implementation/parallelScavenge/psOldGen.cpp Thu May 22 15:52:41 2014 -0400 127.3 @@ -1,5 +1,5 @@ 127.4 /* 127.5 - * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. 127.6 + * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved. 127.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 127.8 * 127.9 * This code is free software; you can redistribute it and/or modify it 127.10 @@ -33,6 +33,8 @@ 127.11 #include "oops/oop.inline.hpp" 127.12 #include "runtime/java.hpp" 127.13 127.14 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 127.15 + 127.16 inline const char* PSOldGen::select_name() { 127.17 return UseParallelOldGC ? "ParOldGen" : "PSOldGen"; 127.18 }
128.1 --- a/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp Thu May 15 18:23:26 2014 -0400 128.2 +++ b/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp Thu May 22 15:52:41 2014 -0400 128.3 @@ -1,5 +1,5 @@ 128.4 /* 128.5 - * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. 128.6 + * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved. 128.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 128.8 * 128.9 * This code is free software; you can redistribute it and/or modify it 128.10 @@ -61,6 +61,8 @@ 128.11 128.12 #include <math.h> 128.13 128.14 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 128.15 + 128.16 // All sizes are in HeapWords. 128.17 const size_t ParallelCompactData::Log2RegionSize = 16; // 64K words 128.18 const size_t ParallelCompactData::RegionSize = (size_t)1 << Log2RegionSize;
129.1 --- a/src/share/vm/gc_implementation/parallelScavenge/psPromotionManager.cpp Thu May 15 18:23:26 2014 -0400 129.2 +++ b/src/share/vm/gc_implementation/parallelScavenge/psPromotionManager.cpp Thu May 22 15:52:41 2014 -0400 129.3 @@ -1,5 +1,5 @@ 129.4 /* 129.5 - * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved. 129.6 + * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved. 129.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 129.8 * 129.9 * This code is free software; you can redistribute it and/or modify it 129.10 @@ -35,6 +35,8 @@ 129.11 #include "oops/oop.inline.hpp" 129.12 #include "oops/oop.psgc.inline.hpp" 129.13 129.14 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 129.15 + 129.16 PaddedEnd<PSPromotionManager>* PSPromotionManager::_manager_array = NULL; 129.17 OopStarTaskQueueSet* PSPromotionManager::_stack_array_depth = NULL; 129.18 PSOldGen* PSPromotionManager::_old_gen = NULL; 129.19 @@ -136,7 +138,7 @@ 129.20 } 129.21 129.22 const uint hlines = sizeof(pm_stats_hdr) / sizeof(pm_stats_hdr[0]); 129.23 - for (uint i = 0; i < hlines; ++i) tty->print_cr(pm_stats_hdr[i]); 129.24 + for (uint i = 0; i < hlines; ++i) tty->print_cr("%s", pm_stats_hdr[i]); 129.25 for (uint i = 0; i < ParallelGCThreads + 1; ++i) { 129.26 manager_array(i)->print_local_stats(i); 129.27 }
130.1 --- a/src/share/vm/gc_implementation/parallelScavenge/psPromotionManager.inline.hpp Thu May 15 18:23:26 2014 -0400 130.2 +++ b/src/share/vm/gc_implementation/parallelScavenge/psPromotionManager.inline.hpp Thu May 22 15:52:41 2014 -0400 130.3 @@ -1,5 +1,5 @@ 130.4 /* 130.5 - * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved. 130.6 + * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved. 130.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 130.8 * 130.9 * This code is free software; you can redistribute it and/or modify it 130.10 @@ -226,7 +226,7 @@ 130.11 if (TraceScavenge) { 130.12 gclog_or_tty->print_cr("{%s %s " PTR_FORMAT " -> " PTR_FORMAT " (%d)}", 130.13 PSScavenge::should_scavenge(&new_obj) ? "copying" : "tenuring", 130.14 - new_obj->klass()->internal_name(), (void *)o, (void *)new_obj, new_obj->size()); 130.15 + new_obj->klass()->internal_name(), p2i((void *)o), p2i((void *)new_obj), new_obj->size()); 130.16 } 130.17 #endif 130.18
131.1 --- a/src/share/vm/gc_implementation/parallelScavenge/psScavenge.cpp Thu May 15 18:23:26 2014 -0400 131.2 +++ b/src/share/vm/gc_implementation/parallelScavenge/psScavenge.cpp Thu May 22 15:52:41 2014 -0400 131.3 @@ -56,6 +56,7 @@ 131.4 #include "services/memoryService.hpp" 131.5 #include "utilities/stack.inline.hpp" 131.6 131.7 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 131.8 131.9 HeapWord* PSScavenge::_to_space_top_before_gc = NULL; 131.10 int PSScavenge::_consecutive_skipped_scavenges = 0;
132.1 --- a/src/share/vm/gc_implementation/parallelScavenge/psScavenge.inline.hpp Thu May 15 18:23:26 2014 -0400 132.2 +++ b/src/share/vm/gc_implementation/parallelScavenge/psScavenge.inline.hpp Thu May 22 15:52:41 2014 -0400 132.3 @@ -1,5 +1,5 @@ 132.4 /* 132.5 - * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved. 132.6 + * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved. 132.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 132.8 * 132.9 * This code is free software; you can redistribute it and/or modify it 132.10 @@ -81,7 +81,7 @@ 132.11 if (TraceScavenge && o->is_forwarded()) { 132.12 gclog_or_tty->print_cr("{%s %s " PTR_FORMAT " -> " PTR_FORMAT " (%d)}", 132.13 "forwarding", 132.14 - new_obj->klass()->internal_name(), (void *)o, (void *)new_obj, new_obj->size()); 132.15 + new_obj->klass()->internal_name(), p2i((void *)o), p2i((void *)new_obj), new_obj->size()); 132.16 } 132.17 #endif 132.18
133.1 --- a/src/share/vm/gc_implementation/parallelScavenge/psVirtualspace.cpp Thu May 15 18:23:26 2014 -0400 133.2 +++ b/src/share/vm/gc_implementation/parallelScavenge/psVirtualspace.cpp Thu May 22 15:52:41 2014 -0400 133.3 @@ -1,5 +1,5 @@ 133.4 /* 133.5 - * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. 133.6 + * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved. 133.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 133.8 * 133.9 * This code is free software; you can redistribute it and/or modify it 133.10 @@ -42,6 +42,8 @@ 133.11 # include "os_bsd.inline.hpp" 133.12 #endif 133.13 133.14 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 133.15 + 133.16 // PSVirtualSpace 133.17 133.18 PSVirtualSpace::PSVirtualSpace(ReservedSpace rs, size_t alignment) :
134.1 --- a/src/share/vm/gc_implementation/parallelScavenge/psYoungGen.cpp Thu May 15 18:23:26 2014 -0400 134.2 +++ b/src/share/vm/gc_implementation/parallelScavenge/psYoungGen.cpp Thu May 22 15:52:41 2014 -0400 134.3 @@ -1,5 +1,5 @@ 134.4 /* 134.5 - * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. 134.6 + * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved. 134.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 134.8 * 134.9 * This code is free software; you can redistribute it and/or modify it 134.10 @@ -33,6 +33,8 @@ 134.11 #include "oops/oop.inline.hpp" 134.12 #include "runtime/java.hpp" 134.13 134.14 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 134.15 + 134.16 PSYoungGen::PSYoungGen(size_t initial_size, 134.17 size_t min_size, 134.18 size_t max_size) :
135.1 --- a/src/share/vm/gc_implementation/shared/adaptiveSizePolicy.cpp Thu May 15 18:23:26 2014 -0400 135.2 +++ b/src/share/vm/gc_implementation/shared/adaptiveSizePolicy.cpp Thu May 22 15:52:41 2014 -0400 135.3 @@ -1,5 +1,5 @@ 135.4 /* 135.5 - * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved. 135.6 + * Copyright (c) 2004, 2014, Oracle and/or its affiliates. All rights reserved. 135.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 135.8 * 135.9 * This code is free software; you can redistribute it and/or modify it 135.10 @@ -171,8 +171,8 @@ 135.11 "active_workers(): %d new_acitve_workers: %d " 135.12 "prev_active_workers: %d\n" 135.13 " active_workers_by_JT: %d active_workers_by_heap_size: %d", 135.14 - active_workers, new_active_workers, prev_active_workers, 135.15 - active_workers_by_JT, active_workers_by_heap_size); 135.16 + (int) active_workers, (int) new_active_workers, (int) prev_active_workers, 135.17 + (int) active_workers_by_JT, (int) active_workers_by_heap_size); 135.18 } 135.19 assert(new_active_workers > 0, "Always need at least 1"); 135.20 return new_active_workers; 135.21 @@ -545,13 +545,13 @@ 135.22 if (UseGCOverheadLimit && PrintGCDetails && Verbose) { 135.23 if (gc_overhead_limit_exceeded()) { 135.24 gclog_or_tty->print_cr(" GC is exceeding overhead limit " 135.25 - "of %d%%", GCTimeLimit); 135.26 + "of %d%%", (int) GCTimeLimit); 135.27 reset_gc_overhead_limit_count(); 135.28 } else if (print_gc_overhead_limit_would_be_exceeded) { 135.29 assert(gc_overhead_limit_count() > 0, "Should not be printing"); 135.30 gclog_or_tty->print_cr(" GC would exceed overhead limit " 135.31 "of %d%% %d consecutive time(s)", 135.32 - GCTimeLimit, gc_overhead_limit_count()); 135.33 + (int) GCTimeLimit, gc_overhead_limit_count()); 135.34 } 135.35 } 135.36 }
136.1 --- a/src/share/vm/gc_implementation/shared/ageTable.cpp Thu May 15 18:23:26 2014 -0400 136.2 +++ b/src/share/vm/gc_implementation/shared/ageTable.cpp Thu May 22 15:52:41 2014 -0400 136.3 @@ -1,5 +1,5 @@ 136.4 /* 136.5 - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 136.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 136.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 136.8 * 136.9 * This code is free software; you can redistribute it and/or modify it 136.10 @@ -97,7 +97,7 @@ 136.11 if (PrintTenuringDistribution) { 136.12 gclog_or_tty->cr(); 136.13 gclog_or_tty->print_cr("Desired survivor size " SIZE_FORMAT " bytes, new threshold %u (max %u)", 136.14 - desired_survivor_size*oopSize, result, MaxTenuringThreshold); 136.15 + desired_survivor_size*oopSize, result, (int) MaxTenuringThreshold); 136.16 } 136.17 136.18 total = 0; 136.19 @@ -106,8 +106,8 @@ 136.20 total += sizes[age]; 136.21 if (sizes[age] > 0) { 136.22 if (PrintTenuringDistribution) { 136.23 - gclog_or_tty->print_cr("- age %3u: %10ld bytes, %10ld total", 136.24 - age, sizes[age]*oopSize, total*oopSize); 136.25 + gclog_or_tty->print_cr("- age %3u: " SIZE_FORMAT_W(10) " bytes, " SIZE_FORMAT_W(10) " total", 136.26 + age, sizes[age]*oopSize, total*oopSize); 136.27 } 136.28 } 136.29 if (UsePerfData) {
137.1 --- a/src/share/vm/gc_implementation/shared/allocationStats.hpp Thu May 15 18:23:26 2014 -0400 137.2 +++ b/src/share/vm/gc_implementation/shared/allocationStats.hpp Thu May 22 15:52:41 2014 -0400 137.3 @@ -1,5 +1,5 @@ 137.4 /* 137.5 - * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. 137.6 + * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved. 137.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 137.8 * 137.9 * This code is free software; you can redistribute it and/or modify it 137.10 @@ -107,7 +107,7 @@ 137.11 assert(demand >= 0, 137.12 err_msg("Demand (" SSIZE_FORMAT ") should be non-negative for " 137.13 PTR_FORMAT " (size=" SIZE_FORMAT ")", 137.14 - demand, this, count)); 137.15 + demand, p2i(this), count)); 137.16 // Defensive: adjust for imprecision in event counting 137.17 if (demand < 0) { 137.18 demand = 0; 137.19 @@ -120,8 +120,9 @@ 137.20 float delta_ise = (CMSExtrapolateSweep ? intra_sweep_estimate : 0.0); 137.21 _desired = (ssize_t)(new_rate * (inter_sweep_estimate + delta_ise)); 137.22 if (PrintFLSStatistics > 1) { 137.23 - gclog_or_tty->print_cr("demand: %d, old_rate: %f, current_rate: %f, new_rate: %f, old_desired: %d, new_desired: %d", 137.24 - demand, old_rate, rate, new_rate, old_desired, _desired); 137.25 + gclog_or_tty->print_cr( 137.26 + "demand: " SSIZE_FORMAT ", old_rate: %f, current_rate: %f, new_rate: %f, old_desired: " SSIZE_FORMAT ", new_desired: " SSIZE_FORMAT, 137.27 + demand, old_rate, rate, new_rate, old_desired, _desired); 137.28 } 137.29 } 137.30 }
138.1 --- a/src/share/vm/gc_implementation/shared/immutableSpace.cpp Thu May 15 18:23:26 2014 -0400 138.2 +++ b/src/share/vm/gc_implementation/shared/immutableSpace.cpp Thu May 22 15:52:41 2014 -0400 138.3 @@ -1,5 +1,5 @@ 138.4 /* 138.5 - * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. 138.6 + * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved. 138.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 138.8 * 138.9 * This code is free software; you can redistribute it and/or modify it 138.10 @@ -66,7 +66,7 @@ 138.11 138.12 void ImmutableSpace::print() const { 138.13 print_short(); 138.14 - tty->print_cr(" [%#-6lx,%#-6lx)", bottom(), end()); 138.15 + tty->print_cr(" [" INTPTR_FORMAT_W(#-6) "," INTPTR_FORMAT_W(#-6) ")", p2i(bottom()), p2i(end())); 138.16 } 138.17 138.18 #endif
139.1 --- a/src/share/vm/gc_implementation/shared/markSweep.cpp Thu May 15 18:23:26 2014 -0400 139.2 +++ b/src/share/vm/gc_implementation/shared/markSweep.cpp Thu May 22 15:52:41 2014 -0400 139.3 @@ -1,5 +1,5 @@ 139.4 /* 139.5 - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 139.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 139.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 139.8 * 139.9 * This code is free software; you can redistribute it and/or modify it 139.10 @@ -32,6 +32,8 @@ 139.11 #include "oops/objArrayKlass.inline.hpp" 139.12 #include "oops/oop.inline.hpp" 139.13 139.14 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 139.15 + 139.16 uint MarkSweep::_total_invocations = 0; 139.17 139.18 Stack<oop, mtGC> MarkSweep::_marking_stack;
140.1 --- a/src/share/vm/gc_implementation/shared/mutableNUMASpace.cpp Thu May 15 18:23:26 2014 -0400 140.2 +++ b/src/share/vm/gc_implementation/shared/mutableNUMASpace.cpp Thu May 22 15:52:41 2014 -0400 140.3 @@ -1,6 +1,6 @@ 140.4 140.5 /* 140.6 - * Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved. 140.7 + * Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved. 140.8 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 140.9 * 140.10 * This code is free software; you can redistribute it and/or modify it 140.11 @@ -30,6 +30,8 @@ 140.12 #include "oops/oop.inline.hpp" 140.13 #include "runtime/thread.inline.hpp" 140.14 140.15 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 140.16 + 140.17 MutableNUMASpace::MutableNUMASpace(size_t alignment) : MutableSpace(alignment) { 140.18 _lgrp_spaces = new (ResourceObj::C_HEAP, mtGC) GrowableArray<LGRPSpace*>(0, true); 140.19 _page_size = os::vm_page_size();
141.1 --- a/src/share/vm/gc_implementation/shared/mutableSpace.cpp Thu May 15 18:23:26 2014 -0400 141.2 +++ b/src/share/vm/gc_implementation/shared/mutableSpace.cpp Thu May 22 15:52:41 2014 -0400 141.3 @@ -1,5 +1,5 @@ 141.4 /* 141.5 - * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. 141.6 + * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved. 141.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 141.8 * 141.9 * This code is free software; you can redistribute it and/or modify it 141.10 @@ -32,6 +32,8 @@ 141.11 #include "runtime/thread.hpp" 141.12 #endif // INCLUDE_ALL_GCS 141.13 141.14 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 141.15 + 141.16 MutableSpace::MutableSpace(size_t alignment): ImmutableSpace(), _top(NULL), _alignment(alignment) { 141.17 assert(MutableSpace::alignment() >= 0 && 141.18 MutableSpace::alignment() % os::vm_page_size() == 0,
142.1 --- a/src/share/vm/gc_implementation/shared/parGCAllocBuffer.cpp Thu May 15 18:23:26 2014 -0400 142.2 +++ b/src/share/vm/gc_implementation/shared/parGCAllocBuffer.cpp Thu May 22 15:52:41 2014 -0400 142.3 @@ -1,5 +1,5 @@ 142.4 /* 142.5 - * Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved. 142.6 + * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved. 142.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 142.8 * 142.9 * This code is free software; you can redistribute it and/or modify it 142.10 @@ -28,6 +28,8 @@ 142.11 #include "oops/arrayOop.hpp" 142.12 #include "oops/oop.inline.hpp" 142.13 142.14 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 142.15 + 142.16 ParGCAllocBuffer::ParGCAllocBuffer(size_t desired_plab_sz_) : 142.17 _word_sz(desired_plab_sz_), _bottom(NULL), _top(NULL), 142.18 _end(NULL), _hard_end(NULL),
143.1 --- a/src/share/vm/gc_implementation/shared/spaceDecorator.cpp Thu May 15 18:23:26 2014 -0400 143.2 +++ b/src/share/vm/gc_implementation/shared/spaceDecorator.cpp Thu May 22 15:52:41 2014 -0400 143.3 @@ -1,5 +1,5 @@ 143.4 /* 143.5 - * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. 143.6 + * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved. 143.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 143.8 * 143.9 * This code is free software; you can redistribute it and/or modify it 143.10 @@ -27,6 +27,8 @@ 143.11 #include "memory/space.inline.hpp" 143.12 #include "utilities/copy.hpp" 143.13 143.14 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 143.15 + 143.16 // Catch-all file for utility classes 143.17 143.18 #ifndef PRODUCT
144.1 --- a/src/share/vm/gc_interface/collectedHeap.cpp Thu May 15 18:23:26 2014 -0400 144.2 +++ b/src/share/vm/gc_interface/collectedHeap.cpp Thu May 22 15:52:41 2014 -0400 144.3 @@ -599,12 +599,12 @@ 144.4 assert(heap_start >= ((uintptr_t)NULL + epsilon), "sanity"); 144.5 void* before_heap = (void*)(heap_start - epsilon); 144.6 assert(!heap->is_in(before_heap), 144.7 - err_msg("before_heap: " PTR_FORMAT " is unexpectedly in the heap", before_heap)); 144.8 + err_msg("before_heap: " PTR_FORMAT " is unexpectedly in the heap", p2i(before_heap))); 144.9 144.10 // Test that a pointer to after the heap end is reported as outside the heap. 144.11 assert(heap_end <= ((uintptr_t)-1 - epsilon), "sanity"); 144.12 void* after_heap = (void*)(heap_end + epsilon); 144.13 assert(!heap->is_in(after_heap), 144.14 - err_msg("after_heap: " PTR_FORMAT " is unexpectedly in the heap", after_heap)); 144.15 + err_msg("after_heap: " PTR_FORMAT " is unexpectedly in the heap", p2i(after_heap))); 144.16 } 144.17 #endif
145.1 --- a/src/share/vm/interpreter/bytecodeTracer.cpp Thu May 15 18:23:26 2014 -0400 145.2 +++ b/src/share/vm/interpreter/bytecodeTracer.cpp Thu May 22 15:52:41 2014 -0400 145.3 @@ -1,5 +1,5 @@ 145.4 /* 145.5 - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 145.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 145.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 145.8 * 145.9 * This code is free software; you can redistribute it and/or modify it 145.10 @@ -215,7 +215,7 @@ 145.11 st->print_cr(" %s", buf); 145.12 } 145.13 } else { 145.14 - st->print_cr(" " PTR_FORMAT, (void *)value); 145.15 + st->print_cr(" " PTR_FORMAT, p2i((void *)value)); 145.16 } 145.17 } 145.18 145.19 @@ -284,7 +284,7 @@ 145.20 if (i >= 0 && i < climit) { 145.21 cp_index = cache->entry_at(i)->constant_pool_index(); 145.22 } else { 145.23 - st->print_cr(" not in CP[*]?", i); 145.24 + st->print_cr("%d not in CP[*]?", i); 145.25 return false; 145.26 } 145.27 return true; 145.28 @@ -299,7 +299,7 @@ 145.29 cp_index = constants->object_to_cp_index(i); 145.30 return true; 145.31 } else { 145.32 - st->print_cr(" not in OBJ[*]?", i); 145.33 + st->print_cr("%d not in OBJ[*]?", i); 145.34 return false; 145.35 } 145.36 } 145.37 @@ -323,7 +323,7 @@ 145.38 if (tag.is_int()) { 145.39 st->print_cr(" " INT32_FORMAT, constants->int_at(i)); 145.40 } else if (tag.is_long()) { 145.41 - st->print_cr(" " INT64_FORMAT, constants->long_at(i)); 145.42 + st->print_cr(" " INT64_FORMAT, (int64_t)(constants->long_at(i))); 145.43 } else if (tag.is_float()) { 145.44 st->print_cr(" %f", constants->float_at(i)); 145.45 } else if (tag.is_double()) { 145.46 @@ -342,7 +342,7 @@ 145.47 } else if (tag.is_method_handle()) { 145.48 int kind = constants->method_handle_ref_kind_at(i); 145.49 int i2 = constants->method_handle_index_at(i); 145.50 - st->print(" <MethodHandle of kind %d>", kind, i2); 145.51 + st->print(" <MethodHandle of kind %d index at %d>", kind, i2); 145.52 print_field_or_method(-i, i2, st); 145.53 } else { 145.54 st->print_cr(" bad tag=%d at %d", tag.value(), i); 145.55 @@ -391,6 +391,7 @@ 145.56 } 145.57 145.58 145.59 +PRAGMA_FORMAT_NONLITERAL_IGNORED_EXTERNAL 145.60 void BytecodePrinter::print_attributes(int bci, outputStream* st) { 145.61 // Show attributes of pre-rewritten codes 145.62 Bytecodes::Code code = Bytecodes::java_code(raw_code()); 145.63 @@ -517,7 +518,10 @@ 145.64 int idx = ll - lo; 145.65 const char *format = first ? " %d:" INT32_FORMAT " (delta: %d)" : 145.66 ", %d:" INT32_FORMAT " (delta: %d)"; 145.67 +PRAGMA_DIAG_PUSH 145.68 +PRAGMA_FORMAT_NONLITERAL_IGNORED_INTERNAL 145.69 st->print(format, ll, dest[idx], dest[idx]-bci); 145.70 +PRAGMA_DIAG_POP 145.71 } 145.72 st->cr(); 145.73 } 145.74 @@ -537,7 +541,10 @@ 145.75 for (int ll = 0; ll < len; ll++, first = false) { 145.76 const char *format = first ? " " INT32_FORMAT ":" INT32_FORMAT : 145.77 ", " INT32_FORMAT ":" INT32_FORMAT ; 145.78 +PRAGMA_DIAG_PUSH 145.79 +PRAGMA_FORMAT_NONLITERAL_IGNORED_INTERNAL 145.80 st->print(format, key[ll], dest[ll]); 145.81 +PRAGMA_DIAG_POP 145.82 } 145.83 st->cr(); 145.84 }
146.1 --- a/src/share/vm/interpreter/interpreter.cpp Thu May 15 18:23:26 2014 -0400 146.2 +++ b/src/share/vm/interpreter/interpreter.cpp Thu May 22 15:52:41 2014 -0400 146.3 @@ -1,5 +1,5 @@ 146.4 /* 146.5 - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 146.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 146.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 146.8 * 146.9 * This code is free software; you can redistribute it and/or modify it 146.10 @@ -72,7 +72,7 @@ 146.11 if (description() != NULL) st->print("%s ", description()); 146.12 if (bytecode() >= 0 ) st->print("%d %s ", bytecode(), Bytecodes::name(bytecode())); 146.13 st->print_cr("[" INTPTR_FORMAT ", " INTPTR_FORMAT "] %d bytes", 146.14 - code_begin(), code_end(), code_size()); 146.15 + p2i(code_begin()), p2i(code_end()), code_size()); 146.16 146.17 if (PrintInterpreter) { 146.18 st->cr();
147.1 --- a/src/share/vm/interpreter/interpreterRuntime.cpp Thu May 15 18:23:26 2014 -0400 147.2 +++ b/src/share/vm/interpreter/interpreterRuntime.cpp Thu May 22 15:52:41 2014 -0400 147.3 @@ -1,5 +1,5 @@ 147.4 /* 147.5 - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 147.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 147.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 147.8 * 147.9 * This code is free software; you can redistribute it and/or modify it 147.10 @@ -75,6 +75,8 @@ 147.11 #include "opto/runtime.hpp" 147.12 #endif 147.13 147.14 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 147.15 + 147.16 class UnlockFlagSaver { 147.17 private: 147.18 JavaThread* _thread;
148.1 --- a/src/share/vm/interpreter/linkResolver.cpp Thu May 15 18:23:26 2014 -0400 148.2 +++ b/src/share/vm/interpreter/linkResolver.cpp Thu May 22 15:52:41 2014 -0400 148.3 @@ -1630,7 +1630,7 @@ 148.4 THREAD); 148.5 if (HAS_PENDING_EXCEPTION) { 148.6 if (TraceMethodHandles) { 148.7 - tty->print_cr("invokedynamic throws BSME for "INTPTR_FORMAT, (void *)PENDING_EXCEPTION); 148.8 + tty->print_cr("invokedynamic throws BSME for " INTPTR_FORMAT, p2i((void *)PENDING_EXCEPTION)); 148.9 PENDING_EXCEPTION->print(); 148.10 } 148.11 if (PENDING_EXCEPTION->is_a(SystemDictionary::BootstrapMethodError_klass())) {
149.1 --- a/src/share/vm/interpreter/oopMapCache.cpp Thu May 15 18:23:26 2014 -0400 149.2 +++ b/src/share/vm/interpreter/oopMapCache.cpp Thu May 22 15:52:41 2014 -0400 149.3 @@ -1,5 +1,5 @@ 149.4 /* 149.5 - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. 149.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 149.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 149.8 * 149.9 * This code is free software; you can redistribute it and/or modify it 149.10 @@ -31,6 +31,8 @@ 149.11 #include "runtime/handles.inline.hpp" 149.12 #include "runtime/signature.hpp" 149.13 149.14 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 149.15 + 149.16 class OopMapCacheEntry: private InterpreterOopMap { 149.17 friend class InterpreterOopMap; 149.18 friend class OopMapForCacheEntry;
150.1 --- a/src/share/vm/interpreter/templateInterpreter.cpp Thu May 15 18:23:26 2014 -0400 150.2 +++ b/src/share/vm/interpreter/templateInterpreter.cpp Thu May 22 15:52:41 2014 -0400 150.3 @@ -1,5 +1,5 @@ 150.4 /* 150.5 - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 150.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 150.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 150.8 * 150.9 * This code is free software; you can redistribute it and/or modify it 150.10 @@ -104,7 +104,7 @@ 150.11 tty->print("["); 150.12 for (int i = 0; i < number_of_states; i++) { 150.13 if (i > 0) tty->print(", "); 150.14 - tty->print(INTPTR_FORMAT, _entry[i]); 150.15 + tty->print(INTPTR_FORMAT, p2i(_entry[i])); 150.16 } 150.17 tty->print("]"); 150.18 }
151.1 --- a/src/share/vm/libadt/dict.cpp Thu May 15 18:23:26 2014 -0400 151.2 +++ b/src/share/vm/libadt/dict.cpp Thu May 22 15:52:41 2014 -0400 151.3 @@ -1,5 +1,5 @@ 151.4 /* 151.5 - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. 151.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 151.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 151.8 * 151.9 * This code is free software; you can redistribute it and/or modify it 151.10 @@ -38,6 +38,8 @@ 151.11 151.12 #include <assert.h> 151.13 151.14 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 151.15 + 151.16 // The iostream is not needed and it gets confused for gcc by the 151.17 // define of bool. 151.18 //
152.1 --- a/src/share/vm/libadt/set.cpp Thu May 15 18:23:26 2014 -0400 152.2 +++ b/src/share/vm/libadt/set.cpp Thu May 22 15:52:41 2014 -0400 152.3 @@ -1,5 +1,5 @@ 152.4 /* 152.5 - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. 152.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 152.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 152.8 * 152.9 * This code is free software; you can redistribute it and/or modify it 152.10 @@ -116,7 +116,7 @@ 152.11 void Set::print() const 152.12 { 152.13 char *printable_set = setstr(); 152.14 - tty->print_cr(printable_set); 152.15 + tty->print_cr("%s", printable_set); 152.16 FreeHeap(printable_set); 152.17 } 152.18
153.1 --- a/src/share/vm/memory/allocation.cpp Thu May 15 18:23:26 2014 -0400 153.2 +++ b/src/share/vm/memory/allocation.cpp Thu May 22 15:52:41 2014 -0400 153.3 @@ -1,5 +1,5 @@ 153.4 /* 153.5 - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 153.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 153.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 153.8 * 153.9 * This code is free software; you can redistribute it and/or modify it 153.10 @@ -79,7 +79,7 @@ 153.11 } 153.12 153.13 void MetaspaceObj::print_address_on(outputStream* st) const { 153.14 - st->print(" {"INTPTR_FORMAT"}", this); 153.15 + st->print(" {" INTPTR_FORMAT "}", p2i(this)); 153.16 } 153.17 153.18 void* ResourceObj::operator new(size_t size, allocation_type type, MEMFLAGS flags) throw() { 153.19 @@ -142,7 +142,7 @@ 153.20 void ResourceObj::set_allocation_type(address res, allocation_type type) { 153.21 // Set allocation type in the resource object 153.22 uintptr_t allocation = (uintptr_t)res; 153.23 - assert((allocation & allocation_mask) == 0, err_msg("address should be aligned to 4 bytes at least: " PTR_FORMAT, res)); 153.24 + assert((allocation & allocation_mask) == 0, err_msg("address should be aligned to 4 bytes at least: " INTPTR_FORMAT, p2i(res))); 153.25 assert(type <= allocation_mask, "incorrect allocation type"); 153.26 ResourceObj* resobj = (ResourceObj *)res; 153.27 resobj->_allocation_t[0] = ~(allocation + type); 153.28 @@ -179,7 +179,7 @@ 153.29 // Operator new() was called and type was set. 153.30 assert(!allocated_on_stack(), 153.31 err_msg("not embedded or stack, this(" PTR_FORMAT ") type %d a[0]=(" PTR_FORMAT ") a[1]=(" PTR_FORMAT ")", 153.32 - this, get_allocation_type(), _allocation_t[0], _allocation_t[1])); 153.33 + p2i(this), get_allocation_type(), _allocation_t[0], _allocation_t[1])); 153.34 } else { 153.35 // Operator new() was not called. 153.36 // Assume that it is embedded or stack object. 153.37 @@ -193,7 +193,7 @@ 153.38 // Note: garbage may resembles valid value. 153.39 assert(~(_allocation_t[0] | allocation_mask) != (uintptr_t)this || !is_type_set(), 153.40 err_msg("embedded or stack only, this(" PTR_FORMAT ") type %d a[0]=(" PTR_FORMAT ") a[1]=(" PTR_FORMAT ")", 153.41 - this, get_allocation_type(), _allocation_t[0], _allocation_t[1])); 153.42 + p2i(this), get_allocation_type(), _allocation_t[0], _allocation_t[1])); 153.43 set_allocation_type((address)this, STACK_OR_EMBEDDED); 153.44 _allocation_t[1] = 0; // Zap verification value 153.45 } 153.46 @@ -202,7 +202,7 @@ 153.47 // Used in InlineTree::ok_to_inline() for WarmCallInfo. 153.48 assert(allocated_on_stack(), 153.49 err_msg("copy only into local, this(" PTR_FORMAT ") type %d a[0]=(" PTR_FORMAT ") a[1]=(" PTR_FORMAT ")", 153.50 - this, get_allocation_type(), _allocation_t[0], _allocation_t[1])); 153.51 + p2i(this), get_allocation_type(), _allocation_t[0], _allocation_t[1])); 153.52 // Keep current _allocation_t value; 153.53 return *this; 153.54 } 153.55 @@ -218,13 +218,13 @@ 153.56 153.57 void trace_heap_malloc(size_t size, const char* name, void* p) { 153.58 // A lock is not needed here - tty uses a lock internally 153.59 - tty->print_cr("Heap malloc " INTPTR_FORMAT " " SIZE_FORMAT " %s", p, size, name == NULL ? "" : name); 153.60 + tty->print_cr("Heap malloc " INTPTR_FORMAT " " SIZE_FORMAT " %s", p2i(p), size, name == NULL ? "" : name); 153.61 } 153.62 153.63 153.64 void trace_heap_free(void* p) { 153.65 // A lock is not needed here - tty uses a lock internally 153.66 - tty->print_cr("Heap free " INTPTR_FORMAT, p); 153.67 + tty->print_cr("Heap free " INTPTR_FORMAT, p2i(p)); 153.68 } 153.69 153.70 //-------------------------------------------------------------------------------------- 153.71 @@ -723,11 +723,11 @@ 153.72 void AllocatedObj::print_value() const { print_value_on(tty); } 153.73 153.74 void AllocatedObj::print_on(outputStream* st) const { 153.75 - st->print_cr("AllocatedObj(" INTPTR_FORMAT ")", this); 153.76 + st->print_cr("AllocatedObj(" INTPTR_FORMAT ")", p2i(this)); 153.77 } 153.78 153.79 void AllocatedObj::print_value_on(outputStream* st) const { 153.80 - st->print("AllocatedObj(" INTPTR_FORMAT ")", this); 153.81 + st->print("AllocatedObj(" INTPTR_FORMAT ")", p2i(this)); 153.82 } 153.83 153.84 julong Arena::_bytes_allocated = 0;
154.1 --- a/src/share/vm/memory/binaryTreeDictionary.cpp Thu May 15 18:23:26 2014 -0400 154.2 +++ b/src/share/vm/memory/binaryTreeDictionary.cpp Thu May 22 15:52:41 2014 -0400 154.3 @@ -1,5 +1,5 @@ 154.4 /* 154.5 - * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. 154.6 + * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved. 154.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 154.8 * 154.9 * This code is free software; you can redistribute it and/or modify it 154.10 @@ -1205,13 +1205,13 @@ 154.11 "------------------------------------\n"); 154.12 size_t total_size = total_chunk_size(debug_only(NULL)); 154.13 size_t free_blocks = num_free_blocks(); 154.14 - gclog_or_tty->print("Total Free Space: %d\n", total_size); 154.15 - gclog_or_tty->print("Max Chunk Size: %d\n", max_chunk_size()); 154.16 - gclog_or_tty->print("Number of Blocks: %d\n", free_blocks); 154.17 + gclog_or_tty->print("Total Free Space: " SIZE_FORMAT "\n", total_size); 154.18 + gclog_or_tty->print("Max Chunk Size: " SIZE_FORMAT "\n", max_chunk_size()); 154.19 + gclog_or_tty->print("Number of Blocks: " SIZE_FORMAT "\n", free_blocks); 154.20 if (free_blocks > 0) { 154.21 - gclog_or_tty->print("Av. Block Size: %d\n", total_size/free_blocks); 154.22 + gclog_or_tty->print("Av. Block Size: " SIZE_FORMAT "\n", total_size/free_blocks); 154.23 } 154.24 - gclog_or_tty->print("Tree Height: %d\n", tree_height()); 154.25 + gclog_or_tty->print("Tree Height: " SIZE_FORMAT "\n", tree_height()); 154.26 } 154.27 154.28 // Print census information - counts, births, deaths, etc. 154.29 @@ -1318,7 +1318,7 @@ 154.30 for (Chunk_t* fc = fl->head(); fc != NULL; 154.31 fc = fc->next()) { 154.32 _st->print_cr("\t[" PTR_FORMAT "," PTR_FORMAT ") %s", 154.33 - fc, (HeapWord*)fc + sz, 154.34 + p2i(fc), p2i((HeapWord*)fc + sz), 154.35 fc->cantCoalesce() ? "\t CC" : ""); 154.36 } 154.37 }
155.1 --- a/src/share/vm/memory/blockOffsetTable.cpp Thu May 15 18:23:26 2014 -0400 155.2 +++ b/src/share/vm/memory/blockOffsetTable.cpp Thu May 22 15:52:41 2014 -0400 155.3 @@ -1,5 +1,5 @@ 155.4 /* 155.5 - * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. 155.6 + * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. 155.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 155.8 * 155.9 * This code is free software; you can redistribute it and/or modify it 155.10 @@ -59,12 +59,12 @@ 155.11 " rs.base(): " INTPTR_FORMAT 155.12 " rs.size(): " INTPTR_FORMAT 155.13 " rs end(): " INTPTR_FORMAT, 155.14 - rs.base(), rs.size(), rs.base() + rs.size()); 155.15 + p2i(rs.base()), rs.size(), p2i(rs.base() + rs.size())); 155.16 gclog_or_tty->print_cr(" " 155.17 " _vs.low_boundary(): " INTPTR_FORMAT 155.18 " _vs.high_boundary(): " INTPTR_FORMAT, 155.19 - _vs.low_boundary(), 155.20 - _vs.high_boundary()); 155.21 + p2i(_vs.low_boundary()), 155.22 + p2i(_vs.high_boundary())); 155.23 } 155.24 } 155.25 155.26 @@ -537,10 +537,10 @@ 155.27 q -= (N_words * n_cards_back); 155.28 assert(q >= _sp->bottom(), 155.29 err_msg("q = " PTR_FORMAT " crossed below bottom = " PTR_FORMAT, 155.30 - q, _sp->bottom())); 155.31 + p2i(q), p2i(_sp->bottom()))); 155.32 assert(q < _sp->end(), 155.33 err_msg("q = " PTR_FORMAT " crossed above end = " PTR_FORMAT, 155.34 - q, _sp->end())); 155.35 + p2i(q), p2i(_sp->end()))); 155.36 index -= n_cards_back; 155.37 offset = _array->offset_array(index); 155.38 } 155.39 @@ -549,10 +549,10 @@ 155.40 q -= offset; 155.41 assert(q >= _sp->bottom(), 155.42 err_msg("q = " PTR_FORMAT " crossed below bottom = " PTR_FORMAT, 155.43 - q, _sp->bottom())); 155.44 + p2i(q), p2i(_sp->bottom()))); 155.45 assert(q < _sp->end(), 155.46 err_msg("q = " PTR_FORMAT " crossed above end = " PTR_FORMAT, 155.47 - q, _sp->end())); 155.48 + p2i(q), p2i(_sp->end()))); 155.49 HeapWord* n = q; 155.50 155.51 while (n <= addr) { 155.52 @@ -563,14 +563,14 @@ 155.53 err_msg("Looping at n = " PTR_FORMAT " with last = " PTR_FORMAT"," 155.54 " while querying blk_start(" PTR_FORMAT ")" 155.55 " on _sp = [" PTR_FORMAT "," PTR_FORMAT ")", 155.56 - n, last, addr, _sp->bottom(), _sp->end())); 155.57 + p2i(n), p2i(last), p2i(addr), p2i(_sp->bottom()), p2i(_sp->end()))); 155.58 } 155.59 assert(q <= addr, 155.60 err_msg("wrong order for current (" INTPTR_FORMAT ")" " <= arg (" INTPTR_FORMAT ")", 155.61 - q, addr)); 155.62 + p2i(q), p2i(addr))); 155.63 assert(addr <= n, 155.64 err_msg("wrong order for arg (" INTPTR_FORMAT ") <= next (" INTPTR_FORMAT ")", 155.65 - addr, n)); 155.66 + p2i(addr), p2i(n))); 155.67 return q; 155.68 } 155.69
156.1 --- a/src/share/vm/memory/cardTableModRefBS.cpp Thu May 15 18:23:26 2014 -0400 156.2 +++ b/src/share/vm/memory/cardTableModRefBS.cpp Thu May 22 15:52:41 2014 -0400 156.3 @@ -1,5 +1,5 @@ 156.4 /* 156.5 - * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. 156.6 + * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. 156.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 156.8 * 156.9 * This code is free software; you can redistribute it and/or modify it 156.10 @@ -138,11 +138,11 @@ 156.11 gclog_or_tty->print_cr(" " 156.12 " &_byte_map[0]: " INTPTR_FORMAT 156.13 " &_byte_map[_last_valid_index]: " INTPTR_FORMAT, 156.14 - &_byte_map[0], 156.15 - &_byte_map[_last_valid_index]); 156.16 + p2i(&_byte_map[0]), 156.17 + p2i(&_byte_map[_last_valid_index])); 156.18 gclog_or_tty->print_cr(" " 156.19 " byte_map_base: " INTPTR_FORMAT, 156.20 - byte_map_base); 156.21 + p2i(byte_map_base)); 156.22 } 156.23 } 156.24 156.25 @@ -392,23 +392,23 @@ 156.26 gclog_or_tty->print_cr(" " 156.27 " _covered[%d].start(): " INTPTR_FORMAT 156.28 " _covered[%d].last(): " INTPTR_FORMAT, 156.29 - ind, _covered[ind].start(), 156.30 - ind, _covered[ind].last()); 156.31 + ind, p2i(_covered[ind].start()), 156.32 + ind, p2i(_covered[ind].last())); 156.33 gclog_or_tty->print_cr(" " 156.34 " _committed[%d].start(): " INTPTR_FORMAT 156.35 " _committed[%d].last(): " INTPTR_FORMAT, 156.36 - ind, _committed[ind].start(), 156.37 - ind, _committed[ind].last()); 156.38 + ind, p2i(_committed[ind].start()), 156.39 + ind, p2i(_committed[ind].last())); 156.40 gclog_or_tty->print_cr(" " 156.41 " byte_for(start): " INTPTR_FORMAT 156.42 " byte_for(last): " INTPTR_FORMAT, 156.43 - byte_for(_covered[ind].start()), 156.44 - byte_for(_covered[ind].last())); 156.45 + p2i(byte_for(_covered[ind].start())), 156.46 + p2i(byte_for(_covered[ind].last()))); 156.47 gclog_or_tty->print_cr(" " 156.48 " addr_for(start): " INTPTR_FORMAT 156.49 " addr_for(last): " INTPTR_FORMAT, 156.50 - addr_for((jbyte*) _committed[ind].start()), 156.51 - addr_for((jbyte*) _committed[ind].last())); 156.52 + p2i(addr_for((jbyte*) _committed[ind].start())), 156.53 + p2i(addr_for((jbyte*) _committed[ind].last()))); 156.54 } 156.55 // Touch the last card of the covered region to show that it 156.56 // is committed (or SEGV). 156.57 @@ -657,14 +657,14 @@ 156.58 if (failed) { 156.59 if (!failures) { 156.60 tty->cr(); 156.61 - tty->print_cr("== CT verification failed: ["PTR_FORMAT","PTR_FORMAT"]", start, end); 156.62 + tty->print_cr("== CT verification failed: [" INTPTR_FORMAT "," INTPTR_FORMAT "]", p2i(start), p2i(end)); 156.63 tty->print_cr("== %sexpecting value: %d", 156.64 (val_equals) ? "" : "not ", val); 156.65 failures = true; 156.66 } 156.67 tty->print_cr("== card "PTR_FORMAT" ["PTR_FORMAT","PTR_FORMAT"], " 156.68 - "val: %d", curr, addr_for(curr), 156.69 - (HeapWord*) (((size_t) addr_for(curr)) + card_size), 156.70 + "val: %d", p2i(curr), p2i(addr_for(curr)), 156.71 + p2i((HeapWord*) (((size_t) addr_for(curr)) + card_size)), 156.72 (int) curr_val); 156.73 } 156.74 } 156.75 @@ -682,7 +682,7 @@ 156.76 156.77 void CardTableModRefBS::print_on(outputStream* st) const { 156.78 st->print_cr("Card table byte_map: [" INTPTR_FORMAT "," INTPTR_FORMAT "] byte_map_base: " INTPTR_FORMAT, 156.79 - _byte_map, _byte_map + _byte_map_size, byte_map_base); 156.80 + p2i(_byte_map), p2i(_byte_map + _byte_map_size), p2i(byte_map_base)); 156.81 } 156.82 156.83 bool CardTableModRefBSForCTRS::card_will_be_scanned(jbyte cv) {
157.1 --- a/src/share/vm/memory/cardTableModRefBS.hpp Thu May 15 18:23:26 2014 -0400 157.2 +++ b/src/share/vm/memory/cardTableModRefBS.hpp Thu May 22 15:52:41 2014 -0400 157.3 @@ -1,5 +1,5 @@ 157.4 /* 157.5 - * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. 157.6 + * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. 157.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 157.8 * 157.9 * This code is free software; you can redistribute it and/or modify it 157.10 @@ -155,7 +155,7 @@ 157.11 assert(_whole_heap.contains(p), 157.12 err_msg("Attempt to access p = "PTR_FORMAT" out of bounds of " 157.13 " card marking array's _whole_heap = ["PTR_FORMAT","PTR_FORMAT")", 157.14 - p, _whole_heap.start(), _whole_heap.end())); 157.15 + p2i(p), p2i(_whole_heap.start()), p2i(_whole_heap.end()))); 157.16 jbyte* result = &byte_map_base[uintptr_t(p) >> card_shift]; 157.17 assert(result >= _byte_map && result < _byte_map + _byte_map_size, 157.18 "out of bounds accessor for card marking array"); 157.19 @@ -431,7 +431,7 @@ 157.20 assert(_whole_heap.contains(result), 157.21 err_msg("Returning result = "PTR_FORMAT" out of bounds of " 157.22 " card marking array's _whole_heap = ["PTR_FORMAT","PTR_FORMAT")", 157.23 - result, _whole_heap.start(), _whole_heap.end())); 157.24 + p2i(result), p2i(_whole_heap.start()), p2i(_whole_heap.end()))); 157.25 return result; 157.26 } 157.27 157.28 @@ -440,7 +440,7 @@ 157.29 assert(_whole_heap.contains(p), 157.30 err_msg("Attempt to access p = "PTR_FORMAT" out of bounds of " 157.31 " card marking array's _whole_heap = ["PTR_FORMAT","PTR_FORMAT")", 157.32 - p, _whole_heap.start(), _whole_heap.end())); 157.33 + p2i(p), p2i(_whole_heap.start()), p2i(_whole_heap.end()))); 157.34 return byte_for(p) - _byte_map; 157.35 } 157.36
158.1 --- a/src/share/vm/memory/cardTableRS.cpp Thu May 15 18:23:26 2014 -0400 158.2 +++ b/src/share/vm/memory/cardTableRS.cpp Thu May 22 15:52:41 2014 -0400 158.3 @@ -1,5 +1,5 @@ 158.4 /* 158.5 - * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. 158.6 + * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved. 158.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 158.8 * 158.9 * This code is free software; you can redistribute it and/or modify it 158.10 @@ -288,14 +288,14 @@ 158.11 err_msg("Did you forget to call save_marks()? " 158.12 "[" PTR_FORMAT ", " PTR_FORMAT ") is not contained in " 158.13 "[" PTR_FORMAT ", " PTR_FORMAT ")", 158.14 - urasm.start(), urasm.end(), ur.start(), ur.end())); 158.15 + p2i(urasm.start()), p2i(urasm.end()), p2i(ur.start()), p2i(ur.end()))); 158.16 // In the case of CMS+ParNew, issue a warning 158.17 if (!ur.contains(urasm)) { 158.18 assert(UseConcMarkSweepGC && UseParNewGC, "Tautology: see assert above"); 158.19 warning("CMS+ParNew: Did you forget to call save_marks()? " 158.20 "[" PTR_FORMAT ", " PTR_FORMAT ") is not contained in " 158.21 "[" PTR_FORMAT ", " PTR_FORMAT ")", 158.22 - urasm.start(), urasm.end(), ur.start(), ur.end()); 158.23 + p2i(urasm.start()), p2i(urasm.end()), p2i(ur.start()), p2i(ur.end())); 158.24 MemRegion ur2 = sp->used_region(); 158.25 MemRegion urasm2 = sp->used_region_at_save_marks(); 158.26 if (!ur.equals(ur2)) { 158.27 @@ -349,12 +349,12 @@ 158.28 assert(jp >= _begin && jp < _end, 158.29 err_msg("Error: jp " PTR_FORMAT " should be within " 158.30 "[_begin, _end) = [" PTR_FORMAT "," PTR_FORMAT ")", 158.31 - jp, _begin, _end)); 158.32 + p2i(jp), p2i(_begin), p2i(_end))); 158.33 oop obj = oopDesc::load_decode_heap_oop(p); 158.34 guarantee(obj == NULL || (HeapWord*)obj >= _boundary, 158.35 err_msg("pointer " PTR_FORMAT " at " PTR_FORMAT " on " 158.36 "clean card crosses boundary" PTR_FORMAT, 158.37 - (HeapWord*)obj, jp, _boundary)); 158.38 + p2i((HeapWord*)obj), p2i(jp), p2i(_boundary))); 158.39 } 158.40 158.41 public: 158.42 @@ -362,10 +362,10 @@ 158.43 _boundary(b), _begin(begin), _end(end) { 158.44 assert(b <= begin, 158.45 err_msg("Error: boundary " PTR_FORMAT " should be at or below begin " PTR_FORMAT, 158.46 - b, begin)); 158.47 + p2i(b), p2i(begin))); 158.48 assert(begin <= end, 158.49 err_msg("Error: begin " PTR_FORMAT " should be strictly below end " PTR_FORMAT, 158.50 - begin, end)); 158.51 + p2i(begin), p2i(end))); 158.52 } 158.53 158.54 virtual void do_oop(oop* p) { VerifyCleanCardClosure::do_oop_work(p); }
159.1 --- a/src/share/vm/memory/collectorPolicy.cpp Thu May 15 18:23:26 2014 -0400 159.2 +++ b/src/share/vm/memory/collectorPolicy.cpp Thu May 22 15:52:41 2014 -0400 159.3 @@ -1,5 +1,5 @@ 159.4 /* 159.5 - * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. 159.6 + * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved. 159.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 159.8 * 159.9 * This code is free software; you can redistribute it and/or modify it 159.10 @@ -769,7 +769,7 @@ 159.11 if ((QueuedAllocationWarningCount > 0) && 159.12 (try_count % QueuedAllocationWarningCount == 0)) { 159.13 warning("TwoGenerationCollectorPolicy::mem_allocate_work retries %d times \n\t" 159.14 - " size=%d %s", try_count, size, is_tlab ? "(TLAB)" : ""); 159.15 + " size=" SIZE_FORMAT " %s", try_count, size, is_tlab ? "(TLAB)" : ""); 159.16 } 159.17 } 159.18 } 159.19 @@ -938,7 +938,7 @@ 159.20 if ((QueuedAllocationWarningCount > 0) && 159.21 (loop_count % QueuedAllocationWarningCount == 0)) { 159.22 warning("satisfy_failed_metadata_allocation() retries %d times \n\t" 159.23 - " size=%d", loop_count, word_size); 159.24 + " size=" SIZE_FORMAT, loop_count, word_size); 159.25 } 159.26 } while (true); // Until a GC is done 159.27 }
160.1 --- a/src/share/vm/memory/defNewGeneration.cpp Thu May 15 18:23:26 2014 -0400 160.2 +++ b/src/share/vm/memory/defNewGeneration.cpp Thu May 22 15:52:41 2014 -0400 160.3 @@ -1,5 +1,5 @@ 160.4 /* 160.5 - * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. 160.6 + * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved. 160.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 160.8 * 160.9 * This code is free software; you can redistribute it and/or modify it 160.10 @@ -46,6 +46,8 @@ 160.11 #include "utilities/copy.hpp" 160.12 #include "utilities/stack.inline.hpp" 160.13 160.14 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 160.15 + 160.16 // 160.17 // DefNewGeneration functions. 160.18
161.1 --- a/src/share/vm/memory/filemap.cpp Thu May 15 18:23:26 2014 -0400 161.2 +++ b/src/share/vm/memory/filemap.cpp Thu May 22 15:52:41 2014 -0400 161.3 @@ -1,5 +1,5 @@ 161.4 /* 161.5 - * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. 161.6 + * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved. 161.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 161.8 * 161.9 * This code is free software; you can redistribute it and/or modify it 161.10 @@ -40,6 +40,7 @@ 161.11 #define O_BINARY 0 // otherwise do nothing. 161.12 #endif 161.13 161.14 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 161.15 161.16 extern address JVM_FunctionAtStart(); 161.17 extern address JVM_FunctionAtEnd();
162.1 --- a/src/share/vm/memory/gcLocker.cpp Thu May 15 18:23:26 2014 -0400 162.2 +++ b/src/share/vm/memory/gcLocker.cpp Thu May 22 15:52:41 2014 -0400 162.3 @@ -1,5 +1,5 @@ 162.4 /* 162.5 - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 162.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 162.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 162.8 * 162.9 * This code is free software; you can redistribute it and/or modify it 162.10 @@ -51,7 +51,7 @@ 162.11 tty->print_cr("critical counts don't match: %d != %d", _jni_lock_count, count); 162.12 for (JavaThread* thr = Threads::first(); thr; thr = thr->next()) { 162.13 if (thr->in_critical()) { 162.14 - tty->print_cr(INTPTR_FORMAT " in_critical %d", thr, thr->in_critical()); 162.15 + tty->print_cr(INTPTR_FORMAT " in_critical %d", p2i(thr), thr->in_critical()); 162.16 } 162.17 } 162.18 }
163.1 --- a/src/share/vm/memory/genCollectedHeap.cpp Thu May 15 18:23:26 2014 -0400 163.2 +++ b/src/share/vm/memory/genCollectedHeap.cpp Thu May 22 15:52:41 2014 -0400 163.3 @@ -1,5 +1,5 @@ 163.4 /* 163.5 - * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. 163.6 + * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. 163.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 163.8 * 163.9 * This code is free software; you can redistribute it and/or modify it 163.10 @@ -809,7 +809,7 @@ 163.11 bool GenCollectedHeap::is_in_young(oop p) { 163.12 bool result = ((HeapWord*)p) < _gens[_n_gens - 1]->reserved().start(); 163.13 assert(result == _gens[0]->is_in_reserved(p), 163.14 - err_msg("incorrect test - result=%d, p=" PTR_FORMAT, result, (void*)p)); 163.15 + err_msg("incorrect test - result=%d, p=" PTR_FORMAT, result, p2i((void*)p))); 163.16 return result; 163.17 } 163.18 163.19 @@ -1088,7 +1088,7 @@ 163.20 for (int i = _n_gens-1; i >= 0; i--) { 163.21 Generation* g = _gens[i]; 163.22 if (!silent) { 163.23 - gclog_or_tty->print(g->name()); 163.24 + gclog_or_tty->print("%s", g->name()); 163.25 gclog_or_tty->print(" "); 163.26 } 163.27 g->verify(); 163.28 @@ -1291,7 +1291,7 @@ 163.29 // back a time later than 'now'. 163.30 jlong retVal = now - tolgc_cl.time(); 163.31 if (retVal < 0) { 163.32 - NOT_PRODUCT(warning("time warp: "INT64_FORMAT, retVal);) 163.33 + NOT_PRODUCT(warning("time warp: "INT64_FORMAT, (int64_t) retVal);) 163.34 return 0; 163.35 } 163.36 return retVal;
164.1 --- a/src/share/vm/memory/genOopClosures.hpp Thu May 15 18:23:26 2014 -0400 164.2 +++ b/src/share/vm/memory/genOopClosures.hpp Thu May 22 15:52:41 2014 -0400 164.3 @@ -1,5 +1,5 @@ 164.4 /* 164.5 - * Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved. 164.6 + * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved. 164.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 164.8 * 164.9 * This code is free software; you can redistribute it and/or modify it 164.10 @@ -199,7 +199,7 @@ 164.11 protected: 164.12 template <class T> inline void do_oop_work(T* p) { 164.13 oop obj = oopDesc::load_decode_heap_oop(p); 164.14 - guarantee(obj->is_oop_or_null(), err_msg("invalid oop: " INTPTR_FORMAT, (oopDesc*) obj)); 164.15 + guarantee(obj->is_oop_or_null(), err_msg("invalid oop: " INTPTR_FORMAT, p2i((oopDesc*) obj))); 164.16 } 164.17 public: 164.18 virtual void do_oop(oop* p);
165.1 --- a/src/share/vm/memory/generation.cpp Thu May 15 18:23:26 2014 -0400 165.2 +++ b/src/share/vm/memory/generation.cpp Thu May 22 15:52:41 2014 -0400 165.3 @@ -1,5 +1,5 @@ 165.4 /* 165.5 - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 165.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 165.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 165.8 * 165.9 * This code is free software; you can redistribute it and/or modify it 165.10 @@ -43,6 +43,8 @@ 165.11 #include "utilities/copy.hpp" 165.12 #include "utilities/events.hpp" 165.13 165.14 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 165.15 + 165.16 Generation::Generation(ReservedSpace rs, size_t initial_size, int level) : 165.17 _level(level), 165.18 _ref_processor(NULL) {
166.1 --- a/src/share/vm/memory/generation.hpp Thu May 15 18:23:26 2014 -0400 166.2 +++ b/src/share/vm/memory/generation.hpp Thu May 22 15:52:41 2014 -0400 166.3 @@ -1,5 +1,5 @@ 166.4 /* 166.5 - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 166.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 166.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 166.8 * 166.9 * This code is free software; you can redistribute it and/or modify it 166.10 @@ -422,7 +422,7 @@ 166.11 // have to guard against non-monotonicity. 166.12 NOT_PRODUCT( 166.13 if (now < _time_of_last_gc) { 166.14 - warning("time warp: "INT64_FORMAT" to "INT64_FORMAT, _time_of_last_gc, now); 166.15 + warning("time warp: "INT64_FORMAT" to "INT64_FORMAT, (int64_t)_time_of_last_gc, (int64_t)now); 166.16 } 166.17 ) 166.18 return _time_of_last_gc;
167.1 --- a/src/share/vm/memory/heapInspection.cpp Thu May 15 18:23:26 2014 -0400 167.2 +++ b/src/share/vm/memory/heapInspection.cpp Thu May 22 15:52:41 2014 -0400 167.3 @@ -1,5 +1,5 @@ 167.4 /* 167.5 - * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved. 167.6 + * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved. 167.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 167.8 * 167.9 * This code is free software; you can redistribute it and/or modify it 167.10 @@ -35,6 +35,8 @@ 167.11 #include "gc_implementation/parallelScavenge/parallelScavengeHeap.hpp" 167.12 #endif // INCLUDE_ALL_GCS 167.13 167.14 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 167.15 + 167.16 // HeapInspection 167.17 167.18 int KlassInfoEntry::compare(KlassInfoEntry* e1, KlassInfoEntry* e2) { 167.19 @@ -270,6 +272,7 @@ 167.20 return true; 167.21 } 167.22 167.23 +PRAGMA_FORMAT_NONLITERAL_IGNORED_EXTERNAL 167.24 void KlassInfoHisto::print_title(outputStream* st, bool csv_format, 167.25 bool selected[], int width_table[], 167.26 const char *name_table[]) { 167.27 @@ -282,7 +285,10 @@ 167.28 } else { 167.29 st->print("Index Super"); 167.30 for (int c=0; c<KlassSizeStats::_num_columns; c++) { 167.31 +PRAGMA_DIAG_PUSH 167.32 +PRAGMA_FORMAT_NONLITERAL_IGNORED_INTERNAL 167.33 if (selected[c]) {st->print(str_fmt(width_table[c]), name_table[c]);} 167.34 +PRAGMA_DIAG_POP 167.35 } 167.36 st->print(" ClassName"); 167.37 } 167.38 @@ -395,12 +401,18 @@ 167.39 case KlassSizeStats::_index_inst_size: 167.40 case KlassSizeStats::_index_inst_count: 167.41 case KlassSizeStats::_index_method_count: 167.42 +PRAGMA_DIAG_PUSH 167.43 +PRAGMA_FORMAT_NONLITERAL_IGNORED_INTERNAL 167.44 st->print(str_fmt(width_table[c]), "-"); 167.45 +PRAGMA_DIAG_POP 167.46 break; 167.47 default: 167.48 { 167.49 double perc = (double)(100) * (double)(colsum_table[c]) / (double)sz_sum._total_bytes; 167.50 +PRAGMA_DIAG_PUSH 167.51 +PRAGMA_FORMAT_NONLITERAL_IGNORED_INTERNAL 167.52 st->print(perc_fmt(width_table[c]), perc); 167.53 +PRAGMA_DIAG_POP 167.54 } 167.55 } 167.56 }
168.1 --- a/src/share/vm/memory/heapInspection.hpp Thu May 15 18:23:26 2014 -0400 168.2 +++ b/src/share/vm/memory/heapInspection.hpp Thu May 22 15:52:41 2014 -0400 168.3 @@ -1,5 +1,5 @@ 168.4 /* 168.5 - * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved. 168.6 + * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved. 168.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 168.8 * 168.9 * This code is free software; you can redistribute it and/or modify it 168.10 @@ -295,6 +295,9 @@ 168.11 // returns a format string to print a julong with the given width. E.g, 168.12 // printf(num_fmt(6), julong(10)) would print out the number 10 with 4 168.13 // leading spaces. 168.14 +PRAGMA_DIAG_PUSH 168.15 +PRAGMA_FORMAT_NONLITERAL_IGNORED 168.16 + 168.17 static void print_julong(outputStream* st, int width, julong n) { 168.18 int num_spaces = width - julong_width(n); 168.19 if (num_spaces > 0) { 168.20 @@ -302,6 +305,7 @@ 168.21 } 168.22 st->print(JULONG_FORMAT, n); 168.23 } 168.24 +PRAGMA_DIAG_POP 168.25 168.26 static char* perc_fmt(int width) { 168.27 static char buf[32];
169.1 --- a/src/share/vm/memory/metachunk.cpp Thu May 15 18:23:26 2014 -0400 169.2 +++ b/src/share/vm/memory/metachunk.cpp Thu May 22 15:52:41 2014 -0400 169.3 @@ -1,5 +1,5 @@ 169.4 /* 169.5 - * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. 169.6 + * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved. 169.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 169.8 * 169.9 * This code is free software; you can redistribute it and/or modify it 169.10 @@ -28,6 +28,8 @@ 169.11 #include "utilities/copy.hpp" 169.12 #include "utilities/debug.hpp" 169.13 169.14 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 169.15 + 169.16 class VirtualSpaceNode; 169.17 169.18 const size_t metadata_chunk_initialize = 0xf7f7f7f7;
170.1 --- a/src/share/vm/memory/metaspace.cpp Thu May 15 18:23:26 2014 -0400 170.2 +++ b/src/share/vm/memory/metaspace.cpp Thu May 22 15:52:41 2014 -0400 170.3 @@ -1,5 +1,5 @@ 170.4 /* 170.5 - * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. 170.6 + * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved. 170.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 170.8 * 170.9 * This code is free software; you can redistribute it and/or modify it 170.10 @@ -48,6 +48,8 @@ 170.11 #include "utilities/copy.hpp" 170.12 #include "utilities/debug.hpp" 170.13 170.14 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 170.15 + 170.16 typedef BinaryTreeDictionary<Metablock, FreeList<Metablock> > BlockTreeDictionary; 170.17 typedef BinaryTreeDictionary<Metachunk, FreeList<Metachunk> > ChunkTreeDictionary; 170.18 170.19 @@ -1980,7 +1982,7 @@ 170.20 st->print_cr(" free " SIZE_FORMAT, 170.21 chunk->free_word_size()); 170.22 } else { 170.23 - st->print_cr(""); 170.24 + st->cr(); 170.25 } 170.26 } 170.27 170.28 @@ -2264,7 +2266,7 @@ 170.29 humongous_chunks = next_humongous_chunks; 170.30 } 170.31 if (TraceMetadataChunkAllocation && Verbose) { 170.32 - gclog_or_tty->print_cr(""); 170.33 + gclog_or_tty->cr(); 170.34 gclog_or_tty->print_cr("updated dictionary count %d %s", 170.35 chunk_manager()->humongous_dictionary()->total_count(), 170.36 chunk_size_name(HumongousIndex));
171.1 --- a/src/share/vm/memory/metaspaceShared.cpp Thu May 15 18:23:26 2014 -0400 171.2 +++ b/src/share/vm/memory/metaspaceShared.cpp Thu May 22 15:52:41 2014 -0400 171.3 @@ -1,5 +1,5 @@ 171.4 /* 171.5 - * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. 171.6 + * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved. 171.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 171.8 * 171.9 * This code is free software; you can redistribute it and/or modify it 171.10 @@ -40,6 +40,7 @@ 171.11 #include "runtime/vmThread.hpp" 171.12 #include "utilities/hashtable.inline.hpp" 171.13 171.14 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 171.15 171.16 int MetaspaceShared::_max_alignment = 0; 171.17 171.18 @@ -337,13 +338,14 @@ 171.19 int all_rw_count = 0; 171.20 int all_rw_bytes = 0; 171.21 171.22 - const char *fmt = "%-20s: %8d %10d %5.1f | %8d %10d %5.1f | %8d %10d %5.1f"; 171.23 +// To make fmt_stats be a syntactic constant (for format warnings), use #define. 171.24 +#define fmt_stats "%-20s: %8d %10d %5.1f | %8d %10d %5.1f | %8d %10d %5.1f" 171.25 const char *sep = "--------------------+---------------------------+---------------------------+--------------------------"; 171.26 const char *hdr = " ro_cnt ro_bytes % | rw_cnt rw_bytes % | all_cnt all_bytes %"; 171.27 171.28 tty->print_cr("Detailed metadata info (rw includes md and mc):"); 171.29 - tty->print_cr(hdr); 171.30 - tty->print_cr(sep); 171.31 + tty->print_cr("%s", hdr); 171.32 + tty->print_cr("%s", sep); 171.33 for (int type = 0; type < int(_number_of_types); type ++) { 171.34 const char *name = type_name((Type)type); 171.35 int ro_count = _counts[RO][type]; 171.36 @@ -357,7 +359,7 @@ 171.37 double rw_perc = 100.0 * double(rw_bytes) / double(rw_all); 171.38 double perc = 100.0 * double(bytes) / double(ro_all + rw_all); 171.39 171.40 - tty->print_cr(fmt, name, 171.41 + tty->print_cr(fmt_stats, name, 171.42 ro_count, ro_bytes, ro_perc, 171.43 rw_count, rw_bytes, rw_perc, 171.44 count, bytes, perc); 171.45 @@ -375,14 +377,15 @@ 171.46 double all_rw_perc = 100.0 * double(all_rw_bytes) / double(rw_all); 171.47 double all_perc = 100.0 * double(all_bytes) / double(ro_all + rw_all); 171.48 171.49 - tty->print_cr(sep); 171.50 - tty->print_cr(fmt, "Total", 171.51 + tty->print_cr("%s", sep); 171.52 + tty->print_cr(fmt_stats, "Total", 171.53 all_ro_count, all_ro_bytes, all_ro_perc, 171.54 all_rw_count, all_rw_bytes, all_rw_perc, 171.55 all_count, all_bytes, all_perc); 171.56 171.57 assert(all_ro_bytes == ro_all, "everything should have been counted"); 171.58 assert(all_rw_bytes == rw_all, "everything should have been counted"); 171.59 +#undef fmt_stats 171.60 } 171.61 171.62 // Populate the shared space. 171.63 @@ -514,7 +517,8 @@ 171.64 md_top = wc.get_top(); 171.65 171.66 // Print shared spaces all the time 171.67 - const char* fmt = "%s space: %9d [ %4.1f%% of total] out of %9d bytes [%4.1f%% used] at " PTR_FORMAT; 171.68 +// To make fmt_space be a syntactic constant (for format warnings), use #define. 171.69 +#define fmt_space "%s space: %9d [ %4.1f%% of total] out of %9d bytes [%4.1f%% used] at " PTR_FORMAT 171.70 Metaspace* ro_space = _loader_data->ro_metaspace(); 171.71 Metaspace* rw_space = _loader_data->rw_metaspace(); 171.72 171.73 @@ -545,10 +549,10 @@ 171.74 const double mc_u_perc = mc_bytes / double(mc_alloced) * 100.0; 171.75 const double total_u_perc = total_bytes / double(total_alloced) * 100.0; 171.76 171.77 - tty->print_cr(fmt, "ro", ro_bytes, ro_t_perc, ro_alloced, ro_u_perc, ro_space->bottom()); 171.78 - tty->print_cr(fmt, "rw", rw_bytes, rw_t_perc, rw_alloced, rw_u_perc, rw_space->bottom()); 171.79 - tty->print_cr(fmt, "md", md_bytes, md_t_perc, md_alloced, md_u_perc, md_low); 171.80 - tty->print_cr(fmt, "mc", mc_bytes, mc_t_perc, mc_alloced, mc_u_perc, mc_low); 171.81 + tty->print_cr(fmt_space, "ro", ro_bytes, ro_t_perc, ro_alloced, ro_u_perc, ro_space->bottom()); 171.82 + tty->print_cr(fmt_space, "rw", rw_bytes, rw_t_perc, rw_alloced, rw_u_perc, rw_space->bottom()); 171.83 + tty->print_cr(fmt_space, "md", md_bytes, md_t_perc, md_alloced, md_u_perc, md_low); 171.84 + tty->print_cr(fmt_space, "mc", mc_bytes, mc_t_perc, mc_alloced, mc_u_perc, mc_low); 171.85 tty->print_cr("total : %9d [100.0%% of total] out of %9d bytes [%4.1f%% used]", 171.86 total_bytes, total_alloced, total_u_perc); 171.87 171.88 @@ -603,6 +607,7 @@ 171.89 171.90 dac.dump_stats(int(ro_bytes), int(rw_bytes), int(md_bytes), int(mc_bytes)); 171.91 } 171.92 +#undef fmt_space 171.93 } 171.94 171.95 static void link_shared_classes(Klass* obj, TRAPS) {
172.1 --- a/src/share/vm/memory/referenceProcessor.cpp Thu May 15 18:23:26 2014 -0400 172.2 +++ b/src/share/vm/memory/referenceProcessor.cpp Thu May 22 15:52:41 2014 -0400 172.3 @@ -1,5 +1,5 @@ 172.4 /* 172.5 - * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. 172.6 + * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved. 172.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 172.8 * 172.9 * This code is free software; you can redistribute it and/or modify it 172.10 @@ -35,6 +35,8 @@ 172.11 #include "runtime/java.hpp" 172.12 #include "runtime/jniHandles.hpp" 172.13 172.14 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 172.15 + 172.16 ReferencePolicy* ReferenceProcessor::_always_clear_soft_ref_policy = NULL; 172.17 ReferencePolicy* ReferenceProcessor::_default_soft_ref_policy = NULL; 172.18 bool ReferenceProcessor::_pending_list_uses_discovered_field = false;
173.1 --- a/src/share/vm/memory/sharedHeap.cpp Thu May 15 18:23:26 2014 -0400 173.2 +++ b/src/share/vm/memory/sharedHeap.cpp Thu May 22 15:52:41 2014 -0400 173.3 @@ -1,5 +1,5 @@ 173.4 /* 173.5 - * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. 173.6 + * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. 173.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 173.8 * 173.9 * This code is free software; you can redistribute it and/or modify it 173.10 @@ -35,6 +35,8 @@ 173.11 #include "utilities/copy.hpp" 173.12 #include "utilities/workgroup.hpp" 173.13 173.14 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 173.15 + 173.16 SharedHeap* SharedHeap::_sh; 173.17 173.18 // The set of potentially parallel tasks in strong root scanning.
174.1 --- a/src/share/vm/memory/space.cpp Thu May 15 18:23:26 2014 -0400 174.2 +++ b/src/share/vm/memory/space.cpp Thu May 22 15:52:41 2014 -0400 174.3 @@ -1,5 +1,5 @@ 174.4 /* 174.5 - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 174.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 174.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 174.8 * 174.9 * This code is free software; you can redistribute it and/or modify it 174.10 @@ -45,6 +45,8 @@ 174.11 void SpaceMemRegionOopsIterClosure::do_oop(oop* p) { SpaceMemRegionOopsIterClosure::do_oop_work(p); } 174.12 void SpaceMemRegionOopsIterClosure::do_oop(narrowOop* p) { SpaceMemRegionOopsIterClosure::do_oop_work(p); } 174.13 174.14 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 174.15 + 174.16 HeapWord* DirtyCardToOopClosure::get_actual_top(HeapWord* top, 174.17 HeapWord* top_obj) { 174.18 if (top_obj != NULL) {
175.1 --- a/src/share/vm/memory/threadLocalAllocBuffer.cpp Thu May 15 18:23:26 2014 -0400 175.2 +++ b/src/share/vm/memory/threadLocalAllocBuffer.cpp Thu May 22 15:52:41 2014 -0400 175.3 @@ -1,5 +1,5 @@ 175.4 /* 175.5 - * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved. 175.6 + * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved. 175.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 175.8 * 175.9 * This code is free software; you can redistribute it and/or modify it 175.10 @@ -31,6 +31,8 @@ 175.11 #include "runtime/thread.inline.hpp" 175.12 #include "utilities/copy.hpp" 175.13 175.14 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 175.15 + 175.16 // Thread-Local Edens support 175.17 175.18 // static member initialization
176.1 --- a/src/share/vm/memory/threadLocalAllocBuffer.inline.hpp Thu May 15 18:23:26 2014 -0400 176.2 +++ b/src/share/vm/memory/threadLocalAllocBuffer.inline.hpp Thu May 22 15:52:41 2014 -0400 176.3 @@ -1,5 +1,5 @@ 176.4 /* 176.5 - * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. 176.6 + * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved. 176.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 176.8 * 176.9 * This code is free software; you can redistribute it and/or modify it 176.10 @@ -98,7 +98,7 @@ 176.11 " obj: "SIZE_FORMAT 176.12 " free: "SIZE_FORMAT 176.13 " waste: "SIZE_FORMAT"\n", 176.14 - "slow", thrd, thrd->osthread()->thread_id(), 176.15 + "slow", p2i(thrd), thrd->osthread()->thread_id(), 176.16 obj_size, free(), refill_waste_limit()); 176.17 } 176.18 }
177.1 --- a/src/share/vm/memory/universe.cpp Thu May 15 18:23:26 2014 -0400 177.2 +++ b/src/share/vm/memory/universe.cpp Thu May 22 15:52:41 2014 -0400 177.3 @@ -1,5 +1,5 @@ 177.4 /* 177.5 - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 177.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 177.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 177.8 * 177.9 * This code is free software; you can redistribute it and/or modify it 177.10 @@ -78,6 +78,8 @@ 177.11 #include "gc_implementation/parallelScavenge/parallelScavengeHeap.hpp" 177.12 #endif // INCLUDE_ALL_GCS 177.13 177.14 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 177.15 + 177.16 // Known objects 177.17 Klass* Universe::_boolArrayKlassObj = NULL; 177.18 Klass* Universe::_byteArrayKlassObj = NULL; 177.19 @@ -1348,7 +1350,7 @@ 177.20 HandleMark hm; // Handles created during verification can be zapped 177.21 _verify_count++; 177.22 177.23 - if (!silent) gclog_or_tty->print(prefix); 177.24 + if (!silent) gclog_or_tty->print("%s", prefix); 177.25 if (!silent) gclog_or_tty->print("[Verifying "); 177.26 if (!silent) gclog_or_tty->print("threads "); 177.27 Threads::verify();
178.1 --- a/src/share/vm/oops/annotations.cpp Thu May 15 18:23:26 2014 -0400 178.2 +++ b/src/share/vm/oops/annotations.cpp Thu May 22 15:52:41 2014 -0400 178.3 @@ -1,5 +1,5 @@ 178.4 /* 178.5 - * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. 178.6 + * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved. 178.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 178.8 * 178.9 * This code is free software; you can redistribute it and/or modify it 178.10 @@ -76,7 +76,7 @@ 178.11 178.12 178.13 void Annotations::print_value_on(outputStream* st) const { 178.14 - st->print("Anotations(" INTPTR_FORMAT ")", this); 178.15 + st->print("Anotations(" INTPTR_FORMAT ")", p2i(this)); 178.16 } 178.17 178.18 #if INCLUDE_SERVICES
179.1 --- a/src/share/vm/oops/constMethod.cpp Thu May 15 18:23:26 2014 -0400 179.2 +++ b/src/share/vm/oops/constMethod.cpp Thu May 22 15:52:41 2014 -0400 179.3 @@ -1,5 +1,5 @@ 179.4 /* 179.5 - * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. 179.6 + * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved. 179.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 179.8 * 179.9 * This code is free software; you can redistribute it and/or modify it 179.10 @@ -388,8 +388,8 @@ 179.11 void ConstMethod::print_on(outputStream* st) const { 179.12 ResourceMark rm; 179.13 assert(is_constMethod(), "must be constMethod"); 179.14 - st->print_cr(internal_name()); 179.15 - st->print(" - method: " INTPTR_FORMAT " ", (address)method()); 179.16 + st->print_cr("%s", internal_name()); 179.17 + st->print(" - method: " INTPTR_FORMAT " ", p2i((address)method())); 179.18 method()->print_value_on(st); st->cr(); 179.19 if (has_stackmap_table()) { 179.20 st->print(" - stackmap data: ");
180.1 --- a/src/share/vm/oops/constantPool.cpp Thu May 15 18:23:26 2014 -0400 180.2 +++ b/src/share/vm/oops/constantPool.cpp Thu May 22 15:52:41 2014 -0400 180.3 @@ -1,5 +1,5 @@ 180.4 /* 180.5 - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 180.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 180.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 180.8 * 180.9 * This code is free software; you can redistribute it and/or modify it 180.10 @@ -42,6 +42,8 @@ 180.11 #include "runtime/signature.hpp" 180.12 #include "runtime/vframe.hpp" 180.13 180.14 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 180.15 + 180.16 ConstantPool* ConstantPool::allocate(ClassLoaderData* loader_data, int length, TRAPS) { 180.17 // Tags are RW but comment below applies to tags also. 180.18 Array<u1>* tags = MetadataFactory::new_writeable_array<u1>(loader_data, length, 0, CHECK_NULL); 180.19 @@ -1884,7 +1886,7 @@ 180.20 void ConstantPool::print_on(outputStream* st) const { 180.21 EXCEPTION_MARK; 180.22 assert(is_constantPool(), "must be constantPool"); 180.23 - st->print_cr(internal_name()); 180.24 + st->print_cr("%s", internal_name()); 180.25 if (flags() != 0) { 180.26 st->print(" - flags: 0x%x", flags()); 180.27 if (has_preresolution()) st->print(" has_preresolution");
181.1 --- a/src/share/vm/oops/cpCache.cpp Thu May 15 18:23:26 2014 -0400 181.2 +++ b/src/share/vm/oops/cpCache.cpp Thu May 22 15:52:41 2014 -0400 181.3 @@ -1,5 +1,5 @@ 181.4 /* 181.5 - * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. 181.6 + * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved. 181.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 181.8 * 181.9 * This code is free software; you can redistribute it and/or modify it 181.10 @@ -38,8 +38,9 @@ 181.11 # include "gc_implementation/parallelScavenge/psPromotionManager.hpp" 181.12 #endif // INCLUDE_ALL_GCS 181.13 181.14 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 181.15 181.16 -// Implememtation of ConstantPoolCacheEntry 181.17 +// Implementation of ConstantPoolCacheEntry 181.18 181.19 void ConstantPoolCacheEntry::initialize_entry(int index) { 181.20 assert(0 < index && index < 0x10000, "sanity check"); 181.21 @@ -667,7 +668,7 @@ 181.22 181.23 void ConstantPoolCache::print_on(outputStream* st) const { 181.24 assert(is_constantPoolCache(), "obj must be constant pool cache"); 181.25 - st->print_cr(internal_name()); 181.26 + st->print_cr("%s", internal_name()); 181.27 // print constant pool cache entries 181.28 for (int i = 0; i < length(); i++) entry_at(i)->print(st, i); 181.29 }
182.1 --- a/src/share/vm/oops/generateOopMap.hpp Thu May 15 18:23:26 2014 -0400 182.2 +++ b/src/share/vm/oops/generateOopMap.hpp Thu May 22 15:52:41 2014 -0400 182.3 @@ -1,5 +1,5 @@ 182.4 /* 182.5 - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. 182.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 182.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 182.8 * 182.9 * This code is free software; you can redistribute it and/or modify it 182.10 @@ -412,9 +412,9 @@ 182.11 int copy_cts (CellTypeState *dst, CellTypeState *src); 182.12 182.13 // Error handling 182.14 - void error_work (const char *format, va_list ap); 182.15 - void report_error (const char *format, ...); 182.16 - void verify_error (const char *format, ...); 182.17 + void error_work (const char *format, va_list ap) ATTRIBUTE_PRINTF(2, 0); 182.18 + void report_error (const char *format, ...) ATTRIBUTE_PRINTF(2, 3); 182.19 + void verify_error (const char *format, ...) ATTRIBUTE_PRINTF(2, 3); 182.20 bool got_error() { return _got_error; } 182.21 182.22 // Create result set
183.1 --- a/src/share/vm/oops/instanceKlass.cpp Thu May 15 18:23:26 2014 -0400 183.2 +++ b/src/share/vm/oops/instanceKlass.cpp Thu May 22 15:52:41 2014 -0400 183.3 @@ -75,6 +75,8 @@ 183.4 #include "c1/c1_Compiler.hpp" 183.5 #endif 183.6 183.7 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 183.8 + 183.9 #ifdef DTRACE_ENABLED 183.10 183.11 #ifndef USDT2 183.12 @@ -2895,7 +2897,7 @@ 183.13 st->print(BULLET"instance size: %d", size_helper()); st->cr(); 183.14 st->print(BULLET"klass size: %d", size()); st->cr(); 183.15 st->print(BULLET"access: "); access_flags().print_on(st); st->cr(); 183.16 - st->print(BULLET"state: "); st->print_cr(state_names[_init_state]); 183.17 + st->print(BULLET"state: "); st->print_cr("%s", state_names[_init_state]); 183.18 st->print(BULLET"name: "); name()->print_value_on(st); st->cr(); 183.19 st->print(BULLET"super: "); super()->print_value_on_maybe_null(st); st->cr(); 183.20 st->print(BULLET"sub: ");
184.1 --- a/src/share/vm/oops/instanceRefKlass.cpp Thu May 15 18:23:26 2014 -0400 184.2 +++ b/src/share/vm/oops/instanceRefKlass.cpp Thu May 22 15:52:41 2014 -0400 184.3 @@ -1,5 +1,5 @@ 184.4 /* 184.5 - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 184.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 184.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 184.8 * 184.9 * This code is free software; you can redistribute it and/or modify it 184.10 @@ -45,6 +45,8 @@ 184.11 #include "oops/oop.pcgc.inline.hpp" 184.12 #endif // INCLUDE_ALL_GCS 184.13 184.14 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 184.15 + 184.16 template <class T> 184.17 void specialized_oop_follow_contents(InstanceRefKlass* ref, oop obj) { 184.18 T* referent_addr = (T*)java_lang_ref_Reference::referent_addr(obj);
185.1 --- a/src/share/vm/oops/klass.inline.hpp Thu May 15 18:23:26 2014 -0400 185.2 +++ b/src/share/vm/oops/klass.inline.hpp Thu May 22 15:52:41 2014 -0400 185.3 @@ -1,5 +1,5 @@ 185.4 /* 185.5 - * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. 185.6 + * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved. 185.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 185.8 * 185.9 * This code is free software; you can redistribute it and/or modify it 185.10 @@ -63,7 +63,7 @@ 185.11 assert(!is_null(v), "narrow klass value can never be zero"); 185.12 int shift = Universe::narrow_klass_shift(); 185.13 Klass* result = (Klass*)(void*)((uintptr_t)Universe::narrow_klass_base() + ((uintptr_t)v << shift)); 185.14 - assert(check_klass_alignment(result), err_msg("address not aligned: " PTR_FORMAT, (void*) result)); 185.15 + assert(check_klass_alignment(result), err_msg("address not aligned: " INTPTR_FORMAT, p2i((void*) result))); 185.16 return result; 185.17 } 185.18
186.1 --- a/src/share/vm/oops/klassVtable.cpp Thu May 15 18:23:26 2014 -0400 186.2 +++ b/src/share/vm/oops/klassVtable.cpp Thu May 22 15:52:41 2014 -0400 186.3 @@ -39,6 +39,8 @@ 186.4 #include "runtime/handles.inline.hpp" 186.5 #include "utilities/copy.hpp" 186.6 186.7 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 186.8 + 186.9 inline InstanceKlass* klassVtable::ik() const { 186.10 Klass* k = _klass(); 186.11 assert(k->oop_is_instance(), "not an InstanceKlass");
187.1 --- a/src/share/vm/oops/markOop.cpp Thu May 15 18:23:26 2014 -0400 187.2 +++ b/src/share/vm/oops/markOop.cpp Thu May 22 15:52:41 2014 -0400 187.3 @@ -1,5 +1,5 @@ 187.4 /* 187.5 - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. 187.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 187.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 187.8 * 187.9 * This code is free software; you can redistribute it and/or modify it 187.10 @@ -26,9 +26,11 @@ 187.11 #include "oops/markOop.hpp" 187.12 #include "runtime/thread.inline.hpp" 187.13 187.14 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 187.15 + 187.16 void markOopDesc::print_on(outputStream* st) const { 187.17 if (is_locked()) { 187.18 - st->print("locked(0x%lx)->", value()); 187.19 + st->print("locked(" INTPTR_FORMAT ")->", value()); 187.20 markOop(*(markOop*)value())->print_on(st); 187.21 } else { 187.22 assert(is_unlocked() || has_bias_pattern(), "just checking");
188.1 --- a/src/share/vm/oops/method.cpp Thu May 15 18:23:26 2014 -0400 188.2 +++ b/src/share/vm/oops/method.cpp Thu May 22 15:52:41 2014 -0400 188.3 @@ -1,5 +1,5 @@ 188.4 /* 188.5 - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 188.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 188.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 188.8 * 188.9 * This code is free software; you can redistribute it and/or modify it 188.10 @@ -55,6 +55,7 @@ 188.11 #include "utilities/quickSort.hpp" 188.12 #include "utilities/xmlstream.hpp" 188.13 188.14 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 188.15 188.16 // Implementation of Method 188.17 188.18 @@ -1426,7 +1427,7 @@ 188.19 188.20 void type_name(const char* name) { 188.21 if (_use_separator) _st->print(", "); 188.22 - _st->print(name); 188.23 + _st->print("%s", name); 188.24 _use_separator = true; 188.25 } 188.26 188.27 @@ -1907,7 +1908,7 @@ 188.28 void Method::print_on(outputStream* st) const { 188.29 ResourceMark rm; 188.30 assert(is_method(), "must be method"); 188.31 - st->print_cr(internal_name()); 188.32 + st->print_cr("%s", internal_name()); 188.33 // get the effect of PrintOopAddress, always, for methods: 188.34 st->print_cr(" - this oop: "INTPTR_FORMAT, (intptr_t)this); 188.35 st->print (" - method holder: "); method_holder()->print_value_on(st); st->cr(); 188.36 @@ -1990,7 +1991,7 @@ 188.37 188.38 void Method::print_value_on(outputStream* st) const { 188.39 assert(is_method(), "must be method"); 188.40 - st->print(internal_name()); 188.41 + st->print("%s", internal_name()); 188.42 print_address_on(st); 188.43 st->print(" "); 188.44 name()->print_value_on(st);
189.1 --- a/src/share/vm/oops/methodData.cpp Thu May 15 18:23:26 2014 -0400 189.2 +++ b/src/share/vm/oops/methodData.cpp Thu May 22 15:52:41 2014 -0400 189.3 @@ -1,5 +1,5 @@ 189.4 /* 189.5 - * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. 189.6 + * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. 189.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 189.8 * 189.9 * This code is free software; you can redistribute it and/or modify it 189.10 @@ -35,6 +35,8 @@ 189.11 #include "runtime/deoptimization.hpp" 189.12 #include "runtime/handles.inline.hpp" 189.13 189.14 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 189.15 + 189.16 // ================================================================== 189.17 // DataLayout 189.18 // 189.19 @@ -127,7 +129,7 @@ 189.20 st->print("trap(%s) ", Deoptimization::format_trap_state(buf, sizeof(buf), trap)); 189.21 } 189.22 if (extra != NULL) { 189.23 - st->print(extra); 189.24 + st->print("%s", extra); 189.25 } 189.26 int flags = data()->flags(); 189.27 if (flags != 0) { 189.28 @@ -656,7 +658,7 @@ 189.29 189.30 #ifndef PRODUCT 189.31 void ParametersTypeData::print_data_on(outputStream* st, const char* extra) const { 189.32 - st->print("parameter types", extra); 189.33 + st->print("parameter types"); // FIXME extra ignored? 189.34 _parameters.print_data_on(st); 189.35 } 189.36
190.1 --- a/src/share/vm/oops/oop.cpp Thu May 15 18:23:26 2014 -0400 190.2 +++ b/src/share/vm/oops/oop.cpp Thu May 22 15:52:41 2014 -0400 190.3 @@ -30,6 +30,8 @@ 190.4 #include "runtime/thread.inline.hpp" 190.5 #include "utilities/copy.hpp" 190.6 190.7 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 190.8 + 190.9 bool always_do_update_barrier = false; 190.10 190.11 BarrierSet* oopDesc::_bs = NULL;
191.1 --- a/src/share/vm/oops/oop.inline.hpp Thu May 15 18:23:26 2014 -0400 191.2 +++ b/src/share/vm/oops/oop.inline.hpp Thu May 22 15:52:41 2014 -0400 191.3 @@ -1,5 +1,5 @@ 191.4 /* 191.5 - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 191.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 191.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 191.8 * 191.9 * This code is free software; you can redistribute it and/or modify it 191.10 @@ -209,7 +209,7 @@ 191.11 address base = Universe::narrow_oop_base(); 191.12 int shift = Universe::narrow_oop_shift(); 191.13 oop result = (oop)(void*)((uintptr_t)base + ((uintptr_t)v << shift)); 191.14 - assert(check_obj_alignment(result), err_msg("address not aligned: " PTR_FORMAT, (void*) result)); 191.15 + assert(check_obj_alignment(result), err_msg("address not aligned: " INTPTR_FORMAT, p2i((void*) result))); 191.16 return result; 191.17 } 191.18
192.1 --- a/src/share/vm/opto/block.cpp Thu May 15 18:23:26 2014 -0400 192.2 +++ b/src/share/vm/opto/block.cpp Thu May 22 15:52:41 2014 -0400 192.3 @@ -1,5 +1,5 @@ 192.4 /* 192.5 - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 192.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 192.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 192.8 * 192.9 * This code is free software; you can redistribute it and/or modify it 192.10 @@ -339,7 +339,7 @@ 192.11 st->print(" FRegPressure: %d",_freg_pressure); 192.12 st->print(" FHRP Index: %d",_fhrp_index); 192.13 } 192.14 - st->print_cr(""); 192.15 + st->cr(); 192.16 } 192.17 192.18 void Block::dump() const {
193.1 --- a/src/share/vm/opto/callnode.cpp Thu May 15 18:23:26 2014 -0400 193.2 +++ b/src/share/vm/opto/callnode.cpp Thu May 22 15:52:41 2014 -0400 193.3 @@ -1,5 +1,5 @@ 193.4 /* 193.5 - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 193.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 193.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 193.8 * 193.9 * This code is free software; you can redistribute it and/or modify it 193.10 @@ -111,7 +111,7 @@ 193.11 #ifndef PRODUCT 193.12 void ParmNode::dump_spec(outputStream *st) const { 193.13 if( _con < TypeFunc::Parms ) { 193.14 - st->print(names[_con]); 193.15 + st->print("%s", names[_con]); 193.16 } else { 193.17 st->print("Parm%d: ",_con-TypeFunc::Parms); 193.18 // Verbose and WizardMode dump bottom_type for all nodes 193.19 @@ -347,19 +347,19 @@ 193.20 break; 193.21 case Type::AryPtr: 193.22 case Type::InstPtr: 193.23 - st->print(" %s%d]=#Ptr" INTPTR_FORMAT,msg,i,t->isa_oopptr()->const_oop()); 193.24 + st->print(" %s%d]=#Ptr" INTPTR_FORMAT,msg,i,p2i(t->isa_oopptr()->const_oop())); 193.25 break; 193.26 case Type::KlassPtr: 193.27 - st->print(" %s%d]=#Ptr" INTPTR_FORMAT,msg,i,t->make_ptr()->isa_klassptr()->klass()); 193.28 + st->print(" %s%d]=#Ptr" INTPTR_FORMAT,msg,i,p2i(t->make_ptr()->isa_klassptr()->klass())); 193.29 break; 193.30 case Type::MetadataPtr: 193.31 - st->print(" %s%d]=#Ptr" INTPTR_FORMAT,msg,i,t->make_ptr()->isa_metadataptr()->metadata()); 193.32 + st->print(" %s%d]=#Ptr" INTPTR_FORMAT,msg,i,p2i(t->make_ptr()->isa_metadataptr()->metadata())); 193.33 break; 193.34 case Type::NarrowOop: 193.35 - st->print(" %s%d]=#Ptr" INTPTR_FORMAT,msg,i,t->make_ptr()->isa_oopptr()->const_oop()); 193.36 + st->print(" %s%d]=#Ptr" INTPTR_FORMAT,msg,i,p2i(t->make_ptr()->isa_oopptr()->const_oop())); 193.37 break; 193.38 case Type::RawPtr: 193.39 - st->print(" %s%d]=#Raw" INTPTR_FORMAT,msg,i,t->is_rawptr()); 193.40 + st->print(" %s%d]=#Raw" INTPTR_FORMAT,msg,i,p2i(t->is_rawptr())); 193.41 break; 193.42 case Type::DoubleCon: 193.43 st->print(" %s%d]=#%fD",msg,i,t->is_double_constant()->_d); 193.44 @@ -368,7 +368,7 @@ 193.45 st->print(" %s%d]=#%fF",msg,i,t->is_float_constant()->_f); 193.46 break; 193.47 case Type::Long: 193.48 - st->print(" %s%d]=#"INT64_FORMAT,msg,i,t->is_long()->get_con()); 193.49 + st->print(" %s%d]=#"INT64_FORMAT,msg,i,(int64_t)(t->is_long()->get_con())); 193.50 break; 193.51 case Type::Half: 193.52 case Type::Top: 193.53 @@ -427,7 +427,7 @@ 193.54 193.55 for (i = 0; i < (uint)scobjs.length(); i++) { 193.56 // Scalar replaced objects. 193.57 - st->print_cr(""); 193.58 + st->cr(); 193.59 st->print(" # ScObj" INT32_FORMAT " ", i); 193.60 SafePointScalarObjectNode* spobj = scobjs.at(i); 193.61 ciKlass* cik = spobj->bottom_type()->is_oopptr()->klass(); 193.62 @@ -484,7 +484,7 @@ 193.63 st->print(" }"); 193.64 } 193.65 } 193.66 - st->print_cr(""); 193.67 + st->cr(); 193.68 if (caller() != NULL) caller()->format(regalloc, n, st); 193.69 } 193.70 193.71 @@ -947,7 +947,7 @@ 193.72 #ifndef PRODUCT 193.73 void CallRuntimeNode::dump_spec(outputStream *st) const { 193.74 st->print("# "); 193.75 - st->print(_name); 193.76 + st->print("%s", _name); 193.77 CallNode::dump_spec(st); 193.78 } 193.79 #endif 193.80 @@ -965,7 +965,7 @@ 193.81 #ifndef PRODUCT 193.82 void CallLeafNode::dump_spec(outputStream *st) const { 193.83 st->print("# "); 193.84 - st->print(_name); 193.85 + st->print("%s", _name); 193.86 CallNode::dump_spec(st); 193.87 } 193.88 #endif
194.1 --- a/src/share/vm/opto/chaitin.cpp Thu May 15 18:23:26 2014 -0400 194.2 +++ b/src/share/vm/opto/chaitin.cpp Thu May 22 15:52:41 2014 -0400 194.3 @@ -1,5 +1,5 @@ 194.4 /* 194.5 - * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. 194.6 + * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. 194.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 194.8 * 194.9 * This code is free software; you can redistribute it and/or modify it 194.10 @@ -2019,25 +2019,25 @@ 194.11 tty->print_cr("new LRG"); 194.12 } 194.13 } 194.14 - tty->print_cr(""); 194.15 + tty->cr(); 194.16 194.17 // Dump lo-degree list 194.18 tty->print("Lo degree: "); 194.19 for(uint i3 = _lo_degree; i3; i3 = lrgs(i3)._next ) 194.20 tty->print("L%d ",i3); 194.21 - tty->print_cr(""); 194.22 + tty->cr(); 194.23 194.24 // Dump lo-stk-degree list 194.25 tty->print("Lo stk degree: "); 194.26 for(uint i4 = _lo_stk_degree; i4; i4 = lrgs(i4)._next ) 194.27 tty->print("L%d ",i4); 194.28 - tty->print_cr(""); 194.29 + tty->cr(); 194.30 194.31 // Dump lo-degree list 194.32 tty->print("Hi degree: "); 194.33 for(uint i5 = _hi_degree; i5; i5 = lrgs(i5)._next ) 194.34 tty->print("L%d ",i5); 194.35 - tty->print_cr(""); 194.36 + tty->cr(); 194.37 } 194.38 194.39 void PhaseChaitin::dump_degree_lists() const { 194.40 @@ -2045,26 +2045,26 @@ 194.41 tty->print("Lo degree: "); 194.42 for( uint i = _lo_degree; i; i = lrgs(i)._next ) 194.43 tty->print("L%d ",i); 194.44 - tty->print_cr(""); 194.45 + tty->cr(); 194.46 194.47 // Dump lo-stk-degree list 194.48 tty->print("Lo stk degree: "); 194.49 for(uint i2 = _lo_stk_degree; i2; i2 = lrgs(i2)._next ) 194.50 tty->print("L%d ",i2); 194.51 - tty->print_cr(""); 194.52 + tty->cr(); 194.53 194.54 // Dump lo-degree list 194.55 tty->print("Hi degree: "); 194.56 for(uint i3 = _hi_degree; i3; i3 = lrgs(i3)._next ) 194.57 tty->print("L%d ",i3); 194.58 - tty->print_cr(""); 194.59 + tty->cr(); 194.60 } 194.61 194.62 void PhaseChaitin::dump_simplified() const { 194.63 tty->print("Simplified: "); 194.64 for( uint i = _simplified; i; i = lrgs(i)._next ) 194.65 tty->print("L%d ",i); 194.66 - tty->print_cr(""); 194.67 + tty->cr(); 194.68 } 194.69 194.70 static char *print_reg( OptoReg::Name reg, const PhaseChaitin *pc, char *buf ) { 194.71 @@ -2143,7 +2143,7 @@ 194.72 } 194.73 tty->print(" : parm %d: ", k); 194.74 domain->field_at(k + TypeFunc::Parms)->dump(); 194.75 - tty->print_cr(""); 194.76 + tty->cr(); 194.77 } 194.78 } 194.79 194.80 @@ -2165,7 +2165,7 @@ 194.81 _matcher._parm_regs[j].second() == reg ) { 194.82 tty->print("parm %d: ",j); 194.83 domain->field_at(j + TypeFunc::Parms)->dump(); 194.84 - tty->print_cr(""); 194.85 + tty->cr(); 194.86 break; 194.87 } 194.88 }
195.1 --- a/src/share/vm/opto/compile.cpp Thu May 15 18:23:26 2014 -0400 195.2 +++ b/src/share/vm/opto/compile.cpp Thu May 22 15:52:41 2014 -0400 195.3 @@ -1,5 +1,5 @@ 195.4 /* 195.5 - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 195.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 195.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 195.8 * 195.9 * This code is free software; you can redistribute it and/or modify it 195.10 @@ -2411,7 +2411,7 @@ 195.11 starts_bundle = ' '; 195.12 tty->print("\t"); 195.13 delay->format(_regalloc, tty); 195.14 - tty->print_cr(""); 195.15 + tty->cr(); 195.16 delay = NULL; 195.17 } 195.18 195.19 @@ -2425,12 +2425,12 @@ 195.20 if (pcs && n->_idx < pc_limit) 195.21 tty->print_cr("%3.3x", pcs[n->_idx]); 195.22 else 195.23 - tty->print_cr(""); 195.24 + tty->cr(); 195.25 195.26 assert(cut_short || delay == NULL, "no unconditional delay branch"); 195.27 195.28 } // End of per-block dump 195.29 - tty->print_cr(""); 195.30 + tty->cr(); 195.31 195.32 if (cut_short) tty->print_cr("*** disassembly is cut short ***"); 195.33 } 195.34 @@ -3671,7 +3671,8 @@ 195.35 default: ShouldNotReachHere(); 195.36 } 195.37 assert(constant_addr, "consts section too small"); 195.38 - assert((constant_addr - _masm.code()->consts()->start()) == con.offset(), err_msg_res("must be: %d == %d", constant_addr - _masm.code()->consts()->start(), con.offset())); 195.39 + assert((constant_addr - _masm.code()->consts()->start()) == con.offset(), 195.40 + err_msg_res("must be: %d == %d", (int) (constant_addr - _masm.code()->consts()->start()), (int)(con.offset()))); 195.41 } 195.42 } 195.43 195.44 @@ -3751,7 +3752,7 @@ 195.45 195.46 for (uint i = 0; i < n->outcnt(); i++) { 195.47 address* constant_addr = &jump_table_base[i]; 195.48 - assert(*constant_addr == (((address) n) + i), err_msg_res("all jump-table entries must contain adjusted node pointer: " INTPTR_FORMAT " == " INTPTR_FORMAT, *constant_addr, (((address) n) + i))); 195.49 + assert(*constant_addr == (((address) n) + i), err_msg_res("all jump-table entries must contain adjusted node pointer: " INTPTR_FORMAT " == " INTPTR_FORMAT, p2i(*constant_addr), p2i(((address) n) + i))); 195.50 *constant_addr = cb.consts()->target(*labels.at(i), (address) constant_addr); 195.51 cb.consts()->relocate((address) constant_addr, relocInfo::internal_word_type); 195.52 } 195.53 @@ -3782,7 +3783,7 @@ 195.54 } 195.55 } 195.56 for (int i = 0; i < _print_inlining_list->length(); i++) { 195.57 - tty->print(_print_inlining_list->adr_at(i)->ss()->as_string()); 195.58 + tty->print("%s", _print_inlining_list->adr_at(i)->ss()->as_string()); 195.59 } 195.60 } 195.61 }
196.1 --- a/src/share/vm/opto/compile.hpp Thu May 15 18:23:26 2014 -0400 196.2 +++ b/src/share/vm/opto/compile.hpp Thu May 22 15:52:41 2014 -0400 196.3 @@ -1,5 +1,5 @@ 196.4 /* 196.5 - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 196.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 196.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 196.8 * 196.9 * This code is free software; you can redistribute it and/or modify it 196.10 @@ -465,7 +465,7 @@ 196.11 void print_inlining(ciMethod* method, int inline_level, int bci, const char* msg = NULL) { 196.12 stringStream ss; 196.13 CompileTask::print_inlining(&ss, method, inline_level, bci, msg); 196.14 - print_inlining_stream()->print(ss.as_string()); 196.15 + print_inlining_stream()->print("%s", ss.as_string()); 196.16 } 196.17 196.18 void* replay_inline_data() const { return _replay_inline_data; }
197.1 --- a/src/share/vm/opto/doCall.cpp Thu May 15 18:23:26 2014 -0400 197.2 +++ b/src/share/vm/opto/doCall.cpp Thu May 22 15:52:41 2014 -0400 197.3 @@ -1,5 +1,5 @@ 197.4 /* 197.5 - * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. 197.6 + * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved. 197.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 197.8 * 197.9 * This code is free software; you can redistribute it and/or modify it 197.10 @@ -56,7 +56,7 @@ 197.11 out->print(" \\-> TypeProfile (%d/%d counts) = ", receiver_count, site_count); 197.12 stringStream ss; 197.13 prof_klass->name()->print_symbol_on(&ss); 197.14 - out->print(ss.as_string()); 197.15 + out->print("%s", ss.as_string()); 197.16 out->cr(); 197.17 } 197.18 }
198.1 --- a/src/share/vm/opto/gcm.cpp Thu May 15 18:23:26 2014 -0400 198.2 +++ b/src/share/vm/opto/gcm.cpp Thu May 22 15:52:41 2014 -0400 198.3 @@ -1,5 +1,5 @@ 198.4 /* 198.5 - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 198.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 198.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 198.8 * 198.9 * This code is free software; you can redistribute it and/or modify it 198.10 @@ -2014,7 +2014,7 @@ 198.11 tty->print("%s: %d trip_count: %6.0f freq: %6.0f\n", 198.12 _depth == 0 ? "Method" : "Loop", _id, trip_count(), _freq); 198.13 for (int i = 0; i < _depth; i++) tty->print(" "); 198.14 - tty->print(" members:", _id); 198.15 + tty->print(" members:"); 198.16 int k = 0; 198.17 for (int i = 0; i < _members.length(); i++) { 198.18 if (k++ >= 6) {
199.1 --- a/src/share/vm/opto/idealGraphPrinter.cpp Thu May 15 18:23:26 2014 -0400 199.2 +++ b/src/share/vm/opto/idealGraphPrinter.cpp Thu May 22 15:52:41 2014 -0400 199.3 @@ -1,5 +1,5 @@ 199.4 /* 199.5 - * Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved. 199.6 + * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved. 199.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 199.8 * 199.9 * This code is free software; you can redistribute it and/or modify it 199.10 @@ -155,7 +155,7 @@ 199.11 } else { 199.12 // It would be nice if we could shut down cleanly but it should 199.13 // be an error if we can't connect to the visualizer. 199.14 - fatal(err_msg_res("Couldn't connect to visualizer at %s:%d", 199.15 + fatal(err_msg_res("Couldn't connect to visualizer at %s:" INTX_FORMAT, 199.16 PrintIdealGraphAddress, PrintIdealGraphPort)); 199.17 } 199.18 } 199.19 @@ -195,7 +195,7 @@ 199.20 199.21 199.22 void IdealGraphPrinter::begin_elem(const char *s) { 199.23 - _xml->begin_elem(s); 199.24 + _xml->begin_elem("%s", s); 199.25 } 199.26 199.27 void IdealGraphPrinter::end_elem() { 199.28 @@ -203,7 +203,7 @@ 199.29 } 199.30 199.31 void IdealGraphPrinter::begin_head(const char *s) { 199.32 - _xml->begin_head(s); 199.33 + _xml->begin_head("%s", s); 199.34 } 199.35 199.36 void IdealGraphPrinter::end_head() { 199.37 @@ -223,7 +223,7 @@ 199.38 } 199.39 199.40 void IdealGraphPrinter::head(const char *name) { 199.41 - _xml->head(name); 199.42 + _xml->head("%s", name); 199.43 } 199.44 199.45 void IdealGraphPrinter::tail(const char *name) { 199.46 @@ -231,7 +231,7 @@ 199.47 } 199.48 199.49 void IdealGraphPrinter::text(const char *s) { 199.50 - _xml->text(s); 199.51 + _xml->text("%s", s); 199.52 } 199.53 199.54 void IdealGraphPrinter::print_prop(const char *name, int val) { 199.55 @@ -359,7 +359,7 @@ 199.56 void IdealGraphPrinter::print_indent() { 199.57 tty->print_cr("printing ident %d", _depth); 199.58 for (int i = 0; i < _depth; i++) { 199.59 - _xml->print(INDENT); 199.60 + _xml->print("%s", INDENT); 199.61 } 199.62 } 199.63
200.1 --- a/src/share/vm/opto/ifg.cpp Thu May 15 18:23:26 2014 -0400 200.2 +++ b/src/share/vm/opto/ifg.cpp Thu May 22 15:52:41 2014 -0400 200.3 @@ -1,5 +1,5 @@ 200.4 /* 200.5 - * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. 200.6 + * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved. 200.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 200.8 * 200.9 * This code is free software; you can redistribute it and/or modify it 200.10 @@ -257,7 +257,7 @@ 200.11 for( i = 0; i < _maxlrg*2; i++ ) 200.12 if( h_cnt[i] ) 200.13 tty->print("%d/%d ",i,h_cnt[i]); 200.14 - tty->print_cr(""); 200.15 + tty->cr(); 200.16 } 200.17 200.18 void PhaseIFG::verify( const PhaseChaitin *pc ) const {
201.1 --- a/src/share/vm/opto/loopPredicate.cpp Thu May 15 18:23:26 2014 -0400 201.2 +++ b/src/share/vm/opto/loopPredicate.cpp Thu May 22 15:52:41 2014 -0400 201.3 @@ -1,5 +1,5 @@ 201.4 /* 201.5 - * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. 201.6 + * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved. 201.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 201.8 * 201.9 * This code is free software; you can redistribute it and/or modify it 201.10 @@ -637,7 +637,7 @@ 201.11 201.12 if (TraceLoopPredicate) { 201.13 predString->print_cr("<u range"); 201.14 - tty->print(predString->as_string()); 201.15 + tty->print("%s", predString->as_string()); 201.16 } 201.17 return bol; 201.18 }
202.1 --- a/src/share/vm/opto/loopnode.cpp Thu May 15 18:23:26 2014 -0400 202.2 +++ b/src/share/vm/opto/loopnode.cpp Thu May 22 15:52:41 2014 -0400 202.3 @@ -1,5 +1,5 @@ 202.4 /* 202.5 - * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. 202.6 + * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved. 202.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 202.8 * 202.9 * This code is free software; you can redistribute it and/or modify it 202.10 @@ -3568,7 +3568,7 @@ 202.11 202.12 #ifdef ASSERT 202.13 void PhaseIdealLoop::dump_bad_graph(const char* msg, Node* n, Node* early, Node* LCA) { 202.14 - tty->print_cr(msg); 202.15 + tty->print_cr("%s", msg); 202.16 tty->print("n: "); n->dump(); 202.17 tty->print("early(n): "); early->dump(); 202.18 if (n->in(0) != NULL && !n->in(0)->is_top() &&
203.1 --- a/src/share/vm/opto/matcher.cpp Thu May 15 18:23:26 2014 -0400 203.2 +++ b/src/share/vm/opto/matcher.cpp Thu May 22 15:52:41 2014 -0400 203.3 @@ -1,5 +1,5 @@ 203.4 /* 203.5 - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 203.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 203.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 203.8 * 203.9 * This code is free software; you can redistribute it and/or modify it 203.10 @@ -2622,7 +2622,7 @@ 203.11 tty->print_cr("%s %d %s", 203.12 ruleName[i], _cost[i], ruleName[_rule[i]] ); 203.13 } 203.14 - tty->print_cr(""); 203.15 + tty->cr(); 203.16 203.17 for( i=0; i<2; i++ ) 203.18 if( _kids[i] )
204.1 --- a/src/share/vm/opto/memnode.cpp Thu May 15 18:23:26 2014 -0400 204.2 +++ b/src/share/vm/opto/memnode.cpp Thu May 22 15:52:41 2014 -0400 204.3 @@ -1,5 +1,5 @@ 204.4 /* 204.5 - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 204.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 204.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 204.8 * 204.9 * This code is free software; you can redistribute it and/or modify it 204.10 @@ -4023,7 +4023,7 @@ 204.11 intptr_t st_off = get_store_offset(st, phase); 204.12 if (st_off < 0) continue; // ignore dead garbage 204.13 if (last_off > st_off) { 204.14 - tty->print_cr("*** bad store offset at %d: %d > %d", i, last_off, st_off); 204.15 + tty->print_cr("*** bad store offset at %d: " INTX_FORMAT " > " INTX_FORMAT, i, last_off, st_off); 204.16 this->dump(2); 204.17 assert(false, "ascending store offsets"); 204.18 return false;
205.1 --- a/src/share/vm/opto/node.cpp Thu May 15 18:23:26 2014 -0400 205.2 +++ b/src/share/vm/opto/node.cpp Thu May 22 15:52:41 2014 -0400 205.3 @@ -1,5 +1,5 @@ 205.4 /* 205.5 - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 205.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 205.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 205.8 * 205.9 * This code is free software; you can redistribute it and/or modify it 205.10 @@ -1680,7 +1680,7 @@ 205.11 } 205.12 } 205.13 } 205.14 - if (suffix) st->print(suffix); 205.15 + if (suffix) st->print("%s", suffix); 205.16 C->_in_dump_cnt--; 205.17 } 205.18
206.1 --- a/src/share/vm/opto/parse1.cpp Thu May 15 18:23:26 2014 -0400 206.2 +++ b/src/share/vm/opto/parse1.cpp Thu May 22 15:52:41 2014 -0400 206.3 @@ -1,5 +1,5 @@ 206.4 /* 206.5 - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 206.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 206.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 206.8 * 206.9 * This code is free software; you can redistribute it and/or modify it 206.10 @@ -607,7 +607,7 @@ 206.11 set_map(entry_map); 206.12 do_exits(); 206.13 206.14 - if (log) log->done("parse nodes='%d' live='%d' memory='%d'", 206.15 + if (log) log->done("parse nodes='%d' live='%d' memory='" SIZE_FORMAT "'", 206.16 C->unique(), C->live_nodes(), C->node_arena()->used()); 206.17 } 206.18 206.19 @@ -1369,7 +1369,7 @@ 206.20 tty->print((( i < ns) ? " %d" : " %d(e)"), b->successor_at(i)->rpo()); 206.21 } 206.22 if (b->is_loop_head()) tty->print(" lphd"); 206.23 - tty->print_cr(""); 206.24 + tty->cr(); 206.25 } 206.26 206.27 assert(block()->is_merged(), "must be merged before being parsed");
207.1 --- a/src/share/vm/opto/parse2.cpp Thu May 15 18:23:26 2014 -0400 207.2 +++ b/src/share/vm/opto/parse2.cpp Thu May 22 15:52:41 2014 -0400 207.3 @@ -1,5 +1,5 @@ 207.4 /* 207.5 - * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. 207.6 + * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved. 207.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 207.8 * 207.9 * This code is free software; you can redistribute it and/or modify it 207.10 @@ -626,7 +626,7 @@ 207.11 _method->print_short_name(); 207.12 tty->print_cr(" switch decision tree"); 207.13 tty->print_cr(" %d ranges (%d singletons), max_depth=%d, est_depth=%d", 207.14 - hi-lo+1, nsing, _max_switch_depth, _est_switch_depth); 207.15 + (int) (hi-lo+1), nsing, _max_switch_depth, _est_switch_depth); 207.16 if (_max_switch_depth > _est_switch_depth) { 207.17 tty->print_cr("******** BAD SWITCH DEPTH ********"); 207.18 } 207.19 @@ -634,7 +634,7 @@ 207.20 for( r = lo; r <= hi; r++ ) { 207.21 r->print(); 207.22 } 207.23 - tty->print_cr(""); 207.24 + tty->cr(); 207.25 } 207.26 #endif 207.27 }
208.1 --- a/src/share/vm/opto/phaseX.cpp Thu May 15 18:23:26 2014 -0400 208.2 +++ b/src/share/vm/opto/phaseX.cpp Thu May 22 15:52:41 2014 -0400 208.3 @@ -1,5 +1,5 @@ 208.4 /* 208.5 - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 208.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 208.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 208.8 * 208.9 * This code is free software; you can redistribute it and/or modify it 208.10 @@ -1002,10 +1002,10 @@ 208.11 if ( VerifyIterativeGVN && PrintOpto ) { 208.12 if ( _verify_counter == _verify_full_passes ) 208.13 tty->print_cr("VerifyIterativeGVN: %d transforms and verify passes", 208.14 - _verify_full_passes); 208.15 + (int) _verify_full_passes); 208.16 else 208.17 tty->print_cr("VerifyIterativeGVN: %d transforms, %d full verify passes", 208.18 - _verify_counter, _verify_full_passes); 208.19 + (int) _verify_counter, (int) _verify_full_passes); 208.20 } 208.21 #endif 208.22 }
209.1 --- a/src/share/vm/opto/regmask.cpp Thu May 15 18:23:26 2014 -0400 209.2 +++ b/src/share/vm/opto/regmask.cpp Thu May 22 15:52:41 2014 -0400 209.3 @@ -1,5 +1,5 @@ 209.4 /* 209.5 - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 209.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 209.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 209.8 * 209.9 * This code is free software; you can redistribute it and/or modify it 209.10 @@ -116,7 +116,7 @@ 209.11 case Special: st->print("r---"); break; 209.12 case Bad: st->print("rBAD"); break; 209.13 default: 209.14 - if (r < _last_Mach_Reg) st->print(Matcher::regName[r]); 209.15 + if (r < _last_Mach_Reg) st->print("%s", Matcher::regName[r]); 209.16 else st->print("rS%d",r); 209.17 break; 209.18 }
210.1 --- a/src/share/vm/opto/runtime.cpp Thu May 15 18:23:26 2014 -0400 210.2 +++ b/src/share/vm/opto/runtime.cpp Thu May 22 15:52:41 2014 -0400 210.3 @@ -1395,7 +1395,7 @@ 210.4 } else { 210.5 tty->print("<unknown>"); 210.6 } 210.7 - tty->print(" at " INTPTR_FORMAT, exception_pc); 210.8 + tty->print(" at " INTPTR_FORMAT, p2i(exception_pc)); 210.9 tty->print_cr("]"); 210.10 } 210.11
211.1 --- a/src/share/vm/opto/subnode.cpp Thu May 15 18:23:26 2014 -0400 211.2 +++ b/src/share/vm/opto/subnode.cpp Thu May 22 15:52:41 2014 -0400 211.3 @@ -1,5 +1,5 @@ 211.4 /* 211.5 - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 211.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 211.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 211.8 * 211.9 * This code is free software; you can redistribute it and/or modify it 211.10 @@ -1065,7 +1065,7 @@ 211.11 #ifndef PRODUCT 211.12 void BoolTest::dump_on(outputStream *st) const { 211.13 const char *msg[] = {"eq","gt","of","lt","ne","le","nof","ge"}; 211.14 - st->print(msg[_test]); 211.15 + st->print("%s", msg[_test]); 211.16 } 211.17 #endif 211.18
212.1 --- a/src/share/vm/opto/type.cpp Thu May 15 18:23:26 2014 -0400 212.2 +++ b/src/share/vm/opto/type.cpp Thu May 22 15:52:41 2014 -0400 212.3 @@ -1,5 +1,5 @@ 212.4 /* 212.5 - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 212.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 212.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 212.8 * 212.9 * This code is free software; you can redistribute it and/or modify it 212.10 @@ -41,6 +41,8 @@ 212.11 #include "opto/opcodes.hpp" 212.12 #include "opto/type.hpp" 212.13 212.14 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 212.15 + 212.16 // Portions of code courtesy of Clifford Click 212.17 212.18 // Optimization - Graph Style 212.19 @@ -842,7 +844,7 @@ 212.20 #ifndef PRODUCT 212.21 //------------------------------dump2------------------------------------------ 212.22 void Type::dump2( Dict &d, uint depth, outputStream *st ) const { 212.23 - st->print(_type_info[_base].msg); 212.24 + st->print("%s", _type_info[_base].msg); 212.25 } 212.26 212.27 //------------------------------dump-------------------------------------------
213.1 --- a/src/share/vm/prims/jni.cpp Thu May 15 18:23:26 2014 -0400 213.2 +++ b/src/share/vm/prims/jni.cpp Thu May 22 15:52:41 2014 -0400 213.3 @@ -1,5 +1,5 @@ 213.4 /* 213.5 - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 213.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 213.7 * Copyright (c) 2012 Red Hat, Inc. 213.8 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 213.9 * 213.10 @@ -308,7 +308,7 @@ 213.11 213.12 class JNITraceWrapper : public StackObj { 213.13 public: 213.14 - JNITraceWrapper(const char* format, ...) { 213.15 + JNITraceWrapper(const char* format, ...) ATTRIBUTE_PRINTF(2, 3) { 213.16 if (TraceJNICalls) { 213.17 va_list ap; 213.18 va_start(ap, format);
214.1 --- a/src/share/vm/prims/jniCheck.cpp Thu May 15 18:23:26 2014 -0400 214.2 +++ b/src/share/vm/prims/jniCheck.cpp Thu May 22 15:52:41 2014 -0400 214.3 @@ -1,5 +1,5 @@ 214.4 /* 214.5 - * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. 214.6 + * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved. 214.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 214.8 * 214.9 * This code is free software; you can redistribute it and/or modify it 214.10 @@ -100,7 +100,7 @@ 214.11 result_type JNICALL header { \ 214.12 JavaThread* thr = (JavaThread*)ThreadLocalStorage::get_thread_slow();\ 214.13 if (thr == NULL || !thr->is_Java_thread()) { \ 214.14 - tty->print_cr(fatal_using_jnienv_in_nonjava); \ 214.15 + tty->print_cr("%s", fatal_using_jnienv_in_nonjava); \ 214.16 os::abort(true); \ 214.17 } \ 214.18 JNIEnv* xenv = thr->jni_environment(); \ 214.19 @@ -184,7 +184,7 @@ 214.20 functionEnter(JavaThread* thr) 214.21 { 214.22 if (thr->in_critical()) { 214.23 - tty->print_cr(warn_other_function_in_critical); 214.24 + tty->print_cr("%s", warn_other_function_in_critical); 214.25 } 214.26 if (thr->has_pending_exception()) { 214.27 NativeReportJNIWarning(thr, "JNI call made with exception pending"); 214.28 @@ -195,7 +195,7 @@ 214.29 functionEnterExceptionAllowed(JavaThread* thr) 214.30 { 214.31 if (thr->in_critical()) { 214.32 - tty->print_cr(warn_other_function_in_critical); 214.33 + tty->print_cr("%s", warn_other_function_in_critical); 214.34 } 214.35 } 214.36
215.1 --- a/src/share/vm/prims/jvm.cpp Thu May 15 18:23:26 2014 -0400 215.2 +++ b/src/share/vm/prims/jvm.cpp Thu May 22 15:52:41 2014 -0400 215.3 @@ -220,7 +220,7 @@ 215.4 #ifdef ASSERT 215.5 class JVMTraceWrapper : public StackObj { 215.6 public: 215.7 - JVMTraceWrapper(const char* format, ...) { 215.8 + JVMTraceWrapper(const char* format, ...) ATTRIBUTE_PRINTF(2, 3) { 215.9 if (TraceJVMCalls) { 215.10 va_list ap; 215.11 va_start(ap, format); 215.12 @@ -2716,14 +2716,14 @@ 215.13 215.14 215.15 JVM_LEAF(jlong, JVM_Lseek(jint fd, jlong offset, jint whence)) 215.16 - JVMWrapper4("JVM_Lseek (0x%x, %Ld, %d)", fd, offset, whence); 215.17 + JVMWrapper4("JVM_Lseek (0x%x, " INT64_FORMAT ", %d)", fd, (int64_t) offset, whence); 215.18 //%note jvm_r6 215.19 return os::lseek(fd, offset, whence); 215.20 JVM_END 215.21 215.22 215.23 JVM_LEAF(jint, JVM_SetLength(jint fd, jlong length)) 215.24 - JVMWrapper3("JVM_SetLength (0x%x, %Ld)", fd, length); 215.25 + JVMWrapper3("JVM_SetLength (0x%x, " INT64_FORMAT ")", fd, (int64_t) length); 215.26 return os::ftruncate(fd, length); 215.27 JVM_END 215.28 215.29 @@ -2738,13 +2738,14 @@ 215.30 // Printing support ////////////////////////////////////////////////// 215.31 extern "C" { 215.32 215.33 +ATTRIBUTE_PRINTF(3, 0) 215.34 int jio_vsnprintf(char *str, size_t count, const char *fmt, va_list args) { 215.35 // see bug 4399518, 4417214 215.36 if ((intptr_t)count <= 0) return -1; 215.37 return vsnprintf(str, count, fmt, args); 215.38 } 215.39 215.40 - 215.41 +ATTRIBUTE_PRINTF(3, 0) 215.42 int jio_snprintf(char *str, size_t count, const char *fmt, ...) { 215.43 va_list args; 215.44 int len; 215.45 @@ -2754,7 +2755,7 @@ 215.46 return len; 215.47 } 215.48 215.49 - 215.50 +ATTRIBUTE_PRINTF(2,3) 215.51 int jio_fprintf(FILE* f, const char *fmt, ...) { 215.52 int len; 215.53 va_list args; 215.54 @@ -2764,7 +2765,7 @@ 215.55 return len; 215.56 } 215.57 215.58 - 215.59 +ATTRIBUTE_PRINTF(2, 0) 215.60 int jio_vfprintf(FILE* f, const char *fmt, va_list args) { 215.61 if (Arguments::vfprintf_hook() != NULL) { 215.62 return Arguments::vfprintf_hook()(f, fmt, args); 215.63 @@ -2773,7 +2774,7 @@ 215.64 } 215.65 } 215.66 215.67 - 215.68 +ATTRIBUTE_PRINTF(1, 2) 215.69 JNIEXPORT int jio_printf(const char *fmt, ...) { 215.70 int len; 215.71 va_list args; 215.72 @@ -2910,7 +2911,7 @@ 215.73 JavaThread* receiver = java_lang_Thread::thread(java_thread); 215.74 Events::log_exception(JavaThread::current(), 215.75 "JVM_StopThread thread JavaThread " INTPTR_FORMAT " as oop " INTPTR_FORMAT " [exception " INTPTR_FORMAT "]", 215.76 - receiver, (address)java_thread, throwable); 215.77 + p2i(receiver), p2i((address)java_thread), p2i(throwable)); 215.78 // First check if thread is alive 215.79 if (receiver != NULL) { 215.80 // Check if exception is getting thrown at self (use oop equality, since the
216.1 --- a/src/share/vm/prims/jvmtiEnter.xsl Thu May 15 18:23:26 2014 -0400 216.2 +++ b/src/share/vm/prims/jvmtiEnter.xsl Thu May 22 15:52:41 2014 -0400 216.3 @@ -1,6 +1,6 @@ 216.4 <?xml version="1.0"?> 216.5 <!-- 216.6 - Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved. 216.7 + Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved. 216.8 DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 216.9 216.10 This code is free software; you can redistribute it and/or modify it 216.11 @@ -43,6 +43,9 @@ 216.12 # include "prims/jvmtiRawMonitor.hpp" 216.13 # include "prims/jvmtiUtil.hpp" 216.14 216.15 +// There are known-bad format/arg pairings in the code generated by this file. 216.16 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 216.17 + 216.18 </xsl:text> 216.19 216.20 <xsl:if test="$trace = 'Trace'">
217.1 --- a/src/share/vm/prims/jvmtiEnvThreadState.cpp Thu May 15 18:23:26 2014 -0400 217.2 +++ b/src/share/vm/prims/jvmtiEnvThreadState.cpp Thu May 22 15:52:41 2014 -0400 217.3 @@ -113,7 +113,7 @@ 217.4 JvmtiFramePop fp = JvmtiFramePop(_pops->at(i)); 217.5 tty->print("%d: ", i); 217.6 fp.print(); 217.7 - tty->print_cr(""); 217.8 + tty->cr(); 217.9 } 217.10 } 217.11 #endif
218.1 --- a/src/share/vm/prims/jvmtiEventController.cpp Thu May 15 18:23:26 2014 -0400 218.2 +++ b/src/share/vm/prims/jvmtiEventController.cpp Thu May 22 15:52:41 2014 -0400 218.3 @@ -1,5 +1,5 @@ 218.4 /* 218.5 - * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. 218.6 + * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved. 218.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 218.8 * 218.9 * This code is free software; you can redistribute it and/or modify it 218.10 @@ -38,6 +38,8 @@ 218.11 #include "runtime/vmThread.hpp" 218.12 #include "runtime/vm_operations.hpp" 218.13 218.14 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 218.15 + 218.16 #ifdef JVMTI_TRACE 218.17 #define EC_TRACE(out) do { \ 218.18 if (JvmtiTrace::trace_event_controller()) { \
219.1 --- a/src/share/vm/prims/jvmtiExport.cpp Thu May 15 18:23:26 2014 -0400 219.2 +++ b/src/share/vm/prims/jvmtiExport.cpp Thu May 22 15:52:41 2014 -0400 219.3 @@ -1,5 +1,5 @@ 219.4 /* 219.5 - * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. 219.6 + * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved. 219.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 219.8 * 219.9 * This code is free software; you can redistribute it and/or modify it 219.10 @@ -56,6 +56,8 @@ 219.11 #include "gc_implementation/parallelScavenge/psMarkSweep.hpp" 219.12 #endif // INCLUDE_ALL_GCS 219.13 219.14 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 219.15 + 219.16 #ifdef JVMTI_TRACE 219.17 #define EVT_TRACE(evt,out) if ((JvmtiTrace::event_trace_flags(evt) & JvmtiTrace::SHOW_EVENT_SENT) != 0) { SafeResourceMark rm; tty->print_cr out; } 219.18 #define EVT_TRIG_TRACE(evt,out) if ((JvmtiTrace::event_trace_flags(evt) & JvmtiTrace::SHOW_EVENT_TRIGGER) != 0) { SafeResourceMark rm; tty->print_cr out; }
220.1 --- a/src/share/vm/prims/jvmtiImpl.cpp Thu May 15 18:23:26 2014 -0400 220.2 +++ b/src/share/vm/prims/jvmtiImpl.cpp Thu May 22 15:52:41 2014 -0400 220.3 @@ -1,5 +1,5 @@ 220.4 /* 220.5 - * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. 220.6 + * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved. 220.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 220.8 * 220.9 * This code is free software; you can redistribute it and/or modify it 220.10 @@ -413,7 +413,7 @@ 220.11 JvmtiBreakpoint& bp = _bps.at(i); 220.12 tty->print("%d: ", i); 220.13 bp.print(); 220.14 - tty->print_cr(""); 220.15 + tty->cr(); 220.16 } 220.17 #endif 220.18 }
221.1 --- a/src/share/vm/prims/jvmtiRedefineClasses.cpp Thu May 15 18:23:26 2014 -0400 221.2 +++ b/src/share/vm/prims/jvmtiRedefineClasses.cpp Thu May 22 15:52:41 2014 -0400 221.3 @@ -1,5 +1,5 @@ 221.4 /* 221.5 - * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. 221.6 + * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved. 221.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 221.8 * 221.9 * This code is free software; you can redistribute it and/or modify it 221.10 @@ -43,6 +43,7 @@ 221.11 #include "runtime/relocator.hpp" 221.12 #include "utilities/bitMap.inline.hpp" 221.13 221.14 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 221.15 221.16 Array<Method*>* VM_RedefineClasses::_old_methods = NULL; 221.17 Array<Method*>* VM_RedefineClasses::_new_methods = NULL; 221.18 @@ -1904,6 +1905,8 @@ 221.19 // annotations_typeArray if needed. Returns the original constant 221.20 // pool reference if a rewrite was not needed or the new constant 221.21 // pool reference if a rewrite was needed. 221.22 +PRAGMA_DIAG_PUSH 221.23 +PRAGMA_FORMAT_NONLITERAL_IGNORED 221.24 u2 VM_RedefineClasses::rewrite_cp_ref_in_annotation_data( 221.25 AnnotationArray* annotations_typeArray, int &byte_i_ref, 221.26 const char * trace_mesg, TRAPS) { 221.27 @@ -1920,6 +1923,7 @@ 221.28 byte_i_ref += 2; 221.29 return old_cp_index; 221.30 } 221.31 +PRAGMA_DIAG_POP 221.32 221.33 221.34 // Rewrite constant pool references in the element_value portion of an
222.1 --- a/src/share/vm/prims/methodHandles.cpp Thu May 15 18:23:26 2014 -0400 222.2 +++ b/src/share/vm/prims/methodHandles.cpp Thu May 22 15:52:41 2014 -0400 222.3 @@ -1,5 +1,5 @@ 222.4 /* 222.5 - * Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved. 222.6 + * Copyright (c) 2008, 2014, Oracle and/or its affiliates. All rights reserved. 222.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 222.8 * 222.9 * This code is free software; you can redistribute it and/or modify it 222.10 @@ -536,7 +536,7 @@ 222.11 // unknown letter, or we don't want to know its name 222.12 st->put(ch); 222.13 } else { 222.14 - st->print(n); 222.15 + st->print("%s", n); 222.16 prev_type = true; 222.17 } 222.18 break;
223.1 --- a/src/share/vm/prims/privilegedStack.cpp Thu May 15 18:23:26 2014 -0400 223.2 +++ b/src/share/vm/prims/privilegedStack.cpp Thu May 22 15:52:41 2014 -0400 223.3 @@ -1,5 +1,5 @@ 223.4 /* 223.5 - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. 223.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 223.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 223.8 * 223.9 * This code is free software; you can redistribute it and/or modify it 223.10 @@ -30,6 +30,7 @@ 223.11 #include "prims/privilegedStack.hpp" 223.12 #include "runtime/vframe.hpp" 223.13 223.14 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 223.15 223.16 void PrivilegedElement::initialize(vframeStream* vfst, oop context, PrivilegedElement* next, TRAPS) { 223.17 Method* method = vfst->method();
224.1 --- a/src/share/vm/prims/unsafe.cpp Thu May 15 18:23:26 2014 -0400 224.2 +++ b/src/share/vm/prims/unsafe.cpp Thu May 22 15:52:41 2014 -0400 224.3 @@ -1,5 +1,5 @@ 224.4 /* 224.5 - * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. 224.6 + * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. 224.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 224.8 * 224.9 * This code is free software; you can redistribute it and/or modify it 224.10 @@ -40,6 +40,8 @@ 224.11 #include "utilities/copy.hpp" 224.12 #include "utilities/dtrace.hpp" 224.13 224.14 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 224.15 + 224.16 /* 224.17 * Implementation of class sun.misc.Unsafe 224.18 */
225.1 --- a/src/share/vm/prims/whitebox.cpp Thu May 15 18:23:26 2014 -0400 225.2 +++ b/src/share/vm/prims/whitebox.cpp Thu May 22 15:52:41 2014 -0400 225.3 @@ -53,6 +53,8 @@ 225.4 #include "compiler/compileBroker.hpp" 225.5 #include "runtime/compilationPolicy.hpp" 225.6 225.7 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 225.8 + 225.9 #define SIZE_T_MAX_VALUE ((size_t) -1) 225.10 225.11 bool WhiteBox::_used = false;
226.1 --- a/src/share/vm/runtime/arguments.cpp Thu May 15 18:23:26 2014 -0400 226.2 +++ b/src/share/vm/runtime/arguments.cpp Thu May 22 15:52:41 2014 -0400 226.3 @@ -1,5 +1,5 @@ 226.4 /* 226.5 - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 226.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 226.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 226.8 * 226.9 * This code is free software; you can redistribute it and/or modify it 226.10 @@ -840,7 +840,7 @@ 226.11 for (int i=0; i < _num_jvm_flags; i++) { 226.12 st->print("%s ", _jvm_flags_array[i]); 226.13 } 226.14 - st->print_cr(""); 226.15 + st->cr(); 226.16 } 226.17 } 226.18 226.19 @@ -849,7 +849,7 @@ 226.20 for (int i=0; i < _num_jvm_args; i++) { 226.21 st->print("%s ", _jvm_args_array[i]); 226.22 } 226.23 - st->print_cr(""); 226.24 + st->cr(); 226.25 } 226.26 } 226.27 226.28 @@ -1341,8 +1341,8 @@ 226.29 } 226.30 if (PrintGCDetails && Verbose) { 226.31 tty->print_cr("MarkStackSize: %uk MarkStackSizeMax: %uk", 226.32 - MarkStackSize / K, MarkStackSizeMax / K); 226.33 - tty->print_cr("ConcGCThreads: %u", ConcGCThreads); 226.34 + (unsigned int) (MarkStackSize / K), (uint) (MarkStackSizeMax / K)); 226.35 + tty->print_cr("ConcGCThreads: %u", (uint) ConcGCThreads); 226.36 } 226.37 } 226.38 #endif // INCLUDE_ALL_GCS 226.39 @@ -1422,7 +1422,7 @@ 226.40 if (PrintGCDetails) { 226.41 // Cannot use gclog_or_tty yet. 226.42 tty->print_cr("Automatic selection of the low pause collector" 226.43 - " based on pause goal of %d (ms)", MaxGCPauseMillis); 226.44 + " based on pause goal of %d (ms)", (int) MaxGCPauseMillis); 226.45 } 226.46 return true; 226.47 } 226.48 @@ -1639,8 +1639,8 @@ 226.49 226.50 if (PrintGCDetails && Verbose) { 226.51 tty->print_cr("MarkStackSize: %uk MarkStackSizeMax: %uk", 226.52 - MarkStackSize / K, MarkStackSizeMax / K); 226.53 - tty->print_cr("ConcGCThreads: %u", ConcGCThreads); 226.54 + (unsigned int) (MarkStackSize / K), (uint) (MarkStackSizeMax / K)); 226.55 + tty->print_cr("ConcGCThreads: %u", (uint) ConcGCThreads); 226.56 } 226.57 } 226.58 226.59 @@ -1703,7 +1703,7 @@ 226.60 226.61 if (PrintGCDetails && Verbose) { 226.62 // Cannot use gclog_or_tty yet. 226.63 - tty->print_cr(" Maximum heap size " SIZE_FORMAT, reasonable_max); 226.64 + tty->print_cr(" Maximum heap size " SIZE_FORMAT, (size_t) reasonable_max); 226.65 } 226.66 FLAG_SET_ERGO(uintx, MaxHeapSize, (uintx)reasonable_max); 226.67 } 226.68 @@ -2090,7 +2090,7 @@ 226.69 // Using "else if" below to avoid printing two error messages if min > max. 226.70 // This will also prevent us from reporting both min>100 and max>100 at the 226.71 // same time, but that is less annoying than printing two identical errors IMHO. 226.72 - FormatBuffer<80> err_msg(""); 226.73 + FormatBuffer<80> err_msg("%s",""); 226.74 if (!verify_MinHeapFreeRatio(err_msg, MinHeapFreeRatio)) { 226.75 jio_fprintf(defaultStream::error_stream(), "%s\n", err_msg.buffer()); 226.76 status = false;
227.1 --- a/src/share/vm/runtime/arguments.hpp Thu May 15 18:23:26 2014 -0400 227.2 +++ b/src/share/vm/runtime/arguments.hpp Thu May 22 15:52:41 2014 -0400 227.3 @@ -1,5 +1,5 @@ 227.4 /* 227.5 - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 227.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 227.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 227.8 * 227.9 * This code is free software; you can redistribute it and/or modify it 227.10 @@ -36,7 +36,7 @@ 227.11 extern "C" { 227.12 typedef void (JNICALL *abort_hook_t)(void); 227.13 typedef void (JNICALL *exit_hook_t)(jint code); 227.14 - typedef jint (JNICALL *vfprintf_hook_t)(FILE *fp, const char *format, va_list args); 227.15 + typedef jint (JNICALL *vfprintf_hook_t)(FILE *fp, const char *format, va_list args) ATTRIBUTE_PRINTF(2, 0); 227.16 } 227.17 227.18 // Forward declarations
228.1 --- a/src/share/vm/runtime/biasedLocking.cpp Thu May 15 18:23:26 2014 -0400 228.2 +++ b/src/share/vm/runtime/biasedLocking.cpp Thu May 22 15:52:41 2014 -0400 228.3 @@ -1,5 +1,5 @@ 228.4 /* 228.5 - * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. 228.6 + * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved. 228.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 228.8 * 228.9 * This code is free software; you can redistribute it and/or modify it 228.10 @@ -161,7 +161,7 @@ 228.11 if (TraceBiasedLocking && (Verbose || !is_bulk)) { 228.12 ResourceMark rm; 228.13 tty->print_cr("Revoking bias of object " INTPTR_FORMAT " , mark " INTPTR_FORMAT " , type %s , prototype header " INTPTR_FORMAT " , allow rebias %d , requesting thread " INTPTR_FORMAT, 228.14 - (void *)obj, (intptr_t) mark, obj->klass()->external_name(), (intptr_t) obj->klass()->prototype_header(), (allow_rebias ? 1 : 0), (intptr_t) requesting_thread); 228.15 + p2i((void *)obj), (intptr_t) mark, obj->klass()->external_name(), (intptr_t) obj->klass()->prototype_header(), (allow_rebias ? 1 : 0), (intptr_t) requesting_thread); 228.16 } 228.17 228.18 JavaThread* biased_thread = mark->biased_locker(); 228.19 @@ -214,8 +214,8 @@ 228.20 if (mon_info->owner() == obj) { 228.21 if (TraceBiasedLocking && Verbose) { 228.22 tty->print_cr(" mon_info->owner (" PTR_FORMAT ") == obj (" PTR_FORMAT ")", 228.23 - (void *) mon_info->owner(), 228.24 - (void *) obj); 228.25 + p2i((void *) mon_info->owner()), 228.26 + p2i((void *) obj)); 228.27 } 228.28 // Assume recursive case and fix up highest lock later 228.29 markOop mark = markOopDesc::encode((BasicLock*) NULL); 228.30 @@ -224,8 +224,8 @@ 228.31 } else { 228.32 if (TraceBiasedLocking && Verbose) { 228.33 tty->print_cr(" mon_info->owner (" PTR_FORMAT ") != obj (" PTR_FORMAT ")", 228.34 - (void *) mon_info->owner(), 228.35 - (void *) obj); 228.36 + p2i((void *) mon_info->owner()), 228.37 + p2i((void *) obj)); 228.38 } 228.39 } 228.40 } 228.41 @@ -328,7 +328,7 @@ 228.42 tty->print_cr("* Beginning bulk revocation (kind == %s) because of object " 228.43 INTPTR_FORMAT " , mark " INTPTR_FORMAT " , type %s", 228.44 (bulk_rebias ? "rebias" : "revoke"), 228.45 - (void *) o, (intptr_t) o->mark(), o->klass()->external_name()); 228.46 + p2i((void *) o), (intptr_t) o->mark(), o->klass()->external_name()); 228.47 } 228.48 228.49 jlong cur_time = os::javaTimeMillis();
229.1 --- a/src/share/vm/runtime/compilationPolicy.cpp Thu May 15 18:23:26 2014 -0400 229.2 +++ b/src/share/vm/runtime/compilationPolicy.cpp Thu May 22 15:52:41 2014 -0400 229.3 @@ -1,5 +1,5 @@ 229.4 /* 229.5 - * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. 229.6 + * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. 229.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 229.8 * 229.9 * This code is free software; you can redistribute it and/or modify it 229.10 @@ -170,7 +170,7 @@ 229.11 void NonTieredCompPolicy::trace_osr_completion(nmethod* osr_nm) { 229.12 if (TraceOnStackReplacement) { 229.13 if (osr_nm == NULL) tty->print_cr("compilation failed"); 229.14 - else tty->print_cr("nmethod " INTPTR_FORMAT, osr_nm); 229.15 + else tty->print_cr("nmethod " INTPTR_FORMAT, p2i(osr_nm)); 229.16 } 229.17 } 229.18 #endif // !PRODUCT 229.19 @@ -417,6 +417,7 @@ 229.20 } 229.21 229.22 #ifndef PRODUCT 229.23 +PRAGMA_FORMAT_NONLITERAL_IGNORED_EXTERNAL 229.24 void NonTieredCompPolicy::trace_frequency_counter_overflow(methodHandle m, int branch_bci, int bci) { 229.25 if (TraceInvocationCounterOverflow) { 229.26 MethodCounters* mcs = m->method_counters(); 229.27 @@ -428,7 +429,10 @@ 229.28 bci == InvocationEntryBci 229.29 ? "comp-policy cntr ovfl @ %d in entry of " 229.30 : "comp-policy cntr ovfl @ %d in loop of "; 229.31 +PRAGMA_DIAG_PUSH 229.32 +PRAGMA_FORMAT_NONLITERAL_IGNORED_INTERNAL 229.33 tty->print(msg, bci); 229.34 +PRAGMA_DIAG_POP 229.35 m->print_value(); 229.36 tty->cr(); 229.37 ic->print(); 229.38 @@ -503,7 +507,7 @@ 229.39 if (TraceCompilationPolicy) { 229.40 tty->print("method invocation trigger: "); 229.41 m->print_short_name(tty); 229.42 - tty->print(" ( interpreted " INTPTR_FORMAT ", size=%d ) ", (address)m(), m->code_size()); 229.43 + tty->print(" ( interpreted " INTPTR_FORMAT ", size=%d ) ", p2i((address)m()), m->code_size()); 229.44 } 229.45 RegisterMap reg_map(thread, false); 229.46 javaVFrame* triggerVF = thread->last_java_vframe(®_map); 229.47 @@ -512,7 +516,7 @@ 229.48 229.49 if (first->top_method()->code() != NULL) { 229.50 // called obsolete method/nmethod -- no need to recompile 229.51 - if (TraceCompilationPolicy) tty->print_cr(" --> " INTPTR_FORMAT, first->top_method()->code()); 229.52 + if (TraceCompilationPolicy) tty->print_cr(" --> " INTPTR_FORMAT, p2i(first->top_method()->code())); 229.53 } else { 229.54 if (TimeCompilationPolicy) accumulated_time()->start(); 229.55 GrowableArray<RFrame*>* stack = new GrowableArray<RFrame*>(50); 229.56 @@ -640,7 +644,7 @@ 229.57 if (TraceCompilationPolicy && Verbose) { 229.58 tty->print("\n\t check caller: "); 229.59 next_m->print_short_name(tty); 229.60 - tty->print(" ( interpreted " INTPTR_FORMAT ", size=%d ) ", (address)next_m(), next_m->code_size()); 229.61 + tty->print(" ( interpreted " INTPTR_FORMAT ", size=%d ) ", p2i((address)next_m()), next_m->code_size()); 229.62 } 229.63 229.64 current = next;
230.1 --- a/src/share/vm/runtime/deoptimization.cpp Thu May 15 18:23:26 2014 -0400 230.2 +++ b/src/share/vm/runtime/deoptimization.cpp Thu May 22 15:52:41 2014 -0400 230.3 @@ -1,5 +1,5 @@ 230.4 /* 230.5 - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 230.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 230.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 230.8 * 230.9 * This code is free software; you can redistribute it and/or modify it 230.10 @@ -89,6 +89,8 @@ 230.11 #endif 230.12 #endif // COMPILER2 230.13 230.14 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 230.15 + 230.16 bool DeoptimizationMarker::_is_active = false; 230.17 230.18 Deoptimization::UnrollBlock::UnrollBlock(int size_of_deoptimized_frame,
231.1 --- a/src/share/vm/runtime/fprofiler.cpp Thu May 15 18:23:26 2014 -0400 231.2 +++ b/src/share/vm/runtime/fprofiler.cpp Thu May 22 15:52:41 2014 -0400 231.3 @@ -1,5 +1,5 @@ 231.4 /* 231.5 - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 231.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 231.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 231.8 * 231.9 * This code is free software; you can redistribute it and/or modify it 231.10 @@ -41,6 +41,8 @@ 231.11 #include "runtime/vframe.hpp" 231.12 #include "utilities/macros.hpp" 231.13 231.14 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 231.15 + 231.16 // Static fields of FlatProfiler 231.17 int FlatProfiler::received_gc_ticks = 0; 231.18 int FlatProfiler::vm_operation_ticks = 0; 231.19 @@ -308,7 +310,7 @@ 231.20 st->fill_to(col2); 231.21 t->print_native(st); 231.22 st->fill_to(col3); 231.23 - st->print(msg); 231.24 + st->print("%s", msg); 231.25 st->cr(); 231.26 } 231.27
232.1 --- a/src/share/vm/runtime/frame.cpp Thu May 15 18:23:26 2014 -0400 232.2 +++ b/src/share/vm/runtime/frame.cpp Thu May 22 15:52:41 2014 -0400 232.3 @@ -1,5 +1,5 @@ 232.4 /* 232.5 - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 232.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 232.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 232.8 * 232.9 * This code is free software; you can redistribute it and/or modify it 232.10 @@ -62,6 +62,8 @@ 232.11 # include "nativeInst_ppc.hpp" 232.12 #endif 232.13 232.14 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 232.15 + 232.16 RegisterMap::RegisterMap(JavaThread *thread, bool update_map) { 232.17 _thread = thread; 232.18 _update_map = update_map;
233.1 --- a/src/share/vm/runtime/globals.cpp Thu May 15 18:23:26 2014 -0400 233.2 +++ b/src/share/vm/runtime/globals.cpp Thu May 22 15:52:41 2014 -0400 233.3 @@ -1,5 +1,5 @@ 233.4 /* 233.5 - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 233.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 233.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 233.8 * 233.9 * This code is free software; you can redistribute it and/or modify it 233.10 @@ -45,6 +45,8 @@ 233.11 #include "shark/shark_globals.hpp" 233.12 #endif 233.13 233.14 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 233.15 + 233.16 RUNTIME_FLAGS(MATERIALIZE_DEVELOPER_FLAG, MATERIALIZE_PD_DEVELOPER_FLAG, \ 233.17 MATERIALIZE_PRODUCT_FLAG, MATERIALIZE_PD_PRODUCT_FLAG, \ 233.18 MATERIALIZE_DIAGNOSTIC_FLAG, MATERIALIZE_EXPERIMENTAL_FLAG, \ 233.19 @@ -283,6 +285,7 @@ 233.20 // Length of format string (e.g. "%.1234s") for printing ccstr below 233.21 #define FORMAT_BUFFER_LEN 16 233.22 233.23 +PRAGMA_FORMAT_NONLITERAL_IGNORED_EXTERNAL 233.24 void Flag::print_on(outputStream* st, bool withComments) { 233.25 // Don't print notproduct and develop flags in a product build. 233.26 if (is_constant_in_binary()) { 233.27 @@ -315,7 +318,10 @@ 233.28 size_t llen = pointer_delta(eol, cp, sizeof(char)); 233.29 jio_snprintf(format_buffer, FORMAT_BUFFER_LEN, 233.30 "%%." SIZE_FORMAT "s", llen); 233.31 +PRAGMA_DIAG_PUSH 233.32 +PRAGMA_FORMAT_NONLITERAL_IGNORED_INTERNAL 233.33 st->print(format_buffer, cp); 233.34 +PRAGMA_DIAG_POP 233.35 st->cr(); 233.36 cp = eol+1; 233.37 st->print("%5s %-35s += ", "", _name); 233.38 @@ -372,7 +378,7 @@ 233.39 } else { 233.40 st->print(" "); 233.41 } 233.42 - st->print(d.name); 233.43 + st->print("%s", d.name); 233.44 } 233.45 } 233.46
234.1 --- a/src/share/vm/runtime/handles.cpp Thu May 15 18:23:26 2014 -0400 234.2 +++ b/src/share/vm/runtime/handles.cpp Thu May 22 15:52:41 2014 -0400 234.3 @@ -1,5 +1,5 @@ 234.4 /* 234.5 - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 234.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 234.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 234.8 * 234.9 * This code is free software; you can redistribute it and/or modify it 234.10 @@ -41,6 +41,8 @@ 234.11 # include "os_bsd.inline.hpp" 234.12 #endif 234.13 234.14 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 234.15 + 234.16 #ifdef ASSERT 234.17 oop* HandleArea::allocate_handle(oop obj) { 234.18 assert(_handle_mark_nesting > 1, "memory leak: allocating handle outside HandleMark");
235.1 --- a/src/share/vm/runtime/interfaceSupport.cpp Thu May 15 18:23:26 2014 -0400 235.2 +++ b/src/share/vm/runtime/interfaceSupport.cpp Thu May 22 15:52:41 2014 -0400 235.3 @@ -1,5 +1,5 @@ 235.4 /* 235.5 - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. 235.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 235.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 235.8 * 235.9 * This code is free software; you can redistribute it and/or modify it 235.10 @@ -34,6 +34,7 @@ 235.11 #include "runtime/vframe.hpp" 235.12 #include "utilities/preserveException.hpp" 235.13 235.14 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 235.15 235.16 // Implementation of InterfaceSupport 235.17
236.1 --- a/src/share/vm/runtime/java.cpp Thu May 15 18:23:26 2014 -0400 236.2 +++ b/src/share/vm/runtime/java.cpp Thu May 22 15:52:41 2014 -0400 236.3 @@ -1,5 +1,5 @@ 236.4 /* 236.5 - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 236.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 236.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 236.8 * 236.9 * This code is free software; you can redistribute it and/or modify it 236.10 @@ -113,6 +113,7 @@ 236.11 } 236.12 } 236.13 236.14 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 236.15 236.16 GrowableArray<Method*>* collected_profiled_methods; 236.17 236.18 @@ -367,7 +368,7 @@ 236.19 BaselineTTYOutputer outputer(tty); 236.20 MemTracker::print_memory_usage(outputer, K, false); 236.21 } else { 236.22 - tty->print_cr(MemTracker::reason()); 236.23 + tty->print_cr("%s", MemTracker::reason()); 236.24 } 236.25 } 236.26 } 236.27 @@ -404,7 +405,7 @@ 236.28 BaselineTTYOutputer outputer(tty); 236.29 MemTracker::print_memory_usage(outputer, K, false); 236.30 } else { 236.31 - tty->print_cr(MemTracker::reason()); 236.32 + tty->print_cr("%s", MemTracker::reason()); 236.33 } 236.34 } 236.35 }
237.1 --- a/src/share/vm/runtime/jniHandles.cpp Thu May 15 18:23:26 2014 -0400 237.2 +++ b/src/share/vm/runtime/jniHandles.cpp Thu May 22 15:52:41 2014 -0400 237.3 @@ -1,5 +1,5 @@ 237.4 /* 237.5 - * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. 237.6 + * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved. 237.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 237.8 * 237.9 * This code is free software; you can redistribute it and/or modify it 237.10 @@ -30,6 +30,7 @@ 237.11 #include "runtime/mutexLocker.hpp" 237.12 #include "runtime/thread.inline.hpp" 237.13 237.14 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 237.15 237.16 JNIHandleBlock* JNIHandles::_global_handles = NULL; 237.17 JNIHandleBlock* JNIHandles::_weak_global_handles = NULL;
238.1 --- a/src/share/vm/runtime/mutex.cpp Thu May 15 18:23:26 2014 -0400 238.2 +++ b/src/share/vm/runtime/mutex.cpp Thu May 22 15:52:41 2014 -0400 238.3 @@ -1,6 +1,6 @@ 238.4 238.5 /* 238.6 - * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. 238.7 + * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved. 238.8 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 238.9 * 238.10 * This code is free software; you can redistribute it and/or modify it 238.11 @@ -41,6 +41,8 @@ 238.12 # include "mutex_bsd.inline.hpp" 238.13 #endif 238.14 238.15 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 238.16 + 238.17 // o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o 238.18 // 238.19 // Native Monitor-Mutex locking - theory of operations
239.1 --- a/src/share/vm/runtime/os.cpp Thu May 15 18:23:26 2014 -0400 239.2 +++ b/src/share/vm/runtime/os.cpp Thu May 22 15:52:41 2014 -0400 239.3 @@ -1,5 +1,5 @@ 239.4 /* 239.5 - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 239.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 239.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 239.8 * 239.9 * This code is free software; you can redistribute it and/or modify it 239.10 @@ -65,6 +65,8 @@ 239.11 239.12 # include <signal.h> 239.13 239.14 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 239.15 + 239.16 OSThread* os::_starting_thread = NULL; 239.17 address os::_polling_page = NULL; 239.18 volatile int32_t* os::_mem_serialize_page = NULL; 239.19 @@ -909,9 +911,9 @@ 239.20 239.21 for (int i = 0; env_list[i] != NULL; i++) { 239.22 if (getenv(env_list[i], buffer, len)) { 239.23 - st->print(env_list[i]); 239.24 + st->print("%s", env_list[i]); 239.25 st->print("="); 239.26 - st->print_cr(buffer); 239.27 + st->print_cr("%s", buffer); 239.28 } 239.29 } 239.30 }
240.1 --- a/src/share/vm/runtime/osThread.cpp Thu May 15 18:23:26 2014 -0400 240.2 +++ b/src/share/vm/runtime/osThread.cpp Thu May 22 15:52:41 2014 -0400 240.3 @@ -1,5 +1,5 @@ 240.4 /* 240.5 - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. 240.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 240.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 240.8 * 240.9 * This code is free software; you can redistribute it and/or modify it 240.10 @@ -26,6 +26,7 @@ 240.11 #include "oops/oop.inline.hpp" 240.12 #include "runtime/osThread.hpp" 240.13 240.14 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 240.15 240.16 OSThread::OSThread(OSThreadStartFunc start_proc, void* start_parm) { 240.17 pd_initialize();
241.1 --- a/src/share/vm/runtime/perfData.cpp Thu May 15 18:23:26 2014 -0400 241.2 +++ b/src/share/vm/runtime/perfData.cpp Thu May 22 15:52:41 2014 -0400 241.3 @@ -1,5 +1,5 @@ 241.4 /* 241.5 - * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. 241.6 + * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved. 241.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 241.8 * 241.9 * This code is free software; you can redistribute it and/or modify it 241.10 @@ -34,6 +34,8 @@ 241.11 #include "utilities/exceptions.hpp" 241.12 #include "utilities/globalDefinitions.hpp" 241.13 241.14 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 241.15 + 241.16 PerfDataList* PerfDataManager::_all = NULL; 241.17 PerfDataList* PerfDataManager::_sampled = NULL; 241.18 PerfDataList* PerfDataManager::_constants = NULL;
242.1 --- a/src/share/vm/runtime/perfMemory.cpp Thu May 15 18:23:26 2014 -0400 242.2 +++ b/src/share/vm/runtime/perfMemory.cpp Thu May 22 15:52:41 2014 -0400 242.3 @@ -34,6 +34,8 @@ 242.4 #include "runtime/statSampler.hpp" 242.5 #include "utilities/globalDefinitions.hpp" 242.6 242.7 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 242.8 + 242.9 // Prefix of performance data file. 242.10 const char PERFDATA_NAME[] = "hsperfdata"; 242.11
243.1 --- a/src/share/vm/runtime/safepoint.cpp Thu May 15 18:23:26 2014 -0400 243.2 +++ b/src/share/vm/runtime/safepoint.cpp Thu May 22 15:52:41 2014 -0400 243.3 @@ -1,5 +1,5 @@ 243.4 /* 243.5 - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 243.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 243.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 243.8 * 243.9 * This code is free software; you can redistribute it and/or modify it 243.10 @@ -81,6 +81,8 @@ 243.11 #include "c1/c1_globals.hpp" 243.12 #endif 243.13 243.14 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 243.15 + 243.16 // -------------------------------------------------------------------------------------------------- 243.17 // Implementation of Safepoint begin/end 243.18 243.19 @@ -793,7 +795,7 @@ 243.20 old_sp += incr*32; new_sp += incr*32; was_oops += incr*32; 243.21 for( int i2=0; i2<16; i2++ ) { 243.22 tty->print("call %c%d |"PTR_FORMAT" ","LI"[i2>>3],i2&7,new_sp); print_ptrs(*old_sp++,*new_sp++,*was_oops++); } 243.23 - tty->print_cr(""); 243.24 + tty->cr(); 243.25 } 243.26 #endif // SPARC 243.27 #endif // PRODUCT 243.28 @@ -835,7 +837,7 @@ 243.29 timeout_error_printed = true; 243.30 // Print out the thread infor which didn't reach the safepoint for debugging 243.31 // purposes (useful when there are lots of threads in the debugger). 243.32 - tty->print_cr(""); 243.33 + tty->cr(); 243.34 tty->print_cr("# SafepointSynchronize::begin: Timeout detected:"); 243.35 if (reason == _spinning_timeout) { 243.36 tty->print_cr("# SafepointSynchronize::begin: Timed out while spinning to reach a safepoint."); 243.37 @@ -855,7 +857,7 @@ 243.38 (reason == _blocking_timeout && !cur_state->has_called_back()))) { 243.39 tty->print("# "); 243.40 cur_thread->print(); 243.41 - tty->print_cr(""); 243.42 + tty->cr(); 243.43 } 243.44 } 243.45 tty->print_cr("# SafepointSynchronize::begin: (End of list)"); 243.46 @@ -1328,7 +1330,7 @@ 243.47 spstat->_time_to_sync > PrintSafepointStatisticsTimeout * MICROUNITS) { 243.48 print_statistics(); 243.49 } 243.50 - tty->print_cr(""); 243.51 + tty->cr(); 243.52 243.53 // Print out polling page sampling status. 243.54 if (!need_to_track_page_armed_status) {
244.1 --- a/src/share/vm/runtime/safepoint.hpp Thu May 15 18:23:26 2014 -0400 244.2 +++ b/src/share/vm/runtime/safepoint.hpp Thu May 22 15:52:41 2014 -0400 244.3 @@ -1,5 +1,5 @@ 244.4 /* 244.5 - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. 244.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 244.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 244.8 * 244.9 * This code is free software; you can redistribute it and/or modify it 244.10 @@ -174,7 +174,7 @@ 244.11 244.12 // debugging 244.13 static void print_state() PRODUCT_RETURN; 244.14 - static void safepoint_msg(const char* format, ...) PRODUCT_RETURN; 244.15 + static void safepoint_msg(const char* format, ...) ATTRIBUTE_PRINTF(1, 2) PRODUCT_RETURN; 244.16 244.17 static void deferred_initialize_stat(); 244.18 static void print_stat_on_exit(); 244.19 @@ -240,7 +240,7 @@ 244.20 static void create(JavaThread *thread); 244.21 static void destroy(JavaThread *thread); 244.22 244.23 - void safepoint_msg(const char* format, ...) { 244.24 + void safepoint_msg(const char* format, ...) ATTRIBUTE_PRINTF(2, 3) { 244.25 if (ShowSafepointMsgs) { 244.26 va_list ap; 244.27 va_start(ap, format);
245.1 --- a/src/share/vm/runtime/sharedRuntime.cpp Thu May 15 18:23:26 2014 -0400 245.2 +++ b/src/share/vm/runtime/sharedRuntime.cpp Thu May 22 15:52:41 2014 -0400 245.3 @@ -1,5 +1,5 @@ 245.4 /* 245.5 - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 245.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 245.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 245.8 * 245.9 * This code is free software; you can redistribute it and/or modify it 245.10 @@ -82,6 +82,8 @@ 245.11 #include "c1/c1_Runtime1.hpp" 245.12 #endif 245.13 245.14 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 245.15 + 245.16 // Shared stub locations 245.17 RuntimeStub* SharedRuntime::_wrong_method_blob; 245.18 RuntimeStub* SharedRuntime::_wrong_method_abstract_blob;
246.1 --- a/src/share/vm/runtime/signature.cpp Thu May 15 18:23:26 2014 -0400 246.2 +++ b/src/share/vm/runtime/signature.cpp Thu May 22 15:52:41 2014 -0400 246.3 @@ -1,5 +1,5 @@ 246.4 /* 246.5 - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 246.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 246.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 246.8 * 246.9 * This code is free software; you can redistribute it and/or modify it 246.10 @@ -32,6 +32,7 @@ 246.11 #include "oops/typeArrayKlass.hpp" 246.12 #include "runtime/signature.hpp" 246.13 246.14 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 246.15 246.16 // Implementation of SignatureIterator 246.17
247.1 --- a/src/share/vm/runtime/stackValue.cpp Thu May 15 18:23:26 2014 -0400 247.2 +++ b/src/share/vm/runtime/stackValue.cpp Thu May 22 15:52:41 2014 -0400 247.3 @@ -1,5 +1,5 @@ 247.4 /* 247.5 - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. 247.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 247.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 247.8 * 247.9 * This code is free software; you can redistribute it and/or modify it 247.10 @@ -196,7 +196,7 @@ 247.11 247.12 case T_OBJECT: 247.13 _o()->print_value_on(st); 247.14 - st->print(" <" INTPTR_FORMAT ">", (address)_o()); 247.15 + st->print(" <" INTPTR_FORMAT ">", p2i((address)_o())); 247.16 break; 247.17 247.18 case T_CONFLICT:
248.1 --- a/src/share/vm/runtime/stackValueCollection.cpp Thu May 15 18:23:26 2014 -0400 248.2 +++ b/src/share/vm/runtime/stackValueCollection.cpp Thu May 22 15:52:41 2014 -0400 248.3 @@ -1,5 +1,5 @@ 248.4 /* 248.5 - * Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved. 248.6 + * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved. 248.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 248.8 * 248.9 * This code is free software; you can redistribute it and/or modify it 248.10 @@ -40,6 +40,8 @@ 248.11 # include "jniTypes_ppc.hpp" 248.12 #endif 248.13 248.14 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 248.15 + 248.16 jint StackValueCollection::int_at(int slot) const { 248.17 intptr_t val = at(slot)->get_int(); 248.18 jint ival = *((jint*) (&val));
249.1 --- a/src/share/vm/runtime/stubCodeGenerator.cpp Thu May 15 18:23:26 2014 -0400 249.2 +++ b/src/share/vm/runtime/stubCodeGenerator.cpp Thu May 22 15:52:41 2014 -0400 249.3 @@ -1,5 +1,5 @@ 249.4 /* 249.5 - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 249.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 249.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 249.8 * 249.9 * This code is free software; you can redistribute it and/or modify it 249.10 @@ -60,10 +60,10 @@ 249.11 249.12 249.13 void StubCodeDesc::print_on(outputStream* st) const { 249.14 - st->print(group()); 249.15 + st->print("%s", group()); 249.16 st->print("::"); 249.17 - st->print(name()); 249.18 - st->print(" [" INTPTR_FORMAT ", " INTPTR_FORMAT "[ (%d bytes)", begin(), end(), size_in_bytes()); 249.19 + st->print("%s", name()); 249.20 + st->print(" [" INTPTR_FORMAT ", " INTPTR_FORMAT "[ (%d bytes)", p2i(begin()), p2i(end()), size_in_bytes()); 249.21 } 249.22 249.23 // Implementation of StubCodeGenerator
250.1 --- a/src/share/vm/runtime/sweeper.cpp Thu May 15 18:23:26 2014 -0400 250.2 +++ b/src/share/vm/runtime/sweeper.cpp Thu May 22 15:52:41 2014 -0400 250.3 @@ -1,5 +1,5 @@ 250.4 /* 250.5 - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 250.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 250.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 250.8 * 250.9 * This code is free software; you can redistribute it and/or modify it 250.10 @@ -41,6 +41,8 @@ 250.11 #include "utilities/ticks.inline.hpp" 250.12 #include "utilities/xmlstream.hpp" 250.13 250.14 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 250.15 + 250.16 #ifdef ASSERT 250.17 250.18 #define SWEEP(nm) record_sweep(nm, __LINE__) 250.19 @@ -625,7 +627,7 @@ 250.20 tty->vprint(format, ap); 250.21 va_end(ap); 250.22 } 250.23 - tty->print_cr(s.as_string()); 250.24 + tty->print_cr("%s", s.as_string()); 250.25 } 250.26 250.27 if (LogCompilation && (xtty != NULL)) { 250.28 @@ -642,7 +644,7 @@ 250.29 xtty->vprint(format, ap); 250.30 va_end(ap); 250.31 } 250.32 - xtty->print(s.as_string()); 250.33 + xtty->print("%s", s.as_string()); 250.34 xtty->stamp(); 250.35 xtty->end_elem(); 250.36 }
251.1 --- a/src/share/vm/runtime/sweeper.hpp Thu May 15 18:23:26 2014 -0400 251.2 +++ b/src/share/vm/runtime/sweeper.hpp Thu May 22 15:52:41 2014 -0400 251.3 @@ -1,5 +1,5 @@ 251.4 /* 251.5 - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 251.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 251.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 251.8 * 251.9 * This code is free software; you can redistribute it and/or modify it 251.10 @@ -94,7 +94,7 @@ 251.11 static const Tickspan total_time_sweeping() { return _total_time_sweeping; } 251.12 static const Tickspan peak_sweep_time() { return _peak_sweep_time; } 251.13 static const Tickspan peak_sweep_fraction_time() { return _peak_sweep_fraction_time; } 251.14 - static void log_sweep(const char* msg, const char* format = NULL, ...); 251.15 + static void log_sweep(const char* msg, const char* format = NULL, ...) ATTRIBUTE_PRINTF(2, 3); 251.16 251.17 251.18 #ifdef ASSERT
252.1 --- a/src/share/vm/runtime/synchronizer.cpp Thu May 15 18:23:26 2014 -0400 252.2 +++ b/src/share/vm/runtime/synchronizer.cpp Thu May 22 15:52:41 2014 -0400 252.3 @@ -1,5 +1,5 @@ 252.4 /* 252.5 - * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. 252.6 + * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved. 252.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 252.8 * 252.9 * This code is free software; you can redistribute it and/or modify it 252.10 @@ -60,6 +60,8 @@ 252.11 #define ATTR 252.12 #endif 252.13 252.14 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 252.15 + 252.16 // The "core" versions of monitor enter and exit reside in this file. 252.17 // The interpreter and compilers contain specialized transliterated 252.18 // variants of the enter-exit fast-path operations. See i486.ad fast_lock(),
253.1 --- a/src/share/vm/runtime/thread.cpp Thu May 15 18:23:26 2014 -0400 253.2 +++ b/src/share/vm/runtime/thread.cpp Thu May 22 15:52:41 2014 -0400 253.3 @@ -1,5 +1,5 @@ 253.4 /* 253.5 - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 253.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 253.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 253.8 * 253.9 * This code is free software; you can redistribute it and/or modify it 253.10 @@ -111,6 +111,8 @@ 253.11 #include "runtime/rtmLocking.hpp" 253.12 #endif 253.13 253.14 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 253.15 + 253.16 #ifdef DTRACE_ENABLED 253.17 253.18 // Only bother with this argument setup if dtrace is available 253.19 @@ -4318,7 +4320,7 @@ 253.20 // Threads::print_on() is called at safepoint by VM_PrintThreads operation. 253.21 void Threads::print_on(outputStream* st, bool print_stacks, bool internal_format, bool print_concurrent_locks) { 253.22 char buf[32]; 253.23 - st->print_cr(os::local_time_string(buf, sizeof(buf))); 253.24 + st->print_cr("%s", os::local_time_string(buf, sizeof(buf))); 253.25 253.26 st->print_cr("Full thread dump %s (%s %s):", 253.27 Abstract_VM_Version::vm_name(),
254.1 --- a/src/share/vm/runtime/thread.hpp Thu May 15 18:23:26 2014 -0400 254.2 +++ b/src/share/vm/runtime/thread.hpp Thu May 22 15:52:41 2014 -0400 254.3 @@ -1,5 +1,5 @@ 254.4 /* 254.5 - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 254.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 254.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 254.8 * 254.9 * This code is free software; you can redistribute it and/or modify it 254.10 @@ -695,7 +695,7 @@ 254.11 NamedThread(); 254.12 ~NamedThread(); 254.13 // May only be called once per thread. 254.14 - void set_name(const char* format, ...); 254.15 + void set_name(const char* format, ...) ATTRIBUTE_PRINTF(2, 3); 254.16 virtual bool is_Named_thread() const { return true; } 254.17 virtual char* name() const { return _name == NULL ? (char*)"Unknown Thread" : _name; } 254.18 JavaThread *processed_thread() { return _processed_thread; }
255.1 --- a/src/share/vm/runtime/timer.cpp Thu May 15 18:23:26 2014 -0400 255.2 +++ b/src/share/vm/runtime/timer.cpp Thu May 22 15:52:41 2014 -0400 255.3 @@ -1,5 +1,5 @@ 255.4 /* 255.5 - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 255.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 255.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 255.8 * 255.9 * This code is free software; you can redistribute it and/or modify it 255.10 @@ -204,7 +204,7 @@ 255.11 _logfile->print("[Error in TraceCPUTime]"); 255.12 } 255.13 if (_print_cr) { 255.14 - _logfile->print_cr(""); 255.15 + _logfile->cr(); 255.16 } 255.17 _logfile->flush(); 255.18 }
256.1 --- a/src/share/vm/runtime/unhandledOops.cpp Thu May 15 18:23:26 2014 -0400 256.2 +++ b/src/share/vm/runtime/unhandledOops.cpp Thu May 22 15:52:41 2014 -0400 256.3 @@ -1,5 +1,5 @@ 256.4 /* 256.5 - * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. 256.6 + * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved. 256.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 256.8 * 256.9 * This code is free software; you can redistribute it and/or modify it 256.10 @@ -31,6 +31,8 @@ 256.11 #include "runtime/unhandledOops.hpp" 256.12 #include "utilities/globalDefinitions.hpp" 256.13 256.14 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 256.15 + 256.16 #ifdef CHECK_UNHANDLED_OOPS 256.17 const int free_list_size = 256; 256.18
257.1 --- a/src/share/vm/runtime/vframe.cpp Thu May 15 18:23:26 2014 -0400 257.2 +++ b/src/share/vm/runtime/vframe.cpp Thu May 22 15:52:41 2014 -0400 257.3 @@ -1,5 +1,5 @@ 257.4 /* 257.5 - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 257.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 257.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 257.8 * 257.9 * This code is free software; you can redistribute it and/or modify it 257.10 @@ -46,6 +46,8 @@ 257.11 #include "runtime/vframeArray.hpp" 257.12 #include "runtime/vframe_hp.hpp" 257.13 257.14 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 257.15 + 257.16 vframe::vframe(const frame* fr, const RegisterMap* reg_map, JavaThread* thread) 257.17 : _reg_map(reg_map), _thread(thread) { 257.18 assert(fr != NULL, "must have frame");
258.1 --- a/src/share/vm/runtime/vframe.hpp Thu May 15 18:23:26 2014 -0400 258.2 +++ b/src/share/vm/runtime/vframe.hpp Thu May 22 15:52:41 2014 -0400 258.3 @@ -1,5 +1,5 @@ 258.4 /* 258.5 - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 258.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 258.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 258.8 * 258.9 * This code is free software; you can redistribute it and/or modify it 258.10 @@ -399,7 +399,7 @@ 258.11 if (WizardMode) { 258.12 tty->print_cr("Error in fill_from_frame: pc_desc for " 258.13 INTPTR_FORMAT " not found or invalid at %d", 258.14 - _frame.pc(), decode_offset); 258.15 + p2i(_frame.pc()), decode_offset); 258.16 nm()->print(); 258.17 nm()->method()->print_codes(); 258.18 nm()->print_code();
259.1 --- a/src/share/vm/runtime/vframeArray.cpp Thu May 15 18:23:26 2014 -0400 259.2 +++ b/src/share/vm/runtime/vframeArray.cpp Thu May 22 15:52:41 2014 -0400 259.3 @@ -1,5 +1,5 @@ 259.4 /* 259.5 - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 259.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 259.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 259.8 * 259.9 * This code is free software; you can redistribute it and/or modify it 259.10 @@ -43,6 +43,7 @@ 259.11 #include "opto/runtime.hpp" 259.12 #endif 259.13 259.14 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 259.15 259.16 int vframeArrayElement:: bci(void) const { return (_bci == SynchronizationEntryBCI ? 0 : _bci); } 259.17
260.1 --- a/src/share/vm/runtime/virtualspace.cpp Thu May 15 18:23:26 2014 -0400 260.2 +++ b/src/share/vm/runtime/virtualspace.cpp Thu May 22 15:52:41 2014 -0400 260.3 @@ -1,5 +1,5 @@ 260.4 /* 260.5 - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 260.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 260.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 260.8 * 260.9 * This code is free software; you can redistribute it and/or modify it 260.10 @@ -43,6 +43,7 @@ 260.11 # include "os_bsd.inline.hpp" 260.12 #endif 260.13 260.14 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 260.15 260.16 // ReservedSpace 260.17
261.1 --- a/src/share/vm/runtime/vmThread.cpp Thu May 15 18:23:26 2014 -0400 261.2 +++ b/src/share/vm/runtime/vmThread.cpp Thu May 22 15:52:41 2014 -0400 261.3 @@ -1,5 +1,5 @@ 261.4 /* 261.5 - * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. 261.6 + * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved. 261.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 261.8 * 261.9 * This code is free software; you can redistribute it and/or modify it 261.10 @@ -46,6 +46,8 @@ 261.11 HS_DTRACE_PROBE_DECL3(hotspot, vmops__end, char *, uintptr_t, int); 261.12 #endif /* !USDT2 */ 261.13 261.14 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 261.15 + 261.16 // Dummy VM operation to act as first element in our circular double-linked list 261.17 class VM_Dummy: public VM_Operation { 261.18 VMOp_Type type() const { return VMOp_Dummy; }
262.1 --- a/src/share/vm/runtime/vm_operations.cpp Thu May 15 18:23:26 2014 -0400 262.2 +++ b/src/share/vm/runtime/vm_operations.cpp Thu May 22 15:52:41 2014 -0400 262.3 @@ -1,5 +1,5 @@ 262.4 /* 262.5 - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 262.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 262.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 262.8 * 262.9 * This code is free software; you can redistribute it and/or modify it 262.10 @@ -39,6 +39,8 @@ 262.11 #include "services/threadService.hpp" 262.12 #include "trace/tracing.hpp" 262.13 262.14 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 262.15 + 262.16 #define VM_OP_NAME_INITIALIZE(name) #name, 262.17 262.18 const char* VM_Operation::_names[VM_Operation::VMOp_Terminating] = \
263.1 --- a/src/share/vm/services/attachListener.cpp Thu May 15 18:23:26 2014 -0400 263.2 +++ b/src/share/vm/services/attachListener.cpp Thu May 22 15:52:41 2014 -0400 263.3 @@ -1,5 +1,5 @@ 263.4 /* 263.5 - * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. 263.6 + * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved. 263.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 263.8 * 263.9 * This code is free software; you can redistribute it and/or modify it 263.10 @@ -284,15 +284,15 @@ 263.11 } 263.12 263.13 if (strncmp(name, "MaxHeapFreeRatio", 17) == 0) { 263.14 - FormatBuffer<80> err_msg(""); 263.15 + FormatBuffer<80> err_msg("%s", ""); 263.16 if (!Arguments::verify_MaxHeapFreeRatio(err_msg, value)) { 263.17 - out->print_cr(err_msg.buffer()); 263.18 + out->print_cr("%s", err_msg.buffer()); 263.19 return JNI_ERR; 263.20 } 263.21 } else if (strncmp(name, "MinHeapFreeRatio", 17) == 0) { 263.22 - FormatBuffer<80> err_msg(""); 263.23 + FormatBuffer<80> err_msg("%s", ""); 263.24 if (!Arguments::verify_MinHeapFreeRatio(err_msg, value)) { 263.25 - out->print_cr(err_msg.buffer()); 263.26 + out->print_cr("%s", err_msg.buffer()); 263.27 return JNI_ERR; 263.28 } 263.29 } 263.30 @@ -381,7 +381,7 @@ 263.31 Flag* f = Flag::find_flag((char*)name, strlen(name)); 263.32 if (f) { 263.33 f->print_as_flag(out); 263.34 - out->print_cr(""); 263.35 + out->cr(); 263.36 } else { 263.37 out->print_cr("no such flag '%s'", name); 263.38 }
264.1 --- a/src/share/vm/services/classLoadingService.cpp Thu May 15 18:23:26 2014 -0400 264.2 +++ b/src/share/vm/services/classLoadingService.cpp Thu May 22 15:52:41 2014 -0400 264.3 @@ -1,5 +1,5 @@ 264.4 /* 264.5 - * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. 264.6 + * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved. 264.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 264.8 * 264.9 * This code is free software; you can redistribute it and/or modify it 264.10 @@ -157,7 +157,7 @@ 264.11 264.12 if (TraceClassUnloading) { 264.13 ResourceMark rm; 264.14 - tty->print_cr("[Unloading class %s " INTPTR_FORMAT "]", k->external_name(), k); 264.15 + tty->print_cr("[Unloading class %s " INTPTR_FORMAT "]", k->external_name(), p2i(k)); 264.16 } 264.17 } 264.18
265.1 --- a/src/share/vm/services/diagnosticCommand.cpp Thu May 15 18:23:26 2014 -0400 265.2 +++ b/src/share/vm/services/diagnosticCommand.cpp Thu May 22 15:52:41 2014 -0400 265.3 @@ -1,5 +1,5 @@ 265.4 /* 265.5 - * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. 265.6 + * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved. 265.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 265.8 * 265.9 * This code is free software; you can redistribute it and/or modify it 265.10 @@ -32,6 +32,8 @@ 265.11 #include "services/management.hpp" 265.12 #include "utilities/macros.hpp" 265.13 265.14 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 265.15 + 265.16 void DCmdRegistrant::register_dcmds(){ 265.17 // Registration of the diagnostic commands 265.18 // First argument specifies which interfaces will export the command 265.19 @@ -99,7 +101,7 @@ 265.20 if (factory != NULL) { 265.21 output()->print_cr("%s%s", factory->name(), 265.22 factory->is_enabled() ? "" : " [disabled]"); 265.23 - output()->print_cr(factory->description()); 265.24 + output()->print_cr("%s", factory->description()); 265.25 output()->print_cr("\nImpact: %s", factory->impact()); 265.26 JavaPermission p = factory->permission(); 265.27 if(p._class != NULL) {
266.1 --- a/src/share/vm/services/diagnosticFramework.cpp Thu May 15 18:23:26 2014 -0400 266.2 +++ b/src/share/vm/services/diagnosticFramework.cpp Thu May 22 15:52:41 2014 -0400 266.3 @@ -1,5 +1,5 @@ 266.4 /* 266.5 - * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. 266.6 + * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved. 266.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 266.8 * 266.9 * This code is free software; you can redistribute it and/or modify it 266.10 @@ -259,7 +259,7 @@ 266.11 } 266.12 arg = arg->next(); 266.13 } 266.14 - out->print_cr(""); 266.15 + out->cr(); 266.16 if (_arguments_list != NULL) { 266.17 out->print_cr("\nArguments:"); 266.18 arg = _arguments_list; 266.19 @@ -268,7 +268,7 @@ 266.20 arg->is_mandatory() ? "" : "[optional]", 266.21 arg->description(), arg->type()); 266.22 if (arg->has_default()) { 266.23 - out->print(arg->default_string()); 266.24 + out->print("%s", arg->default_string()); 266.25 } else { 266.26 out->print("no default value"); 266.27 } 266.28 @@ -284,7 +284,7 @@ 266.29 arg->is_mandatory() ? "" : "[optional]", 266.30 arg->description(), arg->type()); 266.31 if (arg->has_default()) { 266.32 - out->print(arg->default_string()); 266.33 + out->print("%s", arg->default_string()); 266.34 } else { 266.35 out->print("no default value"); 266.36 }
267.1 --- a/src/share/vm/services/heapDumper.cpp Thu May 15 18:23:26 2014 -0400 267.2 +++ b/src/share/vm/services/heapDumper.cpp Thu May 22 15:52:41 2014 -0400 267.3 @@ -1,5 +1,5 @@ 267.4 /* 267.5 - * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. 267.6 + * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved. 267.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 267.8 * 267.9 * This code is free software; you can redistribute it and/or modify it 267.10 @@ -1830,6 +1830,7 @@ 267.11 } 267.12 267.13 // dump the heap to given path. 267.14 +PRAGMA_FORMAT_NONLITERAL_IGNORED_EXTERNAL 267.15 int HeapDumper::dump(const char* path) { 267.16 assert(path != NULL && strlen(path) > 0, "path missing"); 267.17 267.18 @@ -1870,7 +1871,10 @@ 267.19 char msg[256]; 267.20 sprintf(msg, "Heap dump file created [%s bytes in %3.3f secs]", 267.21 JLONG_FORMAT, timer()->seconds()); 267.22 +PRAGMA_DIAG_PUSH 267.23 +PRAGMA_FORMAT_NONLITERAL_IGNORED_INTERNAL 267.24 tty->print_cr(msg, writer.bytes_written()); 267.25 +PRAGMA_DIAG_POP 267.26 } else { 267.27 tty->print_cr("Dump file is incomplete: %s", writer.error()); 267.28 }
268.1 --- a/src/share/vm/services/lowMemoryDetector.cpp Thu May 15 18:23:26 2014 -0400 268.2 +++ b/src/share/vm/services/lowMemoryDetector.cpp Thu May 22 15:52:41 2014 -0400 268.3 @@ -1,5 +1,5 @@ 268.4 /* 268.5 - * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. 268.6 + * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved. 268.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 268.8 * 268.9 * This code is free software; you can redistribute it and/or modify it 268.10 @@ -353,7 +353,7 @@ 268.11 268.12 #ifndef PRODUCT 268.13 void SensorInfo::print() { 268.14 - tty->print_cr("%s count = " SIZE_FORMAT " pending_triggers = %ld pending_clears = %ld", 268.15 + tty->print_cr("%s count = " SIZE_FORMAT " pending_triggers = %d pending_clears = %d", 268.16 (_sensor_on ? "on" : "off"), 268.17 _sensor_count, _pending_trigger_count, _pending_clear_count); 268.18 }
269.1 --- a/src/share/vm/services/management.cpp Thu May 15 18:23:26 2014 -0400 269.2 +++ b/src/share/vm/services/management.cpp Thu May 22 15:52:41 2014 -0400 269.3 @@ -1,5 +1,5 @@ 269.4 /* 269.5 - * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. 269.6 + * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved. 269.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 269.8 * 269.9 * This code is free software; you can redistribute it and/or modify it 269.10 @@ -55,6 +55,8 @@ 269.11 #include "services/threadService.hpp" 269.12 #include "utilities/macros.hpp" 269.13 269.14 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 269.15 + 269.16 PerfVariable* Management::_begin_vm_creation_time = NULL; 269.17 PerfVariable* Management::_end_vm_creation_time = NULL; 269.18 PerfVariable* Management::_vm_init_done_time = NULL; 269.19 @@ -1832,12 +1834,12 @@ 269.20 uintx uvalue = (uintx)new_value.j; 269.21 269.22 if (strncmp(name, "MaxHeapFreeRatio", 17) == 0) { 269.23 - FormatBuffer<80> err_msg(""); 269.24 + FormatBuffer<80> err_msg("%s", ""); 269.25 if (!Arguments::verify_MaxHeapFreeRatio(err_msg, uvalue)) { 269.26 THROW_MSG(vmSymbols::java_lang_IllegalArgumentException(), err_msg.buffer()); 269.27 } 269.28 } else if (strncmp(name, "MinHeapFreeRatio", 17) == 0) { 269.29 - FormatBuffer<80> err_msg(""); 269.30 + FormatBuffer<80> err_msg("%s", ""); 269.31 if (!Arguments::verify_MinHeapFreeRatio(err_msg, uvalue)) { 269.32 THROW_MSG(vmSymbols::java_lang_IllegalArgumentException(), err_msg.buffer()); 269.33 }
270.1 --- a/src/share/vm/services/memReporter.cpp Thu May 15 18:23:26 2014 -0400 270.2 +++ b/src/share/vm/services/memReporter.cpp Thu May 22 15:52:41 2014 -0400 270.3 @@ -1,5 +1,5 @@ 270.4 /* 270.5 - * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. 270.6 + * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved. 270.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 270.8 * 270.9 * This code is free software; you can redistribute it and/or modify it 270.10 @@ -28,6 +28,8 @@ 270.11 #include "services/memPtrArray.hpp" 270.12 #include "services/memTracker.hpp" 270.13 270.14 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 270.15 + 270.16 const char* BaselineOutputer::memory_unit(size_t scale) { 270.17 switch(scale) { 270.18 case K: return "KB";
271.1 --- a/src/share/vm/services/memSnapshot.cpp Thu May 15 18:23:26 2014 -0400 271.2 +++ b/src/share/vm/services/memSnapshot.cpp Thu May 22 15:52:41 2014 -0400 271.3 @@ -1,5 +1,5 @@ 271.4 /* 271.5 - * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. 271.6 + * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved. 271.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 271.8 * 271.9 * This code is free software; you can redistribute it and/or modify it 271.10 @@ -31,6 +31,8 @@ 271.11 #include "services/memSnapshot.hpp" 271.12 #include "services/memTracker.hpp" 271.13 271.14 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 271.15 + 271.16 #ifdef ASSERT 271.17 271.18 void decode_pointer_record(MemPointerRecord* rec) { 271.19 @@ -733,7 +735,7 @@ 271.20 if (os::dll_address_to_function_name(ex->pc(), buf, sizeof(buf), NULL)) { 271.21 tty->print_cr("\t%s", buf); 271.22 } else { 271.23 - tty->print_cr(""); 271.24 + tty->cr(); 271.25 } 271.26 } 271.27 }
272.1 --- a/src/share/vm/services/memTrackWorker.cpp Thu May 15 18:23:26 2014 -0400 272.2 +++ b/src/share/vm/services/memTrackWorker.cpp Thu May 22 15:52:41 2014 -0400 272.3 @@ -1,5 +1,5 @@ 272.4 /* 272.5 - * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. 272.6 + * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved. 272.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 272.8 * 272.9 * This code is free software; you can redistribute it and/or modify it 272.10 @@ -43,7 +43,7 @@ 272.11 // create thread uses cgc thread type for now. We should revisit 272.12 // the option, or create new thread type. 272.13 _has_error = !os::create_thread(this, os::cgc_thread); 272.14 - set_name("MemTrackWorker", 0); 272.15 + set_name("MemTrackWorker"); 272.16 272.17 // initial generation circuit buffer 272.18 if (!has_error()) {
273.1 --- a/src/share/vm/services/nmtDCmd.cpp Thu May 15 18:23:26 2014 -0400 273.2 +++ b/src/share/vm/services/nmtDCmd.cpp Thu May 22 15:52:41 2014 -0400 273.3 @@ -1,5 +1,5 @@ 273.4 /* 273.5 - * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. 273.6 + * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved. 273.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 273.8 * 273.9 * This code is free software; you can redistribute it and/or modify it 273.10 @@ -128,7 +128,7 @@ 273.11 // native memory tracking has to be on 273.12 if (!MemTracker::is_on() || MemTracker::shutdown_in_progress()) { 273.13 // if it is not on, what's the reason? 273.14 - output()->print_cr(MemTracker::reason()); 273.15 + output()->print_cr("%s", MemTracker::reason()); 273.16 return; 273.17 } 273.18
274.1 --- a/src/share/vm/services/threadService.cpp Thu May 15 18:23:26 2014 -0400 274.2 +++ b/src/share/vm/services/threadService.cpp Thu May 22 15:52:41 2014 -0400 274.3 @@ -1,5 +1,5 @@ 274.4 /* 274.5 - * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. 274.6 + * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved. 274.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 274.8 * 274.9 * This code is free software; you can redistribute it and/or modify it 274.10 @@ -37,6 +37,8 @@ 274.11 #include "runtime/vm_operations.hpp" 274.12 #include "services/threadService.hpp" 274.13 274.14 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 274.15 + 274.16 // TODO: we need to define a naming convention for perf counters 274.17 // to distinguish counters for: 274.18 // - standard JSR174 use
275.1 --- a/src/share/vm/trace/traceStream.hpp Thu May 15 18:23:26 2014 -0400 275.2 +++ b/src/share/vm/trace/traceStream.hpp Thu May 22 15:52:41 2014 -0400 275.3 @@ -1,5 +1,5 @@ 275.4 /* 275.5 - * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. 275.6 + * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved. 275.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 275.8 * 275.9 * This code is free software; you can redistribute it and/or modify it 275.10 @@ -66,7 +66,7 @@ 275.11 } 275.12 275.13 void print_val(const char* label, s8 val) { 275.14 - _st.print("%s = "INT64_FORMAT, label, val); 275.15 + _st.print("%s = "INT64_FORMAT, label, (int64_t) val); 275.16 } 275.17 275.18 void print_val(const char* label, bool val) { 275.19 @@ -113,7 +113,7 @@ 275.20 } 275.21 275.22 void print(const char* val) { 275.23 - _st.print(val); 275.24 + _st.print("%s", val); 275.25 } 275.26 }; 275.27
276.1 --- a/src/share/vm/utilities/array.hpp Thu May 15 18:23:26 2014 -0400 276.2 +++ b/src/share/vm/utilities/array.hpp Thu May 22 15:52:41 2014 -0400 276.3 @@ -375,7 +375,7 @@ 276.4 276.5 // FIXME: How to handle this? 276.6 void print_value_on(outputStream* st) const { 276.7 - st->print("Array<T>(" INTPTR_FORMAT ")", this); 276.8 + st->print("Array<T>(" INTPTR_FORMAT ")", p2i(this)); 276.9 } 276.10 276.11 #ifndef PRODUCT
277.1 --- a/src/share/vm/utilities/bitMap.cpp Thu May 15 18:23:26 2014 -0400 277.2 +++ b/src/share/vm/utilities/bitMap.cpp Thu May 22 15:52:41 2014 -0400 277.3 @@ -1,5 +1,5 @@ 277.4 /* 277.5 - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 277.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 277.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 277.8 * 277.9 * This code is free software; you can redistribute it and/or modify it 277.10 @@ -523,13 +523,13 @@ 277.11 277.12 void BitMap::print_on_error(outputStream* st, const char* prefix) const { 277.13 st->print_cr("%s[" PTR_FORMAT ", " PTR_FORMAT ")", 277.14 - prefix, map(), (char*)map() + (size() >> LogBitsPerByte)); 277.15 + prefix, p2i(map()), p2i((char*)map() + (size() >> LogBitsPerByte))); 277.16 } 277.17 277.18 #ifndef PRODUCT 277.19 277.20 void BitMap::print_on(outputStream* st) const { 277.21 - tty->print("Bitmap(%d):", size()); 277.22 + tty->print("Bitmap(" SIZE_FORMAT "):", size()); 277.23 for (idx_t index = 0; index < size(); index++) { 277.24 tty->print("%c", at(index) ? '1' : '0'); 277.25 }
278.1 --- a/src/share/vm/utilities/constantTag.cpp Thu May 15 18:23:26 2014 -0400 278.2 +++ b/src/share/vm/utilities/constantTag.cpp Thu May 22 15:52:41 2014 -0400 278.3 @@ -1,5 +1,5 @@ 278.4 /* 278.5 - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 278.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 278.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 278.8 * 278.9 * This code is free software; you can redistribute it and/or modify it 278.10 @@ -28,7 +28,7 @@ 278.11 #ifndef PRODUCT 278.12 278.13 void constantTag::print_on(outputStream* st) const { 278.14 - st->print(internal_name()); 278.15 + st->print("%s", internal_name()); 278.16 } 278.17 278.18 #endif // PRODUCT
279.1 --- a/src/share/vm/utilities/debug.cpp Thu May 15 18:23:26 2014 -0400 279.2 +++ b/src/share/vm/utilities/debug.cpp Thu May 22 15:52:41 2014 -0400 279.3 @@ -1,5 +1,5 @@ 279.4 /* 279.5 - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 279.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 279.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 279.8 * 279.9 * This code is free software; you can redistribute it and/or modify it 279.10 @@ -88,6 +88,8 @@ 279.11 # endif 279.12 #endif // PRODUCT 279.13 279.14 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 279.15 + 279.16 FormatBufferResource::FormatBufferResource(const char * format, ...) 279.17 : FormatBufferBase((char*)resource_allocate_bytes(RES_BUFSZ)) { 279.18 va_list argp; 279.19 @@ -96,6 +98,7 @@ 279.20 va_end(argp); 279.21 } 279.22 279.23 +ATTRIBUTE_PRINTF(1, 2) 279.24 void warning(const char* format, ...) { 279.25 if (PrintWarnings) { 279.26 FILE* const err = defaultStream::error_stream();
280.1 --- a/src/share/vm/utilities/debug.hpp Thu May 15 18:23:26 2014 -0400 280.2 +++ b/src/share/vm/utilities/debug.hpp Thu May 22 15:52:41 2014 -0400 280.3 @@ -1,5 +1,5 @@ 280.4 /* 280.5 - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 280.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 280.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 280.8 * 280.9 * This code is free software; you can redistribute it and/or modify it 280.10 @@ -43,17 +43,17 @@ 280.11 #define RES_BUFSZ 256 280.12 class FormatBufferResource : public FormatBufferBase { 280.13 public: 280.14 - FormatBufferResource(const char * format, ...); 280.15 + FormatBufferResource(const char * format, ...) ATTRIBUTE_PRINTF(2, 3); 280.16 }; 280.17 280.18 // Use stack for buffer 280.19 template <size_t bufsz = 256> 280.20 class FormatBuffer : public FormatBufferBase { 280.21 public: 280.22 - inline FormatBuffer(const char * format, ...); 280.23 - inline void append(const char* format, ...); 280.24 - inline void print(const char* format, ...); 280.25 - inline void printv(const char* format, va_list ap); 280.26 + inline FormatBuffer(const char * format, ...) ATTRIBUTE_PRINTF(2, 3); 280.27 + inline void append(const char* format, ...) ATTRIBUTE_PRINTF(2, 3); 280.28 + inline void print(const char* format, ...) ATTRIBUTE_PRINTF(2, 3); 280.29 + inline void printv(const char* format, va_list ap) ATTRIBUTE_PRINTF(2, 0); 280.30 280.31 char* buffer() { return _buf; } 280.32 int size() { return bufsz; } 280.33 @@ -223,7 +223,7 @@ 280.34 void report_unimplemented(const char* file, int line); 280.35 void report_untested(const char* file, int line, const char* message); 280.36 280.37 -void warning(const char* format, ...); 280.38 +void warning(const char* format, ...) ATTRIBUTE_PRINTF(1, 2); 280.39 280.40 #ifdef ASSERT 280.41 // Compile-time asserts.
281.1 --- a/src/share/vm/utilities/events.cpp Thu May 15 18:23:26 2014 -0400 281.2 +++ b/src/share/vm/utilities/events.cpp Thu May 22 15:52:41 2014 -0400 281.3 @@ -1,5 +1,5 @@ 281.4 /* 281.5 - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. 281.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 281.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 281.8 * 281.9 * This code is free software; you can redistribute it and/or modify it 281.10 @@ -82,7 +82,7 @@ 281.11 va_start(ap, format); 281.12 // Save a copy of begin message and log it. 281.13 _buffer.printv(format, ap); 281.14 - Events::log(NULL, _buffer); 281.15 + Events::log(NULL, "%s", _buffer.buffer()); 281.16 va_end(ap); 281.17 } 281.18 } 281.19 @@ -91,6 +91,6 @@ 281.20 if (LogEvents) { 281.21 // Append " done" to the begin message and log it 281.22 _buffer.append(" done"); 281.23 - Events::log(NULL, _buffer); 281.24 + Events::log(NULL, "%s", _buffer.buffer()); 281.25 } 281.26 }
282.1 --- a/src/share/vm/utilities/events.hpp Thu May 15 18:23:26 2014 -0400 282.2 +++ b/src/share/vm/utilities/events.hpp Thu May 22 15:52:41 2014 -0400 282.3 @@ -1,5 +1,5 @@ 282.4 /* 282.5 - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 282.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 282.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 282.8 * 282.9 * This code is free software; you can redistribute it and/or modify it 282.10 @@ -128,7 +128,7 @@ 282.11 void print(outputStream* out, EventRecord<T>& e) { 282.12 out->print("Event: %.3f ", e.timestamp); 282.13 if (e.thread != NULL) { 282.14 - out->print("Thread " INTPTR_FORMAT " ", e.thread); 282.15 + out->print("Thread " INTPTR_FORMAT " ", p2i(e.thread)); 282.16 } 282.17 print(out, e.data); 282.18 } 282.19 @@ -148,7 +148,7 @@ 282.20 public: 282.21 StringEventLog(const char* name, int count = LogEventsBufferEntries) : EventLogBase<StringLogMessage>(name, count) {} 282.22 282.23 - void logv(Thread* thread, const char* format, va_list ap) { 282.24 + void logv(Thread* thread, const char* format, va_list ap) ATTRIBUTE_PRINTF(3, 0) { 282.25 if (!should_log()) return; 282.26 282.27 double timestamp = fetch_timestamp(); 282.28 @@ -159,7 +159,7 @@ 282.29 _records[index].data.printv(format, ap); 282.30 } 282.31 282.32 - void log(Thread* thread, const char* format, ...) { 282.33 + void log(Thread* thread, const char* format, ...) ATTRIBUTE_PRINTF(3, 4) { 282.34 va_list ap; 282.35 va_start(ap, format); 282.36 logv(thread, format, ap); 282.37 @@ -193,18 +193,17 @@ 282.38 static void print(); 282.39 282.40 // Logs a generic message with timestamp and format as printf. 282.41 - static void log(Thread* thread, const char* format, ...); 282.42 + static void log(Thread* thread, const char* format, ...) ATTRIBUTE_PRINTF(2, 3); 282.43 282.44 // Log exception related message 282.45 - static void log_exception(Thread* thread, const char* format, ...); 282.46 + static void log_exception(Thread* thread, const char* format, ...) ATTRIBUTE_PRINTF(2, 3); 282.47 282.48 - static void log_deopt_message(Thread* thread, const char* format, ...); 282.49 + static void log_deopt_message(Thread* thread, const char* format, ...) ATTRIBUTE_PRINTF(2, 3); 282.50 282.51 // Register default loggers 282.52 static void init(); 282.53 }; 282.54 282.55 - 282.56 inline void Events::log(Thread* thread, const char* format, ...) { 282.57 if (LogEvents) { 282.58 va_list ap; 282.59 @@ -283,7 +282,7 @@ 282.60 282.61 public: 282.62 // log a begin event, format as printf 282.63 - EventMark(const char* format, ...); 282.64 + EventMark(const char* format, ...) ATTRIBUTE_PRINTF(2, 3); 282.65 // log an end event 282.66 ~EventMark(); 282.67 };
283.1 --- a/src/share/vm/utilities/exceptions.cpp Thu May 15 18:23:26 2014 -0400 283.2 +++ b/src/share/vm/utilities/exceptions.cpp Thu May 22 15:52:41 2014 -0400 283.3 @@ -1,5 +1,5 @@ 283.4 /* 283.5 - * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. 283.6 + * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved. 283.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 283.8 * 283.9 * This code is free software; you can redistribute it and/or modify it 283.10 @@ -35,6 +35,7 @@ 283.11 #include "utilities/events.hpp" 283.12 #include "utilities/exceptions.hpp" 283.13 283.14 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 283.15 283.16 // Implementation of ThreadShadow 283.17 void check_ThreadShadow() { 283.18 @@ -237,6 +238,7 @@ 283.19 _throw_msg(thread, file, line, h_name, msg); 283.20 } 283.21 283.22 + 283.23 // Creates an exception oop, calls the <init> method with the given signature. 283.24 // and returns a Handle 283.25 Handle Exceptions::new_exception(Thread *thread, Symbol* name,
284.1 --- a/src/share/vm/utilities/exceptions.hpp Thu May 15 18:23:26 2014 -0400 284.2 +++ b/src/share/vm/utilities/exceptions.hpp Thu May 22 15:52:41 2014 -0400 284.3 @@ -1,5 +1,5 @@ 284.4 /* 284.5 - * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. 284.6 + * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved. 284.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 284.8 * 284.9 * This code is free software; you can redistribute it and/or modify it 284.10 @@ -132,7 +132,7 @@ 284.11 // There is no THROW... macro for this method. Caller should remember 284.12 // to do a return after calling it. 284.13 static void fthrow(Thread* thread, const char* file, int line, Symbol* name, 284.14 - const char* format, ...); 284.15 + const char* format, ...) ATTRIBUTE_PRINTF(5, 6); 284.16 284.17 // Create and initialize a new exception 284.18 static Handle new_exception(Thread* thread, Symbol* name,
285.1 --- a/src/share/vm/utilities/globalDefinitions.hpp Thu May 15 18:23:26 2014 -0400 285.2 +++ b/src/share/vm/utilities/globalDefinitions.hpp Thu May 22 15:52:41 2014 -0400 285.3 @@ -1,5 +1,5 @@ 285.4 /* 285.5 - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 285.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 285.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 285.8 * 285.9 * This code is free software; you can redistribute it and/or modify it 285.10 @@ -42,6 +42,32 @@ 285.11 # include "utilities/globalDefinitions_xlc.hpp" 285.12 #endif 285.13 285.14 +#ifndef PRAGMA_DIAG_PUSH 285.15 +#define PRAGMA_DIAG_PUSH 285.16 +#endif 285.17 +#ifndef PRAGMA_DIAG_POP 285.18 +#define PRAGMA_DIAG_POP 285.19 +#endif 285.20 +#ifndef PRAGMA_FORMAT_NONLITERAL_IGNORED 285.21 +#define PRAGMA_FORMAT_NONLITERAL_IGNORED 285.22 +#endif 285.23 +#ifndef PRAGMA_FORMAT_IGNORED 285.24 +#define PRAGMA_FORMAT_IGNORED 285.25 +#endif 285.26 +#ifndef PRAGMA_FORMAT_NONLITERAL_IGNORED_INTERNAL 285.27 +#define PRAGMA_FORMAT_NONLITERAL_IGNORED_INTERNAL 285.28 +#endif 285.29 +#ifndef PRAGMA_FORMAT_NONLITERAL_IGNORED_EXTERNAL 285.30 +#define PRAGMA_FORMAT_NONLITERAL_IGNORED_EXTERNAL 285.31 +#endif 285.32 +#ifndef PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 285.33 +#define PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 285.34 +#endif 285.35 +#ifndef ATTRIBUTE_PRINTF 285.36 +#define ATTRIBUTE_PRINTF(fmt, vargs) 285.37 +#endif 285.38 + 285.39 + 285.40 #include "utilities/macros.hpp" 285.41 285.42 // This file holds all globally used constants & types, class (forward) 285.43 @@ -1284,6 +1310,11 @@ 285.44 return ((int)((unsigned int)high << 16) | (unsigned int)low); 285.45 } 285.46 285.47 +// Convert pointer to intptr_t, for use in printing pointers. 285.48 +inline intptr_t p2i(const void * p) { 285.49 + return (intptr_t) p; 285.50 +} 285.51 + 285.52 // Printf-style formatters for fixed- and variable-width types as pointers and 285.53 // integers. These are derived from the definitions in inttypes.h. If the platform 285.54 // doesn't provide appropriate definitions, they should be provided in 285.55 @@ -1302,6 +1333,7 @@ 285.56 // Format 64-bit quantities. 285.57 #define INT64_FORMAT "%" PRId64 285.58 #define UINT64_FORMAT "%" PRIu64 285.59 +#define UINT64_FORMAT_X "%" PRIx64 285.60 #define INT64_FORMAT_W(width) "%" #width PRId64 285.61 #define UINT64_FORMAT_W(width) "%" #width PRIu64 285.62 285.63 @@ -1324,10 +1356,14 @@ 285.64 #define PTR_FORMAT "0x%08" PRIxPTR 285.65 #endif // _LP64 285.66 285.67 -#define SSIZE_FORMAT "%" PRIdPTR 285.68 -#define SIZE_FORMAT "%" PRIuPTR 285.69 -#define SSIZE_FORMAT_W(width) "%" #width PRIdPTR 285.70 -#define SIZE_FORMAT_W(width) "%" #width PRIuPTR 285.71 +#define INTPTR_FORMAT_W(width) "%" #width PRIxPTR 285.72 + 285.73 +#define SSIZE_FORMAT "%" PRIdPTR 285.74 +#define SIZE_FORMAT "%" PRIuPTR 285.75 +#define SIZE_FORMAT_HEX "0x%" PRIxPTR 285.76 +#define SSIZE_FORMAT_W(width) "%" #width PRIdPTR 285.77 +#define SIZE_FORMAT_W(width) "%" #width PRIuPTR 285.78 +#define SIZE_FORMAT_HEX_W(width) "0x%" #width PRIxPTR 285.79 285.80 #define INTX_FORMAT "%" PRIdPTR 285.81 #define UINTX_FORMAT "%" PRIuPTR 285.82 @@ -1353,7 +1389,6 @@ 285.83 return *(void**)addr; 285.84 } 285.85 285.86 - 285.87 #ifndef PRODUCT 285.88 285.89 // For unit testing only
286.1 --- a/src/share/vm/utilities/globalDefinitions_gcc.hpp Thu May 15 18:23:26 2014 -0400 286.2 +++ b/src/share/vm/utilities/globalDefinitions_gcc.hpp Thu May 22 15:52:41 2014 -0400 286.3 @@ -1,5 +1,5 @@ 286.4 /* 286.5 - * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. 286.6 + * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved. 286.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 286.8 * 286.9 * This code is free software; you can redistribute it and/or modify it 286.10 @@ -282,6 +282,47 @@ 286.11 #define PRAGMA_IMPLEMENTATION #pragma implementation 286.12 #define VALUE_OBJ_CLASS_SPEC 286.13 286.14 +#ifndef ATTRIBUTE_PRINTF 286.15 +// Diagnostic pragmas like the ones defined below in PRAGMA_FORMAT_NONLITERAL_IGNORED 286.16 +// were only introduced in GCC 4.2. Because we have no other possibility to ignore 286.17 +// these warnings for older versions of GCC, we simply don't decorate our printf-style 286.18 +// functions with __attribute__(format) in that case. 286.19 +#if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 2)) || (__GNUC__ > 4) 286.20 +#define ATTRIBUTE_PRINTF(fmt,vargs) __attribute__((format(printf, fmt, vargs))) 286.21 +#else 286.22 +#define ATTRIBUTE_PRINTF(fmt,vargs) 286.23 +#endif 286.24 +#endif 286.25 + 286.26 +#define PRAGMA_FORMAT_NONLITERAL_IGNORED _Pragma("GCC diagnostic ignored \"-Wformat-nonliteral\"") \ 286.27 + _Pragma("GCC diagnostic ignored \"-Wformat-security\"") 286.28 +#define PRAGMA_FORMAT_IGNORED _Pragma("GCC diagnostic ignored \"-Wformat\"") 286.29 + 286.30 +#if defined(__clang_major__) && \ 286.31 + (__clang_major__ >= 4 || \ 286.32 + (__clang_major__ >= 3 && __clang_minor__ >= 1)) || \ 286.33 + ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4) 286.34 +// Tested to work with clang version 3.1 and better. 286.35 +#define PRAGMA_DIAG_PUSH _Pragma("GCC diagnostic push") 286.36 +#define PRAGMA_DIAG_POP _Pragma("GCC diagnostic pop") 286.37 +#define PRAGMA_FORMAT_NONLITERAL_IGNORED_EXTERNAL 286.38 +#define PRAGMA_FORMAT_NONLITERAL_IGNORED_INTERNAL PRAGMA_FORMAT_NONLITERAL_IGNORED 286.39 + 286.40 +// Hack to deal with gcc yammering about non-security format stuff 286.41 +#else 286.42 +// Old versions of gcc don't do push/pop, also do not cope with this pragma within a function 286.43 +// One method does so much varied printing that it is decorated with both internal and external 286.44 +// versions of the macro-pragma to obtain better checking with newer compilers. 286.45 +#define PRAGMA_DIAG_PUSH 286.46 +#define PRAGMA_DIAG_POP 286.47 +#define PRAGMA_FORMAT_NONLITERAL_IGNORED_EXTERNAL PRAGMA_FORMAT_NONLITERAL_IGNORED 286.48 +#define PRAGMA_FORMAT_NONLITERAL_IGNORED_INTERNAL 286.49 +#endif 286.50 + 286.51 +#ifndef __clang_major__ 286.52 +#define PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC _Pragma("GCC diagnostic ignored \"-Wformat\"") _Pragma("GCC diagnostic error \"-Wformat-nonliteral\"") _Pragma("GCC diagnostic error \"-Wformat-security\"") 286.53 +#endif 286.54 + 286.55 #if (__GNUC__ == 2) && (__GNUC_MINOR__ < 95) 286.56 #define TEMPLATE_TABLE_BUG 286.57 #endif
287.1 --- a/src/share/vm/utilities/numberSeq.cpp Thu May 15 18:23:26 2014 -0400 287.2 +++ b/src/share/vm/utilities/numberSeq.cpp Thu May 22 15:52:41 2014 -0400 287.3 @@ -1,5 +1,5 @@ 287.4 /* 287.5 - * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. 287.6 + * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved. 287.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 287.8 * 287.9 * This code is free software; you can redistribute it and/or modify it 287.10 @@ -258,5 +258,5 @@ 287.11 } 287.12 s->print("\t[%d]=%7.3f", i, _sequence[i]); 287.13 } 287.14 - s->print_cr(""); 287.15 + s->cr(); 287.16 }
288.1 --- a/src/share/vm/utilities/ostream.cpp Thu May 15 18:23:26 2014 -0400 288.2 +++ b/src/share/vm/utilities/ostream.cpp Thu May 22 15:52:41 2014 -0400 288.3 @@ -1,5 +1,5 @@ 288.4 /* 288.5 - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 288.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 288.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 288.8 * 288.9 * This code is free software; you can redistribute it and/or modify it 288.10 @@ -268,7 +268,7 @@ 288.11 size_t limit = (len + 16) / 16 * 16; 288.12 for (size_t i = 0; i < limit; ++i) { 288.13 if (i % 16 == 0) { 288.14 - indent().print("%07x:", i); 288.15 + indent().print(SIZE_FORMAT_HEX_W(07)":", i); 288.16 } 288.17 if (i % 2 == 0) { 288.18 print(" "); 288.19 @@ -289,7 +289,7 @@ 288.20 } 288.21 } 288.22 } 288.23 - print_cr(""); 288.24 + cr(); 288.25 } 288.26 } 288.27 } 288.28 @@ -606,7 +606,7 @@ 288.29 // memory usage and command line flags into header 288.30 void gcLogFileStream::dump_loggc_header() { 288.31 if (is_open()) { 288.32 - print_cr(Abstract_VM_Version::internal_vm_info_string()); 288.33 + print_cr("%s", Abstract_VM_Version::internal_vm_info_string()); 288.34 os::print_memory_info(this); 288.35 print("CommandLine flags: "); 288.36 CommandLineFlags::printSetFlags(this); 288.37 @@ -687,7 +687,7 @@ 288.38 write(time_msg, strlen(time_msg)); 288.39 288.40 if (out != NULL) { 288.41 - out->print(time_msg); 288.42 + out->print("%s", time_msg); 288.43 } 288.44 288.45 dump_loggc_header(); 288.46 @@ -720,7 +720,7 @@ 288.47 write(time_msg, strlen(time_msg)); 288.48 288.49 if (out != NULL) { 288.50 - out->print(time_msg); 288.51 + out->print("%s", time_msg); 288.52 } 288.53 288.54 fclose(_file); 288.55 @@ -765,7 +765,7 @@ 288.56 write(time_msg, strlen(time_msg)); 288.57 288.58 if (out != NULL) { 288.59 - out->print(time_msg); 288.60 + out->print("%s", time_msg); 288.61 } 288.62 288.63 dump_loggc_header(); 288.64 @@ -845,7 +845,7 @@ 288.65 xs->head("hotspot_log version='%d %d'" 288.66 " process='%d' time_ms='"INT64_FORMAT"'", 288.67 LOG_MAJOR_VERSION, LOG_MINOR_VERSION, 288.68 - os::current_process_id(), time_ms); 288.69 + os::current_process_id(), (int64_t)time_ms); 288.70 // Write VM version header immediately. 288.71 xs->head("vm_version"); 288.72 xs->head("name"); xs->text("%s", VM_Version::vm_name()); xs->cr();
289.1 --- a/src/share/vm/utilities/ostream.hpp Thu May 15 18:23:26 2014 -0400 289.2 +++ b/src/share/vm/utilities/ostream.hpp Thu May 22 15:52:41 2014 -0400 289.3 @@ -1,5 +1,5 @@ 289.4 /* 289.5 - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 289.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 289.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 289.8 * 289.9 * This code is free software; you can redistribute it and/or modify it 289.10 @@ -53,7 +53,7 @@ 289.11 static const char* do_vsnprintf(char* buffer, size_t buflen, 289.12 const char* format, va_list ap, 289.13 bool add_cr, 289.14 - size_t& result_len); 289.15 + size_t& result_len) ATTRIBUTE_PRINTF(3, 0); 289.16 289.17 public: 289.18 // creation 289.19 @@ -80,10 +80,10 @@ 289.20 void set_position(int pos) { _position = pos; } 289.21 289.22 // printing 289.23 - void print(const char* format, ...); 289.24 - void print_cr(const char* format, ...); 289.25 - void vprint(const char *format, va_list argptr); 289.26 - void vprint_cr(const char* format, va_list argptr); 289.27 + void print(const char* format, ...) ATTRIBUTE_PRINTF(2, 3); 289.28 + void print_cr(const char* format, ...) ATTRIBUTE_PRINTF(2, 3); 289.29 + void vprint(const char *format, va_list argptr) ATTRIBUTE_PRINTF(2, 0); 289.30 + void vprint_cr(const char* format, va_list argptr) ATTRIBUTE_PRINTF(2, 0); 289.31 void print_raw(const char* str) { write(str, strlen(str)); } 289.32 void print_raw(const char* str, int len) { write(str, len); } 289.33 void print_raw_cr(const char* str) { write(str, strlen(str)); cr(); } 289.34 @@ -275,10 +275,10 @@ 289.35 ~staticBufferStream() {}; 289.36 virtual void write(const char* c, size_t len); 289.37 void flush(); 289.38 - void print(const char* format, ...); 289.39 - void print_cr(const char* format, ...); 289.40 - void vprint(const char *format, va_list argptr); 289.41 - void vprint_cr(const char* format, va_list argptr); 289.42 + void print(const char* format, ...) ATTRIBUTE_PRINTF(2, 3); 289.43 + void print_cr(const char* format, ...) ATTRIBUTE_PRINTF(2, 3); 289.44 + void vprint(const char *format, va_list argptr) ATTRIBUTE_PRINTF(2, 0); 289.45 + void vprint_cr(const char* format, va_list argptr) ATTRIBUTE_PRINTF(2, 0); 289.46 }; 289.47 289.48 // In the non-fixed buffer case an underlying buffer will be created and
290.1 --- a/src/share/vm/utilities/quickSort.cpp Thu May 15 18:23:26 2014 -0400 290.2 +++ b/src/share/vm/utilities/quickSort.cpp Thu May 22 15:52:41 2014 -0400 290.3 @@ -1,5 +1,5 @@ 290.4 /* 290.5 - * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. 290.6 + * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved. 290.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 290.8 * 290.9 * This code is free software; you can redistribute it and/or modify it 290.10 @@ -77,7 +77,7 @@ 290.11 for (int i = 0; i < length; i++) { 290.12 tty->print(" %d", array[i]); 290.13 } 290.14 - tty->print_cr(""); 290.15 + tty->cr(); 290.16 } 290.17 290.18 bool QuickSort::compare_arrays(int* actual, int* expected, int length) {
291.1 --- a/src/share/vm/utilities/taskqueue.cpp Thu May 15 18:23:26 2014 -0400 291.2 +++ b/src/share/vm/utilities/taskqueue.cpp Thu May 22 15:52:41 2014 -0400 291.3 @@ -1,5 +1,5 @@ 291.4 /* 291.5 - * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. 291.6 + * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved. 291.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 291.8 * 291.9 * This code is free software; you can redistribute it and/or modify it 291.10 @@ -30,6 +30,8 @@ 291.11 #include "utilities/stack.inline.hpp" 291.12 #include "utilities/taskqueue.hpp" 291.13 291.14 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 291.15 + 291.16 #ifdef TRACESPINNING 291.17 uint ParallelTaskTerminator::_total_yields = 0; 291.18 uint ParallelTaskTerminator::_total_spins = 0;
292.1 --- a/src/share/vm/utilities/vmError.cpp Thu May 15 18:23:26 2014 -0400 292.2 +++ b/src/share/vm/utilities/vmError.cpp Thu May 22 15:52:41 2014 -0400 292.3 @@ -1,5 +1,5 @@ 292.4 /* 292.5 - * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. 292.6 + * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved. 292.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 292.8 * 292.9 * This code is free software; you can redistribute it and/or modify it 292.10 @@ -42,6 +42,8 @@ 292.11 #include "utilities/top.hpp" 292.12 #include "utilities/vmError.hpp" 292.13 292.14 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 292.15 + 292.16 // List of environment variables that should be reported in error log file. 292.17 const char *env_list[] = { 292.18 // All platforms 292.19 @@ -358,17 +360,17 @@ 292.20 st->print((_id == (int)OOM_MALLOC_ERROR) ? "(malloc) failed to allocate " : 292.21 "(mmap) failed to map "); 292.22 jio_snprintf(buf, sizeof(buf), SIZE_FORMAT, _size); 292.23 - st->print(buf); 292.24 + st->print("%s", buf); 292.25 st->print(" bytes"); 292.26 if (_message != NULL) { 292.27 st->print(" for "); 292.28 - st->print(_message); 292.29 + st->print("%s", _message); 292.30 } 292.31 st->cr(); 292.32 } else { 292.33 if (_message != NULL) 292.34 st->print("# "); 292.35 - st->print_cr(_message); 292.36 + st->print_cr("%s", _message); 292.37 } 292.38 // In error file give some solutions 292.39 if (_verbose) { 292.40 @@ -485,7 +487,7 @@ 292.41 } else { 292.42 st->print("Failed to write core dump. %s", coredump_message); 292.43 } 292.44 - st->print_cr(""); 292.45 + st->cr(); 292.46 st->print_cr("#"); 292.47 292.48 STEP(65, "(printing bug submit message)")
293.1 --- a/src/share/vm/utilities/workgroup.cpp Thu May 15 18:23:26 2014 -0400 293.2 +++ b/src/share/vm/utilities/workgroup.cpp Thu May 22 15:52:41 2014 -0400 293.3 @@ -1,5 +1,5 @@ 293.4 /* 293.5 - * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. 293.6 + * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved. 293.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 293.8 * 293.9 * This code is free software; you can redistribute it and/or modify it 293.10 @@ -28,6 +28,8 @@ 293.11 #include "runtime/os.hpp" 293.12 #include "utilities/workgroup.hpp" 293.13 293.14 +PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 293.15 + 293.16 // Definitions of WorkGang methods. 293.17 293.18 AbstractWorkGang::AbstractWorkGang(const char* name,
294.1 --- a/src/share/vm/utilities/xmlstream.cpp Thu May 15 18:23:26 2014 -0400 294.2 +++ b/src/share/vm/utilities/xmlstream.cpp Thu May 22 15:52:41 2014 -0400 294.3 @@ -1,5 +1,5 @@ 294.4 /* 294.5 - * Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved. 294.6 + * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved. 294.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 294.8 * 294.9 * This code is free software; you can redistribute it and/or modify it 294.10 @@ -336,6 +336,8 @@ 294.11 print_raw_cr(">"); 294.12 } 294.13 294.14 +PRAGMA_DIAG_PUSH 294.15 +PRAGMA_FORMAT_NONLITERAL_IGNORED 294.16 // ------------------------------------------------------------------ 294.17 void xmlStream::va_done(const char* format, va_list ap) { 294.18 char buffer[200]; 294.19 @@ -354,6 +356,7 @@ 294.20 buffer[kind_len] = 0; 294.21 tail(buffer); 294.22 } 294.23 +PRAGMA_DIAG_POP 294.24 294.25 // Output a timestamp attribute. 294.26 void xmlStream::stamp() {
295.1 --- a/src/share/vm/utilities/xmlstream.hpp Thu May 15 18:23:26 2014 -0400 295.2 +++ b/src/share/vm/utilities/xmlstream.hpp Thu May 22 15:52:41 2014 -0400 295.3 @@ -1,5 +1,5 @@ 295.4 /* 295.5 - * Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved. 295.6 + * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved. 295.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 295.8 * 295.9 * This code is free software; you can redistribute it and/or modify it 295.10 @@ -80,7 +80,7 @@ 295.11 outputStream* out() { return _out; } 295.12 295.13 // helpers for writing XML elements 295.14 - void va_tag(bool push, const char* format, va_list ap); 295.15 + void va_tag(bool push, const char* format, va_list ap) ATTRIBUTE_PRINTF(3, 0); 295.16 virtual void see_tag(const char* tag, bool push) NOT_DEBUG({}); 295.17 virtual void pop_tag(const char* tag) NOT_DEBUG({}); 295.18 295.19 @@ -109,29 +109,29 @@ 295.20 int unflushed_count() { return (int)(out()->count() - _last_flush); } 295.21 295.22 // writing complete XML elements 295.23 - void elem(const char* format, ...); 295.24 - void begin_elem(const char* format, ...); 295.25 - void end_elem(const char* format, ...); 295.26 + void elem(const char* format, ...) ATTRIBUTE_PRINTF(2, 3); 295.27 + void begin_elem(const char* format, ...) ATTRIBUTE_PRINTF(2, 3); 295.28 + void end_elem(const char* format, ...) ATTRIBUTE_PRINTF(2, 3); 295.29 void end_elem(); 295.30 - void head(const char* format, ...); 295.31 - void begin_head(const char* format, ...); 295.32 - void end_head(const char* format, ...); 295.33 + void head(const char* format, ...) ATTRIBUTE_PRINTF(2, 3); 295.34 + void begin_head(const char* format, ...) ATTRIBUTE_PRINTF(2, 3); 295.35 + void end_head(const char* format, ...) ATTRIBUTE_PRINTF(2, 3); 295.36 void end_head(); 295.37 - void done(const char* format, ...); // xxx_done event, plus tail 295.38 + void done(const char* format, ...) ATTRIBUTE_PRINTF(2, 3); // xxx_done event, plus tail 295.39 void done_raw(const char * kind); 295.40 void tail(const char* kind); 295.41 295.42 // va_list versions 295.43 - void va_elem(const char* format, va_list ap); 295.44 - void va_begin_elem(const char* format, va_list ap); 295.45 - void va_head(const char* format, va_list ap); 295.46 - void va_begin_head(const char* format, va_list ap); 295.47 - void va_done(const char* format, va_list ap); 295.48 + void va_elem(const char* format, va_list ap) ATTRIBUTE_PRINTF(2, 0); 295.49 + void va_begin_elem(const char* format, va_list ap) ATTRIBUTE_PRINTF(2, 0); 295.50 + void va_head(const char* format, va_list ap) ATTRIBUTE_PRINTF(2, 0); 295.51 + void va_begin_head(const char* format, va_list ap) ATTRIBUTE_PRINTF(2, 0); 295.52 + void va_done(const char* format, va_list ap) ATTRIBUTE_PRINTF(2, 0); 295.53 295.54 // write text (with quoting of special XML characters <>&'" etc.) 295.55 outputStream* text() { return _text; } 295.56 - void text(const char* format, ...); 295.57 - void va_text(const char* format, va_list ap) { 295.58 + void text(const char* format, ...) ATTRIBUTE_PRINTF(2, 3); 295.59 + void va_text(const char* format, va_list ap) ATTRIBUTE_PRINTF(2, 0) { 295.60 text()->vprint(format, ap); 295.61 } 295.62