From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753504AbdJLWoq (ORCPT ); Thu, 12 Oct 2017 18:44:46 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:58250 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752893AbdJLWop (ORCPT ); Thu, 12 Oct 2017 18:44:45 -0400 Date: Thu, 12 Oct 2017 15:44:41 -0700 From: "Paul E. McKenney" To: Steven Rostedt Cc: LKML , Andrew Morton Subject: Re: [PATCH] tracing, rcu: Hide trace event rcu_nocb_wake when not used Reply-To: paulmck@linux.vnet.ibm.com References: <20171012181641.2461934d@gandalf.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171012181641.2461934d@gandalf.local.home> User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-GCONF: 00 x-cbid: 17101222-0040-0000-0000-000003B228C7 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00007887; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000236; SDB=6.00930264; UDB=6.00468279; IPR=6.00710530; BA=6.00005635; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00017513; XFM=3.00000015; UTC=2017-10-12 22:44:43 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17101222-0041-0000-0000-000007A72B79 Message-Id: <20171012224441.GP3521@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-10-12_10:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1707230000 definitions=main-1710120320 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Oct 12, 2017 at 06:16:41PM -0400, Steven Rostedt wrote: > From: Steven Rostedt (VMware) > > The trace event rcu_nocb_wake is only used when CONFIG_RCU_NOCB_CPU is > defined. But the trace event is defined regardless. As defined trace > events take up memory, it is a waste to have it defined when not used. > Surround the trace event with an #ifdef to have it only defined when it > is used. > > Signed-off-by: Steven Rostedt (VMware) And this one applied cleanly, queued for review and testing, thank you! Thanx, Paul > --- > Index: linux-trace.git/include/trace/events/rcu.h > =================================================================== > --- linux-trace.git.orig/include/trace/events/rcu.h > +++ linux-trace.git/include/trace/events/rcu.h > @@ -242,6 +242,7 @@ TRACE_EVENT(rcu_exp_funnel_lock, > __entry->grphi, __entry->gpevent) > ); > > +#ifdef CONFIG_RCU_NOCB_CPU > /* > * Tracepoint for RCU no-CBs CPU callback handoffs. This event is intended > * to assist debugging of these handoffs. > @@ -284,6 +285,7 @@ TRACE_EVENT(rcu_nocb_wake, > > TP_printk("%s %d %s", __entry->rcuname, __entry->cpu, __entry->reason) > ); > +#endif > > /* > * Tracepoint for tasks blocking within preemptible-RCU read-side >