[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1425696486-8048-1-git-send-email-andi@firstfloor.org>
Date: Fri, 6 Mar 2015 18:48:06 -0800
From: Andi Kleen <andi@...stfloor.org>
To: arnaldo.melo@...il.com
Cc: linux-kernel@...r.kernel.org, Andi Kleen <ak@...ux.intel.com>,
Yuanfang Chen <cyfmxc@...il.com>
Subject: [PATCH] perf, tools, script: Always print raw IP
From: Andi Kleen <ak@...ux.intel.com>
Fix regression caused by 85c116a6cb
We did not print the IP anymore for perf script -o ip, but instead
symbol+offset, and if there was no symbol only +offset.
Print the raw IP correctly again in this case.
Reported-by: Yuanfang Chen <cyfmxc@...il.com>
Cc: Yuanfang Chen <cyfmxc@...il.com>
Signed-off-by: Andi Kleen <ak@...ux.intel.com>
---
tools/perf/util/srcline.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/tools/perf/util/srcline.c b/tools/perf/util/srcline.c
index c93fb0c..7d61f8b 100644
--- a/tools/perf/util/srcline.c
+++ b/tools/perf/util/srcline.c
@@ -293,8 +293,14 @@ out:
dso__free_a2l(dso);
}
if (sym) {
- if (asprintf(&srcline, "%s+%" PRIu64, show_sym ? sym->name : "",
- addr - sym->start) < 0)
+ int err;
+
+ if (show_sym)
+ err = asprintf(&srcline, "%s+%" PRIu64, sym->name,
+ addr - sym->start);
+ else
+ err = asprintf(&srcline, "%" PRIx64, addr);
+ if (err < 0)
return SRCLINE_UNKNOWN;
} else if (asprintf(&srcline, "%s[%" PRIx64 "]", dso->short_name, addr) < 0)
return SRCLINE_UNKNOWN;
--
1.9.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists