Print this page
rev 6900 : 8048169: Change 8037816 breaks HS build on PPC64 and CPP-Interpreter platforms
Summary: Fix the matching of format string parameter types to the actual argument types for the PPC64 and CPP-Interpreter files in the same way as 8037816 already did it for all the other files
Reviewed-by: stefank, coleenp, dholmes

Split Split Close
Expand all
Collapse all
          --- old/hotspot/src/os_cpu/linux_ppc/vm/os_linux_ppc.cpp
          +++ new/hotspot/src/os_cpu/linux_ppc/vm/os_linux_ppc.cpp
   1    1  /*
   2      - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
   3      - * Copyright 2012, 2013 SAP AG. All rights reserved.
        2 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
        3 + * Copyright 2012, 2014 SAP AG. All rights reserved.
   4    4   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   5    5   *
   6    6   * This code is free software; you can redistribute it and/or modify it
   7    7   * under the terms of the GNU General Public License version 2 only, as
   8    8   * published by the Free Software Foundation.
   9    9   *
  10   10   * This code is distributed in the hope that it will be useful, but WITHOUT
  11   11   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  12   12   * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  13   13   * version 2 for more details (a copy is included in the LICENSE file hat
↓ open down ↓ 286 lines elided ↑ open up ↑
 300  300        }
 301  301  
 302  302        else if (sig == SIGSEGV &&
 303  303                 // A linux-ppc64 kernel before 2.6.6 doesn't set si_addr on some segfaults
 304  304                 // in 64bit mode (cf. http://www.kernel.org/pub/linux/kernel/v2.6/ChangeLog-2.6.6),
 305  305                 // especially when we try to read from the safepoint polling page. So the check
 306  306                 //   (address)info->si_addr == os::get_standard_polling_page()
 307  307                 // doesn't work for us. We use:
 308  308                 ((NativeInstruction*)pc)->is_safepoint_poll()) {
 309  309          if (TraceTraps) {
 310      -          tty->print_cr("trap: safepoint_poll at " INTPTR_FORMAT " (SIGSEGV)", pc);
      310 +          tty->print_cr("trap: safepoint_poll at " INTPTR_FORMAT " (SIGSEGV)", p2i(pc));
 311  311          }
 312  312          stub = SharedRuntime::get_poll_stub(pc);
 313  313        }
 314  314  
 315  315        // SIGTRAP-based ic miss check in compiled code.
 316  316        else if (sig == SIGTRAP && TrapBasedICMissChecks &&
 317  317                 nativeInstruction_at(pc)->is_sigtrap_ic_miss_check()) {
 318  318          if (TraceTraps) {
 319      -          tty->print_cr("trap: ic_miss_check at " INTPTR_FORMAT " (SIGTRAP)", pc);
      319 +          tty->print_cr("trap: ic_miss_check at " INTPTR_FORMAT " (SIGTRAP)", p2i(pc));
 320  320          }
 321  321          stub = SharedRuntime::get_ic_miss_stub();
 322  322        }
 323  323  
 324  324        // SIGTRAP-based implicit null check in compiled code.
 325  325        else if (sig == SIGTRAP && TrapBasedNullChecks &&
 326  326                 nativeInstruction_at(pc)->is_sigtrap_null_check()) {
 327  327          if (TraceTraps) {
 328      -          tty->print_cr("trap: null_check at " INTPTR_FORMAT " (SIGTRAP)", pc);
      328 +          tty->print_cr("trap: null_check at " INTPTR_FORMAT " (SIGTRAP)", p2i(pc));
 329  329          }
 330  330          stub = SharedRuntime::continuation_for_implicit_exception(thread, pc, SharedRuntime::IMPLICIT_NULL);
 331  331        }
 332  332  
 333  333        // SIGSEGV-based implicit null check in compiled code.
 334  334        else if (sig == SIGSEGV && ImplicitNullChecks &&
 335  335                 CodeCache::contains((void*) pc) &&
 336  336                 !MacroAssembler::needs_explicit_null_check((intptr_t) info->si_addr)) {
 337  337          if (TraceTraps) {
 338      -          tty->print_cr("trap: null_check at " INTPTR_FORMAT " (SIGSEGV)", pc);
      338 +          tty->print_cr("trap: null_check at " INTPTR_FORMAT " (SIGSEGV)", p2i(pc));
 339  339          }
 340  340          stub = SharedRuntime::continuation_for_implicit_exception(thread, pc, SharedRuntime::IMPLICIT_NULL);
 341  341        }
 342  342  
 343  343  #ifdef COMPILER2
 344  344        // SIGTRAP-based implicit range check in compiled code.
 345  345        else if (sig == SIGTRAP && TrapBasedRangeChecks &&
 346  346                 nativeInstruction_at(pc)->is_sigtrap_range_check()) {
 347  347          if (TraceTraps) {
 348      -          tty->print_cr("trap: range_check at " INTPTR_FORMAT " (SIGTRAP)", pc);
      348 +          tty->print_cr("trap: range_check at " INTPTR_FORMAT " (SIGTRAP)", p2i(pc));
 349  349          }
 350  350          stub = SharedRuntime::continuation_for_implicit_exception(thread, pc, SharedRuntime::IMPLICIT_NULL);
 351  351        }
 352  352  #endif
 353  353        else if (sig == SIGBUS) {
 354  354          // BugId 4454115: A read from a MappedByteBuffer can fault here if the
 355  355          // underlying file has been truncated. Do not crash the VM in such a case.
 356  356          CodeBlob* cb = CodeCache::find_blob_unsafe(pc);
 357  357          nmethod* nm = (cb != NULL && cb->is_nmethod()) ? (nmethod*)cb : NULL;
 358  358          if (nm != NULL && nm->has_unsafe_access()) {
↓ open down ↓ 206 lines elided ↑ open up ↑
 565  565    st->print("ctr=" INTPTR_FORMAT "  ", uc->uc_mcontext.regs->ctr);
 566  566    st->cr();
 567  567    for (int i = 0; i < 32; i++) {
 568  568      st->print("r%-2d=" INTPTR_FORMAT "  ", i, uc->uc_mcontext.regs->gpr[i]);
 569  569      if (i % 3 == 2) st->cr();
 570  570    }
 571  571    st->cr();
 572  572    st->cr();
 573  573  
 574  574    intptr_t *sp = (intptr_t *)os::Linux::ucontext_get_sp(uc);
 575      -  st->print_cr("Top of Stack: (sp=" PTR_FORMAT ")", sp);
      575 +  st->print_cr("Top of Stack: (sp=" PTR_FORMAT ")", p2i(sp));
 576  576    print_hex_dump(st, (address)sp, (address)(sp + 128), sizeof(intptr_t));
 577  577    st->cr();
 578  578  
 579  579    // Note: it may be unsafe to inspect memory near pc. For example, pc may
 580  580    // point to garbage if entry point in an nmethod is corrupted. Leave
 581  581    // this at the end, and hope for the best.
 582  582    address pc = os::Linux::ucontext_get_pc(uc);
 583      -  st->print_cr("Instructions: (pc=" PTR_FORMAT ")", pc);
      583 +  st->print_cr("Instructions: (pc=" PTR_FORMAT ")", p2i(pc));
 584  584    print_hex_dump(st, pc - 64, pc + 64, /*instrsize=*/4);
 585  585    st->cr();
 586  586  }
 587  587  
 588  588  void os::print_register_info(outputStream *st, void *context) {
 589  589    if (context == NULL) return;
 590  590  
 591  591    ucontext_t *uc = (ucontext_t*)context;
 592  592  
 593  593    st->print_cr("Register to memory mapping:");
↓ open down ↓ 21 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX