1. 03 Aug, 2023 32 commits
  2. 28 Jul, 2023 8 commits
    • Ian Rogers's avatar
      perf build: Add Wextra for C++ compilation · e5764ae4
      Ian Rogers authored
      Commit d58ac0bf ("perf build: Add clang and llvm compile and
      linking support") added -Wall and -Wno-strict-aliasing for CXXFLAGS,
      but not -Wextra. -Wno-strict-aliasing is no longer necessary, adding
      -Wextra for CXXFLAGS requires adding -Wno-unused-parameter clang.cpp
      and clang-test.cpp for LIBCLANGLLVM=1 to build.
      Signed-off-by: default avatarIan Rogers <irogers@google.com>
      Acked-by: default avatarJames Clark <james.clark@arm.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andrii Nakryiko <andrii@kernel.org>
      Cc: Eduard Zingerman <eddyz87@gmail.com>
      Cc: Gaosheng Cui <cuigaosheng1@huawei.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Nathan Chancellor <nathan@kernel.org>
      Cc: Nick Desaulniers <ndesaulniers@google.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Rob Herring <robh@kernel.org>
      Cc: Tom Rix <trix@redhat.com>
      Cc: bpf@vger.kernel.org
      Cc: llvm@lists.linux.dev
      Link: https://lore.kernel.org/r/20230728064917.767761-4-irogers@google.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      e5764ae4
    • Ian Rogers's avatar
      perf build: Don't always set -funwind-tables and -ggdb3 · 435bea0a
      Ian Rogers authored
      Commit 6a40cd90 ("perf tools: Add libunwind dependency for DWARF
      CFI unwinding") added libunwind support but also -funwind-tables and
      -ggdb3 to the standard build. These build flags aren't necessary so
      remove, set -g when DEBUG is enabled for the build.
      Signed-off-by: default avatarIan Rogers <irogers@google.com>
      Acked-by: default avatarJames Clark <james.clark@arm.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andrii Nakryiko <andrii@kernel.org>
      Cc: Eduard Zingerman <eddyz87@gmail.com>
      Cc: Gaosheng Cui <cuigaosheng1@huawei.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Nathan Chancellor <nathan@kernel.org>
      Cc: Nick Desaulniers <ndesaulniers@google.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Rob Herring <robh@kernel.org>
      Cc: Tom Rix <trix@redhat.com>
      Cc: bpf@vger.kernel.org
      Cc: llvm@lists.linux.dev
      Link: https://lore.kernel.org/r/20230728064917.767761-3-irogers@google.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      435bea0a
    • Ian Rogers's avatar
      perf bpf-loader: Remove unneeded diagnostic pragma · 1134f290
      Ian Rogers authored
      Added during the progress to libbpf 1.0 the deprecated functions are
      no longer used and so the pragma can be removed.
      Signed-off-by: default avatarIan Rogers <irogers@google.com>
      Acked-by: default avatarJames Clark <james.clark@arm.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andrii Nakryiko <andrii@kernel.org>
      Cc: Eduard Zingerman <eddyz87@gmail.com>
      Cc: Gaosheng Cui <cuigaosheng1@huawei.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Nathan Chancellor <nathan@kernel.org>
      Cc: Nick Desaulniers <ndesaulniers@google.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Rob Herring <robh@kernel.org>
      Cc: Tom Rix <trix@redhat.com>
      Cc: bpf@vger.kernel.org
      Cc: llvm@lists.linux.dev
      Link: https://lore.kernel.org/r/20230728064917.767761-2-irogers@google.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      1134f290
    • Jing Zhang's avatar
      perf docs: Update metric usage for Alibaba's T-Head PMU driver (arm64) · f849ce6b
      Jing Zhang authored
      Alibaba's T-Head ali_drw PMU supports DDR bandwidth metrics. Update
      its usage in the documentation.
      Reviewed-by: default avatarJohn Garry <john.g.garry@oracle.com>
      Signed-off-by: default avatarJing Zhang <renyu.zj@linux.alibaba.com>
      Acked-by: default avatarIan Rogers <irogers@google.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Shuai Xue <xueshuai@linux.alibaba.com>
      Cc: Will Deacon <will@kernel.org>
      Cc: Zhuo Song <zhuo.song@linux.alibaba.com>
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: linux-doc@vger.kernel.org
      Link: https://lore.kernel.org/r/1690528175-2499-4-git-send-email-renyu.zj@linux.alibaba.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      f849ce6b
    • Jing Zhang's avatar
      perf vendor events arm64: Add JSON metrics for Yitian 710 DDR · 3e65bd13
      Jing Zhang authored
      Add JSON metrics for T-HEAD Yitian 710 SoC DDR.
      Reviewed-by: default avatarJohn Garry <john.g.garry@oracle.com>
      Signed-off-by: default avatarJing Zhang <renyu.zj@linux.alibaba.com>
      Acked-by: default avatarIan Rogers <irogers@google.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Shuai Xue <xueshuai@linux.alibaba.com>
      Cc: Will Deacon <will@kernel.org>
      Cc: Zhuo Song <zhuo.song@linux.alibaba.com>
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: linux-doc@vger.kernel.org
      Link: https://lore.kernel.org/r/1690528175-2499-3-git-send-email-renyu.zj@linux.alibaba.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      3e65bd13
    • Jing Zhang's avatar
      perf jevents: Add support for Yitian 710 DDR PMU (arm64) aliasing · 24069d81
      Jing Zhang authored
      Add alias support for T-HEAD Yitian 710 SoC DDR PMU events.
      Reviewed-by: default avatarJohn Garry <john.g.garry@oracle.com>
      Reviewed-by: default avatarShuai Xue <xueshuai@linux.alibaba.com>
      Signed-off-by: default avatarJing Zhang <renyu.zj@linux.alibaba.com>
      Acked-by: default avatarIan Rogers <irogers@google.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Will Deacon <will@kernel.org>
      Cc: Zhuo Song <zhuo.song@linux.alibaba.com>
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: linux-doc@vger.kernel.org
      Link: https://lore.kernel.org/r/1690528175-2499-2-git-send-email-renyu.zj@linux.alibaba.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      24069d81
    • James Clark's avatar
      perf tools: Add a place to put kernel config fragments for test runs · 404e077a
      James Clark authored
      Defconfig doesn't give full coverage for a perf test run, so these can
      be merged with defconfig to do so. It's not complete yet, but is a
      starting point as a place to add to when a specific test needs something
      extra to run.
      Signed-off-by: default avatarJames Clark <james.clark@arm.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Aishwarya.TCV@arm.com
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.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 Brown <broonie@kernel.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Masahiro Yamada <masahiroy@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: https://lore.kernel.org/r/20230628105303.4053478-2-james.clark@arm.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      404e077a
    • Anup Sharma's avatar
      perf scripts python: Add command execution for gecko script · f9f72b2a
      Anup Sharma authored
      This will enable the execution of gecko.py script using record and
      report commands in 'perf script'.  And this will be also reflected at
      "perf script -l" command.
      
      For Example:
          perf script record gecko
          perf script report gecko
      
      Committer notes:
      
      As discussed on the perf tools office hours, I made -F 99 the default
      for the record script and removed the double -- on the report script so
      that the existing 'perf script' protocol for the combined operation:
      
          # perf script gecko
      
      Works, i.e. the record script pipes its stdout into the stdin of the
      report script, basically:
      
        /bin/sh /usr/libexec/perf-core/scripts/python/bin/gecko-record -F 99 -g -a -q -o - | \
        /bin/sh /usr/libexec/perf-core/scripts/python/bin/gecko-report -i -
      
      Testing it:
      
      The resulting JSON file needs to be uploaded to
      https://profiler.firefox.com, Anup already has code to start a local
      http server on the trace_begin handler of the gecko python script, start
      firefox and feed it the JSON.
      
      The example below only collects sample for the specified workload, so
      that we don't produce thousands of lines, to collect system wide
      samples, use instead:
      
        # perf script gecko -a sleep 0.5
      
        # nohup perf script gecko sleep 0.5
        {
          "meta": {
            "interval": 1,
            "processType": 0,
            "product": "x86_64 GNU/Linux",
            "stackwalk": 1,
            "debug": 0,
            "gcpoison": 0,
            "asyncstack": 1,
            "startTime": 274601692.636,
            "shutdownTime": null,
            "version": 24,
            "presymbolicated": true,
            "categories": [
              {
                "name": "User",
                "color": "yellow",
                "subcategories": [
                  "Other"
                ]
              },
              {
                "name": "Kernel",
                "color": "orange",
                "subcategories": [
                  "Other"
                ]
              }
            ],
            "markerSchema": []
          },
          "libs": [],
          "threads": [
            {
              "tid": 3344498,
              "pid": 3344498,
              "name": "sleep",
              "markers": {
                "schema": {
                  "name": 0,
                  "startTime": 1,
                  "endTime": 2,
                  "phase": 3,
                  "category": 4,
                  "data": 5
                },
                "data": []
              },
              "samples": {
                "schema": {
                  "stack": 0,
                  "time": 1,
                  "responsiveness": 2
                },
                "data": [
                  [
                    21,
                    274601692.636,
                    0
                  ],
                  [
                    23,
                    274601692.641,
                    0
                  ],
                  [
                    29,
                    274601692.643,
                    0
                  ],
                  [
                    42,
                    274601692.648,
                    0
                  ]
                ]
              },
              "frameTable": {
                "schema": {
                  "location": 0,
                  "relevantForJS": 1,
                  "innerWindowID": 2,
                  "implementation": 3,
                  "optimizations": 4,
                  "line": 5,
                  "column": 6,
                  "category": 7,
                  "subcategory": 8
                },
                "data": [
                  [
                    0,
                    false,
                    0,
                    null,
                    null,
                    null,
                    null,
                    1,
                    null
                  ],
                  [
                    1,
                    false,
                    0,
                    null,
                    null,
                    null,
                    null,
                    1,
                    null
                  ],
                  [
                    2,
                    false,
                    0,
                    null,
                    null,
                    null,
                    null,
                    1,
                    null
                  ],
                  [
                    3,
                    false,
                    0,
                    null,
                    null,
                    null,
                    null,
                    1,
                    null
                  ],
                  [
                    4,
                    false,
                    0,
                    null,
                    null,
                    null,
                    null,
                    1,
                    null
                  ],
                  [
                    5,
                    false,
                    0,
                    null,
                    null,
                    null,
                    null,
                    1,
                    null
                  ],
                  [
                    6,
                    false,
                    0,
                    null,
                    null,
                    null,
                    null,
                    1,
                    null
                  ],
                  [
                    7,
                    false,
                    0,
                    null,
                    null,
                    null,
                    null,
                    1,
                    null
                  ],
                  [
                    8,
                    false,
                    0,
                    null,
                    null,
                    null,
                    null,
                    1,
                    null
                  ],
                  [
                    9,
                    false,
                    0,
                    null,
                    null,
                    null,
                    null,
                    1,
                    null
                  ],
                  [
                    10,
                    false,
                    0,
                    null,
                    null,
                    null,
                    null,
                    1,
                    null
                  ],
                  [
                    11,
                    false,
                    0,
                    null,
                    null,
                    null,
                    null,
                    1,
                    null
                  ],
                  [
                    12,
                    false,
                    0,
                    null,
                    null,
                    null,
                    null,
                    1,
                    null
                  ],
                  [
                    13,
                    false,
                    0,
                    null,
                    null,
                    null,
                    null,
                    1,
                    null
                  ],
                  [
                    14,
                    false,
                    0,
                    null,
                    null,
                    null,
                    null,
                    1,
                    null
                  ],
                  [
                    15,
                    false,
                    0,
                    null,
                    null,
                    null,
                    null,
                    1,
                    null
                  ],
                  [
                    16,
                    false,
                    0,
                    null,
                    null,
                    null,
                    null,
                    1,
                    null
                  ],
                  [
                    17,
                    false,
                    0,
                    null,
                    null,
                    null,
                    null,
                    1,
                    null
                  ],
                  [
                    18,
                    false,
                    0,
                    null,
                    null,
                    null,
                    null,
                    1,
                    null
                  ],
                  [
                    19,
                    false,
                    0,
                    null,
                    null,
                    null,
                    null,
                    1,
                    null
                  ],
                  [
                    20,
                    false,
                    0,
                    null,
                    null,
                    null,
                    null,
                    1,
                    null
                  ],
                  [
                    21,
                    false,
                    0,
                    null,
                    null,
                    null,
                    null,
                    1,
                    null
                  ],
                  [
                    22,
                    false,
                    0,
                    null,
                    null,
                    null,
                    null,
                    1,
                    null
                  ],
                  [
                    23,
                    false,
                    0,
                    null,
                    null,
                    null,
                    null,
                    1,
                    null
                  ],
                  [
                    24,
                    false,
                    0,
                    null,
                    null,
                    null,
                    null,
                    1,
                    null
                  ],
                  [
                    25,
                    false,
                    0,
                    null,
                    null,
                    null,
                    null,
                    1,
                    null
                  ],
                  [
                    26,
                    false,
                    0,
                    null,
                    null,
                    null,
                    null,
                    1,
                    null
                  ],
                  [
                    27,
                    false,
                    0,
                    null,
                    null,
                    null,
                    null,
                    1,
                    null
                  ],
                  [
                    28,
                    false,
                    0,
                    null,
                    null,
                    null,
                    null,
                    1,
                    null
                  ],
                  [
                    29,
                    false,
                    0,
                    null,
                    null,
                    null,
                    null,
                    1,
                    null
                  ],
                  [
                    30,
                    false,
                    0,
                    null,
                    null,
                    null,
                    null,
                    1,
                    null
                  ],
                  [
                    31,
                    false,
                    0,
                    null,
                    null,
                    null,
                    null,
                    1,
                    null
                  ],
                  [
                    32,
                    false,
                    0,
                    null,
                    null,
                    null,
                    null,
                    1,
                    null
                  ],
                  [
                    33,
                    false,
                    0,
                    null,
                    null,
                    null,
                    null,
                    1,
                    null
                  ],
                  [
                    34,
                    false,
                    0,
                    null,
                    null,
                    null,
                    null,
                    1,
                    null
                  ],
                  [
                    35,
                    false,
                    0,
                    null,
                    null,
                    null,
                    null,
                    1,
                    null
                  ],
                  [
                    36,
                    false,
                    0,
                    null,
                    null,
                    null,
                    null,
                    1,
                    null
                  ],
                  [
                    37,
                    false,
                    0,
                    null,
                    null,
                    null,
                    null,
                    1,
                    null
                  ],
                  [
                    38,
                    false,
                    0,
                    null,
                    null,
                    null,
                    null,
                    1,
                    null
                  ]
                ]
              },
              "stackTable": {
                "schema": {
                  "prefix": 0,
                  "frame": 1
                },
                "data": [
                  [
                    null,
                    0
                  ],
                  [
                    0,
                    1
                  ],
                  [
                    1,
                    2
                  ],
                  [
                    2,
                    3
                  ],
                  [
                    3,
                    4
                  ],
                  [
                    4,
                    5
                  ],
                  [
                    5,
                    6
                  ],
                  [
                    6,
                    7
                  ],
                  [
                    7,
                    8
                  ],
                  [
                    8,
                    9
                  ],
                  [
                    9,
                    10
                  ],
                  [
                    10,
                    11
                  ],
                  [
                    11,
                    12
                  ],
                  [
                    12,
                    13
                  ],
                  [
                    13,
                    14
                  ],
                  [
                    14,
                    15
                  ],
                  [
                    15,
                    16
                  ],
                  [
                    16,
                    17
                  ],
                  [
                    17,
                    18
                  ],
                  [
                    18,
                    19
                  ],
                  [
                    19,
                    20
                  ],
                  [
                    20,
                    21
                  ],
                  [
                    20,
                    22
                  ],
                  [
                    22,
                    23
                  ],
                  [
                    11,
                    24
                  ],
                  [
                    24,
                    25
                  ],
                  [
                    25,
                    26
                  ],
                  [
                    26,
                    27
                  ],
                  [
                    27,
                    28
                  ],
                  [
                    28,
                    29
                  ],
                  [
                    9,
                    11
                  ],
                  [
                    30,
                    24
                  ],
                  [
                    31,
                    25
                  ],
                  [
                    32,
                    30
                  ],
                  [
                    33,
                    31
                  ],
                  [
                    34,
                    32
                  ],
                  [
                    35,
                    29
                  ],
                  [
                    36,
                    33
                  ],
                  [
                    37,
                    34
                  ],
                  [
                    38,
                    35
                  ],
                  [
                    39,
                    36
                  ],
                  [
                    40,
                    37
                  ],
                  [
                    41,
                    38
                  ]
                ]
              },
              "stringTable": [
                "__func__.0 (in [kernel.kallsyms].rodata)",
                "perf_trace_ext4_fc_track_inode (in [kernel.kallsyms])",
                "perf_trace_ext4_es_insert_delayed_block (in [kernel.kallsyms])",
                "ext4_es_show_pblock (in [kernel.kallsyms])",
                "perf_trace_ext4_ext_rm_leaf (in [kernel.kallsyms])",
                "devcgroup_access_write (in [kernel.kallsyms])",
                "devcgroup_update_access (in [kernel.kallsyms])",
                "propagate_exception (in [kernel.kallsyms])",
                "revalidate_active_exceptions (in [kernel.kallsyms])",
                "perf_trace_ext4_fc_commit_stop (in [kernel.kallsyms])",
                "perf_fetch_caller_regs (in [kernel.kallsyms])",
                "khugepaged (in [kernel.kallsyms])",
                "khugepaged_wait_work (in [kernel.kallsyms])",
                "freezable_schedule_timeout (in [kernel.kallsyms])",
                "freezer_count (in [kernel.kallsyms])",
                "try_to_freeze (in [kernel.kallsyms])",
                "try_to_freeze_unsafe (in [kernel.kallsyms])",
                "split_huge_pages_write (in [kernel.kallsyms])",
                "migrate_pages (in [kernel.kallsyms])",
                "unmap_and_move (in [kernel.kallsyms])",
                "__unmap_and_move (in [kernel.kallsyms])",
                "collect_events (in [kernel.kallsyms])",
                "uncore_down_prepare (in [kernel.kallsyms])",
                "perf_iommu_read (in [kernel.kallsyms])",
                "khugepaged_do_scan (in [kernel.kallsyms])",
                "khugepaged_scan_mm_slot (in [kernel.kallsyms])",
                "khugepaged_scan_file (in [kernel.kallsyms])",
                "need_resched (in [kernel.kallsyms])",
                "get_current (in [kernel.kallsyms])",
                "move_to_new_page (in [kernel.kallsyms])",
                "khugepaged_scan_pmd (in [kernel.kallsyms])",
                "trace_mm_khugepaged_scan_pmd (in [kernel.kallsyms])",
                "migrate_huge_page_move_mapping (in [kernel.kallsyms])",
                "do_huge_pmd_numa_page (in [kernel.kallsyms])",
                "pmd_pfn (in [kernel.kallsyms])",
                "protnone_mask (in [kernel.kallsyms])",
                "__pte_needs_invert (in [kernel.kallsyms])",
                "reclaim_high (in [kernel.kallsyms])",
                "memcg_memory_event (in [kernel.kallsyms])"
              ],
              "registerTime": 0,
              "unregisterTime": null,
              "processType": "default"
            }
          ],
          "processes": [],
          "pausedRanges": []
        }
        #
      Signed-off-by: default avatarAnup Sharma <anupnewsmail@gmail.com>
      Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Ingo Molnar <mingo@redhat.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: https://lore.kernel.org/r/cbf03cda175ea3dd2c6cd87bd3f12d803446cb95.1689961706.git.anupnewsmail@gmail.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      f9f72b2a