utools Tcl support (#2005)
* Add perl* utools man page links
Matches other languages, related to commit 9162be4.
* uthreads: explicitly list C as supported
uthreads supports C (pthreads) thread tracing, make this explicit.
Earlier use of -l java and -l none unchanged.
Add the corresponding man page and usage examples.
* Add Tcl support for ucalls / uflow / uobjnew / ustat
For some reason we need to use proc__args instead of proc__entry
in uflow.py to get similar results as with e.g. Python.
diff --git a/tools/lib/uflow.py b/tools/lib/uflow.py
index f2a458d..02cad55 100755
--- a/tools/lib/uflow.py
+++ b/tools/lib/uflow.py
@@ -4,7 +4,7 @@
# uflow Trace method execution flow in high-level languages.
# For Linux, uses BCC, eBPF.
#
-# USAGE: uflow [-C CLASS] [-M METHOD] [-v] {java,perl,php,python,ruby} pid
+# USAGE: uflow [-C CLASS] [-M METHOD] [-v] {java,perl,php,python,ruby,tcl} pid
#
# Copyright 2016 Sasha Goldshtein
# Licensed under the Apache License, Version 2.0 (the "License")
@@ -18,7 +18,7 @@
import time
import os
-languages = ["java", "perl", "php", "python", "ruby"]
+languages = ["java", "perl", "php", "python", "ruby", "tcl"]
examples = """examples:
./uflow -l java 185 # trace Java method calls in process 185
@@ -161,6 +161,13 @@
enable_probe("cmethod__return", "ruby_creturn",
"bpf_usdt_readarg(1, ctx, &clazz);",
"bpf_usdt_readarg(2, ctx, &method);", is_return=True)
+elif language == "tcl":
+ enable_probe("proc__args", "tcl_entry",
+ "", # no class/file info available
+ "bpf_usdt_readarg(1, ctx, &method);", is_return=False)
+ enable_probe("proc__return", "tcl_return",
+ "", # no class/file info available
+ "bpf_usdt_readarg(1, ctx, &method);", is_return=True)
else:
print("No language detected; use -l to trace a language.")
exit(1)