From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754570AbbHCRec (ORCPT ); Mon, 3 Aug 2015 13:34:32 -0400 Received: from smtprelay0040.hostedemail.com ([216.40.44.40]:37710 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752171AbbHCReb (ORCPT ); Mon, 3 Aug 2015 13:34:31 -0400 X-Session-Marker: 726F737465647440676F6F646D69732E6F7267 X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,rostedt@goodmis.org,:::::::::,RULES_HIT:41:355:379:541:599:800:960:973:988:989:1260:1277:1311:1313:1314:1345:1359:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2393:2553:2559:2562:2918:3138:3139:3140:3141:3142:3352:3622:3865:3867:3871:3872:3874:4250:4321:5007:6119:6261:7514:7829:7875:7903:8784:10004:10400:10848:10967:11026:11232:11473:11658:11914:12043:12296:12517:12519:12555:12740:13069:13311:13357:14096:14097:21080,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0 X-HE-Tag: cream19_272a19effb01c X-Filterd-Recvd-Size: 2290 Date: Mon, 3 Aug 2015 13:34:28 -0400 From: Steven Rostedt To: yangoliver Cc: mingo@redhat.com, linux-kernel@vger.kernel.org, Yong Yang , Peter Zijlstra Subject: Re: [PATCH 1/2] sched: Some sched trace points should depend on SCHEDSTATS Message-ID: <20150803133428.5fd137ec@gandalf.local.home> In-Reply-To: References: X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.28; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 27 Jul 2015 09:11:51 -0400 yangoliver wrote: > When SCHEDSTATS is not enabled, follow trace points shouldn't be > accessed by default, > > sched:sched_stat_wait > sched:sched_stat_sleep > sched:sched_stat_iowait > sched:sched_stat_blocked > > These trace points should only be available when SCHEDSTATS is > enabled. > > Signed-off-by: Yong Yang > --- > include/trace/events/sched.h | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/include/trace/events/sched.h b/include/trace/events/sched.h > index d57a575..5b34309 100644 > --- a/include/trace/events/sched.h > +++ b/include/trace/events/sched.h > @@ -334,6 +334,7 @@ DECLARE_EVENT_CLASS(sched_stat_template, > ); > > > +#ifdef CONFIG_SCHEDSTATS Why not also surround the sched_stat_template too? That also creates code even if no event uses it. -- Steve > /* > * Tracepoint for accounting wait time (time the task is runnable > * but not actually running due to scheduler contention). > @@ -364,6 +365,7 @@ DEFINE_EVENT(sched_stat_template, sched_stat_iowait, > DEFINE_EVENT(sched_stat_template, sched_stat_blocked, > TP_PROTO(struct task_struct *tsk, u64 delay), > TP_ARGS(tsk, delay)); > +#endif > > /* > * Tracepoint for accounting runtime (time the task is executing