Received: by 2002:a05:6500:1b41:b0:1fb:d597:ff75 with SMTP id cz1csp319427lqb; Tue, 4 Jun 2024 12:18:34 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXU+bJsC+yjEb9FVHkXEdhTf/X1VA3j/094S8T6LbnHBxPS8xWJRFz2W0uuTT/XlDWFjClzIiTfbHBBsTRHTofQtQ1qHXfxwXIAxeAQrg== X-Google-Smtp-Source: AGHT+IE2+2xzltGqWo7WntSyxWDqvaQvLXIDYnGrnzmgMafqmzRtpUB4PRTsUJyyUgyLWkbCUsNN X-Received: by 2002:a50:c314:0:b0:578:60a6:7c69 with SMTP id 4fb4d7f45d1cf-57a8b7c7a9dmr373654a12.30.1717528713900; Tue, 04 Jun 2024 12:18:33 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717528713; cv=pass; d=google.com; s=arc-20160816; b=bhFwwxfIgv+CxxTii66Nlxw+zEsUcKezoRWXKXJtkPSu4gqJ4jIhctlPb7neZBb1H2 Y1DQwGQ08lHVmsvLipX6dwZtwX6HYl85HP4M7/wcZ7yaEmYXx7tG2GcPXWFqDeTve99d vLGZqcjFf/FMvPRCXMj6T84tI5TT+8Aj6qs7oPJz9EG82d4J4d5nq/k4HWfSR7rzclLV QKpdSAv9v0lgja/pkj4LAguJQe7iL64Gsf47N8bUekCp+i0/pOB1ZDCbj+ECi1ZSemTz tYaO0HA9ogMTlgidfM8B2wI8mkR040aHWDZ5OHdXK3cgG4oWGBGJKaUqhDQL7+OqV/UV O6Fw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:date; bh=EjWeXO2ay4Kt3XL4p26aBMQpMcv09usUf6KfdU6LClo=; fh=eqNDKm4wAtJkTgiMqkrYTddtdYASrqeTBMH2Etb+8n0=; b=CNv+sCkCxkRna9K7GZrCtABsSb1kNZGC9MW4nh9+PlwF+QcYEGNq9l068KA2PpXeUn 9sukB2fL6TmlaGviAbRm/j3VooBsdp1Eef9daA0GgEsGaM+9cDYspLb4ddf6uRh/NOKK oDwXmv8ZmICiBixl1HY96f5UdcQzVidJuv5PXXjSRxb/7GL9rXfmVzyIaniHvQclayhn WlcJ5sKOfDqHV2Duc1BfbcandU16RML43phnRDaiNVUd5G50dbbN4Sre44WMAdoHpcOY PFPLs2jb6KuDbP+LpWgPrCtNLLdrW+pAD5ldKUHPgI9V8VmaGezfVNtU6MoQH4nYbfv7 9cUA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-201276-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-201276-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-57a31c629b5si5379387a12.226.2024.06.04.12.18.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jun 2024 12:18:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-201276-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-201276-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-201276-linux.lists.archive=gmail.com@vger.kernel.org" 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 466FA1F247E2 for ; Tue, 4 Jun 2024 19:18:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 06F5C14B075; Tue, 4 Jun 2024 19:18:24 +0000 (UTC) Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 71C50801; Tue, 4 Jun 2024 19:18:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717528703; cv=none; b=kJc+3aa5Ps+Y1gfOl93ukpICF1rE4w1eKwr1nYkVtyxc9R/OQaoxK3fDwL3xVceGFdpq647Uz9srn+2k3KcKns7Ie+IYXQZptb13ASUdylCD+bSX9MHkVL0i0zy7hENFRzmAT/Oh8fHLJ19woyNdyA+IdXzjgM6NdBw9fqWjGHs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717528703; c=relaxed/simple; bh=XngVXlaW0L7tH68pFG/Glx9+GjRa4NOjVuZqlf21XUs=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=K98cPWovZ5nlECNzbEWVG4K065bGigu00ad355kdmYuSAi6ISc6/EYxDq88UaStKqGVIyopSX+1FakYldh0NeXHSs1tCyrUsMPuA67rahs8I64BCV3urionkPCZggjZtecpjJh9JRzPy59kOYpH19le4GSNGjpvt3hIdb8dpeu8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3F561C2BBFC; Tue, 4 Jun 2024 19:18:21 +0000 (UTC) Date: Tue, 4 Jun 2024 15:18:21 -0400 From: Steven Rostedt To: Mark Rutland Cc: Masami Hiramatsu , linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, Mathieu Desnoyers , Andrew Morton , Alexei Starovoitov , Florent Revest , Martin KaFai Lau , bpf , Sven Schnelle , Alexei Starovoitov , Jiri Olsa , Arnaldo Carvalho de Melo , Daniel Borkmann , Alan Maguire , Peter Zijlstra , Thomas Gleixner , Guo Ren Subject: Re: [PATCH v3 00/27] function_graph: Allow multiple users for function graph tracing Message-ID: <20240604151821.5694e908@gandalf.local.home> In-Reply-To: <20240604145742.5703d074@gandalf.local.home> References: <20240603190704.663840775@goodmis.org> <20240604081850.59267aa9@rorschach.local.home> <20240604123124.456d19cf@gandalf.local.home> <20240604145742.5703d074@gandalf.local.home> X-Mailer: Claws Mail 3.20.0git84 (GTK+ 2.24.33; x86_64-pc-linux-gnu) 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-Transfer-Encoding: 7bit On Tue, 4 Jun 2024 14:57:42 -0400 Steven Rostedt wrote: > Bah, I just ran the test.d/ftrace/func-filter-pid.tc and it fails too. This > did pass my other tests that do run ftracetests. Hmm, I just ran it on my > test box that does the tests and it passes there. I wonder if there's some > config option that makes it fail :-/ > > Well, now that I see it fail, I can investigate. Ah, figured it out. The updated pid test isn't working. This explains why my test machine didn't fail, as it doesn't have the updated ftracetests. The problem was that I never set the funcgraph-proc option, even though I saved it :-p That is, it shows: > + cat trace > # tracer: function_graph > # > # CPU DURATION FUNCTION CALLS > # | | | | | | | > 3) ! 143.685 us | kernel_clone(); > 3) ! 127.055 us | kernel_clone(); > 1) ! 127.170 us | kernel_clone(); > 3) ! 126.840 us | kernel_clone(); But when you do: echo 1 > options/funcgraph-proc You get: # cat trace # tracer: function_graph # # CPU TASK/PID DURATION FUNCTION CALLS # | | | | | | | | | 4) bash-939 | # 1070.009 us | kernel_clone(); 4) bash-939 | # 1116.903 us | kernel_clone(); 5) bash-939 | ! 976.133 us | kernel_clone(); 5) bash-939 | ! 954.012 us | kernel_clone(); 5) bash-939 | ! 905.825 us | kernel_clone(); 5) bash-939 | # 1130.922 us | kernel_clone(); 7) bash-939 | # 1097.648 us | kernel_clone(); 0) bash-939 | # 1008.000 us | kernel_clone(); 3) bash-939 | # 1023.391 us | kernel_clone(); 4) bash-939 | # 1033.008 us | kernel_clone(); 4) bash-939 | ! 949.072 us | kernel_clone(); 4) bash-939 | # 1027.990 us | kernel_clone(); 4) bash-939 | ! 954.678 us | kernel_clone(); 4) bash-939 | ! 996.557 us | kernel_clone(); Without that option, function graph does no show what process is being recorded (except at sched switch) Can you add this patch to the test and see if it works again? -- Steve diff --git a/tools/testing/selftests/ftrace/test.d/ftrace/func-filter-pid.tc b/tools/testing/selftests/ftrace/test.d/ftrace/func-filter-pid.tc index c6fc9d31a496..8dcce001881d 100644 --- a/tools/testing/selftests/ftrace/test.d/ftrace/func-filter-pid.tc +++ b/tools/testing/selftests/ftrace/test.d/ftrace/func-filter-pid.tc @@ -8,6 +8,7 @@ # Also test it on an instance directory do_function_fork=1 +do_funcgraph_proc=1 if [ ! -f options/function-fork ]; then do_function_fork=0 @@ -28,6 +29,7 @@ fi if [ $do_funcgraph_proc -eq 1 ]; then orig_value2=`cat options/funcgraph-proc` + echo 1 > options/funcgraph-proc fi do_reset() {