Received: by 2002:a89:48b:0:b0:1f5:f2ab:c469 with SMTP id a11csp1441648lqd; Thu, 25 Apr 2024 16:17:07 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVrZBw9xg/x3iTe6PJsrecfJo4xS/IJXWFX2ErmleyYKfHP4l0kmfh7lYZ7GE+T06DpCnIUGJ5Np4x7llPGp7ZOkrzXSy5fX8ZUbHzN1g== X-Google-Smtp-Source: AGHT+IEOP31jOzHocR58mrS1sy54NHWcIx0emrQbLe0exi4P4upxTROxMwn+25LnRpIvYm0pbYtT X-Received: by 2002:a05:600c:46d1:b0:418:ad02:913e with SMTP id q17-20020a05600c46d100b00418ad02913emr905423wmo.12.1714087027255; Thu, 25 Apr 2024 16:17:07 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714087027; cv=pass; d=google.com; s=arc-20160816; b=Q6T4+u24AbFCRIDQCqlZjOizRFoEMWoF0Ql7tPlRBjJvSN1IJd+LOaGG8PB63mZz6h UyPT2dUdwrJhI0gDyUKgQZ0d40rGo/A+MV9BReLmYChCzHEJCBDoRt/te7kUnEEPIzAF ctfJAZyTemwg4AizUqp8zbKdiFptDzcTorAtzPVftYfZFPJhaBEyeO8486+MhONWLroR HOXa944dS5YgTuj/aIncaOOBbjk2x0wIgq68b22lmayaGvfTQJf6bdV4pMB3YTZpNUSg vYK1ewUZykN9BT1FmwrzoetLy77IQM+94pbHdPjc5zcMmzU44JTXurNJ7MCvP8f2tYI4 ygiQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=lfaMvzDnUOq72RH9ZTWw7o8ERqsQJFe2Im/Vm0qIXz4=; fh=fHhbvXgCev/wpffLVpfaAi8pPyv7hrTyhVPgsZ7HNrs=; b=m6+Vl1+bmKguFPOZ7I9GXL7oeNRubamvgqX8lONH72HzrIrswo+a/Wrx0IVOQOWIph nDhFuV782KHrurIKBzboXol3RSsUQHO8w6bZvZNBFoXLroKJZkxaDoVQQ/HneQ9pmA5z OccwOZ6Yy3bV2RLAj+gJkc4CsMQb/kqy7mhYWRRGPejldHL7GRVhc8UzuUpPhcWTAwRI 5h5yd6+8TWm4lgf4PwwTZpWWn7N8F+DKcPLdz2yYsn2fwJpxWEmwWFf/JZB40RQ/nNnv jhvkyzup+npbHrMqmOn9TBqf6OcQ7gwc+K7eV0YlJMABFWvJwgnJlM2azGA4oiWhKuT+ 5/kA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Us0d8LYI; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-159353-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-159353-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id dv18-20020a170906b81200b00a5890baba0bsi2776253ejb.280.2024.04.25.16.17.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Apr 2024 16:17:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-159353-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Us0d8LYI; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-159353-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-159353-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 014CE1F22CCB for ; Thu, 25 Apr 2024 23:17:07 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6369D156658; Thu, 25 Apr 2024 23:17:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Us0d8LYI" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8B49B156230; Thu, 25 Apr 2024 23:16:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714087019; cv=none; b=I37wACBaJw00yTP9mbdWI2Hj0TmMjpnw8G1mgGUkrxQzLHUu2uUukiecui72blCOXYSYXFASCCHlAMil/76OB0mC6vNPGKvUm84T1o1+RRu3QWyxZtrn4u9c9632V3t5ApKCwmOH7GYQYvIqZiETA5Pq09gCsnjaTlzqdiZWa/U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714087019; c=relaxed/simple; bh=nvOjsG5VqPWXEiyRE20YY+xwf8zVmtXTntJ6G4y6H7Y=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=Vk7AQ5nAHSpG6lbW878NSpcUrQpmeRfYS0ZhP6+cylX0MhxamBheVPJtMwUPk+zSNlJucKgEMrppGUIa0MhDAVXlzRmyvEMAGtJSwPv2r4hgO/YCrxyYEmBxRTKyS3lqdxvNZIpat0MWDBIaXLt4PBwJM9adaIuHQf8SjJKgU/w= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Us0d8LYI; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id C6F1FC113CC; Thu, 25 Apr 2024 23:16:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1714087019; bh=nvOjsG5VqPWXEiyRE20YY+xwf8zVmtXTntJ6G4y6H7Y=; h=From:To:Cc:Subject:Date:From; b=Us0d8LYI5olvRkRcs+ySMzvA7NvNkty+iIfcZzJuFzHG/C/Da0GjIJgZv/QJWpFe+ DNm0CLQ12UyhSG7/50LDwEeUeKPoof0wjNb0v06RT7k6JhAvMcfIlQAMIk2XZk4sPu xdv5lOfYqpyOSuJajAaTJl/dy4N101PjIqcGn3x8vaDv6mjDySKNIcfc0pf9ipQLQC XQ4tis0Uf9pC9xr2kPoo5JtO4FmD4F0SJjGRR4v7Kowd9OPlchJbqbQ+HU9M2obKiE j+b0kgJfNPvQBB/VFWtDoBu9YKiEjcxfuiNaOMoNy0z00yqRANtmrAupWHV9/Q7Th9 gGU6O4fOzZfFw== From: Namhyung Kim To: Arnaldo Carvalho de Melo , Ian Rogers , Kan Liang Cc: Jiri Olsa , Adrian Hunter , Peter Zijlstra , Ingo Molnar , LKML , linux-perf-users@vger.kernel.org Subject: [PATCH] perf report: Fix condition in sort__sym_cmp() Date: Thu, 25 Apr 2024 16:16:58 -0700 Message-ID: <20240425231658.1201237-1-namhyung@kernel.org> X-Mailer: git-send-email 2.44.0.769.g3c40516874-goog Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit It's expected that both hist entries are in the same hists when comparing two. But the current code in the function checks one without dso sort key and other with the key. This would make the condition true in any case. I guess the intention of the original commit was to add '!' for the right side too. But as it should be the same, let's just remove it. Fixes: 69849fc5d2119 ("perf hists: Move sort__has_dso into struct perf_hpp_list") Signed-off-by: Namhyung Kim --- tools/perf/util/sort.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/perf/util/sort.c b/tools/perf/util/sort.c index 704664e5b4ea..af845d0d418d 100644 --- a/tools/perf/util/sort.c +++ b/tools/perf/util/sort.c @@ -333,7 +333,7 @@ sort__sym_cmp(struct hist_entry *left, struct hist_entry *right) * comparing symbol address alone is not enough since it's a * relative address within a dso. */ - if (!hists__has(left->hists, dso) || hists__has(right->hists, dso)) { + if (!hists__has(left->hists, dso)) { ret = sort__dso_cmp(left, right); if (ret != 0) return ret; -- 2.44.0.769.g3c40516874-goog