logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

uthreads, cthreads, javathreads - Trace thread creation events in Java or pthreads.

Author

       Sasha Goldshtein

Description

       This  traces  thread creation events in Java processes, or pthread creation events in any process. When a
       thread is created, its name or start address is printed.

       Since this uses BPF, only the root user can use this tool.

Examples

       Trace Java thread creations:
              # uthreads-ljava148

       Trace pthread creations:
              # uthreads1802

Fields

       TIME   The event's time in seconds from the beginning of the trace.

       ID     The thread's ID. The information in this column depends on the runtime.

       TYPE   Event type -- thread start, stop, or pthread event.

       DESCRIPTION
              The thread's name or start address function name.

Name

       uthreads, cthreads, javathreads - Trace thread creation events in Java or pthreads.

Options

       -l {c,java,none}
              The language to trace. C and none select tracing pthreads only, regardless of  the  runtime  being
              traced.

       -v     Print the resulting BPF program, for debugging purposes.

       pid    The process id to trace.

Os

       Linux

Overhead

       Thread start and stop events are usually not very frequent, which makes this tool's overhead negligible.

Requirements

       CONFIG_BPF and bcc.

See Also

ustat(8), trace(8)

USER COMMANDS                                      2018-10-09                                        uthreads(8)

Source

       This is from bcc.

              https://github.com/iovisor/bcc

       Also look in the bcc distribution for a companion _example.txt file containing example usage, output, and
       commentary for this tool.

Stability

       Unstable - in development.

Synopsis

cthreads[-h][-v]pidjavathreads[-h][-v]piduthreads[-h][-l{c,java,none}][-v]pid

See Also