[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALZhoSSoZHTM_NE=7EB7bGY83=D4dgZyYNX1WRd+Lafsdn11TA@mail.gmail.com>
Date: Mon, 1 Jul 2013 20:18:59 +0800
From: Lei Wen <adrian.wenl@...il.com>
To: Kamalesh Babulal <kamalesh@...ux.vnet.ibm.com>
Cc: Lei Wen <leiwen@...vell.com>, Paul Turner <pjt@...gle.com>,
Alex Shi <alex.shi@...el.com>,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...e.hu>, mingo@...hat.com,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] sched: add trace events for task and rq usage tracking
Hi Kamalesh,
On Mon, Jul 1, 2013 at 5:43 PM, Kamalesh Babulal
<kamalesh@...ux.vnet.ibm.com> wrote:
> * Lei Wen <leiwen@...vell.com> [2013-07-01 15:10:32]:
>
>> Since we could track task in the entity level now, we may want to
>> investigate tasks' running status by recording the trace info, so that
>> could make some tuning if needed.
>>
>> Signed-off-by: Lei Wen <leiwen@...vell.com>
>> ---
>> include/trace/events/sched.h | 73 ++++++++++++++++++++++++++++++++++++++++++
>> kernel/sched/fair.c | 29 +++++++++++++++--
>> 2 files changed, 100 insertions(+), 2 deletions(-)
>
> [...]
>
>>
>> +TRACE_EVENT(sched_cfs_rq_runnable_load,
>> +
>> + TP_PROTO(int cpu, unsigned long load, unsigned long total),
>> +
>> + TP_ARGS(cpu, load, total),
>> +
>> + TP_STRUCT__entry(
>> + __field(int, cpu)
>> + __field(unsigned long, load)
>> + __field(unsigned long, total)
>> + ),
>> +
>> + TP_fast_assign(
>> + __entry->cpu = cpu;
>> + __entry->load = load;
>> + __entry->total = total;
>> + ),
>> +
>> + TP_printk("cpu=%d avg=%lu total=%lu",
>> + __entry->cpu,
>> + __entry->load,
>> + __entry->total)
>> +);
>> +
>> +TRACE_EVENT(sched_cfs_rq_blocked_load,
>> +
>> + TP_PROTO(int cpu, unsigned long load, unsigned long total),
>> +
>> + TP_ARGS(cpu, load, total),
>> +
>> + TP_STRUCT__entry(
>> + __field(int, cpu)
>> + __field(unsigned long, load)
>> + __field(unsigned long, total)
>> + ),
>> +
>> + TP_fast_assign(
>> + __entry->cpu = cpu;
>> + __entry->load = load;
>> + __entry->total = total;
>> + ),
>> +
>> + TP_printk("cpu=%d avg=%lu total=%lu",
>> + __entry->cpu,
>> + __entry->load,
>> + __entry->total)
>> +);
>> +
>> #endif /* _TRACE_SCHED_H */
>
> above trace points are same and be folded using EVENT_CLASS:
Nice abstract. I would merge your change for my V2 patch.
Thanks,
Lei
>
> +DECLARE_EVENT_CLASS(sched_cfs_rq_load_contri_template,
> +
> + TP_PROTO(int cpu, unsigned long load, unsigned long total),
> +
> + TP_ARGS(cpu, load, total),
> +
> + TP_STRUCT__entry(
> + __field(int, cpu)
> + __field(unsigned long, load)
> + __field(unsigned long, total)
> + ),
> +
> + TP_fast_assign(
> + __entry->cpu = cpu;
> + __entry->load = load;
> + __entry->total = total;
> + ),
> +
> + TP_printk("cpu=%d avg=%lu total=%lu",
> + __entry->cpu,
> + __entry->load,
> + __entry->total)
> +);
> +
> +DEFINE_EVENT(sched_cfs_rq_load_contri_template, sched_cfs_rq_runnable_load,
> + TP_PROTO(int cpu, unsigned long load, unsigned long total),
> + TP_ARGS(cpu, load, total));
> +
> +DEFINE_EVENT(sched_cfs_rq_load_contri_template, sched_cfs_rq_blocked_load,
> + TP_PROTO(int cpu, unsigned long load, unsigned long total),
> + TP_ARGS(cpu, load, total));
> +
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists