• Clément Bœsch's avatar
    checkasm: use perf API on Linux ARM* · e0d56f09
    Clément Bœsch authored
    On ARM platforms, accessing the PMU registers requires special user
    access permissions. Since there is no other way to get accurate timers,
    the current implementation of timers in FFmpeg rely on these registers.
    Unfortunately, enabling user access to these registers on Linux is not
    trivial, and generally involve compiling a random and unreliable github
    kernel module, or patching somehow your kernel.
    
    Such module is very unlikely to reach the upstream anytime soon. Quoting
    Robin Murphin from ARM:
    
    > Say you do give userspace direct access to the PMU; now run two or more
    > programs at once that believe they can use the counters for their own
    > "minimal-overhead" profiling. Have fun interpreting those results...
    >
    > And that's not even getting into the implications of scheduling across
    > different CPUs, CPUidle, etc. where the PMU state is completely beyond
    > userspace's control. In general, the plan to provide userspace with
    > something which might happen to just about work in a few corner cases,
    > but is meaningless, misleading or downright broken in all others, is to
    > never do so.
    
    As a result, the alternative is to use the Performance Monitoring Linux
    API which makes use of these registers internally (assuming the PMU of
    your ARM board is supported in the kernel, which is definitely not a
    given...).
    
    While the Linux API is obviously cross platform, it does have a
    significant overhead which needs to be taken into account. As a result,
    that mode is only weakly enabled on ARM platforms exclusively.
    
    Note on the non flexibility of the implementation: the timers (native
    FFmpeg vs Linux API) are selected at compilation time to prevent the
    need of function calls, which would result in a negative impact on the
    cycle counters.
    e0d56f09
Name
Last commit
Last update
compat Loading commit data...
doc Loading commit data...
ffbuild Loading commit data...
libavcodec Loading commit data...
libavdevice Loading commit data...
libavfilter Loading commit data...
libavformat Loading commit data...
libavresample Loading commit data...
libavutil Loading commit data...
libpostproc Loading commit data...
libswresample Loading commit data...
libswscale Loading commit data...
presets Loading commit data...
tests Loading commit data...
tools Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.travis.yml Loading commit data...
CONTRIBUTING.md Loading commit data...
COPYING.GPLv2 Loading commit data...
COPYING.GPLv3 Loading commit data...
COPYING.LGPLv2.1 Loading commit data...
COPYING.LGPLv3 Loading commit data...
CREDITS Loading commit data...
Changelog Loading commit data...
INSTALL.md Loading commit data...
LICENSE.md Loading commit data...
MAINTAINERS Loading commit data...
Makefile Loading commit data...
README.md Loading commit data...
RELEASE Loading commit data...
cmdutils.c Loading commit data...
cmdutils.h Loading commit data...
cmdutils_opencl.c Loading commit data...
configure Loading commit data...
ffmpeg.c Loading commit data...
ffmpeg.h Loading commit data...
ffmpeg_cuvid.c Loading commit data...
ffmpeg_filter.c Loading commit data...
ffmpeg_hw.c Loading commit data...
ffmpeg_opt.c Loading commit data...
ffmpeg_qsv.c Loading commit data...
ffmpeg_videotoolbox.c Loading commit data...
ffplay.c Loading commit data...
ffprobe.c Loading commit data...
ffserver.c Loading commit data...
ffserver_config.c Loading commit data...
ffserver_config.h Loading commit data...