Re: [PATCH 6/8] perf sched: Introduce timehist command

2013-12-03 Thread David Ahern
On 11/28/13, 6:58 PM, David Ahern wrote: On 11/28/13, 5:48 PM, Namhyung Kim wrote: Do we really need to look up the callchain to find out an idle thread? ---8<--- It seems every idle/swapper thread for each cpu has a pid of 0. I knew I had this code in there for a reason Older kernels

Re: [PATCH 6/8] perf sched: Introduce timehist command

2013-11-28 Thread David Ahern
On 11/28/13, 5:48 PM, Namhyung Kim wrote: Do we really need to look up the callchain to find out an idle thread? $ perf sched script | grep swapper | head swapper 0 [001] 4294177.326996: sched:sched_switch: prev_comm=swapper/1 prev_pid=0 prev_prio=120 prev_state=R ==> next_comm

Re: [PATCH 6/8] perf sched: Introduce timehist command

2013-11-28 Thread Namhyung Kim
Hi David, On Thu, 28 Nov 2013 09:01:23 -0700, David Ahern wrote: > On 11/28/13, 8:38 AM, Namhyung Kim wrote: >> On Tue, Nov 19, 2013 at 5:32 AM, David Ahern wrote: >> >> [SNIP] >>> +static bool is_idle_sample(struct perf_sample *sample, >>> + struct perf_evsel *evsel, >>>

Re: [PATCH 6/8] perf sched: Introduce timehist command

2013-11-28 Thread David Ahern
On 11/28/13, 8:38 AM, Namhyung Kim wrote: On Tue, Nov 19, 2013 at 5:32 AM, David Ahern wrote: [SNIP] +static bool is_idle_sample(struct perf_sample *sample, + struct perf_evsel *evsel, + struct machine *machine) +{ + struct thread *thread

Re: [PATCH 6/8] perf sched: Introduce timehist command

2013-11-28 Thread David Ahern
On 11/28/13, 2:50 AM, Namhyung Kim wrote: +static inline void printf_nsecs(unsigned long long nsecs, int width_sec) >+{ >+ unsigned long secs; >+ unsigned long usecs; >+ >+ secs = nsecs / NSECS_PER_SEC; >+ nsecs -= secs * NSECS_PER_SEC; >+ usecs = nsecs / NSECS_PER_USEC; >+ printf("%*

Re: [PATCH 6/8] perf sched: Introduce timehist command

2013-11-28 Thread Namhyung Kim
On Tue, Nov 19, 2013 at 5:32 AM, David Ahern wrote: [SNIP] > +static bool is_idle_sample(struct perf_sample *sample, > + struct perf_evsel *evsel, > + struct machine *machine) > +{ > + struct thread *thread; > + struct callchain_cursor

Re: [PATCH 6/8] perf sched: Introduce timehist command

2013-11-28 Thread Namhyung Kim
On Mon, 18 Nov 2013 13:32:49 -0700, David Ahern wrote: > 'perf sched timehist' provides an analysis of scheduling events. > > Example usage: > perf sched record -- sleep 1 > perf sched timehist > > By default it shows the individual schedule events, including the time between > sched-in eve

[PATCH 6/8] perf sched: Introduce timehist command

2013-11-18 Thread David Ahern
'perf sched timehist' provides an analysis of scheduling events. Example usage: perf sched record -- sleep 1 perf sched timehist By default it shows the individual schedule events, including the time between sched-in events for the task, the task scheduling delay (time between wakeup and