[GIT PULL 00/15] perf/core improvements

October 06th, 2011 - 01:30 pm ET by Arnaldo Carvalho de Melo | Report spam
Hi Ingo,

Please consider pulling from:

git://github.com/acmel/linux.git perf/core

It makes 'perf top' use the abstractions in 'perf report', allowing it
to:

1. Have total consistency with 'report'

2. Allow --sort to be used to have more views than just 'dso, symbol'
Try 'perf top --sort comm' or 'pid' for instance

3. All the goodies in the TUI, like zooming in/out threads, dsos, etc

4. Integration with Live Annotation

5. In the live annotation window, navigate to functions called by the one
being annotated (x86_64 only right now). This is just an experimentation
in increasing the integration of the multiple perf tools, more of this
kind to come.

6. Initial callchain support, not yet decaying it over time as the main
view.

Also in this batch is the work Stephane did on including information
about the machine where the perf.data file was collected.

Regards,

- Arnaldo

Arnaldo Carvalho de Melo (13):
perf hists: Stop using 'self' for struct hists
perf hists: Allow limiting the number of rows and columns in fprintf
perf report: Add option to show total period
perf hists: Threaded addition and sorting of entries
perf browsers: Add live mode to the hists, annotate browsers
perf top: Reuse the 'report' hist_entry/hists classes
perf top: Add callgraph support
perf annotate browser: Allow navigation to called functions
perf top: Use the TUI interface by default
perf annotate browser: Use -> to navigate on assembly lines
perf hists browser: Don't offer symbol actions when symbols not on --sort
perf hists browser: Fix TAB/UNTAB use with multiple events
perf hists browser: Update the browser.nr_entries after the timer

Stephane Eranian (2):
perf tools: Fix broken number of samples for perf report -n
perf tools: Make perf.data more self-descriptive (v8)

tools/perf/Documentation/perf-report.txt | 8 +
tools/perf/Documentation/perf-script.txt | 7 +
tools/perf/Documentation/perf-top.txt | 38 +-
tools/perf/Makefile | 4 -
tools/perf/arch/powerpc/Makefile | 1 +
tools/perf/arch/powerpc/util/header.c | 36 +
tools/perf/arch/x86/Makefile | 1 +
tools/perf/arch/x86/util/header.c | 59 ++
tools/perf/builtin-annotate.c | 9 +-
tools/perf/builtin-diff.c | 2 +-
tools/perf/builtin-record.c | 15 +
tools/perf/builtin-report.c | 17 +-
tools/perf/builtin-script.c | 6 +-
tools/perf/builtin-top.c | 430 +++++++--
tools/perf/builtin.h | 1 -
tools/perf/perf.h | 11 +
tools/perf/util/annotate.h | 7 +-
tools/perf/util/evlist.c | 6 +
tools/perf/util/evlist.h | 4 +
tools/perf/util/evsel.c | 1 +
tools/perf/util/header.c | 1145 +++++++++++++++++++++++++++++-
tools/perf/util/header.h | 29 +-
tools/perf/util/hist.c | 338 +++++++
tools/perf/util/hist.h | 33 +-
tools/perf/util/session.c | 19 +
tools/perf/util/session.h | 1 +
tools/perf/util/sort.h | 1 +
tools/perf/util/symbol.h | 1 +
tools/perf/util/top.c | 141 +-
tools/perf/util/top.h | 36 +-
tools/perf/util/ui/browsers/annotate.c | 99 +++-
tools/perf/util/ui/browsers/hists.c | 146 +++--
tools/perf/util/ui/browsers/top.c | 236
33 files changed, 2091 insertions(+), 797 deletions(-)
create mode 100644 tools/perf/arch/powerpc/util/header.c
create mode 100644 tools/perf/arch/x86/util/header.c
delete mode 100644 tools/perf/util/ui/browsers/top.c

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
email Follow the discussionReplies 15 repliesReplies Make a reply

Replies

#1 Arnaldo Carvalho de Melo
October 06th, 2011 - 01:30 pm ET | Report spam
From: Arnaldo Carvalho de Melo

Removing all the entries that only apply to symbols from the menu.

Cc: David Ahern
Cc: Frederic Weisbecker
Cc: Mike Galbraith
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: Stephane Eranian
Link: http://lkml.kernel.org/n/
Signed-off-by: Arnaldo Carvalho de Melo

tools/perf/util/ui/browsers/hists.c | 26 +++++++++++++++++
1 files changed, 17 insertions(+), 9 deletions(-)

diff --git a/tools/perf/util/ui/browsers/hists.c b/tools/perf/util/ui/browsers/hists.c
index f0515cb..b790109 100644
a/tools/perf/util/ui/browsers/hists.c
+++ b/tools/perf/util/ui/browsers/hists.c
@@ -26,6 +26,7 @@ struct hist_browser {
struct map_symbol *selection;
const struct thread *thread_filter;
const struct dso *dso_filter;
+ bool has_symbols;
};

static int hists__browser_title(struct hists *self, char *bf, size_t size,
@@ -302,9 +303,9 @@ static int hist_browser__run(struct hist_browser *self, const char *ev_name,
int key;
int delay_msecs = delay_secs * 1000;
char title[160];
- int exit_keys[] = { 'a', '?', 'h', 'C', 'd', 'D', 'E', 't',
- NEWT_KEY_ENTER, NEWT_KEY_RIGHT, NEWT_KEY_LEFT,
- NEWT_KEY_TAB, NEWT_KEY_UNTAB, 0, };
+ int sym_exit_keys[] = { 'a', 'h', 'C', 'd', 'E', 't', 0, };
+ int exit_keys[] = { '?', 'h', 'D', NEWT_KEY_LEFT, NEWT_KEY_RIGHT,
+ NEWT_KEY_TAB, NEWT_KEY_UNTAB, NEWT_KEY_ENTER, 0, };

self->b.entries = &self->hists->entries;
self->b.nr_entries = self->hists->nr_entries;
@@ -321,6 +322,8 @@ static int hist_browser__run(struct hist_browser *self, const char *ev_name,
newtFormSetTimer(self->b.form, delay_msecs);

ui_browser__add_exit_keys(&self->b, exit_keys);
+ if (self->has_symbols)
+ ui_browser__add_exit_keys(&self->b, sym_exit_keys);

while (1) {
key = ui_browser__run(&self->b);
@@ -783,6 +786,7 @@ static struct hist_browser *hist_browser__new(struct hists *hists)
self->hists = hists;
self->b.refresh = hist_browser__refresh;
self->b.seek = ui_browser__hists_seek;
+ self->has_symbols = sort_sym.list.next != NULL;
}

return self;
@@ -881,16 +885,17 @@ static int perf_evsel__hists_browse(struct perf_evsel *evsel, int nr_events,
case NEWT_KEY_F1:
case 'h':
case '?':
- ui__help_window("-> Zoom into DSO/Threads & Annotate current symbol"
+ ui__help_window("h/?/F1 Show this window"
+ "TAB/UNTAB Switch events"
+ "q/CTRL+C Exit browser"
+ "For symbolic views (--sort has sym):"
+ "-> Zoom into DSO/Threads & Annotate current symbol"
"<- Zoom out"
"a Annotate current symbol"
- "h/?/F1 Show this window"
"C Collapse all callchains"
"E Expand all callchains"
"d Zoom into current DSO"
- "t Zoom into current Thread"
- "TAB/UNTAB Switch events"
- "q/CTRL+C Exit browser");
+ "t Zoom into current Thread");
continue;
case NEWT_KEY_ENTER:
case NEWT_KEY_RIGHT:
@@ -923,6 +928,9 @@ static int perf_evsel__hists_browse(struct perf_evsel *evsel, int nr_events,
goto out_free_stack;
}

+ if (!browser->has_symbols)
+ goto add_exit_option;
+
if (browser->selection != NULL &&
browser->selection->sym != NULL &&
!browser->selection->map->dso->annotate_warned &&
@@ -947,7 +955,7 @@ static int perf_evsel__hists_browse(struct perf_evsel *evsel, int nr_events,
browser->selection->map != NULL &&
asprintf(&options[nr_options], "Browse map details") > 0)
browse_map = nr_options++;
-
+add_exit_option:
options[nr_options++] = (char *)"Exit";

choice = ui__popup_menu(nr_options, options);
1.6.2.5

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

Similar topics