Skip to content

Commit

Permalink
perf ui browser: No need to switch char sets that often
Browse files Browse the repository at this point in the history
Just before and after the loop.

Cc: David Ahern <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
Cc: Mike Galbraith <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Stephane Eranian <[email protected]>
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
  • Loading branch information
acmel committed Oct 26, 2011
1 parent 13d8f96 commit 0458122
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tools/perf/util/ui/browser.c
Original file line number Diff line number Diff line change
Expand Up @@ -231,13 +231,15 @@ static void ui_browser__scrollbar_set(struct ui_browser *browser)
(browser->nr_entries - 1));
}

SLsmg_set_char_set(1);

while (h < height) {
ui_browser__gotorc(browser, row++, col);
SLsmg_set_char_set(1);
SLsmg_write_char(h == pct ? SLSMG_DIAMOND_CHAR : SLSMG_BOARD_CHAR);
SLsmg_set_char_set(0);
SLsmg_write_char(h == pct ? SLSMG_DIAMOND_CHAR : SLSMG_CKBRD_CHAR);
++h;
}

SLsmg_set_char_set(0);
}

static int __ui_browser__refresh(struct ui_browser *browser)
Expand Down

0 comments on commit 0458122

Please sign in to comment.