From patchwork Mon Feb 6 16:20:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Liang, Kan" X-Patchwork-Id: 53424 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2336958wrn; Mon, 6 Feb 2023 08:46:06 -0800 (PST) X-Google-Smtp-Source: AK7set+khfbXHJAOuShoUp/3m82q2QzZYPtXdO7KIJjbDAyQQ+NJhCQGhd2nW6RX52j/qYvmCiGL X-Received: by 2002:a17:906:88a:b0:88c:a6c7:af55 with SMTP id n10-20020a170906088a00b0088ca6c7af55mr17213195eje.28.1675701966689; Mon, 06 Feb 2023 08:46:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675701966; cv=none; d=google.com; s=arc-20160816; b=DJfHjfxs/FzbKdIEWrW4HLaTv7vAM2ppUrxvGVeIeGKYtN9YxtgcOhs5gzHyv0PmyJ dGPJlx5CmAMY4MWoyUBIquvBadfMy7cpKkh5nY4XrFhaJNB9ZcA6WNueqwFo3ReJHrBQ kKOjCNs4hva9ayCv3Oxl7HkQXRKV9y3WHMHq/ia4nthId5JCrzZDwqNXz6oNydSjplR3 rQwNRCz0pg3tinlPJ2txmCjtLuDAFrIcpvaqJpMR7Va+sURy9qXQaZFtYS1APSwZfB8V tVgAIkXZ+DN3eq7Oxdg8qEHfQw2weh2GaX6mNapKLy3JMGn9ZGWoGQ+o22kkldchCyna 4oEA== 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=9yHhA9QvwrVjPEV6Yftvw1xTd9Ce+BCm4BuwSMImldA=; b=IICPBRHOWr+GNWkvbpdgwdDKQhHru1HR/1KVo2Vh2ccoux7BhVbG+Tz95o9v3V/nc+ bAY+FR1wAtYIlfTph3bVmAff5ndqxdHvgZ2iKqkUDvuFKI2RB90Dh4xBVEHUssYTOSJE Q+c/8W/SA/0llxIfciWjHoyXllYtTqiHVIaXWLYY6AWGbCdr3tcjPq4h/nxluuSzcnZm PKuaW7knbZeaBdepFaAQsUT9KNgYMu37OtBVeDKA6J/YiYKL1TpULPGHqsZXNLRUWZ+Y gY4hw6zwxKsyYm5epCdCb2CjeJas6kfBrVlATT4q8agSn3YfsHCgurSOMFqIj3sdx28O fBmA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=k2fdX7ls; 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=intel.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id fx17-20020a1709069e9100b00883258d9023si12020029ejc.514.2023.02.06.08.45.43; Mon, 06 Feb 2023 08:46:06 -0800 (PST) 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=@intel.com header.s=Intel header.b=k2fdX7ls; 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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230098AbjBFQVO (ORCPT + 99 others); Mon, 6 Feb 2023 11:21:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33342 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230043AbjBFQVM (ORCPT ); Mon, 6 Feb 2023 11:21:12 -0500 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B6E9E524E for ; Mon, 6 Feb 2023 08:21:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1675700460; x=1707236460; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=cqqjE9Ifq/gNPEFXsZSg0+BoiU8Nz+x/je03zfph70c=; b=k2fdX7lsDmBn7b+nwR5ePOJq8FY2z30dlIuLHC+sMn+YCVkV0qUhP/7s aG18X59g3GfXNudlURTbKF2oFm7ZiGGqLP39XX7EudBfFde//TajLkFpu MPs40AS/uJPcE7EJiQWc6gv0AlRQWJ4TLUCbeyt+0JLWx5n4lJ59sCBpn kqZEknOrCzThAv/S18iMYpzuWdeM9DcJ9Ec9O1eqE6Lny2tEV6GwAaFwO mj/VMSIQBQnL5/yic8XbT99WUVoU78aLU21uGIvCB3fJgWv+8Kx7U7mNf miZyFFFtX+XreWrrKEsu/JggXndTJ5pK0ZpYIK/RVmi8dbNST/uq3Ys9I A==; X-IronPort-AV: E=McAfee;i="6500,9779,10613"; a="356603955" X-IronPort-AV: E=Sophos;i="5.97,276,1669104000"; d="scan'208";a="356603955" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Feb 2023 08:21:00 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10613"; a="995364354" X-IronPort-AV: E=Sophos;i="5.97,276,1669104000"; d="scan'208";a="995364354" Received: from kanliang-dev.jf.intel.com ([10.165.154.102]) by fmsmga005.fm.intel.com with ESMTP; 06 Feb 2023 08:20:59 -0800 From: kan.liang@linux.intel.com To: acme@kernel.org, peterz@infradead.org, mingo@redhat.com, linux-kernel@vger.kernel.org Cc: ak@linux.intel.com, eranian@google.com, irogers@google.com, Kan Liang Subject: [PATCH V4 1/2] perf event: Fix the Retire Latency sample_type check failure Date: Mon, 6 Feb 2023 08:20:59 -0800 Message-Id: <20230206162100.3329395-1-kan.liang@linux.intel.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE 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?1757100865530928210?= X-GMAIL-MSGID: =?utf-8?q?1757100865530928210?= From: Kan Liang perf test -v "x86 sample parsing" 74: x86 Sample parsing : --- start --- test child forked, pid 72526 Samples differ at 'retire_lat' parsing failed for sample_type 0x1000000 test child finished with -1 ---- end ---- x86 Sample parsing: FAILED! In the arch_perf_synthesize_sample_weight(), the retire_lat is mistakenly missed. Reported-by: Arnaldo Carvalho de Melo Signed-off-by: Kan Liang --- tools/perf/arch/x86/util/event.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/perf/arch/x86/util/event.c b/tools/perf/arch/x86/util/event.c index 37b3feb53e8d..e4288d09f3a0 100644 --- a/tools/perf/arch/x86/util/event.c +++ b/tools/perf/arch/x86/util/event.c @@ -101,6 +101,7 @@ void arch_perf_synthesize_sample_weight(const struct perf_sample *data, if (type & PERF_SAMPLE_WEIGHT_STRUCT) { *array &= 0xffffffff; *array |= ((u64)data->ins_lat << 32); + *array |= ((u64)data->retire_lat << 48); } } From patchwork Mon Feb 6 16:21:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Liang, Kan" X-Patchwork-Id: 53422 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2336217wrn; Mon, 6 Feb 2023 08:44:37 -0800 (PST) X-Google-Smtp-Source: AK7set8EU+diCLiF+gcb/KhOA/H6/vp7uHobbTyzpv2ArsWzzEjJEjMGHztRpVMMMNFxDFq+bQ/t X-Received: by 2002:a50:d084:0:b0:4aa:c7ed:b965 with SMTP id v4-20020a50d084000000b004aac7edb965mr225496edd.9.1675701877226; Mon, 06 Feb 2023 08:44:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675701877; cv=none; d=google.com; s=arc-20160816; b=sbcAqR5l0MGJGKkvC18PE5jjcZlO+nYhPg4AvT3QXlxb75UQx9jYGq4z4vNIh1KU30 vYOSfzaJ9qWjPq/48nNGLDtWIOlcdHWEgO0QJgxc9ugV7cRQJl/+e9MleyX0yYokQxql cCtUm9i6QAODIuRbXdTLPOO4xVgb1GmllzcpMdqjdCofUP3n11NkTPrDbiafQbNrzF8R Rkc/WBOp6z8Q/+ZzsLAm84iRpp5YseHC/L4lMyVuYTIlxrSKF7W11YNxDwwK6P4tDxG3 UU3tDeK85goWMYB8V6mzykLL+1gZKcYvV+1Tl3UQAJvxcYZSj99eLTYrkUGRI0mJLLW0 vNJQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=KS3sp2FXax+RpYKS7bfrhRDgeZTP0x2UEk0Ro/W/RWI=; b=R358YmCsDU+2gdVrZI2wSAPGW/62OV+weCgJJXa2rWiie0CUsGVusoR9FNZ4lPSTFV 7RTVMxoZCMoJLM/B/BztHp3jxeLpj8OCWhvOLt+itgI7m5lsOijQPZWiaa8Y1T+ymIro qiU22Y0Y/ebPgkmCc3oz6cz+Rnb8wkgR7WREbFNRvuaUO7qzOg0nzqlz/qP/5LVeJgiz CsRh/7jeaX67OGdP2bXio6Yqrp2oxSJKlR5laAUCO7gcPjegx8IHSwoZcXJ/fyqjYBD/ e6ytutj5d897fN5VezxIBy1NoyeMYERVUvWL4RQTru6gOmoNRxeeyW24ioN3/XXZjkx4 hp9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="ldNcS6C/"; 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=intel.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 15-20020a170906018f00b0088cc1a4d224si12704507ejb.193.2023.02.06.08.44.14; Mon, 06 Feb 2023 08:44:37 -0800 (PST) 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=@intel.com header.s=Intel header.b="ldNcS6C/"; 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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230365AbjBFQVR (ORCPT + 99 others); Mon, 6 Feb 2023 11:21:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33552 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229677AbjBFQVP (ORCPT ); Mon, 6 Feb 2023 11:21:15 -0500 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ADE0E4EED for ; Mon, 6 Feb 2023 08:21:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1675700464; x=1707236464; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=yuXZRjRm7tCGuBSnfwstn4+vFjvD12EliJOXuHUYabY=; b=ldNcS6C/bcGuqQK7ZM13fgQ+nUDi3w23/A0HK1kJHU0gsIzZPRHmWabZ 5qJh4yPZiesEr6dTO3106zLMVfUpKRB+7h+LBcvaKZMNPvIRvRw4er3qO PRPfqkGH555HEcWMF9oW+cbau2/ZVBaVmE+w8vhrvO+iMoOjq+NeDfEAT 3nWw2h/hF01P4MVleu/cgucf8L1A4uEges5YRx7RdVT851DozzH8UKdWL cTgs74NdDyKDHBV3VMauYD3WbVhGW+l+RwNSUemRNRQsop3Bttd6PMaQH pCHxu6LmKxMbfiVe2OO7aay3KozhcB6NMXbevttd1ec8DYyQn+FhtsRAk g==; X-IronPort-AV: E=McAfee;i="6500,9779,10613"; a="356603971" X-IronPort-AV: E=Sophos;i="5.97,276,1669104000"; d="scan'208";a="356603971" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Feb 2023 08:21:04 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10613"; a="995364402" X-IronPort-AV: E=Sophos;i="5.97,276,1669104000"; d="scan'208";a="995364402" Received: from kanliang-dev.jf.intel.com ([10.165.154.102]) by fmsmga005.fm.intel.com with ESMTP; 06 Feb 2023 08:21:02 -0800 From: kan.liang@linux.intel.com To: acme@kernel.org, peterz@infradead.org, mingo@redhat.com, linux-kernel@vger.kernel.org Cc: ak@linux.intel.com, eranian@google.com, irogers@google.com, Kan Liang Subject: [PATCH V4 2/2] perf script: Fix missing Retire Latency fields option documentation Date: Mon, 6 Feb 2023 08:21:00 -0800 Message-Id: <20230206162100.3329395-2-kan.liang@linux.intel.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20230206162100.3329395-1-kan.liang@linux.intel.com> References: <20230206162100.3329395-1-kan.liang@linux.intel.com> MIME-Version: 1.0 X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE 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?1757100771281150332?= X-GMAIL-MSGID: =?utf-8?q?1757100771281150332?= From: Kan Liang The 'perf script' documentation is missing the fields option for Retire Latency. Add it. Signed-off-by: Kan Liang --- tools/perf/Documentation/perf-script.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/perf/Documentation/perf-script.txt b/tools/perf/Documentation/perf-script.txt index a2ebadc9d948..777a0d8ba7d1 100644 --- a/tools/perf/Documentation/perf-script.txt +++ b/tools/perf/Documentation/perf-script.txt @@ -134,7 +134,7 @@ OPTIONS srcline, period, iregs, uregs, brstack, brstacksym, flags, bpf-output, brstackinsn, brstackinsnlen, brstackoff, callindent, insn, insnlen, synth, phys_addr, metric, misc, srccode, ipc, data_page_size, code_page_size, ins_lat, - machine_pid, vcpu, cgroup. + machine_pid, vcpu, cgroup, retire_lat. Field list can be prepended with the type, trace, sw or hw, to indicate to which event type the field list applies. e.g., -F sw:comm,tid,time,ip,sym and -F trace:time,cpu,trace