From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10186 invoked by alias); 14 Jul 2008 16:28:23 -0000 Received: (qmail 10177 invoked by uid 22791); 14 Jul 2008 16:28:23 -0000 X-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_73,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 14 Jul 2008 16:28:06 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id m6EGRuCS001314; Mon, 14 Jul 2008 12:27:56 -0400 Received: from mail.boston.redhat.com (mail.boston.redhat.com [10.16.255.12]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id m6EGRr4i003000; Mon, 14 Jul 2008 12:27:53 -0400 Received: from [10.16.10.50] (vpn-10-50.bos.redhat.com [10.16.10.50]) by mail.boston.redhat.com (8.13.1/8.13.1) with ESMTP id m6EGRqRV019256; Mon, 14 Jul 2008 12:27:53 -0400 Message-ID: <487B7E37.9050600@redhat.com> Date: Mon, 14 Jul 2008 16:28:00 -0000 From: Masami Hiramatsu User-Agent: Thunderbird 2.0.0.14 (X11/20080501) MIME-Version: 1.0 To: James Bottomley CC: Theodore Tso , "Frank Ch. Eigler" , linux-kernel , systemtap@sourceware.org, Mathieu Desnoyers Subject: Re: [PATCH] simple dprobe like markers for the kernel References: <1215638551.3444.39.camel__22002.9595810503$1215638656$gmane$org@localhost.localdomain> <1215697794.3353.5.camel@localhost.localdomain> <20080710142208.GC1213@redhat.com> <1215700996.3353.30.camel@localhost.localdomain> <20080710153017.GB25939@mit.edu> <1215886965.3360.16.camel@localhost.localdomain> In-Reply-To: <1215886965.3360.16.camel@localhost.localdomain> X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=ISO-2022-JP Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.58 on 172.16.52.254 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: 2008-q3/txt/msg00162.txt.bz2 Hi James, James Bottomley wrote: > This is just an incremental update based on feedback. The most > significant was that making the marker a compiler barrier will free the > inserter from worrying about the mark sliding around changes to named > variables (and thus having to worry about this in placement) at > practically zero optimisation cost. I also updated the code to drop and > asm section instead of using the static variable scheme. I also added > documentation and made the module loader ignore them (since modules > don't go through the vmlinux.lds transformations). I'm very interested in your approach. IMHO, as Aoki investigated, the overhead of markers is not so big unless we put a lot of them into kernel. And from "active" overhead point of view, it takes less than tens of nano-seconds, while kprobes takes hundreds of nano-seconds. Kprobe also has a limitation of probable points, it can't probe "__kprobes" marked functions. So, original markers still has advantages. However, your approach is also useful, especially for embedding thousands of markers in kernel or drivers. So I think it's better to use both of them as the situation demands. I just have one comment on its name. Since it doesn't trace anything, so I'd rather like notation() or note_mark() than trace_simple(). :-) Thank you, > > I also added a simple versioning scheme (basically tack the version on > to the end of the section name). It can be used simply and even > provides backwards compatibility (just emit the old and the new > sections). > > If everyone's happy with this, I'll follow it up with the systemtap > changes to make use of them ... they've been incredibly helpful > debugging some of the CDROM problems for me so far. > > James -- Masami Hiramatsu Software Engineer Hitachi Computer Products (America) Inc. Software Solutions Division e-mail: mhiramat@redhat.com