This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
[Bug translator/11353] elide side-effect-free probes
- From: "chwang at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: systemtap at sources dot redhat dot com
- Date: 8 Mar 2010 20:17:17 -0000
- Subject: [Bug translator/11353] elide side-effect-free probes
- References: <20100307135957.11353.fche@redhat.com>
- Reply-to: sourceware-bugzilla at sourceware dot org
------- Additional Comments From chwang at redhat dot com 2010-03-08 20:17 -------
Created an attachment (id=4654)
--> (http://sourceware.org/bugzilla/attachment.cgi?id=4654&action=view)
Patch for 11353
Skips empty probes by checking if p->body->statements.size() == 0. I had to do
a cast to (block*), it seems like it should cast all right since
parse_stmt_block() returns a block*. (p->body = parse_stmt_block(), 2 lines
above changes)
Not sure if this is what you want, or if you just want to get rid of the
warning message in elaborate.cxx?
Rudimentary tests (e.g. stap -e 'probe begin {printf("HAI") exit()} probe end
{}') seem to work.
Running make installcheck, since I'm not sure that this won't break anything
else :/
--
http://sourceware.org/bugzilla/show_bug.cgi?id=11353
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.