Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp4972685rwd; Sun, 11 Jun 2023 20:05:52 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5KJ71I6CUxQA+WkjTrtK2fmrAjtUqMEnphfgGfGAo2cMwXq2BtV3oTP3YDZVRhxtI7pDpG X-Received: by 2002:a17:907:7207:b0:957:17c5:8705 with SMTP id dr7-20020a170907720700b0095717c58705mr8042247ejc.51.1686539152053; Sun, 11 Jun 2023 20:05:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686539152; cv=none; d=google.com; s=arc-20160816; b=jk0yvVqxlMX62alCLnVSAZPSHWtXK6ecKnoRRQlxfJ8shlGKhN8TFhF7UBdlrO897Q 4GfLvvqPUDbhSGnH9LSOfZmNVH71uSuSDC/0yy9bKowKZTf6fdlRFCm5VSYP8K3Kwj76 ow7zq4nyXl4XZMuFHLBycENbB71unPTNxBzygkjkNW9WdOEWX3vgQasBGdeTrED02aFt /L3cEjEVGefgR2frR1ov4zkMV5hAV+3N4Jw9YB69DJ5d4ekE9/IGEZLVQ45pZKQaTwoH BNlMQIgWAcGSi9Y7nJTSlUZjD5CxiqQ73sxxlzBNYVA4mRgATHQl5mfK7PObAdpaP7rD jA9Q== 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; bh=F0NNnXUotte8OjMDvm96ez2Pbo8hPBG5DgE5m9EyVOs=; b=ZAMkvcFqPcMuDJp96k5CTeFZMnLHoDtXlbF3dh/WvGvkdDn2BjxVQKLwjdhjCANGnh 0COYp5tjeSXS9AVcN+AE+/lgd0v0GTxouMY/78JSYMSONdWE+Kk7q2c9rEx/DHyFXldX q+EPC1v/xi91gjPyY8xqK8R3X8ieJnx2T5OUHP9h+cvB/MjfwzVSe1oYjqOLmxQr6yHy kFkCmMdPcGnXOSDEDy9UtMCLC9XV2lHoz0cDn235YsAZ3t7hPXzUk47EnwRrzWDFYBr5 bLqesufbg+59AOfMH0GlEHSxQBdsTVWaZjXXWTw5BgrFSDx60QeoNRvU9XNu1PM0y2IY hlug== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v16-20020a170906181000b009745bad4249si3599678eje.869.2023.06.11.20.05.28; Sun, 11 Jun 2023 20:05:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233956AbjFLC6A (ORCPT + 99 others); Sun, 11 Jun 2023 22:58:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41034 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229476AbjFLC57 (ORCPT ); Sun, 11 Jun 2023 22:57:59 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B32C2E42; Sun, 11 Jun 2023 19:57:58 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 4FA4261BBA; Mon, 12 Jun 2023 02:57:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 84A66C433EF; Mon, 12 Jun 2023 02:57:56 +0000 (UTC) Date: Sun, 11 Jun 2023 22:57:54 -0400 From: Steven Rostedt To: Yonghong Song Cc: Jiri Olsa , Masami Hiramatsu , Mark Rutland , Andrii Nakryiko , lkml , linux-trace-kernel@vger.kernel.org, bpf@vger.kernel.org, Andrii Nakryiko , Jackie Liu Subject: Re: [PATCHv2] ftrace: Show all functions with addresses in available_filter_functions_addrs Message-ID: <20230611225754.01350a50@gandalf.local.home> In-Reply-To: <20230611225407.3e9b8ad2@gandalf.local.home> References: <20230611130029.1202298-1-jolsa@kernel.org> <53a11f31-256d-e7bc-eca5-597571076dc5@meta.com> <20230611225407.3e9b8ad2@gandalf.local.home> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 11 Jun 2023 22:54:07 -0400 Steven Rostedt wrote: > > Also, if there are multiple same static functions with > > different addresses, user space might need to check dwarf or > > proposed BTF_KIND_KFUNC (which encode kallsyms addresses) > > to find whether entry in available_filter_functions_addrs > > to be used. But addresses may not match. How this issue could > > be resolved? > > Easy, you use the address between two other addresses in kallsyms. The > address is still in the function. The addresses in kallsyms is the starting > address, but there's cases that the patch location is not at the start. Not to mention, you can still use the kallsyms address. If you did the work to find it, then use it (it may not be as efficient as I mentioned before). That's basically what is done today (so I am told), and this patch was to create a file where you don't need to look up kallsyms when you know which function to use. The functions are sorted by address, so if you know of a unique function near the duplicate, you just find the duplicate that's near the unique function name. -- Steve