Received: by 2002:ab2:6309:0:b0:1fb:d597:ff75 with SMTP id s9csp681258lqt; Thu, 6 Jun 2024 15:33:28 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVU29gmMqnNrA/cejrkiRC3kbIh+FrMxQOQiOMqjnXeMoR5adS3Xu1F9GKSBVmLhApZSQ1j3v/LIiz2fvXY8kTpJKKSuss0mCJPD/4Ptg== X-Google-Smtp-Source: AGHT+IGHIGcdIzd2G6bg9/G4vgLhPbOanE+LITJPgIAjIi1thE1BFDa4hM5qIGEGc01wZeVaLGSi X-Received: by 2002:a17:902:9885:b0:1f6:24f3:5a8d with SMTP id d9443c01a7336-1f6d02fec6bmr9013685ad.26.1717713208406; Thu, 06 Jun 2024 15:33:28 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717713208; cv=pass; d=google.com; s=arc-20160816; b=XIKvCkYwe26SWVewFTDyixevzb782jkI57vyLuJuunHW6ji/GwORP6UVnFKEn6aliZ 3niCTZX4J/s3DPULEVVwUazHOQTaKB8G5zHnmef6w4d3iVBJ1qUzHD9OksKel7igUhTl 911dtv2iD8DO2g3PKh2R3dQ+DUMoNjWzMJmr2G4M2j4FwzdyG6PZM5RrsbpIknE+7bQa osRo7inAMx8CO6pAYruBmIkGiuq9AmVZVReTNuk62pJBZfAN04muGALm1kyL/ZiJrck7 xVpJ8+cfE4epfR72dqK8rtLL2hlO3lvXP0Aa59hPrISEhTWSeR2ECjH+FzChFm9TKOp3 VH/w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=JEcRCeHnL/Q8dsTYxfE+j7DlXYuQ2nwdapZBRMQRXNw=; fh=2SdQTwSsg9SZj+AQGlcfkOzMwXhjOMQ+ZaVssVLM1CA=; b=N2UlMuoqR5V+HNu4gg8Ceu95YaZi4EDodfiQQo/tnBibyjdjxp6dzVU3DcerGp/WqB SDWa65V15zM9c+wPRIBirfAeWs7wCHCgfbju8nEBKPLuN2/xWe32CFsRrSG+Uqj7bPOZ o8juxeO//eQHwKgpf1nwGNWymdu2/ZHdVXdNgXZMeWkQmC2HFIiEjJrUlKNvTHpG9zga JNwKXBPfsRW0xPBp1kQZHTiWnIZtYQwIsVM8atew2XUDS3EHHjtibRyD2DAiEKfdDIwf uO4oUG5WY+wmwqO1qkIndggtiy/sg+zqyUCt0JMy11tSternG0YoYP6+fbJAooqIscGA DKcg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=MGzUYzWh; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-204944-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-204944-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id d9443c01a7336-1f6bd7e5914si17970455ad.400.2024.06.06.15.33.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jun 2024 15:33:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-204944-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=MGzUYzWh; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-204944-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-204944-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 6EAD2B22D90 for ; Thu, 6 Jun 2024 19:33:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0DFCD40BF2; Thu, 6 Jun 2024 19:33:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="MGzUYzWh" Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B0DE28821; Thu, 6 Jun 2024 19:33:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.155.50.34 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717702408; cv=none; b=uKu3GpbzkSmvpEqO6Q9gDvNzHlZaow95+OVphbL/TtirOTa2U0D6hDqFUBazoKatBHVLWrPa8QTxbrr0A84/oMS70xrXJMoWGhoHqGeUcrYxKQ++sSVwm4ZLMW4c39Actp573zP9s7vWbtlipyP70rT0iG0gAvMmlCYgyrYucnE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717702408; c=relaxed/simple; bh=Ctx/kZ0M9yiUiJM0jMFzj0gnxFswJt9u3VDPX+xIcAY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=bZ0SU/niYooqxFvt80hloD886r2QGwRnyHJSSK/93fbfEwwEPLh0XVAUgEokaQXI4AcsBGxHVDQj/mHghYg8n44/gUSpW57vxZzpx7FT77y/r5djyNPV1YKBHqUv5/kwFpyo4ELMaNAfOpEA2wMbxbah5UQKQMFYq+pUMljl2s4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=MGzUYzWh; arc=none smtp.client-ip=90.155.50.34 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Transfer-Encoding: Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Sender:Reply-To:Content-ID:Content-Description; bh=JEcRCeHnL/Q8dsTYxfE+j7DlXYuQ2nwdapZBRMQRXNw=; b=MGzUYzWhPqzvDVjDHJ3F1M8xpy ByUX5uJmGbf2GcuVuiBr9fxO2x56c3WK/E0raKg7DkzR0O2WrgnwxbQjplFo0tsFdl0lSAm/HOwc4 z5HvVz2zwkNqhUXWCEgi7ecLl6x0LJx0ag4sdtWKXdXM0tHEhnPvjj6yRHexu77rb/ruVeknaxO/H oXHQar8ok/rJumDVPOFS28uoDQWeyudR/KEFI3n3Dh3ypJAE6OwV6dxudip1xN0xifAg1XNQJE5m5 D6KRo/EzC2C168DsLAgWpgMrqfWHaKbAr4+6eNcL6EABZymlGoMyoWK0PPR4IC7Cc06MsCf0cUXM2 nX2vFXfQ==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.97.1 #2 (Red Hat Linux)) id 1sFIrP-00000004Clw-0Jtr; Thu, 06 Jun 2024 19:33:19 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id 3705030047C; Thu, 6 Jun 2024 21:33:18 +0200 (CEST) Date: Thu, 6 Jun 2024 21:33:18 +0200 From: Peter Zijlstra To: Miguel Ojeda Cc: Alice Ryhl , Steven Rostedt , Masami Hiramatsu , Mathieu Desnoyers , Josh Poimboeuf , Jason Baron , Ard Biesheuvel , Miguel Ojeda , Alex Gaynor , Wedson Almeida Filho , Boqun Feng , Gary Guo , =?iso-8859-1?Q?Bj=F6rn?= Roy Baron , Benno Lossin , Andreas Hindborg , linux-trace-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/3] rust: add static_call support Message-ID: <20240606193318.GK8774@noisy.programming.kicks-ass.net> References: <20240606-tracepoint-v1-0-6551627bf51b@google.com> <20240606-tracepoint-v1-1-6551627bf51b@google.com> <20240606171845.GE8774@noisy.programming.kicks-ass.net> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Thu, Jun 06, 2024 at 09:09:00PM +0200, Miguel Ojeda wrote: > On Thu, Jun 6, 2024 at 7:19 PM Peter Zijlstra wrote: > > > > This is absolutely unreadable gibberish -- how am I supposed to keep > > this in sync with the rest of the static_call infrastructure? > > Yeah, they are macros, which look different from "normal" Rust code. Macros like CPP ? > Is there something we could do to help here? I think Alice and others > would be happy to explain how it works and/or help maintain it in the > future if you prefer. Write a new language that looks more like C -- pretty please ? :-) Mostly I would just really like you to just use arm/jump_label.h, they're inline functions and should be doable with IR, no weirdo CPP involved in this case.