Re: [PATCH] perf, tools: Support srccode output

From: Jiri Olsa
Date: Tue May 09 2017 - 05:05:47 EST


On Mon, May 08, 2017 at 01:22:05PM -0700, Andi Kleen wrote:

SNIP

> diff --git a/tools/perf/util/map.c b/tools/perf/util/map.c
> index ebfa5d92358a..790ac730b162 100644
> --- a/tools/perf/util/map.c
> +++ b/tools/perf/util/map.c
> @@ -17,6 +17,7 @@
> #include <linux/string.h>
> #include "srcline.h"
> #include "unwind.h"
> +#include "srccode.h"
>
> static void __maps__insert(struct maps *maps, struct map *map);
>
> @@ -414,6 +415,57 @@ int map__fprintf_srcline(struct map *map, u64 addr, const char *prefix,
> return ret;
> }
>
> +int map__fprintf_srccode(struct map *map, u64 addr,
> + const char *prefix, FILE *fp,
> + struct srccode_state *state)
> +{

what's the 'prefix' for? it's always passed as ""

jirka