From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752671Ab0ICPmI (ORCPT ); Fri, 3 Sep 2010 11:42:08 -0400 Received: from mail-fx0-f46.google.com ([209.85.161.46]:47504 "EHLO mail-fx0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752104Ab0ICPmF (ORCPT ); Fri, 3 Sep 2010 11:42:05 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=iGsXs1HH2EWyuQWeBMALoknuNqPbFmOd8w2hDPlqLanYbzXBNjB1NVKfoUIcL5TQfh 0E6qqTQyIVqFk5m3aw1akoUCcxEp7d3Tb3PIBC65LgmJJsr/6G0ka/U5aEetGLgBmGef lonjY9R+zPHMC+zhEc1cXPfKhmJs/g2ftRW8E= Date: Fri, 3 Sep 2010 17:42:08 +0200 From: Frederic Weisbecker To: Steven Rostedt Cc: Koki Sanagi , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, davem@davemloft.net, kaneshige.kenji@jp.fujitsu.com, izumi.taku@jp.fujitsu.com, kosaki.motohiro@jp.fujitsu.com, nhorman@tuxdriver.com, laijs@cn.fujitsu.com, scott.a.mcmillan@intel.com, eric.dumazet@gmail.com, mathieu.desnoyers@polymtl.ca Subject: Re: [PATCH v4 1/5] irq: add tracepoint to softirq_raise Message-ID: <20100903154206.GB5352@nowhere> References: <4C72422C.5070102@jp.fujitsu.com> <4C724298.4050509@jp.fujitsu.com> <20100903152909.GA5352@nowhere> <1283528376.2356.436.camel@gandalf.stny.rr.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1283528376.2356.436.camel@gandalf.stny.rr.com> User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 03, 2010 at 11:39:36AM -0400, Steven Rostedt wrote: > On Fri, 2010-09-03 at 17:29 +0200, Frederic Weisbecker wrote: > > > > #define softirq_name(sirq) { sirq##_SOFTIRQ, #sirq } > > > #define show_softirq_name(val) \ > > > @@ -93,7 +95,10 @@ DECLARE_EVENT_CLASS(softirq, > > > ), > > > > > > TP_fast_assign( > > > - __entry->vec = (int)(h - vec); > > > + if (vec) > > > + __entry->vec = (int)(h - vec); > > > + else > > > + __entry->vec = *((int *)h); > > > ), > > > > > > > > It seems that this will break softirq_entry/exit tracepoints. > > __entry->vec will deref vec->action() for these two, which is not > > what we want. > > But for trace_softirq_entry and trace_softirq_exit, vec will not be > NULL. Oh right... /me slaps his forehead > > > > > If you can't have the same tracepoint signature for the three, just > > split the new one in a seperate TRACE_EVENT(). > > It may be a bit of a hack, and questionable about adding another > TRACE_EVENT(). There still is a pretty good space savings in using > DEFINE_EVENT() over TRACE_EVENT() though. Yeah, let's keep it as is.