From patchwork Wed Jun 24 09:36:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Monjalon X-Patchwork-Id: 72103 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8B3AAA0350; Wed, 24 Jun 2020 11:36:40 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6AA191D8EE; Wed, 24 Jun 2020 11:36:40 +0200 (CEST) Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by dpdk.org (Postfix) with ESMTP id 89C071D8D4 for ; Wed, 24 Jun 2020 11:36:39 +0200 (CEST) Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id EA7955C0081; Wed, 24 Jun 2020 05:36:38 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute7.internal (MEProxy); Wed, 24 Jun 2020 05:36:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; s=fm1; bh=LJ/Q/ddL1K7DO9Ce/FZu4I3h7Z 60Ef5ShfohZ59yM1Q=; b=LbRTGWEeJ1zBcZYqgxVE0VQKbPBTRSejM/niaZAdN2 8OjTLgintpFX/gJEqvwlPQGxnD4/VBu2arsr3O9rTxTYgQ8TSLfZ355tsjMuxBt5 ARCmkW25mOrkbhf1FD7PfxtiHhRSYZGRtkkkSw74x+USyyplWnZQfIosBFxPyAr6 186e0wH8a+1AiepIcYMiJO8rzSU+wZeGwrFd+8YaFTnaaKuyrBQ853O8xVHKSBOq i1fAUlAj4xa1EYv/7Q19vZwivXoVRTqNjT0QZJn+tnZlZCZgcHY0W1Jv/rPEdfAv zVPoBthaxGAtf9r2V/uZLKJiofwAV0l03f0dFqgEB/3g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :message-id:mime-version:subject:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=LJ/Q/ddL1K7DO9Ce/ FZu4I3h7Z60Ef5ShfohZ59yM1Q=; b=QmEVNOKoMJRjAIe6ZJRfklszavRn7Xo8S e1h5dKNTPRkVsPnsf9lqNSx5yYIo6jLqBYSdgB0nlrFg3zTKQyQYbEQsOt+xXXzO Qk2C3QohvbHQjiaz57xoB8lCo8NFXQovSasbSfh2Exw84wmcUVmFNmVCqbj2doJo FveB4/Z5pEmQeJU1piNvg5vrPsoClaq1jtVsc0uYLAmsCMASWcUAUJE6FKrI2qVD s/D+1O4nyPGmS72uqouiuKDqalrUTo5pAaDMj9u34L7y/uFcZshZ2nZM4yfbu+cl iTIcUu4Za8ny7bWB1WAzf5xb2ZduDL76wPyGmF1vfeOgeAeHjS5Vw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrudekjedgtdelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffoggfgsedtkeertdertddtnecuhfhrohhmpefvhhhomhgrshcu ofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecuggftrf grthhtvghrnhepvdelvdduhedvudduveeuvdevheegudelgeeigfejheduhedttdegudff jeeihffgnecukfhppeejjedrudefgedrvddtfedrudekgeenucevlhhushhtvghrufhiii gvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhhomhgrshesmhhonhhjrghlohhn rdhnvght X-ME-Proxy: Received: from xps.monjalon.net (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 94DD03067629; Wed, 24 Jun 2020 05:36:36 -0400 (EDT) From: Thomas Monjalon To: dev@dpdk.org Cc: david.marchand@redhat.com, bruce.richardson@intel.com, John McNamara , Marko Kovacevic , Ray Kinsella , Neil Horman Date: Wed, 24 Jun 2020 11:36:26 +0200 Message-Id: <20200624093627.2603992-1-thomas@monjalon.net> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH 20.11] eal: simplify exit functions 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" The option RTE_EAL_ALWAYS_PANIC_ON_ERROR was off by default, and not customizable with meson. It is completely removed. The function rte_dump_registers is a trace of the bare metal support era, and was not supported in userland. It is completely removed. Signed-off-by: Thomas Monjalon Acked-by: Ray Kinsella --- Because the empty function rte_dump_registers is part of the ABI, this change is planned for DPDK 20.11. --- app/test/test_debug.c | 3 --- config/common_base | 1 - doc/guides/howto/debug_troubleshoot.rst | 2 +- lib/librte_eal/common/eal_common_debug.c | 17 +---------------- lib/librte_eal/include/rte_debug.h | 7 ------- lib/librte_eal/rte_eal_version.map | 1 - 6 files changed, 2 insertions(+), 29 deletions(-) diff --git a/app/test/test_debug.c b/app/test/test_debug.c index 25eab97e2a..834a7386f5 100644 --- a/app/test/test_debug.c +++ b/app/test/test_debug.c @@ -66,13 +66,11 @@ test_exit_val(int exit_val) } wait(&status); printf("Child process status: %d\n", status); -#ifndef RTE_EAL_ALWAYS_PANIC_ON_ERROR if(!WIFEXITED(status) || WEXITSTATUS(status) != (uint8_t)exit_val){ printf("Child process terminated with incorrect status (expected = %d)!\n", exit_val); return -1; } -#endif return 0; } @@ -113,7 +111,6 @@ static int test_debug(void) { rte_dump_stack(); - rte_dump_registers(); if (test_panic() < 0) return -1; if (test_exit() < 0) diff --git a/config/common_base b/config/common_base index c7d5c73215..42ad399b17 100644 --- a/config/common_base +++ b/config/common_base @@ -103,7 +103,6 @@ CONFIG_RTE_ENABLE_TRACE_FP=n CONFIG_RTE_LOG_HISTORY=256 CONFIG_RTE_BACKTRACE=y CONFIG_RTE_LIBEAL_USE_HPET=n -CONFIG_RTE_EAL_ALWAYS_PANIC_ON_ERROR=n CONFIG_RTE_EAL_IGB_UIO=n CONFIG_RTE_EAL_VFIO=n CONFIG_RTE_MAX_VFIO_GROUPS=64 diff --git a/doc/guides/howto/debug_troubleshoot.rst b/doc/guides/howto/debug_troubleshoot.rst index cef016b2fe..1ed8be5a04 100644 --- a/doc/guides/howto/debug_troubleshoot.rst +++ b/doc/guides/howto/debug_troubleshoot.rst @@ -313,7 +313,7 @@ Custom worker function :numref:`dtg_distributor_worker`. * For high-performance execution logic ensure running it on correct NUMA and non-master core. - * Analyze run logic with ``rte_dump_stack``, ``rte_dump_registers`` and + * Analyze run logic with ``rte_dump_stack`` and ``rte_memdump`` for more insights. * Make use of objdump to ensure opcode is matching to the desired state. diff --git a/lib/librte_eal/common/eal_common_debug.c b/lib/librte_eal/common/eal_common_debug.c index 722468754d..15418e957f 100644 --- a/lib/librte_eal/common/eal_common_debug.c +++ b/lib/librte_eal/common/eal_common_debug.c @@ -7,14 +7,6 @@ #include #include -/* not implemented */ -void -rte_dump_registers(void) -{ - return; -} - -/* call abort(), it will generate a coredump if enabled */ void __rte_panic(const char *funcname, const char *format, ...) { @@ -25,8 +17,7 @@ __rte_panic(const char *funcname, const char *format, ...) rte_vlog(RTE_LOG_CRIT, RTE_LOGTYPE_EAL, format, ap); va_end(ap); rte_dump_stack(); - rte_dump_registers(); - abort(); + abort(); /* generate a coredump if enabled */ } /* @@ -46,14 +37,8 @@ rte_exit(int exit_code, const char *format, ...) rte_vlog(RTE_LOG_CRIT, RTE_LOGTYPE_EAL, format, ap); va_end(ap); -#ifndef RTE_EAL_ALWAYS_PANIC_ON_ERROR if (rte_eal_cleanup() != 0) RTE_LOG(CRIT, EAL, "EAL could not release all resources\n"); exit(exit_code); -#else - rte_dump_stack(); - rte_dump_registers(); - abort(); -#endif } diff --git a/lib/librte_eal/include/rte_debug.h b/lib/librte_eal/include/rte_debug.h index 50052c5a90..c4bc71ce28 100644 --- a/lib/librte_eal/include/rte_debug.h +++ b/lib/librte_eal/include/rte_debug.h @@ -26,13 +26,6 @@ extern "C" { */ void rte_dump_stack(void); -/** - * Dump the registers of the calling core to the console. - * - * Note: Not implemented in a userapp environment; use gdb instead. - */ -void rte_dump_registers(void); - /** * Provide notification of a critical non-recoverable error and terminate * execution abnormally. diff --git a/lib/librte_eal/rte_eal_version.map b/lib/librte_eal/rte_eal_version.map index 196eef5afa..3f36e46b3b 100644 --- a/lib/librte_eal/rte_eal_version.map +++ b/lib/librte_eal/rte_eal_version.map @@ -37,7 +37,6 @@ DPDK_20.0 { rte_devargs_remove; rte_devargs_type_count; rte_dump_physmem_layout; - rte_dump_registers; rte_dump_stack; rte_dump_tailq; rte_eal_alarm_cancel;