[FFmpeg-devel] [PATCH] lavu/attributes: add av_never_inline macro

Muhammad Faiz mfcc64 at gmail.com
Wed Apr 12 23:39:54 EEST 2017


On Thu, Apr 13, 2017 at 3:10 AM, Rostislav Pehlivanov
<atomnuker at gmail.com> wrote:
> Very useful for determining hot functions without recompiling everything
> with inlining disabled.
>
> Signed-off-by: Rostislav Pehlivanov <atomnuker at gmail.com>
> ---
>  libavutil/attributes.h | 10 ++++++++++
>  libavutil/version.h    |  2 +-
>  2 files changed, 11 insertions(+), 1 deletion(-)
>
> diff --git a/libavutil/attributes.h b/libavutil/attributes.h
> index 54d1901116..d62f54a834 100644
> --- a/libavutil/attributes.h
> +++ b/libavutil/attributes.h
> @@ -44,6 +44,16 @@
>  #endif
>  #endif
>
> +#ifndef av_never_inline
> +#if AV_GCC_VERSION_AT_LEAST(3,1)
> +#    define av_never_inline __attribute__((noinline))
> +#elif defined(_MSC_VER)
> +#    define av_never_inline __declspec(noinline)
> +#else
> +#    define av_never_inline
> +#endif
> +#endif

av_noinline has been already here.

thanks.


More information about the ffmpeg-devel mailing list