1ucalls(8) System Manager's Manual ucalls(8)
2
3
4
6 ucalls, javacalls, pythoncalls, rubycalls, phpcalls - Summarize method
7 calls from high-level languages and Linux syscalls.
8
10 javacalls [-h] [-T TOP] [-L] [-S] [-v] [-m] pid [interval]
11 pythoncalls [-h] [-T TOP] [-L] [-S] [-v] [-m] pid [interval]
12 rubycalls [-h] [-T TOP] [-L] [-S] [-v] [-m] pid [interval]
13 phpcalls [-h] [-T TOP] [-L] [-S] [-v] [-m] pid [interval]
14 ucalls [-l {java,python,ruby,php}] [-h] [-T TOP] [-L] [-S] [-v] [-m]
15 pid [interval]
16
18 This tool summarizes method calls from high-level languages such as
19 Python, Java, Ruby, and PHP. It can also trace Linux system calls.
20 Whenever a method is invoked, ucalls records the call count and option‐
21 ally the method's execution time (latency) and displays a summary.
22
23 This uses in-kernel eBPF maps to store per process summaries for effi‐
24 ciency.
25
26 This tool relies on USDT probes embedded in many high-level languages,
27 such as Java, Python, Ruby, and PHP. It requires a runtime instrumented
28 with these probes, which in some cases requires building from source
29 with a USDT-specific flag, such as "--enable-dtrace" or "--with-
30 dtrace". For Java, method probes are not enabled by default, and can be
31 turned on by running the Java process with the "-XX:+ExtendedDTra‐
32 ceProbes" flag. For PHP processes, the environment variable
33 USE_ZEND_DTRACE must be set to 1.
34
35 Since this uses BPF, only the root user can use this tool.
36
38 CONFIG_BPF and bcc.
39
41 -l {java,python,ruby,php}
42 The language to trace. If not provided, only syscalls are traced
43 (when the -S option is used).
44
45 -T TOP Print only the top methods by frequency or latency.
46
47 -L Collect method invocation latency (duration).
48
49 -S Collect Linux syscalls frequency and timing.
50
51 -v Print the resulting BPF program, for debugging purposes.
52
53 -m Print times in milliseconds (the default is microseconds).
54
55 pid The process id to trace.
56
57 interval
58 Print summary after this number of seconds and then exit. By
59 default, wait for Ctrl+C to terminate.
60
62 Trace the top 10 Ruby method calls:
63 # ucalls -T 10 -l ruby 1344
64
65 Trace Python method calls and Linux syscalls including latency in mil‐
66 liseconds:
67 # ucalls -l python -mL 2020
68
69 Trace only syscalls and print a summary after 10 seconds:
70 # ucalls -S 788 10
71
73 Tracing individual method calls will produce a considerable overhead in
74 all high-level languages. For languages with just-in-time compilation,
75 such as Java, the overhead can be more considerable than for inter‐
76 preted languages. On the other hand, syscall tracing will typically be
77 tolerable for most processes, unless they have a very unusual rate of
78 system calls.
79
81 This is from bcc.
82
83 https://github.com/iovisor/bcc
84
85 Also look in the bcc distribution for a companion _example.txt file
86 containing example usage, output, and commentary for this tool.
87
89 Linux
90
92 Unstable - in development.
93
95 Sasha Goldshtein
96
98 ustat(8), argdist(8)
99
100
101
102USER COMMANDS 2016-11-07 ucalls(8)