From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D6189C433FE for ; Mon, 17 Oct 2022 18:50:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=liIsyma1PrSG3bE4+AtoM+1mF1sfeVJlHpfczJ2mpq8=; b=mIpeTpAjKgEno2 76BBcsi+OVlpnmcYom2a5SdxjydV0rgYuqy54m7TlO05UuU5UbfHckoN9NggkSc+sInZ+Uu58Hojx fpGcRoEZ3Y+YnoB+hQOBIsgX5pRPSKlYaMqf3mNUUR+h6nci00VHig0n7didVRJyytJcWYxY5c3Ew qd0B4AOZ2qY1kEwUZZLKoTX9kvvEyS81/eHfRn3aQ/bWI5CSJxTq+cvyMTkkD9P4nDLoDp+H894H1 CzmstzWSW8WQE9ubgZMqtLKVu7O5+0pi04srZrB36K4mVxC9tpiRr1gadiQxoafiX0SZl4UIPRtFD TSfB4HKxpPcDMQxRyv/Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1okVB7-00ELCp-W2; Mon, 17 Oct 2022 18:49:34 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1okVB4-00ELC6-Qr for linux-arm-kernel@lists.infradead.org; Mon, 17 Oct 2022 18:49:32 +0000 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 918EF611F6; Mon, 17 Oct 2022 18:49:29 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 17616C433C1; Mon, 17 Oct 2022 18:49:25 +0000 (UTC) Date: Mon, 17 Oct 2022 14:49:49 -0400 From: Steven Rostedt To: Florent Revest Cc: Xu Kuohai , Mark Rutland , Catalin Marinas , Daniel Borkmann , Xu Kuohai , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, bpf@vger.kernel.org, Will Deacon , Jean-Philippe Brucker , Ingo Molnar , Oleg Nesterov , Alexei Starovoitov , Andrii Nakryiko , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , Zi Shen Lim , Pasha Tatashin , Ard Biesheuvel , Marc Zyngier , Guo Ren , Masami Hiramatsu Subject: Re: [PATCH bpf-next v2 0/4] Add ftrace direct call for arm64 Message-ID: <20221017144949.2b9dcdc5@gandalf.local.home> In-Reply-To: References: <20220913162732.163631-1-xukuohai@huaweicloud.com> <970a25e4-9b79-9e0c-b338-ed1a934f2770@huawei.com> <2cb606b4-aa8b-e259-cdfd-1bfc61fd7c44@huawei.com> <7f34d333-3b2a-aea5-f411-d53be2c46eee@huawei.com> <20221005110707.55bd9354@gandalf.local.home> <20221005113019.18aeda76@gandalf.local.home> <20221006122922.53802a5c@gandalf.local.home> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221017_114930_958350_DC33DAD7 X-CRM114-Status: GOOD ( 15.24 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, 17 Oct 2022 19:55:06 +0200 Florent Revest wrote: > Note that I can't really make sense of the perf report with indirect > calls. it always reports it spent 12% of the time in > rethook_trampoline_handler but I verified with both a WARN in that > function and a breakpoint with a debugger, this function does *not* > get called when running this "bench trig-fentry" benchmark. Also it > wouldn't make sense for fprobe_handler to call it so I'm quite > confused why perf would report this call and such a long time spent > there. Anyone know what I could be missing here ? The trace shows __bpf_prog_exit, which I'm guessing is tracing the end of the function. Right? In which case I believe it must call rethook_trampoline_handler: -> fprobe_handler() /* Which could use some "unlikely()" to move disabled paths out of the hot path */ /* And also calls rethook_try_get () which does a cmpxchg! */ -> ret_hook() -> arch_rethook_prepare() Sets regs->lr = arch_rethook_trampoline On return of the function, it jumps to arch_rethook_trampoline() -> arch_rethook_trampoline() -> arch_rethook_trampoline_callback() -> rethook_trampoline_handler() So I do not know how it wouldn't trigger the WARNING or breakpoint if you added it there. -- Steve _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel