Here is a kernel example, where we want to sample indirect calls:
$ perf record -a -C 1 -b ind_call -e r1c4:k sleep 10
$ perf report -b
#
# Overhead Source Symbol Target Symbol
# ........ .......................... ..........................
#
36.36% [k] __delay [k] delay_tsc
9.09% [k] ktime_get [k] read_tsc
9.09% [k] getnstimeofday [k] read_tsc
9.09% [k] notifier_call_chain [k] tick_notify
4.55% [k] cpuidle_idle_call [k] intel_idle
4.55% [k] cpuidle_idle_call [k] menu_reflect
2.27% [k] handle_irq [k] handle_edge_irq
2.27% [k] ack_apic_edge [k] native_apic_mem_write
2.27% [k] hpet_interrupt_handler [k] hrtimer_interrupt
2.27% [k] __run_hrtimer [k] watchdog_timer_fn
2.27% [k] enqueue_task [k] enqueue_task_rt
2.27% [k] try_to_wake_up [k] select_task_rq_rt
2.27% [k] do_timer [k] read_tsc
Due to HW limitations, branch filtering may be approximate on
Core, Atom processors. It is more accurate on Nehalem, Westmere
and best on Sandy Bridge.
Can I have you ACK on this userspace stuff (patches 11-13)?