Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp1247109ybf; Thu, 27 Feb 2020 07:26:51 -0800 (PST) X-Google-Smtp-Source: APXvYqzPpEss6FxKxaKGjk0v/fqLLDq2Zm+TZibegRNj3ZEBb0sLmeBf82EDmF0+TysDP8Mk6dQu X-Received: by 2002:aca:ed04:: with SMTP id l4mr1599481oih.54.1582817211213; Thu, 27 Feb 2020 07:26:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582817211; cv=none; d=google.com; s=arc-20160816; b=dzb/k+SOz9/vIJ1RgjV+bP5QnfN2rd3+POfBvW2SkwhNBgNYELZu0iWyuIJZCDR62o EBWAHQvahOb4UWWnr25eiLZN7lZ7GSEIL3biMuWKXEiy/tc7ABzMJjDiOqkzmfSfv4Ld uAj45AlSlPu5xgEHXDX15+pQh9krmmcpoeHZ+cPnp323faiDvxflP7t7q4HRIMaVL6jR 0Ffh2S8iLbfbaSRmp6j9uDIRr8QZguJiH/1kpkJqG02Z6H976vOQUokg+7AH582E9FKm V3sNMYkFwrilGsaDdvSxmP3tqPY1pYYqTdPkDN5UXm6zx3FGa/s06YKkqQEqgKSH0JiH gbIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=NO4c/RxU649BjEovnLGibLYrKkiDkiRvNDkYDtZIi0Q=; b=zupMIHBvdEwb6OyHEdVg/hB5G2QmXa2IIS1F+pg6tUn/f2cDaVAa0a9rL2bl2+SG3A WwetcZzXHewgKDYXCHiqfO+PBE1QQ1tqG02mGXi4EpgV51wMHW0Tppo6xCmA0d5tmhqV zzi55zxg+lw+DWu/Exn8WFFuJLm6fP1jHSzfoNtOXwQ3X1wMIMpfCemDN31XL+z2+5ga ldYFRyywc5NTBNbPmNC6/2F0e+XBa8KOxFJ5xvDCHnL+nnRu46aFOUxfXkWQ2yyIA/EY F1f1zs40Inwa7K4tNikIExROxGZYlCrdOrsW3/I3JcWL2QXexhluYVqE/A4YwoZADyb9 7DsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=U6+3TTCt; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y144si1580756oia.67.2020.02.27.07.26.38; Thu, 27 Feb 2020 07:26:51 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=U6+3TTCt; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730465AbgB0PZ7 (ORCPT + 99 others); Thu, 27 Feb 2020 10:25:59 -0500 Received: from mail.kernel.org ([198.145.29.99]:36258 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729451AbgB0PZ7 (ORCPT ); Thu, 27 Feb 2020 10:25:59 -0500 Received: from devnote2 (NE2965lan1.rev.em-net.ne.jp [210.141.244.193]) (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 6271D2469F; Thu, 27 Feb 2020 15:25:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1582817159; bh=0Um56LZn+Eug4ig5/+OURujfUw6c+7iD9sXZ0x9rmqk=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=U6+3TTCtYbKdZtBOSfvQW4vDH39yx9L6h3RRLC9UGYXZMRvoXWHT6C2cPpBrJRWTP 7MqfgZuiFG87s6XpCvLIR6jH+6Z6NFu3No2CalNOLiTTht/+Yes4DlAsds4wy1MUta C5lfRqEW8x3GzEizIFmKKGRgMsFLIhS1ZcdOaDjs= Date: Fri, 28 Feb 2020 00:25:53 +0900 From: Masami Hiramatsu To: Alexandre Ghiti Cc: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Sasha Levin , Greg Kroah-Hartman , linux-kernel@vger.kernel.org Subject: Re: Perf tool regression from 07d369857808 Message-Id: <20200228002553.31b82876b705aaabbd717131@kernel.org> In-Reply-To: <2bb02f9b-1413-97c3-684b-104a0fab9144@ghiti.fr> References: <2bb02f9b-1413-97c3-684b-104a0fab9144@ghiti.fr> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.32; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Thu, 27 Feb 2020 13:23:19 +0100 Alexandre Ghiti wrote: > Hi Masami, > > The commit 07d369857808 ("perf probe: Fix wrong address verification) > found its way in kernel 4.19.98 (and debian 10) and I observed some > regressions when I try to add probes in shared libraries. > The symptoms are: > > $ perf probe -f --exec=/home/aghiti/lib/libdpuhw.so --add > 'log_rank_path=log_rank_path rank path:string' > Failed to find symbol at 0x3bf0 > Error: Failed to add events. Hm... > > Whereas when I revert this patch, on the same shared library: > > $ perf probe -f --exec=/home/aghiti/lib/libdpuhw.so --add > 'log_rank_path=log_rank_path rank path:string' > Added new event: > probe_libdpuhw:log_rank_path_4 (on log_rank_path in > /home/aghiti/lib/libdpuhw.so.2020.1.0 with rank path:string) > > You can now use it in all perf tools, such as: > > perf record -e probe_libdpuhw:log_rank_path_4 -aR sleep 1 > > Actually, I noted that this patch reverts a previous patch that stated > that dwfl_module_addrsym could fail on shared libraries 664fee3dc379 > ("perf probe: Do not use dwfl_module_addrsym if dwarf_diename finds > symbol name"). Ah, OK. Hmm, actually, the reason why reverted it was the actuall address of symbol is unclear if the DIE only has address range. OK, at first try to find entrypc and if not, try dwlf_module_addrsym(). That will be better idea. Thank you, -- Masami Hiramatsu