← Back to team overview

maria-developers team mailing list archive

Re: MDEV-8692 prefschema test failures on ARM (on Debian build system)

 

Hi, Alexander!

On Oct 23, Alexander Barkov wrote:
> Hi,
> 
> - the variant with MY_PERF_CYCLES generally works, but does not fix the 
> test failure.

What do you mean by that? How does it "work" if it does not fix the
test failure?

> - the variant with MY_CLOCK_REALTIME_FOR_CYCLES works fine
> and fixed the problem.
> 
> But it's not really "CYCLES". Perhaps this is not a problem,
> because on some other platforms we also fallback cycles to nanoseconds,

That commit 49667f0 falls back from cycles to nanoseconds explicitly.
So it's ok not to support cycles, as far as I understand, and there's no
need to do nanoseconds in place of cycles like your
MY_CLOCK_REALTIME_FOR_CYCLES.

By the way, why 49667f0 didn't fix the problem? What happens on ARMv7 -
no 'cycles' timer at all in perfschema, or there is one and it works
incorrectly?

> diff --git a/mysql-test/suite/perfschema/t/func_file_io.test b/mysql-test/suite/perfschema/t/func_file_io.test
> index 2055fa9..5894cb0 100644
> --- a/mysql-test/suite/perfschema/t/func_file_io.test
> +++ b/mysql-test/suite/perfschema/t/func_file_io.test
> @@ -43,6 +43,11 @@ TRUNCATE TABLE performance_schema.events_waits_current;
>  
>  SELECT * FROM t1 WHERE id = 1;
>  
> +--vertical_results
> +SELECT * FROM performance_schema.events_waits_history_long
> +WHERE EVENT_NAME = 'wait/io/file/myisam/dfile';
> +--horizontal_results

forgotten debug output?

> +
>  SET @before_count = (SELECT SUM(TIMER_WAIT)
>                       FROM performance_schema.events_waits_history_long
>                       WHERE (EVENT_NAME = 'wait/io/file/myisam/dfile')
> diff --git a/mysys/my_rdtsc.c b/mysys/my_rdtsc.c
> index 028c7f8..a5ed808 100644
> --- a/mysys/my_rdtsc.c
> +++ b/mysys/my_rdtsc.c
> @@ -533,6 +590,10 @@ void my_timer_init(MY_TIMER_INFO *mti)
>    mti->cycles.routine= MY_TIMER_ROUTINE_ASM_GCC_SPARC32;
>  #elif defined(__sgi) && defined(HAVE_CLOCK_GETTIME) && defined(CLOCK_SGI_CYCLE)
>    mti->cycles.routine= MY_TIMER_ROUTINE_SGI_CYCLE;
> +#elif defined(MY_CLOCK_REALTIME_FOR_CYCLES)
> +  mti->cycles.routine= MY_TIMER_ROUTINE_CLOCK_GETTIME;
> +#elif defined(MY_PERF_CYCLES)
> +  mti->cycles.routine= MY_TIMER_ROUTINE_SGI_CYCLE;

I'd say that if we'll have it pushed, you'll need to add a dedicated
MY_TIMER_ROUTINE_xxx for this, not reuse MY_TIMER_ROUTINE_SGI_CYCLE.

>  #elif defined(HAVE_SYS_TIMES_H) && defined(HAVE_GETHRTIME)
>    mti->cycles.routine= MY_TIMER_ROUTINE_GETHRTIME;
>  #else

Regards,
Sergei