Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp183328lqp; Wed, 20 Mar 2024 18:52:44 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVRZqozhOe3y+EbofQ8ugbZFv8KJPAhhXCBIV1Wk7iC146/LEhA/BBhQZLJ0SG6GgfRXdYfIVX4uGE1Y0LRmUoP3I+M/b5gB1cwGYYbMw== X-Google-Smtp-Source: AGHT+IH7wJlhs6k+UIjJqFa3F1UdygFOP510eVQMIBf5BTs/0SIUusex2/XrjpPK3ervWDLHznU9 X-Received: by 2002:a17:90b:8ce:b0:29b:b163:181a with SMTP id ds14-20020a17090b08ce00b0029bb163181amr16747941pjb.42.1710985964647; Wed, 20 Mar 2024 18:52:44 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710985964; cv=pass; d=google.com; s=arc-20160816; b=OnLJiBt2oQ9sqad4ve3VNmDixEcLPJ8XSfgvQYdXbHBlG7PeGI6SAXl4ekyZXS/oNE I/QtWgt0+MjYM0351QBT01fxr3sOyepi/xw/30bj2AUXZUSqfRoZ6PzcStJpZdW5DLIL 4UdZrpENeXGitJHM0x9wU8/MOVOoMyu+gt0aOQzFOtgYGv82hyHhDL9F9RwZv3x147S9 PQiXXYoQ3LxjoWo0P8g/gjmd/MDZ2YDFpvQgLI+l+YYc8Szv81m2wMXi83Jt3hqN3l+I 7mZ6c1CJPtTiYwJXL0cx3YaEWjlxNm1u74Ncv348i15LnkMv5ecm9kuOjED5xAfx8J24 Gphw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=nYU9J7zFBTCo8/TGqyh4wiUR0hjUIzHAyC/ggld+LKI=; fh=GA+XnteigYBXdeYTbanBm6xVbIZz5iGJBZS/Exl1TPw=; b=XbdLNp6qr36gsq66LMHW0DArGll0CP7r1f5bv7LhBydYqHOvXtJ/nCyUhI1nmH7tjv K+htwsq3dTclfnu7uvsfQqRvOLJme2GLpKywZazJ4Ydm2TPWt4f5TUX/BOLJlsHlQQBT +6WRXxURYqMcn1ZztRvrhXLcfSCsxmpquJHbOIft8kfT5VQ2oPJDkonjed7WJQ71watk H59e2phBDYbgJIGdy/lIrPRtKecBYPs8IbLlHjycNOhlx4MYUSSpnC0qFHfM1T82MArc yv4Yb+CGhGd0qir/Jb63LB8dmgmjaMkQPrOoRDtu3TjFlawSgCSGlpg+0LkOpGlgASh1 MrcA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=grOJyBM0; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-109553-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-109553-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id em9-20020a17090b014900b0029bc172d30fsi2522701pjb.7.2024.03.20.18.52.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Mar 2024 18:52:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-109553-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=@google.com header.s=20230601 header.b=grOJyBM0; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-109553-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-109553-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.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 A43E3B22139 for ; Thu, 21 Mar 2024 01:51:32 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 69F8A6FC5; Thu, 21 Mar 2024 01:51:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="grOJyBM0" Received: from mail-il1-f172.google.com (mail-il1-f172.google.com [209.85.166.172]) (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 06A42883C for ; Thu, 21 Mar 2024 01:51:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710985864; cv=none; b=o8JONVwDOmJNS8R4Vak3+J/2YVF0Fi0JwDri8riR509CV/CXaguKQwXOY9Vo1G0ESDSMcAjn2roTTbGD4T5xT30+oZES6rlHsAOvh1rZ7dohrISuro2hkbMwqow7YqN3DognG+9z754vhzrGnyLOiuSQmIyXNKO1f095dI4ThOI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710985864; c=relaxed/simple; bh=5OH1HhBNQ4E7KZG0KnYehzuDvsgYQmJCQoB0QMizlpg=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=YxQkuZuAIFdrY0Fp7jwHpi73OM+NJeD0iIhgBJJYDjr58VLjwliV4dgk8+sSu4poG/XZ3kcV6HCe+PVOJqQUHjB7avFR/6dfOfriEVCeBnz2vcazK4WsqrI7lNXsjQOhX8zldUIxgs1/W7svMBauR81w2xR5g1hFk9OQLITpsBw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=grOJyBM0; arc=none smtp.client-ip=209.85.166.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=google.com Received: by mail-il1-f172.google.com with SMTP id e9e14a558f8ab-36849db2578so42315ab.1 for ; Wed, 20 Mar 2024 18:51:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1710985862; x=1711590662; 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=nYU9J7zFBTCo8/TGqyh4wiUR0hjUIzHAyC/ggld+LKI=; b=grOJyBM0KiIt4uguVTA0aw/sb195Xlg6RRWn4eQg1KNx0anlMYM9vmai1GkBGSc2IZ 3lObZ1LeYDDvtkjoSEXC3Mvj0HrsoA6p6wVOP8W+zcorSE1ciiD0os4ArK4QfOmIlIU8 z1vsUrVJQYerQDSPuQDvw75+y58N0nvgu5Nh4OkcJC0cYqEG4bajjXzrudcPWMGGMDuF 4cIEGDP9Nahs2bjwPJ2QzwPENSRndq0cHJK30pyOy5yS5Qy8Y2xFF3GcR76Ftuj+joLk YUzYOfy562njtbZBunR282Q0CgDSqnYfkl03OgsBk+JAS5/if3ZRMRD6MY4QpPU8+3Eg Ke9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710985862; x=1711590662; 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=nYU9J7zFBTCo8/TGqyh4wiUR0hjUIzHAyC/ggld+LKI=; b=nKdSCGWIGq2JS7DSyAmYOZyZ5QrLuMQYmmudAjbYnNbMlX/+NxgX1f+FJiW9/BSTxH 4bDUW646yxep4ovH0qSv+i/CrkuvG6BnkZ14pfYZCHpF93lfr8gmSmNz7JOajIcPPPJh eU6DCR4wmsFoScVMP8wE3M+3WAwTcipy2e/EJn+Azz27mIbDgAuu2zlAib0tZHD87lQS mSE9KSZIYJu5dLJYAxzBDXFEqX5dBJbH1bIWIqJfku4U5COk1XcnXRFzQfsDdZWDskp1 kVy0SH03KgpaGjITP/aN5WaCrzb/Lb1TDKI4H8Xv7wcEq5XgPuxBsA0ibvYv8QKJH1xz Zs0A== X-Forwarded-Encrypted: i=1; AJvYcCU9cR0kctJAl3b3refn5iSCfeF79j1e8VwDrTyWhvfnoUIJbOavCmZpmb1YFzZKu6gYSzdAmW1/NbUQ+hssr4A64FVeHbmLIK3YToQV X-Gm-Message-State: AOJu0YwFa129IO7kWyiDSCcMPl4Hsp9Bu8O0QIKNI3sFxO86zCDyrhJ1 kiqZwH8mS6DFhew7hvqp0YLjy6JyUi+t70etBBwqvhhRvD8FM/h+40uHkwNFKHkX/iFJeP1ghYS WlXlPrWE1TRTWus3Of94zn1guugUcMuuZjB7h X-Received: by 2002:a05:6e02:164e:b0:366:a817:61e5 with SMTP id v14-20020a056e02164e00b00366a81761e5mr126039ilu.26.1710985862059; Wed, 20 Mar 2024 18:51:02 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240320193115.811899-1-acme@kernel.org> <20240320193115.811899-6-acme@kernel.org> In-Reply-To: <20240320193115.811899-6-acme@kernel.org> From: Ian Rogers Date: Wed, 20 Mar 2024 18:50:50 -0700 Message-ID: Subject: Re: [PATCH 5/5] perf trace: Fix 'newfstatat'/'fstatat' argument pretty printing To: Arnaldo Carvalho de Melo Cc: Jiri Olsa , Namhyung Kim , Adrian Hunter , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Arnaldo Carvalho de Melo Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Mar 20, 2024 at 12:31=E2=80=AFPM Arnaldo Carvalho de Melo wrote: > > From: Arnaldo Carvalho de Melo > > There were needless two entries, one for 'newfstatat' and another for > 'fstatat', keep just one and pretty print its 'flags' argument using the > fs_at_flags scnprintf that is also used by other FS syscalls such as > 'stat', now: > > root@number:~# perf trace -e newfstatat --max-events=3D5 > 0.000 ( 0.010 ms): abrt-dump-jour/1400 newfstatat(dfd: 7, filename= : "", statbuf: 0x7fff0d127000, flag: EMPTY_PATH) =3D 0 > 0.020 ( 0.003 ms): abrt-dump-jour/1400 newfstatat(dfd: 9, filename= : "", statbuf: 0x55752507b0e8, flag: EMPTY_PATH) =3D 0 > 0.039 ( 0.004 ms): abrt-dump-jour/1400 newfstatat(dfd: 19, filenam= e: "", statbuf: 0x557525061378, flag: EMPTY_PATH) =3D 0 > 0.047 ( 0.003 ms): abrt-dump-jour/1400 newfstatat(dfd: 20, filenam= e: "", statbuf: 0x5575250b8cc8, flag: EMPTY_PATH) =3D 0 > 0.053 ( 0.003 ms): abrt-dump-jour/1400 newfstatat(dfd: 22, filenam= e: "", statbuf: 0x5575250535d8, flag: EMPTY_PATH) =3D 0 > root@number:~# > > Cc: Adrian Hunter > Cc: Ian Rogers > Cc: Jiri Olsa > Cc: Namhyung Kim > Signed-off-by: Arnaldo Carvalho de Melo Reviewed-by: Ian Rogers Thanks, Ian > --- > tools/perf/builtin-trace.c | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) > > diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c > index ef0dfffd99fdf3cc..d3ec244e692a415e 100644 > --- a/tools/perf/builtin-trace.c > +++ b/tools/perf/builtin-trace.c > @@ -978,7 +978,6 @@ static const struct syscall_fmt syscall_fmts[] =3D { > [1] =3D { .scnprintf =3D SCA_FILENAME, /* path */ = }, > [2] =3D { .scnprintf =3D SCA_FSPICK_FLAGS, /* flags */= }, }, }, > { .name =3D "fstat", .alias =3D "newfstat", }, > - { .name =3D "fstatat", .alias =3D "newfstatat", }, > { .name =3D "futex", > .arg =3D { [1] =3D { .scnprintf =3D SCA_FUTEX_OP, /* op */ }, > [5] =3D { .scnprintf =3D SCA_FUTEX_VAL3, /* val3 */ },= }, }, > @@ -1060,8 +1059,10 @@ static const struct syscall_fmt syscall_fmts[] =3D= { > .arg =3D { [0] =3D { .scnprintf =3D SCA_FDAT, /* dfd */ }, }, }= , > { .name =3D "nanosleep", > .arg =3D { [0] =3D { .scnprintf =3D SCA_TIMESPEC, /* req */ },= }, }, > - { .name =3D "newfstatat", > - .arg =3D { [0] =3D { .scnprintf =3D SCA_FDAT, /* dfd */ }, }, }= , > + { .name =3D "newfstatat", .alias =3D "fstatat", > + .arg =3D { [0] =3D { .scnprintf =3D SCA_FDAT, /* dirfd = */ }, > + [1] =3D { .scnprintf =3D SCA_FILENAME, /* pathname= */ }, > + [3] =3D { .scnprintf =3D SCA_FS_AT_FLAGS, /* flags */ = }, }, }, > { .name =3D "open", > .arg =3D { [1] =3D { .scnprintf =3D SCA_OPEN_FLAGS, /* flags */= }, }, }, > { .name =3D "open_by_handle_at", > -- > 2.44.0 >