tools/perf/trace/beauty/kcmp_type.sh

Source file repositories/reference/linux-study-clean/tools/perf/trace/beauty/kcmp_type.sh

File Facts

System
Linux kernel
Corpus path
tools/perf/trace/beauty/kcmp_type.sh
Extension
.sh
Size
343 bytes
Lines
12
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.

Dependency Surface

Detected Declarations

Annotated Snippet

#!/bin/sh
# SPDX-License-Identifier: LGPL-2.1

[ $# -eq 1 ] && header_dir=$1 || header_dir=tools/include/uapi/linux/

printf "static const char *kcmp_types[] = {\n"
regex='^[[:space:]]+(KCMP_(\w+)),'
grep -E $regex ${header_dir}/kcmp.h | grep -v KCMP_TYPES, | \
	sed -r "s/$regex/\1 \2/g" | \
	xargs printf "\t[%s]\t= \"%s\",\n"
printf "};\n"

Annotation

Implementation Notes