Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1639053pxb; Mon, 22 Feb 2021 07:14:07 -0800 (PST) X-Google-Smtp-Source: ABdhPJwruWz90q5dwk8byCuIeQ8tRsxv0j0cYUDzl1ZdukSscdKFxlIVHc5JuvyFJJIWQDNJuZ2y X-Received: by 2002:a17:906:6943:: with SMTP id c3mr20779622ejs.133.1614006847551; Mon, 22 Feb 2021 07:14:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614006847; cv=none; d=google.com; s=arc-20160816; b=nV+EOjcNPOhLf6R7UkiU4ARaOK0yNBkLO80tfxswOVTG59nh89BwktJLDKaZBgW1cI ebJJGVfyY/tzBWPnr60OHu3XLQf4oQKGf+oqm28PPgDSsViekVz727faHoIRUdFbONY0 gsx15rJMYGHyf1ZyZ/wmuFpPcHjZ2TeuPu4ig9o99dmeN8iE7eEOLaGnTiNGG3fHQZgD 9KKD+y7GA/AOI+ayxAFYNtYDx4aVRxTdMYBhvuv0ndWS7tUOnQS4bVfcCryKsdqcrIME 6yWmiHmXF9C5d7UzbIDQ+GtTw9iuqqYDVwgWjjpk9mNtTnULcr6Fjr/KQHQPCfsh68F6 ra+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=invTydOC2bMU/zMqMAvsn4qFtzMlddwYJN/UsLmFEPw=; b=S12cO6Z5Em5uUSc8P4TWVU4sQI/ayaBzGDPyCFVxUHTVT6VWzaSNRiY3QbCL/3g6ge YUahNmEjNJ2ss3tjxqsC3VujLzzPIZLzEo6DwIf41qbTGfQt7PHot59/AB3priQZdZuJ E1ixIW52XrtPH1m7c/fWLuQWuj/U2h4pGXo+Gj9FQoltsZv5ijVm2ZLrlGs1TVZghG5V Qt5/M5TmchNNS+cuPMwgrSzbFy7/NMM3OqOWRCuGwPiWVjMVA11IQ2d0rcsbs7TtWDMx B9syvTEHeHuz9Y0ITegl0JFO0KdIqiZtS3PoJdXUl4TrKaHOOeBKkh+nYQDiouWZkIYH CZyQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=tWrOZaT2; 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 w21si3121394ejn.516.2021.02.22.07.13.44; Mon, 22 Feb 2021 07:14:07 -0800 (PST) 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=k20201202 header.b=tWrOZaT2; 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 S230419AbhBVPM7 (ORCPT + 99 others); Mon, 22 Feb 2021 10:12:59 -0500 Received: from mail.kernel.org ([198.145.29.99]:54560 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230378AbhBVPMv (ORCPT ); Mon, 22 Feb 2021 10:12:51 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 6B9F564E61; Mon, 22 Feb 2021 15:12:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1614006725; bh=NDgZTqFZ6L94F/HVezS1Spyd2g4LoZ+F846hPirmNbA=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=tWrOZaT2AURA9mEIP8mlw8AFHJqdT8KxHGbvKVexcD6uTOqVixaqssbcR3wBPIE8E QF7uzowYMhST48vWyDWYi+UuueqEIYXcqxLpU+EKaxfw46p05e+Av6oKi7Da74hFYA HeydWYDr745b1uAkS6oGi2d8beJJmLg2gxTQpB1cWB0prPzT90cAlWXUUlkJ1MTm2v AUMmK7naH69pTokCVgtJKq3yj0RSIEvYOebNLlWSsUPL9QIbALx8kJ+6PncrL9NO6d abhi+UHslg7IwJ1a9v+Hw3SfnOM9lHDb4JnKqHTB9epPyye+1ElMBb0F4QvxJJy23e wufjIgry68WuQ== Date: Tue, 23 Feb 2021 00:12:01 +0900 From: Masami Hiramatsu To: Evgenii Shatokhin , Masami Hiramatsu Cc: Evgenii Shatokhin , Arnaldo Carvalho de Melo , Kristen Carlson Accardi , live-patching@vger.kernel.org, Peter Zijlstra , Ingo Molnar , linux-kernel@vger.kernel.org, Konstantin Khorenko Subject: Re: 'perf probe' and symbols from .text. Message-Id: <20210223001201.c478d4cb6481385d31b3f09b@kernel.org> In-Reply-To: <20210223000508.cab3cddaa3a3790525f49247@kernel.org> References: <09257fb8-3ded-07b0-b3cc-55d5431698d8@virtuozzo.com> <20210223000508.cab3cddaa3a3790525f49247@kernel.org> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.32; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 23 Feb 2021 00:05:08 +0900 Masami Hiramatsu wrote: > Hi Evgenii, > > On Thu, 18 Feb 2021 20:09:17 +0300 > Evgenii Shatokhin wrote: > > > Hi, > > > > It seems, 'perf probe' can only see functions from .text section in the > > kernel modules, but not from .text.unlikely or other .text.* sections. > > > > For example, with kernel 5.11 and nf_conntrack.ko with debug info, 'perf > > probe' succeeds for nf_conntrack_attach() from .text and fails for > > nf_ct_resolve_clash() from .text.unlikely: > > Thanks for reporting it! > > > > > ------------ > > # perf probe -v -m nf_conntrack nf_ct_resolve_clash > > probe-definition(0): nf_ct_resolve_clash > > symbol:nf_ct_resolve_clash file:(null) line:0 offset:0 return:0 lazy:(null) > > 0 arguments > > Failed to get build-id from nf_conntrack. > > Cache open error: -1 > > Open Debuginfo file: > > /lib/modules/5.11.0-test01/kernel/net/netfilter/nf_conntrack.ko > > Try to find probe point from debuginfo. > > Matched function: nf_ct_resolve_clash [33616] > > Probe point found: nf_ct_resolve_clash+0 > > Found 1 probe_trace_events. > > Post processing failed or all events are skipped. (-2) > > Probe point 'nf_ct_resolve_clash' not found. > > Error: Failed to add events. Reason: No such file or directory (Code: -2) > [...] > > Is there a way to allow probing of functions in .text. ? BTW, just for putting a probe on nf_ct_resolve_clash, please give the module *path* instead of the module *name*. For example, perf probe -v -m /lib/modules/5.11.0-test01/kernel/net/netfilter/nf_conntrack.ko nf_ct_resolve_clash This should work (at least works for me), because it directly loads the symbols from the .ko file. Thank you, -- Masami Hiramatsu