uthreads man page

uthreads, javathreads ā€” Trace thread creation events in Java or pthreads.

Synopsis

javathreads [-h] [-v] pid uthreads [-h] [-l {java}] [-v] pid

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.

Requirements

CONFIG_BPF and bcc.

Options

-l {java}

The language to trace (currently only Java is supported). When no language is specified, only pthread creations are traced.

-v

Print the resulting BPF program, for debugging purposes.

pid

The process id to trace.

Examples

Trace Java thread creations:

# uthreads -l java 148

Trace pthread creations:

# uthreads 1802

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.

Overhead

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

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.

OS

Linux

Stability

Unstable - in development.

Author

Sasha Goldshtein

See Also

ustat(8), trace(8)

Info

2016-11-07 USER COMMANDS