From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22264 invoked by alias); 25 Oct 2006 18:54:15 -0000 Received: (qmail 22256 invoked by uid 22791); 25 Oct 2006 18:54:14 -0000 X-Spam-Status: No, hits=-1.5 required=5.0 tests=AWL,BAYES_20 X-Spam-Check-By: sourceware.org Received: from mga01.intel.com (HELO mga01.intel.com) (192.55.52.88) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 25 Oct 2006 18:54:08 +0000 Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by mga01.intel.com with ESMTP; 25 Oct 2006 11:54:05 -0700 Received: from scsmsx331.sc.intel.com (HELO scsmsx331.amr.corp.intel.com) ([10.3.90.4]) by fmsmga001.fm.intel.com with ESMTP; 25 Oct 2006 11:54:05 -0700 X-ExtLoop1: 1 X-IronPort-AV: i="4.09,357,1157353200"; d="scan'208"; a="151955657:sNHT20617030" Received: from scsmsx413.amr.corp.intel.com ([10.3.90.32]) by scsmsx331.amr.corp.intel.com with Microsoft SMTPSVC(6.0.3790.211); Wed, 25 Oct 2006 11:54:04 -0700 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: RE: precompiled probing scenarios Date: Wed, 25 Oct 2006 18:54:00 -0000 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: precompiled probing scenarios Thread-Index: Acb3f3grF9h1Iel/Sl+FWejxqqTGxwA3loWQ From: "Stone, Joshua I" To: "David Smith" Cc: X-OriginalArrivalTime: 25 Oct 2006 18:54:04.0826 (UTC) FILETIME=[F17977A0:01C6F866] X-IsSubscribed: yes 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-q4/txt/msg00246.txt.bz2 On Tuesday, October 24, 2006 8:17 AM, David Smith wrote: > Stone, Joshua I wrote: >> 1. probe begin { exit() } >> 2. probe begin { exit(); } >>=20 >> 4. probe begin, end { exit() } >> 5. probe end, begin { exit() } >=20 > Hmm. Just for fun, I decided to see if the pass 3 output of [1. 2.] > or [4. 5.] would compare equally. They don't. That's partly my point. Those pairings are functionally equivalent, right? So why should the code we generate show any differences? The difference between 1 & 2 is basically just the line "/* null */;" in the probe's generated C -- a useless statement. Between 4 & 5 the only difference is whether the begin or end is generated first. Because these differences are insignificant, we should be able to treat them the same for caching purposes. Another normalization example is with braces: 6. probe begin { if(foo) exit() } 7. probe begin { if(foo) { exit() } } 8. probe begin { if(foo) { { exit() } } } My hope is that someday the translator will also treat less obvious cases like these as identical: 9. probe begin { log("foo") } 10. probe begin { if(1) log("foo") } 11. probe begin { i=3D1; if(i) log("foo") } 12. probe begin { while(!i++) log("foo") } This has more to do with optimization of the generated code, but it could help caching if the optimization is done before pass-2 output. Josh