* [PATCH] perf tools: Fix time sorting @ 2019-11-04 23:27 Jiri Olsa 2019-11-05 0:48 ` Andi Kleen 2019-11-06 18:14 ` [tip: perf/urgent] " tip-bot2 for Jiri Olsa 0 siblings, 2 replies; 6+ messages in thread From: Jiri Olsa @ 2019-11-04 23:27 UTC (permalink / raw) To: Arnaldo Carvalho de Melo Cc: Andi Kleen, lkml, Ingo Molnar, Namhyung Kim, Alexander Shishkin, Peter Zijlstra, Michael Petlan The final sort might get confused when the comparison is done over bigger numbers than int like for -s time. Check following report for longer workloads: $ perf report -s time -F time,overhead --stdio Fixing hist_entry__sort to properly return int64_t and not possible cut int. Cc: Andi Kleen <ak@linux.intel.com> Link: http://lkml.kernel.org/n/tip-uetl5z1eszpubzqykvdftaq6@git.kernel.org Signed-off-by: Jiri Olsa <jolsa@kernel.org> --- 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 679a1d75090c..7b6eaf5e0bda 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; -- 2.21.0 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] perf tools: Fix time sorting 2019-11-04 23:27 [PATCH] perf tools: Fix time sorting Jiri Olsa @ 2019-11-05 0:48 ` Andi Kleen 2019-11-05 11:49 ` Arnaldo Carvalho de Melo 2019-11-06 18:14 ` [tip: perf/urgent] " tip-bot2 for Jiri Olsa 1 sibling, 1 reply; 6+ messages in thread From: Andi Kleen @ 2019-11-05 0:48 UTC (permalink / raw) To: Jiri Olsa Cc: Arnaldo Carvalho de Melo, lkml, Ingo Molnar, Namhyung Kim, Alexander Shishkin, Peter Zijlstra, Michael Petlan On Tue, Nov 05, 2019 at 12:27:11AM +0100, Jiri Olsa wrote: > The final sort might get confused when the comparison > is done over bigger numbers than int like for -s time. > > Check following report for longer workloads: > $ perf report -s time -F time,overhead --stdio > > Fixing hist_entry__sort to properly return int64_t and > not possible cut int. > > Cc: Andi Kleen <ak@linux.intel.com> > Link: http://lkml.kernel.org/n/tip-uetl5z1eszpubzqykvdftaq6@git.kernel.org > Signed-off-by: Jiri Olsa <jolsa@kernel.org> Looks good. Reviewed-by: Andi Kleen <ak@linux.intel.com> -Andi ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] perf tools: Fix time sorting 2019-11-05 0:48 ` Andi Kleen @ 2019-11-05 11:49 ` Arnaldo Carvalho de Melo 2019-11-05 12:41 ` Jiri Olsa 0 siblings, 1 reply; 6+ messages in thread From: Arnaldo Carvalho de Melo @ 2019-11-05 11:49 UTC (permalink / raw) To: Andi Kleen Cc: Jiri Olsa, lkml, Ingo Molnar, Namhyung Kim, Alexander Shishkin, Peter Zijlstra, Michael Petlan Em Mon, Nov 04, 2019 at 04:48:54PM -0800, Andi Kleen escreveu: > On Tue, Nov 05, 2019 at 12:27:11AM +0100, Jiri Olsa wrote: > > The final sort might get confused when the comparison > > is done over bigger numbers than int like for -s time. > > > > Check following report for longer workloads: > > $ perf report -s time -F time,overhead --stdio > > > > Fixing hist_entry__sort to properly return int64_t and > > not possible cut int. > > > > Cc: Andi Kleen <ak@linux.intel.com> > > Link: http://lkml.kernel.org/n/tip-uetl5z1eszpubzqykvdftaq6@git.kernel.org > > Signed-off-by: Jiri Olsa <jolsa@kernel.org> > > Looks good. > > Reviewed-by: Andi Kleen <ak@linux.intel.com> Thanks, applied after adding: Fixes: 043ca389a318 ("perf tools: Use hpp formats to sort final output") Cc: stable@vger.kernel.org # v3.16+ - Arnaldo ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] perf tools: Fix time sorting 2019-11-05 11:49 ` Arnaldo Carvalho de Melo @ 2019-11-05 12:41 ` Jiri Olsa 2019-11-05 13:22 ` Arnaldo Carvalho de Melo 0 siblings, 1 reply; 6+ messages in thread From: Jiri Olsa @ 2019-11-05 12:41 UTC (permalink / raw) To: Arnaldo Carvalho de Melo Cc: Andi Kleen, Jiri Olsa, lkml, Ingo Molnar, Namhyung Kim, Alexander Shishkin, Peter Zijlstra, Michael Petlan On Tue, Nov 05, 2019 at 08:49:41AM -0300, Arnaldo Carvalho de Melo wrote: > Em Mon, Nov 04, 2019 at 04:48:54PM -0800, Andi Kleen escreveu: > > On Tue, Nov 05, 2019 at 12:27:11AM +0100, Jiri Olsa wrote: > > > The final sort might get confused when the comparison > > > is done over bigger numbers than int like for -s time. > > > > > > Check following report for longer workloads: > > > $ perf report -s time -F time,overhead --stdio > > > > > > Fixing hist_entry__sort to properly return int64_t and > > > not possible cut int. > > > > > > Cc: Andi Kleen <ak@linux.intel.com> > > > Link: http://lkml.kernel.org/n/tip-uetl5z1eszpubzqykvdftaq6@git.kernel.org > > > Signed-off-by: Jiri Olsa <jolsa@kernel.org> > > > > Looks good. > > > > Reviewed-by: Andi Kleen <ak@linux.intel.com> > > Thanks, applied after adding: > > Fixes: 043ca389a318 ("perf tools: Use hpp formats to sort final output") > Cc: stable@vger.kernel.org # v3.16+ I was wondering about putting some commit there, because it was there for long time.. but that commit you use seems to be old enough.. ;-) thanks, jirka ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] perf tools: Fix time sorting 2019-11-05 12:41 ` Jiri Olsa @ 2019-11-05 13:22 ` Arnaldo Carvalho de Melo 0 siblings, 0 replies; 6+ messages in thread From: Arnaldo Carvalho de Melo @ 2019-11-05 13:22 UTC (permalink / raw) To: Jiri Olsa Cc: Andi Kleen, Jiri Olsa, lkml, Ingo Molnar, Namhyung Kim, Alexander Shishkin, Peter Zijlstra, Michael Petlan Em Tue, Nov 05, 2019 at 01:41:50PM +0100, Jiri Olsa escreveu: > On Tue, Nov 05, 2019 at 08:49:41AM -0300, Arnaldo Carvalho de Melo wrote: > > Em Mon, Nov 04, 2019 at 04:48:54PM -0800, Andi Kleen escreveu: > > > On Tue, Nov 05, 2019 at 12:27:11AM +0100, Jiri Olsa wrote: > > > > The final sort might get confused when the comparison > > > > is done over bigger numbers than int like for -s time. > > > > > > > > Check following report for longer workloads: > > > > $ perf report -s time -F time,overhead --stdio > > > > > > > > Fixing hist_entry__sort to properly return int64_t and > > > > not possible cut int. > > > > > > > > Cc: Andi Kleen <ak@linux.intel.com> > > > > Link: http://lkml.kernel.org/n/tip-uetl5z1eszpubzqykvdftaq6@git.kernel.org > > > > Signed-off-by: Jiri Olsa <jolsa@kernel.org> > > > > > > Looks good. > > > > > > Reviewed-by: Andi Kleen <ak@linux.intel.com> > > > > Thanks, applied after adding: > > > > Fixes: 043ca389a318 ("perf tools: Use hpp formats to sort final output") > > Cc: stable@vger.kernel.org # v3.16+ > > I was wondering about putting some commit there, > because it was there for long time.. but that > commit you use seems to be old enough.. ;-) Yeah, I think it predates that, but the one I picked should have fixed that problem, as it was touching these routines, so I thought would be a good one to stick in a fixes tag :-) - Arnaldo > thanks, > jirka -- - Arnaldo ^ permalink raw reply [flat|nested] 6+ messages in thread
* [tip: perf/urgent] perf tools: Fix time sorting 2019-11-04 23:27 [PATCH] perf tools: Fix time sorting Jiri Olsa 2019-11-05 0:48 ` Andi Kleen @ 2019-11-06 18:14 ` tip-bot2 for Jiri Olsa 1 sibling, 0 replies; 6+ messages in thread From: tip-bot2 for Jiri Olsa @ 2019-11-06 18:14 UTC (permalink / raw) To: linux-tip-commits Cc: Jiri Olsa, Andi Kleen, Alexander Shishkin, Michael Petlan, Namhyung Kim, Peter Zijlstra, stable, #, v3.16+, Arnaldo Carvalho de Melo, Ingo Molnar, Borislav Petkov, linux-kernel 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 <jolsa@kernel.org> AuthorDate: Tue, 05 Nov 2019 00:27:11 +01:00 Committer: Arnaldo Carvalho de Melo <acme@redhat.com> 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 <jolsa@kernel.org> Reviewed-by: Andi Kleen <ak@linux.intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Michael Petlan <mpetlan@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> 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 <acme@redhat.com> --- 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; ^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2019-11-06 18:15 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2019-11-04 23:27 [PATCH] perf tools: Fix time sorting Jiri Olsa 2019-11-05 0:48 ` Andi Kleen 2019-11-05 11:49 ` Arnaldo Carvalho de Melo 2019-11-05 12:41 ` Jiri Olsa 2019-11-05 13:22 ` Arnaldo Carvalho de Melo 2019-11-06 18:14 ` [tip: perf/urgent] " tip-bot2 for Jiri Olsa
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).