Function - Perform periodic PC sampling for a thread.
kern_return_t thread_sample (thread_act_t sample_thread, mach_port_make_send_t reply_port);
The thread_sample function causes the program counter (PC) of the specified sample_thread to be sampled periodically (whenever the thread happens to be running at the time of the kernel's "hardclock" interrupt). The set of PC sample values obtained are saved in buffers which are sent to the specified reply_port in receive_samples messages.
Only generic errors apply.
Functions: task_sample, receive_samples.