]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - tools/perf/util/hist.c
Merge branches 'pm-core', 'pm-qos', 'pm-domains' and 'pm-opp'
[linux.git] / tools / perf / util / hist.c
index 6770a964560954e0b7d028698a50b8bcab0cf891..32c6a939e4cc6879d872574e27b7dab28970cb2c 100644 (file)
@@ -1,6 +1,7 @@
 #include "util.h"
 #include "build-id.h"
 #include "hist.h"
+#include "map.h"
 #include "session.h"
 #include "sort.h"
 #include "evlist.h"
@@ -1019,6 +1020,10 @@ int hist_entry_iter__add(struct hist_entry_iter *iter, struct addr_location *al,
                         int max_stack_depth, void *arg)
 {
        int err, err2;
+       struct map *alm = NULL;
+
+       if (al && al->map)
+               alm = map__get(al->map);
 
        err = sample__resolve_callchain(iter->sample, &callchain_cursor, &iter->parent,
                                        iter->evsel, al, max_stack_depth);
@@ -1058,6 +1063,8 @@ int hist_entry_iter__add(struct hist_entry_iter *iter, struct addr_location *al,
        if (!err)
                err = err2;
 
+       map__put(alm);
+
        return err;
 }
 
@@ -2439,8 +2446,10 @@ int parse_filter_percentage(const struct option *opt __maybe_unused,
                symbol_conf.filter_relative = true;
        else if (!strcmp(arg, "absolute"))
                symbol_conf.filter_relative = false;
-       else
+       else {
+               pr_debug("Invalud percentage: %s\n", arg);
                return -1;
+       }
 
        return 0;
 }