lkml.org 
[lkml]   [2012]   [Mar]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [RFC] Sort inclusive
On Mon, Mar 05, 2012 at 02:12:54PM -0800, Arun Sharma wrote:
>
> commit 29e659f0ca2041f2f1681a0072739165220d7c64
> Author: Arun Sharma <asharma@fb.com>
> Date: Wed Feb 29 21:40:47 2012 +0000
>
> perf: Add a new sort order: SORT_INCLUSIVE

Tiny bug fix for --tui users. h->inclusive should be used only for
total_period computation. Otherwise there will be entries in the UI that
you desperately want to navigate to due to the awesomeness of the
earlier patch, but can't get past the first entry :)

I'll fold this into the next rev.

-Arun

--- a/util/hist.c
+++ b/util/hist.c
@@ -182,10 +182,11 @@ static struct hist_entry *hist_entry__new(struct hist_entry *template)

static void hists__inc_nr_entries(struct hists *hists, struct hist_entry *h)
{
- if (!h->filtered && !h->inclusive) {
+ if (!h->filtered) {
hists__calc_col_len(hists, h);
++hists->nr_entries;
- hists->stats.total_period += h->period;
+ if (!h->inclusive)
+ hists->stats.total_period += h->period;
}
}


\
 
 \ /
  Last update: 2012-03-06 00:45    [W:0.148 / U:0.184 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site