xref: /aosp_15_r20/external/bcc/tools/threadsnoop_example.txt (revision 387f9dfdfa2baef462e92476d413c7bc2470293e)
1*387f9dfdSAndroid Build Coastguard WorkerDemonstrations of threadsnoop, the Linux BCC/eBPF version.
2*387f9dfdSAndroid Build Coastguard Worker
3*387f9dfdSAndroid Build Coastguard Worker
4*387f9dfdSAndroid Build Coastguard WorkerTracing new threads via phtread_create():
5*387f9dfdSAndroid Build Coastguard Worker
6*387f9dfdSAndroid Build Coastguard Worker# ./threadsnoop
7*387f9dfdSAndroid Build Coastguard WorkerAttaching 2 probes...
8*387f9dfdSAndroid Build Coastguard WorkerTIME(ms)   PID    COMM             FUNC
9*387f9dfdSAndroid Build Coastguard Worker1938       28549  dockerd          threadentry
10*387f9dfdSAndroid Build Coastguard Worker1939       28549  dockerd          threadentry
11*387f9dfdSAndroid Build Coastguard Worker1939       28549  dockerd          threadentry
12*387f9dfdSAndroid Build Coastguard Worker1940       28549  dockerd          threadentry
13*387f9dfdSAndroid Build Coastguard Worker1949       28549  dockerd          threadentry
14*387f9dfdSAndroid Build Coastguard Worker1958       28549  dockerd          threadentry
15*387f9dfdSAndroid Build Coastguard Worker1939       28549  dockerd          threadentry
16*387f9dfdSAndroid Build Coastguard Worker1950       28549  dockerd          threadentry
17*387f9dfdSAndroid Build Coastguard Worker2013       28579  docker-containe  0x562f30f2e710L
18*387f9dfdSAndroid Build Coastguard Worker2036       28549  dockerd          threadentry
19*387f9dfdSAndroid Build Coastguard Worker2083       28579  docker-containe  0x562f30f2e710L
20*387f9dfdSAndroid Build Coastguard Worker2116       629    systemd-journal  0x7fb7114955c0L
21*387f9dfdSAndroid Build Coastguard Worker2116       629    systemd-journal  0x7fb7114955c0L
22*387f9dfdSAndroid Build Coastguard Worker[...]
23*387f9dfdSAndroid Build Coastguard Worker
24*387f9dfdSAndroid Build Coastguard WorkerThe output shows a dockerd process creating several threads with the start
25*387f9dfdSAndroid Build Coastguard Workerroutine threadentry(), and docker-containe (truncated) and systemd-journal
26*387f9dfdSAndroid Build Coastguard Workeralso starting threads: in their cases, the function had no symbol information
27*387f9dfdSAndroid Build Coastguard Workeravailable, so their addresses are printed in hex.
28