From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E9F71C433EF for ; Tue, 2 Nov 2021 18:08:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CD74660230 for ; Tue, 2 Nov 2021 18:08:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234819AbhKBSKe (ORCPT ); Tue, 2 Nov 2021 14:10:34 -0400 Received: from foss.arm.com ([217.140.110.172]:41272 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230392AbhKBSKd (ORCPT ); Tue, 2 Nov 2021 14:10:33 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 6689611B3; Tue, 2 Nov 2021 11:07:58 -0700 (PDT) Received: from ubuntu-18-04-aarch64-spe-2.warwick.arm.com (ubuntu-18-04-aarch64-spe-2.warwick.arm.com [10.32.33.30]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 85A7E3F7B4; Tue, 2 Nov 2021 11:07:56 -0700 (PDT) From: German Gomez To: linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, acme@kernel.org Cc: German Gomez , John Garry , Will Deacon , Mathieu Poirier , Leo Yan , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , linux-arm-kernel@lists.infradead.org Subject: [PATCH 0/3] perf arm-spe: Track pid/tid for Arm SPE samples Date: Tue, 2 Nov 2021 18:07:36 +0000 Message-Id: <20211102180739.18049-1-german.gomez@arm.com> X-Mailer: git-send-email 2.17.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following patchset is an iteration on RFC [1] where pid/tid info is assigned to the Arm SPE synthesized samples. Two methods of tracking pids are considered: hardware-based (using Arm SPE CONTEXT packets), and context-switch events (from perf) as fallback. - Patch #1 enables pid tracking using RECORD_SWITCH* events from perf. - Patch #2 saves the value of SPE CONTEXT packet to the arm_spe_record struct (patch from [2]). - Patch #3 enables hardware-based pid tracking using SPE CONTEXT packets. [1] https://lore.kernel.org/lkml/20210916001748.1525291-1-namhyung@kernel.org/ [2] https://www.spinics.net/lists/linux-perf-users/msg12543.html German Gomez (3): perf arm-spe: Track task context switch for cpu-mode events perf arm-spe: Save context ID in record perf arm-spe: Support hardware-based PID tracing tools/perf/arch/arm64/util/arm-spe.c | 6 +- .../util/arm-spe-decoder/arm-spe-decoder.c | 2 + .../util/arm-spe-decoder/arm-spe-decoder.h | 1 + tools/perf/util/arm-spe.c | 144 ++++++++++++++---- 4 files changed, 123 insertions(+), 30 deletions(-) -- 2.25.1 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5AF23C433F5 for ; Tue, 2 Nov 2021 18:09:21 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1DB0A61051 for ; Tue, 2 Nov 2021 18:09:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 1DB0A61051 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date:Subject:Cc:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=c5gAu+OHcBjYxJFMwcMrqY7K5WgdfgHjCCzpzE0JZhc=; b=ZH5DZSWNZI5PUJ XQ+EohjVqImZVWo1EQPYBQXjpJlyAjqMyKvGhl8upIU7Fld0QUhLEe+hbklS0anSLW5s49JNBKLYb HNILD6BENa1rm6P013gIiFtmyQ+DsT1YnWrAzpVdbX3+mjL6GacGOiUak/oZyVGC8maACIQiOr/mZ 3GozmlsLd9spxtW8k1vGuhxK23RXNng28zDcpqWJRTA+ZIpt/YhDkOpqQP0YLze+5sYe7AVzT7UHP hr3X4z9z0I9DEZsDB8L7rDykEW4W7BqxtsiDuMqK+8oljQwEuau1tPH7nJAeKnJN2XK0llaG3gyJ9 CtzfnlfM4Kn8oJflKMHg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mhyCc-002cCL-NJ; Tue, 02 Nov 2021 18:08:06 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mhyCY-002cA2-45 for linux-arm-kernel@lists.infradead.org; Tue, 02 Nov 2021 18:08:04 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 6689611B3; Tue, 2 Nov 2021 11:07:58 -0700 (PDT) Received: from ubuntu-18-04-aarch64-spe-2.warwick.arm.com (ubuntu-18-04-aarch64-spe-2.warwick.arm.com [10.32.33.30]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 85A7E3F7B4; Tue, 2 Nov 2021 11:07:56 -0700 (PDT) From: German Gomez To: linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, acme@kernel.org Cc: German Gomez , John Garry , Will Deacon , Mathieu Poirier , Leo Yan , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , linux-arm-kernel@lists.infradead.org Subject: [PATCH 0/3] perf arm-spe: Track pid/tid for Arm SPE samples Date: Tue, 2 Nov 2021 18:07:36 +0000 Message-Id: <20211102180739.18049-1-german.gomez@arm.com> X-Mailer: git-send-email 2.17.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211102_110802_254581_30EE44B4 X-CRM114-Status: UNSURE ( 6.52 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The following patchset is an iteration on RFC [1] where pid/tid info is assigned to the Arm SPE synthesized samples. Two methods of tracking pids are considered: hardware-based (using Arm SPE CONTEXT packets), and context-switch events (from perf) as fallback. - Patch #1 enables pid tracking using RECORD_SWITCH* events from perf. - Patch #2 saves the value of SPE CONTEXT packet to the arm_spe_record struct (patch from [2]). - Patch #3 enables hardware-based pid tracking using SPE CONTEXT packets. [1] https://lore.kernel.org/lkml/20210916001748.1525291-1-namhyung@kernel.org/ [2] https://www.spinics.net/lists/linux-perf-users/msg12543.html German Gomez (3): perf arm-spe: Track task context switch for cpu-mode events perf arm-spe: Save context ID in record perf arm-spe: Support hardware-based PID tracing tools/perf/arch/arm64/util/arm-spe.c | 6 +- .../util/arm-spe-decoder/arm-spe-decoder.c | 2 + .../util/arm-spe-decoder/arm-spe-decoder.h | 1 + tools/perf/util/arm-spe.c | 144 ++++++++++++++---- 4 files changed, 123 insertions(+), 30 deletions(-) -- 2.25.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel