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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C4CCDC636D4 for ; Mon, 6 Feb 2023 16:07:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231535AbjBFQH5 (ORCPT ); Mon, 6 Feb 2023 11:07:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44584 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229823AbjBFQHw (ORCPT ); Mon, 6 Feb 2023 11:07:52 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4E8882CFFE for ; Mon, 6 Feb 2023 08:07:43 -0800 (PST) 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 ams.source.kernel.org (Postfix) with ESMTPS id D383DB81261 for ; Mon, 6 Feb 2023 16:07:41 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6351CC4339E; Mon, 6 Feb 2023 16:07:27 +0000 (UTC) Date: Mon, 6 Feb 2023 11:07:14 -0500 From: Steven Rostedt To: Nick Desaulniers Cc: Peter Zijlstra , mingo@kernel.org, tglx@linutronix.de, bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org, hpa@zytor.com, jpoimboe@kernel.org, jbaron@akamai.com, ardb@kernel.org, linux-kernel@vger.kernel.org, erhard_f@mailbox.org, mhiramat@kernel.org, sandipan.das@amd.com Subject: Re: [PATCH v1.1 3/3] x86/static_call: Add support for Jcc tail-calls Message-ID: <20230206110714.49fd7261@rorschach.local.home> In-Reply-To: References: <20230123205915.751729592@infradead.org> <20230123210607.173715335@infradead.org> <20230123174431.4421dfdf@gandalf.local.home> <20230124100753.13608e1f@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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 26 Jan 2023 10:14:49 -0800 Nick Desaulniers wrote: > On Thu, Jan 26, 2023 at 7:34 AM Peter Zijlstra wrote: > > > > On Tue, Jan 24, 2023 at 10:07:53AM -0500, Steven Rostedt wrote: > > > On Tue, 24 Jan 2023 14:06:49 +0100 > > > Peter Zijlstra wrote: > > > > > > > > Just to confirm, as it's not clear if this is the static call site or one > > > > > of the functions that is being called. > > > > > > > > Ah, you've not looked at enough asm then? ;-) Yes this is the static > > > > call site, see the __SCT_ target (instruction at 0x35d). > > > > > > Yeah, could you specify it a bit more in the change log such that those > > > looking back at this don't have to have that requirement of staring at > > > enough asm ;-) > > > > How's this then? Better :-) Anyway... Reviewed-by: Steven Rostedt (Google) > > > > --- > > Subject: x86/static_call: Add support for Jcc tail-calls > > From: Peter Zijlstra > > Date: Fri Jan 20 16:40:33 CET 2023 > > > > Clang likes to create conditional tail calls like: > > > > 0000000000000350 : > > 350: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 351: R_X86_64_NONE __fentry__-0x4 > > 355: 48 83 bf 20 01 00 00 00 cmpq $0x0,0x120(%rdi) > > 35d: 0f 85 00 00 00 00 jne 363 35f: R_X86_64_PLT32 __SCT__amd_pmu_branch_add-0x4 > > 363: e9 00 00 00 00 jmp 368 364: R_X86_64_PLT32 __x86_return_thunk-0x4 > > If it helps reduce the line width in the commit message to focus on > just the instructions, lately I've been using > `--no-addresses --no-show-raw-insn` flags to llvm-objdump. Actually, I like the full output. Even if we do reduce it, it will still be over 80. -- Steve