procfs.d.in revision 4372c2457c83ba786dcbd57c9896aa05174f2673
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
* This file defines the standard set of inlines and translators to be made
* available for all D programs to use to examine process model state.
*/
/*
* The following miscellaneous constants are used by the proc(4) translators
* defined below. These are assigned the latest values from the system .h's.
*/
/*
* Translate from the kernel's proc_t structure to a proc(4) psinfo_t struct.
* We do not provide support for pr_size, pr_rssize, pr_pctcpu, and pr_pctmem.
* We also do not fill in pr_lwp (the lwpsinfo_t for the representative LWP)
* because we do not have the ability to select and stop any representative.
* Also, for the moment, pr_wstat, pr_time, and pr_ctime are not supported,
* but these could be supported by DTrace in the future using subroutines.
* Note that any member added to this translator should also be added to the
* kthread_t-to-psinfo_t translator, below.
*/
};
/*
* Translate from the kernel's kthread_t structure to a proc(4) psinfo_t
* struct. Lacking a facility to define one translator only in terms of
* another, we explicitly define each member by using the proc_t-to-psinfo_t
* translator, above; any members added to that translator should also be
* added here. (The only exception to this is pr_start, which -- due to it
* being a structure -- cannot be defined in terms of a translator at all.)
*/
};
/*
* Translate from the kernel's kthread_t structure to a proc(4) lwpsinfo_t.
* We do not provide support for pr_nice, pr_oldpri, pr_cpu, or pr_pctcpu.
* Also, for the moment, pr_start and pr_time are not supported, but these
* could be supported by DTrace in the future using subroutines.
*/
pr_syscall = T->t_sysnum;
pr_bindpro = T->t_bind_cpu;
pr_bindpset = T->t_bind_pset;
};