From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25416 invoked by alias); 16 Feb 2007 04:01:21 -0000 Received: (qmail 25409 invoked by uid 22791); 16 Feb 2007 04:01:21 -0000 X-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,FORGED_RCVD_HELO X-Spam-Check-By: sourceware.org Received: from tomts5.bellnexxia.net (HELO tomts5-srv.bellnexxia.net) (209.226.175.25) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 16 Feb 2007 04:01:15 +0000 Received: from krystal.dyndns.org ([65.95.37.140]) by tomts5-srv.bellnexxia.net (InterMail vM.5.01.06.13 201-253-122-130-113-20050324) with ESMTP id <20070216040113.KSRI1671.tomts5-srv.bellnexxia.net@krystal.dyndns.org> for ; Thu, 15 Feb 2007 23:01:13 -0500 Received: from localhost (localhost [127.0.0.1]) (uid 1000) by krystal.dyndns.org with local; Thu, 15 Feb 2007 22:56:03 -0500 id 001C2451.45D52B53.0000497A Date: Fri, 16 Feb 2007 04:01:00 -0000 From: Mathieu Desnoyers To: Randy Dunlap Cc: Andrew Morton , linux-kernel@vger.kernel.org, Christoph Hellwig , Ingo Molnar , systemtap@sources.redhat.com, ltt-dev@shafik.org Subject: Re: [PATCH] Linux Kernel Markers Documentation Message-ID: <20070216035603.GB16075@Krystal> References: <1171224207118-git-send-email-mathieu.desnoyers@polymtl.ca> <20070214231201.20918c6b.akpm@linux-foundation.org> <20070216013348.GC12736@Krystal> <20070215174500.2b1b3bb9.randy.dunlap@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline In-Reply-To: <20070215174500.2b1b3bb9.randy.dunlap@oracle.com> X-Editor: vi X-Info: http://krystal.dyndns.org:8080 X-Operating-System: Linux/2.4.34-grsec (i686) X-Uptime: 22:54:45 up 13 days, 18:02, 5 users, load average: 1.04, 1.06, 1.06 User-Agent: Mutt/1.5.13 (2006-08-11) X-IsSubscribed: yes Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org X-SW-Source: 2007-q1/txt/msg00354.txt.bz2 Hi Randy, * Randy Dunlap (randy.dunlap@oracle.com) wrote: > so is the MARK() supposed to be: > MARK(subsystem, event, ... > > Please make the 2 doc. lines above match the parameters... > or the parameters match the text. > Fixing the paragraph below. > > +- "%d %s %p[struct task_struct]" is the formatted string for (printk-style). > > +- someint is an integer. > > +- somestring is a char pointer. > > +- current is a pointer to a struct task_struct. > > + > > +The expression %p[struct task_struct] is a suggested marker definition > > +standard that could eventually be used for pointer type checking in > > +sparse. The brackets contain the type to which the pointer refer. > refers. > > > + > > +#define SUBSYSTEM_EVENT_FORMAT "%d %s %p[struct task_struct]" > > Is SUBSYSTEM_EVENT_FORMAT used implicitly below? or elsewhere? > Yes, error follows. > > +void probe_subsystem_event(const char *format, ...) > > +{ > > + va_list ap; > > + /* Declare args */ > > + unsigned int value; > > + const char *mystr; > > + struct task_struct *task; > > + > > + /* Assign args */ > > + va_start(ap, format); > > + value = va_arg(ap, typeof(value)); > > + mystr = va_arg(ap, typeof(mystr)); > > + task = va_arg(ap, typeof(task)); > > + > > + /* Call tracer */ > > + trace_subsystem_event(value, mystr, task); > > + > > + /* Or call printk */ > > + vprintk(format, ap); > > + > > + /* or count, check rights... */ > > + > > + va_end(ap); > > +} > > + > > +static int __init probe_init(void) > > +{ > > + int result; > > + result = marker_set_probe("subsystem_event", > > + FS_CLOSE_FORMAT, > > + probe_fs_close); > > Do FS_CLOSE_FORMAT and probe_fs_close() need to be defined here? > I.e., is this a complete example? > should be SUBSYSTEM_EVENT_FORMAT. Will fix, thanks. Regards, Mathieu -- Mathieu Desnoyers Computer Engineering Ph.D. Candidate, Ecole Polytechnique de Montreal OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F BA06 3F25 A8FE 3BAE 9A68