src/os_cpu/solaris_sparc/vm/os_solaris_sparc.cpp
Print this page
rev 4773 : 8005849: JEP 167: Event-Based JVM Tracing
Reviewed-by: acorn, coleenp, sla
Contributed-by: Karen Kinnear <karen.kinnear@oracle.com>, Bengt Rutisson <bengt.rutisson@oracle.com>, Calvin Cheung <calvin.cheung@oracle.com>, Erik Gahlin <erik.gahlin@oracle.com>, Erik Helin <erik.helin@oracle.com>, Jesper Wilhelmsson <jesper.wilhelmsson@oracle.com>, Keith McGuigan <keith.mcguigan@oracle.com>, Mattias Tobiasson <mattias.tobiasson@oracle.com>, Markus Gronlund <markus.gronlund@oracle.com>, Mikael Auno <mikael.auno@oracle.com>, Nils Eliasson <nils.eliasson@oracle.com>, Nils Loodin <nils.loodin@oracle.com>, Rickard Backman <rickard.backman@oracle.com>, Staffan Larsen <staffan.larsen@oracle.com>, Stefan Karlsson <stefan.karlsson@oracle.com>, Yekaterina Kantserova <yekaterina.kantserova@oracle.com>
*** 1,7 ****
/*
! * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
--- 1,7 ----
/*
! * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*** 192,201 ****
--- 192,206 ----
intptr_t* os::Solaris::ucontext_get_fp(ucontext_t *uc) {
ShouldNotReachHere();
return NULL;
}
+ address os::Solaris::ucontext_get_pc(ucontext_t *uc) {
+ return (address) uc->uc_mcontext.gregs[REG_PC];
+ }
+
+
// For Forte Analyzer AsyncGetCallTrace profiling support - thread
// is currently interrupted by SIGPROF.
//
// ret_fp parameter is only used by Solaris X86.
//
*** 263,288 ****
} else {
return os::get_sender_for_C_frame(&myframe);
}
}
-
- void GetThreadPC_Callback::execute(OSThread::InterruptArguments *args) {
- Thread* thread = args->thread();
- ucontext_t* uc = args->ucontext();
- intptr_t* sp;
-
- assert(ProfileVM && thread->is_VM_thread(), "just checking");
-
- // Skip the mcontext corruption verification. If if occasionally
- // things get corrupt, it is ok for profiling - we will just get an unresolved
- // function name
- ExtendedPC new_addr((address)uc->uc_mcontext.gregs[REG_PC]);
- _addr = new_addr;
- }
-
-
static int threadgetstate(thread_t tid, int *flags, lwpid_t *lwp, stack_t *ss, gregset_t rs, lwpstatus_t *lwpstatus) {
char lwpstatusfile[PROCFILE_LENGTH];
int lwpfd, err;
if (err = os::Solaris::thr_getstate(tid, flags, lwp, ss, rs))
--- 268,277 ----
*** 356,372 ****
}
guarantee(sig != os::Solaris::SIGinterrupt(), "Can not chain VM interrupt signal, try -XX:+UseAltSigs");
if (sig == os::Solaris::SIGasync()) {
! if (thread) {
! OSThread::InterruptArguments args(thread, uc);
! thread->osthread()->do_interrupt_callbacks_at_interrupt(&args);
! return true;
! } else if (vmthread) {
! OSThread::InterruptArguments args(vmthread, uc);
! vmthread->osthread()->do_interrupt_callbacks_at_interrupt(&args);
return true;
} else if (os::Solaris::chained_handler(sig, info, ucVoid)) {
return true;
} else {
// If os::Solaris::SIGasync not chained, and this is a non-vm and
--- 345,356 ----
}
guarantee(sig != os::Solaris::SIGinterrupt(), "Can not chain VM interrupt signal, try -XX:+UseAltSigs");
if (sig == os::Solaris::SIGasync()) {
! if (thread || vmthread) {
! OSThread::SR_handler(t, uc);
return true;
} else if (os::Solaris::chained_handler(sig, info, ucVoid)) {
return true;
} else {
// If os::Solaris::SIGasync not chained, and this is a non-vm and