From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751899AbcEKCEl (ORCPT ); Tue, 10 May 2016 22:04:41 -0400 Received: from mail-pa0-f68.google.com ([209.85.220.68]:33680 "EHLO mail-pa0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751538AbcEKCEi (ORCPT ); Tue, 10 May 2016 22:04:38 -0400 From: Chris Phlipot To: adrian.hunter@intel.com, acme@kernel.org, peterz@infradead.org, mingo@redhat.com Cc: linux-kernel@vger.kernel.org, Chris Phlipot Subject: [PATCH 3/4] perf script: fix callchain addresses in db-export Date: Tue, 10 May 2016 19:04:04 -0700 Message-Id: <1462932245-4656-4-git-send-email-cphlipot0@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1462932245-4656-1-git-send-email-cphlipot0@gmail.com> References: <1462932245-4656-1-git-send-email-cphlipot0@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Remove the call to map_ip, because it has already been called when assembling the callchain. Calling it a second time can result in incorrect addresses being used. This can have effects such as duplicate symbols being created and exported. Signed-off-by: Chris Phlipot --- tools/perf/util/db-export.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tools/perf/util/db-export.c b/tools/perf/util/db-export.c index 2ef1f69..8ca4186 100644 --- a/tools/perf/util/db-export.c +++ b/tools/perf/util/db-export.c @@ -324,10 +324,7 @@ static struct call_path *call_path_from_sample(struct db_export *dbe, al.sym = node->sym; al.map = node->map; al.machine = machine; - if (al.map) - al.addr = al.map->map_ip(al.map, node->ip); - else - al.addr = node->ip; + al.addr = node->ip; db_ids_from_al(dbe, &al, &dso_db_id, &sym_db_id, &offset); -- 2.7.4