From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 426 invoked by alias); 10 Aug 2006 20:18:30 -0000 Received: (qmail 419 invoked by uid 22791); 10 Aug 2006 20:18:29 -0000 X-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_20,SPF_HELO_PASS,SPF_PASS,UNPARSEABLE_RELAY 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; Thu, 10 Aug 2006 20:18:27 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id k7AKIOH6022815 for ; Thu, 10 Aug 2006 16:18:24 -0400 Received: from pobox.toronto.redhat.com (pobox.toronto.redhat.com [172.16.14.4]) by int-mx1.corp.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id k7AKIJ1x012386 for ; Thu, 10 Aug 2006 16:18:19 -0400 Received: from touchme.toronto.redhat.com (IDENT:postfix@touchme.toronto.redhat.com [172.16.14.9]) by pobox.toronto.redhat.com (8.12.8/8.12.8) with ESMTP id k7AKIJ0F010691 for ; Thu, 10 Aug 2006 16:18:19 -0400 Received: from ton.toronto.redhat.com (ton.toronto.redhat.com [172.16.14.15]) by touchme.toronto.redhat.com (Postfix) with ESMTP id 122CF800002 for ; Thu, 10 Aug 2006 16:18:19 -0400 (EDT) Received: from ton.toronto.redhat.com (localhost.localdomain [127.0.0.1]) by ton.toronto.redhat.com (8.13.1/8.13.1) with ESMTP id k7AKIIXZ021174 for ; Thu, 10 Aug 2006 16:18:18 -0400 Received: (from fche@localhost) by ton.toronto.redhat.com (8.13.1/8.13.1/Submit) id k7AKIIdZ021171; Thu, 10 Aug 2006 16:18:18 -0400 X-Authentication-Warning: ton.toronto.redhat.com: fche set sender to fche@redhat.com using -f To: systemtap@sources.redhat.com Subject: Re: [Bug translator/2421] translator emitting duplicate probe handlers References: <20060306140007.2421.fche@redhat.com> <20060810191939.6964.qmail@sourceware.org> From: fche@redhat.com (Frank Ch. Eigler) Date: Thu, 10 Aug 2006 20:18:00 -0000 In-Reply-To: <20060810191939.6964.qmail@sourceware.org> Message-ID: User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org X-SW-Source: 2006-q3/txt/msg00288.txt.bz2 Hi - With this code now in, it will be time for the next step of duplication elimination. I hope this will make it clear why I talked dsmith out of the earlier amazing "48k" variant mentioned in http://sourceware.org/ml/systemtap/2006-q3/msg00208.html. The next idea is to extend the translator guts to group all probes using the same lower level kernel API (kprobes / kretprobes / perfmon / any others) together. Importantly, this grouping would *not* be based on any similarity amongst probe handler bodies, only the probe points! The goal of this method is to give a new layer of translator code the chance to emit a single combined registration, unregistration, and callback function *for each group as a whole*. (I have some C++ implementation ideas on this for the person who wants to undertake the work.) Among other things, this sort of grouping is required for perfmon. When/if the kprobes API allows mass registration/unregistration, this will readily exploit it. (It is a shame that the modules_get_byname() code was boo'd by essentially one ignorant critic, since by sorting/grouping all kprobes in the translator, we could most efficiently perform the necessary relocation / locking and still retain full generality.) In any case, the result should be the elimination of even more duplication compared to the "48k" variant. It should approximate the conceptual minimum amount of code required for the probe<->kernel glue. Finally, if it is still economical to do so, some effort may be directed toward improving the code for ordinary statements/expressions. Then we will be "done". - FChE