This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
RE: precompiled probing scenarios
- From: "Stone, Joshua I" <joshua dot i dot stone at intel dot com>
- To: "David Smith" <dsmith at redhat dot com>
- Cc: <systemtap at sources dot redhat dot com>
- Date: Mon, 23 Oct 2006 17:29:51 -0700
- Subject: RE: precompiled probing scenarios
I saw that you checked in the caching code, so I finally got around to
trying it. :)
For the most part, it seems to work really nicely. The caching is
essentially transparent, which makes for a positive experience when your
scripts startup faster.
There's a few trials I did though where caching opportunities were
missed. I'll admit freely that these are perhaps too nitpicky, so we
can treat it as a low-priority enhancement.
1. probe begin { exit() }
2. probe begin { exit(); }
3. probe begin { exit() a=1 }
2 and 3 actually hash the same, since elision turns 'a=1' into an empty
statement (';'). We should to be able to tell that these are all the
same, but since the pass-2 output leaves in all semi-colons, the hash is
different. It ought to be pretty easy to normalize empty statements
away, so minor differences like this don't matter.
A harder scenario to address is this:
4. probe begin, end { exit() }
5. probe end, begin { exit() }
Again, with some fancy normalization, we should be able to identify
these as equal. And actually, the seemingly-unrelated work in
probe-grouping would probably help here, if the pass-2 output were
ordered in a deterministic manner. Stap already does some of this,
e.g., by ordering functions before probes.
It's likely rare that the differences between scripts will be so small,
so these optimizations may not matter. But if anyone's bored, or has an
intern with nothing to do, this may be a simple enhancement.
Josh