Received: by 2002:ab2:3319:0:b0:1ef:7a0f:c32d with SMTP id i25csp583744lqc; Fri, 8 Mar 2024 06:23:49 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWYM6p1QwISk5r6NegUEYCw6bV2fB2lxSdbPZVWUeYKLPNuv5zKoRyn/Itg6j7h1263GBYXpyHiMf/Bqh3nDq4S3LpV8W7imM1ZHyj44Q== X-Google-Smtp-Source: AGHT+IFRPofmm4B+Tup5e9BBEO+It5oBZLxuoZZHXcjBQJaOnZcgQZgJat8Lp2kFfULNghPsq1ei X-Received: by 2002:a50:cdc2:0:b0:565:6e57:fa3d with SMTP id h2-20020a50cdc2000000b005656e57fa3dmr2075106edj.10.1709907829056; Fri, 08 Mar 2024 06:23:49 -0800 (PST) Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id g19-20020a50d5d3000000b005675bebfa24si4581569edj.395.2024.03.08.06.23.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Mar 2024 06:23:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-97162-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=BjBSLsI+; arc=fail (body hash mismatch); spf=pass (google.com: domain of linux-kernel+bounces-97162-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-97162-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (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 am.mirrors.kernel.org (Postfix) with ESMTPS id DE2301F25A21 for ; Fri, 8 Mar 2024 14:22:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 70044524CA; Fri, 8 Mar 2024 14:22:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="BjBSLsI+" Received: from mail-lf1-f43.google.com (mail-lf1-f43.google.com [209.85.167.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 03C5323772; Fri, 8 Mar 2024 14:22:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.43 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709907751; cv=none; b=CncO3FKXbc/BrBYhnxAZIZtqbgZbBlTbSALOrLW2v1uhxbie5rciukOOo6PYgiKAkv/HUDbk0fs1mYsjCietOjNjprC2iuakRWzklnM9zU4CciqJiPxFWulU+pUDY4B/rFD4/2TRr9gn5W4JneCTp53oLMtpx7qAd4L8NrDvqQc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709907751; c=relaxed/simple; bh=ojcrxVImzaAPTIc4pyg/lucaOPEu+fy//Huzchcs5ZA=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=snqIk7lzdN6AXTlRvr9lkTzBWVbgyY/H70GBFCg2XMkRcTDlHaoviTtacg/XarNhNp9tbPH+JjRPLfLU12pdUGGs4v/BxCTHQgcJohobRBfb14UPToFwY5zRBcxTzD1N0k+6JXYJenp9N4lM3gl9t67lbrWF1s9CPy6j1smRmtI= 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=BjBSLsI+; arc=none smtp.client-ip=209.85.167.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-lf1-f43.google.com with SMTP id 2adb3069b0e04-5131a9b3d5bso1243112e87.0; Fri, 08 Mar 2024 06:22:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709907748; x=1710512548; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=ojcrxVImzaAPTIc4pyg/lucaOPEu+fy//Huzchcs5ZA=; b=BjBSLsI+AcaY8seiqJ8sI1pyztq5kaxzDOHRdaAeFwTCHLfLWX1f6aN3bKXNO2wVN+ IvGkXcD0a4T+sSQ5SUq62OgbrvMzckM2WsVYWbPrS12dLWyhbUVD4lufggUd+F9moWs7 qpMVq6R6gI8SfOA32WSAZdTX9vxWLvGcWPPMdD4Y6gJKOQd9enFSBhNP4iI9qcBjjPun 1F5VAWCNfBu7TP3a6j1C2d5RoRg6mU50SdIGs5z4QuXUThlF25f3U6JecpPvwWK9stBw wxwwQg1XWzqiy68uNtdkw4NyZtvN/2EGypkyGN7A5mhgFhoCwEh1lXAp3Ucfv3fB08e0 W0yA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709907748; x=1710512548; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ojcrxVImzaAPTIc4pyg/lucaOPEu+fy//Huzchcs5ZA=; b=sVU+lKuUKSikfYePQpvmoBOjDsn3AYZoTazZX/sVijim4t1IHQhy1T91T6Yk3kJ42Z kP0b8Q+SLYTkbsgoRv1i5GWndAbZGqlnnKeg7aW4h/oFsoCxeXRM0lu2IqN3el21B5wk V/by43T3+AkrmUqlkYnGalykmuaNHHaLBXN2ArGVuXYwGOb4iWkQn1yBgnvnT6+OS3Lx diQWCfqfhchZgZ6yUkC56MWeidZtpqYtD9nhjmeNCzgkok5+x2gKuZ1+NXnDCn/pI5Fb lGrhe8tNax0/or3nQoRyzCvTeVpU7s5elC8ZcbcnCGOFXzzdfJciL09N9jWh3pPsLBui 9BUw== X-Forwarded-Encrypted: i=1; AJvYcCWx0Mb8HlmO00qBYfqFQ7uPMMr4uG5Iu9GQ5+vS/8LJgBPXnNU+guAqRE+HWMIUT7+1Qotta0uF/JS1OgWypFkuDoAsbhfWX++dyIQj49YvSKwlLl+L9+AHs1cJ0Y+jvscVuPJYyt1ngS6/EHmAOqBZ X-Gm-Message-State: AOJu0YwdCNNNJAYEMXquFHSyLrocMbGPQkjT4A+SjmYwf+R8kqKu4ekU 9jCwswSZ00puJ3Ntr4Z0x+pnvEGOG2Vc8BKMTiBxj21/j+KuVyOO78IKosRg05Gxg2dDDqYVDvD BWPk7ZNiHhN+9MplsyxfqxkeiBu4= X-Received: by 2002:a05:6512:743:b0:513:1f44:7cf6 with SMTP id c3-20020a056512074300b005131f447cf6mr3255371lfs.64.1709907747997; Fri, 08 Mar 2024 06:22:27 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240306165904.108141-1-puranjay12@gmail.com> <87ttlhdeqb.fsf@all.your.base.are.belong.to.us> <87jzmdowp4.fsf@all.your.base.are.belong.to.us> In-Reply-To: <87jzmdowp4.fsf@all.your.base.are.belong.to.us> From: Puranjay Mohan Date: Fri, 8 Mar 2024 15:22:17 +0100 Message-ID: Subject: Re: [RFC PATCH] riscv: Implement HAVE_DYNAMIC_FTRACE_WITH_CALL_OPS To: =?UTF-8?B?QmrDtnJuIFTDtnBlbA==?= Cc: Paul Walmsley , Palmer Dabbelt , Albert Ou , Steven Rostedt , Masami Hiramatsu , Mark Rutland , Sami Tolvanen , Guo Ren , Ley Foon Tan , Deepak Gupta , Sia Jee Heng , =?UTF-8?B?QmrDtnJuIFTDtnBlbA==?= , Song Shuai , =?UTF-8?B?Q2zDqW1lbnQgTMOpZ2Vy?= , Al Viro , Jisheng Zhang , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Bj=C3=B6rn, On Fri, Mar 8, 2024 at 11:16=E2=80=AFAM Bj=C3=B6rn T=C3=B6pel wrote: > > > > If I remember from Steven's talk, x86 uses dynamically allocated trampo= lines > > for per callsite tracers, would CALL_OPS provide better performance tha= n that? > > Probably not, and it was really a tongue-in-cheek comment -- nothing I > encourage you to do! > > Now, I think a better approach for RISC-V would be implementing what x86 > has (arch_ftrace_update_trampoline()), rather than CALL_OPS for RISC-V. > > Thoughts? I am going to spin some patches for implementing arch_ftrace_update_trampoline() for RISC-V, then we can compare the two approaches and see which is better. But I agree that arch_ftrace_update_trampoline() is a better approach given that we can jump anywhere with auipc/jalr. Thanks, Puranjay