continue adding --ebpf option to the python tools/ scripts

Several python tools allow their eBPF code to be printed to
stdout for debugging.  There are other projects that would
like to share these program definitions however, instead of
duplicating code.  We previously agreed on an --ebpf option
and we now continue adding it to more tools.

Signed-off-by: Nathan Scott <nathans@redhat.com>
diff --git a/tools/opensnoop.py b/tools/opensnoop.py
index 6d011e9..d0dc335 100755
--- a/tools/opensnoop.py
+++ b/tools/opensnoop.py
@@ -41,6 +41,8 @@
     help="trace this TID only")
 parser.add_argument("-n", "--name",
     help="only print process names containing this name")
+parser.add_argument("--ebpf", action="store_true",
+    help=argparse.SUPPRESS)
 args = parser.parse_args()
 debug = 0
 
@@ -119,8 +121,10 @@
         'if (pid != %s) { return 0; }' % args.pid)
 else:
     bpf_text = bpf_text.replace('FILTER', '')
-if debug:
+if debug or args.ebpf:
     print(bpf_text)
+    if args.ebpf:
+        exit()
 
 # initialize BPF
 b = BPF(text=bpf_text)