It is used only to generate string tables, not to build perf, so move it to the tools/perf/trace/beauty/{include,arch}/ hierarchies, that is used just for scraping. This is a something that should've have happened, as happened with the linux/socket.h scrapper, do it now as Ian suggested while doing an audit/refactor session in the headers used by perf. No other tools/ living code uses it, just <linux/usbdevice_fs.h> coming from either 'make install_headers' or from the system /usr/include/ directory.
Unified · Split
| @@ -475,11 +475,11 @@ beauty_linux_dir := $(srctree)/tools/perf/trace/beauty/include/linux/ · 474 unmodified lines | |||
| 475 | beauty_uapi_linux_dir := $(srctree)/tools/perf/trace/beauty/include/uapi/linux/ | 475 | beauty_uapi_linux_dir := $(srctree)/tools/perf/trace/beauty/include/uapi/linux/ |
| 476 | beauty_uapi_sound_dir := $(srctree)/tools/perf/trace/beauty/include/uapi/sound/ | 476 | beauty_uapi_sound_dir := $(srctree)/tools/perf/trace/beauty/include/uapi/sound/ |
| 477 | beauty_arch_asm_dir := $(srctree)/tools/perf/trace/beauty/arch/x86/include/asm/ | 477 | beauty_arch_asm_dir := $(srctree)/tools/perf/trace/beauty/arch/x86/include/asm/ |
| 478 | beauty_x86_arch_asm_uapi_dir := $(srctree)/tools/perf/trace/beauty/arch/x86/include/uapi/asm/ | ||
| 478 | 479 | ||
| 479 | linux_uapi_dir := $(srctree)/tools/include/uapi/linux | 480 | linux_uapi_dir := $(srctree)/tools/include/uapi/linux |
| 480 | asm_generic_uapi_dir := $(srctree)/tools/include/uapi/asm-generic | 481 | asm_generic_uapi_dir := $(srctree)/tools/include/uapi/asm-generic |
| 481 | arch_asm_uapi_dir := $(srctree)/tools/arch/$(SRCARCH)/include/uapi/asm/ | 482 | arch_asm_uapi_dir := $(srctree)/tools/arch/$(SRCARCH)/include/uapi/asm/ |
| 482 | x86_arch_asm_uapi_dir := $(srctree)/tools/arch/x86/include/uapi/asm/ | ||
| 483 | x86_arch_asm_dir := $(srctree)/tools/arch/x86/include/asm/ | 483 | x86_arch_asm_dir := $(srctree)/tools/arch/x86/include/asm/ |
| 484 | 484 | ||
| 485 | beauty_outdir := $(OUTPUT)trace/beauty/generated | 485 | beauty_outdir := $(OUTPUT)trace/beauty/generated |
| @@ -617,11 +617,10 @@ $(mmap_prot_array): $(asm_generic_uapi_dir)/mman.h $(asm_generic_uapi_dir)/mman- · 131 unmodified lines | |||
| 617 | $(Q)$(SHELL) '$(mmap_prot_tbl)' $(asm_generic_uapi_dir) $(arch_asm_uapi_dir) > $@ | 617 | $(Q)$(SHELL) '$(mmap_prot_tbl)' $(asm_generic_uapi_dir) $(arch_asm_uapi_dir) > $@ |
| 618 | 618 | ||
| 619 | prctl_option_array := $(beauty_outdir)/prctl_option_array.c | 619 | prctl_option_array := $(beauty_outdir)/prctl_option_array.c |
| 620 | prctl_hdr_dir := $(srctree)/tools/include/uapi/linux/ | ||
| 621 | prctl_option_tbl := $(srctree)/tools/perf/trace/beauty/prctl_option.sh | 620 | prctl_option_tbl := $(srctree)/tools/perf/trace/beauty/prctl_option.sh |
| 622 | 621 | ||
| 623 | $(prctl_option_array): $(prctl_hdr_dir)/prctl.h $(prctl_option_tbl) | 622 | $(prctl_option_array): $(beauty_uapi_linux_dir)/prctl.h $(prctl_option_tbl) |
| 624 | $(Q)$(SHELL) '$(prctl_option_tbl)' $(prctl_hdr_dir) > $@ | 623 | $(Q)$(SHELL) '$(prctl_option_tbl)' $(beauty_uapi_linux_dir) > $@ |
| 625 | 624 | ||
| 626 | usbdevfs_ioctl_array := $(beauty_ioctl_outdir)/usbdevfs_ioctl_array.c | 625 | usbdevfs_ioctl_array := $(beauty_ioctl_outdir)/usbdevfs_ioctl_array.c |
| 627 | usbdevfs_ioctl_tbl := $(srctree)/tools/perf/trace/beauty/usbdevfs_ioctl.sh | 626 | usbdevfs_ioctl_tbl := $(srctree)/tools/perf/trace/beauty/usbdevfs_ioctl.sh |
| @@ -632,8 +631,8 @@ $(usbdevfs_ioctl_array): $(beauty_uapi_linux_dir)/usbdevice_fs.h $(usbdevfs_ioct · 4 unmodified lines | |||
| 632 | x86_arch_prctl_code_array := $(beauty_outdir)/x86_arch_prctl_code_array.c | 631 | x86_arch_prctl_code_array := $(beauty_outdir)/x86_arch_prctl_code_array.c |
| 633 | x86_arch_prctl_code_tbl := $(srctree)/tools/perf/trace/beauty/x86_arch_prctl.sh | 632 | x86_arch_prctl_code_tbl := $(srctree)/tools/perf/trace/beauty/x86_arch_prctl.sh |
| 634 | 633 | ||
| 635 | $(x86_arch_prctl_code_array): $(x86_arch_asm_uapi_dir)/prctl.h $(x86_arch_prctl_code_tbl) | 634 | $(x86_arch_prctl_code_array): $(beauty_x86_arch_asm_uapi_dir)/prctl.h $(x86_arch_prctl_code_tbl) |
| 636 | $(Q)$(SHELL) '$(x86_arch_prctl_code_tbl)' $(x86_arch_asm_uapi_dir) > $@ | 635 | $(Q)$(SHELL) '$(x86_arch_prctl_code_tbl)' $(beauty_x86_arch_asm_uapi_dir) > $@ |
| 637 | 636 | ||
| 638 | x86_arch_irq_vectors_array := $(beauty_outdir)/x86_arch_irq_vectors_array.c | 637 | x86_arch_irq_vectors_array := $(beauty_outdir)/x86_arch_irq_vectors_array.c |
| 639 | x86_arch_irq_vectors_tbl := $(srctree)/tools/perf/trace/beauty/tracepoints/x86_irq_vectors.sh | 638 | x86_arch_irq_vectors_tbl := $(srctree)/tools/perf/trace/beauty/tracepoints/x86_irq_vectors.sh |
| @@ -17,7 +17,6 @@ FILES=( · 16 unmodified lines | |||
| 17 | "include/uapi/linux/in.h" | 17 | "include/uapi/linux/in.h" |
| 18 | "include/uapi/linux/openat2.h" | 18 | "include/uapi/linux/openat2.h" |
| 19 | "include/uapi/linux/perf_event.h" | 19 | "include/uapi/linux/perf_event.h" |
| 20 | "include/uapi/linux/prctl.h" | ||
| 21 | "include/uapi/linux/sched.h" | 20 | "include/uapi/linux/sched.h" |
| 22 | "include/uapi/linux/seccomp.h" | 21 | "include/uapi/linux/seccomp.h" |
| 23 | "include/uapi/linux/stat.h" | 22 | "include/uapi/linux/stat.h" |
| @@ -35,7 +34,6 @@ FILES=( · 11 unmodified lines | |||
| 35 | "arch/x86/include/asm/inat_types.h" | 34 | "arch/x86/include/asm/inat_types.h" |
| 36 | "arch/x86/include/asm/emulate_prefix.h" | 35 | "arch/x86/include/asm/emulate_prefix.h" |
| 37 | "arch/x86/include/asm/msr-index.h" | 36 | "arch/x86/include/asm/msr-index.h" |
| 38 | "arch/x86/include/uapi/asm/prctl.h" | ||
| 39 | "arch/x86/lib/x86-opcode-map.txt" | 37 | "arch/x86/lib/x86-opcode-map.txt" |
| 40 | "arch/x86/tools/gen-insn-attr-x86.awk" | 38 | "arch/x86/tools/gen-insn-attr-x86.awk" |
| 41 | "arch/arm/include/uapi/asm/perf_regs.h" | 39 | "arch/arm/include/uapi/asm/perf_regs.h" |
| @@ -93,9 +91,11 @@ SYNC_CHECK_FILES=( · 51 unmodified lines | |||
| 93 | declare -a BEAUTY_FILES | 91 | declare -a BEAUTY_FILES |
| 94 | BEAUTY_FILES=( | 92 | BEAUTY_FILES=( |
| 95 | "arch/x86/include/asm/irq_vectors.h" | 93 | "arch/x86/include/asm/irq_vectors.h" |
| 94 | "arch/x86/include/uapi/asm/prctl.h" | ||
| 96 | "include/linux/socket.h" | 95 | "include/linux/socket.h" |
| 97 | "include/uapi/linux/fs.h" | 96 | "include/uapi/linux/fs.h" |
| 98 | "include/uapi/linux/mount.h" | 97 | "include/uapi/linux/mount.h" |
| 98 | "include/uapi/linux/prctl.h" | ||
| 99 | "include/uapi/linux/usbdevice_fs.h" | 99 | "include/uapi/linux/usbdevice_fs.h" |
| 100 | "include/uapi/sound/asound.h" | 100 | "include/uapi/sound/asound.h" |
| 101 | ) | 101 | ) |
File renamed without changes.
File renamed without changes.
| @@ -1,18 +1,18 @@ | |||
| 1 | #!/bin/sh | 1 | #!/bin/sh |
| 2 | # SPDX-License-Identifier: LGPL-2.1 | 2 | # SPDX-License-Identifier: LGPL-2.1 |
| 3 | 3 | ||
| 4 | [ $# -eq 1 ] && header_dir=$1 || header_dir=tools/include/uapi/linux/ | 4 | [ $# -eq 1 ] && beauty_uapi_linux_dir=$1 || beauty_uapi_linux_dir=tools/perf/trace/beauty/include/uapi/linux/ |
| 5 | 5 | ||
| 6 | printf "static const char *prctl_options[] = {\n" | 6 | printf "static const char *prctl_options[] = {\n" |
| 7 | regex='^#define[[:space:]]{1}PR_(\w+)[[:space:]]*([[:xdigit:]]+)([[:space:]]*/.*)?$' | 7 | regex='^#define[[:space:]]{1}PR_(\w+)[[:space:]]*([[:xdigit:]]+)([[:space:]]*/.*)?$' |
| 8 | grep -E $regex ${header_dir}/prctl.h | grep -v PR_SET_PTRACER | \ | 8 | grep -E $regex ${beauty_uapi_linux_dir}/prctl.h | grep -v PR_SET_PTRACER | \ |
| 9 | sed -E "s%$regex%\2 \1%g" | \ | 9 | sed -E "s%$regex%\2 \1%g" | \ |
| 10 | sort -n | xargs printf "\t[%s] = \"%s\",\n" | 10 | sort -n | xargs printf "\t[%s] = \"%s\",\n" |
| 11 | printf "};\n" | 11 | printf "};\n" |
| 12 | 12 | ||
| 13 | printf "static const char *prctl_set_mm_options[] = {\n" | 13 | printf "static const char *prctl_set_mm_options[] = {\n" |
| 14 | regex='^#[[:space:]]+define[[:space:]]+PR_SET_MM_(\w+)[[:space:]]*([[:digit:]]+).*' | 14 | regex='^#[[:space:]]+define[[:space:]]+PR_SET_MM_(\w+)[[:space:]]*([[:digit:]]+).*' |
| 15 | grep -E $regex ${header_dir}/prctl.h | \ | 15 | grep -E $regex ${beauty_uapi_linux_dir}/prctl.h | \ |
| 16 | sed -r "s/$regex/\2 \1/g" | \ | 16 | sed -r "s/$regex/\2 \1/g" | \ |
| 17 | sort -n | xargs printf "\t[%s] = \"%s\",\n" | 17 | sort -n | xargs printf "\t[%s] = \"%s\",\n" |
| 18 | printf "};\n" | 18 | printf "};\n" |
| @@ -2,9 +2,9 @@ · 1 unmodified line | |||
| 2 | # Copyright (C) 2018, Red Hat Inc, Arnaldo Carvalho de Melo <acme@redhat.com> | 2 | # Copyright (C) 2018, Red Hat Inc, Arnaldo Carvalho de Melo <acme@redhat.com> |
| 3 | # SPDX-License-Identifier: LGPL-2.1 | 3 | # SPDX-License-Identifier: LGPL-2.1 |
| 4 | 4 | ||
| 5 | [ $# -eq 1 ] && x86_header_dir=$1 || x86_header_dir=tools/arch/x86/include/uapi/asm/ | 5 | [ $# -eq 1 ] && beauty_x86_arch_asm_uapi_dir=$1 || beauty_x86_arch_asm_uapi_dir=tools/perf/trace/beauty/arch/x86/include/uapi/asm/ |
| 6 | 6 | ||
| 7 | prctl_arch_header=${x86_header_dir}/prctl.h | 7 | prctl_arch_header=${beauty_x86_arch_asm_uapi_dir}/prctl.h |
| 8 | 8 | ||
| 9 | print_range () { | 9 | print_range () { |
| 10 | idx=$1 | 10 | idx=$1 |