Merge branch 'perf/urgent' into perf/core
We cherry-picked 3 commits into perf/urgent, merge them back to allow conflict-free work on those files. Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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) {
|
||||
|
Reference in New Issue
Block a user