Re: [PATCH v5 2/5] perf report: Find the inline stack for a given address
From: Ravi Bangoria
Date: Sat Mar 25 2017 - 03:19:13 EST
Hi Jin / Arnaldo,
I see a build failure with this patch:
On Friday 17 March 2017 03:12 AM, Jin Yao wrote:
> It would be useful for perf to support a mode to query the
> inline stack for a given callgraph address. This would simplify
> finding the right code in code that does a lot of inlining.
>
> The srcline.c has contained the code which supports to translate
> the address to filename:line_nr. This patch just extends the
> function to let it support getting the inline stacks.
...
> + while (getline(&filename, &len, fp) != -1) {
> + if (filename_split(filename, &line_nr) != 1) {
> + free(filename);
> + goto out;
> + }
> +
> + if (inline_list__append(filename, NULL, line_nr, node) != 0)
util/srcline.c: In function ‘addr2inlines’:
util/srcline.c:403:7: error: too few arguments to function ‘inline_list__append’
if (inline_list__append(filename, NULL, line_nr, node) != 0)
^
util/srcline.c:34:12: note: declared here
static int inline_list__append(char *filename, char *funcname, int line_nr,
^
util/srcline.c: At top level:
util/srcline.c:60:13: error: ‘inline_list__reverse’ defined but not used [-Werror=unused-function]
static void inline_list__reverse(struct inline_node *node)
^
cc1: all warnings being treated as errors
mv: cannot stat ‘util/.srcline.o.tmp’: No such file or directory
Thanks,
Ravi