This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug translator/11353] elide side-effect-free probes


------- 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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]