dtrace_isa.c revision 75521904d7c3dbe11337904d9bead2518c94cc50
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync * CDDL HEADER START
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync * The contents of this file are subject to the terms of the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync * Common Development and Distribution License, Version 1.0 only
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync * (the "License"). You may not use this file except in compliance
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync * with the License.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync * See the License for the specific language governing permissions
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync * and limitations under the License.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync * When distributing Covered Code, include this CDDL HEADER in each
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync * If applicable, add the following below this CDDL HEADER, with the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync * fields enclosed by brackets "[]" replaced with your own identifying
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync * information: Portions Copyright [yyyy] [name of copyright owner]
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync * CDDL HEADER END
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync * Use is subject to license terms.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync#pragma ident "%Z%%M% %I% %E% SMI"
int depth = 0;
int on_intr, j = 0;
uint32_t i, r;
i = pc[j++];
if (r >= DTRACE_REG_L0)
goto nonleaf;
if (r >= DTRACE_REG_L0)
goto nonleaf;
if (r == DTRACE_REG_O7) {
if (delay)
goto leaf;
i &= DTRACE_JMPL_MASK;
if (i == DTRACE_JMPL) {
goto nonleaf;
if (i == DTRACE_RET)
goto nonleaf;
if (i == DTRACE_RETL)
goto leaf;
taken == j)
goto nonleaf;
taken = j;
j += ((int)(i << DTRACE_DISP22_SHIFT) >>
goto leaf;
goto nonleaf;
if (delay) {
goto nonleaf;
aframes++;
leaf:
if (on_intr) {
on_intr = 0;
if (aframes > 0) {
aframes--;
int ret = 0;
if (pc == 0)
ret++;
if (pcstack_limit == 0)
if (sp == 0 ||
if (pc == 0)
ret++;
if (pcstack_limit == 0)
return (ret);
if (pcstack_limit <= 0)
goto zero;
if (pcstack_limit <= 0)
if (pcstack_limit <= 0)
if (pcstack_limit <= 0)
ASSERT(n >= 0);
pcstack += n;
pcstack_limit -= n;
if (pcstack_limit <= 0)
ASSERT(n >= 0);
pcstack += n;
pcstack_limit -= n;
zero:
while (pcstack_limit-- > 0)
dtrace_getustackdepth(void)
if (pcstack_limit <= 0)
goto zero;
if (pcstack_limit <= 0)
*fpstack++ = 0;
if (pcstack_limit <= 0)
if (pcstack_limit <= 0)
while (pcstack_limit > 0) {
if (pc == 0)
while (pcstack_limit > 0) {
if (sp == 0 ||
if (pc == 0)
zero:
while (pcstack_limit-- > 0)
aframes++;
return (val);
return (rval);
return (rval);
int depth = 0;
int on_intr;
if (on_intr) {
on_intr = 0;
return (++depth);
if (aframes > 0) {
aframes--;
depth++;
* This uses the same register numbering scheme as in sys/procfs_isa.h.
switch (reg) {
case R_CCR:
case R_PC:
case R_nPC:
case R_Y:
case R_ASI:
case R_FPRS:
return (dtrace_getfprs());
goto fake_restore;
if (dtrace_getotherwin() > 0)
return (value);
if (dtrace_getotherwin() > 0) {
goto got_fp;
goto got_fp;
goto got_fp;
return (value);