From: Arnaldo Carvalho de Melo Date: Thu, 27 Oct 2011 11:19:48 +0000 (-0200) Subject: perf hists: Fix recalculation of total_period when sorting entries X-Git-Tag: v3.2-rc1~3^2~5 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7928631a66c884b18f827fbd1b63cd80198f004b;p=pandora-kernel.git perf hists: Fix recalculation of total_period when sorting entries We were doing parts of it in hists__collapse_resort and parts of it in hists__output_resort, leading to a bogus total_period. Fix it by doing just the filtering operation when collapsing because there we know that the Zoom operations adds filters just what is in hists->entries, not to the new batch of entries being collapsed. And move all the nr_entries + total_period recalculation to hists__output_resort since we will traverse all entries anyway there. Problem introduced when developing threaded addition of new batches of hist_entries, i.e. post v3.1. Reported-by: Frederic Weisbecker Cc: David Ahern Cc: Frederic Weisbecker Cc: Mike Galbraith Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lkml.kernel.org/n/tip-8xyh165h7hmwy0696hu25en6@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- Reading git-diff-tree failed