Received: by 2002:a05:6500:1b41:b0:1fb:d597:ff75 with SMTP id cz1csp170103lqb; Tue, 4 Jun 2024 08:08:12 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXBy1TMCNN48emUsFXxF7pV2LbJx8nnpK38fyXNMiqSSluYo/k9w8vDLfZSX/RqvyCrM2L1npAU9PG+s1GqwZ2oD3xTefGQngI6qnePnA== X-Google-Smtp-Source: AGHT+IGe9gBX9qHpPwj2NZhUSEFWMlMuvls6IOlzKXOm1f9CQc5B5KI51npQhBOQaNM3xJetrSoy X-Received: by 2002:a17:902:cec6:b0:1f6:8157:b52f with SMTP id d9443c01a7336-1f68157b7f9mr58209775ad.8.1717513691711; Tue, 04 Jun 2024 08:08:11 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717513691; cv=pass; d=google.com; s=arc-20160816; b=gYqeGXF2cxmEfaZIdXOgi/XxDj+XlT31MWxJH1I8otYuYnfRm8W2czPoOIJTTNXK++ UPyH+GNgraLw3Dy8Wsddarh4DyrxR/Tf5KVT3UY6i9fCaHsEbo+lw5I1zurG0rk+ewR0 0Mi5i2CGHrdAFkPYa6yiJtx+j3SQzluijiqO9S5PR47jAvQLxcAVaoIy6cUe9vqm07R0 q3MbG+ax75lAH74v+LppRsCJIOxKGmRmu2zCB8nZV/xP2uB4nbbGlvbSA8HQV6Npas+i mDOtS2MJdNumJZ6/lTMn3cd7BfuYw+PMS7yLlALHK/qllXggerosV7g4JWmwF/QfB6FE NRlA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-id:precedence:subject:cc:to :from:date:user-agent:message-id; bh=105oRB1owP5AZfMD/+5zLWxppOzZ6EseuvpI+ECvSU8=; fh=mTYg3JJ8i2GBNLFt8qb4bgYwOyk0kmrOzICLbi6qJ1c=; b=y7aEejrq8k6LdKo9lUxHn5vggKkSGsW3zQje7udQuijOEsAdBtqs+ls54z7CeHWf2N WgGGeHjziEyiM1mLBg8VNzQ5fI9eSayJZGIGJI4N2dES899Rm8OdLYsc/IZGE45XM9dX 4KB5vq/QGi4eOecAkZU4+EVcUQLBPpHg8G2oIDoV88UrnrFNJcSMLNVERiCV2z51OWwI gF9T4e36q+0R8NFzm2oOmh9uhX7UXq/msbRsw/rKkdNIPOBnmP7UqWVLcuu6pqRjGl4z ZlDdFV9OcHEusqFO5mOzj1iUng0BDk+rBLdrbearUyxAKjzgBxr1aBpXNgQf71IZNRCE Z4DA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-200862-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-200862-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id d9443c01a7336-1f683162e2esi29285225ad.12.2024.06.04.08.08.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jun 2024 08:08:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-200862-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; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-200862-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-200862-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id B7A56B28166 for ; Tue, 4 Jun 2024 14:43:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6397F1448ED; Tue, 4 Jun 2024 14:42:15 +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 CCAC913A863 for ; Tue, 4 Jun 2024 14:42:14 +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=1717512134; cv=none; b=dUvSQz7kGehxjCPT2QstMKmpuoVFhJHl+ez+hTFGGSxjMJuNnxcaTd/09oCKBAKfcgm68/WsOc49hZOwltWl/etYF9eqOpFqKCLAatP5YEc0E1E/TusxVHLYM5KIs191CVgnDys5k0Szv+fiS1vJL/89IAn4ilEqBxzdV4fp4uU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717512134; c=relaxed/simple; bh=QhueViGQ6pQwXQ+A7L/O06/Vk+SdAysHzZ8fTiTjFis=; h=Message-ID:Date:From:To:Cc:Subject; b=IINeg75fXwhkmDSbGA7SQM286kiLUn0HyjSOBSH7QqUwEW6tynquekYy9xgOtDAXfW6OiBdgPeI4/MkIovZWOi/ywA/5cFjvXkdw8ylvrF8HavTFR1CSRLZlJ3/MtSTk7VZgWPk+KNQDshoD0GnZCxQATJ28lvHaWMxOw05JucI= 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 8ACEDC32786; Tue, 4 Jun 2024 14:42:14 +0000 (UTC) Received: from rostedt by gandalf with local (Exim 4.97) (envelope-from ) id 1sEVMc-00000000Yt9-0V0T; Tue, 04 Jun 2024 10:42:14 -0400 Message-ID: <20240604144103.293353991@goodmis.org> User-Agent: quilt/0.68 Date: Tue, 04 Jun 2024 10:41:03 -0400 From: Steven Rostedt To: linux-kernel@vger.kernel.org Cc: Masami Hiramatsu , Mark Rutland , Mathieu Desnoyers , Andrew Morton Subject: [for-next][PATCH 00/27] function_graph: Allow multiple users for v6.11 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace.git fgraph/for-next Head SHA1: 8d4e21bd4cca8013d2c6f55d42df85838d4ebce6 Masami Hiramatsu (Google) (3): function_graph: Handle tail calls for stack unwinding function_graph: Use a simple LRU for fgraph_array index number ftrace: Add multiple fgraph storage selftest Steven Rostedt (Google) (9): ftrace: Add subops logic to allow one ops to manage many ftrace: Allow subops filtering to be modified function_graph: Add pid tracing back to function graph tracer function_graph: Use for_each_set_bit() in __ftrace_return_to_handler() function_graph: Use bitmask to loop on fgraph entry function_graph: Use static_call and branch to optimize entry function function_graph: Use static_call and branch to optimize return function selftests/ftrace: Add function_graph tracer to func-filter-pid test selftests/ftrace: Add fgraph-multi.tc test Steven Rostedt (VMware) (15): function_graph: Convert ret_stack to a series of longs fgraph: Use BUILD_BUG_ON() to make sure we have structures divisible by long function_graph: Add an array structure that will allow multiple callbacks function_graph: Allow multiple users to attach to function graph function_graph: Remove logic around ftrace_graph_entry and return ftrace/function_graph: Pass fgraph_ops to function graph callbacks ftrace: Allow function_graph tracer to be enabled in instances ftrace: Allow ftrace startup flags to exist without dynamic ftrace function_graph: Have the instances use their own ftrace_ops for filtering function_graph: Add "task variables" per task for fgraph_ops function_graph: Move set_graph_function tests to shadow stack global var function_graph: Move graph depth stored data to shadow stack global var function_graph: Move graph notrace bit to shadow stack global var function_graph: Implement fgraph_reserve_data() and fgraph_retrieve_data() function_graph: Add selftest for passing local variables ---- include/linux/ftrace.h | 43 +- include/linux/sched.h | 2 +- include/linux/trace_recursion.h | 39 - kernel/trace/fgraph.c | 1044 ++++++++++++++++---- kernel/trace/ftrace.c | 522 +++++++++- kernel/trace/ftrace_internal.h | 5 +- kernel/trace/trace.h | 94 +- kernel/trace/trace_functions.c | 8 + kernel/trace/trace_functions_graph.c | 96 +- kernel/trace/trace_irqsoff.c | 10 +- kernel/trace/trace_sched_wakeup.c | 10 +- kernel/trace/trace_selftest.c | 259 ++++- .../selftests/ftrace/test.d/ftrace/fgraph-multi.tc | 103 ++ .../ftrace/test.d/ftrace/func-filter-pid.tc | 27 +- 14 files changed, 1945 insertions(+), 317 deletions(-) create mode 100644 tools/testing/selftests/ftrace/test.d/ftrace/fgraph-multi.tc