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.

Dependency Surface

Detected Declarations

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

Implementation Notes