- tools/[tplist](tools/tplist.py): Display kernel tracepoints or USDT probes and their formats. [Examples](tools/tplist_example.txt).
- tools/[trace](tools/trace.py): Trace arbitrary functions, with filters. [Examples](tools/trace_example.txt).
- tools/[ttysnoop](tools/ttysnoop.py): Watch live output from a tty or pts device. [Examples](tools/ttysnoop_example.txt).
-- tools/[ucalls](tools/ucalls.py): Summarize method calls or Linux syscalls in high-level languages. [Examples](tools/ucalls_example.txt).
-- tools/[uflow](tools/uflow.py): Print a method flow graph in high-level languages. [Examples](tools/uflow_example.txt).
-- tools/[ugc](tools/ugc.py): Trace garbage collection events in high-level languages. [Examples](tools/ugc_example.txt).
-- tools/[uobjnew](tools/uobjnew.py): Summarize object allocation events by object type and number of bytes allocated. [Examples](tools/uobjnew_example.txt).
-- tools/[ustat](tools/ustat.py): Collect events such as GCs, thread creations, object allocations, exceptions and more in high-level languages. [Examples](tools/ustat_example.txt).
-- tools/[uthreads](tools/uthreads.py): Trace thread creation events in Java and raw pthreads. [Examples](tools/uthreads_example.txt).
+- tools/[ucalls](tools/lib/ucalls.py): Summarize method calls or Linux syscalls in high-level languages. [Examples](tools/lib/ucalls_example.txt).
+- tools/[uflow](tools/lib/uflow.py): Print a method flow graph in high-level languages. [Examples](tools/lib/uflow_example.txt).
+- tools/[ugc](tools/lib/ugc.py): Trace garbage collection events in high-level languages. [Examples](tools/lib/ugc_example.txt).
+- tools/[uobjnew](tools/lib/uobjnew.py): Summarize object allocation events by object type and number of bytes allocated. [Examples](tools/lib/uobjnew_example.txt).
+- tools/[ustat](tools/lib/ustat.py): Collect events such as GCs, thread creations, object allocations, exceptions and more in high-level languages. [Examples](tools/lib/ustat_example.txt).
+- tools/[uthreads](tools/lib/uthreads.py): Trace thread creation events in Java and raw pthreads. [Examples](tools/lib/uthreads_example.txt).
- tools/[vfscount](tools/vfscount.py) tools/[vfscount.c](tools/vfscount.c): Count VFS calls. [Examples](tools/vfscount_example.txt).
- tools/[vfsstat](tools/vfsstat.py) tools/[vfsstat.c](tools/vfsstat.c): Count some VFS calls, with column output. [Examples](tools/vfsstat_example.txt).
- tools/[wakeuptime](tools/wakeuptime.py): Summarize sleep to wakeup time by waker kernel stack. [Examples](tools/wakeuptime_example.txt).
--- /dev/null
+uobjnew.8
\ No newline at end of file
--- /dev/null
+ucalls.8
\ No newline at end of file
--- /dev/null
+uflow.8
\ No newline at end of file
--- /dev/null
+ugc.8
\ No newline at end of file
--- /dev/null
+uobjnew.8
\ No newline at end of file
--- /dev/null
+ustat.8
\ No newline at end of file
--- /dev/null
+uthreads.8
\ No newline at end of file
--- /dev/null
+ugc.8
\ No newline at end of file
--- /dev/null
+ustat.8
\ No newline at end of file
--- /dev/null
+ucalls.8
\ No newline at end of file
--- /dev/null
+uflow.8
\ No newline at end of file
--- /dev/null
+ustat.8
\ No newline at end of file
--- /dev/null
+ucalls.8
\ No newline at end of file
--- /dev/null
+uflow.8
\ No newline at end of file
--- /dev/null
+ugc.8
\ No newline at end of file
--- /dev/null
+ustat.8
\ No newline at end of file
--- /dev/null
+ucalls.8
\ No newline at end of file
--- /dev/null
+uflow.8
\ No newline at end of file
--- /dev/null
+ugc.8
\ No newline at end of file
--- /dev/null
+uobjnew.8
\ No newline at end of file
--- /dev/null
+ustat.8
\ No newline at end of file
.TH ucalls 8 "2016-11-07" "USER COMMANDS"
.SH NAME
-ucalls \- Summarize method calls from high-level languages and Linux syscalls.
+ucalls, javacalls, pythoncalls, rubycalls, phpcalls \- Summarize method calls
+from high-level languages and Linux syscalls.
.SH SYNOPSIS
+.B javacalls [-h] [-T TOP] [-L] [-S] [-v] [-m] pid [interval]
+.br
+.B pythoncalls [-h] [-T TOP] [-L] [-S] [-v] [-m] pid [interval]
+.br
+.B rubycalls [-h] [-T TOP] [-L] [-S] [-v] [-m] pid [interval]
+.br
+.B phpcalls [-h] [-T TOP] [-L] [-S] [-v] [-m] pid [interval]
+.br
.B ucalls [-l {java,python,ruby,php}] [-h] [-T TOP] [-L] [-S] [-v] [-m] pid [interval]
.SH DESCRIPTION
This tool summarizes method calls from high-level languages such as Python,
.TH uflow 8 "2016-11-07" "USER COMMANDS"
.SH NAME
-uflow \- Print a flow graph of method calls in high-level languages.
+uflow, javaflow, pythonflow, rubyflow, phpflow \- Print a flow graph of method
+calls in high-level languages.
.SH SYNOPSIS
-.B uflow [-h] [-M METHOD] [-C CLAZZ] [-v] {java,python,ruby,php} pid
+.B javaflow [-h] [-M METHOD] [-C CLAZZ] [-v] pid
+.br
+.B pythonflow [-h] [-M METHOD] [-C CLAZZ] [-v] pid
+.br
+.B rubyflow [-h] [-M METHOD] [-C CLAZZ] [-v] pid
+.br
+.B phpflow [-h] [-M METHOD] [-C CLAZZ] [-v] pid
+.br
+.B uflow [-h] [-M METHOD] [-C CLAZZ] [-v] [-l {java,python,ruby,php}] pid
.SH DESCRIPTION
uflow traces method calls and prints them in a flow graph that can facilitate
debugging and diagnostics by following the program's execution (method flow).
.TH ugc 8 "2016-11-07" "USER COMMANDS"
.SH NAME
-ugc \- Trace garbage collection events in high-level languages.
+ugc, javagc, pythongc, rubygc, nodegc \- Trace garbage collection events in
+high-level languages.
.SH SYNOPSIS
-.B ugc [-h] [-v] [-m] [-M MINIMUM] [-F FILTER] {java,python,ruby,node} pid
+.B javagc [-h] [-v] [-m] [-M MINIMUM] [-F FILTER] pid
+.br
+.B pythongc [-h] [-v] [-m] [-M MINIMUM] [-F FILTER] pid
+.br
+.B rubygc [-h] [-v] [-m] [-M MINIMUM] [-F FILTER] pid
+.br
+.B nodegc [-h] [-v] [-m] [-M MINIMUM] [-F FILTER] pid
+.br
+.B ugc [-h] [-v] [-m] [-M MINIMUM] [-F FILTER] [-l {java,python,ruby,node}] pid
.SH DESCRIPTION
This traces garbage collection events as they occur, including their duration
and any additional information (such as generation collected or type of GC)
.TH uobjnew 8 "2016-11-07" "USER COMMANDS"
.SH NAME
-uobjnew \- Summarize object allocations in high-level languages.
+uobjnew, javaobjnew, rubyobjnew, cobjnew \- Summarize object allocations in
+high-level languages.
.SH SYNOPSIS
-.B uobjnew [-h] [-C TOP_COUNT] [-S TOP_SIZE] [-v] {java,ruby,c} pid [interval]
+.B javaobjnew [-h] [-C TOP_COUNT] [-S TOP_SIZE] [-v] pid [interval]
+.br
+.B rubyobjnew [-h] [-C TOP_COUNT] [-S TOP_SIZE] [-v] pid [interval]
+.br
+.B cobjnew [-h] [-C TOP_COUNT] [-S TOP_SIZE] [-v] pid [interval]
+.br
+.B uobjnew [-h] [-C TOP_COUNT] [-S TOP_SIZE] [-v] [-l {java,ruby,c}] pid [interval]
.SH DESCRIPTION
uobjnew traces object allocations in high-level languages (including "malloc")
and prints summaries of the most frequently allocated types by number of
.TH ustat 8 "2016-11-07" "USER COMMANDS"
.SH NAME
-ustat \- Activity stats from high-level languages.
+ustat, javastat, pythonstat, rubystat, nodestat, phpstat \- Activity stats from
+high-level languages.
.SH SYNOPSIS
+.B javastat [-C] [-S {cload,excp,gc,method,objnew,thread}] [-r MAXROWS] [-d] [interval [count]]
+.br
+.B pythonstat [-C] [-S {cload,excp,gc,method,objnew,thread}] [-r MAXROWS] [-d] [interval [count]]
+.br
+.B rubystat [-C] [-S {cload,excp,gc,method,objnew,thread}] [-r MAXROWS] [-d] [interval [count]]
+.br
+.B nodestat [-C] [-S {cload,excp,gc,method,objnew,thread}] [-r MAXROWS] [-d] [interval [count]]
+.br
+.B phpstat [-C] [-S {cload,excp,gc,method,objnew,thread}] [-r MAXROWS] [-d] [interval [count]]
+.br
.B ustat [-l {java,python,ruby,node,php}] [-C] [-S {cload,excp,gc,method,objnew,thread}] [-r MAXROWS] [-d] [interval [count]]
.SH DESCRIPTION
This is "top" for high-level language events, such as garbage collections,
.TH uthreads 8 "2016-11-07" "USER COMMANDS"
.SH NAME
-uthreads \- Trace thread creation events in Java or pthreads.
+uthreads, javathreads \- Trace thread creation events in Java or pthreads.
.SH SYNOPSIS
+.B javathreads [-h] [-v] pid
+.BR
.B uthreads [-h] [-l {java}] [-v] pid
.SH DESCRIPTION
This traces thread creation events in Java processes, or pthread creation
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
name: bcc
-version: 0.3.0-20170322-1719-aaab74e
+version: 0.3.0-20170401-1747-c5f48c9
summary: BPF Compiler Collection (BCC)
description: A toolkit for creating efficient kernel tracing and manipulation programs
confinement: strict
ttysnoop:
command: wrapper ttysnoop
ucalls:
- command: wrapper ucalls
+ command: wrapper lib/ucalls
uflow:
- command: wrapper uflow
+ command: wrapper lib/uflow
ugc:
- command: wrapper ugc
+ command: wrapper lib/ugc
uobjnew:
- command: wrapper uobjnew
+ command: wrapper lib/uobjnew
ustat:
- command: wrapper ustat
+ command: wrapper lib/ustat
uthreads:
- command: wrapper uthreads
+ command: wrapper lib/uthreads
+ cobjnew:
+ command: wrapper cobjnew
+ javacalls:
+ command: wrapper javacalls
+ javaflow:
+ command: wrapper javaflow
+ javagc:
+ command: wrapper javagc
+ javaobjnew:
+ command: wrapper javaobjnew
+ javastat:
+ command: wrapper javastat
+ javathreads:
+ command: wrapper javathreads
+ nodegc:
+ command: wrapper nodegc
+ nodestat:
+ command: wrapper nodestat
+ phpcalls:
+ command: wrapper phpcalls
+ phpflow:
+ command: wrapper phpflow
+ phpstat:
+ command: wrapper phpstat
+ pythoncalls:
+ command: wrapper pythoncalls
+ pythonflow:
+ command: wrapper pythonflow
+ pythongc:
+ command: wrapper pythongc
+ pythonstat:
+ command: wrapper pythonstat
+ rubycalls:
+ command: wrapper rubycalls
+ rubyflow:
+ command: wrapper rubyflow
+ rubygc:
+ command: wrapper rubygc
+ rubyobjnew:
+ command: wrapper rubyobjnew
+ rubystat:
+ command: wrapper rubystat
vfscount:
command: wrapper vfscount
vfsstat:
def test_ucalls(self):
# This attaches a large number (300+) kprobes, which can be slow,
# so use an increased timeout value.
- self.run_with_int("ucalls.py -l none -S %d" % os.getpid(),
+ self.run_with_int("lib/ucalls.py -l none -S %d" % os.getpid(),
timeout=30, kill_timeout=30)
@skipUnless(kernel_version_ge(4,4), "requires kernel >= 4.4")
def test_uflow(self):
# The Python installed on the Ubuntu buildbot doesn't have USDT
# probes, so we can't run uflow.
- # self.run_with_int("uflow.py -l python %d" % os.getpid())
+ # self.run_with_int("pythonflow.py %d" % os.getpid())
pass
@skipUnless(kernel_version_ge(4,4), "requires kernel >= 4.4")
@skipUnless(kernel_version_ge(4,4), "requires kernel >= 4.4")
def test_uobjnew(self):
- self.run_with_int("uobjnew.py -l c %d" % os.getpid())
+ self.run_with_int("cobjnew.sh %d" % os.getpid())
@skipUnless(kernel_version_ge(4,4), "requires kernel >= 4.4")
def test_ustat(self):
- self.run_with_duration("ustat.py 1 1")
+ self.run_with_duration("lib/ustat.py 1 1")
@skipUnless(kernel_version_ge(4,4), "requires kernel >= 4.4")
def test_uthreads(self):
- self.run_with_int("uthreads.py %d" % os.getpid())
+ self.run_with_int("lib/uthreads.py %d" % os.getpid())
def test_vfscount(self):
self.run_with_int("vfscount.py")
file(GLOB C_FILES *.c)
file(GLOB PY_FILES *.py)
+file(GLOB SH_FILES *.sh)
file(GLOB TXT_FILES *.txt)
-list(REMOVE_ITEM TXT_FILES "CMakeLists.txt")
+list(REMOVE_ITEM TXT_FILES ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt)
foreach(FIL ${PY_FILES})
get_filename_component(FIL_WE ${FIL} NAME_WE)
install(PROGRAMS ${FIL} DESTINATION share/bcc/tools RENAME ${FIL_WE})
endforeach()
+foreach(FIL ${SH_FILES})
+ if(${FIL} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}/reset-trace.sh)
+ get_filename_component(FIL_WE ${FIL} NAME_WE)
+ install(PROGRAMS ${FIL} DESTINATION share/bcc/tools RENAME ${FIL_WE})
+ else()
+ file(READ ${FIL} CONTENT)
+ string(REPLACE ".py -l" " -l" CONTENT_WE ${CONTENT})
+ string(REPLACE "\"" "\\\"" CONTENT_WE ${CONTENT_WE})
+ get_filename_component(FIL_WE ${FIL} NAME_WE)
+ install(PROGRAMS ${FIL} DESTINATION share/bcc/tools RENAME ${FIL_WE})
+ install(CODE "file(WRITE \"\$ENV{DESTDIR}/\${CMAKE_INSTALL_PREFIX}/share/bcc/tools/${FIL_WE}\" \"${CONTENT_WE}\")")
+ endif()
+endforeach()
install(FILES ${C_FILES} DESTINATION share/bcc/tools)
install(FILES ${TXT_FILES} DESTINATION share/bcc/tools/doc)
+add_subdirectory(lib)
add_subdirectory(old)
--- /dev/null
+#!/bin/bash
+lib=$(dirname $0)/lib
+$lib/uobjnew.py -l c "$@"
--- /dev/null
+lib/uobjnew_example.txt
\ No newline at end of file
--- /dev/null
+#!/bin/bash
+lib=$(dirname $0)/lib
+$lib/ucalls.py -l java "$@"
--- /dev/null
+lib/ucalls_example.txt
\ No newline at end of file
--- /dev/null
+#!/bin/bash
+lib=$(dirname $0)/lib
+$lib/uflow.py -l java "$@"
--- /dev/null
+lib/uflow_example.txt
\ No newline at end of file
--- /dev/null
+#!/bin/bash
+lib=$(dirname $0)/lib
+$lib/ugc.py -l java "$@"
--- /dev/null
+lib/ugc_example.txt
\ No newline at end of file
--- /dev/null
+#!/bin/bash
+lib=$(dirname $0)/lib
+$lib/uobjnew.py -l java "$@"
--- /dev/null
+lib/uobjnew_example.txt
\ No newline at end of file
--- /dev/null
+#!/bin/bash
+lib=$(dirname $0)/lib
+$lib/ustat.py -l java "$@"
--- /dev/null
+lib/ustat_example.txt
\ No newline at end of file
--- /dev/null
+#!/bin/bash
+lib=$(dirname $0)/lib
+$lib/uthreads.py -l java "$@"
--- /dev/null
+lib/uthreads_example.txt
\ No newline at end of file
--- /dev/null
+file(GLOB PY_FILES *.py)
+file(GLOB TXT_FILES *.txt)
+list(REMOVE_ITEM TXT_FILES ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt)
+foreach(FIL ${PY_FILES})
+ get_filename_component(FIL_WE ${FIL} NAME_WE)
+ install(PROGRAMS ${FIL} DESTINATION share/bcc/tools/lib RENAME ${FIL_WE})
+endforeach()
+install(FILES ${TXT_FILES} DESTINATION share/bcc/tools/doc/lib)
--- /dev/null
+#!/bin/bash
+lib=$(dirname $0)/lib
+$lib/ugc.py -l node "$@"
--- /dev/null
+lib/ugc_example.txt
\ No newline at end of file
--- /dev/null
+#!/bin/bash
+lib=$(dirname $0)/lib
+$lib/ustat.py -l node "$@"
--- /dev/null
+lib/ustat_example.txt
\ No newline at end of file
--- /dev/null
+#!/bin/bash
+lib=$(dirname $0)/lib
+$lib/ucalls.py -l php "$@"
--- /dev/null
+lib/ucalls_example.txt
\ No newline at end of file
--- /dev/null
+#!/bin/bash
+lib=$(dirname $0)/lib
+$lib/uflow.py -l php "$@"
--- /dev/null
+lib/uflow_example.txt
\ No newline at end of file
--- /dev/null
+#!/bin/bash
+lib=$(dirname $0)/lib
+$lib/ustat.py -l php "$@"
--- /dev/null
+lib/ustat_example.txt
\ No newline at end of file
--- /dev/null
+#!/bin/bash
+lib=$(dirname $0)/lib
+$lib/ucalls.py -l python "$@"
--- /dev/null
+lib/ucalls_example.txt
\ No newline at end of file
--- /dev/null
+#!/bin/bash
+lib=$(dirname $0)/lib
+$lib/uflow.py -l python "$@"
--- /dev/null
+lib/uflow_example.txt
\ No newline at end of file
--- /dev/null
+#!/bin/bash
+lib=$(dirname $0)/lib
+$lib/ugc.py -l python "$@"
--- /dev/null
+lib/ugc_example.txt
\ No newline at end of file
--- /dev/null
+#!/bin/bash
+lib=$(dirname $0)/lib
+$lib/ustat.py -l python "$@"
--- /dev/null
+lib/ustat_example.txt
\ No newline at end of file
--- /dev/null
+#!/bin/bash
+lib=$(dirname $0)/lib
+$lib/ucalls.py -l ruby "$@"
--- /dev/null
+lib/ucalls_example.txt
\ No newline at end of file
--- /dev/null
+#!/bin/bash
+lib=$(dirname $0)/lib
+$lib/uflow.py -l ruby "$@"
--- /dev/null
+lib/uflow_example.txt
\ No newline at end of file
--- /dev/null
+#!/bin/bash
+lib=$(dirname $0)/lib
+$lib/ugc.py -l ruby "$@"
--- /dev/null
+lib/ugc_example.txt
\ No newline at end of file
--- /dev/null
+#!/bin/bash
+lib=$(dirname $0)/lib
+$lib/uobjnew.py -l ruby "$@"
--- /dev/null
+lib/uobjnew_example.txt
\ No newline at end of file
--- /dev/null
+#!/bin/bash
+lib=$(dirname $0)/lib
+$lib/ustat.py -l ruby "$@"
--- /dev/null
+lib/ustat_example.txt
\ No newline at end of file