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 270DAA0562; Sun, 29 Mar 2020 16:48:24 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 44CFD1C19C; Sun, 29 Mar 2020 16:44:45 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id 71E091C19A for ; Sun, 29 Mar 2020 16:44:43 +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 02TEdnoi012821; Sun, 29 Mar 2020 07:44:42 -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=y40EjWEDJLYCHofT/rZ42IHICKXbJsppbA0o0cxhChE=; b=ISyAFDizHuqdHlIXZw6/IVF+fB0lgPMh7O+FxOVkWgQc5Kst/KCP2kYAAcLXMLebO8Up aFEjBjMI3czmkU1UUg7/85AFlReoXANgvEjiRSomiqudNz+VRKMXsbhPUHjhmNCmjNqm HeaKI1rjPZDLOi8hieyS2U0FPyy7dxOqkj0UuRYbtc4ENJ3Jm8/29nPrPFz8YhXG6uTi TRTCHlSRYazveuQodb/PeOj02foDyAZJvNdU6PcwlONjq+qIrbQ7Lf4O6uYhIQrr3+LA rcFoDFpCUzs6vQsd3it4PpNIcWsH+IiXuNb4xG5TWIH6Wa3YvVnvp0FXUAOIKQoFipzT fw== Received: from sc-exch03.marvell.com ([199.233.58.183]) by mx0b-0016f401.pphosted.com with ESMTP id 30263kb5jw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Sun, 29 Mar 2020 07:44:42 -0700 Received: from SC-EXCH03.marvell.com (10.93.176.83) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Sun, 29 Mar 2020 07:44:40 -0700 Received: from maili.marvell.com (10.93.176.43) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Sun, 29 Mar 2020 07:44:40 -0700 Received: from jerin-lab.marvell.com (jerin-lab.marvell.com [10.28.34.14]) by maili.marvell.com (Postfix) with ESMTP id 887753F7040; Sun, 29 Mar 2020 07:44:38 -0700 (PDT) From: To: Jerin Jacob , Sunil Kumar Kori , Bruce Richardson CC: , , , Date: Sun, 29 Mar 2020 20:13:27 +0530 Message-ID: <20200329144342.1543749-19-jerinj@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200329144342.1543749-1-jerinj@marvell.com> References: <20200325211603.240288-1-jerinj@marvell.com> <20200329144342.1543749-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-29_05:2020-03-27, 2020-03-29 signatures=0 Subject: [dpdk-dev] [PATCH v3 18/33] eal/trace: add alarm tracepoints 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 Add following alarm related trace points. rte_trace_lib_eal_alarm_set() rte_trace_lib_eal_alarm_cancel() Signed-off-by: Jerin Jacob --- .../common/eal_common_trace_points.c | 9 +++++++++ lib/librte_eal/common/include/rte_trace_eal.h | 18 ++++++++++++++++++ lib/librte_eal/freebsd/eal/eal_alarm.c | 3 +++ lib/librte_eal/linux/eal/eal_alarm.c | 4 ++++ lib/librte_eal/rte_eal_version.map | 2 ++ 5 files changed, 36 insertions(+) diff --git a/lib/librte_eal/common/eal_common_trace_points.c b/lib/librte_eal/common/eal_common_trace_points.c index ff521c981..16261b1d6 100644 --- a/lib/librte_eal/common/eal_common_trace_points.c +++ b/lib/librte_eal/common/eal_common_trace_points.c @@ -23,6 +23,9 @@ RTE_TRACE_POINT_DEFINE(rte_trace_lib_eal_generic_ptr); RTE_TRACE_POINT_DEFINE(rte_trace_lib_eal_generic_str); RTE_TRACE_POINT_DEFINE(rte_trace_lib_eal_generic_func); +RTE_TRACE_POINT_DEFINE(rte_trace_lib_eal_alarm_set); +RTE_TRACE_POINT_DEFINE(rte_trace_lib_eal_alarm_cancel); + RTE_INIT(eal_trace_init) { RTE_TRACE_POINT_REGISTER(rte_trace_lib_eal_generic_void, @@ -57,4 +60,10 @@ RTE_INIT(eal_trace_init) lib.eal.generic.string, INFO); RTE_TRACE_POINT_REGISTER(rte_trace_lib_eal_generic_func, lib.eal.generic.func, INFO); + + RTE_TRACE_POINT_REGISTER(rte_trace_lib_eal_alarm_set, + lib.eal.alarm.set, INFO); + RTE_TRACE_POINT_REGISTER(rte_trace_lib_eal_alarm_cancel, + lib.eal.alarm.cancel, INFO); + } diff --git a/lib/librte_eal/common/include/rte_trace_eal.h b/lib/librte_eal/common/include/rte_trace_eal.h index 269ef7502..df1b3854b 100644 --- a/lib/librte_eal/common/include/rte_trace_eal.h +++ b/lib/librte_eal/common/include/rte_trace_eal.h @@ -15,6 +15,7 @@ extern "C" { #endif +#include #include /* Generic */ @@ -115,6 +116,23 @@ RTE_TRACE_POINT( #define RTE_TRACE_LIB_EAL_GENERIC_FUNC rte_trace_lib_eal_generic_func(__func__) +/* Alarm */ +RTE_TRACE_POINT( + rte_trace_lib_eal_alarm_set, + RTE_TRACE_POINT_ARGS(uint64_t us, rte_eal_alarm_callback cb_fn, + void *cb_arg, int rc), + rte_trace_ctf_u64(us); rte_trace_ctf_ptr(cb_fn); + rte_trace_ctf_ptr(cb_arg); rte_trace_ctf_int(rc); +) + +RTE_TRACE_POINT( + rte_trace_lib_eal_alarm_cancel, + RTE_TRACE_POINT_ARGS(rte_eal_alarm_callback cb_fn, void *cb_arg, + int count), + rte_trace_ctf_ptr(cb_fn); rte_trace_ctf_ptr(cb_arg); + rte_trace_ctf_int(count); +) + #ifdef __cplusplus } #endif diff --git a/lib/librte_eal/freebsd/eal/eal_alarm.c b/lib/librte_eal/freebsd/eal/eal_alarm.c index 51ea4b8c0..5f03ab4c4 100644 --- a/lib/librte_eal/freebsd/eal/eal_alarm.c +++ b/lib/librte_eal/freebsd/eal/eal_alarm.c @@ -17,6 +17,7 @@ #include #include #include +#include #include "eal_private.h" #include "eal_alarm_private.h" @@ -223,6 +224,7 @@ rte_eal_alarm_set(uint64_t us, rte_eal_alarm_callback cb_fn, void *cb_arg) rte_spinlock_unlock(&alarm_list_lk); + rte_trace_lib_eal_alarm_set(us, cb_fn, cb_arg, ret); return ret; } @@ -310,5 +312,6 @@ rte_eal_alarm_cancel(rte_eal_alarm_callback cb_fn, void *cb_arg) rte_spinlock_unlock(&alarm_list_lk); + rte_trace_lib_eal_alarm_cancel(cb_fn, cb_arg, count); return count; } diff --git a/lib/librte_eal/linux/eal/eal_alarm.c b/lib/librte_eal/linux/eal/eal_alarm.c index 0924c9205..9fef3e6c8 100644 --- a/lib/librte_eal/linux/eal/eal_alarm.c +++ b/lib/librte_eal/linux/eal/eal_alarm.c @@ -20,6 +20,8 @@ #include #include #include +#include + #include #ifndef TFD_NONBLOCK @@ -172,6 +174,7 @@ rte_eal_alarm_set(uint64_t us, rte_eal_alarm_callback cb_fn, void *cb_arg) } rte_spinlock_unlock(&alarm_list_lk); + rte_trace_lib_eal_alarm_set(us, cb_fn, cb_arg, ret); return ret; } @@ -240,5 +243,6 @@ rte_eal_alarm_cancel(rte_eal_alarm_callback cb_fn, void *cb_arg) else if (err) rte_errno = err; + rte_trace_lib_eal_alarm_cancel(cb_fn, cb_arg, count); return count; } diff --git a/lib/librte_eal/rte_eal_version.map b/lib/librte_eal/rte_eal_version.map index de33e08f0..67c8e0b51 100644 --- a/lib/librte_eal/rte_eal_version.map +++ b/lib/librte_eal/rte_eal_version.map @@ -382,4 +382,6 @@ EXPERIMENTAL { __rte_trace_lib_eal_generic_ptr; __rte_trace_lib_eal_generic_str; __rte_trace_lib_eal_generic_func; + __rte_trace_lib_eal_alarm_set; + __rte_trace_lib_eal_alarm_cancel; }; -- 2.25.1