Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 288630
b: refs/heads/master
c: 008953d
h: refs/heads/master
v: v3
  • Loading branch information
Stephane Eranian authored and Arnaldo Carvalho de Melo committed Jan 30, 2012
1 parent fe39743 commit a759e50
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0bc8d20580af74c9a8a39c200e269261e5cded05
refs/heads/master: 008953dc6a3164b7ec2be2684a8fad1e636d5648
13 changes: 10 additions & 3 deletions trunk/tools/perf/builtin-top.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,6 @@ void get_term_dimensions(struct winsize *ws)

static void perf_top__update_print_entries(struct perf_top *top)
{
top->print_entries = top->winsize.ws_row;

if (top->print_entries > 9)
top->print_entries -= 9;
}
Expand All @@ -99,6 +97,13 @@ static void perf_top__sig_winch(int sig __used, siginfo_t *info __used, void *ar
struct perf_top *top = arg;

get_term_dimensions(&top->winsize);
if (!top->print_entries
|| (top->print_entries+4) > top->winsize.ws_row) {
top->print_entries = top->winsize.ws_row;
} else {
top->print_entries += 4;
top->winsize.ws_row = top->print_entries;
}
perf_top__update_print_entries(top);
}

Expand Down Expand Up @@ -452,8 +457,10 @@ static void perf_top__handle_keypress(struct perf_top *top, int c)
};
perf_top__sig_winch(SIGWINCH, NULL, top);
sigaction(SIGWINCH, &act, NULL);
} else
} else {
perf_top__sig_winch(SIGWINCH, NULL, top);
signal(SIGWINCH, SIG_DFL);
}
break;
case 'E':
if (top->evlist->nr_entries > 1) {
Expand Down

0 comments on commit a759e50

Please sign in to comment.