Re: [PATCH] ftrace: Fix stack trace entry generated by ftrace_pid_func()

2024-05-26 Thread Tatsuya S
base' as documented in > > https://git-scm.com/docs/git-format-patch#_base_tree_information] > > > > url: > > https://github.com/intel-lab-lkp/linux/commits/Tatsuya-S/ftrace-Fix-stack-trace-entry-generated-by-ftrace_pid_func/20240526-193149 > > base: linus/master >

Re: [PATCH 00/20] function_graph: Allow multiple users for function graph tracing

2024-05-26 Thread Steven Rostedt
On Mon, 27 May 2024 09:37:47 +0900 Masami Hiramatsu (Google) wrote: > > The diff between this and Masami's last update is at the end of this email. > > > > Thanks for update the patches! > I think your changes are good. I just have some comments and replied. > So, the plan is to push this ser

Re: [PATCH 04/20] function_graph: Allow multiple users to attach to function graph

2024-05-26 Thread Steven Rostedt
On Mon, 27 May 2024 09:34:36 +0900 Masami Hiramatsu (Google) wrote: > > @@ -110,11 +253,13 @@ void ftrace_graph_stop(void) > > /* Add a function return address to the trace stack on thread info.*/ > > static int > > ftrace_push_return_trace(unsigned long ret, unsigned long func, > > -

Re: [PATCH 00/20] function_graph: Allow multiple users for function graph tracing

2024-05-26 Thread Google
On Fri, 24 May 2024 22:36:52 -0400 Steven Rostedt wrote: > [ > Resend for some of you as I missed a comma in the Cc and > quilt died sending this out. > ] > > This is a continuation of the function graph multi user code. > I wrote a proof of concept back in 2019 of this code[1] and > Masami

Re: [PATCH 04/20] function_graph: Allow multiple users to attach to function graph

2024-05-26 Thread Google
On Fri, 24 May 2024 22:36:56 -0400 Steven Rostedt wrote: > From: "Steven Rostedt (VMware)" > > Allow for multiple users to attach to function graph tracer at the same > time. Only 16 simultaneous users can attach to the tracer. This is because > there's an array that stores the pointers to the

Re: [PATCH 20/20] function_graph: Use bitmask to loop on fgraph entry

2024-05-26 Thread Steven Rostedt
On Mon, 27 May 2024 09:09:49 +0900 Masami Hiramatsu (Google) wrote: > > Note, we do not care about races. If a bit is set before the gops is > > assigned, it only wastes time looking at the element and ignoring it (as > > it did before this bitmask is added). > > This is OK because anyway we c

Re: [PATCH 19/20] function_graph: Use for_each_set_bit() in __ftrace_return_to_handler()

2024-05-26 Thread Steven Rostedt
On Mon, 27 May 2024 09:04:34 +0900 Masami Hiramatsu (Google) wrote: > > bitmap = get_bitmap_bits(current, offset); > > - for (i = 0; i < FGRAPH_ARRAY_SIZE; i++) { > > + > > + for_each_set_bit(i, &bitmap, sizeof(bitmap) * BITS_PER_BYTE) { > > struct fgraph_ops *gops = fgraph_ar

Re: [PATCH 20/20] function_graph: Use bitmask to loop on fgraph entry

2024-05-26 Thread Google
On Fri, 24 May 2024 22:37:12 -0400 Steven Rostedt wrote: > From: "Steven Rostedt (Google)" > > Instead of looping through all the elements of fgraph_array[] to see if > there's an gops attached to one and then calling its gops->func(). Create > a fgraph_array_bitmask that sets bits when an inde

Re: [PATCH 19/20] function_graph: Use for_each_set_bit() in __ftrace_return_to_handler()

2024-05-26 Thread Google
On Fri, 24 May 2024 22:37:11 -0400 Steven Rostedt wrote: > From: "Steven Rostedt (Google)" > > Instead of iterating through the entire fgraph_array[] and seeing if one > of the bitmap bits are set to know to call the array's retfunc() function, > use for_each_set_bit() on the bitmap itself. Thi

Re: [PATCH 19/20] function_graph: Use for_each_set_bit() in __ftrace_return_to_handler()

2024-05-26 Thread Google
On Fri, 24 May 2024 22:37:11 -0400 Steven Rostedt wrote: > From: "Steven Rostedt (Google)" > > Instead of iterating through the entire fgraph_array[] and seeing if one > of the bitmap bits are set to know to call the array's retfunc() function, > use for_each_set_bit() on the bitmap itself. Thi

Re: [PATCH] ftrace: Fix stack trace entry generated by ftrace_pid_func()

2024-05-26 Thread Google
/github.com/intel-lab-lkp/linux/commits/Tatsuya-S/ftrace-Fix-stack-trace-entry-generated-by-ftrace_pid_func/20240526-193149 > base: linus/master > patch link: > https://lore.kernel.org/r/20240526112658.46740-1-tatsuya.s2862%40gmail.com > patch subject: [PATCH] ftrace: Fix stack t

Re: [PATCH] tracing/probes: fix error check in parse_btf_field()

2024-05-26 Thread Google
On Sun, 26 May 2024 14:27:56 +0200 Carlos López wrote: > > Hi, > > On 26/5/24 12:17, Masami Hiramatsu (Google) wrote: > > On Sat, 25 May 2024 20:21:32 +0200 > > Carlos López wrote: > > > >> btf_find_struct_member() might return NULL or an error via the > >> ERR_PTR() macro. However, its calle

[PATCH] nvdimm: add missing MODULE_DESCRIPTION() macros

2024-05-26 Thread Jeff Johnson
d_driver(nd_pmem_driver); MODULE_AUTHOR("Ross Zwisler "); +MODULE_DESCRIPTION("NVDIMM Persistent Memory Driver"); MODULE_LICENSE("GPL v2"); --- base-commit: 416ff45264d50a983c3c0b99f0da6ee59f9acd68 change-id: 20240526-md-drivers-nvdimm-121215a4b93f

[PATCH RESEND] nvdimm: add missing MODULE_DESCRIPTION() macros

2024-05-26 Thread Jeff Johnson
d_driver(nd_pmem_driver); MODULE_AUTHOR("Ross Zwisler "); +MODULE_DESCRIPTION("NVDIMM Persistent Memory Driver"); MODULE_LICENSE("GPL v2"); --- base-commit: 416ff45264d50a983c3c0b99f0da6ee59f9acd68 change-id: 20240526-md-drivers-nvdimm-121215a4b93f -- Jeff Johnson

[PATCH] testing: nvdimm: iomap: add MODULE_DESCRIPTION()

2024-05-26 Thread Jeff Johnson
aluate_dsm); +MODULE_DESCRIPTION("NVDIMM unit test"); MODULE_LICENSE("GPL v2"); --- base-commit: 416ff45264d50a983c3c0b99f0da6ee59f9acd68 change-id: 20240526-md-testing-nvdimm-02b9402677a6

Re: [PATCH] ftrace: Fix stack trace entry generated by ftrace_pid_func()

2024-05-26 Thread kernel test robot
note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Tatsuya-S/ftrace-Fix-stack-trace-entry-generated-by-ftrace_pid_func/20240526-193149 bas

Re: [PATCH] tracing/probes: fix error check in parse_btf_field()

2024-05-26 Thread Carlos López
Hi, On 26/5/24 12:17, Masami Hiramatsu (Google) wrote: On Sat, 25 May 2024 20:21:32 +0200 Carlos López wrote: btf_find_struct_member() might return NULL or an error via the ERR_PTR() macro. However, its caller in parse_btf_field() only checks for the NULL condition. Fix this by using IS_ERR

[PATCH] ftrace: Fix stack trace entry generated by ftrace_pid_func()

2024-05-26 Thread Tatsuya S
On setting set_ftrace_pid, a extra entry generated by ftrace_pid_func() is shown on stack trace(CONFIG_UNWINDER_FRAME_POINTER=y). [004] .68.459382: => 0xa00090af => ksys_read => __x64_sys_read => x64_sys_call => do_syscall_64 => entry_SYSCALL_64_after_hwframe To res

Re: [PATCH] tracing/probes: fix error check in parse_btf_field()

2024-05-26 Thread Google
On Sat, 25 May 2024 20:21:32 +0200 Carlos López wrote: > btf_find_struct_member() might return NULL or an error via the > ERR_PTR() macro. However, its caller in parse_btf_field() only checks > for the NULL condition. Fix this by using IS_ERR() and returning the > error up the stack. > Thanks f

[PATCH 3/3] tracing/kprobe: Remove cleanup code unrelated to selftest

2024-05-26 Thread Masami Hiramatsu (Google)
From: Masami Hiramatsu (Google) This cleanup all kprobe events code is not related to the selftest itself, and it can fail by the reason unrelated to this test. If the test is successful, the generated events are cleaned up. And if not, we cannot guarantee that the kprobe events will work correct

[PATCH 2/3] tracing/kprobe: Remove unneeded WARN_ON_ONCE() in selftests

2024-05-26 Thread Masami Hiramatsu (Google)
From: Masami Hiramatsu (Google) Since the kprobe-events selftest shows OK or NG with the reason, the WARN_ON_ONCE()s for each place are redundant. Let's remove it. Signed-off-by: Masami Hiramatsu (Google) --- kernel/trace/trace_kprobe.c | 26 +- 1 file changed, 13 ins

[PATCH 1/3] tracing: Build event generation tests only as modules

2024-05-26 Thread Masami Hiramatsu (Google)
From: Masami Hiramatsu (Google) Since the kprobes and synth event generation tests adds and enable generated events in init_module() and delete it in exit_module(), if we make it as built-in, those events are left in kernel and cause kprobe event self-test failure. [ 97.349708] [ c

[PATCH 0/3] tracing: Fix some selftest issues

2024-05-26 Thread Masami Hiramatsu (Google)
Hi, Here is a series of some fixes/improvements for the test modules and boot time selftest of kprobe events. I found a WARNING message with some boot time selftest configuration, which came from the combination of embedded kprobe generate API tests module and ftrace boot-time selftest. So the ma