1uobjnew(8) System Manager's Manual uobjnew(8)
2
3
4
6 uobjnew, cobjnew, javaobjnew, rubyobjnew, tclobjnew - Summarize object
7 allocations in high-level languages.
8
10 cobjnew [-h] [-C TOP_COUNT] [-S TOP_SIZE] [-v] pid [interval]
11 javaobjnew [-h] [-C TOP_COUNT] [-S TOP_SIZE] [-v] pid [interval]
12 rubyobjnew [-h] [-C TOP_COUNT] [-S TOP_SIZE] [-v] pid [interval]
13 tclobjnew [-h] [-C TOP_COUNT] [-S TOP_SIZE] [-v] pid [interval]
14 uobjnew [-h] [-C TOP_COUNT] [-S TOP_SIZE] [-v] [-l {c,java,ruby,tcl}]
15 pid [interval]
16
18 uobjnew traces object allocations in high-level languages (including
19 "malloc") and prints summaries of the most frequently allocated types
20 by number of objects or number of bytes.
21
22 This tool relies on USDT probes embedded in many high-level languages,
23 such as C, Java, Ruby, and Tcl. It requires a runtime instrumented with
24 these probes, which in some cases requires building from source with a
25 USDT-specific flag, such as "--enable-dtrace" or "--with-dtrace". For
26 Java, the Java process must be started with the "-XX:+ExtendedDTra‐
27 ceProbes" flag.
28
29 Since this uses BPF, only the root user can use this tool.
30
32 CONFIG_BPF and bcc.
33
35 -C TOP_COUNT
36 Print the top object types sorted by number of instances.
37
38 -S TOP_SIZE
39 Print the top object types sorted by size.
40
41 -v Print the resulting BPF program, for debugging purposes.
42
43 {c,java,ruby,tcl}
44 The language to trace.
45
46 pid The process id to trace.
47
48 interval
49 Wait this many seconds and then print the summary and exit. By
50 default, wait for Ctrl+C to exit.
51
53 Trace object allocations in a Ruby process:
54 # uobjnew ruby 148
55
56 Trace object allocations from "malloc" and print the top 10 by total
57 size:
58 # uobjnew -S 10 c 1788
59
61 TYPE The object type being allocated. For C (malloc), this is the
62 block size.
63
64 ALLOCS The number of objects allocated.
65
66 BYTES The number of bytes allocated.
67
69 Object allocation events are quite frequent, and therefore the overhead
70 from running this tool can be considerable. Use with caution and make
71 sure to test before using in a production environment. Nonetheless,
72 even thousands of allocations per second will likely produce a reason‐
73 able overhead when investigating a problem.
74
76 This is from bcc.
77
78 https://github.com/iovisor/bcc
79
80 Also look in the bcc distribution for a companion _example.txt file
81 containing example usage, output, and commentary for this tool.
82
84 Linux
85
87 Unstable - in development.
88
90 Sasha Goldshtein
91
93 ustat(8), ugc(8), memleak(8)
94
95
96
97USER COMMANDS 2018-10-09 uobjnew(8)