* [PATCH 0/2] ftrace/samples: fix ftrace direct multi config option + s390 support @ 2021-11-15 19:56 Heiko Carstens 2021-11-15 19:56 ` [PATCH 1/2] ftrace/samples: add missing Kconfig option for ftrace direct multi sample Heiko Carstens ` (2 more replies) 0 siblings, 3 replies; 8+ messages in thread From: Heiko Carstens @ 2021-11-15 19:56 UTC (permalink / raw) To: Steven Rostedt; +Cc: linux-s390, linux-kernel, Jiri Olsa, Heiko Carstens Hi Steven, two patches for ftrace direct multi sample: - fix ftrace direct multi sample config option handling, required because of an incorrect merge resolution proposed by me. - add s390 support for ftrace direct multi sample If you are happy with them, I could carry with the s390 tree and target for rc2, or you could pick them up. Whatever you prefer. Thanks, Heiko Heiko Carstens (2): ftrace/samples: add missing Kconfig option for ftrace direct multi sample ftrace/samples: add s390 support for ftrace direct multi sample arch/s390/Kconfig | 1 + arch/x86/Kconfig | 2 +- samples/Kconfig | 11 +++++++++- samples/Makefile | 2 +- samples/ftrace/Makefile | 2 +- samples/ftrace/ftrace-direct-multi.c | 30 ++++++++++++++++++++++++++++ 6 files changed, 44 insertions(+), 4 deletions(-) -- 2.25.1 ^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/2] ftrace/samples: add missing Kconfig option for ftrace direct multi sample 2021-11-15 19:56 [PATCH 0/2] ftrace/samples: fix ftrace direct multi config option + s390 support Heiko Carstens @ 2021-11-15 19:56 ` Heiko Carstens 2021-11-16 22:43 ` Steven Rostedt 2021-11-15 19:56 ` [PATCH 2/2] ftrace/samples: add s390 support " Heiko Carstens 2021-11-16 22:45 ` [PATCH 0/2] ftrace/samples: fix ftrace direct multi config option + s390 support Steven Rostedt 2 siblings, 1 reply; 8+ messages in thread From: Heiko Carstens @ 2021-11-15 19:56 UTC (permalink / raw) To: Steven Rostedt; +Cc: linux-s390, linux-kernel, Jiri Olsa, Heiko Carstens Currently it is not possible to build the ftrace direct multi example anymore due to broken config dependencies. Fix this by adding SAMPLE_FTRACE_DIRECT_MULTI config option. This broke when merging s390-5.16-1 due to an incorrect merge conflict resolution proposed by me. Also rename SAMPLE_FTRACE_MULTI_DIRECT to SAMPLE_FTRACE_DIRECT_MULTI so it matches the module name. Fixes: 0b707e572a19 ("Merge tag 's390-5.16-1' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux") Signed-off-by: Heiko Carstens <hca@linux.ibm.com> --- arch/x86/Kconfig | 2 +- samples/Kconfig | 11 ++++++++++- samples/Makefile | 2 +- samples/ftrace/Makefile | 2 +- 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 95dd1ee01546..7399327d1eff 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -193,7 +193,7 @@ config X86 select HAVE_DYNAMIC_FTRACE_WITH_ARGS if X86_64 select HAVE_DYNAMIC_FTRACE_WITH_DIRECT_CALLS select HAVE_SAMPLE_FTRACE_DIRECT if X86_64 - select HAVE_SAMPLE_FTRACE_MULTI_DIRECT if X86_64 + select HAVE_SAMPLE_FTRACE_DIRECT_MULTI if X86_64 select HAVE_EBPF_JIT select HAVE_EFFICIENT_UNALIGNED_ACCESS select HAVE_EISA diff --git a/samples/Kconfig b/samples/Kconfig index bec3528aa2de..43d2e9aa557f 100644 --- a/samples/Kconfig +++ b/samples/Kconfig @@ -31,6 +31,15 @@ config SAMPLE_FTRACE_DIRECT This builds an ftrace direct function example that hooks to wake_up_process and prints the parameters. +config SAMPLE_FTRACE_DIRECT_MULTI + tristate "Build register_ftrace_direct_multi() example" + depends on DYNAMIC_FTRACE_WITH_DIRECT_CALLS && m + depends on HAVE_SAMPLE_FTRACE_DIRECT_MULTI + help + This builds an ftrace direct function example + that hooks to wake_up_process and schedule, and prints + the function addresses. + config SAMPLE_TRACE_ARRAY tristate "Build sample module for kernel access to Ftrace instancess" depends on EVENT_TRACING && m @@ -237,5 +246,5 @@ endif # SAMPLES config HAVE_SAMPLE_FTRACE_DIRECT bool -config HAVE_SAMPLE_FTRACE_MULTI_DIRECT +config HAVE_SAMPLE_FTRACE_DIRECT_MULTI bool diff --git a/samples/Makefile b/samples/Makefile index b7b98307c2b4..4bcd6b93bffa 100644 --- a/samples/Makefile +++ b/samples/Makefile @@ -22,7 +22,7 @@ subdir-$(CONFIG_SAMPLE_TIMER) += timers obj-$(CONFIG_SAMPLE_TRACE_EVENTS) += trace_events/ obj-$(CONFIG_SAMPLE_TRACE_PRINTK) += trace_printk/ obj-$(CONFIG_SAMPLE_FTRACE_DIRECT) += ftrace/ -obj-$(CONFIG_SAMPLE_FTRACE_MULTI_DIRECT) += ftrace/ +obj-$(CONFIG_SAMPLE_FTRACE_DIRECT_MULTI) += ftrace/ obj-$(CONFIG_SAMPLE_TRACE_ARRAY) += ftrace/ subdir-$(CONFIG_SAMPLE_UHID) += uhid obj-$(CONFIG_VIDEO_PCI_SKELETON) += v4l/ diff --git a/samples/ftrace/Makefile b/samples/ftrace/Makefile index e8a3f8520a44..b9198e2eef28 100644 --- a/samples/ftrace/Makefile +++ b/samples/ftrace/Makefile @@ -3,7 +3,7 @@ obj-$(CONFIG_SAMPLE_FTRACE_DIRECT) += ftrace-direct.o obj-$(CONFIG_SAMPLE_FTRACE_DIRECT) += ftrace-direct-too.o obj-$(CONFIG_SAMPLE_FTRACE_DIRECT) += ftrace-direct-modify.o -obj-$(CONFIG_SAMPLE_FTRACE_MULTI_DIRECT) += ftrace-direct-multi.o +obj-$(CONFIG_SAMPLE_FTRACE_DIRECT_MULTI) += ftrace-direct-multi.o CFLAGS_sample-trace-array.o := -I$(src) obj-$(CONFIG_SAMPLE_TRACE_ARRAY) += sample-trace-array.o -- 2.25.1 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] ftrace/samples: add missing Kconfig option for ftrace direct multi sample 2021-11-15 19:56 ` [PATCH 1/2] ftrace/samples: add missing Kconfig option for ftrace direct multi sample Heiko Carstens @ 2021-11-16 22:43 ` Steven Rostedt 0 siblings, 0 replies; 8+ messages in thread From: Steven Rostedt @ 2021-11-16 22:43 UTC (permalink / raw) To: Heiko Carstens; +Cc: linux-s390, linux-kernel, Jiri Olsa On Mon, 15 Nov 2021 20:56:13 +0100 Heiko Carstens <hca@linux.ibm.com> wrote: > Currently it is not possible to build the ftrace direct multi example > anymore due to broken config dependencies. Fix this by adding > SAMPLE_FTRACE_DIRECT_MULTI config option. > > This broke when merging s390-5.16-1 due to an incorrect merge conflict > resolution proposed by me. > > Also rename SAMPLE_FTRACE_MULTI_DIRECT to SAMPLE_FTRACE_DIRECT_MULTI > so it matches the module name. > > Fixes: 0b707e572a19 ("Merge tag 's390-5.16-1' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux") > Signed-off-by: Heiko Carstens <hca@linux.ibm.com> > --- > Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org> -- Steve ^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 2/2] ftrace/samples: add s390 support for ftrace direct multi sample 2021-11-15 19:56 [PATCH 0/2] ftrace/samples: fix ftrace direct multi config option + s390 support Heiko Carstens 2021-11-15 19:56 ` [PATCH 1/2] ftrace/samples: add missing Kconfig option for ftrace direct multi sample Heiko Carstens @ 2021-11-15 19:56 ` Heiko Carstens 2021-11-16 22:44 ` Steven Rostedt 2021-11-16 22:45 ` [PATCH 0/2] ftrace/samples: fix ftrace direct multi config option + s390 support Steven Rostedt 2 siblings, 1 reply; 8+ messages in thread From: Heiko Carstens @ 2021-11-15 19:56 UTC (permalink / raw) To: Steven Rostedt; +Cc: linux-s390, linux-kernel, Jiri Olsa, Heiko Carstens Signed-off-by: Heiko Carstens <hca@linux.ibm.com> --- arch/s390/Kconfig | 1 + samples/ftrace/ftrace-direct-multi.c | 30 ++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig index 8857ec3b97eb..1462b8182425 100644 --- a/arch/s390/Kconfig +++ b/arch/s390/Kconfig @@ -194,6 +194,7 @@ config S390 select HAVE_RELIABLE_STACKTRACE select HAVE_RSEQ select HAVE_SAMPLE_FTRACE_DIRECT + select HAVE_SAMPLE_FTRACE_DIRECT_MULTI select HAVE_SOFTIRQ_ON_OWN_STACK select HAVE_SYSCALL_TRACEPOINTS select HAVE_VIRT_CPU_ACCOUNTING diff --git a/samples/ftrace/ftrace-direct-multi.c b/samples/ftrace/ftrace-direct-multi.c index b6d7806b400e..2fafc9afcbf0 100644 --- a/samples/ftrace/ftrace-direct-multi.c +++ b/samples/ftrace/ftrace-direct-multi.c @@ -4,6 +4,7 @@ #include <linux/mm.h> /* for handle_mm_fault() */ #include <linux/ftrace.h> #include <linux/sched/stat.h> +#include <asm/asm-offsets.h> extern void my_direct_func(unsigned long ip); @@ -14,6 +15,8 @@ void my_direct_func(unsigned long ip) extern void my_tramp(void *); +#ifdef CONFIG_X86_64 + asm ( " .pushsection .text, \"ax\", @progbits\n" " .type my_tramp, @function\n" @@ -31,6 +34,33 @@ asm ( " .popsection\n" ); +#endif /* CONFIG_X86_64 */ + +#ifdef CONFIG_S390 + +asm ( +" .pushsection .text, \"ax\", @progbits\n" +" .type my_tramp, @function\n" +" .globl my_tramp\n" +" my_tramp:" +" lgr %r1,%r15\n" +" stmg %r0,%r5,"__stringify(__SF_GPRS)"(%r15)\n" +" stg %r14,"__stringify(__SF_GPRS+8*8)"(%r15)\n" +" aghi %r15,"__stringify(-STACK_FRAME_OVERHEAD)"\n" +" stg %r1,"__stringify(__SF_BACKCHAIN)"(%r15)\n" +" lgr %r2,%r0\n" +" brasl %r14,my_direct_func\n" +" aghi %r15,"__stringify(STACK_FRAME_OVERHEAD)"\n" +" lmg %r0,%r5,"__stringify(__SF_GPRS)"(%r15)\n" +" lg %r14,"__stringify(__SF_GPRS+8*8)"(%r15)\n" +" lgr %r1,%r0\n" +" br %r1\n" +" .size my_tramp, .-my_tramp\n" +" .popsection\n" +); + +#endif /* CONFIG_S390 */ + static struct ftrace_ops direct; static int __init ftrace_direct_multi_init(void) -- 2.25.1 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] ftrace/samples: add s390 support for ftrace direct multi sample 2021-11-15 19:56 ` [PATCH 2/2] ftrace/samples: add s390 support " Heiko Carstens @ 2021-11-16 22:44 ` Steven Rostedt 2021-11-17 9:12 ` Heiko Carstens 0 siblings, 1 reply; 8+ messages in thread From: Steven Rostedt @ 2021-11-16 22:44 UTC (permalink / raw) To: Heiko Carstens; +Cc: linux-s390, linux-kernel, Jiri Olsa On Mon, 15 Nov 2021 20:56:14 +0100 Heiko Carstens <hca@linux.ibm.com> wrote: I know this is for your tree, but you really should never have an empty change log. I could think of many things to say here. The only acceptable empty change log IMHO is spelling fixes. -- Steve > Signed-off-by: Heiko Carstens <hca@linux.ibm.com> > --- > ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] ftrace/samples: add s390 support for ftrace direct multi sample 2021-11-16 22:44 ` Steven Rostedt @ 2021-11-17 9:12 ` Heiko Carstens 0 siblings, 0 replies; 8+ messages in thread From: Heiko Carstens @ 2021-11-17 9:12 UTC (permalink / raw) To: Steven Rostedt; +Cc: linux-s390, linux-kernel, Jiri Olsa On Tue, Nov 16, 2021 at 05:44:30PM -0500, Steven Rostedt wrote: > On Mon, 15 Nov 2021 20:56:14 +0100 > Heiko Carstens <hca@linux.ibm.com> wrote: > > I know this is for your tree, but you really should never have an empty > change log. I could think of many things to say here. > > The only acceptable empty change log IMHO is spelling fixes. I don't think there is much of a disagreement here, except me being lazy. I'll add a couple of words. ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 0/2] ftrace/samples: fix ftrace direct multi config option + s390 support 2021-11-15 19:56 [PATCH 0/2] ftrace/samples: fix ftrace direct multi config option + s390 support Heiko Carstens 2021-11-15 19:56 ` [PATCH 1/2] ftrace/samples: add missing Kconfig option for ftrace direct multi sample Heiko Carstens 2021-11-15 19:56 ` [PATCH 2/2] ftrace/samples: add s390 support " Heiko Carstens @ 2021-11-16 22:45 ` Steven Rostedt 2021-11-17 9:13 ` Heiko Carstens 2 siblings, 1 reply; 8+ messages in thread From: Steven Rostedt @ 2021-11-16 22:45 UTC (permalink / raw) To: Heiko Carstens; +Cc: linux-s390, linux-kernel, Jiri Olsa On Mon, 15 Nov 2021 20:56:12 +0100 Heiko Carstens <hca@linux.ibm.com> wrote: > Hi Steven, > > two patches for ftrace direct multi sample: > > - fix ftrace direct multi sample config option handling, required > because of an incorrect merge resolution proposed by me. > > - add s390 support for ftrace direct multi sample > > If you are happy with them, I could carry with the s390 tree and > target for rc2, or you could pick them up. Whatever you prefer. I'm good with you taking them through your tree. I acked the first patch as it touches my code. And the second belongs to you anyway, but I would still ask you to add some description to the change log. Cheers, -- Steve ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 0/2] ftrace/samples: fix ftrace direct multi config option + s390 support 2021-11-16 22:45 ` [PATCH 0/2] ftrace/samples: fix ftrace direct multi config option + s390 support Steven Rostedt @ 2021-11-17 9:13 ` Heiko Carstens 0 siblings, 0 replies; 8+ messages in thread From: Heiko Carstens @ 2021-11-17 9:13 UTC (permalink / raw) To: Steven Rostedt; +Cc: linux-s390, linux-kernel, Jiri Olsa On Tue, Nov 16, 2021 at 05:45:33PM -0500, Steven Rostedt wrote: > > two patches for ftrace direct multi sample: > > > > - fix ftrace direct multi sample config option handling, required > > because of an incorrect merge resolution proposed by me. > > > > - add s390 support for ftrace direct multi sample > > > > If you are happy with them, I could carry with the s390 tree and > > target for rc2, or you could pick them up. Whatever you prefer. > > I'm good with you taking them through your tree. I acked the first patch as > it touches my code. And the second belongs to you anyway, but I would still > ask you to add some description to the change log. Will do, and I'll add to the s390 tree. Thanks! ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2021-11-17 9:13 UTC | newest] Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2021-11-15 19:56 [PATCH 0/2] ftrace/samples: fix ftrace direct multi config option + s390 support Heiko Carstens 2021-11-15 19:56 ` [PATCH 1/2] ftrace/samples: add missing Kconfig option for ftrace direct multi sample Heiko Carstens 2021-11-16 22:43 ` Steven Rostedt 2021-11-15 19:56 ` [PATCH 2/2] ftrace/samples: add s390 support " Heiko Carstens 2021-11-16 22:44 ` Steven Rostedt 2021-11-17 9:12 ` Heiko Carstens 2021-11-16 22:45 ` [PATCH 0/2] ftrace/samples: fix ftrace direct multi config option + s390 support Steven Rostedt 2021-11-17 9:13 ` Heiko Carstens
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).