Skip to content

Commit

Permalink
perf ppc64le: Fix build failure when libelf is not present
Browse files Browse the repository at this point in the history
arch__post_process_probe_trace_events() calls get_target_map() to
prepare symbol table. get_target_map() is defined inside
util/probe-event.c.

probe-event.c will only get included in perf binary if CONFIG_LIBELF is
set.  Hence arch__post_process_probe_trace_events() needs to be defined
inside #ifdef HAVE_LIBELF_SUPPORT to solve compilation error.

Reported-and-Tested-by: Anton Blanchard <anton@samba.org>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Balbir Singh <bsingharora@gmail.com>
Cc: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: http://lkml.kernel.org/r/57ABFF88.8030905@linux.vnet.ibm.com
[ Thunderbird MUA mangled it, fix that ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
  • Loading branch information
Ravi Bangoria authored and Arnaldo Carvalho de Melo committed Aug 12, 2016
1 parent 33da54f commit f046f3d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tools/perf/arch/powerpc/util/sym-handling.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ void arch__fix_tev_from_maps(struct perf_probe_event *pev,
}
}

#ifdef HAVE_LIBELF_SUPPORT
void arch__post_process_probe_trace_events(struct perf_probe_event *pev,
int ntevs)
{
Expand All @@ -118,5 +119,6 @@ void arch__post_process_probe_trace_events(struct perf_probe_event *pev,
}
}
}
#endif /* HAVE_LIBELF_SUPPORT */

#endif

0 comments on commit f046f3d

Please sign in to comment.