Patch "perf report: Fix condition in sort__sym_cmp()" has been added to the 5.10-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    perf report: Fix condition in sort__sym_cmp()

to the 5.10-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     perf-report-fix-condition-in-sort__sym_cmp.patch
and it can be found in the queue-5.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 72d4446994f8a306b7a3033b3754e438be3f8e0a
Author: Namhyung Kim <namhyung@xxxxxxxxxx>
Date:   Fri Jun 21 10:05:25 2024 -0700

    perf report: Fix condition in sort__sym_cmp()
    
    [ Upstream commit cb39d05e67dc24985ff9f5150e71040fa4d60ab8 ]
    
    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")
    Reviewed-by: Kan Liang <kan.liang@xxxxxxxxxxxxxxx>
    Signed-off-by: Namhyung Kim <namhyung@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20240621170528.608772-2-namhyung@xxxxxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/tools/perf/util/sort.c b/tools/perf/util/sort.c
index 42806102010bb..bbebb1e51b88f 100644
--- a/tools/perf/util/sort.c
+++ b/tools/perf/util/sort.c
@@ -272,7 +272,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;




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux