From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by dpdk.org (Postfix) with ESMTP id EAC9E2935 for ; Fri, 5 May 2017 15:18:33 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id A070B20D14; Fri, 5 May 2017 09:18:33 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute1.internal (MEProxy); Fri, 05 May 2017 09:18:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:date:from:in-reply-to:message-id:references:subject:to :x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=a53 J4I/ztzofcYaj+62FCYnwK3uEP8UBBhcrIgT2+mo=; b=NCgmAXh7uQWb/ZpaK/3 hcotfwE9iYpVsdFRlSlmFu3poIFe3Vc++wNc18gC/W2Ic9Hvl2rpAtKeRkPX5V34 Sbhp5/E4PMc/444rX4nLT0nTb42GiH+7jPrt6MdCW4ZP2VSahhPOW0Rr83qOo1h+ 4NTorDRzYN7Cfcr+0rGOOg9Y= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:date:from:in-reply-to:message-id :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc :x-sasl-enc; s=fm1; bh=a53J4I/ztzofcYaj+62FCYnwK3uEP8UBBhcrIgT2+ mo=; b=l5Og8/2/I4s1/lEadHnBS+1BwSfyNgrMS9NgoLVKmPVZGzlcFl/9NpTT9 NTs0YX+Kcc5YCe0ZnIH1O0FNidgfVbtnh4pwT66DNYleGabNEuIXX5zeuEEgXOTz X7tVWt5N2MVAAHqi9MQYDmmnjmYTOHJomjXhyrkqD4XwOfFieammytG/unoly0wX 4877wYQ56AdQkQ+5DWeJ4Sr/gk7KzBSVLNCLa5xXOwYH8glGQQamC+maDPLmIWzw Wh2CiULqXlxiDyUFNI6Uq0MtN0VQEm31M4B3Pgpm/n+bjB/PBt4ZYwWbdPjy/7l/ BrSSTqlwINhWsN6P4FxBMWKRIgTYQ== X-ME-Sender: X-Sasl-enc: KzA2BzAQJqwnD3Up0MknKhFwvekqEIeGjE53Q/gcAK0I 1493990313 Received: from xps.monjalon.net (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 2478B7E3A4; Fri, 5 May 2017 09:18:33 -0400 (EDT) From: Thomas Monjalon To: Wei Dai Cc: dev@dpdk.org Date: Fri, 5 May 2017 15:18:27 +0200 Message-Id: <20170505131827.25599-3-thomas@monjalon.net> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170505131827.25599-1-thomas@monjalon.net> References: <1489395568-4664-1-git-send-email-wei.dai@intel.com> <20170505131827.25599-1-thomas@monjalon.net> Subject: [dpdk-dev] [PATCH v3 2/2] config: make backtrace optional X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 May 2017 13:18:34 -0000 From: Wei Dai When building DPDK with musl, there is need not to disable backtrace to remove some references to execinfo.h which is not supported by musl now. This also applies to some other libc implementation which doesn't support backtrace() and backtrace_symbols(). musl is an implementation of the userspace portion of the standard library functionality described in the ISO C and POSIX standards, plus common extensions. Got more details about musl from http://www.musl-libc.org . Signed-off-by: Wei Dai Signed-off-by: Thomas Monjalon --- config/common_base | 1 + lib/librte_eal/bsdapp/eal/eal_debug.c | 4 ++++ lib/librte_eal/linuxapp/eal/eal_debug.c | 4 ++++ 3 files changed, 9 insertions(+) diff --git a/config/common_base b/config/common_base index 93e923507..8907bea36 100644 --- a/config/common_base +++ b/config/common_base @@ -96,6 +96,7 @@ CONFIG_RTE_MAX_TAILQ=32 CONFIG_RTE_LOG_LEVEL=RTE_LOG_INFO CONFIG_RTE_LOG_DP_LEVEL=RTE_LOG_INFO CONFIG_RTE_LOG_HISTORY=256 +CONFIG_RTE_BACKTRACE=y CONFIG_RTE_LIBEAL_USE_HPET=n CONFIG_RTE_EAL_ALLOW_INV_SOCKET_ID=n CONFIG_RTE_EAL_ALWAYS_PANIC_ON_ERROR=n diff --git a/lib/librte_eal/bsdapp/eal/eal_debug.c b/lib/librte_eal/bsdapp/eal/eal_debug.c index 5fbc17c59..e1c755482 100644 --- a/lib/librte_eal/bsdapp/eal/eal_debug.c +++ b/lib/librte_eal/bsdapp/eal/eal_debug.c @@ -31,7 +31,9 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#ifdef RTE_BACKTRACE #include +#endif #include #include #include @@ -47,6 +49,7 @@ /* dump the stack of the calling core */ void rte_dump_stack(void) { +#ifdef RTE_BACKTRACE void *func[BACKTRACE_SIZE]; char **symb = NULL; int size; @@ -64,6 +67,7 @@ void rte_dump_stack(void) } free(symb); +#endif /* RTE_BACKTRACE */ } /* not implemented in this environment */ diff --git a/lib/librte_eal/linuxapp/eal/eal_debug.c b/lib/librte_eal/linuxapp/eal/eal_debug.c index 5fbc17c59..e1c755482 100644 --- a/lib/librte_eal/linuxapp/eal/eal_debug.c +++ b/lib/librte_eal/linuxapp/eal/eal_debug.c @@ -31,7 +31,9 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#ifdef RTE_BACKTRACE #include +#endif #include #include #include @@ -47,6 +49,7 @@ /* dump the stack of the calling core */ void rte_dump_stack(void) { +#ifdef RTE_BACKTRACE void *func[BACKTRACE_SIZE]; char **symb = NULL; int size; @@ -64,6 +67,7 @@ void rte_dump_stack(void) } free(symb); +#endif /* RTE_BACKTRACE */ } /* not implemented in this environment */ -- 2.12.2