4 <strong>Function
</strong> - Perform periodic PC sampling for a thread.
7 <strong>kern_return_t thread_sample
</strong>
8 <strong>(thread_act_t
</strong> <var>sample_thread
</var>,
9 <strong>mach_port_make_send_t
</strong> <var>reply_port
</var><strong>);
</strong>
14 <dt> <var>sample_thread
</var>
16 [in thread send right]
17 Thread whose PC is to be sampled
19 <dt> <var>reply_port
</var>
21 [in sample receive (to be converted to send) right]
23 sample buffers are sent. A value of
<strong>MACH_PORT_NULL
</strong> stops PC
24 sampling for the thread.
28 The
<strong>thread_sample
</strong> function causes the program counter
30 <var>sample_thread
</var> to be sampled periodically (whenever the thread happens to be
31 running at the time of the kernel's "hardclock" interrupt).
33 values obtained are saved in buffers which are sent to the specified
34 <var>reply_port
</var> in
35 <strong>receive_samples
</strong> messages.
36 <h3>RETURN VALUES
</h3>
38 Only generic errors apply.
39 <h3>RELATED INFORMATION
</h3>
42 <a href=
"task_sample.html"><strong>task_sample
</strong></a>,
43 <a href=
"receive_samples.html"><strong>receive_samples
</strong></a>.