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

Rostislav Pehlivanov atomnuker at gmail.com
Wed Apr 12 23:10:22 EEST 2017


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
+
 #ifndef av_extern_inline
 #if defined(__ICL) && __ICL >= 1210 || defined(__GNUC_STDC_INLINE__)
 #    define av_extern_inline extern inline
diff --git a/libavutil/version.h b/libavutil/version.h
index bba39e0180..90d9137e08 100644
--- a/libavutil/version.h
+++ b/libavutil/version.h
@@ -79,7 +79,7 @@
  */
 
 #define LIBAVUTIL_VERSION_MAJOR  55
-#define LIBAVUTIL_VERSION_MINOR  61
+#define LIBAVUTIL_VERSION_MINOR  62
 #define LIBAVUTIL_VERSION_MICRO 100
 
 #define LIBAVUTIL_VERSION_INT   AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
-- 
2.12.2.762.g0e3151a226



More information about the ffmpeg-devel mailing list