Received: by 2002:ab2:69cc:0:b0:1f4:be93:e15a with SMTP id n12csp1415088lqp; Mon, 15 Apr 2024 06:08:15 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWnKGR1F72GXDzFsMpO8lckowvdAqAHYTeppYkobQ0xtLmYPbuNgg4Q3q4XJrWvNdIkzYHMOl8OJV83tUcng02TpraxWxpG4KFyWI5GfQ== X-Google-Smtp-Source: AGHT+IFWai0M6TexGTQAclPIzOEpZae992pVZqw10GvFQLeJYNuidDmiFqT8atjBqrHFzZuasqHE X-Received: by 2002:a37:e116:0:b0:78d:58bb:e183 with SMTP id c22-20020a37e116000000b0078d58bbe183mr10055781qkm.63.1713186494413; Mon, 15 Apr 2024 06:08:14 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713186494; cv=pass; d=google.com; s=arc-20160816; b=ssMH0jcJqqJT8wmMgxLAUaBEYs5/Y0xnS+qocbMZu8rg4uC2iAkdAMAJgsMmdj2arf tkTijkoegcM4qHP5yrgZLtStAPtFitArl8tcOLFdibgGykYTTWXy9AU7BAUbx1SezMxk L92xhfxwXY2lUByyG2FnPpzg0FekGciyDNI5Hc1sm/yDCG/XezjMPuRAq9KYL1TKFgdK ojjm0mZJsTDWmVMK8mZRkgVouk5Rf5JT/NlYbuvPhJphS7Ldj8ncLlcyw1CmoeDWlrh5 98LhF0zsUjKx13lAehNFIpaJpi1lcLh6jZB90bTQz+SNXw797OR1bUIpJzoxVtadzTg1 anFg== 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:user-agent:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=D3Av/k1TfZdUd1ZnZb6FYhyojhGApsP2c29+7XxFNYk=; fh=SIgps5XdV0XNwjZfT2uAI7g3mrspDldK9Qs8qQAfoa4=; b=YiePRO/lBMTXOyXEaqsl8E5z1WoOa+3jnzfoYzTHYSHxnkGKUYgo8gN347cA3apCZ4 ZXFyytPyY1hSELvbSuUYaCYGaFToBj7x0YTzPmJXkgAHJrGlzCWoNHIzWKbT+RNRMYEE 5Zz9EAXE2Rixz+ZF1AR+JZc4NVPxNY4vxsbhpGMNfzVDRUErtM3veQqDywJLhYSKYooQ xtLJh6gk0PHdQK6spdsarWhB2TqrPmL7DQFTRbd88CsCLMA2vPy9eRghGG2VICcEC9gV pG/x59Ik5Qb7kg0E621S3awxfHxRBCzkGdvjpJN8tQ5/vtm+I+pKu9w54jk02xexLt3Y 5meg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=iJBcuig3; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-145168-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-145168-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id i5-20020a05620a248500b0078eccb94bc5si8594802qkn.54.2024.04.15.06.08.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Apr 2024 06:08:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-145168-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=iJBcuig3; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-145168-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-145168-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 ny.mirrors.kernel.org (Postfix) with ESMTPS id CCD061C22938 for ; Mon, 15 Apr 2024 13:06:56 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6293C137759; Mon, 15 Apr 2024 12:51:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="iJBcuig3" 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 7CECC136E12; Mon, 15 Apr 2024 12:51:13 +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=1713185473; cv=none; b=RxtTeXDZ+xiQBmPam5VZO2tLfu3q/sa5nLBCsqBd2Msoi655sHOJvi2/5TOneEfO4DjO37XIRN/h1j5ETNusKcWKGvVZ8oB8vsZU4UHl2jD9NTLmRWPvgza/dX3ITe87NjMmtQMvNl0ojN62DLn/jZVrjNAPbTV9K50yFV0qC1c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713185473; c=relaxed/simple; bh=ZtnY/SVVbc5FkLaqffICW0eL2EoTjYiqDw6hBcLoMzA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=uvIt2Q2e04At9KdfGYvUkN0zj2SW1gkdbBuxP8k+k2psy/dNz/g8l6Zj7BifkHDkPJkaVmb6NLPCQe6BtAjJsec1A32phISGhlTA2p08G0j+ylcPwYUtW89OAtgunBDzPtOBlKeyEY1q289kpG6ty4xHvgxscE77Y68gNIStzhE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=iJBcuig3; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id E794DC3277B; Mon, 15 Apr 2024 12:51:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713185473; bh=ZtnY/SVVbc5FkLaqffICW0eL2EoTjYiqDw6hBcLoMzA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iJBcuig3Rj6Athn1MeFNWuetIhW4aOeYpm5f1cM92ZIvIIyDWUTR6aCfe4xeLiYLb aUKqoy58D9TS2AHQmuZuwWMHSja0yI2NBTQzuAPIjLW+h58vL65znsVbc8RSHRfUuI xub6YSWW/caTQ2pYhKNHgrIyF5T+msnP/BVEBzXJnxamH9QY16O0VzYrXvkRqUXIF2 LYPrvMabZME2hjhuK+As1kmpPQpg6MXzFkEiyNVKnzz4C+e3BA8qz6XeBtbU+f7UOW jpEOYjq4bvOt+8EfUJUUBDS49TJxA8gKIcqhJXdB47uKKH0/r8M8PK4d3mv2MjROsj NujQJ58XG1HEA== 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: [PATCH v9 11/36] ftrace: Allow ftrace startup flags exist without dynamic ftrace Date: Mon, 15 Apr 2024 21:51:07 +0900 Message-Id: <171318546760.254850.17894205840308276873.stgit@devnote2> X-Mailer: git-send-email 2.34.1 In-Reply-To: <171318533841.254850.15841395205784342850.stgit@devnote2> References: <171318533841.254850.15841395205784342850.stgit@devnote2> User-Agent: StGit/0.19 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="utf-8" Content-Transfer-Encoding: 8bit From: Steven Rostedt (VMware) Some of the flags for ftrace_startup() may be exposed even when CONFIG_DYNAMIC_FTRACE is not configured in. This is fine as the difference between dynamic ftrace and static ftrace is done within the internals of ftrace itself. No need to have use cases fail to compile because dynamic ftrace is disabled. This change is needed to move some of the logic of what is passed to ftrace_startup() out of the parameters of ftrace_startup(). Signed-off-by: Steven Rostedt (VMware) Signed-off-by: Masami Hiramatsu (Google) --- include/linux/ftrace.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h index 2eb4981ec80b..d66ebc77e4e4 100644 --- a/include/linux/ftrace.h +++ b/include/linux/ftrace.h @@ -538,6 +538,15 @@ static inline void stack_tracer_disable(void) { } static inline void stack_tracer_enable(void) { } #endif +enum { + FTRACE_UPDATE_CALLS = (1 << 0), + FTRACE_DISABLE_CALLS = (1 << 1), + FTRACE_UPDATE_TRACE_FUNC = (1 << 2), + FTRACE_START_FUNC_RET = (1 << 3), + FTRACE_STOP_FUNC_RET = (1 << 4), + FTRACE_MAY_SLEEP = (1 << 5), +}; + #ifdef CONFIG_DYNAMIC_FTRACE void ftrace_arch_code_modify_prepare(void); @@ -632,15 +641,6 @@ void ftrace_set_global_notrace(unsigned char *buf, int len, int reset); void ftrace_free_filter(struct ftrace_ops *ops); void ftrace_ops_set_global_filter(struct ftrace_ops *ops); -enum { - FTRACE_UPDATE_CALLS = (1 << 0), - FTRACE_DISABLE_CALLS = (1 << 1), - FTRACE_UPDATE_TRACE_FUNC = (1 << 2), - FTRACE_START_FUNC_RET = (1 << 3), - FTRACE_STOP_FUNC_RET = (1 << 4), - FTRACE_MAY_SLEEP = (1 << 5), -}; - /* * The FTRACE_UPDATE_* enum is used to pass information back * from the ftrace_update_record() and ftrace_test_record()