tools/perf/util/help-unknown-cmd.c
Source file repositories/reference/linux-study-clean/tools/perf/util/help-unknown-cmd.c
File Facts
- System
- Linux kernel
- Corpus path
tools/perf/util/help-unknown-cmd.c- Extension
.c- Size
- 3218 bytes
- Lines
- 123
- Domain
- Support Tooling And Documentation
- Bucket
- tools
- Inferred role
- Support Tooling And Documentation: implementation source
- Status
- source implementation candidate
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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
cache.hconfig.hpoll.hstdio.hstdlib.hsubcmd/help.h../builtin.hlevenshtein.hlinux/zalloc.h
Detected Declarations
function perf_unknown_cmd_configfunction levenshtein_comparefunction add_cmd_list
Annotated Snippet
if (autocorrect > 0) {
fprintf(stderr, "in %0.1f seconds automatically...\n",
(float)autocorrect/10.0);
poll(NULL, 0, autocorrect * 100);
}
return assumed;
}
fprintf(stderr, "perf: '%s' is not a perf-command. See 'perf --help'.\n", cmd);
if (main_cmds->cnt && best_similarity < 6) {
fprintf(stderr, "\nDid you mean %s?\n",
n < 2 ? "this": "one of these");
for (i = 0; i < n; i++)
fprintf(stderr, "\t%s\n", main_cmds->names[i]->name);
}
end:
clean_cmdnames(&other_cmds);
return NULL;
}
Annotation
- Immediate include surface: `cache.h`, `config.h`, `poll.h`, `stdio.h`, `stdlib.h`, `subcmd/help.h`, `../builtin.h`, `levenshtein.h`.
- Detected declarations: `function perf_unknown_cmd_config`, `function levenshtein_compare`, `function add_cmd_list`.
- Atlas domain: Support Tooling And Documentation / tools.
- Implementation status: source implementation candidate.
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.