Update to kernel 4.0.0. Working fine now. Thank you Arnaldo.
On 14 April 2015 at 20:25, sahil aggarwal <[email protected]> wrote: >> My question stands: "Are you monitoring a specific thread? Or all >> threads in the system"? > I am monitoring a specific thread not systemwide. > >> Above, we are not asking the kernel for cpu == -1 and thread == -1, that will >> result in that -EINVAL, that is there for scalability reasons. > > Yes, this condition will give EINVAL according to the documentation, > but i pass the pid of thread i want to monitor so i definitely dont > ask kernel for cpu == -1 and pid == -1. > > sys_perf_event_open(__NR_perf_event_open,2588,0,-1,0) > sys_perf_event_open(__NR_perf_event_open,2588,1,-1,0) > > But, my actual problem still persist. Still not getting any counts on > sched:sched_switch for particular thread. But it works for systemwide > > bash-4.1# perf stat -ae "sched:*" sleep 1 > > Performance counter stats for 'sleep 1': > > 0 sched:sched_kthread_stop > [100.00%] > 0 sched:sched_kthread_stop_ret > [100.00%] > 90 sched:sched_wakeup > [100.00%] > 8 sched:sched_wakeup_new > [100.00%] > 210 sched:sched_switch > [100.00%] > 31 sched:sched_migrate_task > [100.00%] > 6 sched:sched_process_free > [100.00%] > 5 sched:sched_process_exit > [100.00%] > 0 sched:sched_wait_task > [100.00%] > 7 sched:sched_process_wait > [100.00%] > 10 sched:sched_process_fork > [100.00%] > 0 sched:sched_stat_wait > [100.00%] > 0 sched:sched_stat_sleep > [100.00%] > 0 sched:sched_stat_iowait > [100.00%] > 81156012 sched:sched_stat_runtime > [100.00%] > 0 sched:sched_pi_setprio > > 1.004944414 seconds time elapsed -- To unsubscribe from this list: send the line "unsubscribe linux-perf-users" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
