linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Symbolize stripped binaries without buildid
@ 2011-01-28 22:11 Arun Sharma
  2011-03-22 21:22 ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 3+ messages in thread
From: Arun Sharma @ 2011-01-28 22:11 UTC (permalink / raw)
  To: linux-perf-users

Symbolize binaries which don't have buildids and are stripped, but have a .dynsym.

Signed-off-by: Arun Sharma <asharma@fb.com>

diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
index 15ccfba..a84db85 100644
--- a/tools/perf/util/symbol.c
+++ b/tools/perf/util/symbol.c
@@ -1480,7 +1480,7 @@ int dso__load(struct dso *self, struct map *map, symbol_filter_t filter)
 	 * Failing that, do a second pass where we accept .dynsym also
 	 */
 	for (self->origin = DSO__ORIG_BUILD_ID_CACHE, want_symtab = 1;
-	     self->origin != DSO__ORIG_NOT_FOUND;
+	     self->origin != DSO__ORIG_END;
 	     self->origin++) {
 		switch (self->origin) {
 		case DSO__ORIG_BUILD_ID_CACHE:
@@ -1530,6 +1530,7 @@ int dso__load(struct dso *self, struct map *map, symbol_filter_t filter)
 				 self->long_name);
 			break;
 
+		case DSO__ORIG_NOT_FOUND:
 		default:
 			/*
 			 * If we wanted a full symtab but no image had one,
@@ -1538,8 +1539,7 @@ int dso__load(struct dso *self, struct map *map, symbol_filter_t filter)
 			if (want_symtab) {
 				want_symtab = 0;
 				self->origin = DSO__ORIG_BUILD_ID_CACHE;
-			} else
-				continue;
+			}
 		}
 
 		/* Name is now the name of the next image to try */
diff --git a/tools/perf/util/symbol.h b/tools/perf/util/symbol.h
index 670cd1c..6b79ab9 100644
--- a/tools/perf/util/symbol.h
+++ b/tools/perf/util/symbol.h
@@ -201,6 +201,7 @@ enum dso_origin {
 	DSO__ORIG_GUEST_KMODULE,
 	DSO__ORIG_KMODULE,
 	DSO__ORIG_NOT_FOUND,
+	DSO__ORIG_END,
 };
 
 char dso__symtab_origin(const struct dso *self);

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-03-23  6:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-28 22:11 [PATCH] Symbolize stripped binaries without buildid Arun Sharma
2011-03-22 21:22 ` Arnaldo Carvalho de Melo
2011-03-23  5:53   ` Srikar Dronamraju

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).