tools/testing/selftests/ftrace/test.d/ftrace/fgraph-filter.tc
Source file repositories/reference/linux-study-clean/tools/testing/selftests/ftrace/test.d/ftrace/fgraph-filter.tc
File Facts
- System
- Linux kernel
- Corpus path
tools/testing/selftests/ftrace/test.d/ftrace/fgraph-filter.tc- Extension
.tc- Size
- 943 bytes
- Lines
- 41
- Domain
- Support Tooling And Documentation
- Bucket
- tools
- Inferred role
- Support Tooling And Documentation: tools
- Status
- atlas-only
Why This File Exists
Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
Dependency Surface
- No C-style include directives detected by the generator.
Detected Declarations
- No top-level syscall, struct, function, initcall, or export declaration detected by the generator.
Annotated Snippet
#!/bin/sh
# SPDX-License-Identifier: GPL-2.0
# description: ftrace - function graph filters
# requires: set_ftrace_filter function_graph:tracer
# Make sure that function graph filtering works
fail() { # msg
echo $1
exit_fail
}
disable_tracing
clear_trace
# filter something, schedule is always good
if ! echo "schedule" > set_ftrace_filter; then
# test for powerpc 64
if ! echo ".schedule" > set_ftrace_filter; then
fail "can not enable schedule filter"
fi
fi
echo function_graph > current_tracer
enable_tracing
sleep 1
# search for functions (has "()" on the line), and make sure
# that only the schedule function was found
count=`cat trace | grep '()' | grep -v schedule | wc -l`
if [ $count -ne 0 ]; then
fail "Graph filtering not working by itself?"
fi
# Make sure we did find something
count=`cat trace | grep 'schedule()' | wc -l`
if [ $count -eq 0 ]; then
fail "No schedule traces found?"
fi
exit 0
Annotation
- Atlas domain: Support Tooling And Documentation / tools.
- Implementation status: atlas-only.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.