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 3A053A00C2; Wed, 22 Apr 2020 21:06:39 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C5B051D61B; Wed, 22 Apr 2020 21:05:00 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id 56A901C295 for ; Wed, 22 Apr 2020 21:04:51 +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 03MIxcZX013127; Wed, 22 Apr 2020 12:04:50 -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=Inc3CDSYnhMEAxUc8Y4APEYhkr66tNNrWhI/boi/d+GhxteprZ+M+FctGiqmHsHutQVl K01oQ8rYChT9nhr9j2VlQcJHIb8sLaxO5YcP7D0hPU4htUEdlCiNP+4RqLlo86aOMIRB vUpG5qRlMn0V5DCElyGbWbbiYAYvV5nvMjEP2tR4HeR4MVM7Sblc8YYuOy+tjOIr6mfU W79Vy3yLwgUpcvJ+EKbjxAG0zaSX3BzFjmuaqciQ4Aa+6cJGBO9b6AttBUKg9Jyb8dCE LvpiN1ciohxf4kTbnnZHPTAzGBnXbTHgQHVhN1xw1dXr+tcdhyNO4OIAYZRS028eH5kJ bQ== Received: from sc-exch04.marvell.com ([199.233.58.184]) by mx0a-0016f401.pphosted.com with ESMTP id 30fxwpk013-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Wed, 22 Apr 2020 12:04:50 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by SC-EXCH04.marvell.com (10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 22 Apr 2020 12:04:48 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Wed, 22 Apr 2020 12:04:49 -0700 Received: from jerin-lab.marvell.com (jerin-lab.marvell.com [10.28.34.14]) by maili.marvell.com (Postfix) with ESMTP id 07D683F703F; Wed, 22 Apr 2020 12:04:46 -0700 (PDT) From: To: Bruce Richardson CC: , , , , , Jerin Jacob Date: Thu, 23 Apr 2020 00:33:32 +0530 Message-ID: <20200422190349.3768487-16-jerinj@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200422190349.3768487-1-jerinj@marvell.com> References: <20200419100133.3232316-1-jerinj@marvell.com> <20200422190349.3768487-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-22_06:2020-04-22, 2020-04-22 signatures=0 Subject: [dpdk-dev] [PATCH v7 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.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