From patchwork Sun Nov 5 16:10:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Masami Hiramatsu (Google)" X-Patchwork-Id: 13445784 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 B752113FF4; Sun, 5 Nov 2023 16:10:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Elgaphgm" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3DEA8C433C8; Sun, 5 Nov 2023 16:10:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1699200650; bh=FCiUbQ7cF3hWz3W5mYkLUGazPgX9XWR3NoQQHaWsf5Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ElgaphgmZOlJVXyX6c/8ZRvVfsILDJK73lDr2cM6FuDWVRFQVi1Xl/jFjbpWMRuKl qiUTseyiLMuAGQB4ygAmSB7CeXSWOh/6CzLH7qYgVRX9Jy+jGPrVg9GVtf+h173CQ9 RV4Zke/9/N12hKsdXTVkAXIZIkd8YoxEa8A+3icYfbcDv8A5agz9eYlOWWKvZ+II4v TlFevh2JOy+CP6/Fv6AcPJ0UFGDoypzm2T99ComFygwZqQrU9IZnD8gBeWnOKNOLaG yzscPjTfm/KgcNUMQEjH92QhLUI4kznMLszTu7TS/vyRKNFwBcaWY7y36iecvK3YxB pTes6Uyn61cGg== From: "Masami Hiramatsu (Google)" To: Alexei Starovoitov , Steven Rostedt , Florent Revest Cc: linux-trace-kernel@vger.kernel.org, LKML , Martin KaFai Lau , bpf , Sven Schnelle , Alexei Starovoitov , Jiri Olsa , Arnaldo Carvalho de Melo , Daniel Borkmann , Alan Maguire , Mark Rutland , Peter Zijlstra , Thomas Gleixner , Guo Ren Subject: [RFC PATCH 21/32] function_graph: Expand the max reserved data size Date: Mon, 6 Nov 2023 01:10:45 +0900 Message-Id: <169920064470.482486.9772883857059976420.stgit@devnote2> X-Mailer: git-send-email 2.34.1 In-Reply-To: <169920038849.482486.15796387219966662967.stgit@devnote2> References: <169920038849.482486.15796387219966662967.stgit@devnote2> User-Agent: StGit/0.19 Precedence: bulk X-Mailing-List: linux-trace-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Masami Hiramatsu (Google) Expand the maximum reserved data size to 32 from 4. On 64bit system, this will allow reserving 256 bytes on the ret_stack in maximum but that may not happen. Signed-off-by: Masami Hiramatsu (Google) --- kernel/trace/fgraph.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/trace/fgraph.c b/kernel/trace/fgraph.c index 0b8a1daef733..e7188c67356e 100644 --- a/kernel/trace/fgraph.c +++ b/kernel/trace/fgraph.c @@ -95,7 +95,7 @@ enum { #define FGRAPH_ARRAY_MASK ((1 << FGRAPH_ARRAY_SIZE) - 1) #define FGRAPH_ARRAY_SHIFT (FGRAPH_TYPE_SHIFT + FGRAPH_TYPE_SIZE) -#define FGRAPH_DATA_SIZE 2 +#define FGRAPH_DATA_SIZE 5 #define FGRAPH_DATA_MASK ((1 << FGRAPH_DATA_SIZE) - 1) #define FGRAPH_DATA_SHIFT (FGRAPH_TYPE_SHIFT + FGRAPH_TYPE_SIZE) @@ -113,7 +113,7 @@ enum { #define RET_STACK(t, index) ((struct ftrace_ret_stack *)(&(t)->ret_stack[index])) -#define FGRAPH_MAX_DATA_SIZE (sizeof(long) * 4) +#define FGRAPH_MAX_DATA_SIZE (sizeof(long) * (1 << FGRAPH_DATA_SIZE)) /* * Each fgraph_ops has a reservered unsigned long at the end (top) of the