Skip to contentSkip to conversation

trace-cmd: fixup more bogus symbol resolutions

PATCH New Julia Cartwright 1 participant 1 message Feb 16, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 trace-cmd: fixup more bogus symbol resolutions

Commit ce1cbc51c ("trace-cmd: Leave out absolute addresses to fix bogus symbol resolutions") fixed up bogus symbol resolution for 'A' type symbols used on x86_64 for percpu offsets.

However, this check did not cover per-cpu variables used in modules, which are generated as 'local' absolute symbols, and therefore appear as 'a' in /proc/kallsyms. Fix this.

---
 trace-util.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
trace-util.c +1 -1
index 5bf591c..fc5926e 100644
@@ -458,7 +458,7 @@ void parse_proc_kallsyms(struct pevent *pevent,
 		 *  - arm arch that adds a lot of bogus '$a' functions
 		 *  - x86-64 that reports per-cpu variable offsets as absolute
 		 */
-		if (func[0] != '$' && ch != 'A')
+		if (func[0] != '$' && ch != 'A' && ch != 'a')
 			pevent_register_function(pevent, func, addr, mod);
 		free(func);
 		free(mod);
Signature · 1 line
2.11.1