Received: by 2002:ab2:6309:0:b0:1fb:d597:ff75 with SMTP id s9csp598313lqt; Thu, 6 Jun 2024 12:20:46 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUQuDje+vO4QkPN8SX/aH/UwLPoiLLttzgmD2JvSjXq2NE2WcwgRhg+vNfbaHagZ7+fy/BqRwhIIqeeBhsWFMJp/T785xgseKv8gcSd8g== X-Google-Smtp-Source: AGHT+IEPJl85myUv9THubRscAiDe6s4lBSLpwhT6EMjKlSP8Kg87EN3s8jABBnlzXXbrViN9QkNN X-Received: by 2002:a05:6a21:3998:b0:1b2:a8e3:4a12 with SMTP id adf61e73a8af0-1b2f9df7879mr459179637.55.1717701646596; Thu, 06 Jun 2024 12:20:46 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717701646; cv=pass; d=google.com; s=arc-20160816; b=ATdL3lwQiTgplGc1cp6tuAAspwNYXL4bIvTis7Tyc7jKbSmMxaOFiRIuIgC5gCqHNN DfsbmR4eyDufYdp7hPkTj81ROErBPxdHHBhRdAoBdinp+6698QbiaAcJxjm1YyZ/R35H DQfrCbTXKkMpB5NJzGnKj6iyhP8zJ/Zto9HIoBtH3ekP2f2W6iZHpRC6JD2QQgAOPIjx jTvrGnYGGwe1Ui7LmCkTbGaLCZiSRqHyv+QuCjPdZidYM8R12U9VyOwmwFoJ8GytxXGw ZgoyrXNOFDYHOdZlKD9uRDLINiB16MoArzFMBpHdsAecAOjfE+0+2zjqqEDt3XvM+My1 eudg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:feedback-id:dkim-signature; bh=tJSI3NIhPWMG6BD/WGBLSN52oRpjiTs5BIySoaDVF5A=; fh=bY7n9bkeNmHJLUj+n5DB4AMgfyCuw+j8DXknhjyYlVE=; b=Js7i6MrdeUmNOdbgdSeJKpBw1YGupW8y7afPCgbUI+jAGxKjJDO8rwT11hKKMWiTMo D/x/0YdLTQ2cJ5oS1mQceLt4H1vUziPw4/VR4FN3gN7hGvdCPECKG8qSEgPvrHfZjLZ5 56yXK4xWaCbpK6dvj8Neq1uG0TMKT2pEbAbX6BX3hW8J+qg+84K/nndM1DIMerkxI5H1 LtRuGoZQkdcwMY6uX/C9zyXyFwawNWiX3tXEmDqtxR7fRNYw1qetZNTHE4n22ZKcyau7 su4cVubVpGMqQQFn8ufIxOS1PzcPlwbmR+hBEET91kxx5z8fvBykdYmXdylWpDoDpCEz jixg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=bB5TPFkr; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-204928-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-204928-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id d2e1a72fcca58-703fd390538si1573970b3a.11.2024.06.06.12.20.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jun 2024 12:20:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-204928-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=bB5TPFkr; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-204928-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-204928-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com 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 75125B2580D for ; Thu, 6 Jun 2024 19:01:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B3BBA51012; Thu, 6 Jun 2024 19:00:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="bB5TPFkr" Received: from mail-qv1-f43.google.com (mail-qv1-f43.google.com [209.85.219.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7469438DE4; Thu, 6 Jun 2024 19:00:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.43 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717700451; cv=none; b=Kzoo/NRJblJY0FLH7MOJ8TLZ8Sa58iVvhQFqygUw7w/sDtk36XnLSXfZw4INTgv7dOEpP8iTE+ysevnhcA5cMKBfpz4FDeJFwBtiE+s0X/sIEx9Hax1zxHd7JVwBwpM1Nz3WUGX/Pp/C4vyf9c0PZd23sk+DH0ykIr1vN8tcqEI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717700451; c=relaxed/simple; bh=M8H0xy1DWWc/H9ZG2Ee51cJpwzjTKk41amkrJ5t6vg4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=XpKpK6MeJWqnZvK0aXTkolN3mrECpZOOBaIWLDaiL+NSe0Ca0LDGMBjBz54vu/8+mL9GQKwAuhQ8rOJ6HM2kQMxXTtXpGaJHb210tF8L29nhfiSydfU1Xz+fwNgxC4+XofDOOOuCpISj83/eZsuYIYpYZ/6fomcJeggoV8IEkn0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=bB5TPFkr; arc=none smtp.client-ip=209.85.219.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-qv1-f43.google.com with SMTP id 6a1803df08f44-6ad8243dba8so6196406d6.3; Thu, 06 Jun 2024 12:00:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1717700449; x=1718305249; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:feedback-id:from:to:cc:subject:date :message-id:reply-to; bh=tJSI3NIhPWMG6BD/WGBLSN52oRpjiTs5BIySoaDVF5A=; b=bB5TPFkrkjTe107LdClyhXoqBkLJTDKaByk9m6EmL0Q4RgtuAuCu0/Ci3Fswg5h+yq nOAx2c5DORwnV1fdWINBdzGEoBg0e/DIqf8bz74fuNbZrj9mASTGr6fztrIx1qkQw+HC J/WnYj2twOCnA2p+NZ6oRe4zZFX+8kTxrmDk4ehSO5RoVKTX5xZ59vYgsr8vfz5afko7 xMONggt+cK9z2Q4GbYbBUnRvhi4Ro8C0YEapI4wZqy5UacQM1+cStjVw8ORbiDn8y3/X Cxjl6uWtFMnkA5A+JqoiFbn1Qia+tfy2TwtvORHkY/9NG4J5AIHYHv3jzLyXDx/46Jg/ ikIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717700449; x=1718305249; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:feedback-id:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=tJSI3NIhPWMG6BD/WGBLSN52oRpjiTs5BIySoaDVF5A=; b=xKI2SUuV32RFhdWmlLB9mANwLbt68/6tZUzn67KKo75HCfsc2y2OGEwZTU5AwFlzbd ZfMEhlAKNIqK5U83R/v4I7emOsjLRdgMqqzjY7Bxvx1F58cFzEUpf3JkUqpfBF/AWsg0 9fGlOFN6YowJaKKVEXfgDg2XsEhuZKT7dNP0swdDaE8wc7hHh2zRIm0ig/LoYveUjrsw jUBjIA1R30jE7Fj8v0LJGUK9dFdFEMvYYRhy/DnLRyeONs1aP9z+jPqu5KHWuF4ZJIkj v4IgoMBL0kDA+Fa/tK5cofYbB0MQMXu/Yy27WyZ52/EAkhGoqirbJPN3Q8PBevInOJdB Ftng== X-Forwarded-Encrypted: i=1; AJvYcCVWwR29kBIgKdcD8HQcOJObtN73bAthR0EV1nB40FPLm/Ex2UiL9jKbh7mB4VmqQH5hJPYTD8uwZVXDMWxudkpAfE9SL2Kss0tuBJwh3vkjlkgLf2aSFPQXDr7XzhE9d2gQN97rozvivI+XU1boApS7yaM2sj7fsAWtcsyDsBNkGaKVYNutxE4r/VxxiWoDCtU= X-Gm-Message-State: AOJu0YxW/ICncIkQFzWYJEQVjzhTKF6B21qgXnSgxsIXFRqCfzqazWip MrNSMH5Obh/KmH600A3d96LVMKuQ/LzwB73XMQ5D75g0DNsKkBM+ X-Received: by 2002:a05:6214:398c:b0:6ae:2f16:561e with SMTP id 6a1803df08f44-6b059f942b4mr3292806d6.59.1717700449225; Thu, 06 Jun 2024 12:00:49 -0700 (PDT) Received: from fauth2-smtp.messagingengine.com (fauth2-smtp.messagingengine.com. [103.168.172.201]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6b04f620e8asm8886706d6.2.2024.06.06.12.00.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jun 2024 12:00:48 -0700 (PDT) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailfauth.nyi.internal (Postfix) with ESMTP id 196F01200043; Thu, 6 Jun 2024 15:00:47 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Thu, 06 Jun 2024 15:00:47 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvdelkedgudeftdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpeffhffvvefukfhfgggtuggjsehttdortddttddvnecuhfhrohhmpeeuohhq uhhnucfhvghnghcuoegsohhquhhnrdhfvghnghesghhmrghilhdrtghomheqnecuggftrf grthhtvghrnhepjeffgeeijedvtdfgkeekhfejgeejveeuudfgheeftdekffejtdelieeu hfdvfeegnecuffhomhgrihhnpehkvghrnhgvlhdrohhrghenucevlhhushhtvghrufhiii gvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegsohhquhhnodhmvghsmhhtphgruhht hhhpvghrshhonhgrlhhithihqdeiledvgeehtdeigedqudejjeekheehhedvqdgsohhquh hnrdhfvghngheppehgmhgrihhlrdgtohhmsehfihigmhgvrdhnrghmvg X-ME-Proxy: Feedback-ID: iad51458e:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 6 Jun 2024 15:00:46 -0400 (EDT) Date: Thu, 6 Jun 2024 12:00:36 -0700 From: Boqun Feng To: Peter Zijlstra Cc: Mathieu Desnoyers , Alice Ryhl , Steven Rostedt , Masami Hiramatsu , Josh Poimboeuf , Jason Baron , Ard Biesheuvel , Miguel Ojeda , Alex Gaynor , Wedson Almeida Filho , 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 3/3] rust: add tracepoint support Message-ID: References: <20240606-tracepoint-v1-0-6551627bf51b@google.com> <20240606-tracepoint-v1-3-6551627bf51b@google.com> <389a8c55-a169-47ef-99c0-48f58003b40c@efficios.com> <20240606173544.GI8774@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=us-ascii Content-Disposition: inline In-Reply-To: <20240606173544.GI8774@noisy.programming.kicks-ass.net> On Thu, Jun 06, 2024 at 07:35:44PM +0200, Peter Zijlstra wrote: > On Thu, Jun 06, 2024 at 08:49:06AM -0700, Boqun Feng wrote: > > > Long-term plan is to 1) compile the C helpers in some IR and 2) inline > > the helpers with Rust in IR-level, as what Gary has: > > > > https://lore.kernel.org/rust-for-linux/20240529202817.3641974-1-gary@garyguo.net/ > > Urgh, that still needs us to maintain that silly list of helpers :-/ > But it's an improvement from the current stage, right? ;-) > Can't we pretty please have clang parse the actual header files into IR > and munge that into rust? So that we don't get to manually duplicate > everything+dog. That won't always work, because some of our kernel APIs are defined as macros, and I don't think it's a trivial job to generate a macro definition to a function definition so that it can be translated to something in IR. We will have to do the macro -> function mapping ourselves somewhere, if we want to inline the API across languages. Regards, Boqun