[FFmpeg-devel] [PATCH] checkasm: Test whether direct cycle counter access works
Rémi Denis-Courmont
remi at remlab.net
Thu Jan 11 16:45:59 EET 2024
Le torstaina 11. tammikuuta 2024, 16.15.29 EET Martin Storsjö a écrit :
> > AV_READ_TIME() reads time, not cycles.
>
> Right, I can adjust the wording. Exactly what kind of measurement
> AV_READ_TIME returns varies between architectures and environments indeed.
In practice, yes, but I would argue that it's a bug if it does not measure
time. At the very least because, the name is extremely misleading.
> What about:
>
> checkasm: unable to execute platform specific timer
>
> > If we want cycle count, then we should add a separate macro, as the two
> > are different performance counters at least on RISC-V.
>
> That's not what I try to do here, I just want to test whether the timer,
> whatever we have in AV_READ_TIME, is usable.
Sure, I can live with that, but I thought that checkasm actually prefered to
measure cycles than time periods.
> > As things stand, this code won't do anything on RISC-V, sinec
> > AV_READ_TIME() actually reads, well, time, not cycles.
>
> Should I interpret this, as, the current AV_READ_TIME implementation on
> RISC-V always succeeds, contrary to the previous implementation (with
> rdcycle) which is unavailable on some systems, referencing
> 05115a77e012331b6ff5e24bab40e75848447c62?
Yes.
--
雷米‧德尼-库尔蒙
http://www.remlab.net/
More information about the ffmpeg-devel
mailing list