Go to the first, previous, next, last section, table of contents.
task_enable_pc_sampling
enables PC sampling for
task, the function thread_enable_pc_sampling
enables PC
sampling for thread. The kernel's idea of clock granularity is
returned in ticks (this value should not be trusted). The
sampling flavor is specified by flavor.
The function returns KERN_SUCCESS
if the operation is completed successfully
and KERN_INVALID_ARGUMENT
if thread is not a valid thread.
task_disable_pc_sampling
disables PC sampling for
task, the function thread_disable_pc_sampling
disables PC
sampling for thread. The number of sample elements in the kernel
for the thread is returned in sample_cnt.
The function returns KERN_SUCCESS
if the operation is completed successfully
and KERN_INVALID_ARGUMENT
if thread is not a valid thread.
task_get_sampled_pcs
extracts the PC samples for
task, the function thread_get_sampled_pcs
extracts the PC
samples for thread. seqno is the sequence number of the
sampled PCs. This is useful for determining when a collector thread has
missed a sample. The sampled PCs for the thread are returned in
sampled_pcs. sample_cnt contains the number of sample
elements returned.
The function returns KERN_SUCCESS
if the operation is completed successfully,
KERN_INVALID_ARGUMENT
if thread is not a valid thread and
KERN_FAILURE
if thread is not sampled.
thread_get_sampled_pcs
and task_get_sampled_pcs
functions
and provides pc samples for threads or tasks. It has the following
members:
natural_t id
vm_offset_t pc
sampled_pc_flavor_t sampletype
thread_enable_pc_sample
and
thread_disable_pc_sample
functions, or as member
sampletype
in the sample_pc_t
data type. The flavor is a
bitwise-or of the possible flavors defined in `mach/pc_sample.h':
SAMPLED_PC_PERIODIC
SAMPLED_PC_VM_ZFILL_FAULTS
SAMPLED_PC_VM_REACTIVATION_FAULTS
SAMPLED_PC_VM_PAGEIN_FAULTS
SAMPLED_PC_VM_COW_FAULTS
SAMPLED_PC_VM_FAULTS_ANY
SAMPLED_PC_VM_FAULTS
SAMPLED_PC_VM_ZFILL_FAULTS
,
SAMPLED_PC_VM_REACTIVATION_FAULTS
,
SAMPLED_PC_VM_PAGEIN_FAULTS
and SAMPLED_PC_VM_COW_FAULTS
.
Go to the first, previous, next, last section, table of contents.