From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752858AbdEIJFn (ORCPT ); Tue, 9 May 2017 05:05:43 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50428 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751872AbdEIJFl (ORCPT ); Tue, 9 May 2017 05:05:41 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 6C3C3C04B316 Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=jolsa@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 6C3C3C04B316 Date: Tue, 9 May 2017 11:05:39 +0200 From: Jiri Olsa To: Andi Kleen Cc: acme@kernel.org, jolsa@kernel.org, linux-kernel@vger.kernel.org, Andi Kleen Subject: Re: [PATCH] perf, tools: Support srccode output Message-ID: <20170509090539.GA4031@krava> References: <20170508202205.28520-1-andi@firstfloor.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170508202205.28520-1-andi@firstfloor.org> User-Agent: Mutt/1.8.0 (2017-02-23) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Tue, 09 May 2017 09:05:41 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > #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