aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2010-06-03 18:35:55 -0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2010-06-04 07:07:52 -0300
commite7dadc0089da730a1ba2638a1a03533be0c67f11 (patch)
treefe85a16eb85cf4c2750fddb347a3fd1f69e1c6e3 /tools
parentMerge branch 'perf/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/a... (diff)
downloadlinux-e7dadc0089da730a1ba2638a1a03533be0c67f11.tar.gz
linux-e7dadc0089da730a1ba2638a1a03533be0c67f11.zip
perf symbols: Set the DSO long name when using symbol_conf.vmlinux_name
We need to set the long name to the name specified via, for instance, 'perf annotate --vmlinux /path/to/vmlinux', if not it will remain as '[kernel.kallsyms]' and that will make annotate fail when passing this as the vmlinux name in the call to objdump. The way this is setup grew unwieldly and dso__load_vmlinux is the function that should allocate space for the long name, with callers not assuming that filenames should be allocated somehow by then (strdup, dso__build_id_filename, etc). For now this is the minimalistic patch, a proper fix for .36 will be made. Reported-by: Stephane Eranian <eranian@google.com> Tested-by: Stephane Eranian <eranian@google.com> Cc: David S. Miller <davem@davemloft.net> Cc: Frédéric Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Mike Galbraith <efault@gmx.de> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Cc: Tom Zanussi <tzanussi@gmail.com> LKML-Reference: <20100604003900.GD10469@ghostprotocols.net> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/perf/util/symbol.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
index 7fd6b151feb5..b63e5713849f 100644
--- a/tools/perf/util/symbol.c
+++ b/tools/perf/util/symbol.c
@@ -1745,7 +1745,12 @@ static int dso__load_kernel_sym(struct dso *self, struct map *map,
if (symbol_conf.vmlinux_name != NULL) {
err = dso__load_vmlinux(self, map,
symbol_conf.vmlinux_name, filter);
- goto out_try_fixup;
+ if (err > 0) {
+ dso__set_long_name(self,
+ strdup(symbol_conf.vmlinux_name));
+ goto out_fixup;
+ }
+ return err;
}
if (vmlinux_path != NULL) {
@@ -1806,7 +1811,6 @@ do_kallsyms:
pr_debug("Using %s for symbols\n", kallsyms_filename);
free(kallsyms_allocated_filename);
-out_try_fixup:
if (err > 0) {
out_fixup:
if (kallsyms_filename != NULL)
llow=1'>drm/xe: Release runtime pm for error path of xe_devcoredump_read()Shuicheng Lin1-10/+28 2025-07-10drm/xe/pm: Restore display pm if there is error after display suspendShuicheng Lin1-2/+1 2025-07-10selftests: net: lib: fix shift count out of rangeHangbin Liu1-1/+1 2025-07-10selftests: Add IPv6 multicast route generation tests for GRE devices.Guillaume Nault1-10/+17 2025-07-10gre: Fix IPv6 multicast route creation.Guillaume Nault1-7/+2 2025-07-10net: phy: microchip: limit 100M workaround to link-down events on LAN88xxOleksij Rempel1-1/+1 2025-07-10net: phy: microchip: Use genphy_soft_reset() to purge stale LPA bitsOleksij Rempel1-0/+1 2025-07-10ibmvnic: Fix hardcoded NUM_RX_STATS/NUM_TX_STATS with dynamic sizeofMingming Cao1-2/+6 2025-07-10net: appletalk: Fix device refcount leak in atrtr_create()Kito Xu1-0/+1 2025-07-10netfilter: flowtable: account for Ethernet header in nf_flow_pppoe_proto()Eric Dumazet1-1/+1 2025-07-10drm/i915/bios: Apply vlv_fixup_mipi_sequences() to v2 mipi-sequences tooHans de Goede1-4/+4 2025-07-10wifi: mac80211: add the virtual monitor after reconfig completeMiri Korenblit1-5/+4 2025-07-10wifi: mac80211: always initialize sdata::key_listMiri Korenblit1-2/+2 2025-07-10net/sched: sch_qfq: Fix null-deref in agg_dequeueXiang Mei4-28/+25 2025-07-09rxrpc: Fix oops due to non-existence of prealloc backlog structDavid Howells1-0/+3 2025-07-09rxrpc: Fix bug due to prealloc collisionDavid Howells1-0/+1 2025-07-09MAINTAINERS: remove myself as netronome maintainerLouis Peens1-2/+2