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 11121A0562; Fri, 3 Apr 2020 17:40:36 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id DC2581C1F5; Fri, 3 Apr 2020 17:37:59 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id BE29A1C1F3 for ; Fri, 3 Apr 2020 17:37:58 +0200 (CEST) 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 033Facx5029269; Fri, 3 Apr 2020 08:37:57 -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=LcuSdHTl8FutLczKqqylgJIs4055cpXFHEzv1UcP/zw=; b=quIdJmpjg1tazwvC93HWdue0u71eavKEMiR4TEOCDW0RLuraKzDXEebk91Mi0hhPb+hM asw7FDCeq3pBkBGgJV5pnSWAwQcEqI2iU7KY+OgX2I1iXliuBIQII+p9NQOEwMmRrzK9 gDQrB1Ii0pobBBs4bMir3DADrKFvNKam+d19q0hMJNUCg/KYRGNA3o4wQPngjz/1fRJk byrutlKdMe7zMbZV7hOTNLB8iLBlTdkRFf4mEwLTaQXCNh7oRwEf3EZNRTLioAu3sh40 ER8EPrgHylA6C/thXSsgwt67wU+7x4OpIlvZ2u20kp/j8Kapwh6/e5IBtEILBvZQwcif lg== Received: from sc-exch03.marvell.com ([199.233.58.183]) by mx0a-0016f401.pphosted.com with ESMTP id 304855y7fh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Fri, 03 Apr 2020 08:37:57 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 3 Apr 2020 08:37:56 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Fri, 3 Apr 2020 08:37:56 -0700 Received: from jerin-lab.marvell.com (jerin-lab.marvell.com [10.28.34.14]) by maili.marvell.com (Postfix) with ESMTP id 723253F703F; Fri, 3 Apr 2020 08:37:54 -0700 (PDT) From: To: Bruce Richardson CC: , , , , , Jerin Jacob Date: Fri, 3 Apr 2020 21:06:52 +0530 Message-ID: <20200403153709.3703448-17-jerinj@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200403153709.3703448-1-jerinj@marvell.com> References: <20200329144342.1543749-1-jerinj@marvell.com> <20200403153709.3703448-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.676 definitions=2020-04-03_11:2020-04-03, 2020-04-03 signatures=0 Subject: [dpdk-dev] [PATCH v4 16/33] 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.c | 10 ++++++++++ lib/librte_eal/freebsd/eal_thread.c | 3 +++ 2 files changed, 13 insertions(+) diff --git a/lib/librte_eal/freebsd/eal.c b/lib/librte_eal/freebsd/eal.c index 6ae37e7e6..c453e11f2 100644 --- a/lib/librte_eal/freebsd/eal.c +++ b/lib/librte_eal/freebsd/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_thread.c b/lib/librte_eal/freebsd/eal_thread.c index ae7b57672..aaccb4926 100644 --- a/lib/librte_eal/freebsd/eal_thread.c +++ b/lib/librte_eal/freebsd/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