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/memleak.py b/tools/memleak.py
index 5788e32..7725b1e 100755
--- a/tools/memleak.py
+++ b/tools/memleak.py
@@ -97,6 +97,8 @@
         help="capture only allocations smaller than this size")
 parser.add_argument("-O", "--obj", type=str, default="c",
         help="attach to allocator functions in the specified object")
+parser.add_argument("--ebpf", action="store_true",
+        help=argparse.SUPPRESS)
 
 args = parser.parse_args()
 
@@ -384,6 +386,10 @@
         stack_flags += "|BPF_F_USER_STACK"
 bpf_source = bpf_source.replace("STACK_FLAGS", stack_flags)
 
+if args.ebpf:
+    print(bpf_source)
+    exit()
+
 bpf = BPF(text=bpf_source)
 
 if not kernel_trace: