Message ID | 20200401161532.691187361@linuxfoundation.org |
---|---|
State | New |
Headers | show
Return-Path: <SRS0=zuZT=5R=vger.kernel.org=stable-owner@kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CB1ECC2D0F0 for <stable@archiver.kernel.org>; Wed, 1 Apr 2020 16:32:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A165E20658 for <stable@archiver.kernel.org>; Wed, 1 Apr 2020 16:32:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1585758730; bh=fuZdubD077dq0B7HOwQ6mfwjuba+ZeVl7JU27HhDW0c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=eiH43lqA9H0oAglzYwxGBkiZiKumfQm037yj7SIu/lrSBhHci8p/bdp60JMfAN/MH AN1bsyiwunLdTJhzer2sol0zcjQcbpEskpTsbqk8t6oZXPl2b5SzQLv459C3nlj5pa 1JUz6Wnd3g4Lptys/Oxp4zcBqA31Lp6/r0ikpGeQ= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388147AbgDAQcI (ORCPT <rfc822;stable@archiver.kernel.org>); Wed, 1 Apr 2020 12:32:08 -0400 Received: from mail.kernel.org ([198.145.29.99]:58478 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388222AbgDAQcH (ORCPT <rfc822;stable@vger.kernel.org>); Wed, 1 Apr 2020 12:32:07 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C959220658; Wed, 1 Apr 2020 16:32:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1585758727; bh=fuZdubD077dq0B7HOwQ6mfwjuba+ZeVl7JU27HhDW0c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jOMgxWa1StBgNapMiGuf45C5TWFQ9SV3ZfC1vfqcAYZKXnq4skx5kaeBWqAQhpvlt miyLhkU5c2U2UOrGP9Hem6cs5QMV1TSHMrrmRpsRx38pjas59saMMng3+7zx/Bj4Qi crjdiq15v9tgoRH5jp5GeFtwYe5MJhPsMIU0NXDY= From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, stable@vger.kernel.org, Alexandre Ghiti <alex@ghiti.fr>, Masami Hiramatsu <mhiramat@kernel.org>, Alexander Shishkin <alexander.shishkin@linux.intel.com>, Jiri Olsa <jolsa@redhat.com>, Namhyung Kim <namhyung@kernel.org>, Peter Zijlstra <peterz@infradead.org>, Sasha Levin <sashal@kernel.org>, Arnaldo Carvalho de Melo <acme@redhat.com> Subject: [PATCH 4.4 56/91] perf probe: Do not depend on dwfl_module_addrsym() Date: Wed, 1 Apr 2020 18:17:52 +0200 Message-Id: <20200401161532.691187361@linuxfoundation.org> X-Mailer: git-send-email 2.26.0 In-Reply-To: <20200401161512.917494101@linuxfoundation.org> References: <20200401161512.917494101@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: <stable.vger.kernel.org> X-Mailing-List: stable@vger.kernel.org |
Series |
None
|
expand
|
--- a/tools/perf/util/probe-finder.c +++ b/tools/perf/util/probe-finder.c @@ -608,14 +608,19 @@ static int convert_to_trace_point(Dwarf_ return -EINVAL; } - /* Try to get actual symbol name from symtab */ - symbol = dwfl_module_addrsym(mod, paddr, &sym, NULL); + if (dwarf_entrypc(sp_die, &eaddr) == 0) { + /* If the DIE has entrypc, use it. */ + symbol = dwarf_diename(sp_die); + } else { + /* Try to get actual symbol name and address from symtab */ + symbol = dwfl_module_addrsym(mod, paddr, &sym, NULL); + eaddr = sym.st_value; + } if (!symbol) { pr_warning("Failed to find symbol at 0x%lx\n", (unsigned long)paddr); return -ENOENT; } - eaddr = sym.st_value; tp->offset = (unsigned long)(paddr - eaddr); tp->address = (unsigned long)paddr;