[sheepdog] [PATCH 2/4] logger: prohibit inlining sd_backtrace

MORITA Kazutaka morita.kazutaka at lab.ntt.co.jp
Wed Feb 27 18:15:36 CET 2013


This is necessary because sd_backtrace assumes that the top of the
stack frames belongs to itself.

Signed-off-by: MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp>
---
 lib/logger.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/logger.c b/lib/logger.c
index 0dd9422..a29eaaa 100644
--- a/lib/logger.c
+++ b/lib/logger.c
@@ -629,6 +629,7 @@ notrace void get_thread_name(char *name)
 
 #define SD_MAX_STACK_DEPTH 1024
 
+__attribute__ ((__noinline__))
 notrace void sd_backtrace(void)
 {
 	void *addrs[SD_MAX_STACK_DEPTH];
-- 
1.8.1.3.566.gaa39828




More information about the sheepdog mailing list