tools/testing/selftests/ftrace/test.d/ftrace/func_stack_tracer.tc
Source file repositories/reference/linux-study-clean/tools/testing/selftests/ftrace/test.d/ftrace/func_stack_tracer.tc
File Facts
- System
- Linux kernel
- Corpus path
tools/testing/selftests/ftrace/test.d/ftrace/func_stack_tracer.tc- Extension
.tc- Size
- 977 bytes
- Lines
- 36
- 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 - Max stack tracer
# requires: stack_trace stack_trace_filter
# Test the basic function of max-stack usage tracing
echo > stack_trace_filter
echo 0 > stack_max_size
echo 1 > /proc/sys/kernel/stack_tracer_enabled
: "Fork and wait for the first entry become !lock"
timeout=10
while [ $timeout -ne 0 ]; do
( echo "forked" )
FL=`grep " 0)" stack_trace`
echo $FL | grep -q "lock" || break;
timeout=$((timeout - 1))
done
echo 0 > /proc/sys/kernel/stack_tracer_enabled
echo '*lock*' > stack_trace_filter
test `cat stack_trace_filter | wc -l` -eq `grep lock stack_trace_filter | wc -l`
echo 0 > stack_max_size
echo 1 > /proc/sys/kernel/stack_tracer_enabled
: "Fork and always the first entry including lock"
timeout=10
while [ $timeout -ne 0 ]; do
( echo "forked" )
FL=`grep " 0)" stack_trace`
echo $FL | grep -q "lock"
timeout=$((timeout - 1))
done
echo 0 > /proc/sys/kernel/stack_tracer_enabled
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.