aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/map.c
diff options
context:
space:
mode:
authorJiri Olsa <jolsa@kernel.org>2014-07-14 17:46:47 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2014-07-17 10:04:42 -0400
commitacebd408bef17169fbf79079b96f0264b535916c (patch)
treebe8603261bce76e0a6a4466f1f3440206bab393e /tools/perf/util/map.c
parent418029b7324f8b90ac1dfbc8a44555d6905be761 (diff)
perf tools: Remove verbose from functions prototypes
And use verbose as an global object in following functions: __map_groups__fprintf_maps __map_groups__fprintf_removed_maps map_groups__fprintf_maps map_groups__fprintf Also making map_groups__fprintf_maps static. Signed-off-by: Jiri Olsa <jolsa@kernel.org> Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com> Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/r/1405374411-29012-2-git-send-email-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/map.c')
-rw-r--r--tools/perf/util/map.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/tools/perf/util/map.c b/tools/perf/util/map.c
index 7af14807ee90..845f627e45f4 100644
--- a/tools/perf/util/map.c
+++ b/tools/perf/util/map.c
@@ -12,6 +12,7 @@
12#include "vdso.h" 12#include "vdso.h"
13#include "build-id.h" 13#include "build-id.h"
14#include "util.h" 14#include "util.h"
15#include "debug.h"
15#include <linux/string.h> 16#include <linux/string.h>
16 17
17const char *map_type__name[MAP__NR_TYPES] = { 18const char *map_type__name[MAP__NR_TYPES] = {
@@ -568,8 +569,8 @@ int map_groups__find_ams(struct addr_map_symbol *ams, symbol_filter_t filter)
568 return ams->sym ? 0 : -1; 569 return ams->sym ? 0 : -1;
569} 570}
570 571
571size_t __map_groups__fprintf_maps(struct map_groups *mg, 572size_t __map_groups__fprintf_maps(struct map_groups *mg, enum map_type type,
572 enum map_type type, int verbose, FILE *fp) 573 FILE *fp)
573{ 574{
574 size_t printed = fprintf(fp, "%s:\n", map_type__name[type]); 575 size_t printed = fprintf(fp, "%s:\n", map_type__name[type]);
575 struct rb_node *nd; 576 struct rb_node *nd;
@@ -587,17 +588,16 @@ size_t __map_groups__fprintf_maps(struct map_groups *mg,
587 return printed; 588 return printed;
588} 589}
589 590
590size_t map_groups__fprintf_maps(struct map_groups *mg, int verbose, FILE *fp) 591static size_t map_groups__fprintf_maps(struct map_groups *mg, FILE *fp)
591{ 592{
592 size_t printed = 0, i; 593 size_t printed = 0, i;
593 for (i = 0; i < MAP__NR_TYPES; ++i) 594 for (i = 0; i < MAP__NR_TYPES; ++i)
594 printed += __map_groups__fprintf_maps(mg, i, verbose, fp); 595 printed += __map_groups__fprintf_maps(mg, i, fp);
595 return printed; 596 return printed;
596} 597}
597 598
598static size_t __map_groups__fprintf_removed_maps(struct map_groups *mg, 599static size_t __map_groups__fprintf_removed_maps(struct map_groups *mg,
599 enum map_type type, 600 enum map_type type, FILE *fp)
600 int verbose, FILE *fp)
601{ 601{
602 struct map *pos; 602 struct map *pos;
603 size_t printed = 0; 603 size_t printed = 0;
@@ -614,23 +614,23 @@ static size_t __map_groups__fprintf_removed_maps(struct map_groups *mg,
614} 614}
615 615
616static size_t map_groups__fprintf_removed_maps(struct map_groups *mg, 616static size_t map_groups__fprintf_removed_maps(struct map_groups *mg,
617 int verbose, FILE *fp) 617 FILE *fp)
618{ 618{
619 size_t printed = 0, i; 619 size_t printed = 0, i;
620 for (i = 0; i < MAP__NR_TYPES; ++i) 620 for (i = 0; i < MAP__NR_TYPES; ++i)
621 printed += __map_groups__fprintf_removed_maps(mg, i, verbose, fp); 621 printed += __map_groups__fprintf_removed_maps(mg, i, fp);
622 return printed; 622 return printed;
623} 623}
624 624
625size_t map_groups__fprintf(struct map_groups *mg, int verbose, FILE *fp) 625size_t map_groups__fprintf(struct map_groups *mg, FILE *fp)
626{ 626{
627 size_t printed = map_groups__fprintf_maps(mg, verbose, fp); 627 size_t printed = map_groups__fprintf_maps(mg, fp);
628 printed += fprintf(fp, "Removed maps:\n"); 628 printed += fprintf(fp, "Removed maps:\n");
629 return printed + map_groups__fprintf_removed_maps(mg, verbose, fp); 629 return printed + map_groups__fprintf_removed_maps(mg, fp);
630} 630}
631 631
632int map_groups__fixup_overlappings(struct map_groups *mg, struct map *map, 632int map_groups__fixup_overlappings(struct map_groups *mg, struct map *map,
633 int verbose, FILE *fp) 633 FILE *fp)
634{ 634{
635 struct rb_root *root = &mg->maps[map->type]; 635 struct rb_root *root = &mg->maps[map->type];
636 struct rb_node *next = rb_first(root); 636 struct rb_node *next = rb_first(root);