]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - tools/perf/util/annotate.c
Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux
[linux.git] / tools / perf / util / annotate.c
index 0fc8d7a2fea5f2ddee03789c3c0b442278f0fb0a..1dd1949b0e7995e43f0fa216fee0db583803ed5c 100644 (file)
@@ -1084,6 +1084,7 @@ int symbol__annotate(struct symbol *sym, struct map *map, size_t privsize)
        struct kcore_extract kce;
        bool delete_extract = false;
        int lineno = 0;
+       int nline;
 
        if (filename)
                symbol__join_symfs(symfs_filename, filename);
@@ -1179,6 +1180,9 @@ int symbol__annotate(struct symbol *sym, struct map *map, size_t privsize)
 
                ret = decompress_to_file(m.ext, symfs_filename, fd);
 
+               if (ret)
+                       pr_err("Cannot decompress %s %s\n", m.ext, symfs_filename);
+
                free(m.ext);
                close(fd);
 
@@ -1204,13 +1208,25 @@ int symbol__annotate(struct symbol *sym, struct map *map, size_t privsize)
        pr_debug("Executing: %s\n", command);
 
        file = popen(command, "r");
-       if (!file)
+       if (!file) {
+               pr_err("Failure running %s\n", command);
+               /*
+                * If we were using debug info should retry with
+                * original binary.
+                */
                goto out_remove_tmp;
+       }
 
-       while (!feof(file))
+       nline = 0;
+       while (!feof(file)) {
                if (symbol__parse_objdump_line(sym, map, file, privsize,
                            &lineno) < 0)
                        break;
+               nline++;
+       }
+
+       if (nline == 0)
+               pr_err("No output from %s\n", command);
 
        /*
         * kallsyms does not have symbol sizes so there may a nop at the end.
@@ -1604,6 +1620,7 @@ int symbol__tty_annotate(struct symbol *sym, struct map *map,
        len = symbol__size(sym);
 
        if (print_lines) {
+               srcline_full_filename = full_paths;
                symbol__get_source_line(sym, map, evsel, &source_line, len);
                print_summary(&source_line, dso->long_name);
        }