]> sourceware.org Git - systemtap.git/commit
tapset: Add the macro @choose_defined and use it
authorJosh Stone <jistone@redhat.com>
Mon, 22 Oct 2012 20:55:49 +0000 (13:55 -0700)
committerJosh Stone <jistone@redhat.com>
Mon, 22 Oct 2012 20:55:49 +0000 (13:55 -0700)
commit1d19665b79fcbc99d90d3a660a43a1c5dc6a2365
tree0c2db968571110dafa05db74382323d3c6eb0486
parent1c02dc11cf55a6412c28d5b172aff43ae8858ae1
tapset: Add the macro @choose_defined and use it

This returns the first parameter if it's @defined, otherwise it returns
the second parameter, replacing the common @defined(x)?x:y pattern.

I only updated the tapsets to use this, as I feel that's where we should
show off good code practice.  There are opportunities in the testsuite
that could use it too, but it's not necessary, and probably better to
leave existing tests undisturbed when possible.
28 files changed:
tapset/choose_defined.stpm [new file with mode: 0644]
tapset/linux/dentry.stp
tapset/linux/i386/syscalls.stp
tapset/linux/inet_sock.stp
tapset/linux/ioblock.stp
tapset/linux/ioscheduler.stp
tapset/linux/ip.stp
tapset/linux/ipmib.stp
tapset/linux/irq.stp
tapset/linux/linuxmib.stp
tapset/linux/memory.stp
tapset/linux/networking.stp
tapset/linux/nfs.stp
tapset/linux/nfs_proc.stp
tapset/linux/nfsd.stp
tapset/linux/rpc.stp
tapset/linux/scheduler.stp
tapset/linux/scsi.stp
tapset/linux/signal.stp
tapset/linux/socket.stp
tapset/linux/syscalls.stp
tapset/linux/syscalls2.stp
tapset/linux/task.stp
tapset/linux/tcp.stp
tapset/linux/tcpmib.stp
tapset/linux/tty.stp
tapset/linux/vfs.stp
tapset/linux/x86_64/syscalls.stp
This page took 0.033483 seconds and 5 git commands to generate.