From patchwork Mon Nov 23 12:21:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 330661 Delivered-To: patch@linaro.org Received: by 2002:a92:ae0b:0:0:0:0:0 with SMTP id s11csp1966853ilh; Mon, 23 Nov 2020 04:47:42 -0800 (PST) X-Google-Smtp-Source: ABdhPJwrcvO2UTPHlhn5WBs4XBb6EaVIfNyg6giceYmCyjfRJl8UYBIauqLCHyU5bBycVvt3dYCp X-Received: by 2002:a17:907:9d0:: with SMTP id bx16mr45177593ejc.426.1606135662123; Mon, 23 Nov 2020 04:47:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606135662; cv=none; d=google.com; s=arc-20160816; b=r30/6TxcDNYAbNJc+XnazcIoP/a/GUihmqfLa22WsL48YDOkRiQQN8XrPnAmJUwsR9 AbrCD9LuPrrOyN+zyhH17J3XHerHFaju7KMLRQGhegKfY4g5HnwKpxoDmjRDoWg4SjHM U13PjYPyvIOAiQOcA03lv5Qqn8E3SR2nyuCMmFdZpAGkIhHQltQAGcPDVAFck29JfmPB mm3eIdeTAa/WMZzDGm418WvU8lHoap20HIfiCLyUxxtFr9glLmb5/KI2juRHMyEo9hoS 7NlmGijFm9Ouh+zgSTinuq49kFEo6JEGy7goNUYmT90l0Uc4LbxRBMJzs7GajHIQsp+8 CQfQ== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=P217cJwxquVTyho8BbdkgSyIyYu6hB3QIz+Zvaw2WvM=; b=pT8OMab8f1rkM8/8KtsxZOrka7tBleVTYC9czpt/mwJKR/li3iw9tBspVBhlqRExeB w96d70qp8V6uqma/GbKfSzo2jx0s+oEBb+mQmuW3wA4xXy5zs6JchVMxa4hE/AMv1rfx XwMqlr3wwgu/YTamUPe3RlDplhLBZVuQbhTKfwszT27COZsrvifg+EkCv2auEYFIyXho 23vkfsskiMavX76WjpDQjqAmwCh5GuraZWjtDUKkAq95I7k5ZEHiWjx8/p6FbT/JdPh5 09Bbx7AXqygrrlwgmDNRs096QqrCgpt/U3R2YHDk0n+DAGzIeHfRvkuECk9IiFgiwp1p 9D1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=N9jqg+lk; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g17si6809070edy.62.2020.11.23.04.47.41; Mon, 23 Nov 2020 04:47:42 -0800 (PST) Received-SPF: pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=N9jqg+lk; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732742AbgKWMq3 (ORCPT + 14 others); Mon, 23 Nov 2020 07:46:29 -0500 Received: from mail.kernel.org ([198.145.29.99]:60030 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732737AbgKWMq1 (ORCPT ); Mon, 23 Nov 2020 07:46:27 -0500 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 899D920857; Mon, 23 Nov 2020 12:46:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1606135586; bh=dIRLnhRg/baSpycpsKUNXko8Wb8EAhAPwqn2dphLdfA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=N9jqg+lkitRPo4jKcEfmV7XSvvdDL+rTEQanWdqhyh1IJSKAD/S0KeAvB9isauoGa dwRXCjjt+oSUDtMnjqMTb7pOy+kMRqW5C/UKDxVbGpnVwxothSXJenLwhg7FLR00tN Bk6Vw68MAG2PrOJMQE/ulpYHDLgA7MaeHxRWzcW0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Leo Yan , Jiri Olsa , Arnaldo Carvalho de Melo , Sasha Levin Subject: [PATCH 5.9 122/252] perf lock: Correct field name "flags" Date: Mon, 23 Nov 2020 13:21:12 +0100 Message-Id: <20201123121841.479526414@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201123121835.580259631@linuxfoundation.org> References: <20201123121835.580259631@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Leo Yan [ Upstream commit e24a87b54ef3e39261f1d859b7f78416349dfb14 ] The tracepoint "lock:lock_acquire" contains field "flags" but not "flag". Current code wrongly retrieves value from field "flag" and it always gets zero for the value, thus "perf lock" doesn't report the correct result. This patch replaces the field name "flag" with "flags", so can read out the correct flags for locking. Fixes: e4cef1f65061 ("perf lock: Fix state machine to recognize lock sequence") Signed-off-by: Leo Yan Acked-by: Jiri Olsa Link: https://lore.kernel.org/r/20201104094229.17509-1-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin --- tools/perf/builtin-lock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.27.0 diff --git a/tools/perf/builtin-lock.c b/tools/perf/builtin-lock.c index f0a1dbacb46c7..5cecc1ad78e1f 100644 --- a/tools/perf/builtin-lock.c +++ b/tools/perf/builtin-lock.c @@ -406,7 +406,7 @@ static int report_lock_acquire_event(struct evsel *evsel, struct lock_seq_stat *seq; const char *name = evsel__strval(evsel, sample, "name"); u64 tmp = evsel__intval(evsel, sample, "lockdep_addr"); - int flag = evsel__intval(evsel, sample, "flag"); + int flag = evsel__intval(evsel, sample, "flags"); memcpy(&addr, &tmp, sizeof(void *));