public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
From: "Stone, Joshua I" <joshua.i.stone@intel.com>
To: "David Smith" <dsmith@redhat.com>
Cc: <systemtap@sources.redhat.com>
Subject: RE: precompiled probing scenarios
Date: Wed, 25 Oct 2006 18:54:00 -0000	[thread overview]
Message-ID: <C56DB814FAA30B418C75310AC4BB279DD41D4A@scsmsx413.amr.corp.intel.com> (raw)

On Tuesday, October 24, 2006 8:17 AM, David Smith wrote:
> Stone, Joshua I wrote:
>> 1. probe begin { exit() }
>> 2. probe begin { exit(); }
>> 
>> 4. probe begin, end { exit() }
>> 5. probe end, begin { exit() }
> 
> 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=1; 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

             reply	other threads:[~2006-10-25 18:54 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-25 18:54 Stone, Joshua I [this message]
2006-10-26  1:07 ` Frank Ch. Eigler
  -- strict thread matches above, loose matches on Subject: below --
2006-10-24  0:29 Stone, Joshua I
2006-10-24 15:16 ` David Smith
2006-10-20 20:51 Stone, Joshua I
2006-10-20 18:44 Stone, Joshua I
2006-10-20 19:26 ` David Smith
2006-10-20 19:32   ` Frank Ch. Eigler
2006-10-20 19:50     ` David Smith
2006-10-20 20:13       ` Frank Ch. Eigler
2006-10-23 20:36         ` David Smith
2006-10-19 20:33 Stone, Joshua I
2006-10-19 20:41 ` David Smith
2006-10-06 19:08 Frank Ch. Eigler
2006-10-06 20:33 ` David Smith
2006-10-06 20:40   ` Frank Ch. Eigler
2006-10-19 19:49     ` David Smith
2006-10-19 21:53       ` Frank Ch. Eigler
2006-10-20 13:50         ` David Smith

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=C56DB814FAA30B418C75310AC4BB279DD41D4A@scsmsx413.amr.corp.intel.com \
    --to=joshua.i.stone@intel.com \
    --cc=dsmith@redhat.com \
    --cc=systemtap@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).