Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp4851436imb; Thu, 7 Mar 2019 01:57:30 -0800 (PST) X-Google-Smtp-Source: APXvYqw5WRYYqu7sXrnczsYf6ZK/+8dLFsD54bB5+CiMGTenBTv5zU8Z7oEl1T5uWkL35PjMUeUm X-Received: by 2002:a62:bd17:: with SMTP id a23mr11764620pff.233.1551952650514; Thu, 07 Mar 2019 01:57:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551952650; cv=none; d=google.com; s=arc-20160816; b=YeVFobpd9ErOdQ2wQI37ZATlW21+uc0Z9j4KAEZaTkYldgG3MlPv/hGdVurolYZEPP QCByMqMi5ioL2NKhioARhofFPfKc46jE/dyFOxs0qM1s6Dc1//+YfvwDuPRBwxPfbwhQ OtBBEEThWK3ayNm1fIRDwqwzR7TN+JIQiQ6gRhY+ZU3oE6gYozZFjAgddkQL9D3kpbfL gMBJcOMTos8y3ysowWBYy/bb5QwOApd4xJ4UBcueoysSVRrt5adh7Bg0ID4h9JQ5A7qo ZKGuk5N/tuORGiw0yBYWvviXXJZYiQQ4hiHg/CZ0V/UWewx28EDNI4Pal9VlOWIeWQ3b mmsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=3KyYg6XzXq03jSbFgxzIANsLy4hwtpzsWBAcpbUBTw4=; b=jcwxH6rU2GBPNf4cWktsozO5qhVxhZu/QeNGOV8LgxWnb1v2k/jAzSdu5R+LPlwfNj Gm3urqsEF0mQwFAUfTQu+mBh3b3F29KAcWPHR4lx2TGYD/wqFOuhKKz5kfQpsX9CFKdR 9ZBqjLetzQ5Oei6FGf35Lh5Kuuh66w28SEIGqBgm22UUojRKOinR2hk/ZREEEhrwgFFL 2HPS8fT4jWUxFzc9SHS7KOoXbufk0P5oQ3f2E59mjpDrs3DCIaqWQOUF9UAHxY2G7y3u v1fWx/c6pLIHVwyvK8PaBRon0XI+3LwTz/DbKvAzdbBurLsmvRlC+8kzRdjZCjzreq3J Bgsg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=FLIEkJR6; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m2si3750411plt.394.2019.03.07.01.57.14; Thu, 07 Mar 2019 01:57:30 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=FLIEkJR6; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726285AbfCGJzK (ORCPT + 99 others); Thu, 7 Mar 2019 04:55:10 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:57168 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725747AbfCGJzJ (ORCPT ); Thu, 7 Mar 2019 04:55:09 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=3KyYg6XzXq03jSbFgxzIANsLy4hwtpzsWBAcpbUBTw4=; b=FLIEkJR6kXMN+/F+CBCUoBpbl WoY78KjtNDL8Dl72ErAwpOmWvz1HqbrUf7AkRrB2bhalCQ/UZQs+tMVMmLodQIKepLQWTni5JwrN5 74JracZzYpKo0SovpUsiJfUvnXskLqVkf2Cy9Z2ktUGxFNCcUxNf+fdEWx1ZvGU0Wn6aing2uiTfo RZL4I13FxlqwEOcvphSdKPJGiT2O0c8vrAQI9upyHua0p/YsKqaND40rGbTGTkM+FzgnJqfDIcXqb 8yFTeKDGwAEtxn7z0wAyLYss74ZuMdZ3Jv41YfxIqqYWiXTOABqvZ2QW0QQdxGoalzDq34Qt37yt1 tCeICQYUg==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1h1pk2-0001DR-Pd; Thu, 07 Mar 2019 09:55:06 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 40E2420297ED1; Thu, 7 Mar 2019 10:55:03 +0100 (CET) Date: Thu, 7 Mar 2019 10:55:03 +0100 From: Peter Zijlstra To: Yafang Shao Cc: mingo@redhat.com, LKML , shaoyafang@didiglobal.com Subject: Re: [PATCH] sched: fair: fix missed CONFIG_SCHEDSTATS Message-ID: <20190307095503.GB32477@hirez.programming.kicks-ass.net> References: <1551861826-12592-1-git-send-email-laoar.shao@gmail.com> <20190306100907.GT32477@hirez.programming.kicks-ass.net> <20190306112707.GU32477@hirez.programming.kicks-ass.net> <20190306123834.GW32494@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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