1. 21 Dec, 2022 24 commits
  2. 20 Dec, 2022 8 commits
    • Namhyung Kim's avatar
      perf lock contention: Factor out lock_type_table · 59119c09
      Namhyung Kim authored
      Move it out of get_type_str() so that we can reuse the table for others
      later.
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Blake Jones <blakejones@google.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Song Liu <song@kernel.org>
      Cc: bpf@vger.kernel.org
      Link: https://lore.kernel.org/r/20221219201732.460111-2-namhyung@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      59119c09
    • Yang Jihong's avatar
      perf probe: Check -v and -q options in the right place · 8b269b75
      Yang Jihong authored
      Check the -q and -v options first to return earlier on error.
      
      Before:
      
        # perf probe -q -v test
        probe-definition(0): test
        symbol:test file:(null) line:0 offset:0 return:0 lazy:(null)
        0 arguments
          Error: -v and -q are exclusive.
      
      After:
      
        # perf probe -q -v test
          Error: -v and -q are exclusive.
      
      Fixes: 5e17b28f ("perf probe: Add --quiet option to suppress output result message")
      Reviewed-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Signed-off-by: default avatarYang Jihong <yangjihong1@huawei.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Carsten Haitzler <carsten.haitzler@arm.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Leo Yan <leo.yan@linaro.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Martin KaFai Lau <martin.lau@kernel.org>
      Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      Cc: Masami Hiramatsu <mhiramat@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Ravi Bangoria <ravi.bangoria@amd.com>
      Link: https://lore.kernel.org/r/20221220035702.188413-4-yangjihong1@huawei.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      8b269b75
    • Yang Jihong's avatar
      perf tools: Fix usage of the verbose variable · 7c0a6144
      Yang Jihong authored
      The data type of the verbose variable is integer and can be negative,
      replace improperly used cases in a unified manner:
       1. if (verbose)        => if (verbose > 0)
       2. if (!verbose)       => if (verbose <= 0)
       3. if (XX && verbose)  => if (XX && verbose > 0)
       4. if (XX && !verbose) => if (XX && verbose <= 0)
      Reviewed-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Signed-off-by: default avatarYang Jihong <yangjihong1@huawei.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Carsten Haitzler <carsten.haitzler@arm.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Leo Yan <leo.yan@linaro.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Martin KaFai Lau <martin.lau@kernel.org>
      Cc: Masami Hiramatsu <mhiramat@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Ravi Bangoria <ravi.bangoria@amd.com>
      Link: https://lore.kernel.org/r/20221220035702.188413-3-yangjihong1@huawei.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      7c0a6144
    • Yang Jihong's avatar
      perf debug: Set debug_peo_args and redirect_to_stderr variable to correct... · 188ac720
      Yang Jihong authored
      perf debug: Set debug_peo_args and redirect_to_stderr variable to correct values in perf_quiet_option()
      
      When perf uses quiet mode, perf_quiet_option() sets the 'debug_peo_args'
      variable to -1, and display_attr() incorrectly determines the value of
      'debug_peo_args'.  As a result, unexpected information is displayed.
      
      Before:
      
        # perf record --quiet -- ls > /dev/null
        ------------------------------------------------------------
        perf_event_attr:
          size                             128
          { sample_period, sample_freq }   4000
          sample_type                      IP|TID|TIME|PERIOD
          read_format                      ID|LOST
          disabled                         1
          inherit                          1
          mmap                             1
          comm                             1
          freq                             1
          enable_on_exec                   1
          task                             1
          precise_ip                       3
          sample_id_all                    1
          exclude_guest                    1
          mmap2                            1
          comm_exec                        1
          ksymbol                          1
          bpf_event                        1
        ------------------------------------------------------------
        ...
      
      After:
        # perf record --quiet -- ls > /dev/null
        #
      
      redirect_to_stderr is a similar problem.
      
      Fixes: f78eaef0 ("perf tools: Allow to force redirect pr_debug to stderr.")
      Fixes: ccd26741 ("perf tool: Provide an option to print perf_event_open args and return value")
      Suggested-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Reviewed-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Signed-off-by: default avatarYang Jihong <yangjihong1@huawei.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Carsten Haitzler <carsten.haitzler@arm.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Leo Yan <leo.yan@linaro.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: martin.lau@kernel.org
      Cc: Masami Hiramatsu <mhiramat@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Ravi Bangoria <ravi.bangoria@amd.com>
      Cc: Ravi Bangoria <ravi.bangoria@linux.ibm.com>
      Link: https://lore.kernel.org/r/20221220035702.188413-2-yangjihong1@huawei.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      188ac720
    • Arnaldo Carvalho de Melo's avatar
      tools headers UAPI: Sync linux/kvm.h with the kernel sources · b235e5b5
      Arnaldo Carvalho de Melo authored
      To pick the changes in:
      
        86bdf3eb ("KVM: Support dirty ring in conjunction with bitmap")
      
      That just rebuilds perf, as these patches don't add any new KVM ioctl to
      be harvested for the the 'perf trace' ioctl syscall argument
      beautifiers.
      
      This is also by now used by tools/testing/selftests/kvm/, a simple test
      build didn't succeed, but for another reason:
      
        lib/kvm_util.c: In function ‘vm_enable_dirty_ring’:
        lib/kvm_util.c:125:30: error: ‘KVM_CAP_DIRTY_LOG_RING_ACQ_REL’ undeclared (first use in this function); did you mean ‘KVM_CAP_DIRTY_LOG_RING’?
          125 |         if (vm_check_cap(vm, KVM_CAP_DIRTY_LOG_RING_ACQ_REL))
              |                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
              |                              KVM_CAP_DIRTY_LOG_RING
      
      I'll send a separate patch for that.
      
      This silences this 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: Gavin Shan <gshan@redhat.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Marc Zyngier <maz@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Link: http://lore.kernel.org/lkml/Y6H3b1Q4Msjy5Yz3@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      b235e5b5
    • Arnaldo Carvalho de Melo's avatar
      tools headers UAPI: Sync powerpc syscall table with the kernel sources · 6d5edd15
      Arnaldo Carvalho de Melo authored
      To pick the changes in these csets:
      
        ce883a2b ("powerpc/32: fix syscall wrappers with 64-bit arguments")
      
      That doesn't cause any changes in the perf tools.
      
      This table is used in tools perf to allow features as described in the
      last update to this file.
      
      This addresses this perf build warning:
      
        Warning: Kernel ABI header at 'tools/perf/arch/powerpc/entry/syscalls/syscall.tbl' differs from latest version at 'arch/powerpc/kernel/syscalls/syscall.tbl'
        diff -u tools/perf/arch/powerpc/entry/syscalls/syscall.tbl arch/powerpc/kernel/syscalls/syscall.tbl
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Andreas Schwab <schwab@linux-m68k.org>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Link: https://lore.kernel.org/lkml/Y6H0C5plZ4V4aiPm@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      6d5edd15
    • Arnaldo Carvalho de Melo's avatar
      tools arch x86: Sync the msr-index.h copy with the kernel sources · a66558dc
      Arnaldo Carvalho de Melo authored
      To pick up the changes in:
      
        97fa21f6 ("x86/resctrl: Move MSR defines into msr-index.h")
        7420ae3b ("x86/intel_epb: Set Alder Lake N and Raptor Lake P normal EPB")
      
      Addressing these tools/perf build warnings:
      
          diff -u tools/arch/x86/include/asm/msr-index.h arch/x86/include/asm/msr-index.h
          Warning: Kernel ABI header at 'tools/arch/x86/include/asm/msr-index.h' differs from latest version at 'arch/x86/include/asm/msr-index.h'
      
      That makes the beautification scripts to pick some new entries:
      
        $ tools/perf/trace/beauty/tracepoints/x86_msr.sh > before
        $ cp arch/x86/include/asm/msr-index.h tools/arch/x86/include/asm/msr-index.h
        $ tools/perf/trace/beauty/tracepoints/x86_msr.sh > after
        $ diff -u before after
        --- before	2022-12-20 14:28:40.893794072 -0300
        +++ after	2022-12-20 14:28:54.831993914 -0300
        @@ -266,6 +266,7 @@
         	[0xc0000104 - x86_64_specific_MSRs_offset] = "AMD64_TSC_RATIO",
         	[0xc000010e - x86_64_specific_MSRs_offset] = "AMD64_LBR_SELECT",
         	[0xc000010f - x86_64_specific_MSRs_offset] = "AMD_DBG_EXTN_CFG",
        +	[0xc0000200 - x86_64_specific_MSRs_offset] = "IA32_MBA_BW_BASE",
         	[0xc0000300 - x86_64_specific_MSRs_offset] = "AMD64_PERF_CNTR_GLOBAL_STATUS",
         	[0xc0000301 - x86_64_specific_MSRs_offset] = "AMD64_PERF_CNTR_GLOBAL_CTL",
         	[0xc0000302 - x86_64_specific_MSRs_offset] = "AMD64_PERF_CNTR_GLOBAL_STATUS_CLR",
        $
      
      Now one can trace systemwide asking to see backtraces to where that MSR
      is being read/written, see this example with a previous update:
      
        # perf trace -e msr:*_msr/max-stack=32/ --filter="msr>=IA32_U_CET && msr<=IA32_INT_SSP_TAB"
        ^C#
      
      If we use -v (verbose mode) we can see what it does behind the scenes:
      
        # perf trace -v -e msr:*_msr/max-stack=32/ --filter="msr>=IA32_U_CET && msr<=IA32_INT_SSP_TAB"
        Using CPUID AuthenticAMD-25-21-0
        0x6a0
        0x6a8
        New filter for msr:read_msr: (msr>=0x6a0 && msr<=0x6a8) && (common_pid != 597499 && common_pid != 3313)
        0x6a0
        0x6a8
        New filter for msr:write_msr: (msr>=0x6a0 && msr<=0x6a8) && (common_pid != 597499 && common_pid != 3313)
        mmap size 528384B
        ^C#
      
      Example with a frequent msr:
      
        # perf trace -v -e msr:*_msr/max-stack=32/ --filter="msr==IA32_SPEC_CTRL" --max-events 2
        Using CPUID AuthenticAMD-25-21-0
        0x48
        New filter for msr:read_msr: (msr==0x48) && (common_pid != 2612129 && common_pid != 3841)
        0x48
        New filter for msr:write_msr: (msr==0x48) && (common_pid != 2612129 && common_pid != 3841)
        mmap size 528384B
        Looking at the vmlinux_path (8 entries long)
        symsrc__init: build id mismatch for vmlinux.
        Using /proc/kcore for kernel data
        Using /proc/kallsyms for symbols
           0.000 Timer/2525383 msr:write_msr(msr: IA32_SPEC_CTRL, val: 6)
                                             do_trace_write_msr ([kernel.kallsyms])
                                             do_trace_write_msr ([kernel.kallsyms])
                                             __switch_to_xtra ([kernel.kallsyms])
                                             __switch_to ([kernel.kallsyms])
                                             __schedule ([kernel.kallsyms])
                                             schedule ([kernel.kallsyms])
                                             futex_wait_queue_me ([kernel.kallsyms])
                                             futex_wait ([kernel.kallsyms])
                                             do_futex ([kernel.kallsyms])
                                             __x64_sys_futex ([kernel.kallsyms])
                                             do_syscall_64 ([kernel.kallsyms])
                                             entry_SYSCALL_64_after_hwframe ([kernel.kallsyms])
                                             __futex_abstimed_wait_common64 (/usr/lib64/libpthread-2.33.so)
           0.030 :0/0 msr:write_msr(msr: IA32_SPEC_CTRL, val: 2)
                                             do_trace_write_msr ([kernel.kallsyms])
                                             do_trace_write_msr ([kernel.kallsyms])
                                             __switch_to_xtra ([kernel.kallsyms])
                                             __switch_to ([kernel.kallsyms])
                                             __schedule ([kernel.kallsyms])
                                             schedule_idle ([kernel.kallsyms])
                                             do_idle ([kernel.kallsyms])
                                             cpu_startup_entry ([kernel.kallsyms])
                                             secondary_startup_64_no_verify ([kernel.kallsyms])
        #
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Borislav Petkov <bp@suse.de>
      Cc: Dave Hansen <dave.hansen@linux.intel.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
      Link: https://lore.kernel.org/lkml/Y6HyTOGRNvKfCVe4@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      a66558dc
    • Arnaldo Carvalho de Melo's avatar
      tools headers UAPI: Sync drm/i915_drm.h with the kernel sources · eeac18e2
      Arnaldo Carvalho de Melo authored
      To pick up the changes in:
      
        bc7ed4d3 ("drm/i915/perf: Apply Wa_18013179988")
        81d5f7d9 ("drm/i915/perf: Add 32-bit OAG and OAR formats for DG2")
        8133a6da ("drm/i915: enable PS64 support for DG2")
        b76c14c8 ("drm/i915/huc: better define HuC status getparam possible return values.")
        94dfc73e ("treewide: uapi: Replace zero-length arrays with flexible-array members")
      
      That doesn't add any ioctl, so no changes in tooling.
      
      This silences this perf build warning:
      
        Warning: Kernel ABI header at 'tools/include/uapi/drm/i915_drm.h' differs from latest version at 'include/uapi/drm/i915_drm.h'
        diff -u tools/include/uapi/drm/i915_drm.h include/uapi/drm/i915_drm.h
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
      Cc: Gustavo A. R. Silva <gustavoars@kernel.org>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: John Harrison <John.C.Harrison@Intel.com>
      Cc: Matthew Auld <matthew.auld@intel.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
      Link: https://lore.kernel.org/lkml/Y6HukoRaZh2R4j5U@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      eeac18e2
  3. 19 Dec, 2022 8 commits
    • Arnaldo Carvalho de Melo's avatar
      tools headers UAPI: Sync linux/fscrypt.h with the kernel sources · 43a3ce77
      Arnaldo Carvalho de Melo authored
      To pick the changes from:
      
        f8b435f9 ("fscrypt: remove unused Speck definitions")
        e0cefada ("fscrypt: Add SM4 XTS/CTS symmetric algorithm support")
      
      That don't result in any changes in tooling, just causes this to be
      rebuilt:
      
        CC      /tmp/build/perf-urgent/trace/beauty/sync_file_range.o
        LD      /tmp/build/perf-urgent/trace/beauty/perf-in.o
      
      addressing this perf build warning:
      
        Warning: Kernel ABI header at 'tools/include/uapi/linux/fscrypt.h' differs from latest version at 'include/uapi/linux/fscrypt.h'
        diff -u tools/include/uapi/linux/fscrypt.h include/uapi/linux/fscrypt.h
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Eric Biggers <ebiggers@google.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Tianjia Zhang <tianjia.zhang@linux.alibaba.com>
      Link: https://lore.kernel.org/lkml/Y6CHSS6Rn9YOqpAd@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      43a3ce77
    • Arnaldo Carvalho de Melo's avatar
      tools headers cpufeatures: Sync with the kernel sources · 51c4f2bf
      Arnaldo Carvalho de Melo authored
      To pick the changes from:
      
        5e85c4eb ("x86: KVM: Advertise AVX-IFMA CPUID to user space")
        af2872f6 ("x86: KVM: Advertise AMX-FP16 CPUID to user space")
        6a19d7aa ("x86: KVM: Advertise CMPccXADD CPUID to user space")
        aaa65d17 ("x86/tsx: Add a feature bit for TSX control MSR support")
        b1599915 ("x86/cpufeatures: Move X86_FEATURE_CALL_DEPTH from bit 18 to bit 19 of word 11, to leave space for WIP X86_FEATURE_SGX_EDECCSSA bit")
        16a7fe37 ("KVM/VMX: Allow exposing EDECCSSA user leaf function to KVM guest")
        80e4c1cd ("x86/retbleed: Add X86_FEATURE_CALL_DEPTH")
        7df54884 ("x86/bugs: Add "unknown" reporting for MMIO Stale Data")
      
      This only causes these perf files to be rebuilt:
      
        CC       /tmp/build/perf/bench/mem-memcpy-x86-64-asm.o
        CC       /tmp/build/perf/bench/mem-memset-x86-64-asm.o
      
      And addresses this perf build warning:
      
        Warning: Kernel ABI header at 'tools/arch/x86/include/asm/cpufeatures.h' differs from latest version at 'arch/x86/include/asm/cpufeatures.h'
        diff -u tools/arch/x86/include/asm/cpufeatures.h arch/x86/include/asm/cpufeatures.h
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Borislav Petkov <bp@suse.de>
      Cc: Chang S. Bae <chang.seok.bae@intel.com>
      Cc: Dave Hansen <dave.hansen@linux.intel.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Jiaxi Chen <jiaxi.chen@linux.intel.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Kai Huang <kai.huang@intel.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Pawan Gupta <pawan.kumar.gupta@linux.intel.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Link: https://lore.kernel.org/lkml/Y6CD%2FIcEbDW5X%2FpN@kernel.org/Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      51c4f2bf
    • Arnaldo Carvalho de Melo's avatar
      tools headers disabled-cpufeatures: Sync with the kernel sources · 0bc1d0e2
      Arnaldo Carvalho de Melo authored
      To pick the changes from:
      
        15e15d64 ("x86/cpufeatures: Add X86_FEATURE_XENPV to disabled-features.h")
      
      This only causes these perf files to be rebuilt:
      
        CC       /tmp/build/perf/bench/mem-memcpy-x86-64-asm.o
        CC       /tmp/build/perf/bench/mem-memset-x86-64-asm.o
      
      And addresses this perf build warning:
      
        Warning: Kernel ABI header at 'tools/arch/x86/include/asm/disabled-features.h' differs from latest version at 'arch/x86/include/asm/disabled-features.h'
        diff -u tools/arch/x86/include/asm/disabled-features.h arch/x86/include/asm/disabled-features.h
      
      Cc:  Hunter <adrian.hunter@intel.com>
      Cc: Borislav Petkov <bp@suse.de>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Juergen Gross <jgross@suse.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Link: https://lore.kernel.org/lkml/Y6B2w3WqifB%2FV70T@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      0bc1d0e2
    • Arnaldo Carvalho de Melo's avatar
      30d647f5
    • Arnaldo Carvalho de Melo's avatar
      perf python: Don't stop building if python setuptools isn't installed · 66dfc517
      Arnaldo Carvalho de Melo authored
      The python3-setuptools package is needed to build the python binding, so
      that one can use things like:
      
        # ~acme/git/perf/tools/perf/python/twatch.py
        cpu: 6, pid: 4573, tid: 2184618 { type: exit, pid: 4573, ppid: 4172, tid: 2184618, ptid: 4172, time: 12563190090107}
        cpu: 24, pid: 4573, tid: 4573 { type: fork, pid: 4573, ppid: 4573, tid: 2190991e, ptid: 4573, time: 12563415289331}
        cpu: 29, pid: 4573, tid: 2190991e { type: comm, pid: 4573, tid: 2190991e, comm: StreamT~ns #401 }
        cpu: 29, pid: 4573, tid: 2190991e { type: comm, pid: 4573, tid: 2190991e, comm: StreamT~ns #401 }
        ^CTraceback (most recent call last):
          File "/var/home/acme/git/perf/tools/perf/python/twatch.py", line 61, in <module>
            main()
          File "/var/home/acme/git/perf/tools/perf/python/twatch.py", line 33, in main
            evlist.poll(timeout = -1)
        KeyboardInterrupt
      
        #
      
      That have 'import perf;'.
      
      But distros don't always have that python3-setuptools (or equivalent)
      installed, which was breaking the build. Just check if it is installed
      and emit a warning that such binding isn't being built and continue the
      build without it:
      
      With it:
      
        $ rpm -q python3-setuptools
        python3-setuptools-59.6.0-3.fc36.noarch
        $ rm -rf /tmp/build/perf; mkdir -p /tmp/build/perf
        $ make O=/tmp/build/perf -C tools/perf install-bin
        make: Entering directory '/var/home/acme/git/perf/tools/perf'
        <SNIP>
        ...                               libpython: [ on  ]
        <SNIP>
          GEN     /tmp/build/perf/python/perf.cpython-310-x86_64-linux-gnu.so
        <SNIP>
        $ ls -la /tmp/build/perf/python/perf.cpython-310-x86_64-linux-gnu.so
        -rwxr-xr-x. 1 acme acme 1609112 Dec 17 11:39 /tmp/build/perf/python/perf.cpython-310-x86_64-linux-gnu.so
        $
      
      Without it:
      
        $ sudo rpm -e python3-setuptools
        $ rm -rf /tmp/build/perf ; mkdir -p /tmp/build/perf
        $ make O=/tmp/build/perf -C tools/perf install-bin
        make: Entering directory '/var/home/acme/git/perf/tools/perf'
        <SNIP>
        ...                               libpython: [ on  ]
        <SNIP>
        $ ls -la /tmp/build/perf/python/perf.cpython-310-x86_64-linux-gnu.so
        ls: cannot access '/tmp/build/perf/python/perf.cpython-310-x86_64-linux-gnu.so': No such file or directory
        $
      Reported-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Link: http://lore.kernel.org/lkml/Y53XHw3rlsaaUgOs@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      66dfc517
    • Linus Torvalds's avatar
      Merge tag 'nfsd-6.2-1' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux · aeba12b2
      Linus Torvalds authored
      Pull more nfsd updates from Chuck Lever:
       "This contains a number of crasher fixes that were not ready for the
        initial pull request last week.
      
        In particular, Jeff's patch attempts to address reference count
        underflows in NFSD's filecache, which have been very difficult to
        track down because there is no reliable reproducer.
      
        Common failure modes:
            https://bugzilla.kernel.org/show_bug.cgi?id=216691#c11
            https://bugzilla.kernel.org/show_bug.cgi?id=216674#c6
            https://bugzilla.redhat.com/show_bug.cgi?id=2138605
      
        The race windows were found by inspection and the clean-ups appear
        sensible and pass regression testing, so we include them here in the
        hope that they address the problem. However we remain vigilant because
        we don't have 100% certainty yet that the problem is fully addressed.
      
        Summary:
      
         - Address numerous reports of refcount underflows in NFSD's filecache
      
         - Address a UAF in callback setup error handling
      
         - Address a UAF during server-to-server copy"
      
      * tag 'nfsd-6.2-1' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux:
        NFSD: fix use-after-free in __nfs42_ssc_open()
        nfsd: under NFSv4.1, fix double svc_xprt_put on rpc_create failure
        nfsd: rework refcounting in filecache
      aeba12b2
    • Linus Torvalds's avatar
      Merge tag 'rtc-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux · acd04af6
      Linus Torvalds authored
      Pull RTC updates from Alexandre Belloni:
       "Most of the changes are a rework of the cmos driver by Rafael and
        fixes for issues found using static checkers. The removal of a driver
        leads to a reduction of the number of LOC of the subsystem.
      
        Removed driver:
         - davinci
      
        Updates:
         - convert i2c drivers to .probe_new
         - fix spelling mistakes and duplicated words in comments
         - cmos: rework wake setup and ACPI event handling
         - cros-ec: Limit RTC alarm range to fix alarmtimer
         - ds1347: fix century register handling
         - efi: wakeup support
         - isl12022: temperature sensor support
         - pcf85063: fix read_alarm and clkout
         - pcf8523: use stop bit to detect invalid time
         - pcf8563: use RTC_FEATURE_ALARM
         - snvs: be more flexible on LPSRT reads
         - many static checker fixes"
      
      * tag 'rtc-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: (48 commits)
        rtc: ds1742: use devm_platform_get_and_ioremap_resource()
        rtc: mxc_v2: Add missing clk_disable_unprepare()
        rtc: rs5c313: correct some spelling mistakes
        rtc: at91rm9200: Fix syntax errors in comments
        rtc: remove duplicated words in comments
        rtc: rv3028: Use IRQ flags obtained from device tree if available
        rtc: ds1307: use sysfs_emit() to instead of scnprintf()
        rtc: isl12026: drop obsolete dependency on COMPILE_TEST
        dt-bindings: rtc: m41t80: Convert text schema to YAML one
        rtc: pcf85063: fix pcf85063_clkout_control
        rtc: rx6110: fix warning with !OF
        rtc: rk808: reduce 'struct rk808' usage
        rtc: msc313: Fix function prototype mismatch in msc313_rtc_probe()
        dt-bindings: rtc: convert rtc-meson.txt to dt-schema
        rtc: pic32: Move devm_rtc_allocate_device earlier in pic32_rtc_probe()
        rtc: st-lpc: Add missing clk_disable_unprepare in st_rtc_probe()
        rtc: pcf85063: Fix reading alarm
        rtc: pcf8523: fix for stop bit
        rtc: efi: Add wakeup support
        rtc: pcf8563: clear RTC_FEATURE_ALARM if no irq
        ...
      acd04af6
    • Linus Torvalds's avatar
      Merge tag 'dmaengine-6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine · 9322af3e
      Linus Torvalds authored
      Pull dmaengine updates from Vinod Koul:
       "New support:
      
          - Qualcomm SDM670, SM6115 and SM6375 GPI controller support
      
          - Ingenic JZ4755 dmaengine support
      
          - Removal of iop-adma driver
      
        Updates:
      
         - Tegra support for dma-channel-mask
      
         - at_hdmac cleanup and virt-chan support for this driver"
      
      * tag 'dmaengine-6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine: (46 commits)
        dmaengine: Revert "dmaengine: remove s3c24xx driver"
        dmaengine: tegra: Add support for dma-channel-mask
        dt-bindings: dmaengine: Add dma-channel-mask to Tegra GPCDMA
        dmaengine: idxd: Remove linux/msi.h include
        dt-bindings: dmaengine: qcom: gpi: add compatible for SM6375
        dmaengine: idxd: Fix crc_val field for completion record
        dmaengine: at_hdmac: Convert driver to use virt-dma
        dmaengine: at_hdmac: Remove unused member of at_dma_chan
        dmaengine: at_hdmac: Rename "chan_common" to "dma_chan"
        dmaengine: at_hdmac: Rename "dma_common" to "dma_device"
        dmaengine: at_hdmac: Use bitfield access macros
        dmaengine: at_hdmac: Keep register definitions and structures private to at_hdmac.c
        dmaengine: at_hdmac: Set include entries in alphabetic order
        dmaengine: at_hdmac: Use pm_ptr()
        dmaengine: at_hdmac: Use devm_clk_get()
        dmaengine: at_hdmac: Use devm_platform_ioremap_resource
        dmaengine: at_hdmac: Use devm_kzalloc() and struct_size()
        dmaengine: at_hdmac: Introduce atc_get_llis_residue()
        dmaengine: at_hdmac: s/atc_get_bytes_left/atc_get_residue
        dmaengine: at_hdmac: Pass residue by address to avoid unnecessary implicit casts
        ...
      9322af3e