tools/objtool/trace.c
Source file repositories/reference/linux-study-clean/tools/objtool/trace.c
File Facts
- System
- Linux kernel
- Corpus path
tools/objtool/trace.c- Extension
.c- Size
- 5444 bytes
- Lines
- 204
- 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
objtool/trace.h
Detected Declarations
function trace_cfi_regfunction trace_cfi_reg_valfunction trace_cfi_reg_reffunction trace_insn_statefunction trace_alt_beginfunction trace_alt_end
Annotated Snippet
if (orig_insn->type == INSN_NOP) {
suffix[0] = (orig_insn->len == 5) ? 'q' : '\0';
TRACE_ADDR(orig_insn, "jmp%-3s %lx <%s+0x%lx>", suffix,
alt_insn->offset, insn_sym(alt_insn)->name,
alt_insn->offset - insn_sym(alt_insn)->offset);
} else {
TRACE_ADDR(orig_insn, "nop%d", orig_insn->len);
trace_depth--;
}
}
}
void trace_alt_end(struct instruction *orig_insn, struct alternative *alt,
char *alt_name)
{
if (alt->type == ALT_TYPE_JUMP_TABLE && orig_insn->type == INSN_NOP)
trace_depth--;
TRACE_ALT_INFO_NOADDR(orig_insn, "\\ ", "%s", alt_name);
}
Annotation
- Immediate include surface: `objtool/trace.h`.
- Detected declarations: `function trace_cfi_reg`, `function trace_cfi_reg_val`, `function trace_cfi_reg_ref`, `function trace_insn_state`, `function trace_alt_begin`, `function trace_alt_end`.
- 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.