diff options
| author | Olof Johansson <olof@lixom.net> | 2017-05-18 23:54:47 -0700 |
|---|---|---|
| committer | Olof Johansson <olof@lixom.net> | 2017-05-18 23:54:47 -0700 |
| commit | 5252d73756f318f182f2316acd78a6532041414d (patch) | |
| tree | b082478fca4f00f599bb2ed1547b2652c2bea155 /tools/perf/util/event.c | |
| parent | e84188852a7239d7a144af12f7e5dac8fa88600b (diff) | |
| parent | 2ea659a9ef488125eb46da6eb571de5eae5c43f6 (diff) | |
| download | lwn-5252d73756f318f182f2316acd78a6532041414d.tar.gz lwn-5252d73756f318f182f2316acd78a6532041414d.zip | |
Merge tag 'v4.12-rc1' into fixes
We've received a few fixes branches with -rc1 as base, but our contents was
still at pre-rc1. Merge it in expliticly to make 'git merge --log' clear on
hat was actually merged.
Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'tools/perf/util/event.c')
| -rw-r--r-- | tools/perf/util/event.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tools/perf/util/event.c b/tools/perf/util/event.c index 142835c0ca0a..dc5c3bb69d73 100644 --- a/tools/perf/util/event.c +++ b/tools/perf/util/event.c @@ -8,6 +8,7 @@ #include <unistd.h> #include <uapi/linux/mman.h> /* To get things like MAP_HUGETLB even on older libc headers */ #include <api/fs/fs.h> +#include <linux/perf_event.h> #include "event.h" #include "debug.h" #include "hist.h" @@ -767,15 +768,16 @@ static int find_symbol_cb(void *arg, const char *name, char type, return 1; } -u64 kallsyms__get_function_start(const char *kallsyms_filename, - const char *symbol_name) +int kallsyms__get_function_start(const char *kallsyms_filename, + const char *symbol_name, u64 *addr) { struct process_symbol_args args = { .name = symbol_name, }; if (kallsyms__parse(kallsyms_filename, &args, find_symbol_cb) <= 0) - return 0; + return -1; - return args.start; + *addr = args.start; + return 0; } int perf_event__synthesize_kernel_mmap(struct perf_tool *tool, |
