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/4935] support on-the-fly probe enable/disable syntax


------- Additional Comments From mhiramat at redhat dot com  2007-11-16 23:40 -------
Created an attachment (id=2095)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=2095&action=view)
on-the-fly enable/disable probes patch for parser and elabolator

I developed a patch for the parser and the elabolator to support this syntax.

Currently, this just translates the next script;
---
 probe ALIAS=PROBEPOINT if (expr1) { stmt1 }
 probe ALIAS if (expr2) { stmt2 }
---
to below;
---
 probe PROBEPOINT { 
   if (!((expr2)&&(expr1))) next
   stmt1
   stmt2
 }
---

This patch adds "if (..)" condition to the PROBEPOINT instead of "probe".
So, you can write the below script with this patch;
---
 probe PP1 if (expr1), PP2 if (expr2) {stmt}
---
This is translated to below;
---
 probe PP1 { 
   if (!expr1) next 
   stmt
 }
 probe PP2 {
   if (!expr2) next
   stmt
 }
---

This is the first step of this feature, since this patch does not
include optimization code.

Thanks,


-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=4935

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