s390 (6/6): oprofile for s390.
Quoted 8 lines · Martin Schwidefsky
Quoted 3 lines
Quoted 1 line
+#if
defined(CONFIG_OPROFILE)||defined(CONFIG_OPROFILE_MODULE)this must depend on
CONFIG_PROFILING?Currently oprofile is the only profiling method implemented for s390. So this doesn't really change much. But in principle you are right, as soon as a second profiling method gets added this would have to be changed to
CONFIG_PROFILING.
No, it should already be changed now, because the code is also needed for readprofile. CONFIG_PROFILING should enable the generic profiling code here, even if CONFIG_OPROFILE is not set.
Note that the identical code on i386 is always compiled in, regardless of CONFIG_PROFILING and CONFIG_OPROFILE.
Arnd <><
===
Enable basic profiling code on s390 depending on CONFIG_PROFILING, not CONFIG_OPROFILE.
===== arch/s390/kernel/time.c 1.25 vs edited =====
arch/s390/kernel/time.c +2 -2
@@ -179,7 +179,7 @@#endif /* CONFIG_ARCH_S390X */ -#if defined(CONFIG_OPROFILE ) || defined(CONFIG_OPROFILE_MODULE ) +#ifdef CONFIG_PROFILING extern char _stext, _etext;/*
@@ -223,7 +223,7 @@ }#else #define s390_do_profile (regs) do { ; } while(0) -#endif /* CONFIG_OPROFILE */ +#endif /* CONFIG_PROFILING */ /*
===== arch/s390/oprofile/Kconfig 1.1 vs edited =====
arch/s390/oprofile/Kconfig +2 -2
@@ -5,8 +5,8 @@ config PROFILING bool "Profiling support (EXPERIMENTAL)" help - Say Y here to enable the extended profiling support mechanisms used - by profilers such as OProfile. + Say Y here to enable profiling support mechanisms used by + profilers such as readprofile or OProfile. config OPROFILE