Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932145AbWIVAnO (ORCPT ); Thu, 21 Sep 2006 20:43:14 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932146AbWIVAnO (ORCPT ); Thu, 21 Sep 2006 20:43:14 -0400 Received: from gw.goop.org ([64.81.55.164]:31146 "EHLO mail.goop.org") by vger.kernel.org with ESMTP id S932145AbWIVAnN (ORCPT ); Thu, 21 Sep 2006 20:43:13 -0400 Message-ID: <451331A1.3020601@goop.org> Date: Thu, 21 Sep 2006 17:43:13 -0700 From: Jeremy Fitzhardinge User-Agent: Thunderbird 1.5.0.7 (X11/20060913) MIME-Version: 1.0 To: Mathieu Desnoyers CC: Martin Bligh , "Frank Ch. Eigler" , Masami Hiramatsu , prasanna@in.ibm.com, Andrew Morton , Ingo Molnar , Mathieu Desnoyers , Paul Mundt , linux-kernel , Jes Sorensen , Tom Zanussi , Richard J Moore , Michel Dagenais , Christoph Hellwig , Greg Kroah-Hartman , Thomas Gleixner , William Cohen , ltt-dev@shafik.org, systemtap@sources.redhat.com, Alan Cox Subject: Re: [PATCH] Linux Kernel Markers 0.7 for 2.6.17 (with type checking!) References: <20060921232024.GA16155@Krystal> In-Reply-To: <20060921232024.GA16155@Krystal> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 871 Lines: 26 Mathieu Desnoyers wrote: > +#ifdef CONFIG_MARK_SYMBOL > +#define MARK_SYM(name) \ > + do { \ > + __label__ here; \ > + here: asm volatile \ > + (MARK_KPROBE_PREFIX#name " = %0" : : "m" (*&&here)); \ > + } while(0) > +#else > +#define MARK_SYM(name) > +#endif BTW, this won't work if you put the MARK_SYM in a loop which gcc unrolls; you'll only get the mark in the last unrolled iteration (because the symbol assignments will override each other). Do make this work properly, you really need to put the mark entries into a separate section, so that if gcc duplicates the code, you get duplicated markers too. J - 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/