Arguments

The argument types for the sched probes are listed in Table 26–2; the arguments are described in Table 26–1.

Table 26.2.  sched Probe Arguments

Probe

args[0]

args[1]

args[2]

args[3]

change-pri

lwpsinfo_t *

psinfo_t *

pri_t

dequeue

lwpsinfo_t *

psinfo_t *

cpuinfo_t *

enqueue

lwpsinfo_t *

psinfo_t *

cpuinfo_t *

int

off-cpu

lwpsinfo_t *

psinfo_t *

on-cpu

preempt

remain-cpu

schedctl-nopreempt

lwpsinfo_t *

psinfo_t *

schedctl-preempt

lwpsinfo_t *

psinfo_t *

schedctl-yield

lwpsinfo_t *

psinfo_t *

sleep

surrender

lwpsinfo_t *

psinfo_t *

tick

lwpsinfo_t *

psinfo_t *

wakeup

lwpsinfo_t *

psinfo_t *

As Table 26–2 indicates, many sched probes have arguments consisting of a pointer to an lwpsinfo_t and a pointer to a psinfo_t, indicating a thread and the process containing the thread, respectively. These structures are described in detail in lwpsinfo_t and psinfo_t , respectively.

cpuinfo_t

The cpuinfo_t structure defines a CPU. As Table 26–2 indicates, arguments to both the enqueue and dequeue probes include a pointer to a cpuinfo_t. Additionally, the cpuinfo_t corresponding to the current CPU is pointed to by the curcpu variable. The definition of the cpuinfo_t structure is as follows:

typedef struct cpuinfo {
	processorid_t cpu_id;           /* CPU identifier */
	psetid_t cpu_pset;              /* processor set identifier */
	chipid_t cpu_chip;              /* chip identifier */
	lgrp_id_t cpu_lgrp;             /* locality group identifer */
	processor_info_t cpu_info;      /* CPU information */
} cpuinfo_t;

The cpu_id member is the processor identifier, as returned by psrinfo ( 1M ) and p_online ( 2 ) .

The cpu_pset member is the processor set that contains the CPU, if any. See psrset ( 1M ) for more details on processor sets.

The cpu_chip member is the identifier of the physical chip. Physical chips may contain several CPUs. See psrinfo ( 1M ) for more information.

The cpu_lgrp member is the identifier of the latency group associated with the CPU. See liblgrp ( 3LIB ) for details on latency groups.

The cpu_info member is the processor_info_t structure associated with the CPU, as returned by processor_info ( 2 ) .