Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758998AbZKZHix (ORCPT ); Thu, 26 Nov 2009 02:38:53 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1757503AbZKZHix (ORCPT ); Thu, 26 Nov 2009 02:38:53 -0500 Received: from hrndva-omtalb.mail.rr.com ([71.74.56.124]:55080 "EHLO hrndva-omtalb.mail.rr.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752512AbZKZHiw (ORCPT ); Thu, 26 Nov 2009 02:38:52 -0500 Subject: Re: [PATCH 2/9] tracing: Convert some kmem events to DEFINE_EVENT From: Steven Rostedt Reply-To: rostedt@goodmis.org To: Pekka Enberg Cc: Li Zefan , Ingo Molnar , Frederic Weisbecker , LKML , Mel Gorman In-Reply-To: <4B0E2D3A.1030509@cs.helsinki.fi> References: <4B0E2807.4060102@cn.fujitsu.com> <4B0E286A.2000405@cn.fujitsu.com> <4B0E2D3A.1030509@cs.helsinki.fi> Content-Type: text/plain Organization: Kihon Technologies Inc. Date: Thu, 26 Nov 2009 02:38:57 -0500 Message-Id: <1259221137.21397.80.camel@gandalf.stny.rr.com> Mime-Version: 1.0 X-Mailer: Evolution 2.26.3 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1228 Lines: 30 On Thu, 2009-11-26 at 09:24 +0200, Pekka Enberg wrote: > I have no idea what TRACE_EVENT_TEMPLATE is but the space savings are > convincing enough! I assume this is going into -tip? TRACE_EVENT_TEMPLATE acts just like TRACE_EVENT but it does not create the trace point. It does create general functions described by the template. These are the functions to record data and how to print that data, and show its format to userspace. DEFINE_EVENT is used to hook an actual trace point up with the functions created by the template. There are a lot of events that are almost identical except for their names. Using TRACE_EVENT() itself will create the functions to record the data, print it, and show the format for each event, even though most of these events are identical except for the name. Christoph Hellwig was killed by this, since he had hundreds of TRACE_EVENTS all with the same data. After converting it to the templates, he saved a hell of a lot of space. -- Steve -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/