Commit 90a871f7 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull ftrace updates from Steven Rostedt:

 - Keep track of when fgraph_ops are registered or not

   Keep accounting of when fgraph_ops are registered as if a fgraph_ops
   is registered twice it can mess up the accounting and it will not
   work as expected later. Trigger a warning if something registers it
   twice as to catch bugs before they are found by things just not
   working as expected.

 - Make DYNAMIC_FTRACE always enabled for architectures that support it

   As static ftrace (where all functions are always traced) is very
   expensive and only exists to help architectures support ftrace, do
   not make it an option. As soon as an architecture supports
   DYNAMIC_FTRACE make it use it. This simplifies the code.

 - Remove redundant config HAVE_FTRACE_MCOUNT_RECORD

   The CONFIG_HAVE_FTRACE_MCOUNT was added to help simplify the
   DYNAMIC_FTRACE work, but now every architecture that implements
   DYNAMIC_FTRACE also has HAVE_FTRACE_MCOUNT set too, making it
   redundant with the HAVE_DYNAMIC_FTRACE.

 - Make pid_ptr string size match the comment

   In print_graph_proc() the pid_ptr string is of size 11, but the
   comment says /* sign + log10(MAX_INT) + '\0' */ which is actually 12.

* tag 'ftrace-v6.17' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace:
  tracing: Remove redundant config HAVE_FTRACE_MCOUNT_RECORD
  ftrace: Make DYNAMIC_FTRACE always enabled for architectures that support it
  fgraph: Keep track of when fgraph_ops are registered or not
  fgraph: Make pid_str size match the comment
parents 2223228b 4d6d0a62
Loading
Loading
Loading
Loading
+4 −8
Original line number Diff line number Diff line
@@ -238,19 +238,15 @@ You need very few things to get the syscalls tracing in an arch.
  - Tag this arch as HAVE_SYSCALL_TRACEPOINTS.


HAVE_FTRACE_MCOUNT_RECORD
-------------------------
HAVE_DYNAMIC_FTRACE
-------------------

See scripts/recordmcount.pl for more info.  Just fill in the arch-specific
details for how to locate the addresses of mcount call sites via objdump.
This option doesn't make much sense without also implementing dynamic ftrace.


HAVE_DYNAMIC_FTRACE
-------------------

You will first need HAVE_FTRACE_MCOUNT_RECORD and HAVE_FUNCTION_TRACER, so
scroll your reader back up if you got over eager.
You will first need HAVE_FUNCTION_TRACER, so scroll your reader back up if you
got over eager.

Once those are out of the way, you will need to implement:
	- asm/ftrace.h:
+0 −1
Original line number Diff line number Diff line
@@ -105,7 +105,6 @@ config ARM
	select HAVE_EFFICIENT_UNALIGNED_ACCESS if (CPU_V6 || CPU_V6K || CPU_V7) && MMU
	select HAVE_EXIT_THREAD
	select HAVE_GUP_FAST if ARM_LPAE
	select HAVE_FTRACE_MCOUNT_RECORD if !XIP_KERNEL
	select HAVE_FUNCTION_ERROR_INJECTION
	select HAVE_FUNCTION_GRAPH_TRACER
	select HAVE_FUNCTION_TRACER if !XIP_KERNEL
+0 −1
Original line number Diff line number Diff line
@@ -221,7 +221,6 @@ config ARM64
	select HAVE_EFFICIENT_UNALIGNED_ACCESS
	select HAVE_GUP_FAST
	select HAVE_FTRACE_GRAPH_FUNC
	select HAVE_FTRACE_MCOUNT_RECORD
	select HAVE_FUNCTION_TRACER
	select HAVE_FUNCTION_ERROR_INJECTION
	select HAVE_FUNCTION_GRAPH_FREGS
+0 −1
Original line number Diff line number Diff line
@@ -80,7 +80,6 @@ config CSKY
	select HAVE_FUNCTION_TRACER
	select HAVE_FUNCTION_GRAPH_TRACER
	select HAVE_FUNCTION_ERROR_INJECTION
	select HAVE_FTRACE_MCOUNT_RECORD
	select HAVE_KERNEL_GZIP
	select HAVE_KERNEL_LZO
	select HAVE_KERNEL_LZMA
+0 −1
Original line number Diff line number Diff line
@@ -143,7 +143,6 @@ config LOONGARCH
	select HAVE_EXIT_THREAD
	select HAVE_GUP_FAST
	select HAVE_FTRACE_GRAPH_FUNC
	select HAVE_FTRACE_MCOUNT_RECORD
	select HAVE_FUNCTION_ARG_ACCESS_API
	select HAVE_FUNCTION_ERROR_INJECTION
	select HAVE_FUNCTION_GRAPH_FREGS
Loading