From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-yw1-f171.google.com (mail-yw1-f171.google.com [209.85.128.171]) (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 F2DAF145B18 for ; Thu, 21 Nov 2024 04:22:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.171 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732162949; cv=none; b=I2yAUsdFPA9jDv7T6iTTfFuwkpVYk/V+e8PoA0AbhsBqT6qp2I9jgfMNXS5bggRfuy5L0F2gU3UoC3XJZqkMRoTA7EmI8zuwZYMY5HmooLe5IAbsJ64XVCuQ5wd/lZlRpNNkmNAGL0CXu7uL9bDCtXpYKR3zuJW9FGkqf1c/sPU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732162949; c=relaxed/simple; bh=SpAAQo3l0wT/aBxSUBDG8LR2a69OhY7lZutFyWBoaSI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=HX7FpLHgw2R/mYEGWnGCwKvS4JEy7gm81cxGutOmwHLy05WUpEiCwItDUq0aeS99ArvgXEbae2glNzVjU627q4kAWhij4mtmOfq1vEgXr/27ceDqxr+0JKhi7kNt3moNo0arAQUPUI/gZ7mIchbXIMiV79moX0v2YOTJAz170Eg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com; spf=pass smtp.mailfrom=rivosinc.com; dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b=lJ5xHgVr; arc=none smtp.client-ip=209.85.128.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=rivosinc.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b="lJ5xHgVr" Received: by mail-yw1-f171.google.com with SMTP id 00721157ae682-6ee8e894deeso4214677b3.0 for ; Wed, 20 Nov 2024 20:22:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1732162947; x=1732767747; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=cP3Um0hz7Gv16Gtk91dL7DlYT6sIqAVCB2yrXnpMevM=; b=lJ5xHgVrpeJelHGu3h+m+kpP+CpJio03F91Rbvepr+CWIi+9zzppZNlKGNpp8Ygsm3 Sjn3pfi0iup6FCY6VRUX/gvK0tToQVNp0Q1qdmUuwb3oyNDO0x+aTkFXUbPDPq2+uMYV 6Kkw1xQI1Og8AGiNWJdTkgrqygfd4mt9dNclhjlQwoslCkM4OjYkdA0dHkCZnDnLbXxN 1nxctHciljQ+3LXCJ/9o80XgWTNvdelIrPEluX+jd/rnZxIX0fjubBWinpxABfVVzOI3 0bzGibPw4zzKvqUUMZGV+0LajHL2/tYGbJNQKduNU2tQl84HB9kxxSB40UKEfbU5hHC1 Fthg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732162947; x=1732767747; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=cP3Um0hz7Gv16Gtk91dL7DlYT6sIqAVCB2yrXnpMevM=; b=gYA4eUyiT9KOLsTjr4U8UwJcxgsNfzxpMcWQeyWbrVWR8C5aZ9IxcMcxC+lD7U7UXE MpcBeg82gLU3Cd3CPwig31pWeltP7sI1Lvj1gsAb6OeGR9njlFwQJYGlS//LwFRxjBgM B4JR94jumZXryURWgbhII+EiTXsz+jRt/yhL+HipkR1tele7VQDuhu5DEWwHjB001fjr 3heNg71fSBYc2C52NZIgpwW+3tFGbIeFM9EZojYt5OhwIWa75XXYoZvgTyA+cdjBfrCb Y8JiPPMSEtIoysm32e5LskEroqhC1qdjvskxAJ/wl/r+k5l0xZYVQPS1qBzTwA8L5erv R2Nw== X-Forwarded-Encrypted: i=1; AJvYcCU98JywJkYNalOnRmsI4DPZRMPIggVuCBTDyF4PuGR436iC8eEsAVgnqRP8FEvgcNIEnsJrd8aolKywa8iXnyRe@vger.kernel.org X-Gm-Message-State: AOJu0YwsFcMdg5oIbEbrFpLypeXW4oS/95QSIH84ZmNN4aJInkFJJfWv /Wli/SbYcxqQVnQlDcn0PVZx3HND1rrCOxXYE6tCLFXD9SSWZvyBXE0eSChkCEU= X-Google-Smtp-Source: AGHT+IFG/0lmdLf+PuJVUiUVDthedJQkU+yi8kvRYeLAcyp/RSQ9OGzeQL0b0Fr9yTqYmM0khQUKNg== X-Received: by 2002:a05:690c:5a15:b0:6ee:5068:7510 with SMTP id 00721157ae682-6eecc57b073mr20304047b3.26.1732162946630; Wed, 20 Nov 2024 20:22:26 -0800 (PST) Received: from ghost ([50.146.0.9]) by smtp.gmail.com with ESMTPSA id 00721157ae682-6ee71341e4dsm25749277b3.90.2024.11.20.20.22.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Nov 2024 20:22:25 -0800 (PST) Date: Wed, 20 Nov 2024 20:22:23 -0800 From: Charlie Jenkins To: Ian Rogers Cc: Arnd Bergmann , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , Mark Rutland , Alexander Shishkin , Jiri Olsa , Adrian Hunter , Paul Walmsley , Palmer Dabbelt , Albert Ou , =?iso-8859-1?Q?Micka=EBl_Sala=FCn?= , =?iso-8859-1?Q?G=FCnther?= Noack , Christian Brauner , guoren , John Garry , Will Deacon , James Clark , Mike Leach , Leo Yan , Jonathan Corbet , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, linux-riscv@lists.infradead.org, linux-security-module@vger.kernel.org, bpf@vger.kernel.org, "linux-csky@vger.kernel.org" , linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org Subject: Re: [PATCH RFT 00/16] perf tools: Use generic syscall scripts for all archs Message-ID: References: <20241104-perf_syscalltbl-v1-0-9adae5c761ef@rivosinc.com> <3b56fc50-4c6c-4520-adba-461797a3b5ec@app.fastmail.com> Precedence: bulk X-Mailing-List: linux-perf-users@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 Mon, Nov 04, 2024 at 03:35:33PM -0800, Charlie Jenkins wrote: > On Mon, Nov 04, 2024 at 02:03:28PM -0800, Ian Rogers wrote: > > On Mon, Nov 4, 2024 at 1:32 PM Charlie Jenkins wrote: > > > > > > On Mon, Nov 04, 2024 at 10:13:18PM +0100, Arnd Bergmann wrote: > > > > On Mon, Nov 4, 2024, at 22:06, Charlie Jenkins wrote: > > > > > Standardize the generation of syscall headers around syscall tables. > > > > > Previously each architecture independently selected how syscall headers > > > > > would be generated, or would not define a way and fallback onto > > > > > libaudit. Convert all architectures to use a standard syscall header > > > > > generation script and allow each architecture to override the syscall > > > > > table to use if they do not use the generic table. > > > > > > > > > > As a result of these changes, no architecture will require libaudit, and > > > > > so the fallback case of using libaudit is removed by this series. > > > > > > > > > > Testing: > > > > > > > > > > I have tested that the syscall mappings of id to name generation works > > > > > as expected for every architecture, but I have only validated that perf > > > > > trace compiles and runs as expected on riscv, arm64, and x86_64. > > > > > > > > > > Signed-off-by: Charlie Jenkins > > > > > > > > Thanks for doing this, I had plans to do this myself, but hadn't > > > > completed that bit so far. I'm travelling at the moment, so I'm > > > > not sure I have time to look at it in enough detail this week. > > > > > > > > One problem I ran into doing this previously was the incompatible > > > > format of the tables for x86 and s390, which have conflicting > > > > interpretations of what the '-' character means. It's possible > > > > that this is only really relevant for the in-kernel table, > > > > not the version in tools. > > > > > > > > > > I don't think that is an issue for this usecase because the only > > > information that is taken from the syscall table is the number and the > > > name of the syscall. '-' doesn't appear in either of these columns! > > > > This is cool stuff. An area that may not be immediately apparent for > > improvement is that the x86-64 build only has access to the 64-bit > > syscall table. Perhaps all the syscall tables should always be built > > and then at runtime the architecture of the perf.data file, etc. used > > to choose the appropriate one. The cleanup to add an ELF host #define > > could help with this: > > https://lore.kernel.org/linux-perf-users/20241017002520.59124-1-irogers@google.com/ > > Oh that's a great idea! I think these changes will make it more seamless > to make that a reality. > > > > > Ultimately I'd like to see less arch code as it inherently makes cross > > platform worker harder. That doesn't impact this work which I'm happy > > to review. > > Yeah I agree. Reducing arch code was the motivation for this change. > There was the issue a couple weeks ago that caused all architectures > that used libaudit to break from commit 7a2fb5619cc1fb53 ("perf trace: > Fix iteration of syscall ids in syscalltbl->entries"), so this change > will eliminate that source of difference between architectures. > > - Charlie > > > > > Thanks, > > Ian Let me know if you have any feedback on this series! - Charlie