diff options
author | Stan Cox <scox@redhat.com> | 2009-04-16 15:04:29 -0400 |
---|---|---|
committer | Stan Cox <scox@redhat.com> | 2009-04-16 15:04:29 -0400 |
commit | 466076411bb00af1b2d13423b47ee2835e9b1c97 (patch) | |
tree | c6ec789ab4faa5d08814618214c6bb7e634261b1 /dtrace | |
parent | 4f988cd3365c63ac792317337670155d3351d577 (diff) | |
download | systemtap-steved-466076411bb00af1b2d13423b47ee2835e9b1c97.tar.gz systemtap-steved-466076411bb00af1b2d13423b47ee2835e9b1c97.tar.xz systemtap-steved-466076411bb00af1b2d13423b47ee2835e9b1c97.zip |
Handle dtrace no argument macro case specially.
* dtrace: No argument case is DTRACE_PROBE/STAP_PROBE.
Diffstat (limited to 'dtrace')
-rwxr-xr-x | dtrace | 15 |
1 files changed, 10 insertions, 5 deletions
@@ -59,17 +59,22 @@ class provider: i += 1 if (len(new_args) > 0): self.arglist[this_probe] = ('%s arg%d' % (new_args, c)) + if (len(new_args) == 0): + c = 0 + stap_str = "STAP_PROBE(provider,%s" % (this_probe) + else: + c += 1 + stap_str = "STAP_PROBE%d(provider,%s" % (c,this_probe) define_str = "#define %s(" % (this_probe_canon) - stap_str = "STAP_PROBE%s(provider,%s" % (c+1,this_probe) - i = 0 + i = 1 while (i <= c): if (i != 0): define_str += "," - define_str = define_str + "arg%s" % (i+1); - stap_str = stap_str + ",arg%s" % (i+1); + define_str = define_str + "arg%s" % (i); + stap_str = stap_str + ",arg%s" % (i); i += 1 self.h.write ('#define %s_ENABLED() 1\n' % this_probe_canon) - self.h.write (define_str + ")\\\n") + self.h.write (define_str + ") \\\n") self.h.write (stap_str + ")\n\n") def get(self, arg): |