Received: by 2002:ab2:7903:0:b0:1fb:b500:807b with SMTP id a3csp1165564lqj; Mon, 3 Jun 2024 12:09:15 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUpci/GgaXTm1GRHZ2Zb3uFWHkdBDfrIc1Lt3OqaL+VHIT9Dsze/Pj3KX5gC2uzLjHIDmN2PJ6IBUwgJoXeXlJhTyeS2zp1KcZg5odCqw== X-Google-Smtp-Source: AGHT+IHgi172ZWrHHe31t6dEwLkmXqU6N5Yxz1vYgRbI0+YpX9IfI1fbZuHQLcuqCFhd8M9mqvyA X-Received: by 2002:a17:906:6948:b0:a68:fd49:ab9e with SMTP id a640c23a62f3a-a68fd49ac80mr323635566b.36.1717441755824; Mon, 03 Jun 2024 12:09:15 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717441755; cv=pass; d=google.com; s=arc-20160816; b=Ru1SP3plmHO5NtJdDTXL8dKLvqWR8zN5tiU5uR0jKBSUrNMsOuILgc6YPMQR3tK9/1 xFRfM6f1twc+Vbjmko8dZKxTAofQ/vgeWkPspWzxrRx3VKg28VptJeAT8QvxKXj9gpbd R7b8j0OdZ1TOIbbkKN+m/S7N+QeVBAFrTdszmfD4Qr4MCcW4jVRa23TN2/kZkDOcwCzA Oi4iGSRaYoQxkSZTUO4B0/aNVqYdv+2YFgp6/JMPejrRDSDaA/GiOBi5/dGgMy54jOwP 3pTZGfPSRoENYRFQw1kfheYMIrDcFyF5/FMqv3hyIT/h/tmsyAgoGNl2DXcZCit3PaFl REog== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:subject:cc:to:from:date:user-agent:message-id; bh=y1R1teenySwwWkHIFXOyaPnsP+8NKJMWc1PaLPWk8Yo=; fh=YfcaVrAzBpSwi8dOlqHV4K1os6qdULs4cyXFG/DyLfE=; b=JGu4dugWwAYKGFSMld04Q61uZHwPvAfLtGmGG+wDZMfFhXWCncDyhdqNShYBxINigV ddMaxV722UmuSJsrdbrbVUtZxkkIkTrThMgmWZBNqhhGmap6lfst8wACPdsf5SIRUkqc 1Mv8KB7a0AhKMNJtZfLHNUwhzPuP5XDD2ej8ziHdxwU+iG1/7BQy9ZzQRB0MFEp3GNKF 0EAhyzvIXtPxij1qS/7WgT9+pCEn14/ggsj1TAkZwrN0vPgJPW8kxLY47ZxKqJJVuMdD tV/qFMTSAtyd2B2DCrKs9/qRaiXdQ5PxmjyY0KYVXXsA+jUC2SHcQ6u08jwahqkEDn1Y LQUg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-199604-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-199604-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a640c23a62f3a-a6900d7f61asi142855066b.123.2024.06.03.12.09.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Jun 2024 12:09:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-199604-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-199604-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-199604-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 47EEB1F25616 for ; Mon, 3 Jun 2024 19:09:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D8ACD13D24F; Mon, 3 Jun 2024 19:07:13 +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 8A8E713B7A1; Mon, 3 Jun 2024 19:07:11 +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=1717441631; cv=none; b=GL2RPcoFJAe/1JfhG1plx/FHLQE5qTmT1x3iLcdg1lDcGIWsw2XlBuxwZ5X5TFIUZAHCUdqLo4Y4+j37niPYzouuAJ5o70ic65l06mZSckCgh++W5uJkeDRxTCKXqRqAgYNVxRnwtZ4jdYH0vqGZdMXt7BPw3u9FS8AYaUflDSc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717441631; c=relaxed/simple; bh=onmnptRPHMLbof5HYGb+W45EMoWIMr+zQx72xT7POs0=; h=Message-ID:Date:From:To:Cc:Subject:References:MIME-Version: Content-Type; b=MLDPyYDIGK6DlwKpA2GzCWqAvviGEjvE5uVw7X+b8KNg3NjMON+Y5L9BmmyHzVy5rUHQ+34bwdOlhp9neyGHgQdPtvsBaqLNSsubGEk/eRchbC+KWaCOjA3mRNWbYvjq2dT4pgNVKVWS6PWnpYy4ZmsX+ArMOdxZoMSCXSROEDw= 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 770F9C4DDFA; Mon, 3 Jun 2024 19:07:11 +0000 (UTC) Received: from rostedt by gandalf with local (Exim 4.97) (envelope-from ) id 1sED2c-00000009TqR-23D7; Mon, 03 Jun 2024 15:08:22 -0400 Message-ID: <20240603190822.350654104@goodmis.org> User-Agent: quilt/0.68 Date: Mon, 03 Jun 2024 15:07:13 -0400 From: Steven Rostedt To: linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org Cc: Masami Hiramatsu , Mark Rutland , 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: [PATCH v3 09/27] ftrace: Allow ftrace startup flags to exist without dynamic ftrace References: <20240603190704.663840775@goodmis.org> 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 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(). Link: https://lore.kernel.org/linux-trace-kernel/171509100890.162236.4362350342549122222.stgit@devnote2 Signed-off-by: Steven Rostedt (VMware) Signed-off-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (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 fd656e6d6b7c..586018744785 100644 --- a/include/linux/ftrace.h +++ b/include/linux/ftrace.h @@ -509,6 +509,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); @@ -603,15 +612,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() -- 2.43.0