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 A3C63A0577; Mon, 13 Apr 2020 17:05:58 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id EC9761C06A; Mon, 13 Apr 2020 17:02:40 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id 7E3EB1C00D for ; Mon, 13 Apr 2020 17:02:39 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 03DF1LHY023067; Mon, 13 Apr 2020 08:02:39 -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=A6NWgQmtVerRjYXcMseA4K27qODfL/KchPAiRmHKWZvnS/BMTD9oUTCZHPO7+vF9cP6R mcLQ5vqKiMgMFmPzjsGcojeREVxT4ofoDOadscwT/Rg4Xp0dZf5O/jXUADPMHvlmu/q8 TUYuG1l6j2jxAc2VZEVYap1TAsjFn3Nu9wnXQauuMo6/uJbLMaiLTB6qXU6dsA66hQta 0GW6ZK5HpnBm5wpRts1F3GRie2SOtBASnOcvFCT9Yp5xrMjPB6CeE3ucuR09A/IWfs9A 0kYOrLV0M5sxlsW/2o/qIMgclhqAl8g3m+xM7COa09FnGgbbQ9E7UKROfvXVAcwmXbVa kA== Received: from sc-exch03.marvell.com ([199.233.58.183]) by mx0b-0016f401.pphosted.com with ESMTP id 30bddkpf90-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Mon, 13 Apr 2020 08:02:38 -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; Mon, 13 Apr 2020 08:02:36 -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; Mon, 13 Apr 2020 08:02:37 -0700 Received: from jerin-lab.marvell.com (jerin-lab.marvell.com [10.28.34.14]) by maili.marvell.com (Postfix) with ESMTP id 14E673F704A; Mon, 13 Apr 2020 08:02:32 -0700 (PDT) From: To: Bruce Richardson CC: , , , , , Jerin Jacob Date: Mon, 13 Apr 2020 20:30:59 +0530 Message-ID: <20200413150116.734047-17-jerinj@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200413150116.734047-1-jerinj@marvell.com> References: <20200403153709.3703448-1-jerinj@marvell.com> <20200413150116.734047-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-13_07:2020-04-13, 2020-04-13 signatures=0 Subject: [dpdk-dev] [PATCH v5 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