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 8EF84A0561; Sun, 19 Apr 2020 12:06:40 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 23D8E1D5F6; Sun, 19 Apr 2020 12:02:59 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id 4172C1D17F for ; Sun, 19 Apr 2020 12:02:51 +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 03JA11CO020104; Sun, 19 Apr 2020 03:02:38 -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=fsRpxQ7nJ2Gy/18/FOSnp2Q4iF4khrLV+Z6ozYyzVI4=; b=eOV+4GYfGwQ+c7VP/49+4LGak5drfMVuW7dNMIGAQ6W8DRMa6OM1LCoi7Y1+AfDCoUkG 5FR92G2uD6Y1GHIrTkxtwG9nqgo40Xw/mcnC/Cm/jrVE3i0Kr52y2mFTIFq4Wj+Ng7RC cDWRA6Gtikl7W0tKwZ0TzmSD8JNHRcp5MCT40qW77cYLoPmtm7q844CFzdXs0IR2rkxs DjswrnHTH8TYJVRwhX8kNY08bYfQtHJZAGi/SVhror0QwByhfCHexzSC3u1+vLJPtOyb Y8jpLzH3s1P24ylj/AtkVG17oleT9+H2Nzo01i8ZgFBDN9ImofZqAukRo9v1ocdjfJRt 3g== Received: from sc-exch03.marvell.com ([199.233.58.183]) by mx0b-0016f401.pphosted.com with ESMTP id 30g12njxc9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Sun, 19 Apr 2020 03: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; Sun, 19 Apr 2020 03: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; Sun, 19 Apr 2020 03:02:36 -0700 Received: from jerin-lab.marvell.com (jerin-lab.marvell.com [10.28.34.14]) by maili.marvell.com (Postfix) with ESMTP id 5B6E23F703F; Sun, 19 Apr 2020 03:02:34 -0700 (PDT) From: To: Bruce Richardson CC: , , , , , Jerin Jacob Date: Sun, 19 Apr 2020 15:31:16 +0530 Message-ID: <20200419100133.3232316-17-jerinj@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200419100133.3232316-1-jerinj@marvell.com> References: <20200413150116.734047-1-jerinj@marvell.com> <20200419100133.3232316-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-19_02:2020-04-17, 2020-04-19 signatures=0 Subject: [dpdk-dev] [PATCH v6 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 | 4 ++++ 2 files changed, 14 insertions(+) diff --git a/lib/librte_eal/freebsd/eal.c b/lib/librte_eal/freebsd/eal.c index 80dc9aa78..540b7d38c 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 d802c1d2e..c25b4a019 100644 --- a/lib/librte_eal/freebsd/eal_thread.c +++ b/lib/librte_eal/freebsd/eal_thread.c @@ -20,6 +20,8 @@ #include #include #include +#include +#include #include "eal_private.h" #include "eal_thread.h" @@ -124,6 +126,8 @@ eal_thread_loop(__rte_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