From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 1DBE2A058B; Wed, 25 Mar 2020 22:18:15 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 971171C030; Wed, 25 Mar 2020 22:16:46 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id 2B0BC1C0C3 for ; Wed, 25 Mar 2020 22:16:44 +0100 (CET) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 02PLGGPC008345; Wed, 25 Mar 2020 14:16:43 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=pfpt0818; bh=BFnqdmTKNsdP8nYjsZPE/bXdKuFdKjo7uqcE5UlO35A=; b=psH4vBKG6WUkijooGRdd7dKN5YWkf6hiTQrEdwxnq0GUU0mPKWQcyUdzjFTIbrqfj6vi 8fvU3rEezP9jardwOlMoemNA0O5nRCWq3WrkmV0ZjhnToLSAldboDKDjOoRkD7bPkFr2 0IDkzMJ6BEs/0jNUs8fB+iURYI7mbquzbi8ensgOYpw9Or3LpUywoBtSa99aGpgCmFE7 N8aw4N723V8JnnjkTIAOWQN56Z2f0Hvv9RAyDLMqp3XyP1gAN6n1mqW9k+hSptKJRid3 JQtuF0+iyq7aWlHbNRVcNC3v6caYi0jM7WMWK48d3QrFs5FkAKI8Yes+bLjC7t/TcM4E sQ== Received: from sc-exch03.marvell.com ([199.233.58.183]) by mx0a-0016f401.pphosted.com with ESMTP id 2ywg9ntf06-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Wed, 25 Mar 2020 14:16:43 -0700 Received: from SC-EXCH01.marvell.com (10.93.176.81) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 25 Mar 2020 14:16:41 -0700 Received: from maili.marvell.com (10.93.176.43) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Wed, 25 Mar 2020 14:16:41 -0700 Received: from jerin-lab.marvell.com (jerin-lab.marvell.com [10.28.34.14]) by maili.marvell.com (Postfix) with ESMTP id 170773F7040; Wed, 25 Mar 2020 14:16:39 -0700 (PDT) From: To: Bruce Richardson CC: , , , , , Jerin Jacob Date: Thu, 26 Mar 2020 02:45:45 +0530 Message-ID: <20200325211603.240288-16-jerinj@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200325211603.240288-1-jerinj@marvell.com> References: <20200318190241.3150971-1-jerinj@marvell.com> <20200325211603.240288-1-jerinj@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138, 18.0.645 definitions=2020-03-25_11:2020-03-24, 2020-03-25 signatures=0 Subject: [dpdk-dev] [PATCH v2 15/32] eal/trace: hook internal trace APIs to FreeBSD 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" From: Jerin Jacob Connect the internal trace interface API to FreeBSD EAL. Signed-off-by: Jerin Jacob --- lib/librte_eal/freebsd/eal/eal.c | 10 ++++++++++ lib/librte_eal/freebsd/eal/eal_thread.c | 3 +++ 2 files changed, 13 insertions(+) diff --git a/lib/librte_eal/freebsd/eal/eal.c b/lib/librte_eal/freebsd/eal/eal.c index 6ae37e7e6..c453e11f2 100644 --- a/lib/librte_eal/freebsd/eal/eal.c +++ b/lib/librte_eal/freebsd/eal/eal.c @@ -52,6 +52,7 @@ #include "eal_hugepages.h" #include "eal_options.h" #include "eal_memcfg.h" +#include "eal_trace.h" #define MEMSIZE_IF_NO_HUGE_PAGE (64ULL * 1024ULL * 1024ULL) @@ -751,6 +752,13 @@ rte_eal_init(int argc, char **argv) return -1; } + if (eal_trace_init() < 0) { + rte_eal_init_alert("Cannot init trace"); + rte_errno = EFAULT; + rte_atomic32_clear(&run_once); + return -1; + } + if (eal_option_device_parse()) { rte_errno = ENODEV; rte_atomic32_clear(&run_once); @@ -966,6 +974,8 @@ rte_eal_cleanup(void) { rte_service_finalize(); rte_mp_channel_cleanup(); + rte_trace_save(); + eal_trace_fini(); eal_cleanup_config(&internal_config); return 0; } diff --git a/lib/librte_eal/freebsd/eal/eal_thread.c b/lib/librte_eal/freebsd/eal/eal_thread.c index ae7b57672..aaccb4926 100644 --- a/lib/librte_eal/freebsd/eal/eal_thread.c +++ b/lib/librte_eal/freebsd/eal/eal_thread.c @@ -20,6 +20,7 @@ #include #include #include +#include #include "eal_private.h" #include "eal_thread.h" @@ -124,6 +125,8 @@ eal_thread_loop(__attribute__((unused)) void *arg) RTE_LOG(DEBUG, EAL, "lcore %u is ready (tid=%p;cpuset=[%s%s])\n", lcore_id, thread_id, cpuset, ret == 0 ? "" : "..."); + __rte_trace_mem_per_thread_alloc(); + /* read on our pipe to get commands */ while (1) { void *fct_arg; -- 2.25.1