Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp4037107imb; Wed, 6 Mar 2019 03:47:57 -0800 (PST) X-Google-Smtp-Source: APXvYqwC0yq2KppP/jyNCpT2P/EOvEJ3UF5dSXbId+gW0sux1w9h7LAVniGB9zlAifiyqQd6Rgo3 X-Received: by 2002:a62:3001:: with SMTP id w1mr6861717pfw.59.1551872877578; Wed, 06 Mar 2019 03:47:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551872877; cv=none; d=google.com; s=arc-20160816; b=JX1ls/NdjKdLEIeuzyWDSDyVs9jtutC3TXUKWz66ZAyAsMAN5p3/mkj5MRFJyqqMdw I5mnavhIptYW//o4U6zzVTaR9N3mqGLBn9zKTxQlp414YKbEH4tGFflAlm42yM1E2pvh J4/5vmoTJbOnKv1nIqrNp9cdlx3OvEquuJrlsaNSwW0OG9vMf94Y3fOsfVaDofG7CXV0 NJj2D/Zb5UrBTmu9cAg3a7nTxScgXGBZr5yC1u8WT3h1bAYTzhDJ9xGO4HpDjdOKV/Mf OcFRXcP7OwxxA4UD/0UuWPw/wT4MwbHRXLrVQHJgcViR9ZOX7ICQ6W9yjDdQkTXMqLIC gHxQ== 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=EahDqupL8oBYszAwGCUMMzKRqHs84xSr9hfXbSuWqpQ=; b=vpRcBMsxbK88mhPsi59wo2efmj5qaj7+wu1a/DSOYkxDVJXkwOWLkBTA4Ezp1u470I dwjua3C1oMGIIGB5fvUKh34VkxL1p/nOLlYPRMYX+X/GYmpOhyvRmNGERWtO1mi1Bd5j xsL185z+gEFBWCFcMvwKPhCaNDN0WkSL3zvAwoSWA5X8WIKvWbeoQisD0fvZMyjJ8HYA V6NIa3gvV0yObbiUIUsjpfRziO19P9Sox3UBqbIoZ2BbhxASq4ekI6iZYLIRBbK6GJKC e0855KkDIYxdWuoNsCI3wJemMINW8YAGtXIfrnhw1Gan0fmawtVK0WqPKT5rUAHABB2g HBJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b="c/lwEiye"; 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 t7si1247795pgp.196.2019.03.06.03.47.42; Wed, 06 Mar 2019 03:47:57 -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=merlin.20170209 header.b="c/lwEiye"; 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 S1728951AbfCFL1Q (ORCPT + 99 others); Wed, 6 Mar 2019 06:27:16 -0500 Received: from merlin.infradead.org ([205.233.59.134]:41858 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725783AbfCFL1Q (ORCPT ); Wed, 6 Mar 2019 06:27:16 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.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=EahDqupL8oBYszAwGCUMMzKRqHs84xSr9hfXbSuWqpQ=; b=c/lwEiyez7yrEoVb/ngAtQEam IuUTHWyfv0neqEgJ2lvlFAcTAt6fZpV3bKdH4qYWmF+TqNGc5z5FJE5z/sUlh08GgqdxKueYbkpHU AgHU8KD+3SFfBZZx1gCQU2Ysg1T+G9CPSqaMjlJ+GL7mATS1ZBKEDu7Oe5GZnc58TP5jfEkoHfAl6 FKhDm4M1kwEEx5VSF+Hn66w+ON3VdFhP0/IdGi1Ye5fUtd7CN0jPS4y23lWkJxVhcocabpQeMEBD1 uVZYEKzAHqlpBcbZElPXE15SZ1fW8NwqSQ201jz0fszvoMWZtYRFJp8ZiKNX8O17cfzy2PK3W9ut5 x2ceBYSJA==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1h1UhZ-00022z-Lr; Wed, 06 Mar 2019 11:27:10 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 10CF820288BA3; Wed, 6 Mar 2019 12:27:07 +0100 (CET) Date: Wed, 6 Mar 2019 12:27:07 +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: <20190306112707.GU32477@hirez.programming.kicks-ass.net> References: <1551861826-12592-1-git-send-email-laoar.shao@gmail.com> <20190306100907.GT32477@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 Wed, Mar 06, 2019 at 06:15:39PM +0800, Yafang Shao wrote: > On Wed, Mar 6, 2019 at 6:09 PM Peter Zijlstra wrote: > > > > On Wed, Mar 06, 2019 at 04:43:46PM +0800, Yafang Shao wrote: > > > When I'm using trace_sched_stat_{iowait, blocked, wait, sleep} to > > > measure how long the processes are stalled, there's always no output from > > > trace_pipe while there're really some tasks in uninterruptible sleep > > > state. That makes me confused, so I try to investigate why. > > > Finally I find the reason is that CONFIG_SCHEDSTATS is not set. > > > > > > To avoid such kind of confusion, we should not expose these tracepoints > > > if CONFIG_SCHEDSTATS is not set. > > > > Yeah, lets not sprinkle #ifdef. Big fat NAK. > > > > Also, the below seem to indicate your compiler is stupid. Without > > CONFIG_SCHEDSTAT, schedstat_enabled() should be a constant 0 and DCE > > should delete all code. > > > > My compiler is GCC-7.3.0. > I don't know which comipler could be smart enough to remove the > definition of these tracepoints. > Could you pls. tell me what compiler you are using ? Just look at the generated code...