tools/perf/util/annotate-arch/annotate-sparc.c
Source file repositories/reference/linux-study-clean/tools/perf/util/annotate-arch/annotate-sparc.c
File Facts
- System
- Linux kernel
- Corpus path
tools/perf/util/annotate-arch/annotate-sparc.c- Extension
.c- Size
- 3907 bytes
- Lines
- 178
- 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
string.hlinux/compiler.hlinux/zalloc.h../../util/disasm.h
Detected Declarations
function is_branch_condfunction is_branch_reg_condfunction is_branch_float_cond
Annotated Snippet
if (name[0] == 'b') {
const char *cond = name + 1;
if (cond[0] == 'r') {
if (is_branch_reg_cond(cond + 1))
ops = &jump_ops;
} else if (is_branch_cond(cond)) {
ops = &jump_ops;
}
} else if (name[0] == 'f' && name[1] == 'b') {
if (is_branch_float_cond(name + 2))
ops = &jump_ops;
}
}
if (ops)
arch__associate_ins_ops(arch, name, ops);
return ops;
}
const struct arch *arch__new_sparc(const struct e_machine_and_e_flags *id,
const char *cpuid __maybe_unused)
{
struct arch *arch = zalloc(sizeof(*arch));
if (!arch)
return NULL;
arch->name = "sparc";
arch->id = *id;
arch->associate_instruction_ops = sparc__associate_instruction_ops;
arch->objdump.comment_char = '#';
return arch;
}
Annotation
- Immediate include surface: `string.h`, `linux/compiler.h`, `linux/zalloc.h`, `../../util/disasm.h`.
- Detected declarations: `function is_branch_cond`, `function is_branch_reg_cond`, `function is_branch_float_cond`.
- 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.