Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp4877841imb; Thu, 7 Mar 2019 02:43:03 -0800 (PST) X-Google-Smtp-Source: APXvYqy/vzSCcDLaSQiMsOfrPC4x0mEVSOuFbxjQeiTMXmh61yrZce9SEVIfdT5p+kknyNeV1UcZ X-Received: by 2002:a63:4a20:: with SMTP id x32mr10950852pga.429.1551955383355; Thu, 07 Mar 2019 02:43:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551955383; cv=none; d=google.com; s=arc-20160816; b=vHB5/N2vWwrT6XsQ5NeaOCfioW7yDIFGQfPRu6bYBzeZTp3e5YRTBbIq159XQrs+Hl PqDrJ+t3QK1PR8OXZ0/9vk0WpwLKKSt7hdP0Bln9JltEr61Z1UFNXV85mrw8f7zU7RfJ zHM2jF3cmGRKSouFISIcFlhM0pGnxaWIUr+UEt1slApih/UcT0DeMGmGzYPTLpPllX0G N2wdfkd9O4qRIktPdOHX+aZ+uCNHWc5WGs+JGVmkhPyT0lKxjjAx36khoH+IzmYCuoiD d5nHgs0DD1iGjK2Z25HiIWoHsbBVIzqc7mIgok/piLgm/Ni3KLtG+n3W6gw9VjPYgTeP 5hbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=bNzxaUBFCuWMw4UYu3dTOexqnAYkS2Ak/v1V9Gxnfr4=; b=El7A1RS5MecwGonLkprvQa8k/IvxqJ0yfuXRGmoqsBZYMtyuxEboZ0spRNWlSKQWZP 8YEcPyjtm5JUWlpW7dxKmKSk7r35D9U/58HGgibhnBt2dCKNyhPZmTYr8tdqZtpfPHsE rJHfkp6XeXVhgy6wYqfbfl77xAXHeaT2yEfHHMx/5ghnMD9ijUuIqrH4T71KOhRdaJJL 4ugV0PnhQKAfQvlw4CqMXQ6EfZx4b2yDiQ0lEjg5YD8pJgGD88XarYprkhLVpVtH7f3b qpXsIe2CdcwNTCtyoplnqWt0X6i0AWEAEBdtRVxW22cFMFP3SaEZzlRd01nDPWzD8SzJ fONg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=vA5fQHXm; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j2si3871065plk.220.2019.03.07.02.42.47; Thu, 07 Mar 2019 02:43:03 -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=pass header.i=@gmail.com header.s=20161025 header.b=vA5fQHXm; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726358AbfCGKmI (ORCPT + 99 others); Thu, 7 Mar 2019 05:42:08 -0500 Received: from mail-io1-f67.google.com ([209.85.166.67]:37567 "EHLO mail-io1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726015AbfCGKmH (ORCPT ); Thu, 7 Mar 2019 05:42:07 -0500 Received: by mail-io1-f67.google.com with SMTP id v10so13043519iop.4 for ; Thu, 07 Mar 2019 02:42:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=bNzxaUBFCuWMw4UYu3dTOexqnAYkS2Ak/v1V9Gxnfr4=; b=vA5fQHXmekAPkeudw1zG3Qx0NgzpPHqfMvl0ya58rTCkJXuZaugYscnPWXeMQ1sqzH z/wvrnSN/EsejLbIGxk2HNBq+Fs25MdHgf/BLTRAyNW0YQGhcamnkRvxx//RDDSUetEK pAlBbQbBqnu7PVEB6G7obFiKNElcV9ZiIF5E/2bRNh6mWiHRRPA1odHFqlkMVuzPE6H2 b8VCB2oROWUWju46vhopniWB8O0Q9eTTV2i8PRycTmUmX9CLeD1zK1hUtycHz2kciqwR mQdWAzpvKZkNLu8twIbD+g8a+0UfGVlhmrCW+YB9skUtQRErh2gDNBrBNDl0+U2KuyDB vc4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=bNzxaUBFCuWMw4UYu3dTOexqnAYkS2Ak/v1V9Gxnfr4=; b=iW1IPu+lAODYxLXw9ZrwRxWfK5E88EZ70mVRlMocbmory8z56y6o1TLoyQB6WUwusw GQOKnAwQlB+4wWyetpESs8B2iyyu50f7GBYbMUsheOLBTzXSzH5lhMrOfwryCghjleNW IzA9s2i9P4milmS+VkPRFJxRKDSOtDYKNb8+daBA1JJHLJfao4tZcFGyRGT1YU61Qb5r V9j5AfFqy2ApaetiHUVtSx9O3eTub6fqC02OXjiAmWYijBrjfa6Yo9Qbt6t3Gnm8KYrF W0yp4nW7/zzsTwetL1y1jyAKbPbc+bfEEU8okB8dKdhvQ/+XOuqr1Y30QtPEPXPSrtlu sp2w== X-Gm-Message-State: APjAAAXVU/qD6FJMep/FeL8+QIx2iTk8cquUifd09NssOzKkveGlU7l9 8QnShJ5s2kIvNoWS82pG/RzjNufSTFhxlKbI8yl/KA== X-Received: by 2002:a6b:5802:: with SMTP id m2mr5504295iob.142.1551955326595; Thu, 07 Mar 2019 02:42:06 -0800 (PST) MIME-Version: 1.0 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> <20190307095503.GB32477@hirez.programming.kicks-ass.net> In-Reply-To: <20190307095503.GB32477@hirez.programming.kicks-ass.net> From: Yafang Shao Date: Thu, 7 Mar 2019 18:41:30 +0800 Message-ID: Subject: Re: [PATCH] sched: fair: fix missed CONFIG_SCHEDSTATS To: Peter Zijlstra Cc: mingo@redhat.com, LKML , shaoyafang@didiglobal.com Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 7, 2019 at 5:55 PM Peter Zijlstra wrote: > > 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. > Sure. Will change it. Thanks Yafang