lkml.org 
[lkml]   [2019]   [May]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 4/7] sched: Add sched_load_rq tracepoint
From
Date
Hi Qais,

On 5/5/19 1:57 PM, Qais Yousef wrote:

[...]

> diff --git a/kernel/sched/sched_tracepoints.h b/kernel/sched/sched_tracepoints.h
> new file mode 100644
> index 000000000000..f4ded705118e
> --- /dev/null
> +++ b/kernel/sched/sched_tracepoints.h
> @@ -0,0 +1,39 @@
> +/* SPDX-License-Identifier: GPL-2.0 */
> +/*
> + * Scheduler tracepoints that are probe-able only and aren't exported ABI in
> + * tracefs.
> + */
> +
> +#include <trace/events/sched.h>
> +
> +#define SCHED_TP_PATH_LEN 64
> +
> +
> +static __always_inline void sched_tp_load_cfs_rq(struct cfs_rq *cfs_rq)
> +{
> + if (trace_sched_load_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_sched_load_rq(cpu, path, &cfs_rq->avg);

This will let a !CONFIG_SMP build fail.

> + }
> +}
> +
> +static __always_inline void sched_tp_load_rt_rq(struct rq *rq)
> +{
> + if (trace_sched_load_rq_enabled()) {
> + int cpu = cpu_of(rq);
> +
> + trace_sched_load_rq(cpu, NULL, &rq->avg_rt);

Same here.

> + }
> +}
> +
> +static __always_inline void sched_tp_load_dl_rq(struct rq *rq)
> +{
> + if (trace_sched_load_rq_enabled()) {
> + int cpu = cpu_of(rq);
> +
> + trace_sched_load_rq(cpu, NULL, &rq->avg_dl);

and here.

\
 
 \ /
  Last update: 2019-05-10 10:52    [W:0.144 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site