Skip to contentSkip to conversation

perf tools: fix dso__fprintf() print statement

PATCH In review Stephane Eranian 1 participant 2 messages Nov 20, 2012 – Jan 24, 2013 perf events

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 perf tools: fix dso__fprintf() print statement

Was ignoring the dso type (function vs. variable) and was therefore printing bogus information.

---

tools/perf/util/dso.c +1 -1
index d6d9a46..be43785 100644
@@ -583,7 +583,7 @@ size_t dso__fprintf(struct dso *dso, enum map_type type, FILE *fp)
 	if (dso->short_name != dso->long_name)
 		ret += fprintf(fp, "%s, ", dso->long_name);
 	ret += fprintf(fp, "%s, %sloaded, ", map_type__name[type],
-		       dso->loaded ? "" : "NOT ");
+		       dso__loaded(dso, type) ? "" : "NOT ");
 	ret += dso__fprintf_buildid(dso, fp);
 	ret += fprintf(fp, ")\n");
 	for (nd = rb_first(&dso->symbols[type]); nd; nd = rb_next(nd)) {
#1 lore raw

[tip:perf/core] perf symbols: Fix dso__fprintf() print statement

Commit-ID:  919d590f13c94c5465db723178e4b72200fd5f90
Gitweb:     http://git.kernel.org/tip/919d590f13c94c5465db723178e4b72200fd5f90
Author:     Stephane Eranian <[email protected]>
AuthorDate: Tue, 20 Nov 2012 10:51:02 +0100
Committer:  Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Sun, 9 Dec 2012 08:46:04 -0300

perf symbols: Fix dso__fprintf() print statement

Was ignoring the dso type (function vs. variable) and was therefore printing bogus information.

---
 tools/perf/util/dso.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/util/dso.c +1 -1
index d6d9a46..be43785 100644
@@ -583,7 +583,7 @@ size_t dso__fprintf(struct dso *dso, enum map_type type, FILE *fp)
 	if (dso->short_name != dso->long_name)
 		ret += fprintf(fp, "%s, ", dso->long_name);
 	ret += fprintf(fp, "%s, %sloaded, ", map_type__name[type],
-		       dso->loaded ? "" : "NOT ");
+		       dso__loaded(dso, type) ? "" : "NOT ");
 	ret += dso__fprintf_buildid(dso, fp);
 	ret += fprintf(fp, ")\n");
 	for (nd = rb_first(&dso->symbols[type]); nd; nd = rb_next(nd)) {