comparison src/os_cpu/linux_ppc/vm/os_linux_ppc.cpp @ 20644:327e7269f90d

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
author coleenp
date Mon, 30 Jun 2014 14:58:52 -0400
parents 67fa91961822
children c5e86c5cd22e
comparison
equal deleted inserted replaced
20642:ec2c6fdd1ce6 20644:327e7269f90d
1 /* 1 /*
2 * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
3 * Copyright 2012, 2013 SAP AG. All rights reserved. 3 * Copyright 2012, 2014 SAP AG. All rights reserved.
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * 5 *
6 * This code is free software; you can redistribute it and/or modify it 6 * This code is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License version 2 only, as 7 * under the terms of the GNU General Public License version 2 only, as
8 * published by the Free Software Foundation. 8 * published by the Free Software Foundation.
305 // especially when we try to read from the safepoint polling page. So the check 305 // especially when we try to read from the safepoint polling page. So the check
306 // (address)info->si_addr == os::get_standard_polling_page() 306 // (address)info->si_addr == os::get_standard_polling_page()
307 // doesn't work for us. We use: 307 // doesn't work for us. We use:
308 ((NativeInstruction*)pc)->is_safepoint_poll()) { 308 ((NativeInstruction*)pc)->is_safepoint_poll()) {
309 if (TraceTraps) { 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 stub = SharedRuntime::get_poll_stub(pc); 312 stub = SharedRuntime::get_poll_stub(pc);
313 } 313 }
314 314
315 // SIGTRAP-based ic miss check in compiled code. 315 // SIGTRAP-based ic miss check in compiled code.
316 else if (sig == SIGTRAP && TrapBasedICMissChecks && 316 else if (sig == SIGTRAP && TrapBasedICMissChecks &&
317 nativeInstruction_at(pc)->is_sigtrap_ic_miss_check()) { 317 nativeInstruction_at(pc)->is_sigtrap_ic_miss_check()) {
318 if (TraceTraps) { 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 stub = SharedRuntime::get_ic_miss_stub(); 321 stub = SharedRuntime::get_ic_miss_stub();
322 } 322 }
323 323
324 // SIGTRAP-based implicit null check in compiled code. 324 // SIGTRAP-based implicit null check in compiled code.
325 else if (sig == SIGTRAP && TrapBasedNullChecks && 325 else if (sig == SIGTRAP && TrapBasedNullChecks &&
326 nativeInstruction_at(pc)->is_sigtrap_null_check()) { 326 nativeInstruction_at(pc)->is_sigtrap_null_check()) {
327 if (TraceTraps) { 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 stub = SharedRuntime::continuation_for_implicit_exception(thread, pc, SharedRuntime::IMPLICIT_NULL); 330 stub = SharedRuntime::continuation_for_implicit_exception(thread, pc, SharedRuntime::IMPLICIT_NULL);
331 } 331 }
332 332
333 // SIGSEGV-based implicit null check in compiled code. 333 // SIGSEGV-based implicit null check in compiled code.
334 else if (sig == SIGSEGV && ImplicitNullChecks && 334 else if (sig == SIGSEGV && ImplicitNullChecks &&
335 CodeCache::contains((void*) pc) && 335 CodeCache::contains((void*) pc) &&
336 !MacroAssembler::needs_explicit_null_check((intptr_t) info->si_addr)) { 336 !MacroAssembler::needs_explicit_null_check((intptr_t) info->si_addr)) {
337 if (TraceTraps) { 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 stub = SharedRuntime::continuation_for_implicit_exception(thread, pc, SharedRuntime::IMPLICIT_NULL); 340 stub = SharedRuntime::continuation_for_implicit_exception(thread, pc, SharedRuntime::IMPLICIT_NULL);
341 } 341 }
342 342
343 #ifdef COMPILER2 343 #ifdef COMPILER2
344 // SIGTRAP-based implicit range check in compiled code. 344 // SIGTRAP-based implicit range check in compiled code.
345 else if (sig == SIGTRAP && TrapBasedRangeChecks && 345 else if (sig == SIGTRAP && TrapBasedRangeChecks &&
346 nativeInstruction_at(pc)->is_sigtrap_range_check()) { 346 nativeInstruction_at(pc)->is_sigtrap_range_check()) {
347 if (TraceTraps) { 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 stub = SharedRuntime::continuation_for_implicit_exception(thread, pc, SharedRuntime::IMPLICIT_NULL); 350 stub = SharedRuntime::continuation_for_implicit_exception(thread, pc, SharedRuntime::IMPLICIT_NULL);
351 } 351 }
352 #endif 352 #endif
353 else if (sig == SIGBUS) { 353 else if (sig == SIGBUS) {
570 } 570 }
571 st->cr(); 571 st->cr();
572 st->cr(); 572 st->cr();
573 573
574 intptr_t *sp = (intptr_t *)os::Linux::ucontext_get_sp(uc); 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 print_hex_dump(st, (address)sp, (address)(sp + 128), sizeof(intptr_t)); 576 print_hex_dump(st, (address)sp, (address)(sp + 128), sizeof(intptr_t));
577 st->cr(); 577 st->cr();
578 578
579 // Note: it may be unsafe to inspect memory near pc. For example, pc may 579 // Note: it may be unsafe to inspect memory near pc. For example, pc may
580 // point to garbage if entry point in an nmethod is corrupted. Leave 580 // point to garbage if entry point in an nmethod is corrupted. Leave
581 // this at the end, and hope for the best. 581 // this at the end, and hope for the best.
582 address pc = os::Linux::ucontext_get_pc(uc); 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 print_hex_dump(st, pc - 64, pc + 64, /*instrsize=*/4); 584 print_hex_dump(st, pc - 64, pc + 64, /*instrsize=*/4);
585 st->cr(); 585 st->cr();
586 } 586 }
587 587
588 void os::print_register_info(outputStream *st, void *context) { 588 void os::print_register_info(outputStream *st, void *context) {