From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 82099 invoked by alias); 20 Jul 2016 15:04:52 -0000 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 Received: (qmail 82087 invoked by uid 89); 20 Jul 2016 15:04:52 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.2 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:956, H*M:23a8, H*i:sk:2821152, H*M:9b01 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 20 Jul 2016 15:04:51 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id DA0F7C04B32B for ; Wed, 20 Jul 2016 15:04:49 +0000 (UTC) Received: from t540p.usersys.redhat.com (ovpn-116-60.rdu2.redhat.com [10.10.116.60]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u6KF4l20019941 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 20 Jul 2016 11:04:49 -0400 Subject: Re: Writing tapset functions for multiple versions To: Felix Lu References: <540973478.22718523.1468962366224.JavaMail.zimbra@redhat.com> <70bd0aff-e6bb-3131-e270-598363dfb188@redhat.com> <28211526.23172955.1469026042792.JavaMail.zimbra@redhat.com> Cc: systemtap@sourceware.org From: David Smith Message-ID: <2000cfc0-9b01-e61d-23a8-bcded4c78be4@redhat.com> Date: Wed, 20 Jul 2016 15:04:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 MIME-Version: 1.0 In-Reply-To: <28211526.23172955.1469026042792.JavaMail.zimbra@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2016-q3/txt/msg00071.txt.bz2 On 07/20/2016 09:47 AM, Felix Lu wrote: >> Are there other ways to lower the overhead? Could each probe set a >> global indexed by tid() to some value? (Or by that point would the >> string comparison you are using be about the same?) > > A global integer instead of the string comparison could be set if you > are worried about the overhead. In the example above, tid() could be > saved in the probe alias body as a private global which would be sufficient > for identifying the desired function. I'm not quite sure how saving tid() in a private global would work if you are probing more than one thread at a time. Or did I misunderstand your idea and your global is an array? If the private global is an array, now we've got 2 private global arrays (1 for version1.stp and 1 for version2.stp). -- David Smith dsmith@redhat.com Red Hat http://www.redhat.com 256.217.0141 (direct) 256.837.0057 (fax)