From patchwork Fri Feb 16 17:23:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Rogers X-Patchwork-Id: 202278 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:c619:b0:108:e6aa:91d0 with SMTP id hn25csp677615dyb; Fri, 16 Feb 2024 09:49:37 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVDFFg++8T7n90HzwqGuCcxCghvR2h2dsClhW1xpHDfBBNZRWsKxEUCq7XXISRKxAKW7sbuTJ7Z9NKZmN6dYb6L7+zLPw== X-Google-Smtp-Source: AGHT+IHQhB/qRmNh0LwiW231J/5BRKKGXeQayQAiRqNhkqaPFBk+hZbdogY1cX5b3OcPjGbPHkWp X-Received: by 2002:a05:6a21:3512:b0:19e:2d00:10c6 with SMTP id zc18-20020a056a21351200b0019e2d0010c6mr13892302pzb.23.1708105776812; Fri, 16 Feb 2024 09:49:36 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708105776; cv=pass; d=google.com; s=arc-20160816; b=aOl1bcStxiYillorCC0RJb9QI6h/JYFnGQD1aFt4Qyi+LfHvXOyIeKtC6GZHk9QZ8I avai7zRLgtPFEV4EDA3Vf6DLmkqJpczAlm7U3qGya8/zpXPiVgt7aHki1l7YgAbS7AiJ Mk4H/m+/QcdChhKm0F3ASeDXV86IVDPYdeneG2cOGLjJW6B5an+/RT0y4iCn7vIMmJ00 rmFZ8wSkPDKJVew03hb3mIOQF/iUy2d8aq0KtFwnvPB0bng67Ydxa93QBHKC6a43Tal4 mNWwrlQPwELiO8R3Pc47yapMZh63/FKLdFAlOH0GZ9WUahuBAliZYnhXoLtWVp4C555j ESWw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=to:from:subject:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:message-id:date:dkim-signature; bh=9Sl1b2bCt2ETIANL315ip+LCb468TguLwgWryRSpCdA=; fh=p+3SRzJd2bKS+MGi1hmx7s3Dr6Sv6jUnbhcXemjCBJI=; b=ccr1FDZtZl4oeGwMxCRD8WTY2k/PZ/81H9b1sr7SUXh+MpEGYsnKJl3y+8u8Wp3P1s LpLdICMxTTKazD00ubrXXTBMclBCBS40RO+xGH/JTQ7ZJjhTE78xExjW7QQ6yYZ/LAue mPhsTJOO6i4xaVch5bEL3yrFlmWWaAIPjWa70NNzVQ6d7jTIevUBhgdGju5pQuceLETo khFXg8OXBNPYhYTIpxch67ZqABXtgKkAdCWVCu8VP6Wx4N91x/8SOWZVw+0dgdWvOFD3 IoBNs0dR9lN2yOFjnU57ocJD2H3lrh2nEaVtRh0iXi881MuCDV3DvXJrmzb24mSwcIjB PsgA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b="b+C/aKHU"; arc=pass (i=1 spf=pass spfdomain=flex--irogers.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-69067-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-69067-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id bq9-20020a056a02044900b005d8bb422554si207945pgb.195.2024.02.16.09.49.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Feb 2024 09:49:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-69067-ouuuleilei=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="b+C/aKHU"; arc=pass (i=1 spf=pass spfdomain=flex--irogers.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-69067-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-69067-ouuuleilei=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 A2D74B245F0 for ; Fri, 16 Feb 2024 17:24:19 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 67101132493; Fri, 16 Feb 2024 17:24:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="b+C/aKHU" Received: from mail-yw1-f201.google.com (mail-yw1-f201.google.com [209.85.128.201]) (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 4B831130E39 for ; Fri, 16 Feb 2024 17:24:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708104243; cv=none; b=jdDmsptNxWZtP1tIb3C3DPZXD4uS8WVpurPyZ1sGjlHthIBih80XIXh3nSwS16ESl1qoc7KyBudIx8NfxWhHiXNSEDw7Dk/H8u9tEmAQ8TweJq2XdJTrtuyr4UNZcmLPX4cX8WOsK/6h/FTikuvqm/HEr2/xv0A8/IDHi+FgOKc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708104243; c=relaxed/simple; bh=GrGGaI96hLQeFLK9l61R0YyUjHIsjanXspc3Z3zFwKg=; h=Date:Message-Id:Mime-Version:Subject:From:To:Content-Type; b=I2jGYF95AHroqallUt9bJzwNnLC2GEeYdHIIWn+kT5IF9UMwfx7IiFusJPURvXm/mnh/eWSLAopw/lwU3opPCz8yBTGrJR0zt7uqqwCC1FK8Be/FMTgEgEV+YbAsTdv+WwHIcKGm03LRiliLP65EtgEtZQZ3Z4ADgyVStxhLOpM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=b+C/aKHU; arc=none smtp.client-ip=209.85.128.201 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=flex--irogers.bounces.google.com Received: by mail-yw1-f201.google.com with SMTP id 00721157ae682-60802b0afd2so4783777b3.1 for ; Fri, 16 Feb 2024 09:24:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1708104241; x=1708709041; darn=vger.kernel.org; h=to:from:subject:mime-version:message-id:date:from:to:cc:subject :date:message-id:reply-to; bh=9Sl1b2bCt2ETIANL315ip+LCb468TguLwgWryRSpCdA=; b=b+C/aKHU42+tAw1dpVxjDPflc9At6XxPCj8S6g17Aw+l+fk3EARVsF9PSNr2UrildO R9smrNRUAXoFNBf0RrzUzwTG4Juj3yaseCu7xsnSjU9YFy7HzHpgtuONhgRQBqrRHyw0 K3cLSvpdry9TAMG4GjxMH9iwwY5tshF+Gt4OtqhYrxz5vhGmlOHBNbtuEAni9oZICp6/ fbpAqcEZ+DAiLgQBaukPQ3+jWm9Eh1iXmcKU5aoFoOEYrj+zH6P0ABAbyVL3eY7ioztI IqtPI9QzdtdEd/nKOzigrr0FmiXaehfzJEQboewGeTGYniXc8BJtRaOMprLMh7qbATCU CVOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708104241; x=1708709041; h=to:from:subject:mime-version:message-id:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=9Sl1b2bCt2ETIANL315ip+LCb468TguLwgWryRSpCdA=; b=Zm7z98a6Gu0qGHfRMj/vS9u1Kh+PFLZRds2Vzp7Kfjm5qxo3ZGc1hOY3poNY23+OWv AaDaUn1eU5Bh8JETNbQ3eC0pwcLHVkele1Hs/UDCZvS88Gd6AQB77ttg3zCtz35cbfEN 5x85n7kWAK3x5LEWwcgjeIVMjIP6YfbaBghPzwhoVO2+J0KBZPyeg30W+l2G459ojISx sN0v9G71JI1qOHlF5VFjXzXm2j2gULAPQ/0pep7b1KxYMeB09pCQv7Oy7JgXdbPhuRiN SRvh29Gnh02XL7V1o14MB0WrXB0FjMvkElrGYahy4YnTN0SwVP9Y+o/+ZJBeYtFe3OCe dMHg== X-Forwarded-Encrypted: i=1; AJvYcCX4jD4UIbYClBQVoCGJFoVmzSR2vB1IPKL/x8RU1AZxywfJgOIx5oEs9GfhACZjuNB/UPPGlQ6gkMQcMgwujQV3TjLRCRg07rCJJNPY X-Gm-Message-State: AOJu0YxUAISaUhSjEUtjGpBlQ/iAbdr7d/5zz/xY6bCT5N2uvCpXgiwG ThOQa0yeTDS7Bt5XO/CmzzoCPd9I5WkS/JSJF/ezS7OnjUjCZ2dGd9nG0t0ZjfZeUNl2e+p7srP Ay9jzzQ== X-Received: from irogers.svl.corp.google.com ([2620:15c:2a3:200:fe4:7382:151a:2e90]) (user=irogers job=sendgmr) by 2002:a81:4316:0:b0:607:f42f:70e1 with SMTP id q22-20020a814316000000b00607f42f70e1mr529438ywa.4.1708104241244; Fri, 16 Feb 2024 09:24:01 -0800 (PST) Date: Fri, 16 Feb 2024 09:23:57 -0800 Message-Id: <20240216172357.65037-1-irogers@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 X-Mailer: git-send-email 2.44.0.rc0.258.g7320e95886-goog Subject: [PATCH v1] perf trace: Disable syscall augmentation with record From: Ian Rogers To: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , Mark Rutland , Alexander Shishkin , Jiri Olsa , Ian Rogers , Adrian Hunter , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791078013826921857 X-GMAIL-MSGID: 1791078723091185241 Syscall augmentation is causing samples not to be written to the perf.data file with "perf trace record". Disabling augmentation is sub-optimal, but it beats having a totally broken perf trace record. Closes: https://lore.kernel.org/lkml/CAP-5=fV9Gd1Teak+EOcUSxe13KqSyfZyPNagK97GbLiOQRgGaw@mail.gmail.com/ Signed-off-by: Ian Rogers --- tools/perf/builtin-trace.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c index 109b8e64fe69..192721261098 100644 --- a/tools/perf/builtin-trace.c +++ b/tools/perf/builtin-trace.c @@ -4864,6 +4864,11 @@ int cmd_trace(int argc, const char **argv) if (!trace.trace_syscalls) goto skip_augmentation; + if ((argc >= 1) && (strcmp(argv[0], "record") == 0)) { + pr_debug("Syscall augmentation fails with record, disabling augmentation"); + goto skip_augmentation; + } + trace.skel = augmented_raw_syscalls_bpf__open(); if (!trace.skel) { pr_debug("Failed to open augmented syscalls BPF skeleton");