x86_64: Print modules like i386 does
[safe/jmp/linux-2.6] / tools / perf / builtin-annotate.c
index 2e2855a..593ff25 100644 (file)
@@ -51,11 +51,6 @@ struct sym_priv {
        struct sym_ext  *ext;
 };
 
-static struct symbol_conf symbol_conf = {
-       .priv_size        = sizeof(struct sym_priv),
-       .try_vmlinux_path = true,
-};
-
 static const char *sym_hist_filter;
 
 static int symbol_filter(struct map *map __used, struct symbol *sym)
@@ -146,7 +141,7 @@ static int process_sample_event(event_t *event, struct perf_session *session)
                return -1;
        }
 
-       if (perf_session__add_hist_entry(session, &al, 1)) {
+       if (!al.filtered && perf_session__add_hist_entry(session, &al, 1)) {
                fprintf(stderr, "problem incrementing symbol count, "
                                "skipping event\n");
                return -1;
@@ -464,10 +459,10 @@ static struct perf_event_ops event_ops = {
 
 static int __cmd_annotate(void)
 {
-       struct perf_session *session = perf_session__new(input_name, O_RDONLY,
-                                                        force, &symbol_conf);
        int ret;
+       struct perf_session *session;
 
+       session = perf_session__new(input_name, O_RDONLY, force);
        if (session == NULL)
                return -ENOMEM;
 
@@ -523,11 +518,14 @@ static const struct option options[] = {
 
 int cmd_annotate(int argc, const char **argv, const char *prefix __used)
 {
-       if (symbol__init(&symbol_conf) < 0)
-               return -1;
-
        argc = parse_options(argc, argv, options, annotate_usage, 0);
 
+       symbol_conf.priv_size = sizeof(struct sym_priv);
+       symbol_conf.try_vmlinux_path = true;
+
+       if (symbol__init() < 0)
+               return -1;
+
        setup_sorting(annotate_usage, options);
 
        if (argc) {