]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - tools/perf/util/annotate.c
Merge branch 'perf/urgent' into perf/core, to pick up fixes
[karo-tx-linux.git] / tools / perf / util / annotate.c
index 11af5f0d56cc1a6cf39b14ac9ee1d8073ab1fecc..bfb2f1d393d5e4b5cb9b6f77b9c47d37bb78b775 100644 (file)
@@ -130,6 +130,12 @@ static struct arch architectures[] = {
                .name = "powerpc",
                .init = powerpc__annotate_init,
        },
+       {
+               .name = "s390",
+               .objdump =  {
+                       .comment_char = '#',
+               },
+       },
 };
 
 static void ins__delete(struct ins_operands *ops)
@@ -1665,7 +1671,7 @@ static int symbol__get_source_line(struct symbol *sym, struct map *map,
        start = map__rip_2objdump(map, sym->start);
 
        for (i = 0; i < len; i++) {
-               u64 offset;
+               u64 offset, nr_samples;
                double percent_max = 0.0;
 
                src_line->nr_pcnt = nr_pcnt;
@@ -1674,12 +1680,14 @@ static int symbol__get_source_line(struct symbol *sym, struct map *map,
                        double percent = 0.0;
 
                        h = annotation__histogram(notes, evidx + k);
+                       nr_samples = h->addr[i];
                        if (h->sum)
-                               percent = 100.0 * h->addr[i] / h->sum;
+                               percent = 100.0 * nr_samples / h->sum;
 
                        if (percent > percent_max)
                                percent_max = percent;
                        src_line->samples[k].percent = percent;
+                       src_line->samples[k].nr = nr_samples;
                }
 
                if (percent_max <= 0.5)