lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 7 Mar 2019 10:55:03 +0100
From:   Peter Zijlstra <peterz@...radead.org>
To:     Yafang Shao <laoar.shao@...il.com>
Cc:     mingo@...hat.com, LKML <linux-kernel@...r.kernel.org>,
        shaoyafang@...iglobal.com
Subject: Re: [PATCH] sched: fair: fix missed CONFIG_SCHEDSTATS

On Thu, Mar 07, 2019 at 03:49:58PM +0800, Yafang Shao wrote:
> What about your opinon ?
> 
> 
> diff --git a/include/trace/events/sched.h b/include/trace/events/sched.h
> index 9a4bdfa..a0291f2 100644
> --- a/include/trace/events/sched.h
> +++ b/include/trace/events/sched.h
> @@ -336,6 +336,7 @@ static inline long __trace_sched_switch_state(bool
> preempt, struct task_struct *
>                   __entry->pid, __entry->old_pid)
>  );
> 
> +#ifdef CONFIG_SCHEDSTATS
>  /*
>   * XXX the below sched_stat tracepoints only apply to SCHED_OTHER/BATCH/IDLE
>   *     adding sched_stat support to SCHED_FIFO/RR would be welcome.
> @@ -394,6 +395,14 @@ static inline long
> __trace_sched_switch_state(bool preempt, struct task_struct *
>  DEFINE_EVENT(sched_stat_template, sched_stat_blocked,
>              TP_PROTO(struct task_struct *tsk, u64 delay),
>              TP_ARGS(tsk, delay));
> +#else
> +
> +#define trace_sched_stat_wait(...) do {} while (0)
> +#define trace_sched_stat_sleep(...) do {} while (0)
> +#define trace_sched_stat_iowait(...) do {} while (0)
> +#define trace_sched_stat_blocked(...) do {} while (0)

Make those inline functions that take proper arguments.

> +#endif

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ