Skip to content

Commit

Permalink
stacksnoop: Retire and move to examples/tracing
Browse files Browse the repository at this point in the history
Move stacksnoop to examples/tracing. Originally we considered
leaving a script that redirects to the `trace` tool, but decided
not to. Any users of stacksnoop can migrate directly to `trace`.

Resolves #737.
  • Loading branch information
goldshtn committed Apr 1, 2017
1 parent 6ceb329 commit 24f77d7
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 91 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ pair of .c and .py files, and some are directories of files.
- examples/[hello_world.py](examples/hello_world.py): Prints "Hello, World!" for new processes.
- examples/tracing/[mysqld_query.py](examples/tracing/mysqld_query.py): Trace MySQL server queries using USDT probes. [Examples](examples/tracing/mysqld_query_example.txt).
- examples/tracing/[nodejs_http_server.py](examples/tracing/nodejs_http_server.py): Trace Node.js HTTP server requests using USDT probes. [Examples](examples/tracing/nodejs_http_server_example.txt).
- examples/tracing/[stacksnoop](examples/tracing/stacksnoop.py): Trace a kernel function and print all kernel stack traces. [Examples](examples/stacksnoop_example.txt).
- tools/[statsnoop](tools/statsnoop.py): Trace stat() syscalls. [Examples](tools/statsnoop_example.txt).
- examples/tracing/[task_switch.py](examples/tracing/task_switch.py): Count task switches with from and to PIDs.
- examples/tracing/[tcpv4connect.py](examples/tracing/tcpv4connect.py): Trace TCP IPv4 active connections. [Examples](examples/tracing/tcpv4connect_example.txt).
- examples/tracing/[trace_fields.py](examples/tracing/trace_fields.py): Simple example of printing fields from traced events.
Expand Down Expand Up @@ -123,8 +125,6 @@ pair of .c and .py files, and some are directories of files.
- tools/[solisten](tools/solisten.py): Trace TCP socket listen. [Examples](tools/solisten_example.txt).
- tools/[sslsniff](tools/sslsniff.py): Sniff OpenSSL written and readed data. [Examples](tools/sslsniff_example.txt).
- tools/[stackcount](tools/stackcount.py): Count kernel function calls and their stack traces. [Examples](tools/stackcount_example.txt).
- tools/[stacksnoop](tools/stacksnoop.py): Trace a kernel function and print all kernel stack traces. [Examples](tools/stacksnoop_example.txt).
- tools/[statsnoop](tools/statsnoop.py): Trace stat() syscalls. [Examples](tools/statsnoop_example.txt).
- tools/[syncsnoop](tools/syncsnoop.py): Trace sync() syscall. [Examples](tools/syncsnoop_example.txt).
- tools/[syscount](tools/syscount.py): Summarize syscall counts and latencies. [Examples](tools/syscount_example.txt).
- tools/[tcpaccept](tools/tcpaccept.py): Trace TCP passive connections (accept()). [Examples](tools/tcpaccept_example.txt).
Expand Down
7 changes: 0 additions & 7 deletions tools/stacksnoop.py → examples/tracing/stacksnoop.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,6 @@
#
# USAGE: stacksnoop [-h] [-p PID] [-s] [-v] function
#
# The current implementation uses an unrolled loop for x86_64, and was written
# as a proof of concept. This implementation should be replaced in the future
# with an appropriate bpf_ call, when available.
#
# The stack depth is limited to 10 (+1 for the current instruction pointer).
# This could be tunable in a future version.
#
# Copyright 2016 Netflix, Inc.
# Licensed under the Apache License, Version 2.0 (the "License")
#
Expand Down
File renamed without changes.
78 changes: 0 additions & 78 deletions man/man8/stacksnoop.8

This file was deleted.

4 changes: 0 additions & 4 deletions tests/python/test_tools_smoke.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,10 +257,6 @@ def test_sslsniff(self):
def test_stackcount(self):
self.run_with_int("stackcount.py __kmalloc -i 1")

@skipUnless(kernel_version_ge(4,6), "requires kernel >= 4.6")
def test_stacksnoop(self):
self.run_with_int("stacksnoop.py SyS_open")

@skipUnless(kernel_version_ge(4,4), "requires kernel >= 4.4")
def test_statsnoop(self):
self.run_with_int("statsnoop.py")
Expand Down

0 comments on commit 24f77d7

Please sign in to comment.