tools/perf/trace/beauty/syscalltbl.sh

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

File Facts

System
Linux kernel
Corpus path
tools/perf/trace/beauty/syscalltbl.sh
Extension
.sh
Size
9404 bytes
Lines
275
Domain
Support Tooling And Documentation
Bucket
tools
Inferred role
Support Tooling And Documentation: syscall or user/kernel boundary
Status
core 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

struct syscalltbl {
       const char *const *num_to_name;
       const uint16_t *sorted_names;
       uint16_t e_machine;
       uint16_t num_to_name_len;
       uint16_t sorted_names_len;
};

#if defined(ALL_SYSCALLTBL) || defined(__alpha__)
EOF
build_tables "$tools_dir/perf/arch/alpha/entry/syscalls/syscall.tbl" "$outfile" common,64 EM_ALPHA
cat >> "$outfile" <<EOF
#endif // defined(ALL_SYSCALLTBL) || defined(__alpha__)

#if defined(ALL_SYSCALLTBL) || defined(__arm__) || defined(__aarch64__)
EOF
build_tables "$tools_dir/perf/arch/arm/entry/syscalls/syscall.tbl" "$outfile" common,32,oabi EM_ARM
build_tables "$tools_dir/perf/arch/arm64/entry/syscalls/syscall_64.tbl" "$outfile" common,64,renameat,rlimit,memfd_secret EM_AARCH64
cat >> "$outfile" <<EOF
#endif // defined(ALL_SYSCALLTBL) || defined(__arm__) || defined(__aarch64__)

#if defined(ALL_SYSCALLTBL) || defined(__csky__)
EOF
build_tables "$tools_dir/scripts/syscall.tbl" "$outfile" common,32,csky,time32,stat64,rlimit EM_CSKY
cat >> "$outfile" <<EOF
#endif // defined(ALL_SYSCALLTBL) || defined(__csky__)

#if defined(ALL_SYSCALLTBL) || defined(__mips__)
EOF
build_tables "$tools_dir/perf/arch/mips/entry/syscalls/syscall_n64.tbl" "$outfile" common,64,n64 EM_MIPS
cat >> "$outfile" <<EOF
#endif // defined(ALL_SYSCALLTBL) || defined(__mips__)

#if defined(ALL_SYSCALLTBL) || defined(__hppa__)
#if __BITS_PER_LONG != 64
EOF
build_tables "$tools_dir/perf/arch/parisc/entry/syscalls/syscall.tbl" "$outfile" common,32 EM_PARISC
echo "#else" >> "$outfile"
build_tables "$tools_dir/perf/arch/parisc/entry/syscalls/syscall.tbl" "$outfile" common,64 EM_PARISC
cat >> "$outfile" <<EOF
#endif //__BITS_PER_LONG != 64
#endif // defined(ALL_SYSCALLTBL) || defined(__hppa__)

#if defined(ALL_SYSCALLTBL) || defined(__powerpc__) || defined(__powerpc64__)
EOF
build_tables "$tools_dir/perf/arch/powerpc/entry/syscalls/syscall.tbl" "$outfile" common,32,nospu EM_PPC
build_tables "$tools_dir/perf/arch/powerpc/entry/syscalls/syscall.tbl" "$outfile" common,64,nospu EM_PPC64
cat >> "$outfile" <<EOF
#endif // defined(ALL_SYSCALLTBL) || defined(__powerpc__) || defined(__powerpc64__)

#if defined(ALL_SYSCALLTBL) || defined(__riscv)
#if __BITS_PER_LONG != 64
EOF
build_tables "$tools_dir/scripts/syscall.tbl" "$outfile" common,32,riscv,memfd_secret EM_RISCV
echo "#else" >> "$outfile"
build_tables "$tools_dir/scripts/syscall.tbl" "$outfile" common,64,riscv,rlimit,memfd_secret EM_RISCV
cat >> "$outfile" <<EOF
#endif //__BITS_PER_LONG != 64
#endif // defined(ALL_SYSCALLTBL) || defined(__riscv)
#if defined(ALL_SYSCALLTBL) || defined(__s390x__)
EOF
build_tables "$tools_dir/perf/arch/s390/entry/syscalls/syscall.tbl" "$outfile" common,64,renameat,rlimit,memfd_secret EM_S390
cat >> "$outfile" <<EOF
#endif // defined(ALL_SYSCALLTBL) || defined(__s390x__)

#if defined(ALL_SYSCALLTBL) || defined(__sh__)
EOF
build_tables "$tools_dir/perf/arch/sh/entry/syscalls/syscall.tbl" "$outfile" common,32 EM_SH
cat >> "$outfile" <<EOF
#endif // defined(ALL_SYSCALLTBL) || defined(__sh__)

Annotation

Implementation Notes