Em Mon, Mar 10, 2014 at 10:57:48PM +0100, Stephane Eranian escreveu: > Arnaldo, > > I am using tip.git perf and I do the following: > > $ perf record -e cycles,instructions foo > $ perf annotate --stdio > > (no explicit grouping). > > I only see the asm profile for the first event (cycles). > I don't see a way to display the profile for the second > event in the cmdline options. > > Yet the code in __cmd_annotate() seems to try and > display all profiles. > > If I use the TUI, it prompts me for the event at the first > screen and I get different asm profiles. > > So what is wrong?
That code went from supporting just one type of sample to suporting groups, GTK+, TUI, etc, needs some work to untangle things up and make it clearer... But TUI works as expected, right? That being said, try this patch, that is not optimal yet but allows you to see the events. I'll continue work on fixing up --stdio tomorrow. - Arnaldo diff --git a/tools/perf/builtin-annotate.c b/tools/perf/builtin-annotate.c index 0da603b79b61..9bf9055da29c 100644 --- a/tools/perf/builtin-annotate.c +++ b/tools/perf/builtin-annotate.c @@ -180,7 +180,7 @@ find_next: * symbol, free he->ms.sym->src to signal we already * processed this symbol. */ - zfree(¬es->src); + //zfree(¬es->src); } } } diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c index 3aa555ff9d89..7fb2cd70f91a 100644 --- a/tools/perf/util/annotate.c +++ b/tools/perf/util/annotate.c @@ -1260,8 +1260,8 @@ int symbol__annotate_printf(struct symbol *sym, struct map *map, if (perf_evsel__is_group_event(evsel)) width *= evsel->nr_members; - printf(" %-*.*s| Source code & Disassembly of %s\n", - width, width, "Percent", d_filename); + printf(" %-*.*s| Source code & Disassembly of %s for %s samples\n", + width, width, "Percent", d_filename, perf_evsel__name(evsel)); printf("-%-*.*s-------------------------------------\n", width+namelen, width+namelen, graph_dotted_line); -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/