1. 26 May, 2022 35 commits
    • James Clark's avatar
      perf unwind arm64: Use perf's copy of kernel headers · 8803880f
      James Clark authored
      Fix this include path to use perf's copy of the kernel header rather
      than the one from the root of the repo.
      
      This fixes build errors when only applying the perf tools part of a
      patchset rather than both sides.
      Reported-by: default avatarGerman Gomez <german.gomez@arm.com>
      Signed-off-by: default avatarJames Clark <james.clark@arm.com>
      Tested-by: default avatarGerman Gomez <german.gomez@arm.com>
      Cc: <broonie@kernel.org>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: John Garry <john.garry@huawei.com>
      Cc: Leo Yan <leo.yan@linaro.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
      Cc: Mike Leach <mike.leach@linaro.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Will Deacon <will@kernel.org>
      Cc: linux-arm-kernel@lists.infradead.org
      Link: https://lore.kernel.org/r/20220525154114.718321-2-james.clark@arm.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      8803880f
    • Leo Yan's avatar
      perf c2c: Use stdio interface if slang is not supported · c4040212
      Leo Yan authored
      If the slang lib is not installed on the system, perf c2c tool disables TUI
      mode and roll back to use stdio mode;  but the flag 'c2c.use_stdio' is
      missed to set true and thus it wrongly applies UI quirks in the function
      ui_quirks().
      
      This commit forces to use stdio interface if slang is not supported, and
      it can avoid to apply the UI quirks and show the correct metric header.
      
      Before:
      
      =================================================
            Shared Cache Line Distribution Pareto
      =================================================
        -------------------------------------------------------------------------------
            0        0        0       99        0        0        0      0xaaaac17d6000
        -------------------------------------------------------------------------------
          0.00%    0.00%    6.06%    0.00%    0.00%    0.00%   0x20   N/A       0      0xaaaac17c25ac         0         0        43       375    18469         2  [.] 0x00000000000025ac  memstress         memstress[25ac]   0
          0.00%    0.00%   93.94%    0.00%    0.00%    0.00%   0x29   N/A       0      0xaaaac17c3e88         0         0       173       180      135         2  [.] 0x0000000000003e88  memstress         memstress[3e88]   0
      
      After:
      
      =================================================
            Shared Cache Line Distribution Pareto
      =================================================
        -------------------------------------------------------------------------------
            0        0        0       99        0        0        0      0xaaaac17d6000
        -------------------------------------------------------------------------------
                 0.00%    0.00%    6.06%    0.00%    0.00%    0.00%                0x20   N/A       0      0xaaaac17c25ac         0         0        43       375    18469         2  [.] 0x00000000000025ac  memstress         memstress[25ac]   0
                 0.00%    0.00%   93.94%    0.00%    0.00%    0.00%                0x29   N/A       0      0xaaaac17c3e88         0         0       173       180      135         2  [.] 0x0000000000003e88  memstress         memstress[3e88]   0
      
      Fixes: 5a1a99cd ("perf c2c report: Add main TUI browser")
      Reported-by: default avatarJoe Mario <jmario@redhat.com>
      Signed-off-by: default avatarLeo Yan <leo.yan@linaro.org>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      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/20220526145400.611249-1-leo.yan@linaro.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      c4040212
    • Namhyung Kim's avatar
      perf test: Add a basic offcpu profiling test · 831d06c8
      Namhyung Kim authored
        $ sudo ./perf test -v offcpu
         88: perf record offcpu profiling tests                              :
        --- start ---
        test child forked, pid 685966
        Basic off-cpu test
        Basic off-cpu test [Success]
        test child finished with 0
        ---- end ----
        perf record offcpu profiling tests: Ok
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Acked-by: default avatarIan Rogers <irogers@google.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Blake Jones <blakejones@google.com>
      Cc: Hao Luo <haoluo@google.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Milian Wolff <milian.wolff@kdab.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Song Liu <songliubraving@fb.com>
      Cc: bpf@vger.kernel.org
      Link: https://lore.kernel.org/r/20220518224725.742882-7-namhyung@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      831d06c8
    • Namhyung Kim's avatar
      perf record: Add cgroup support for off-cpu profiling · 685439a7
      Namhyung Kim authored
      This covers two different use cases.  The first one is cgroup
      filtering given by -G/--cgroup option which controls the off-cpu
      profiling for tasks in the given cgroups only.
      
      The other use case is cgroup sampling which is enabled by
      --all-cgroups option and it adds PERF_SAMPLE_CGROUP to the sample_type
      to set the cgroup id of the task in the sample data.
      
      Example output.
      
        $ sudo perf record -a --off-cpu --all-cgroups sleep 1
      
        $ sudo perf report --stdio -s comm,cgroup --call-graph=no
        ...
        # Samples: 144  of event 'offcpu-time'
        # Event count (approx.): 48452045427
        #
        # Children      Self  Command          Cgroup
        # ........  ........  ...............  ..........................................
        #
            61.57%     5.60%  Chrome_ChildIOT  /user.slice/user-657345.slice/user@657345.service/app.slice/...
            29.51%     7.38%  Web Content      /user.slice/user-657345.slice/user@657345.service/app.slice/...
            17.48%     1.59%  Chrome_IOThread  /user.slice/user-657345.slice/user@657345.service/app.slice/...
            16.48%     4.12%  pipewire-pulse   /user.slice/user-657345.slice/user@657345.service/session.slice/...
            14.48%     2.07%  perf             /user.slice/user-657345.slice/user@657345.service/app.slice/...
            14.30%     7.15%  CompositorTileW  /user.slice/user-657345.slice/user@657345.service/app.slice/...
            13.33%     6.67%  Timer            /user.slice/user-657345.slice/user@657345.service/app.slice/...
        ...
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Acked-by: default avatarIan Rogers <irogers@google.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Blake Jones <blakejones@google.com>
      Cc: Hao Luo <haoluo@google.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Milian Wolff <milian.wolff@kdab.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Song Liu <songliubraving@fb.com>
      Cc: bpf@vger.kernel.org
      Link: https://lore.kernel.org/r/20220518224725.742882-6-namhyung@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      685439a7
    • Namhyung Kim's avatar
      perf record: Handle argument change in sched_switch · b36888f7
      Namhyung Kim authored
      Recently sched_switch tracepoint added a new argument for prev_state,
      but it's hard to handle the change in a BPF program.  Instead, we can
      check the function prototype in BTF before loading the program.
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Acked-by: default avatarIan Rogers <irogers@google.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Blake Jones <blakejones@google.com>
      Cc: Hao Luo <haoluo@google.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Milian Wolff <milian.wolff@kdab.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Song Liu <songliubraving@fb.com>
      Cc: bpf@vger.kernel.org
      Link: https://lore.kernel.org/r/20220518224725.742882-5-namhyung@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      b36888f7
    • Namhyung Kim's avatar
      perf record: Implement basic filtering for off-cpu · 10742d0c
      Namhyung Kim authored
      It should honor cpu and task filtering with -a, -C or -p, -t options.
      
      Committer testing:
      
        # perf record --off-cpu --cpu 1 perf bench sched messaging -l 1000
        # Running 'sched/messaging' benchmark:
        # 20 sender and receiver processes per group
        # 10 groups == 400 processes run
      
             Total time: 1.722 [sec]
        [ perf record: Woken up 2 times to write data ]
        [ perf record: Captured and wrote 1.446 MB perf.data (7248 samples) ]
        #
        # perf script | head -20
                    perf 97164 [001] 38287.696761:          1      cycles:  ffffffffb6070174 native_write_msr+0x4 (vmlinux)
                    perf 97164 [001] 38287.696764:          1      cycles:  ffffffffb6070174 native_write_msr+0x4 (vmlinux)
                    perf 97164 [001] 38287.696765:          9      cycles:  ffffffffb6070174 native_write_msr+0x4 (vmlinux)
                    perf 97164 [001] 38287.696767:        212      cycles:  ffffffffb6070176 native_write_msr+0x6 (vmlinux)
                    perf 97164 [001] 38287.696768:       5130      cycles:  ffffffffb6070176 native_write_msr+0x6 (vmlinux)
                    perf 97164 [001] 38287.696770:     123063      cycles:  ffffffffb6e0011e syscall_return_via_sysret+0x38 (vmlinux)
                    perf 97164 [001] 38287.696803:    2292748      cycles:  ffffffffb636c82d __fput+0xad (vmlinux)
                 swapper     0 [001] 38287.702852:    1927474      cycles:  ffffffffb6761378 mwait_idle_with_hints.constprop.0+0x48 (vmlinux)
                  :97513 97513 [001] 38287.767207:    1172536      cycles:  ffffffffb612ff65 newidle_balance+0x5 (vmlinux)
                 swapper     0 [001] 38287.769567:    1073081      cycles:  ffffffffb618216d ktime_get_mono_fast_ns+0xd (vmlinux)
                  :97533 97533 [001] 38287.770962:     984460      cycles:  ffffffffb65b2900 selinux_socket_sendmsg+0x0 (vmlinux)
                  :97540 97540 [001] 38287.772242:     883462      cycles:  ffffffffb6d0bf59 irqentry_exit_to_user_mode+0x9 (vmlinux)
                 swapper     0 [001] 38287.773633:     741963      cycles:  ffffffffb6761378 mwait_idle_with_hints.constprop.0+0x48 (vmlinux)
                  :97552 97552 [001] 38287.774539:     606680      cycles:  ffffffffb62eda0a page_add_file_rmap+0x7a (vmlinux)
                  :97556 97556 [001] 38287.775333:     502254      cycles:  ffffffffb634f964 get_obj_cgroup_from_current+0xc4 (vmlinux)
                  :97561 97561 [001] 38287.776163:     427891      cycles:  ffffffffb61b1522 cgroup_rstat_updated+0x22 (vmlinux)
                 swapper     0 [001] 38287.776854:     359030      cycles:  ffffffffb612fc5e load_balance+0x9ce (vmlinux)
                  :97567 97567 [001] 38287.777312:     330371      cycles:  ffffffffb6a8d8d0 skb_set_owner_w+0x0 (vmlinux)
                  :97566 97566 [001] 38287.777589:     311622      cycles:  ffffffffb614a7a8 native_queued_spin_lock_slowpath+0x148 (vmlinux)
                  :97512 97512 [001] 38287.777671:     307851      cycles:  ffffffffb62e0f35 find_vma+0x55 (vmlinux)
        #
        # perf record --off-cpu --cpu 4 perf bench sched messaging -l 1000
        # Running 'sched/messaging' benchmark:
        # 20 sender and receiver processes per group
        # 10 groups == 400 processes run
      
             Total time: 1.613 [sec]
        [ perf record: Woken up 2 times to write data ]
        [ perf record: Captured and wrote 1.415 MB perf.data (6729 samples) ]
        # perf script | head -20
                    perf 97650 [004] 38323.728036:          1      cycles:  ffffffffb6070174 native_write_msr+0x4 (vmlinux)
                    perf 97650 [004] 38323.728040:          1      cycles:  ffffffffb6070174 native_write_msr+0x4 (vmlinux)
                    perf 97650 [004] 38323.728041:          9      cycles:  ffffffffb6070174 native_write_msr+0x4 (vmlinux)
                    perf 97650 [004] 38323.728042:        208      cycles:  ffffffffb6070176 native_write_msr+0x6 (vmlinux)
                    perf 97650 [004] 38323.728044:       5026      cycles:  ffffffffb6070176 native_write_msr+0x6 (vmlinux)
                    perf 97650 [004] 38323.728046:     119970      cycles:  ffffffffb6d0bebc syscall_exit_to_user_mode+0x1c (vmlinux)
                    perf 97650 [004] 38323.728078:    2190103      cycles:            54b756 perf_tool__process_synth_event+0x16 (/home/acme/bin/perf)
                 swapper     0 [004] 38323.783357:    1593139      cycles:  ffffffffb6761378 mwait_idle_with_hints.constprop.0+0x48 (vmlinux)
                 swapper     0 [004] 38323.785352:    1593139      cycles:  ffffffffb6761378 mwait_idle_with_hints.constprop.0+0x48 (vmlinux)
                 swapper     0 [004] 38323.797330:    1418936      cycles:  ffffffffb6761378 mwait_idle_with_hints.constprop.0+0x48 (vmlinux)
                 swapper     0 [004] 38323.802350:    1418936      cycles:  ffffffffb6761378 mwait_idle_with_hints.constprop.0+0x48 (vmlinux)
                 swapper     0 [004] 38323.806333:    1418936      cycles:  ffffffffb6761378 mwait_idle_with_hints.constprop.0+0x48 (vmlinux)
                  :97996 97996 [004] 38323.807145:    1418936      cycles:      7f5db9be6917 [unknown] ([unknown])
                  :97959 97959 [004] 38323.807730:    1445074      cycles:  ffffffffb6329d36 memcg_slab_post_alloc_hook+0x146 (vmlinux)
                  :97959 97959 [004] 38323.808103:    1341584      cycles:  ffffffffb62fd90f get_page_from_freelist+0x112f (vmlinux)
                  :97959 97959 [004] 38323.808451:    1227537      cycles:  ffffffffb65b2905 selinux_socket_sendmsg+0x5 (vmlinux)
                  :97959 97959 [004] 38323.808768:    1184321      cycles:  ffffffffb6d1ba35 _raw_spin_lock_irqsave+0x15 (vmlinux)
                  :97959 97959 [004] 38323.809073:    1153017      cycles:  ffffffffb6a8d92d skb_set_owner_w+0x5d (vmlinux)
                  :97959 97959 [004] 38323.809402:    1126875      cycles:  ffffffffb6329c64 memcg_slab_post_alloc_hook+0x74 (vmlinux)
                  :97959 97959 [004] 38323.809695:    1073248      cycles:  ffffffffb6e0001d entry_SYSCALL_64+0x1d (vmlinux)
        #
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Blake Jones <blakejones@google.com>
      Cc: Hao Luo <haoluo@google.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Milian Wolff <milian.wolff@kdab.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Song Liu <songliubraving@fb.com>
      Cc: bpf@vger.kernel.org
      Link: https://lore.kernel.org/r/20220518224725.742882-4-namhyung@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      10742d0c
    • Namhyung Kim's avatar
      perf record: Enable off-cpu analysis with BPF · edc41a10
      Namhyung Kim authored
      Add --off-cpu option to enable the off-cpu profiling with BPF.  It'd
      use a bpf_output event and rename it to "offcpu-time".  Samples will
      be synthesized at the end of the record session using data from a BPF
      map which contains the aggregated off-cpu time at context switches.
      So it needs root privilege to get the off-cpu profiling.
      
      Each sample will have a separate user stacktrace so it will skip
      kernel threads.  The sample ip will be set from the stacktrace and
      other sample data will be updated accordingly.  Currently it only
      handles some basic sample types.
      
      The sample timestamp is set to a dummy value just not to bother with
      other events during the sorting.  So it has a very big initial value
      and increase it on processing each samples.
      
      Good thing is that it can be used together with regular profiling like
      cpu cycles.  If you don't want to that, you can use a dummy event to
      enable off-cpu profiling only.
      
      Example output:
        $ sudo perf record --off-cpu perf bench sched messaging -l 1000
      
        $ sudo perf report --stdio --call-graph=no
        # Total Lost Samples: 0
        #
        # Samples: 41K of event 'cycles'
        # Event count (approx.): 42137343851
        ...
      
        # Samples: 1K of event 'offcpu-time'
        # Event count (approx.): 587990831640
        #
        # Children      Self  Command          Shared Object       Symbol
        # ........  ........  ...............  ..................  .........................
        #
            81.66%     0.00%  sched-messaging  libc-2.33.so        [.] __libc_start_main
            81.66%     0.00%  sched-messaging  perf                [.] cmd_bench
            81.66%     0.00%  sched-messaging  perf                [.] main
            81.66%     0.00%  sched-messaging  perf                [.] run_builtin
            81.43%     0.00%  sched-messaging  perf                [.] bench_sched_messaging
            40.86%    40.86%  sched-messaging  libpthread-2.33.so  [.] __read
            37.66%    37.66%  sched-messaging  libpthread-2.33.so  [.] __write
             2.91%     2.91%  sched-messaging  libc-2.33.so        [.] __poll
        ...
      
      As you can see it spent most of off-cpu time in read and write in
      bench_sched_messaging().  The --call-graph=no was added just to make
      the output concise here.
      
      It uses perf hooks facility to control BPF program during the record
      session rather than adding new BPF/off-cpu specific calls.
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Acked-by: default avatarIan Rogers <irogers@google.com>
      Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Blake Jones <blakejones@google.com>
      Cc: Hao Luo <haoluo@google.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Milian Wolff <milian.wolff@kdab.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Song Liu <songliubraving@fb.com>
      Cc: bpf@vger.kernel.org
      Link: https://lore.kernel.org/r/20220518224725.742882-3-namhyung@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      edc41a10
    • Namhyung Kim's avatar
      perf report: Do not extend sample type of bpf-output event · 303ead45
      Namhyung Kim authored
      Currently evsel__new_idx() sets more sample_type bits when it finds a
      BPF-output event.  But it should honor what's recorded in the perf
      data file rather than blindly sets the bits.  Otherwise it could lead
      to a parse error when it recorded with a modified sample_type.
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Blake Jones <blakejones@google.com>
      Cc: Hao Luo <haoluo@google.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Milian Wolff <milian.wolff@kdab.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Song Liu <songliubraving@fb.com>
      Cc: bpf@vger.kernel.org
      Link: https://lore.kernel.org/r/20220518224725.742882-2-namhyung@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      303ead45
    • Claire Jensen's avatar
      perf test: Add checking for perf stat CSV output. · 7473ee56
      Claire Jensen authored
      Counts expected fields for various commands. No testing added for
      summary mode since it is broken.
      
      An example of the summary output is:
      
               summary,263831,,instructions:u,1435072,100.0,0.46,insn per cycle
      ,,,,,1.37,stalled cycles per insn
      
      This should be:
      
               summary,263831,,instructions:u,1435072,100.0,0.46,insn per cycle
               summary,,,,,,1.37,stalled cycles per insn
      
      The output has 7 fields when it should have 8. Additionally, the newline
      spacing is wrong, so it was excluded from testing until a fix is made.
      
      Committer testing:
      
        $ perf test "perf stat CSV output"
         88: perf stat CSV output linter                                     : Ok
        $
      
        $ perf test -v "perf stat CSV output"
        Couldn't bump rlimit(MEMLOCK), failures may take place when creating BPF maps, etc
         88: perf stat CSV output linter                                     :
        --- start ---
        test child forked, pid 2622839
        Checking CSV output: no args [Success]
        Checking CSV output: system wide [Skip] paranoid and not root
        Checking CSV output: system wide [Skip] paranoid and not root
        Checking CSV output: interval [Success]
        Checking CSV output: event [Success]
        Checking CSV output: per core [Skip] paranoid and not root
        Checking CSV output: per thread [Skip] paranoid and not root
        Checking CSV output: per die [Skip] paranoid and not root
        Checking CSV output: per node [Skip] paranoid and not root
        Checking CSV output: per socket [Skip] paranoid and not root
        test child finished with 0
        ---- end ----
        perf stat CSV output linter: Ok
        $
      
      I did a s/parnoia/paranoid/g on the [Skip] lines.
      Signed-off-by: default avatarClaire Jensen <cjense@google.com>
      Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Alyssa Ross <hi@alyssa.is>
      Cc: Claire Jensen <clairej735@gmail.com>
      Cc: Florian Fischer <florian.fischer@muhq.space>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: James Clark <james.clark@arm.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Like Xu <likexu@tencent.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Sandipan Das <sandipan.das@amd.com>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Xing Zhengjun <zhengjun.xing@linux.intel.com>
      Link: https://lore.kernel.org/r/20220525053814.3265216-2-irogers@google.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      7473ee56
    • Adrian Hunter's avatar
      perf tools: Allow system-wide events to keep their own threads · a41e24f6
      Adrian Hunter authored
      System-wide events do not have threads, so do not propagate threads to
      them.
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Acked-by: default avatarIan Rogers <irogers@google.com>
      Acked-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Cc: Alexey Bayduraev <alexey.v.bayduraev@linux.intel.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Leo Yan <leo.yan@linaro.org>
      Link: https://lore.kernel.org/r/20220524075436.29144-16-adrian.hunter@intel.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      a41e24f6
    • Adrian Hunter's avatar
      perf tools: Allow system-wide events to keep their own CPUs · 298613b8
      Adrian Hunter authored
      Currently, user_requested_cpus supplants system-wide CPUs when the evlist
      has_user_cpus. Change that so that system-wide events retain their own
      CPUs and they are added to all_cpus.
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Acked-by: default avatarIan Rogers <irogers@google.com>
      Acked-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Cc: Alexey Bayduraev <alexey.v.bayduraev@linux.intel.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Leo Yan <leo.yan@linaro.org>
      Link: https://lore.kernel.org/r/20220524075436.29144-15-adrian.hunter@intel.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      298613b8
    • Adrian Hunter's avatar
      libperf evsel: Add comments for booleans · f5fb6d4e
      Adrian Hunter authored
      Add comments for 'system_wide' and 'requires_cpu' booleans
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Acked-by: default avatarIan Rogers <irogers@google.com>
      Acked-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Cc: Alexey Bayduraev <alexey.v.bayduraev@linux.intel.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Leo Yan <leo.yan@linaro.org>
      Link: https://lore.kernel.org/r/20220524075436.29144-14-adrian.hunter@intel.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      f5fb6d4e
    • Adrian Hunter's avatar
      perf stat: Add requires_cpu flag for uncore · d3345fec
      Adrian Hunter authored
      Uncore events require a CPU i.e. it cannot be -1.
      
      The evsel system_wide flag is intended for events that should be on every
      CPU, which does not make sense for uncore events because uncore events do
      not map one-to-one with CPUs.
      
      These 2 requirements are not exactly the same, so introduce a new flag
      'requires_cpu' for the uncore case.
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Acked-by: default avatarIan Rogers <irogers@google.com>
      Acked-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Cc: Alexey Bayduraev <alexey.v.bayduraev@linux.intel.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Leo Yan <leo.yan@linaro.org>
      Link: https://lore.kernel.org/r/20220524075436.29144-13-adrian.hunter@intel.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      d3345fec
    • Adrian Hunter's avatar
      libperf evlist: Check nr_mmaps is correct · 4ce47d84
      Adrian Hunter authored
      Print an error message if the predetermined number of mmaps is
      incorrect.
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Acked-by: default avatarIan Rogers <irogers@google.com>
      Acked-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Cc: Alexey Bayduraev <alexey.v.bayduraev@linux.intel.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Leo Yan <leo.yan@linaro.org>
      Link: https://lore.kernel.org/r/20220524075436.29144-12-adrian.hunter@intel.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      4ce47d84
    • Adrian Hunter's avatar
      libperf evlist: Allow mixing per-thread and per-cpu mmaps · ae4f8ae1
      Adrian Hunter authored
      mmap_per_evsel() will skip events that do not match the CPU, so all CPUs
      can be iterated in any case.
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Acked-by: default avatarIan Rogers <irogers@google.com>
      Acked-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Cc: Alexey Bayduraev <alexey.v.bayduraev@linux.intel.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Leo Yan <leo.yan@linaro.org>
      Link: https://lore.kernel.org/r/20220524075436.29144-11-adrian.hunter@intel.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      ae4f8ae1
    • Adrian Hunter's avatar
      perf tools: Allow all_cpus to be a superset of user_requested_cpus · 7be1fedd
      Adrian Hunter authored
      To support collection of system-wide events with user requested CPUs,
      all_cpus must be a superset of user_requested_cpus.
      
      In order to support all_cpus to be a superset of user_requested_cpus,
      all_cpus must be used instead of user_requested_cpus when dealing with CPUs
      of all events instead of CPUs of requested events.
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Acked-by: default avatarIan Rogers <irogers@google.com>
      Acked-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Cc: Alexey Bayduraev <alexey.v.bayduraev@linux.intel.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Leo Yan <leo.yan@linaro.org>
      Link: https://lore.kernel.org/r/20220524075436.29144-10-adrian.hunter@intel.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      7be1fedd
    • Adrian Hunter's avatar
      perf intel-pt: Track sideband system-wide when needed · 7d189cad
      Adrian Hunter authored
      User space tasks can migrate between CPUs, so when tracing selected CPUs,
      sideband for all CPUs is still needed. This is in preparation for allowing
      system-wide events on all CPUs while the user requested events are on only
      user requested CPUs.
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Acked-by: default avatarIan Rogers <irogers@google.com>
      Acked-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Cc: Alexey Bayduraev <alexey.v.bayduraev@linux.intel.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Leo Yan <leo.yan@linaro.org>
      Link: https://lore.kernel.org/r/20220524075436.29144-9-adrian.hunter@intel.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      7d189cad
    • Adrian Hunter's avatar
      perf intel-pt: Use evlist__add_dummy_on_all_cpus() for switch tracking · e665c82a
      Adrian Hunter authored
      Use evlist__add_dummy_on_all_cpus() for switch tracking in preparation for
      allowing system-wide events on all CPUs while the user requested events are
      on only user requested CPUs.
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Acked-by: default avatarIan Rogers <irogers@google.com>
      Acked-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Cc: Alexey Bayduraev <alexey.v.bayduraev@linux.intel.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Leo Yan <leo.yan@linaro.org>
      Link: https://lore.kernel.org/r/20220524075436.29144-8-adrian.hunter@intel.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      e665c82a
    • Adrian Hunter's avatar
      perf record: Use evlist__add_dummy_on_all_cpus() in record__config_text_poke() · 921e3be5
      Adrian Hunter authored
      Use evlist__add_dummy_on_all_cpus() in record__config_text_poke() in
      preparation for allowing system-wide events on all CPUs while the user
      requested events are on only user requested CPUs.
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Acked-by: default avatarIan Rogers <irogers@google.com>
      Acked-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Cc: Alexey Bayduraev <alexey.v.bayduraev@linux.intel.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Leo Yan <leo.yan@linaro.org>
      Link: https://lore.kernel.org/r/20220524075436.29144-7-adrian.hunter@intel.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      921e3be5
    • Adrian Hunter's avatar
      perf evlist: Add evlist__add_dummy_on_all_cpus() · 126d68fd
      Adrian Hunter authored
      Add evlist__add_dummy_on_all_cpus() to enable creating a system-wide dummy
      event that sets up the system-wide maps before map propagation.
      
      For convenience, add evlist__add_aux_dummy() so that the logic can be used
      whether or not the event needs to be system-wide.
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Acked-by: default avatarIan Rogers <irogers@google.com>
      Acked-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Cc: Alexey Bayduraev <alexey.v.bayduraev@linux.intel.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Leo Yan <leo.yan@linaro.org>
      Link: https://lore.kernel.org/r/20220524075436.29144-6-adrian.hunter@intel.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      126d68fd
    • Adrian Hunter's avatar
      perf evlist: Factor out evlist__dummy_event() · 82944899
      Adrian Hunter authored
      Factor out evlist__dummy_event() so it can be reused.
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Acked-by: default avatarIan Rogers <irogers@google.com>
      Acked-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Cc: Alexey Bayduraev <alexey.v.bayduraev@linux.intel.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Leo Yan <leo.yan@linaro.org>
      Link: https://lore.kernel.org/r/20220524075436.29144-5-adrian.hunter@intel.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      82944899
    • Adrian Hunter's avatar
      perf auxtrace: Remove auxtrace_mmap_params__set_idx() per_cpu parameter · 84bd5aba
      Adrian Hunter authored
      Remove auxtrace_mmap_params__set_idx() per_cpu parameter because it isn't
      needed.
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Acked-by: default avatarIan Rogers <irogers@google.com>
      Acked-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Cc: Alexey Bayduraev <alexey.v.bayduraev@linux.intel.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Leo Yan <leo.yan@linaro.org>
      Link: https://lore.kernel.org/r/20220524075436.29144-4-adrian.hunter@intel.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      84bd5aba
    • Adrian Hunter's avatar
      perf auxtrace: Add mmap_needed to auxtrace_mmap_params · d01508f2
      Adrian Hunter authored
      Add mmap_needed to auxtrace_mmap_params.
      
      Currently an auxtrace mmap is always attempted even if the event is not an
      auxtrace event. That works because, when AUX area tracing, there is always
      an auxtrace event first for every mmap. Prepare for that not being the
      case, which it won't be when sideband tracking events are allowed on
      all CPUs even when auxtrace is limited to selected CPUs.
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Acked-by: default avatarIan Rogers <irogers@google.com>
      Acked-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Cc: Alexey Bayduraev <alexey.v.bayduraev@linux.intel.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Leo Yan <leo.yan@linaro.org>
      Link: https://lore.kernel.org/r/20220524075436.29144-3-adrian.hunter@intel.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      d01508f2
    • Adrian Hunter's avatar
      perf intel-pt: Add a test for system-wide side band · 1097b38f
      Adrian Hunter authored
      Add a test for system-wide side band even when tracing selected CPUs.
      
      The test fails before the patches up to "perf tools: Allow system-wide
      events to keep their own CPUs" are applied, passes afterwards.
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Tested-by: default avatarIan Rogers <irogers@google.com>
      Acked-by: default avatarIan Rogers <irogers@google.com>
      Acked-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Cc: Alexey Bayduraev <alexey.v.bayduraev@linux.intel.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Leo Yan <leo.yan@linaro.org>
      Link: https://lore.kernel.org/r/20220524075436.29144-2-adrian.hunter@intel.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      1097b38f
    • Arnaldo Carvalho de Melo's avatar
      perf build: Stop using __weak bpf_map_create() to handle older libbpf versions · df76e003
      Arnaldo Carvalho de Melo authored
      By adding a feature test for bpf_map_create() and providing a fallback if
      it isn't present in older versions of libbpf.
      
      This also fixes the build with torvalds/master at this point:
      
        $ git log --oneline -5 torvalds/master
        babf0bb9 (torvalds/master) Merge tag 'xfs-5.19-for-linus' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux
        e375780b Merge tag 'fsnotify_for_v5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs
        8b728edc Merge tag 'fs_for_v5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs
        3f306ea2 Merge tag 'dma-mapping-5.19-2022-05-25' of git://git.infradead.org/users/hch/dma-mapping
        fbe86dac Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
        $
      
      Coping with:
      
        $ git log --oneline -2 d16495a9
        d16495a9 libbpf: remove bpf_create_map*() APIs
        e2371b16 libbpf: start 1.0 development cycle
        $
      
      As the __weak function fails to build as it calls the now removed
      bpf_create_map() API.
      
      Testing:
      
        $ rpm -q libbpf-devel
        libbpf-devel-0.4.0-2.fc35.x86_64
        $
        $ make -C tools/perf BUILD_BPF_SKEL=1 LIBBPF_DYNAMIC=1 O=/tmp/build/perf install-bin
        $ cat /tmp/build/perf/feature/test-libbpf-bpf_map_create.make.output
        test-libbpf-bpf_map_create.c: In function ‘main’:
        test-libbpf-bpf_map_create.c:6:16: error: implicit declaration of function ‘bpf_map_create’; did you mean ‘bpf_map_freeze’? [-Werror=implicit-function-declaration]
            6 |         return bpf_map_create(0 /* map_type */, NULL /* map_name */, 0, /* key_size */,
              |                ^~~~~~~~~~~~~~
              |                bpf_map_freeze
        test-libbpf-bpf_map_create.c:6:87: error: expected expression before ‘,’ token
            6 |         return bpf_map_create(0 /* map_type */, NULL /* map_name */, 0, /* key_size */,
              |                                                                                       ^
        cc1: all warnings being treated as errors
        $
        $ objdump -dS /tmp/build/perf/perf | grep '<bpf_map_create>:' -A20
        000000000058b290 <bpf_map_create>:
        {
          58b290:	55                   	push   %rbp
          58b291:	48 89 e5             	mov    %rsp,%rbp
          58b294:	48 83 ec 10          	sub    $0x10,%rsp
          58b298:	64 48 8b 04 25 28 00 	mov    %fs:0x28,%rax
          58b29f:	00 00
          58b2a1:	48 89 45 f8          	mov    %rax,-0x8(%rbp)
          58b2a5:	31 c0                	xor    %eax,%eax
        	return bpf_create_map(map_type, key_size, value_size, max_entries, 0);
          58b2a7:	48 8b 45 f8          	mov    -0x8(%rbp),%rax
          58b2ab:	64 48 2b 04 25 28 00 	sub    %fs:0x28,%rax
          58b2b2:	00 00
          58b2b4:	75 10                	jne    58b2c6 <bpf_map_create+0x36>
        }
          58b2b6:	c9                   	leave
          58b2b7:	89 d6                	mov    %edx,%esi
          58b2b9:	89 ca                	mov    %ecx,%edx
          58b2bb:	44 89 c1             	mov    %r8d,%ecx
        	return bpf_create_map(map_type, key_size, value_size, max_entries, 0);
          58b2be:	45 31 c0             	xor    %r8d,%r8d
        $
      
      Cc: Andrii Nakryiko <andrii@kernel.org>
      Cc: Heiko Carstens <hca@linux.ibm.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Ilya Leoshkevich <iii@linux.ibm.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Song Liu <songliubraving@fb.com>
      Cc: Sumanth Korikkar <sumanthk@linux.ibm.com>
      Cc: Sven Schnelle <svens@linux.ibm.com>
      Cc: Thomas Richter <tmricht@linux.ibm.com>
      Cc: Vasily Gorbik <gor@linux.ibm.com>
      Link: http://lore.kernel.org/linux-perf-users/Yo+XvQNKL4K5khl2@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      df76e003
    • Jiri Olsa's avatar
      perf build: Stop using __weak btf__raw_data() to handle older libbpf versions · 982be477
      Jiri Olsa authored
      By adding a feature test for btf__raw_data() and providing a fallback if
      it isn't present in older versions of libbpf.
      
      Committer testing:
      
        $ rpm -q libbpf-devel
        libbpf-devel-0.4.0-2.fc35.x86_64
        $ make -C tools/perf LIBBPF_DYNAMIC=1 O=/tmp/build/perf install-bin
        $ cat /tmp/build/perf/feature/test-libbpf-btf__raw_data.make.output
        test-libbpf-btf__raw_data.c: In function ‘main’:
        test-libbpf-btf__raw_data.c:6:9: error: implicit declaration of function ‘btf__raw_data’; did you mean ‘btf__get_raw_data’? [-Werror=implicit-function-declaration]
            6 |         btf__raw_data(NULL /* btf_ro */, NULL /* size */);
              |         ^~~~~~~~~~~~~
              |         btf__get_raw_data
        cc1: all warnings being treated as errors
        $ objdump -dS /tmp/build/perf/perf | grep '<btf__raw_data>:' -A20
        00000000005b3050 <btf__raw_data>:
        {
          5b3050:	55                   	push   %rbp
          5b3051:	48 89 e5             	mov    %rsp,%rbp
          5b3054:	48 83 ec 10          	sub    $0x10,%rsp
          5b3058:	64 48 8b 04 25 28 00 	mov    %fs:0x28,%rax
          5b305f:	00 00
          5b3061:	48 89 45 f8          	mov    %rax,-0x8(%rbp)
          5b3065:	31 c0                	xor    %eax,%eax
      	  return btf__get_raw_data(btf_ro, size);
          5b3067:	48 8b 45 f8          	mov    -0x8(%rbp),%rax
          5b306b:	64 48 2b 04 25 28 00 	sub    %fs:0x28,%rax
          5b3072:	00 00
          5b3074:	75 06                	jne    5b307c <btf__raw_data+0x2c>
        }
          5b3076:	c9                   	leave
      	  return btf__get_raw_data(btf_ro, size);
          5b3077:	e9 14 99 e5 ff       	jmp    40c990 <btf__get_raw_data@plt>
          5b307c:	e8 af a7 e5 ff       	call   40d830 <__stack_chk_fail@plt>
          5b3081:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
          5b3088:	00 00 00 00
          $
      Signed-off-by: default avatarJiri Olsa <jolsa@kernel.org>
      Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Heiko Carstens <hca@linux.ibm.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Ilya Leoshkevich <iii@linux.ibm.com>
      Cc: Sumanth Korikkar <sumanthk@linux.ibm.com>
      Cc: Sven Schnelle <svens@linux.ibm.com>
      Cc: Thomas Richter <tmricht@linux.ibm.com>
      Cc: Vasily Gorbik <gor@linux.ibm.com>
      Link: http://lore.kernel.org/linux-perf-users/YozLKby7ITEtchC9@kravaSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      982be477
    • Jiri Olsa's avatar
      perf build: Stop using __weak bpf_object__next_map() to handle older libbpf versions · 739c9180
      Jiri Olsa authored
      By adding a feature test for bpf_object__next_map() and providing a fallback if
      it isn't present in older versions of libbpf.
      
      Committer testing:
      
        $ rpm -q libbpf-devel
        libbpf-devel-0.4.0-2.fc35.x86_64
        $ make -C tools/perf LIBBPF_DYNAMIC=1 O=/tmp/build/perf install-bin
        $ cat /tmp/build/perf/feature/test-libbpf-bpf_object__next_map.make.output
        test-libbpf-bpf_object__next_map.c: In function ‘main’:
        test-libbpf-bpf_object__next_map.c:6:9: error: implicit declaration of function ‘bpf_object__next_map’; did you mean ‘bpf_object__next’? [-Werror=implicit-function-declaration]
            6 |         bpf_object__next_map(NULL /* obj */, NULL /* prev */);
              |         ^~~~~~~~~~~~~~~~~~~~
              |         bpf_object__next
          cc1: all warnings being treated as errors
        $
        $ objdump -dS /tmp/build/perf/perf | grep '<bpf_object__next_map>:' -A20
        00000000005b2e00 <bpf_object__next_map>:
        {
          5b2e00:	55                   	push   %rbp
          5b2e01:	48 89 e5             	mov    %rsp,%rbp
          5b2e04:	48 83 ec 10          	sub    $0x10,%rsp
          5b2e08:	64 48 8b 04 25 28 00 	mov    %fs:0x28,%rax
          5b2e0f:	00 00
          5b2e11:	48 89 45 f8          	mov    %rax,-0x8(%rbp)
          5b2e15:	31 c0                	xor    %eax,%eax
      	  return bpf_map__next(prev, obj);
          5b2e17:	48 8b 45 f8          	mov    -0x8(%rbp),%rax
          5b2e1b:	64 48 2b 04 25 28 00 	sub    %fs:0x28,%rax
          5b2e22:	00 00
          5b2e24:	75 0f                	jne    5b2e35 <bpf_object__next_map+0x35>
        }
          5b2e26:	c9                   	leave
          5b2e27:	49 89 f8             	mov    %rdi,%r8
          5b2e2a:	48 89 f7             	mov    %rsi,%rdi
      	  return bpf_map__next(prev, obj);
          5b2e2d:	4c 89 c6             	mov    %r8,%rsi
          5b2e30:	e9 cb b1 e5 ff       	jmp    40e000 <bpf_map__next@plt>
        $
      Signed-off-by: default avatarJiri Olsa <jolsa@kernel.org>
      Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Heiko Carstens <hca@linux.ibm.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Ilya Leoshkevich <iii@linux.ibm.com>
      Cc: Sumanth Korikkar <sumanthk@linux.ibm.com>
      Cc: Sven Schnelle <svens@linux.ibm.com>
      Cc: Thomas Richter <tmricht@linux.ibm.com>
      Cc: Vasily Gorbik <gor@linux.ibm.com>
      Link: http://lore.kernel.org/linux-perf-users/YozLKby7ITEtchC9@kravaSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      739c9180
    • Jiri Olsa's avatar
      perf build: Stop using __weak bpf_object__next_program() to handle older libbpf versions · 8916d725
      Jiri Olsa authored
      By adding a feature test for bpf_object__next_program() and providing a fallback if
      it isn't present in older versions of libbpf.
      
      Committer testing:
      
        $ rpm -q libbpf-devel
        libbpf-devel-0.4.0-2.fc35.x86_64
        $ make -C tools/perf LIBBPF_DYNAMIC=1 O=/tmp/build/perf install-bin
        $ cat /tmp/build/perf/feature/test-libbpf-bpf_object__next_program.make.output
        test-libbpf-bpf_object__next_program.c: In function ‘main’:
        test-libbpf-bpf_object__next_program.c:6:9: error: implicit declaration of function ‘bpf_object__next_program’; did you mean ‘bpf_object__unpin_programs’? [-Werror=implicit-function-declaration]
            6 |         bpf_object__next_program(NULL /* obj */, NULL /* prev */);
              |         ^~~~~~~~~~~~~~~~~~~~~~~~
              |         bpf_object__unpin_programs
        cc1: all warnings being treated as errors
        $
        $ objdump -dS /tmp/build/perf/perf | grep '<bpf_object__next_program>:' -A20
        00000000005b2dc0 <bpf_object__next_program>:
        {
          5b2dc0:	55                   	push   %rbp
          5b2dc1:	48 89 e5             	mov    %rsp,%rbp
          5b2dc4:	48 83 ec 10          	sub    $0x10,%rsp
          5b2dc8:	64 48 8b 04 25 28 00 	mov    %fs:0x28,%rax
          5b2dcf:	00 00
          5b2dd1:	48 89 45 f8          	mov    %rax,-0x8(%rbp)
          5b2dd5:	31 c0                	xor    %eax,%eax
      	  return bpf_program__next(prev, obj);
          5b2dd7:	48 8b 45 f8          	mov    -0x8(%rbp),%rax
          5b2ddb:	64 48 2b 04 25 28 00 	sub    %fs:0x28,%rax
          5b2de2:	00 00
          5b2de4:	75 0f                	jne    5b2df5 <bpf_object__next_program+0x35>
        }
          5b2de6:	c9                   	leave
          5b2de7:	49 89 f8             	mov    %rdi,%r8
          5b2dea:	48 89 f7             	mov    %rsi,%rdi
      	  return bpf_program__next(prev, obj);
          5b2ded:	4c 89 c6             	mov    %r8,%rsi
          5b2df0:	e9 3b b4 e5 ff       	jmp    40e230 <bpf_program__next@plt>
          $
      Signed-off-by: default avatarJiri Olsa <jolsa@kernel.org>
      Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Heiko Carstens <hca@linux.ibm.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Ilya Leoshkevich <iii@linux.ibm.com>
      Cc: Sumanth Korikkar <sumanthk@linux.ibm.com>
      Cc: Sven Schnelle <svens@linux.ibm.com>
      Cc: Thomas Richter <tmricht@linux.ibm.com>
      Cc: Vasily Gorbik <gor@linux.ibm.com>
      Link: http://lore.kernel.org/linux-perf-users/YozLKby7ITEtchC9@kravaSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      8916d725
    • Jiri Olsa's avatar
      perf build: Stop using __weak bpf_prog_load() to handle older libbpf versions · 5c83eff3
      Jiri Olsa authored
      By adding a feature test for bpf_prog_load() and providing a fallback if
      it isn't present in older versions of libbpf.
      
      Committer testing:
      
        $ rpm -q libbpf-devel
        libbpf-devel-0.4.0-2.fc35.x86_64
        $ make -C tools/perf LIBBPF_DYNAMIC=1 O=/tmp/build/perf install-bin
        $ cat /tmp/build/perf/feature/test-libbpf-bpf_prog_load.make.output
        test-libbpf-bpf_prog_load.c: In function ‘main’:
        test-libbpf-bpf_prog_load.c:6:16: error: implicit declaration of function ‘bpf_prog_load’ [-Werror=implicit-function-declaration]
            6 |         return bpf_prog_load(0 /* prog_type */, NULL /* prog_name */,
              |                ^~~~~~~~~~~~~
        cc1: all warnings being treated as errors
        $
      
        $ objdump -dS /tmp/build/perf/perf | grep '<bpf_prog_load>:' -A20
        00000000005b2d70 <bpf_prog_load>:
        {
          5b2d70:	55                   	push   %rbp
          5b2d71:	48 89 ce             	mov    %rcx,%rsi
          5b2d74:	4c 89 c8             	mov    %r9,%rax
          5b2d77:	49 89 d2             	mov    %rdx,%r10
          5b2d7a:	4c 89 c2             	mov    %r8,%rdx
          5b2d7d:	48 89 e5             	mov    %rsp,%rbp
          5b2d80:	48 83 ec 18          	sub    $0x18,%rsp
          5b2d84:	64 48 8b 0c 25 28 00 	mov    %fs:0x28,%rcx
          5b2d8b:	00 00
          5b2d8d:	48 89 4d f8          	mov    %rcx,-0x8(%rbp)
          5b2d91:	31 c9                	xor    %ecx,%ecx
        	return bpf_load_program(prog_type, insns, insn_cnt, license,
          5b2d93:	41 8b 49 5c          	mov    0x5c(%r9),%ecx
          5b2d97:	51                   	push   %rcx
          5b2d98:	4d 8b 49 60          	mov    0x60(%r9),%r9
          5b2d9c:	4c 89 d1             	mov    %r10,%rcx
          5b2d9f:	44 8b 40 1c          	mov    0x1c(%rax),%r8d
          5b2da3:	e8 f8 aa e5 ff       	call   40d8a0 <bpf_load_program@plt>
        }
        $
      Signed-off-by: default avatarJiri Olsa <jolsa@kernel.org>
      Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Heiko Carstens <hca@linux.ibm.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Ilya Leoshkevich <iii@linux.ibm.com>
      Cc: Sumanth Korikkar <sumanthk@linux.ibm.com>
      Cc: Sven Schnelle <svens@linux.ibm.com>
      Cc: Thomas Richter <tmricht@linux.ibm.com>
      Cc: Vasily Gorbik <gor@linux.ibm.com>
      Link: http://lore.kernel.org/linux-perf-users/YozLKby7ITEtchC9@kravaSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      5c83eff3
    • Jiri Olsa's avatar
      perf build: Fix btf__load_from_kernel_by_id() feature check · 73534617
      Jiri Olsa authored
      The btf__load_from_kernel_by_id() only takes one arg, not two.
      
      Committer notes:
      
      I tested it just with an older libbpf, one where
      btf__load_from_kernel_by_id() wasn't introduced yet.
      
      A test with a newer dynamic libbpf would fail because the
      btf__load_from_kernel_by_id() is there, but takes just one arg.
      
      Fixes: 0ae065a5 ("perf build: Fix check for btf__load_from_kernel_by_id() in libbpf")
      Signed-off-by: default avatarJiri Olsa <jolsa@kernel.org>
      Cc: Heiko Carstens <hca@linux.ibm.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Ilya Leoshkevich <iii@linux.ibm.com>
      Cc: Sumanth Korikkar <sumanthk@linux.ibm.com>
      Cc: Sven Schnelle <svens@linux.ibm.com>
      Cc: Thomas Richter <tmricht@linux.ibm.com>
      Cc: Vasily Gorbik <gor@linux.ibm.com>
      Link: http://lore.kernel.org/linux-perf-users/YozLKby7ITEtchC9@kravaSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      73534617
    • Linus Torvalds's avatar
      Merge tag 'xfs-5.19-for-linus' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux · babf0bb9
      Linus Torvalds authored
      Pull xfs updates from Dave Chinner:
       "This is a big update with lots of new code. The summary below them
        all, so I'll just touch on teh higlights. The two main new features
        are Large Extent Counts and Logged Attribute Replay - these are two
        new foundational features that we are building more complex future
        features on top of.
      
        For upcoming functionality, we need to be able to store hundreds of
        millions of xattrs per inode. The Large Extent Count feature removes
        the limits that prevent this scale of xattr storage, and while we were
        modifying the on disk extent count format we also increased the number
        of data extents we support per inode from 2^32 to 2^47.
      
        We also need to be able to modify xattrs as part of larger atomic
        transactions rather than as standalone transactions. The Logged
        Attribute Replay feature introduces the infrastructure that allows us
        to use intents to record the attribute modifications in the journal
        before we start them, hence allowing other atomic transactions to log
        attribute modification intents and then defer the actual modification
        to later. If we then crash, log recovery then guarantees that the
        attribute is replayed in the context of the atomic transaction that
        logged the intent.
      
        A significant chunk of the commits in this merge are for the base
        attribute replay functionality along with fixes, improvements and
        cleanups related to this new functioanlity. Allison deserves a big
        round of thanks for her ongoing work to get this functionality into
        XFS.
      
        There are also many other smaller changes and improvements, so overall
        this is one of the bigger XFS merge requests in some time.
      
        I will be following up next week with another smaller pull request -
        we already have another round of fixes and improvements to the logged
        attribute replay functionality just about ready to go. They'll soak
        and test over the next week, and I'll send a pull request for them
        near the end of the merge window.
      
        Summary:
      
         - support for printk message indexing.
      
         - large extent counts to provide support for up to 2^47 data extents
           and 2^32 attribute extents, allowing us to scale beyond 4 billion
           data extents to billions of xattrs per inode.
      
         - conversion of various flags fields to be consistently declared as
           unsigned bit fields.
      
         - improvements to realtime extent accounting and converts them to
           per-cpu counters to match all the other block and inode accounting.
      
         - reworks core log formatting code to reduce iterations, have a
           shorter, cleaner fast path and generally be easier to understand
           and maintain.
      
         - improvements to rmap btree searches that reduce overhead by up to
           30% resulting in xfs_scrub runtime reductions of 15%.
      
         - improvements to reflink that remove the size limitations in
           remapping operations and greatly reduce the size of transaction
           reservations.
      
         - reworks the minimum log size calculations to allow us to change
           transaction reservations without changing the minimum supported log
           size.
      
         - removal of quota warning support as it has never been used on
           Linux.
      
         - intent whiteouts to allow us to cancel intents that are completed
           entirely in memory rather than having use CPU and disk bandwidth
           formatting and writing them into the journal when it is not
           necessary. This makes rmap, reflink and extent freeing slightly
           more efficient, but provides massive improvements for....
      
         - Logged Attribute Replay feature support. This is a fundamental
           change to the way we modify attributes, laying the foundation for
           future integration of attribute modifications as part of other
           atomic transactional operations the filesystem performs.
      
         - Lots of cleanups and fixes for the logged attribute replay
           functionality"
      
      * tag 'xfs-5.19-for-linus' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: (124 commits)
        xfs: can't use kmem_zalloc() for attribute buffers
        xfs: detect empty attr leaf blocks in xfs_attr3_leaf_verify
        xfs: ATTR_REPLACE algorithm with LARP enabled needs rework
        xfs: use XFS_DA_OP flags in deferred attr ops
        xfs: remove xfs_attri_remove_iter
        xfs: switch attr remove to xfs_attri_set_iter
        xfs: introduce attr remove initial states into xfs_attr_set_iter
        xfs: xfs_attr_set_iter() does not need to return EAGAIN
        xfs: clean up final attr removal in xfs_attr_set_iter
        xfs: remote xattr removal in xfs_attr_set_iter() is conditional
        xfs: XFS_DAS_LEAF_REPLACE state only needed if !LARP
        xfs: split remote attr setting out from replace path
        xfs: consolidate leaf/node states in xfs_attr_set_iter
        xfs: kill XFS_DAC_LEAF_ADDNAME_INIT
        xfs: separate out initial attr_set states
        xfs: don't set quota warning values
        xfs: remove warning counters from struct xfs_dquot_res
        xfs: remove quota warning limit from struct xfs_quota_limits
        xfs: rework deferred attribute operation setup
        xfs: make xattri_leaf_bp more useful
        ...
      babf0bb9
    • Linus Torvalds's avatar
      Merge tag 'fsnotify_for_v5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs · e375780b
      Linus Torvalds authored
      Pull fsnotify updates from Jan Kara:
       "The biggest part of this is support for fsnotify inode marks that
        don't pin inodes in memory but rather get evicted together with the
        inode (they are useful if userspace needs to exclude receipt of events
        from potentially large subtrees using fanotify ignore marks).
      
        There is also a fix for more consistent handling of events sent to
        parent and a fix of sparse(1) complaints"
      
      * tag 'fsnotify_for_v5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs:
        fanotify: fix incorrect fmode_t casts
        fsnotify: consistent behavior for parent not watching children
        fsnotify: introduce mark type iterator
        fanotify: enable "evictable" inode marks
        fanotify: use fsnotify group lock helpers
        fanotify: implement "evictable" inode marks
        fanotify: factor out helper fanotify_mark_update_flags()
        fanotify: create helper fanotify_mark_user_flags()
        fsnotify: allow adding an inode mark without pinning inode
        dnotify: use fsnotify group lock helpers
        nfsd: use fsnotify group lock helpers
        audit: use fsnotify group lock helpers
        inotify: use fsnotify group lock helpers
        fsnotify: create helpers for group mark_mutex lock
        fsnotify: make allow_dups a property of the group
        fsnotify: pass flags argument to fsnotify_alloc_group()
        fsnotify: fix wrong lockdep annotations
        inotify: move control flags from mask to mark flags
        inotify: show inotify mask flags in proc fdinfo
      e375780b
    • Linus Torvalds's avatar
      Merge tag 'fs_for_v5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs · 8b728edc
      Linus Torvalds authored
      Pull writeback and ext2 cleanups from Jan Kara:
       "One small ext2 cleanup and one writeback spelling fix"
      
      * tag 'fs_for_v5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs:
        writeback: fix typo in comment
        fs: ext2: Fix duplicate included linux/dax.h
      8b728edc
    • Linus Torvalds's avatar
      Merge tag 'dma-mapping-5.19-2022-05-25' of git://git.infradead.org/users/hch/dma-mapping · 3f306ea2
      Linus Torvalds authored
      Pull dma-mapping updates from Christoph Hellwig:
      
       - don't over-decrypt memory (Robin Murphy)
      
       - takes min align mask into account for the swiotlb max mapping size
         (Tianyu Lan)
      
       - use GFP_ATOMIC in dma-debug (Mikulas Patocka)
      
       - fix DMA_ATTR_NO_KERNEL_MAPPING on xen/arm (me)
      
       - don't fail on highmem CMA pages in dma_direct_alloc_pages (me)
      
       - cleanup swiotlb initialization and share more code with swiotlb-xen
         (me, Stefano Stabellini)
      
      * tag 'dma-mapping-5.19-2022-05-25' of git://git.infradead.org/users/hch/dma-mapping: (23 commits)
        dma-direct: don't over-decrypt memory
        swiotlb: max mapping size takes min align mask into account
        swiotlb: use the right nslabs-derived sizes in swiotlb_init_late
        swiotlb: use the right nslabs value in swiotlb_init_remap
        swiotlb: don't panic when the swiotlb buffer can't be allocated
        dma-debug: change allocation mode from GFP_NOWAIT to GFP_ATIOMIC
        dma-direct: don't fail on highmem CMA pages in dma_direct_alloc_pages
        swiotlb-xen: fix DMA_ATTR_NO_KERNEL_MAPPING on arm
        x86: remove cruft from <asm/dma-mapping.h>
        swiotlb: remove swiotlb_init_with_tbl and swiotlb_init_late_with_tbl
        swiotlb: merge swiotlb-xen initialization into swiotlb
        swiotlb: provide swiotlb_init variants that remap the buffer
        swiotlb: pass a gfp_mask argument to swiotlb_init_late
        swiotlb: add a SWIOTLB_ANY flag to lift the low memory restriction
        swiotlb: make the swiotlb_init interface more useful
        x86: centralize setting SWIOTLB_FORCE when guest memory encryption is enabled
        x86: remove the IOMMU table infrastructure
        MIPS/octeon: use swiotlb_init instead of open coding it
        arm/xen: don't check for xen_initial_domain() in xen_create_contiguous_region
        swiotlb: rename swiotlb_late_init_with_default_size
        ...
      3f306ea2
    • Linus Torvalds's avatar
      Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · fbe86dac
      Linus Torvalds authored
      Pull SCSI updates from James Bottomley:
       "This consists of a small set of driver updates (lpfc, ufs, mpt3sas
        mpi3mr, iscsi target). Apart from that this is mostly small fixes with
        very few core changes (the biggest one being VPD caching)"
      
      * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (177 commits)
        scsi: target: tcmu: Avoid holding XArray lock when calling lock_page
        scsi: elx: efct: Remove NULL check after calling container_of()
        scsi: dpt_i2o: Drop redundant spinlock initialization
        scsi: qedf: Remove redundant variable op
        scsi: hisi_sas: Fix memory ordering in hisi_sas_task_deliver()
        scsi: fnic: Replace DMA mask of 64 bits with 47 bits
        scsi: mpi3mr: Add target device related sysfs attributes
        scsi: mpi3mr: Add shost related sysfs attributes
        scsi: elx: efct: Remove redundant memset() statement
        scsi: megaraid_sas: Remove redundant memset() statement
        scsi: mpi3mr: Return error if dma_alloc_coherent() fails
        scsi: hisi_sas: Fix rescan after deleting a disk
        scsi: hisi_sas: Use sas_ata_wait_after_reset() in IT nexus reset
        scsi: libsas: Refactor sas_ata_hard_reset()
        scsi: mpt3sas: Update driver version to 42.100.00.00
        scsi: mpt3sas: Fix junk chars displayed while printing ChipName
        scsi: ipr: Use kobj_to_dev()
        scsi: mpi3mr: Fix a NULL vs IS_ERR() bug in mpi3mr_bsg_init()
        scsi: bnx2fc: Avoid using get_cpu() in bnx2fc_cmd_alloc()
        scsi: libfc: Remove get_cpu() semantics in fc_exch_em_alloc()
        ...
      fbe86dac
  2. 25 May, 2022 5 commits
    • Linus Torvalds's avatar
      Merge tag 'sound-5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · d7227785
      Linus Torvalds authored
      Pull sound updates from Takashi Iwai:
       "Not much dramatic changes at this time, but we've received quite a lot
        of changes for ASoC, while there are still a few fixes and quirks for
        usual HD- and USB-auido. Here are some highlights.
      
        ASoC:
      
         - Overhaul of endianness specification for data formats, avoiding
           needless restrictions due to CODECs
      
         - Initial stages of Intel AVS driver merge
      
         - Introduction of v4 IPC mechanism for SOF
      
         - TDM mode support for AK4613
      
         - Support for Analog Devices ADAU1361, Cirrus Logic CS35L45, Maxim
           MAX98396, MediaTek MT8186, NXP i.MX8 micfil and SAI interfaces,
           nVidia Tegra186 ASRC, and Texas Instruments TAS2764 and TAS2780
      
        Others:
      
         - A few regression fixes after the USB-audio endpoint management
           refactoring
      
         - More enhancements for Cirrus HD-audio codec support (still ongoing)
      
         - Addition of generic serial MIDI driver"
      
      * tag 'sound-5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (504 commits)
        ALSA: hda/realtek - Add new type for ALC245
        ALSA: usb-audio: Configure sync endpoints before data
        ALSA: ctxfi: fix typo in comment
        ALSA: cs5535audio: fix typo in comment
        ALSA: ctxfi: Add SB046x PCI ID
        ALSA: usb-audio: Add missing ep_idx in fixed EP quirks
        ALSA: usb-audio: Workaround for clock setup on TEAC devices
        ALSA: lola: Bounds check loop iterator against streams array size
        ASoC: max98090: Move check for invalid values before casting in max98090_put_enab_tlv()
        ASoC: rt1308-sdw: add the default value of register 0xc320
        ASoC: rt9120: Use pm_runtime and regcache to optimize 'pwdnn' logic
        ASoC: rt9120: Fix 3byte read, valule offset typo
        ASoC: amd: acp: Set Speaker enable/disable pin through rt1019 codec driver.
        ASoC: amd: acp: Set Speaker enable/disable pin through rt1019 codec driver
        ASoC: wm2000: fix missing clk_disable_unprepare() on error in wm2000_anc_transition()
        ASoC: codecs: lpass: Fix passing zero to 'PTR_ERR'
        ASoC: SOF: sof-client-ipc-flood-test: use pm_runtime_resume_and_get()
        ASoC: SOF: mediatek: remove duplicate include in mt8195.c
        ASoC: SOF: mediatek: Add mt8195 debug dump
        ASoC: SOF: mediatek: Add mediatek common debug dump
        ...
      d7227785
    • Linus Torvalds's avatar
      Merge tag 'drm-next-2022-05-25' of git://anongit.freedesktop.org/drm/drm · 2518f226
      Linus Torvalds authored
      Pull drm updates from Dave Airlie:
       "Intel have enabled DG2 on certain SKUs for laptops, AMD has started
        some new GPU support, msm has user allocated VA controls
      
        dma-buf:
         - add dma_resv_replace_fences
         - add dma_resv_get_singleton
         - make dma_excl_fence private
      
        core:
         - EDID parser refactorings
         - switch drivers to drm_mode_copy/duplicate
         - DRM managed mutex initialization
      
        display-helper:
         - put HDMI, SCDC, HDCP, DSC and DP into new module
      
        gem:
         - rework fence handling
      
        ttm:
         - rework bulk move handling
         - add common debugfs for resource managers
         - convert to kvcalloc
      
        format helpers:
         - support monochrome formats
         - RGB888, RGB565 to XRGB8888 conversions
      
        fbdev:
         - cfb/sys_imageblit fixes
         - pagelist corruption fix
         - create offb platform device
         - deferred io improvements
      
        sysfb:
         - Kconfig rework
         - support for VESA mode selection
      
        bridge:
         - conversions to devm_drm_of_get_bridge
         - conversions to panel_bridge
         - analogix_dp - autosuspend support
         - it66121 - audio support
         - tc358767 - DSI to DPI support
         - icn6211 - PLL/I2C fixes, DT property
         - adv7611 - enable DRM_BRIDGE_OP_HPD
         - anx7625 - fill ELD if no monitor
         - dw_hdmi - add audio support
         - lontium LT9211 support, i.MXMP LDB
         - it6505: Kconfig fix, DPCD set power fix
         - adv7511 - CEC support for ADV7535
      
        panel:
         - ltk035c5444t, B133UAN01, NV3052C panel support
         - DataImage FG040346DSSWBG04 support
         - st7735r - DT bindings fix
         - ssd130x - fixes
      
        i915:
         - DG2 laptop PCI-IDs ("motherboard down")
         - Initial RPL-P PCI IDs
         - compute engine ABI
         - DG2 Tile4 support
         - DG2 CCS clear color compression support
         - DG2 render/media compression formats support
         - ATS-M platform info
         - RPL-S PCI IDs added
         - Bump ADL-P DMC version to v2.16
         - Support static DRRS
         - Support multiple eDP/LVDS native mode refresh rates
         - DP HDR support for HSW+
         - Lots of display refactoring + fixes
         - GuC hwconfig support and query
         - sysfs support for multi-tile
         - fdinfo per-client gpu utilisation
         - add geometry subslices query
         - fix prime mmap with LMEM
         - fix vm open count and remove vma refcounts
         - contiguous allocation fixes
         - steered register write support
         - small PCI BAR enablement
         - GuC error capture support
         - sunset igpu legacy mmap support for newer devices
         - GuC version 70.1.1 support
      
        amdgpu:
         - Initial SoC21 support
         - SMU 13.x enablement
         - SMU 13.0.4 support
         - ttm_eu cleanups
         - USB-C, GPUVM updates
         - TMZ fixes for RV
         - RAS support for VCN
         - PM sysfs code cleanup
         - DC FP rework
         - extend CG/PG flags to 64-bit
         - SI dpm lockdep fix
         - runtime PM fixes
      
        amdkfd:
         - RAS/SVM fixes
         - TLB flush fixes
         - CRIU GWS support
         - ignore bogus MEC signals more efficiently
      
        msm:
         - Fourcc modifier for tiled but not compressed layouts
         - Support for userspace allocated IOVA (GPU virtual address)
         - DPU: DSC (Display Stream Compression) support
         - DP: eDP support
         - DP: conversion to use drm_bridge and drm_bridge_connector
         - Merge DPU1 and MDP5 MDSS driver
         - DPU: writeback support
      
        nouveau:
         - make some structures static
         - make some variables static
         - switch to drm_gem_plane_helper_prepare_fb
      
        radeon:
         - misc fixes/cleanups
      
        mxsfb:
         - rework crtc mode setting
         - LCDIF CRC support
      
        etnaviv:
         - fencing improvements
         - fix address space collisions
         - cleanup MMU reference handling
      
        gma500:
         - GEM/GTT improvements
         - connector handling fixes
      
        komeda:
         - switch to plane reset helper
      
        mediatek:
         - MIPI DSI improvements
      
        omapdrm:
         - GEM improvements
      
        qxl:
         - aarch64 support
      
        vc4:
         - add a CL submission tracepoint
         - HDMI YUV support
         - HDMI/clock improvements
         - drop is_hdmi caching
      
        virtio:
         - remove restriction of non-zero blob types
      
        vmwgfx:
         - support for cursormob and cursorbypass 4
         - fence improvements
      
        tidss:
         - reset DISPC on startup
      
        solomon:
         - SPI support
         - DT improvements
      
        sun4i:
         - allwinner D1 support
         - drop is_hdmi caching
      
        imx:
         - use swap() instead of open-coding
         - use devm_platform_ioremap_resource
         - remove redunant initializations
      
        ast:
         - Displayport support
      
        rockchip:
         - Refactor IOMMU initialisation
         - make some structures static
         - replace drm_detect_hdmi_monitor with drm_display_info.is_hdmi
         - support swapped YUV formats,
         - clock improvements
         - rk3568 support
         - VOP2 support
      
        mediatek:
         - MT8186 support
      
        tegra:
         - debugabillity improvements"
      
      * tag 'drm-next-2022-05-25' of git://anongit.freedesktop.org/drm/drm: (1740 commits)
        drm/i915/dsi: fix VBT send packet port selection for ICL+
        drm/i915/uc: Fix undefined behavior due to shift overflowing the constant
        drm/i915/reg: fix undefined behavior due to shift overflowing the constant
        drm/i915/gt: Fix use of static in macro mismatch
        drm/i915/audio: fix audio code enable/disable pipe logging
        drm/i915: Fix CFI violation with show_dynamic_id()
        drm/i915: Fix 'mixing different enum types' warnings in intel_display_power.c
        drm/i915/gt: Fix build error without CONFIG_PM
        drm/msm/dpu: handle pm_runtime_get_sync() errors in bind path
        drm/msm/dpu: add DRM_MODE_ROTATE_180 back to supported rotations
        drm/msm: don't free the IRQ if it was not requested
        drm/msm/dpu: limit writeback modes according to max_linewidth
        drm/amd: Don't reset dGPUs if the system is going to s2idle
        drm/amdgpu: Unmap legacy queue when MES is enabled
        drm: msm: fix possible memory leak in mdp5_crtc_cursor_set()
        drm/msm: Fix fb plane offset calculation
        drm/msm/a6xx: Fix refcount leak in a6xx_gpu_init
        drm/msm/dsi: don't powerup at modeset time for parade-ps8640
        drm/rockchip: Change register space names in vop2
        dt-bindings: display: rockchip: make reg-names mandatory for VOP2
        ...
      2518f226
    • Linus Torvalds's avatar
      Merge tag 'devicetree-for-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux · 86c87bea
      Linus Torvalds authored
      Pull devicetree updates from Rob Herring:
       "Bindings:
      
         - Convert smsc,lan91c111, qcom,spi-qup, qcom,msm-uartdm,
           qcom,i2c-qup, qcom,gsbi, i2c-mt65xx, TI wkup_m3_ipc (and new
           props), qcom,smp2p, TI timer, Mediatek gnss, Mediatek topckgen,
           Mediatek apmixedsys, Mediatek infracfg, fsl,ls-extirq,
           fsl,layerscape-dcfg, QCom PMIC SPMI, rda,8810pl-timer, Xilinx
           zynqmp_ipi, uniphier-pcie, and Ilitek touchscreen controllers
      
         - Convert various Arm Ltd peripheral IP bindings to schemas
      
         - New bindings for Menlo board CPLD, DH electronics board CPLD,
           Qualcomm Geni based QUP I2C, Renesas RZ/G2UL OSTM, Broafcom BCM4751
           GNSS, MT6360 PMIC, ASIX USB Ethernet controllers, and
           Microchip/SMSC LAN95xx USB Ethernet controllers
      
         - Add vendor prefix for Enclustra
      
         - Add various compatible string additions
      
         - Various example fixes and cleanups
      
         - Remove unused hisilicon,hi6220-reset binding
      
         - Treewide fix properties missing type definition
      
         - Drop some empty and unreferenced .txt bindings
      
         - Documentation improvements for writing schemas
      
        DT driver core:
      
         - Drop static IRQ resources for DT platform devices as IRQ setup is
           dynamic and drivers have all been converted to use
           platform_get_irq() and friends
      
         - Rework memory allocations and frees for overlays
      
         - Continue overlay notifier callbacks on successful calls and add
           unittests
      
         - Handle 'interrupts-extended' in early DT IRQ setup
      
         - Fix of_property_read_string() errors to match documentation
      
         - Ignore disabled nodes in FDT API calls"
      
      * tag 'devicetree-for-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: (86 commits)
        of/irq: fix typo in comment
        dt-bindings: Fix properties without any type
        Revert "dt-bindings: mailbox: qcom-ipcc: add missing properties into example"
        dt-bindings: input: touchscreen: ilitek_ts_i2c: Absorb ili2xxx bindings
        dt-bindings: timer: samsung,exynos4210-mct: define strict clock order
        dt-bindings: timer: samsung,exynos4210-mct: drop unneeded minItems
        dt-bindings: timer: cdns,ttc: drop unneeded minItems
        dt-bindings: mailbox: zynqmp_ipi: convert to yaml
        dt-bindings: usb: ci-hdrc-usb2: fix node node for ethernet controller
        dt-bindings: net: add schema for Microchip/SMSC LAN95xx USB Ethernet controllers
        dt-bindings: net: add schema for ASIX USB Ethernet controllers
        of/fdt: Ignore disabled memory nodes
        dt-bindings: arm: fix typos in compatible
        dt-bindings: mfd: Add bindings child nodes for the Mediatek MT6360
        dt-bindings: display: convert Arm Komeda to DT schema
        dt-bindings: display: convert Arm Mali-DP to DT schema
        dt-bindings: display: convert Arm HDLCD to DT schema
        dt-bindings: display: convert PL110/PL111 to DT schema
        dt-bindings: arm: convert vexpress-config to DT schema
        dt-bindings: arm: convert vexpress-sysregs to DT schema
        ...
      86c87bea
    • Linus Torvalds's avatar
      Merge tag 'perf-tools-for-v5.19-2022-05-23' of... · d223575e
      Linus Torvalds authored
      Merge tag 'perf-tools-for-v5.19-2022-05-23' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux
      
      Pull perf tool updates from Arnaldo Carvalho de Melo:
       "Intel PT:
      
         - Allow hardware tracing on KVM test programs. In this case, the VM
           is not running an OS, but only the functions loaded into it by the
           hypervisor test program, and conveniently, loaded at the same
           virtual addresses.
      
         - Improve documentation:
            - Add link to perf wiki's page
      
         - Cleanups:
            - Delete now unused perf-with-kcore.sh script
            - Remove unused machines__find_host()
      
        ARM SPE (Statistical Profile Extensions):
      
         - Add man page entry.
      
        Vendor Events:
      
         - Update various Intel event topics
      
         - Update various microarch events
      
         - Fix various cstate metrics
      
         - Fix Alderlake metric groups
      
         - Add sapphirerapids events
      
         - Add JSON files for ARM Cortex A34, A35, A55, A510, A65, A73, A75,
           A77, A78, A710, X1, X2 and Neoverse E1
      
         - Update Cortex A57/A72
      
        perf stat:
      
         - Introduce stats for the user and system rusage times
      
        perf c2c:
      
         - Prep work to support ARM systems
      
        perf annotate:
      
         - Add --percent-limit option
      
        perf lock:
      
         - Add -t/--thread option for report
      
         - Do not discard broken lock stats
      
        perf bench:
      
         - Add breakpoint benchmarks
      
        perf test:
      
         - Limit to only run executable scripts in tests
      
         - Add basic perf record tests
      
         - Add stat record+report test
      
         - Add basic stat and topdown group test
      
         - Skip several tests when the user hasn't permission to perform them
      
         - Fix test case 81 ("perf record tests") on s390x
      
        perf version:
      
         - debuginfod support improvements
      
        perf scripting python:
      
         - Expose symbol offset and source information
      
        perf build:
      
         - Error for BPF skeletons without LIBBPF
      
         - Use Python devtools for version autodetection rather than runtime
      
        Miscellaneous:
      
         - Add riscv64 support to 'perf jitdump'
      
         - Various fixes/tidy ups related to cpu_map
      
         - Fixes for handling Intel hybrid systems"
      
      * tag 'perf-tools-for-v5.19-2022-05-23' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux: (122 commits)
        perf intel-pt: Add guest_code support
        perf kvm report: Add guest_code support
        perf script: Add guest_code support
        perf tools: Add guest_code support
        perf tools: Factor out thread__set_guest_comm()
        perf tools: Add machine to machines back pointer
        perf vendors events arm64: Update Cortex A57/A72
        perf vendors events arm64: Arm Neoverse E1
        perf vendors events arm64: Arm Cortex-X2
        perf vendors events arm64: Arm Cortex-X1
        perf vendors events arm64: Arm Cortex-A710
        perf vendors events arm64: Arm Cortex-A78
        perf vendors events arm64: Arm Cortex-A77
        perf vendors events arm64: Arm Cortex-A75
        perf vendors events arm64: Arm Cortex-A73
        perf vendors events arm64: Arm Cortex-A65
        perf vendors events arm64: Arm Cortex-A510
        perf vendors events arm64: Arm Cortex-A55
        perf vendors events arm64: Arm Cortex-A35
        perf vendors events arm64: Arm Cortex-A34
        ...
      d223575e
    • Linus Torvalds's avatar
      Merge tag 'checkpatch-new-alloc-check-5.19-rc1' of... · e908305f
      Linus Torvalds authored
      Merge tag 'checkpatch-new-alloc-check-5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux
      
      Pull checkpatch update from Gustavo Silva:
       "kvmalloc() and kvzalloc() functions have now 2-factor multiplication
        argument forms kvmalloc_array() and kvcalloc().
      
        Add alloc-with-multiplies checks for these new functions"
      
      * tag 'checkpatch-new-alloc-check-5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux:
        checkpatch: add new alloc functions to alloc with multiplies check
      e908305f