[Skiboot] [PATCH] core/test/run-trace: Reduce number of samples when running under valgrind
Stewart Smith
stewart at linux.vnet.ibm.com
Tue Mar 7 17:45:53 AEDT 2017
Stewart Smith <stewart at linux.vnet.ibm.com> writes:
> This reduces 'make check' run time by ~10 seconds on my laptop,
> and just the run-trace test itself takes 15 seconds less (under valgrind).
>
> Signed-off-by: Stewart Smith <stewart at linux.vnet.ibm.com>
Too tempting to not just immediately merge. Merged to master as of 65561f0e9362d6373afbc62de510720b76c238e0
> ---
> core/test/run-trace.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/core/test/run-trace.c b/core/test/run-trace.c
> index fa8a30b12a5a..980168868680 100644
> --- a/core/test/run-trace.c
> +++ b/core/test/run-trace.c
> @@ -26,6 +26,8 @@
> #include <sys/types.h>
> #include <sys/wait.h>
>
> +#include <valgrind/valgrind.h>
> +
> /* Don't include these: PPC-specific */
> #define __CPU_H
> #define __TIME_H
> @@ -130,7 +132,7 @@ static struct cpu_thread *this_cpu(void)
> }
>
> #include <sys/mman.h>
> -#define PER_CHILD_TRACES (1024*1024)
> +#define PER_CHILD_TRACES ((RUNNING_ON_VALGRIND) ? (1024*16) : (1024*1024))
>
> static void write_trace_entries(int id)
> {
> --
> 2.9.3
>
--
Stewart Smith
OPAL Architect, IBM.
More information about the Skiboot
mailing list