Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp477890ybt; Fri, 10 Jul 2020 04:58:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwSQoBqY9mMMjSkQn7I84Zgv+qRIiHVd80VPoRslJdfLIMD/PfzVpU14nqKFtIdARzOkVBj X-Received: by 2002:a17:906:2b0e:: with SMTP id a14mr33785614ejg.459.1594382315142; Fri, 10 Jul 2020 04:58:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594382315; cv=none; d=google.com; s=arc-20160816; b=yPE93oLpufDTQVy4Dd6PDhWCzKwyjy/YdhI9Acd3jqccNCLpjvDtS/LHHt84n5HuR1 XIxlIK8irdKTk2dButQs+ODGV1Sdpn8jyNDkYTnRI2AXiBrz7DOgpHgRJFAw4d7V5SMq KflTvNzkSztixAR3a5nJk28v7+Op6Ni2wYh33uMhsksVMd3Bhc3Rie3VQ7VntKYuletq WdVS/s7dRqH/wCTXZR/tgGjQonZAf6wr5/DE4ccvOmtLfOsexGUKJweCdD846ROujK5n j86aTW0ANXx4a1SwPPk74AyZ5wGQNED8+OiBSFOpZKKaIRlSB7A0E5U0Z/AjMOn5qo7E Xjog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=o+HRrgImPjA9vgs9IUe2IGRlgYlvtF2GXcLQnoZ7Dfk=; b=yviwWyplfy/0+j7apNGU+dnt6ato6BfnvBmkRo+qcECIE/lhvn2RGO7WMLEt9XW61C M/Za5yUdbAqf6L8DUMa26wCzVGd4117uygOAyUI9HlSNXIMueZzVp017/Rsmf9+73GWc 0mFRcCSNGjOTPYEh4SpjpP1GJww0WNNNR/0bf687NfrqhIytwQTRUcEtcaIZYt0PpZyC fiKXeL7vnz/Nf9xbG/9PuowiguUMhDBAupMfq/DrkwxxzllOyZpX4bXJxL2nOsnAjRVW 6cRtzUN2IBfCyzPyAoUqhpQSC2T3lpGuSTJNZQXpbDok/eOQxwmUkAdd4Jfus7bIQqRZ 6tYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=0siQs8om; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id q18si3992256edr.440.2020.07.10.04.58.10; Fri, 10 Jul 2020 04:58:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=0siQs8om; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1727060AbgGJLzo (ORCPT + 99 others); Fri, 10 Jul 2020 07:55:44 -0400 Received: from mail.kernel.org ([198.145.29.99]:50630 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726820AbgGJLzn (ORCPT ); Fri, 10 Jul 2020 07:55:43 -0400 Received: from quaco.ghostprotocols.net (unknown [179.179.81.62]) (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 E726C20748; Fri, 10 Jul 2020 11:55:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1594382143; bh=2o/LA/3PfUUOILRSqwl1JI7DuPhYAX0BoJ0FuutNQjM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=0siQs8omIeCqV1ZmiT+As2/L+WGGQVFkkcAyVjTeSdY8CCi2unz4/BpB5b89g2VuJ 5sZScH7PUULx74ZvtTxmw1MLT2s1zL+tsxejpv1u/otsQSmUd+H7SIMqv6p3lEijIj U9F5LA6gmnQ0GdqhgBn03T0JSrFf1kXqKgsnZDxE= Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 213DE405FF; Fri, 10 Jul 2020 08:55:40 -0300 (-03) Date: Fri, 10 Jul 2020 08:55:40 -0300 From: Arnaldo Carvalho de Melo To: Masami Hiramatsu Cc: Andi Kleen , Arnaldo Carvalho de Melo , Oleg Nesterov , Srikar Dronamraju , linux-kernel@vger.kernel.org, Andi Kleen Subject: Re: [PATCH 4/4] perf-probe: Warn if the target function is GNU Indirect function Message-ID: <20200710115540.GC22500@kernel.org> References: <159428201109.56570.3802208017109058146.stgit@devnote2> <159428205174.56570.17588311835868886287.stgit@devnote2> <20200709143654.pw2maoxivsjho6op@two.firstfloor.org> <20200710123008.3af0e5ea78a9ff95d36a29d8@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200710123008.3af0e5ea78a9ff95d36a29d8@kernel.org> X-Url: http://acmel.wordpress.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Fri, Jul 10, 2020 at 12:30:08PM +0900, Masami Hiramatsu escreveu: > On Thu, 9 Jul 2020 07:36:54 -0700 > Andi Kleen wrote: > > > > diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c > > > index 1e95a336862c..671176d39569 100644 > > > --- a/tools/perf/util/probe-event.c > > > +++ b/tools/perf/util/probe-event.c > > > @@ -379,6 +379,11 @@ static int find_alternative_probe_point(struct debuginfo *dinfo, > > > address = sym->start; > > > else > > > address = map->unmap_ip(map, sym->start) - map->reloc; > > > + if (sym->type == STT_GNU_IFUNC) { > > > + pr_warning("Warning: The probe address (0x%lx) is in a GNU indirect function.\n" > > > + "This may not work as you expected unless you intend to probe the indirect function.\n", > > > > I would say something like this. > > > > Consider identifying the final function used at run time and set the > > probe directly on that. > > > > I think that's more useful to the user. > > Hmm, would you mean the default function which may be used for the symbol? Humm, I think he means that the user must somehow, knowing details involved in picking the final function, probe that one instead of the IFUNC one, right Andi? - Arnaldo > Let me check how we can find it.