From patchwork Sun Oct 16 12:09:14 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnaldo Carvalho de Melo X-Patchwork-Id: 3007 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp994552wrs; Sun, 16 Oct 2022 05:26:26 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7hnSxzO0rHlLBEA0A0F14gwfeCFGnR4xfTWMI339XQ4swkyOLEPSqDj2jsRckUTBQWtGsT X-Received: by 2002:a17:907:c25:b0:78e:1a4:132 with SMTP id ga37-20020a1709070c2500b0078e01a40132mr4966155ejc.521.1665923186448; Sun, 16 Oct 2022 05:26:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665923186; cv=none; d=google.com; s=arc-20160816; b=VZvWpoop6tr2/m49jgH+wbltdzQ4+hkkOALjhlxHJaeA0PRjimlEf1qTNuN3cmbrIG vnE/oszEqBWJqWpD3lsMU+TRip0R0cOanSlTtbpl5ORjYNO+GrEmI3cY9MtQ/+V3+u1Z gsAve3hTgyAzzTHXgNtFrzMCYIDWZYizWwZWDY+hWkMxTWF4v+BGkCbH+ugAPuSff4fn EV5KqUPxfjIMFEZdMo16u4czvGV/kmicfNG6bp2eJ1ZuvXy7i9oOvjU2yNSAAOTnZmxJ rtiAig+5DTcktHITQ8v8BTqXJ9xFa3YgBQavf7G1ZIJnsjkvnFmrJkVMwz787cFAghAJ qAtg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=qQbqCv5kkI9uxJQ7dzI+wkxmM6sGQjtI5KpQb4NZrAI=; b=SsCiKPZH66aASGVmV4RLL4hCD0FEnEqv4NkRvNU+j5OhvML43c+Ip48HxPS//x4TFl 4u9kL9ejiQCpeXQj6ZPYT+2j/M5NoJpf2Y3L239DVytdFKAN4TKOvJdlWoXnjKF9Ab/i yJLMa7S4IuJxPae0P4Bi8GLuOav6Cm+eYGsr/l+iA2x8etFaTqYZzPMk3kENeKhW0l4Z 2t6i28oJHUdJX/aCm2TXKpoJRiqsYdOlbZx8ZdHUo+0LUclyoH/UB68WUcmhJGTPW9lg GKWpPIhTW4t1VSgS6wswtlyCI1jA/GuV9vqijgsJ4E7xOIJ+9mACIbaopxqob+PSDv6j 2GxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=kfjTRtTb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dm25-20020a05640222d900b00458dcea145asi6302609edb.161.2022.10.16.05.26.01; Sun, 16 Oct 2022 05:26:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=kfjTRtTb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229660AbiJPMJe (ORCPT + 99 others); Sun, 16 Oct 2022 08:09:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55296 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229655AbiJPMJa (ORCPT ); Sun, 16 Oct 2022 08:09:30 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B21DCBC11; Sun, 16 Oct 2022 05:09:29 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id A2839B80C9D; Sun, 16 Oct 2022 12:09:27 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5397BC433C1; Sun, 16 Oct 2022 12:09:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1665922166; bh=GpqLSNYQjqaJSdWZ6dBPtIgeGyyWzkG+tl9KUtcB5mg=; h=From:To:Cc:Subject:Date:From; b=kfjTRtTb5Ff0joWqseNHQdsYG3OOR0DzMio+xR2hHaokwnUCJgn/sPxz6Du1EZ2Bc ZxZC4pU5O8u4h4kavnN9/XtU8ROjockSxz3eQIeRLr0pNipf+7iLifwCz8gXTCypfy sIcG5vF5wNh+TZZzKwKrUcnSdzzBb65fVFLtkcP7NiyhdRWvA52tn/wxA+X/GNwUFh 1OMY4ymxEHcMRAdPxrkI8Ze2oym/YB94DA8jPjwLPPBVzzHkghfkLfy9RvWQgtCueI wtUeDk2EK9KfM3rJrv4013l3fNaOhXrURosEjAeU8qoxh6RikD+e+O7/mO0dU+Ko0S Dv+9z14/fScrQ== From: Arnaldo Carvalho de Melo To: Linus Torvalds Cc: Ingo Molnar , Thomas Gleixner , Jiri Olsa , Namhyung Kim , Clark Williams , Kate Carcia , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Arnaldo Carvalho de Melo , Adrian Hunter , Ammy Yi , Andi Kleen , Athira Jajeev , Disha Goel , Ian Rogers , James Clark , Kevin Nomura , Leo Yan , Qi Liu , Ravi Bangoria , Rob Herring , Vitaly Chikunov , Yicong Yang , Arnaldo Carvalho de Melo Subject: [GIT PULL] perf tools changes for v6.1: 2nd batch Date: Sun, 16 Oct 2022 09:09:14 -0300 Message-Id: <20221016120914.624129-1-acme@kernel.org> X-Mailer: git-send-email 2.37.3 MIME-Version: 1.0 X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1746847070995284943?= X-GMAIL-MSGID: =?utf-8?q?1746847070995284943?= Hi Linus, Please consider pulling, Best regards, - Arnaldo The following changes since commit 9c9155a3509a2ebdb06d77c7a621e9685c802eac: Merge tag 'drm-next-2022-10-14' of git://anongit.freedesktop.org/drm/drm (2022-10-13 21:56:34 -0700) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-tools-for-v6.1-2-2022-10-16 for you to fetch changes up to a3a365655a28f12f07eddf4f3fd596987b175e1d: tools arch x86: Sync the msr-index.h copy with the kernel sources (2022-10-15 10:13:16 -0300) ---------------------------------------------------------------- perf tools changes for v6.1: 2nd batch - Use BPF CO-RE (Compile Once, Run Everywhere) to support old kernels when using bperf (perf BPF based counters) with cgroups. - Support HiSilicon PCIe Performance Monitoring Unit (PMU), that monitors bandwidth, latency, bus utilization and buffer occupancy. Documented in Documentation/admin-guide/perf/hisi-pcie-pmu.rst. - User space tasks can migrate between CPUs, so when tracing selected CPUs, system-wide sideband is still needed, fix it in the setup of Intel PT on hybrid systems. - Fix metricgroups title message in 'perf list', it should state that the metrics groups are to be used with the '-M' option, not '-e'. - Sync the msr-index.h copy with the kernel sources, adding support for using "AMD64_TSC_RATIO" in filter expressions in 'perf trace' as well as decoding it when printing the MSR tracepoint arguments. - Fix program header size and alignment when generating a JIT ELF in 'perf inject'. - Add multiple new Intel PT 'perf test' entries, including a jitdump one. - Fix the 'perf test' entries for 'perf stat' CSV and JSON output when running on PowerPC due to an invalid topology number in that arch. - Fix the 'perf test' for arm_coresight failures on the ARM Juno system. - Fix the 'perf test' attr entry for PERF_FORMAT_LOST, adding this option to the or expression expected in the intercepted perf_event_open() syscall. - Add missing condition flags ('hs', 'lo', 'vc', 'vs') for arm64 in the 'perf annotate' asm parser. - Fix 'perf mem record -C' option processing, it was being chopped up when preparing the underlying 'perf record -e mem-events' and thus being ignored, requiring using '-- -C CPUs' as a workaround. - Improvements and tidy ups for 'perf test' shell infra. - Fix Intel PT information printing segfault in uClibc, where a NULL format was being passed to fprintf. Signed-off-by: Arnaldo Carvalho de Melo ---------------------------------------------------------------- Adrian Hunter (8): perf test: test_intel_pt.sh: Fix return checking again perf test: test_intel_pt.sh: Tidy some perf record options perf test: test_intel_pt.sh: Print a message when skipping kernel tracing perf test: test_intel_pt.sh: Tidy some alignment perf test: test_intel_pt.sh: Add jitdump test perf inject: Fix GEN_ELF_TEXT_OFFSET for jit perf intel-pt: Fix segfault in intel_pt_print_info() with uClibc perf intel-pt: Fix system_wide dummy event for hybrid Ammy Yi (1): perf test: test_intel_pt.sh: Add 9 tests Andi Kleen (1): perf list: Fix metricgroups title message Arnaldo Carvalho de Melo (2): libperf: Do not include non-UAPI linux/compiler.h header tools arch x86: Sync the msr-index.h copy with the kernel sources Athira Rajeev (2): perf tests stat+csv_output: Include sanity check for topology perf tests stat+json_output: Include sanity check for topology James Clark (2): perf test: Fix test_arm_coresight.sh failures on Juno perf test: Fix attr tests for PERF_FORMAT_LOST Namhyung Kim (3): perf stat: Support old kernels for bperf cgroup counting perf annotate: Add missing condition flags for arm64 perf mem: Fix -C option behavior for perf mem record Qi Liu (3): perf auxtrace arm: Refactor event list iteration in auxtrace_record__init() perf auxtrace arm64: Add support for HiSilicon PCIe Tune and Trace device driver perf auxtrace arm64: Add support for parsing HiSilicon PCIe Trace packet Rob Herring (1): perf: Skip and warn on unknown format 'configN' attrs tools/arch/x86/include/asm/msr-index.h | 18 + tools/lib/perf/include/perf/event.h | 5 +- tools/perf/arch/arm/util/auxtrace.c | 116 ++++++- tools/perf/arch/arm/util/pmu.c | 3 + tools/perf/arch/arm64/annotate/instructions.c | 2 +- tools/perf/arch/arm64/util/Build | 2 +- tools/perf/arch/arm64/util/hisi-ptt.c | 188 ++++++++++ tools/perf/arch/x86/util/intel-pt.c | 2 +- tools/perf/builtin-list.c | 2 +- tools/perf/builtin-mem.c | 8 + tools/perf/tests/attr/base-record | 2 +- tools/perf/tests/attr/system-wide-dummy | 2 +- tools/perf/tests/attr/test-record-group | 4 +- tools/perf/tests/attr/test-record-group-sampling | 6 +- tools/perf/tests/attr/test-record-group1 | 4 +- tools/perf/tests/attr/test-record-group2 | 4 +- tools/perf/tests/shell/stat+csv_output.sh | 43 ++- tools/perf/tests/shell/stat+json_output.sh | 43 ++- tools/perf/tests/shell/test_arm_coresight.sh | 2 +- tools/perf/tests/shell/test_intel_pt.sh | 385 ++++++++++++++++++++- tools/perf/util/Build | 2 + tools/perf/util/auxtrace.c | 4 + tools/perf/util/auxtrace.h | 1 + tools/perf/util/bpf_skel/bperf_cgroup.bpf.c | 29 +- tools/perf/util/genelf.h | 4 +- tools/perf/util/hisi-ptt-decoder/Build | 1 + .../util/hisi-ptt-decoder/hisi-ptt-pkt-decoder.c | 164 +++++++++ .../util/hisi-ptt-decoder/hisi-ptt-pkt-decoder.h | 31 ++ tools/perf/util/hisi-ptt.c | 192 ++++++++++ tools/perf/util/hisi-ptt.h | 19 + tools/perf/util/intel-pt.c | 9 +- tools/perf/util/parse-events.c | 3 + tools/perf/util/pmu.c | 17 + tools/perf/util/pmu.h | 2 + tools/perf/util/pmu.l | 2 - tools/perf/util/pmu.y | 15 +- 36 files changed, 1265 insertions(+), 71 deletions(-) create mode 100644 tools/perf/arch/arm64/util/hisi-ptt.c create mode 100644 tools/perf/util/hisi-ptt-decoder/Build create mode 100644 tools/perf/util/hisi-ptt-decoder/hisi-ptt-pkt-decoder.c create mode 100644 tools/perf/util/hisi-ptt-decoder/hisi-ptt-pkt-decoder.h create mode 100644 tools/perf/util/hisi-ptt.c create mode 100644 tools/perf/util/hisi-ptt.h