1. 14 Aug, 2020 21 commits
  2. 13 Aug, 2020 10 commits
    • Alexander Gordeev's avatar
      perf bench numa: Use numa_node_to_cpus() to bind tasks to nodes · 2db13a9b
      Alexander Gordeev authored
      It is currently assumed that each node contains at most nr_cpus/nr_nodes
      CPUs and nodes' CPU ranges do not overlap.
      
      That assumption is generally incorrect as there are archs where a CPU
      number does not depend on to its node number.
      
      This update removes the described assumption by simply calling
      numa_node_to_cpus() interface and using the returned mask for binding
      CPUs to nodes.
      
      Also, variable types and names made consistent in functions using
      cpumask.
      Signed-off-by: default avatarAlexander Gordeev <agordeev@linux.ibm.com>
      Reviewed-by: default avatarSrikar Dronamraju <srikar@linux.vnet.ibm.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Balamuruhan S <bala24@linux.vnet.ibm.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Satheesh Rajendran <sathnaga@linux.vnet.ibm.com>
      Link: http://lore.kernel.org/lkml/20200813113247.GA2014@oc3871087118.ibm.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      2db13a9b
    • Alexander Gordeev's avatar
      perf bench numa: Fix cpumask memory leak in node_has_cpus() · 509f68e3
      Alexander Gordeev authored
      Couple numa_allocate_cpumask() and numa_free_cpumask() functions
      Signed-off-by: default avatarAlexander Gordeev <agordeev@linux.ibm.com>
      Reviewed-by: default avatarSrikar Dronamraju <srikar@linux.vnet.ibm.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Balamuruhan S <bala24@linux.vnet.ibm.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Satheesh Rajendran <sathnaga@linux.vnet.ibm.com>
      Link: http://lore.kernel.org/lkml/20200813113041.GA1685@oc3871087118.ibm.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      509f68e3
    • Daniel Díaz's avatar
      tools build feature: Quote CC and CXX for their arguments · fa5c8931
      Daniel Díaz authored
      When using a cross-compilation environment, such as OpenEmbedded,
      the CC an CXX variables are set to something more than just a
      command: there are arguments (such as --sysroot) that need to be
      passed on to the compiler so that the right set of headers and
      libraries are used.
      
      For the particular case that our systems detected, CC is set to
      the following:
      
        export CC="aarch64-linaro-linux-gcc  --sysroot=/oe/build/tmp/work/machine/perf/1.0-r9/recipe-sysroot"
      
      Without quotes, detection is as follows:
      
        Auto-detecting system features:
        ...                         dwarf: [ OFF ]
        ...            dwarf_getlocations: [ OFF ]
        ...                         glibc: [ OFF ]
        ...                          gtk2: [ OFF ]
        ...                        libbfd: [ OFF ]
        ...                        libcap: [ OFF ]
        ...                        libelf: [ OFF ]
        ...                       libnuma: [ OFF ]
        ...        numa_num_possible_cpus: [ OFF ]
        ...                       libperl: [ OFF ]
        ...                     libpython: [ OFF ]
        ...                     libcrypto: [ OFF ]
        ...                     libunwind: [ OFF ]
        ...            libdw-dwarf-unwind: [ OFF ]
        ...                          zlib: [ OFF ]
        ...                          lzma: [ OFF ]
        ...                     get_cpuid: [ OFF ]
        ...                           bpf: [ OFF ]
        ...                        libaio: [ OFF ]
        ...                       libzstd: [ OFF ]
        ...        disassembler-four-args: [ OFF ]
      
        Makefile.config:414: *** No gnu/libc-version.h found, please install glibc-dev[el].  Stop.
        Makefile.perf:230: recipe for target 'sub-make' failed
        make[1]: *** [sub-make] Error 2
        Makefile:69: recipe for target 'all' failed
        make: *** [all] Error 2
      
      With CC and CXX quoted, some of those features are now detected.
      
      Fixes: e3232c2f ("tools build feature: Use CC and CXX from parent")
      Signed-off-by: default avatarDaniel Díaz <daniel.diaz@linaro.org>
      Reviewed-by: default avatarThomas Hebb <tommyhebb@gmail.com>
      Cc: Alexei Starovoitov <ast@kernel.org>
      Cc: Andrii Nakryiko <andriin@fb.com>
      Cc: Daniel Borkmann <daniel@iogearbox.net>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: John Fastabend <john.fastabend@gmail.com>
      Cc: KP Singh <kpsingh@chromium.org>
      Cc: Martin KaFai Lau <kafai@fb.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Song Liu <songliubraving@fb.com>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Yonghong Song <yhs@fb.com>
      Link: http://lore.kernel.org/lkml/20200812221518.2869003-1-daniel.diaz@linaro.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      fa5c8931
    • Jiri Olsa's avatar
      perf tools: Fix module symbol processing · b2fe96a3
      Jiri Olsa authored
      The 'dso->kernel' condition is true also for kernel modules now,
      and there are several places that were omited by the initial change:
      
        - we need to identify modules separately in dso__process_kernel_symbol
        - we need to set 'dso->kernel' for module from buildid table
        - there's no need to use 'dso->kernel || kmodule' in one condition
      
      Committer testing:
      
      Before:
      
        # perf test -v object
        <SNIP>
        Objdump command is: objdump -z -d --start-address=0xffffffff813e682f --stop-address=0xffffffff813e68af /usr/lib/debug/lib/modules/5.7.14-200.fc32.x86_64/vmlinux
        Bytes read match those read by objdump
        Reading object code for memory address: 0xffffffffc02dc257
        File is: /lib/modules/5.7.14-200.fc32.x86_64/kernel/arch/x86/crypto/crc32c-intel.ko.xz
        On file address is: 0xffffffffc02dc2e7
        dso__data_read_offset failed
        test child finished with -1
        ---- end ----
        Object code reading: FAILED!
        #
      
      After:
      
        # perf test object
        26: Object code reading                                   : Ok
        # perf test object
        26: Object code reading                                   : Ok
        # perf test object
        26: Object code reading                                   : Ok
        # perf test object
        26: Object code reading                                   : Ok
        # perf test object
        26: Object code reading                                   : Ok
        #
      
      Fixes: 02213cec ("perf maps: Mark module DSOs with kernel type")
      Reported-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Signed-off-by: default avatarJiri Olsa <jolsa@kernel.org>
      b2fe96a3
    • Jiri Olsa's avatar
      perf tools: Rename 'enum dso_kernel_type' to 'enum dso_space_type' · 1c695c88
      Jiri Olsa authored
      Rename enum dso_kernel_type to enum dso_space_type, which seems like
      better fit.
      
      Committer notes:
      
      This is used with 'struct dso'->kernel, which once was a boolean, so
      DSO_SPACE__USER is zero, !zero means some sort of kernel space, be it
      the host kernel space or a guest kernel space.
      Signed-off-by: default avatarJiri Olsa <jolsa@kernel.org>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      1c695c88
    • Rob Herring's avatar
      MAINTAINERS: Add missing tools/lib/perf/ path to perf maintainers · ceafdd66
      Rob Herring authored
      Commit 3ce311af ("libperf: Move to tools/lib/perf") moved libperf
      out of tools/perf/, but failed to update MAINTAINERS.
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lore.kernel.org/lkml/20200807193225.3904108-1-robh@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      ceafdd66
    • Rob Herring's avatar
      libperf: Fix man page typos · ce746d43
      Rob Herring authored
      Fix various typos and inconsistent capitalization of CPU in the libperf
      man pages.
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lore.kernel.org/lkml/20200807193241.3904545-1-robh@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      ce746d43
    • Michael Petlan's avatar
      perf test: Allow multiple probes in record+script_probe_vfs_getname.sh · 194cb6b5
      Michael Petlan authored
      Sometimes when adding a kprobe by perf, it results in multiple probe
      points, such as the following:
      
        # ./perf probe -l
          probe:vfs_getname    (on getname_flags:73@fs/namei.c with pathname)
          probe:vfs_getname_1  (on getname_flags:73@fs/namei.c with pathname)
          probe:vfs_getname_2  (on getname_flags:73@fs/namei.c with pathname)
        # cat /sys/kernel/debug/tracing/kprobe_events
        p:probe/vfs_getname _text+5501804 pathname=+0(+0(%gpr31)):string
        p:probe/vfs_getname_1 _text+5505388 pathname=+0(+0(%gpr31)):string
        p:probe/vfs_getname_2 _text+5508396 pathname=+0(+0(%gpr31)):string
      
      In this test, we need to record all of them and expect any of them in
      the perf-script output, since it's not clear which one will be used for
      the desired syscall:
      
        # perf stat -e probe:vfs_getname\* -- touch /tmp/nic
      
         Performance counter stats for 'touch /tmp/nic':
      
                      31      probe:vfs_getname_2
                       0      probe:vfs_getname_1
                       1      probe:vfs_getname
             0.001421826 seconds time elapsed
      
             0.001506000 seconds user
             0.000000000 seconds sys
      
      If the test relies only on probe:vfs_getname, it might easily miss the
      relevant data.
      Signed-off-by: default avatarMichael Petlan <mpetlan@redhat.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      LPU-Reference: 20200722135845.29958-1-mpetlan@redhat.com
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      194cb6b5
    • Vincent Whitchurch's avatar
      perf bench mem: Always memset source before memcpy · 1beaef29
      Vincent Whitchurch authored
      For memcpy, the source pages are memset to zero only when --cycles is
      used.  This leads to wildly different results with or without --cycles,
      since all sources pages are likely to be mapped to the same zero page
      without explicit writes.
      
      Before this fix:
      
      $ export cmd="./perf stat -e LLC-loads -- ./perf bench \
        mem memcpy -s 1024MB -l 100 -f default"
      $ $cmd
      
               2,935,826      LLC-loads
             3.821677452 seconds time elapsed
      
      $ $cmd --cycles
      
             217,533,436      LLC-loads
             8.616725985 seconds time elapsed
      
      After this fix:
      
      $ $cmd
      
             214,459,686      LLC-loads
             8.674301124 seconds time elapsed
      
      $ $cmd --cycles
      
             214,758,651      LLC-loads
             8.644480006 seconds time elapsed
      
      Fixes: 47b5757b ("perf bench mem: Move boilerplate memory allocation to the infrastructure")
      Signed-off-by: default avatarVincent Whitchurch <vincent.whitchurch@axis.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: kernel@axis.com
      Link: http://lore.kernel.org/lkml/20200810133404.30829-1-vincent.whitchurch@axis.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      1beaef29
    • David Ahern's avatar
      perf sched: Prefer sched_waking event when it exists · d566a9c2
      David Ahern authored
      Commit fbd705a0 ("sched: Introduce the 'trace_sched_waking'
      tracepoint") added sched_waking tracepoint which should be preferred
      over sched_wakeup when analyzing scheduling delays.
      
      Update 'perf sched record' to collect sched_waking events if it exists
      and fallback to sched_wakeup if it does not. Similarly, update timehist
      command to skip sched_wakeup events if the session includes sched_waking
      (ie., sched_waking is preferred over sched_wakeup).
      Signed-off-by: default avatarDavid Ahern <dsahern@kernel.org>
      Acked-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Link: http://lore.kernel.org/lkml/20200807164844.44870-1-dsahern@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      d566a9c2
  3. 12 Aug, 2020 9 commits
    • Colin Ian King's avatar
      perf bench: Fix a couple of spelling mistakes in options text · f9f95068
      Colin Ian King authored
      There are a couple of spelling mistakes in the text. Fix these.
      Signed-off-by: default avatarColin King <colin.king@canonical.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: kernel-janitors@vger.kernel.org
      Link: http://lore.kernel.org/lkml/20200812064647.200132-1-colin.king@canonical.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      f9f95068
    • Alexander Gordeev's avatar
      perf bench numa: Fix benchmark names · 85372c69
      Alexander Gordeev authored
      Standard benchmark names let users know the tests specifics.  For
      example "2x1-bw-process" name tells that two processes one thread each
      are run and the RAM bandwidth is measured.
      
      Several benchmarks names do not correspond to their actual running
      configuration. Fix that and also some whitespace and comment
      inconsistencies.
      Signed-off-by: default avatarAlexander Gordeev <agordeev@linux.ibm.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lore.kernel.org/lkml/6b6f2084f132ee8e9203dc7c32f9deb209b87a68.1597004831.git.agordeev@linux.ibm.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      85372c69
    • Alexander Gordeev's avatar
      perf bench numa: Fix number of processes in "2x3-convergence" test · 72d69c2a
      Alexander Gordeev authored
      Signed-off-by: default avatarAlexander Gordeev <agordeev@linux.ibm.com>
      Acked-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lore.kernel.org/lkml/d949f5f48e17fc816f3beecf8479f1b2480345e4.1597004831.git.agordeev@linux.ibm.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      72d69c2a
    • Arnaldo Carvalho de Melo's avatar
      tools headers UAPI: Sync kvm.h headers with the kernel sources · 6016e034
      Arnaldo Carvalho de Melo authored
      To pick the changes in:
      
        3edd6839 ("KVM: x86: Add a capability for GUEST_MAXPHYADDR < HOST_MAXPHYADDR support")
        1aa561b1 ("kvm: x86: Add "last CPU" to some KVM_EXIT information")
        23a60f83 ("s390/kvm: diagnose 0x318 sync and reset")
      
      That do not result in any change in tooling, as the additions are not
      being used in any table generator.
      
      This silences these perf build warning:
      
        Warning: Kernel ABI header at 'tools/include/uapi/linux/kvm.h' differs from latest version at 'include/uapi/linux/kvm.h'
        diff -u tools/include/uapi/linux/kvm.h include/uapi/linux/kvm.h
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Christian Borntraeger <borntraeger@de.ibm.com>
      Cc: Collin Walling <walling@linux.ibm.com>
      Cc: Jim Mattson <jmattson@google.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Mohammed Gamal <mgamal@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      6016e034
    • Arnaldo Carvalho de Melo's avatar
      tools include UAPI: Sync linux/vhost.h with the kernel sources · fe452fb8
      Arnaldo Carvalho de Melo authored
      To get the changes in:
      
        25abc060 ("vhost-vdpa: support IOTLB batching hints")
      
      This doesn't result in any changes in tooling, no new ioctls to be
      picked up by the id->string table generators, etc.
      
      Silencing this perf build warning:
      
        Warning: Kernel ABI header at 'tools/include/uapi/linux/vhost.h' differs from latest version at 'include/uapi/linux/vhost.h'
        diff -u tools/include/uapi/linux/vhost.h include/uapi/linux/vhost.h
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Jason Wang <jasowang@redhat.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Michael S. Tsirkin <mst@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      fe452fb8
    • Arnaldo Carvalho de Melo's avatar
      tools headers kvm s390: Sync headers with the kernel sources · 23db762b
      Arnaldo Carvalho de Melo authored
      To pick the changes in:
      
        23a60f83 ("s390/kvm: diagnose 0x318 sync and reset")
      
      None of them trigger any changes in tooling, this time this is just to silence
      these perf build warnings:
      
        Warning: Kernel ABI header at 'tools/arch/s390/include/uapi/asm/kvm.h' differs from latest version at 'arch/s390/include/uapi/asm/kvm.h'
        diff -u tools/arch/s390/include/uapi/asm/kvm.h arch/s390/include/uapi/asm/kvm.h
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Christian Borntraeger <borntraeger@de.ibm.com>
      Cc: Collin Walling <walling@linux.ibm.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      23db762b
    • Arnaldo Carvalho de Melo's avatar
      perf trace beauty: Use the autogenerated protocol family table · f3cf7fa9
      Arnaldo Carvalho de Melo authored
      That helps us not to lose new protocol families when they are
      introduced, replacing that hardcoded, dated family->string table.
      
      To recap what this allows us to do:
      
        # perf trace -e syscalls:sys_enter_socket/max-stack=10/ --filter=family==INET --max-events=1
           0.000 fetchmail/41097 syscalls:sys_enter_socket(family: INET, type: DGRAM|CLOEXEC|NONBLOCK, protocol: IP)
                                             __GI___socket (inlined)
                                             reopen (/usr/lib64/libresolv-2.31.so)
                                             send_dg (/usr/lib64/libresolv-2.31.so)
                                             __res_context_send (/usr/lib64/libresolv-2.31.so)
                                             __GI___res_context_query (inlined)
                                             __GI___res_context_search (inlined)
                                             _nss_dns_gethostbyname4_r (/usr/lib64/libnss_dns-2.31.so)
                                             gaih_inet.constprop.0 (/usr/lib64/libc-2.31.so)
                                             __GI_getaddrinfo (inlined)
                                             [0x15cb2] (/usr/bin/fetchmail)
        #
      
      More work is still needed to allow for the more natura strace-like
      syscall name usage instead of the trace event name:
      
        # perf trace -e socket/max-stack=10,family==INET/ --max-events=1
      
      I.e. to allow for modifiers to follow the syscall name and for logical
      expressions to be accepted as filters to use with that syscall, be it as
      trace event filters or BPF based ones.
      
      Using -v we can see how the trace event filter is built:
      
        # perf trace -v -e syscalls:sys_enter_socket/call-graph=dwarf/ --filter=family==INET --max-events=2
        <SNIP>
        New filter for syscalls:sys_enter_socket: (family==0x2) && (common_pid != 41384 && common_pid != 2836)
        <SNIP>
      
        $ tools/perf/trace/beauty/socket.sh | grep -w 2
      	[2] = "INET",
        $
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      f3cf7fa9
    • Arnaldo Carvalho de Melo's avatar
      perf trace beauty: Add script to autogenerate socket families table · 58277f50
      Arnaldo Carvalho de Melo authored
      To use with 'perf trace', to convert the protocol families to strings,
      e.g:
      
        $ tools/perf/trace/beauty/socket.sh
        static const char *socket_families[] = {
        	[0] = "UNSPEC",
        	[1] = "LOCAL",
        	[2] = "INET",
        	[3] = "AX25",
        	[4] = "IPX",
        	[5] = "APPLETALK",
        	[6] = "NETROM",
        	[7] = "BRIDGE",
        	[8] = "ATMPVC",
        	[9] = "X25",
        	[10] = "INET6",
        	[11] = "ROSE",
        	[12] = "DECnet",
        	[13] = "NETBEUI",
        	[14] = "SECURITY",
        	[15] = "KEY",
        	[16] = "NETLINK",
        	[17] = "PACKET",
        	[18] = "ASH",
        	[19] = "ECONET",
        	[20] = "ATMSVC",
        	[21] = "RDS",
        	[22] = "SNA",
        	[23] = "IRDA",
        	[24] = "PPPOX",
        	[25] = "WANPIPE",
        	[26] = "LLC",
        	[27] = "IB",
        	[28] = "MPLS",
        	[29] = "CAN",
        	[30] = "TIPC",
        	[31] = "BLUETOOTH",
        	[32] = "IUCV",
        	[33] = "RXRPC",
        	[34] = "ISDN",
        	[35] = "PHONET",
        	[36] = "IEEE802154",
        	[37] = "CAIF",
        	[38] = "ALG",
        	[39] = "NFC",
        	[40] = "VSOCK",
        	[41] = "KCM",
        	[42] = "QIPCRTR",
        	[43] = "SMC",
        	[44] = "XDP",
        };
        $
      
      This uses a copy of include/linux/socket.h that is kept in a directory
      to be used just for these table generation scripts and for checking if
      the kernel has a new file that maybe gets something new for these
      tables.
      
      This allows us to:
      
      - Avoid accessing files outside tools/, in the kernel sources, that may
        be changed in unexpected ways and thus break these scripts.
      
      - Notice when those files change and thus check if the changes don't
        break those scripts, update them to automatically get the new
        definitions, a new socket family, for instance.
      
      - Not add then to the tools/include/ where it may end up used while
        building the tools and end up requiring dragging yet more stuff from
        the kernel or plain break the build in some of the myriad environments
        where perf may be built.
      
      This will replace the previous static array in tools/perf/ that was
      dated and was already missing the AF_KCM, AF_QIPCRTR, AF_SMC and AF_XDP
      families.
      
      The next cset will wire this up to the perf build process.
      
      At some point this must be made into a library to be used in places such
      as libtraceevent, bpftrace, etc.
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      58277f50
    • Linus Torvalds's avatar
      Merge tag 'tag-chrome-platform-for-v5.9' of... · fb893de3
      Linus Torvalds authored
      Merge tag 'tag-chrome-platform-for-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux
      
      Pull chrome platform updates from Benson Leung:
       "cros_ec_typec:
      
         - Add support for switch control and alternate modes to the Chrome EC
           Type C port driver
      
         - Add basic suspend/resume support
      
        sensorhub:
      
         - Fix timestamp overflow issue
      
         - Fix legacy timestamp spreading on Nami systems
      
        cros_ec_proto:
      
         - After removing all users of, stop exporting cros_ec_cmd_xfer
      
         - Check for missing EC_CMD_HOST_EVENT_GET_WAKE_MASK and ignore
           wakeups on old ECs
      
        misc:
      
         - Documentation warning cleanup
      
         - Fix double unlock issue in ishtp"
      
      * tag 'tag-chrome-platform-for-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux: (21 commits)
        platform/chrome: cros_ec_proto: check for missing EC_CMD_HOST_EVENT_GET_WAKE_MASK
        platform/chrome: cros_ec_proto: ignore unnecessary wakeups on old ECs
        platform/chrome: cros_ec_sensorhub: Simplify legacy timestamp spreading
        platform/chrome: cros_ec_proto: Do not export cros_ec_cmd_xfer()
        platform/chrome: cros_ec_typec: Unregister partner on error
        platform/chrome: cros_ec_sensorhub: Fix EC timestamp overflow
        platform/chrome: cros_ec_typec: Add PM support
        platform/chrome: cros_ec_typec: Use workqueue for port update
        platform/chrome: cros_ec_typec: Add a dependency on USB_ROLE_SWITCH
        platform/chrome: cros_ec_ishtp: Fix a double-unlock issue
        platform/chrome: cros_ec_rpmsg: Document missing struct parameters
        platform/chrome: cros_ec_spi: Document missing function parameters
        platform/chrome: cros_ec_typec: Add TBT compat support
        platform/chrome: cros_ec: Add TBT pd_ctrl fields
        platform/chrome: cros_ec_typec: Make configure_mux static
        platform/chrome: cros_ec_typec: Support DP alt mode
        platform/chrome: cros_ec_typec: Add USB mux control
        platform/chrome: cros_ec_typec: Register PD CTRL cmd v2
        platform/chrome: cros_ec: Update mux state bits
        platform/chrome: cros_ec_typec: Register Type C switches
        ...
      fb893de3