Message ID | 20170307052531.20826-1-stewart@linux.vnet.ibm.com |
---|---|
State | Accepted |
Headers | show |
Stewart Smith <stewart@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@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 >
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) {
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@linux.vnet.ibm.com> --- core/test/run-trace.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)