提交 9848caf2 编写于 作者: I Ingo Molnar

Merge branch 'perf/core' of...

Merge branch 'perf/core' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux-2.6 into perf/core
...@@ -24,8 +24,8 @@ and statistics with this 'perf lock' command. ...@@ -24,8 +24,8 @@ and statistics with this 'perf lock' command.
'perf lock report' reports statistical data. 'perf lock report' reports statistical data.
OPTIONS COMMON OPTIONS
------- --------------
-i:: -i::
--input=<file>:: --input=<file>::
...@@ -39,6 +39,14 @@ OPTIONS ...@@ -39,6 +39,14 @@ OPTIONS
--dump-raw-trace:: --dump-raw-trace::
Dump raw trace in ASCII. Dump raw trace in ASCII.
REPORT OPTIONS
--------------
-k::
--key=<value>::
Sorting key. Possible values: acquired (default), contended,
wait_total, wait_max, wait_min.
SEE ALSO SEE ALSO
-------- --------
linkperf:perf[1] linkperf:perf[1]
...@@ -893,7 +893,7 @@ static const char * const report_usage[] = { ...@@ -893,7 +893,7 @@ static const char * const report_usage[] = {
static const struct option report_options[] = { static const struct option report_options[] = {
OPT_STRING('k', "key", &sort_key, "acquired", OPT_STRING('k', "key", &sort_key, "acquired",
"key for sorting"), "key for sorting (acquired / contended / wait_total / wait_max / wait_min)"),
/* TODO: type */ /* TODO: type */
OPT_END() OPT_END()
}; };
......
...@@ -70,6 +70,7 @@ static void perf_top_browser__write(struct ui_browser *browser, void *entry, int ...@@ -70,6 +70,7 @@ static void perf_top_browser__write(struct ui_browser *browser, void *entry, int
static void perf_top_browser__update_rb_tree(struct perf_top_browser *browser) static void perf_top_browser__update_rb_tree(struct perf_top_browser *browser)
{ {
struct perf_top *top = browser->b.priv; struct perf_top *top = browser->b.priv;
u64 top_idx = browser->b.top_idx;
browser->root = RB_ROOT; browser->root = RB_ROOT;
browser->b.top = NULL; browser->b.top = NULL;
...@@ -82,7 +83,29 @@ static void perf_top_browser__update_rb_tree(struct perf_top_browser *browser) ...@@ -82,7 +83,29 @@ static void perf_top_browser__update_rb_tree(struct perf_top_browser *browser)
if (browser->sym_width + browser->dso_width > browser->b.width - 29) if (browser->sym_width + browser->dso_width > browser->b.width - 29)
browser->sym_width = browser->b.width - browser->dso_width - 29; browser->sym_width = browser->b.width - browser->dso_width - 29;
} }
/*
* Adjust the ui_browser indexes since the entries in the browser->root
* rb_tree may have changed, then seek it from start, so that we get a
* possible new top of the screen.
*/
browser->b.nr_entries = top->rb_entries; browser->b.nr_entries = top->rb_entries;
if (top_idx >= browser->b.nr_entries) {
if (browser->b.height >= browser->b.nr_entries)
top_idx = browser->b.nr_entries - browser->b.height;
else
top_idx = 0;
}
if (browser->b.index >= top_idx + browser->b.height)
browser->b.index = top_idx + browser->b.index - browser->b.top_idx;
if (browser->b.index >= browser->b.nr_entries)
browser->b.index = browser->b.nr_entries - 1;
browser->b.top_idx = top_idx;
browser->b.seek(&browser->b, top_idx, SEEK_SET);
} }
static void perf_top_browser__annotate(struct perf_top_browser *browser) static void perf_top_browser__annotate(struct perf_top_browser *browser)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册