From 60948de1ef976aabaa3630707bcc8b5867508507 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 26 Aug 2010 10:58:36 -0700 Subject: Fix stack noinline Certain function must never be automatically inlined by gcc because they are stack heavy or called recursively. This patch flags all such functions I've found as 'noinline' to prevent gcc from making the optimization. Signed-off-by: Brian Behlendorf --- lib/libzpool/include/sys/zfs_context.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib/libzpool') diff --git a/lib/libzpool/include/sys/zfs_context.h b/lib/libzpool/include/sys/zfs_context.h index 55b117c21..f2776566c 100644 --- a/lib/libzpool/include/sys/zfs_context.h +++ b/lib/libzpool/include/sys/zfs_context.h @@ -75,6 +75,12 @@ extern "C" { #include #include +/* + * Stack + */ + +#define noinline __attribute__((noinline)) + /* * Debugging */ -- cgit v1.2.3