Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp914837ybx; Wed, 6 Nov 2019 10:16:04 -0800 (PST) X-Google-Smtp-Source: APXvYqyDLby9B/vlPACaksfYpiiABbbvrR9s8ITjv2UbVIdd9HMqc2eckHV8tX0neVAaKf2pWg3h X-Received: by 2002:a50:8a88:: with SMTP id j8mr4435620edj.35.1573064164521; Wed, 06 Nov 2019 10:16:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573064164; cv=none; d=google.com; s=arc-20160816; b=khiHBtgnBj6UZbx1mxyZ6V4Sbon+ncuMpDAAfMvFpnLDFUlSNTZCJAk8xAqAm4pl+e VbKNOERjilYC7wCDMCZYXr1aHvdoLyUUVXpLPy8dIO8y3Mzec+H4oEx5O9JDw8XgBz3W LFhiIxUcUx2xMXUWsnrQWihAR2N6XcHySXCOrtumfdWID29GSLCMk50Y5xqm9QfuoU7W /hqeNJeKcPaey2G1MsYQkYHJc9FzDixFSFZdK2LxrENY6WoOTOpyI4sJ9Quc6+GxWAIc /3rCxtNjFuAwEEye8Wos2oH2In5awoFDNUAu69UB1KdLtDNVozaHDfVZabv+iBm5kyz2 Jbyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :robot-unsubscribe:robot-id:message-id:mime-version:references :in-reply-to:cc:subject:to:reply-to:from:date; bh=hbrwvCYB9hQ24OQ3hqFOcLd2PFv/5HHQgPllQS757uk=; b=sV46AgYL3KNbx1sa8gTz2+qCFp8UsSQwA+lJhm36H5bDfIhR2yP7N1lEukRDWyqH6e cvUG29nUgOWNQ8ALE34mib3NG22eIXP8MKxWCzkLmd1MK/P5vB0UkPe0zFE7J14esewe YFHP/Ux8C395/hzvl7hJnZf1iz2JwvGkZspXBSOLSs6PFh3QYHUY/i4cHuX2A3NiBSVD rcjUu7SBAAs9tzuPD1xNVFEOETcU2nQYjPEqDuQUbKPtvMttpSKHvoKrRdFErNDhbINk uEPhOVcK9IemyEn0A5AL7TT//USlSvJFXtZhbYvko+OlLi9muD7NMjYY0ddYP4om2Nxh f3Bg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k3si3614330eji.300.2019.11.06.10.15.40; Wed, 06 Nov 2019 10:16:04 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732469AbfKFSPD (ORCPT + 99 others); Wed, 6 Nov 2019 13:15:03 -0500 Received: from Galois.linutronix.de ([193.142.43.55]:45013 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726713AbfKFSPD (ORCPT ); Wed, 6 Nov 2019 13:15:03 -0500 Received: from [5.158.153.53] (helo=tip-bot2.lab.linutronix.de) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1iSPp1-00015o-7Q; Wed, 06 Nov 2019 19:14:23 +0100 Received: from [127.0.1.1] (localhost [IPv6:::1]) by tip-bot2.lab.linutronix.de (Postfix) with ESMTP id 3ACD41C0131; Wed, 6 Nov 2019 19:14:20 +0100 (CET) Date: Wed, 06 Nov 2019 18:14:19 -0000 From: "tip-bot2 for Jiri Olsa" Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: perf/urgent] perf tools: Fix time sorting Cc: Jiri Olsa , Andi Kleen , Alexander Shishkin , Michael Petlan , Namhyung Kim , Peter Zijlstra , stable@vger.kernel.org, #@tip-bot2.tec.linutronix.de, v3.16+@tip-bot2.tec.linutronix.de, Arnaldo Carvalho de Melo , Ingo Molnar , Borislav Petkov , linux-kernel@vger.kernel.org In-Reply-To: <20191104232711.16055-1-jolsa@kernel.org> References: <20191104232711.16055-1-jolsa@kernel.org> MIME-Version: 1.0 Message-ID: <157306405988.29376.15381480880213738913.tip-bot2@tip-bot2> X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the perf/urgent branch of tip: Commit-ID: 722ddfde366fd46205456a9c5ff9b3359dc9a75e Gitweb: https://git.kernel.org/tip/722ddfde366fd46205456a9c5ff9b3359dc9a75e Author: Jiri Olsa AuthorDate: Tue, 05 Nov 2019 00:27:11 +01:00 Committer: Arnaldo Carvalho de Melo CommitterDate: Tue, 05 Nov 2019 08:49:14 -03:00 perf tools: Fix time sorting The final sort might get confused when the comparison is done over bigger numbers than int like for -s time. Check the following report for longer workloads: $ perf report -s time -F time,overhead --stdio Fix hist_entry__sort() to properly return int64_t and not possible cut int. Fixes: 043ca389a318 ("perf tools: Use hpp formats to sort final output") Signed-off-by: Jiri Olsa Reviewed-by: Andi Kleen Cc: Alexander Shishkin Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Cc: stable@vger.kernel.org # v3.16+ Link: http://lore.kernel.org/lkml/20191104232711.16055-1-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/hist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c index 679a1d7..7b6eaf5 100644 --- a/tools/perf/util/hist.c +++ b/tools/perf/util/hist.c @@ -1625,7 +1625,7 @@ int hists__collapse_resort(struct hists *hists, struct ui_progress *prog) return 0; } -static int hist_entry__sort(struct hist_entry *a, struct hist_entry *b) +static int64_t hist_entry__sort(struct hist_entry *a, struct hist_entry *b) { struct hists *hists = a->hists; struct perf_hpp_fmt *fmt;