Re: [PATCH] trace: add ability to set a target task for events (v2)

2012-07-11 Thread Frederic Weisbecker
On Wed, Jul 11, 2012 at 05:12:04PM +0200, Peter Zijlstra wrote: > On Wed, 2012-07-11 at 16:55 +0200, Peter Zijlstra wrote: > > Right.. back when I did that the plan was to make PERF_SAMPLE_PERIOD fix > > that, of course that never seemed to have happened. > > > > With PERF_SAMPLE_PERIOD you can si

Re: [PATCH] trace: add ability to set a target task for events (v2)

2012-07-11 Thread Peter Zijlstra
On Wed, 2012-07-11 at 16:55 +0200, Peter Zijlstra wrote: > Right.. back when I did that the plan was to make PERF_SAMPLE_PERIOD fix > that, of course that never seemed to have happened. > > With PERF_SAMPLE_PERIOD you can simply write the 1b into the period of 1 > event and be done with it. It d

Re: [PATCH] trace: add ability to set a target task for events (v2)

2012-07-11 Thread Peter Zijlstra
On Wed, 2012-07-11 at 18:14 +0400, Andrew Vagin wrote: > @@ -5226,6 +5227,29 @@ void perf_tp_event(u64 addr, u64 count, void *record, > int entry_size, > perf_swevent_event(event, count, &data, regs); > } > > + /* > +* If we got specified a target ta

Re: [PATCH] trace: add ability to set a target task for events (v2)

2012-07-11 Thread Frederic Weisbecker
On Wed, Jul 11, 2012 at 04:55:08PM +0200, Peter Zijlstra wrote: > On Wed, 2012-07-11 at 16:48 +0200, Frederic Weisbecker wrote: > > On Wed, Jul 11, 2012 at 04:38:19PM +0200, Peter Zijlstra wrote: > > > On Wed, 2012-07-11 at 16:36 +0200, Frederic Weisbecker wrote: > > > > > > > > In this case he ca

Re: [PATCH] trace: add ability to set a target task for events (v2)

2012-07-11 Thread Peter Zijlstra
On Wed, 2012-07-11 at 16:48 +0200, Frederic Weisbecker wrote: > On Wed, Jul 11, 2012 at 04:38:19PM +0200, Peter Zijlstra wrote: > > On Wed, 2012-07-11 at 16:36 +0200, Frederic Weisbecker wrote: > > > > > > In this case he can just record sched wakeup as well. With sched_switch > > > + sched_wakeup

Re: [PATCH] trace: add ability to set a target task for events (v2)

2012-07-11 Thread Frederic Weisbecker
On Wed, Jul 11, 2012 at 04:38:19PM +0200, Peter Zijlstra wrote: > On Wed, 2012-07-11 at 16:36 +0200, Frederic Weisbecker wrote: > > > > In this case he can just record sched wakeup as well. With sched_switch > > + sched_wakeup, he'll unlikely lose events. > > > > With sched_stat_sleep he will los

Re: [PATCH] trace: add ability to set a target task for events (v2)

2012-07-11 Thread Peter Zijlstra
On Wed, 2012-07-11 at 16:36 +0200, Frederic Weisbecker wrote: > > In this case he can just record sched wakeup as well. With sched_switch > + sched_wakeup, he'll unlikely lose events. > > With sched_stat_sleep he will lose events, unless we fix this period > demux thing. But without this patch,

Re: [PATCH] trace: add ability to set a target task for events (v2)

2012-07-11 Thread Frederic Weisbecker
On Wed, Jul 11, 2012 at 04:33:41PM +0200, Peter Zijlstra wrote: > On Wed, 2012-07-11 at 16:31 +0200, Frederic Weisbecker wrote: > > On Wed, Jul 11, 2012 at 06:14:58PM +0400, Andrew Vagin wrote: > > > A few events are interesting not only for a current task. > > > For example, sched_stat_* are inter

Re: [PATCH] trace: add ability to set a target task for events (v2)

2012-07-11 Thread Peter Zijlstra
On Wed, 2012-07-11 at 16:31 +0200, Frederic Weisbecker wrote: > On Wed, Jul 11, 2012 at 06:14:58PM +0400, Andrew Vagin wrote: > > A few events are interesting not only for a current task. > > For example, sched_stat_* are interesting for a task, which > > wake up. For this reason, it will be good,

Re: [PATCH] trace: add ability to set a target task for events (v2)

2012-07-11 Thread Frederic Weisbecker
On Wed, Jul 11, 2012 at 06:14:58PM +0400, Andrew Vagin wrote: > A few events are interesting not only for a current task. > For example, sched_stat_* are interesting for a task, which > wake up. For this reason, it will be good, if such events will > be delivered to a target task too. > > Now a ta

[PATCH] trace: add ability to set a target task for events (v2)

2012-07-11 Thread Andrew Vagin
A few events are interesting not only for a current task. For example, sched_stat_* are interesting for a task, which wake up. For this reason, it will be good, if such events will be delivered to a target task too. Now a target task can be set by using __perf_task(). The original idea and a draf

Re: [PATCH] trace: add ability to set a target task for events

2012-07-10 Thread Andrey Wagin
Hello Peter, 2012/7/10 Peter Zijlstra : > On Wed, 2012-07-04 at 13:08 +0400, Andrew Vagin wrote: >> From: Peter Zijlstra >> >> A few events are interesting not only for a current task. >> For example, sched_stat_* are interesting to a task, which >> wake up. For this reason, it will be good, if s

Re: [PATCH] trace: add ability to set a target task for events

2012-07-10 Thread Peter Zijlstra
On Wed, 2012-07-04 at 13:08 +0400, Andrew Vagin wrote: > From: Peter Zijlstra > > A few events are interesting not only for a current task. > For example, sched_stat_* are interesting to a task, which > wake up. For this reason, it will be good, if such events will > be delivered to a target task