[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <da915e4d-07ce-2914-e090-0f8e3e9e9650@arm.com>
Date: Mon, 13 May 2019 15:37:26 +0200
From: Dietmar Eggemann <dietmar.eggemann@....com>
To: Qais Yousef <qais.yousef@....com>,
Peter Zijlstra <peterz@...radead.org>
Cc: Ingo Molnar <mingo@...hat.com>,
Steven Rostedt <rostedt@...dmis.org>,
linux-kernel@...r.kernel.org,
Pavankumar Kondeti <pkondeti@...eaurora.org>,
Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
Uwe Kleine-Konig <u.kleine-koenig@...gutronix.de>,
Quentin Perret <quentin.perret@....com>
Subject: Re: [PATCH v2 4/7] sched: Add pelt_rq tracepoint
On 5/13/19 2:48 PM, Qais Yousef wrote:
> On 05/13/19 14:14, Peter Zijlstra wrote:
>> On Fri, May 10, 2019 at 12:30:10PM +0100, Qais Yousef wrote:
>>
>>> +DECLARE_TRACE(pelt_rq,
>>> + TP_PROTO(int cpu, const char *path, struct sched_avg *avg),
>>> + TP_ARGS(cpu, path, avg));
>>> +
>>
>>> +static __always_inline void sched_trace_pelt_cfs_rq(struct cfs_rq *cfs_rq)
>>> +{
>>> + if (trace_pelt_rq_enabled()) {
>>> + int cpu = cpu_of(rq_of(cfs_rq));
>>> + char path[SCHED_TP_PATH_LEN];
>>> +
>>> + cfs_rq_tg_path(cfs_rq, path, SCHED_TP_PATH_LEN);
>>> + trace_pelt_rq(cpu, path, &cfs_rq->avg);
>>> + }
>>> +}
>>> +
>>> +static __always_inline void sched_trace_pelt_rt_rq(struct rq *rq)
>>> +{
>>> + if (trace_pelt_rq_enabled()) {
>>> + int cpu = cpu_of(rq);
>>> +
>>> + trace_pelt_rq(cpu, NULL, &rq->avg_rt);
>>> + }
>>> +}
>>> +
>>> +static __always_inline void sched_trace_pelt_dl_rq(struct rq *rq)
>>> +{
>>> + if (trace_pelt_rq_enabled()) {
>>> + int cpu = cpu_of(rq);
>>> +
>>> + trace_pelt_rq(cpu, NULL, &rq->avg_dl);
>>> + }
>>> +}
>>
>> Since it is only the one real tracepoint, how do we know which avg is
>> which?
>
> Good question. I missed that to be honest since we are mainly interested in cfs
> and I was focused into not adding too many tracepoints..
>
> I'm happy to create a tracepoint per class assuming that's what you're
> suggesting.
IMHO, you should also consider irq (rq->avg_irq), so when people are
tracing asystem with 'IRQ' or 'paravirtual steal' time accounting, they
will get the full picture.
Powered by blists - more mailing lists