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 8518DA0524; Sat, 4 Jul 2020 17:14:32 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 02C811DBA6; Sat, 4 Jul 2020 17:14:32 +0200 (CEST) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by dpdk.org (Postfix) with ESMTP id 55AD81D932 for ; Sat, 4 Jul 2020 17:14:30 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1593875669; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=369j+GVCFsfZ/tMy4wfxKlcolaYrnELP/GNob6uZUZQ=; b=dccc7TSdh8dOT/lX0lfhu0i1WPFXZtusWNnhXFtMffQrZEjLKfJ8EQp/TSgPkNofbo4+th 9A2DCh1L5rV6Ma4GEQsgwJoCmpQSTlgziEVZfvT5GFpCAt0B/54sqSSH+htjGmoDLWqBEf ingayZNJcgDI4VJa0NFRM+kpxsO9DqE= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-1-CSTEFr4-NYe0HPWGISMA8w-1; Sat, 04 Jul 2020 11:14:25 -0400 X-MC-Unique: CSTEFr4-NYe0HPWGISMA8w-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 6D7A17BAC; Sat, 4 Jul 2020 15:14:23 +0000 (UTC) Received: from dmarchan.remote.csb (unknown [10.40.195.188]) by smtp.corp.redhat.com (Postfix) with ESMTP id C908F768C1; Sat, 4 Jul 2020 15:14:19 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: thomas@monjalon.net, Jerin Jacob , Sunil Kumar Kori , John McNamara , Marko Kovacevic , Declan Doherty , Ferruh Yigit , Andrew Rybchenko , Olivier Matz Date: Sat, 4 Jul 2020 17:14:08 +0200 Message-Id: <20200704151408.6469-1-david.marchand@redhat.com> In-Reply-To: <20200503203135.6493-3-david.marchand@redhat.com> References: <20200503203135.6493-3-david.marchand@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=david.marchand@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v2] trace: simplify trace point registration 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" RTE_TRACE_POINT_DEFINE and RTE_TRACE_POINT_REGISTER must come in pairs. Merge them and let RTE_TRACE_POINT_REGISTER handle the constructor part. Signed-off-by: David Marchand Acked-by: Jerin Jacob --- Changes since v1: - rebased on main branch, --- app/test/test_trace_register.c | 12 +- doc/guides/prog_guide/trace_lib.rst | 12 +- lib/librte_cryptodev/cryptodev_trace_points.c | 84 +++---- .../common/eal_common_trace_points.c | 164 ++++++-------- lib/librte_eal/include/rte_eal_trace.h | 122 +++++------ lib/librte_eal/include/rte_trace_point.h | 14 +- .../include/rte_trace_point_register.h | 6 +- lib/librte_ethdev/ethdev_trace_points.c | 44 ++-- lib/librte_eventdev/eventdev_trace_points.c | 205 +++++++----------- lib/librte_mempool/mempool_trace_points.c | 124 ++++------- 10 files changed, 309 insertions(+), 478 deletions(-) diff --git a/app/test/test_trace_register.c b/app/test/test_trace_register.c index b9372d3f9b..4891493687 100644 --- a/app/test/test_trace_register.c +++ b/app/test/test_trace_register.c @@ -6,13 +6,5 @@ #include "test_trace.h" -/* Define trace points */ -RTE_TRACE_POINT_DEFINE(app_dpdk_test_tp); -RTE_TRACE_POINT_DEFINE(app_dpdk_test_fp); - -RTE_INIT(register_valid_trace_points) -{ - RTE_TRACE_POINT_REGISTER(app_dpdk_test_tp, app.dpdk.test.tp); - RTE_TRACE_POINT_REGISTER(app_dpdk_test_fp, app.dpdk.test.fp); -} - +RTE_TRACE_POINT_REGISTER(app_dpdk_test_tp, app.dpdk.test.tp) +RTE_TRACE_POINT_REGISTER(app_dpdk_test_fp, app.dpdk.test.fp) diff --git a/doc/guides/prog_guide/trace_lib.rst b/doc/guides/prog_guide/trace_lib.rst index b6c6285779..9bbfd165d8 100644 --- a/doc/guides/prog_guide/trace_lib.rst +++ b/doc/guides/prog_guide/trace_lib.rst @@ -100,12 +100,7 @@ Register the tracepoint #include - RTE_TRACE_POINT_DEFINE(app_trace_string); - - RTE_INIT(app_trace_init) - { - RTE_TRACE_POINT_REGISTER(app_trace_string, app.trace.string); - } + RTE_TRACE_POINT_REGISTER(app_trace_string, app.trace.string) The above code snippet registers the ``app_trace_string`` tracepoint to trace library. Here, the ``my_tracepoint.h`` is the header file @@ -118,9 +113,6 @@ There is no requirement for the tracepoint function and its name to be similar. However, it is recommended to have a similar name for a better naming convention. -The user must register the tracepoint before the ``rte_eal_init`` invocation. -The user can use the ``RTE_INIT`` construction scheme to achieve this. - .. note:: The ``rte_trace_point_register.h`` header must be included before any @@ -128,7 +120,7 @@ The user can use the ``RTE_INIT`` construction scheme to achieve this. .. note:: - The ``RTE_TRACE_POINT_DEFINE`` defines the placeholder for the + The ``RTE_TRACE_POINT_REGISTER`` defines the placeholder for the ``rte_trace_point_t`` tracepoint object. The user must export a ``__`` symbol in the library ``.map`` file for this tracepoint to be used out of the library, in shared builds. diff --git a/lib/librte_cryptodev/cryptodev_trace_points.c b/lib/librte_cryptodev/cryptodev_trace_points.c index 7672c7b99b..5d58951fd5 100644 --- a/lib/librte_cryptodev/cryptodev_trace_points.c +++ b/lib/librte_cryptodev/cryptodev_trace_points.c @@ -6,70 +6,50 @@ #include "rte_cryptodev_trace.h" -RTE_TRACE_POINT_DEFINE(rte_cryptodev_trace_configure); -RTE_TRACE_POINT_DEFINE(rte_cryptodev_trace_start); -RTE_TRACE_POINT_DEFINE(rte_cryptodev_trace_stop); -RTE_TRACE_POINT_DEFINE(rte_cryptodev_trace_close); -RTE_TRACE_POINT_DEFINE(rte_cryptodev_trace_queue_pair_setup); -RTE_TRACE_POINT_DEFINE(rte_cryptodev_trace_sym_session_pool_create); -RTE_TRACE_POINT_DEFINE(rte_cryptodev_trace_sym_session_create); -RTE_TRACE_POINT_DEFINE(rte_cryptodev_trace_asym_session_create); -RTE_TRACE_POINT_DEFINE(rte_cryptodev_trace_sym_session_free); -RTE_TRACE_POINT_DEFINE(rte_cryptodev_trace_asym_session_free); -RTE_TRACE_POINT_DEFINE(rte_cryptodev_trace_sym_session_init); -RTE_TRACE_POINT_DEFINE(rte_cryptodev_trace_asym_session_init); -RTE_TRACE_POINT_DEFINE(rte_cryptodev_trace_sym_session_clear); -RTE_TRACE_POINT_DEFINE(rte_cryptodev_trace_asym_session_clear); -RTE_TRACE_POINT_DEFINE(rte_cryptodev_trace_enqueue_burst); -RTE_TRACE_POINT_DEFINE(rte_cryptodev_trace_dequeue_burst); +RTE_TRACE_POINT_REGISTER(rte_cryptodev_trace_configure, + lib.cryptodev.configure) -RTE_INIT(cryptodev_trace_init) -{ - RTE_TRACE_POINT_REGISTER(rte_cryptodev_trace_configure, - lib.cryptodev.configure); +RTE_TRACE_POINT_REGISTER(rte_cryptodev_trace_start, + lib.cryptodev.start) - RTE_TRACE_POINT_REGISTER(rte_cryptodev_trace_start, - lib.cryptodev.start); +RTE_TRACE_POINT_REGISTER(rte_cryptodev_trace_stop, + lib.cryptodev.stop) - RTE_TRACE_POINT_REGISTER(rte_cryptodev_trace_stop, - lib.cryptodev.stop); +RTE_TRACE_POINT_REGISTER(rte_cryptodev_trace_close, + lib.cryptodev.close) - RTE_TRACE_POINT_REGISTER(rte_cryptodev_trace_close, - lib.cryptodev.close); +RTE_TRACE_POINT_REGISTER(rte_cryptodev_trace_queue_pair_setup, + lib.cryptodev.queue.pair.setup) - RTE_TRACE_POINT_REGISTER(rte_cryptodev_trace_queue_pair_setup, - lib.cryptodev.queue.pair.setup); +RTE_TRACE_POINT_REGISTER(rte_cryptodev_trace_sym_session_pool_create, + lib.cryptodev.sym.pool.create) - RTE_TRACE_POINT_REGISTER(rte_cryptodev_trace_sym_session_pool_create, - lib.cryptodev.sym.pool.create); +RTE_TRACE_POINT_REGISTER(rte_cryptodev_trace_sym_session_create, + lib.cryptodev.sym.create) - RTE_TRACE_POINT_REGISTER(rte_cryptodev_trace_sym_session_create, - lib.cryptodev.sym.create); +RTE_TRACE_POINT_REGISTER(rte_cryptodev_trace_asym_session_create, + lib.cryptodev.asym.create) - RTE_TRACE_POINT_REGISTER(rte_cryptodev_trace_asym_session_create, - lib.cryptodev.asym.create); +RTE_TRACE_POINT_REGISTER(rte_cryptodev_trace_sym_session_free, + lib.cryptodev.sym.free) - RTE_TRACE_POINT_REGISTER(rte_cryptodev_trace_sym_session_free, - lib.cryptodev.sym.free); +RTE_TRACE_POINT_REGISTER(rte_cryptodev_trace_asym_session_free, + lib.cryptodev.asym.free) - RTE_TRACE_POINT_REGISTER(rte_cryptodev_trace_asym_session_free, - lib.cryptodev.asym.free); +RTE_TRACE_POINT_REGISTER(rte_cryptodev_trace_sym_session_init, + lib.cryptodev.sym.init) - RTE_TRACE_POINT_REGISTER(rte_cryptodev_trace_sym_session_init, - lib.cryptodev.sym.init); +RTE_TRACE_POINT_REGISTER(rte_cryptodev_trace_asym_session_init, + lib.cryptodev.asym.init) - RTE_TRACE_POINT_REGISTER(rte_cryptodev_trace_asym_session_init, - lib.cryptodev.asym.init); +RTE_TRACE_POINT_REGISTER(rte_cryptodev_trace_sym_session_clear, + lib.cryptodev.sym.clear) - RTE_TRACE_POINT_REGISTER(rte_cryptodev_trace_sym_session_clear, - lib.cryptodev.sym.clear); +RTE_TRACE_POINT_REGISTER(rte_cryptodev_trace_asym_session_clear, + lib.cryptodev.asym.clear) - RTE_TRACE_POINT_REGISTER(rte_cryptodev_trace_asym_session_clear, - lib.cryptodev.asym.clear); +RTE_TRACE_POINT_REGISTER(rte_cryptodev_trace_enqueue_burst, + lib.cryptodev.enq.burst) - RTE_TRACE_POINT_REGISTER(rte_cryptodev_trace_enqueue_burst, - lib.cryptodev.enq.burst); - - RTE_TRACE_POINT_REGISTER(rte_cryptodev_trace_dequeue_burst, - lib.cryptodev.deq.burst); -} +RTE_TRACE_POINT_REGISTER(rte_cryptodev_trace_dequeue_burst, + lib.cryptodev.deq.burst) diff --git a/lib/librte_eal/common/eal_common_trace_points.c b/lib/librte_eal/common/eal_common_trace_points.c index 4a8ce90888..292ec91bed 100644 --- a/lib/librte_eal/common/eal_common_trace_points.c +++ b/lib/librte_eal/common/eal_common_trace_points.c @@ -6,110 +6,70 @@ #include -RTE_TRACE_POINT_DEFINE(rte_eal_trace_generic_void); -RTE_TRACE_POINT_DEFINE(rte_eal_trace_generic_u64); -RTE_TRACE_POINT_DEFINE(rte_eal_trace_generic_u32); -RTE_TRACE_POINT_DEFINE(rte_eal_trace_generic_u16); -RTE_TRACE_POINT_DEFINE(rte_eal_trace_generic_u8); -RTE_TRACE_POINT_DEFINE(rte_eal_trace_generic_i64); -RTE_TRACE_POINT_DEFINE(rte_eal_trace_generic_i32); -RTE_TRACE_POINT_DEFINE(rte_eal_trace_generic_i16); -RTE_TRACE_POINT_DEFINE(rte_eal_trace_generic_i8); -RTE_TRACE_POINT_DEFINE(rte_eal_trace_generic_int); -RTE_TRACE_POINT_DEFINE(rte_eal_trace_generic_long); -RTE_TRACE_POINT_DEFINE(rte_eal_trace_generic_float); -RTE_TRACE_POINT_DEFINE(rte_eal_trace_generic_double); -RTE_TRACE_POINT_DEFINE(rte_eal_trace_generic_ptr); -RTE_TRACE_POINT_DEFINE(rte_eal_trace_generic_str); -RTE_TRACE_POINT_DEFINE(rte_eal_trace_generic_func); +RTE_TRACE_POINT_REGISTER(rte_eal_trace_generic_void, + lib.eal.generic.void) +RTE_TRACE_POINT_REGISTER(rte_eal_trace_generic_u64, + lib.eal.generic.u64) +RTE_TRACE_POINT_REGISTER(rte_eal_trace_generic_u32, + lib.eal.generic.u32) +RTE_TRACE_POINT_REGISTER(rte_eal_trace_generic_u16, + lib.eal.generic.u16) +RTE_TRACE_POINT_REGISTER(rte_eal_trace_generic_u8, + lib.eal.generic.u8) +RTE_TRACE_POINT_REGISTER(rte_eal_trace_generic_i64, + lib.eal.generic.i64) +RTE_TRACE_POINT_REGISTER(rte_eal_trace_generic_i32, + lib.eal.generic.i32) +RTE_TRACE_POINT_REGISTER(rte_eal_trace_generic_i16, + lib.eal.generic.i16) +RTE_TRACE_POINT_REGISTER(rte_eal_trace_generic_i8, + lib.eal.generic.i8) +RTE_TRACE_POINT_REGISTER(rte_eal_trace_generic_int, + lib.eal.generic.int) +RTE_TRACE_POINT_REGISTER(rte_eal_trace_generic_long, + lib.eal.generic.long) +RTE_TRACE_POINT_REGISTER(rte_eal_trace_generic_float, + lib.eal.generic.float) +RTE_TRACE_POINT_REGISTER(rte_eal_trace_generic_double, + lib.eal.generic.double) +RTE_TRACE_POINT_REGISTER(rte_eal_trace_generic_ptr, + lib.eal.generic.ptr) +RTE_TRACE_POINT_REGISTER(rte_eal_trace_generic_str, + lib.eal.generic.string) +RTE_TRACE_POINT_REGISTER(rte_eal_trace_generic_func, + lib.eal.generic.func) -RTE_TRACE_POINT_DEFINE(rte_eal_trace_alarm_set); -RTE_TRACE_POINT_DEFINE(rte_eal_trace_alarm_cancel); +RTE_TRACE_POINT_REGISTER(rte_eal_trace_alarm_set, + lib.eal.alarm.set) +RTE_TRACE_POINT_REGISTER(rte_eal_trace_alarm_cancel, + lib.eal.alarm.cancel) -RTE_TRACE_POINT_DEFINE(rte_eal_trace_mem_zmalloc); -RTE_TRACE_POINT_DEFINE(rte_eal_trace_mem_malloc); -RTE_TRACE_POINT_DEFINE(rte_eal_trace_mem_realloc); -RTE_TRACE_POINT_DEFINE(rte_eal_trace_mem_free); +RTE_TRACE_POINT_REGISTER(rte_eal_trace_mem_zmalloc, + lib.eal.mem.zmalloc) +RTE_TRACE_POINT_REGISTER(rte_eal_trace_mem_malloc, + lib.eal.mem.malloc) +RTE_TRACE_POINT_REGISTER(rte_eal_trace_mem_realloc, + lib.eal.mem.realloc) +RTE_TRACE_POINT_REGISTER(rte_eal_trace_mem_free, + lib.eal.mem.free) -RTE_TRACE_POINT_DEFINE(rte_eal_trace_memzone_reserve); -RTE_TRACE_POINT_DEFINE(rte_eal_trace_memzone_lookup); -RTE_TRACE_POINT_DEFINE(rte_eal_trace_memzone_free); +RTE_TRACE_POINT_REGISTER(rte_eal_trace_memzone_reserve, + lib.eal.memzone.reserve) +RTE_TRACE_POINT_REGISTER(rte_eal_trace_memzone_lookup, + lib.eal.memzone.lookup) +RTE_TRACE_POINT_REGISTER(rte_eal_trace_memzone_free, + lib.eal.memzone.free) -RTE_TRACE_POINT_DEFINE(rte_eal_trace_thread_remote_launch); -RTE_TRACE_POINT_DEFINE(rte_eal_trace_thread_lcore_ready); +RTE_TRACE_POINT_REGISTER(rte_eal_trace_thread_remote_launch, + lib.eal.thread.remote.launch) +RTE_TRACE_POINT_REGISTER(rte_eal_trace_thread_lcore_ready, + lib.eal.thread.lcore.ready) -RTE_TRACE_POINT_DEFINE(rte_eal_trace_intr_callback_register); -RTE_TRACE_POINT_DEFINE(rte_eal_trace_intr_callback_unregister); -RTE_TRACE_POINT_DEFINE(rte_eal_trace_intr_enable); -RTE_TRACE_POINT_DEFINE(rte_eal_trace_intr_disable); - -RTE_INIT(eal_trace_init) -{ - RTE_TRACE_POINT_REGISTER(rte_eal_trace_generic_void, - lib.eal.generic.void); - RTE_TRACE_POINT_REGISTER(rte_eal_trace_generic_u64, - lib.eal.generic.u64); - RTE_TRACE_POINT_REGISTER(rte_eal_trace_generic_u32, - lib.eal.generic.u32); - RTE_TRACE_POINT_REGISTER(rte_eal_trace_generic_u16, - lib.eal.generic.u16); - RTE_TRACE_POINT_REGISTER(rte_eal_trace_generic_u8, - lib.eal.generic.u8); - RTE_TRACE_POINT_REGISTER(rte_eal_trace_generic_i64, - lib.eal.generic.i64); - RTE_TRACE_POINT_REGISTER(rte_eal_trace_generic_i32, - lib.eal.generic.i32); - RTE_TRACE_POINT_REGISTER(rte_eal_trace_generic_i16, - lib.eal.generic.i16); - RTE_TRACE_POINT_REGISTER(rte_eal_trace_generic_i8, - lib.eal.generic.i8); - RTE_TRACE_POINT_REGISTER(rte_eal_trace_generic_int, - lib.eal.generic.int); - RTE_TRACE_POINT_REGISTER(rte_eal_trace_generic_long, - lib.eal.generic.long); - RTE_TRACE_POINT_REGISTER(rte_eal_trace_generic_float, - lib.eal.generic.float); - RTE_TRACE_POINT_REGISTER(rte_eal_trace_generic_double, - lib.eal.generic.double); - RTE_TRACE_POINT_REGISTER(rte_eal_trace_generic_ptr, - lib.eal.generic.ptr); - RTE_TRACE_POINT_REGISTER(rte_eal_trace_generic_str, - lib.eal.generic.string); - RTE_TRACE_POINT_REGISTER(rte_eal_trace_generic_func, - lib.eal.generic.func); - - RTE_TRACE_POINT_REGISTER(rte_eal_trace_alarm_set, - lib.eal.alarm.set); - RTE_TRACE_POINT_REGISTER(rte_eal_trace_alarm_cancel, - lib.eal.alarm.cancel); - - RTE_TRACE_POINT_REGISTER(rte_eal_trace_mem_zmalloc, - lib.eal.mem.zmalloc); - RTE_TRACE_POINT_REGISTER(rte_eal_trace_mem_malloc, - lib.eal.mem.malloc); - RTE_TRACE_POINT_REGISTER(rte_eal_trace_mem_realloc, - lib.eal.mem.realloc); - RTE_TRACE_POINT_REGISTER(rte_eal_trace_mem_free, - lib.eal.mem.free); - - RTE_TRACE_POINT_REGISTER(rte_eal_trace_memzone_reserve, - lib.eal.memzone.reserve); - RTE_TRACE_POINT_REGISTER(rte_eal_trace_memzone_lookup, - lib.eal.memzone.lookup); - RTE_TRACE_POINT_REGISTER(rte_eal_trace_memzone_free, - lib.eal.memzone.free); - - RTE_TRACE_POINT_REGISTER(rte_eal_trace_thread_remote_launch, - lib.eal.thread.remote.launch); - RTE_TRACE_POINT_REGISTER(rte_eal_trace_thread_lcore_ready, - lib.eal.thread.lcore.ready); - - RTE_TRACE_POINT_REGISTER(rte_eal_trace_intr_callback_register, - lib.eal.intr.register); - RTE_TRACE_POINT_REGISTER(rte_eal_trace_intr_callback_unregister, - lib.eal.intr.unregister); - RTE_TRACE_POINT_REGISTER(rte_eal_trace_intr_enable, - lib.eal.intr.enable); - RTE_TRACE_POINT_REGISTER(rte_eal_trace_intr_disable, - lib.eal.intr.disable); -} +RTE_TRACE_POINT_REGISTER(rte_eal_trace_intr_callback_register, + lib.eal.intr.register) +RTE_TRACE_POINT_REGISTER(rte_eal_trace_intr_callback_unregister, + lib.eal.intr.unregister) +RTE_TRACE_POINT_REGISTER(rte_eal_trace_intr_enable, + lib.eal.intr.enable) +RTE_TRACE_POINT_REGISTER(rte_eal_trace_intr_disable, + lib.eal.intr.disable) diff --git a/lib/librte_eal/include/rte_eal_trace.h b/lib/librte_eal/include/rte_eal_trace.h index bcfef0cfaa..6b1a813c7b 100644 --- a/lib/librte_eal/include/rte_eal_trace.h +++ b/lib/librte_eal/include/rte_eal_trace.h @@ -19,6 +19,26 @@ extern "C" { #include #include +/* Alarm */ +RTE_TRACE_POINT( + rte_eal_trace_alarm_set, + RTE_TRACE_POINT_ARGS(uint64_t us, rte_eal_alarm_callback cb_fn, + void *cb_arg, int rc), + rte_trace_point_emit_u64(us); + rte_trace_point_emit_ptr(cb_fn); + rte_trace_point_emit_ptr(cb_arg); + rte_trace_point_emit_int(rc); +) + +RTE_TRACE_POINT( + rte_eal_trace_alarm_cancel, + RTE_TRACE_POINT_ARGS(rte_eal_alarm_callback cb_fn, void *cb_arg, + int count), + rte_trace_point_emit_ptr(cb_fn); + rte_trace_point_emit_ptr(cb_arg); + rte_trace_point_emit_int(count); +) + /* Generic */ RTE_TRACE_POINT( rte_eal_trace_generic_void, @@ -117,24 +137,52 @@ RTE_TRACE_POINT( #define RTE_EAL_TRACE_GENERIC_FUNC rte_eal_trace_generic_func(__func__) -/* Alarm */ +/* Interrupt */ RTE_TRACE_POINT( - rte_eal_trace_alarm_set, - RTE_TRACE_POINT_ARGS(uint64_t us, rte_eal_alarm_callback cb_fn, - void *cb_arg, int rc), - rte_trace_point_emit_u64(us); - rte_trace_point_emit_ptr(cb_fn); - rte_trace_point_emit_ptr(cb_arg); + rte_eal_trace_intr_callback_register, + RTE_TRACE_POINT_ARGS(const struct rte_intr_handle *handle, + rte_intr_callback_fn cb, void *cb_arg, int rc), rte_trace_point_emit_int(rc); + rte_trace_point_emit_int(handle->vfio_dev_fd); + rte_trace_point_emit_int(handle->fd); + rte_trace_point_emit_int(handle->type); + rte_trace_point_emit_u32(handle->max_intr); + rte_trace_point_emit_u32(handle->nb_efd); + rte_trace_point_emit_ptr(cb); + rte_trace_point_emit_ptr(cb_arg); ) - RTE_TRACE_POINT( - rte_eal_trace_alarm_cancel, - RTE_TRACE_POINT_ARGS(rte_eal_alarm_callback cb_fn, void *cb_arg, - int count), - rte_trace_point_emit_ptr(cb_fn); + rte_eal_trace_intr_callback_unregister, + RTE_TRACE_POINT_ARGS(const struct rte_intr_handle *handle, + rte_intr_callback_fn cb, void *cb_arg, int rc), + rte_trace_point_emit_int(rc); + rte_trace_point_emit_int(handle->vfio_dev_fd); + rte_trace_point_emit_int(handle->fd); + rte_trace_point_emit_int(handle->type); + rte_trace_point_emit_u32(handle->max_intr); + rte_trace_point_emit_u32(handle->nb_efd); + rte_trace_point_emit_ptr(cb); rte_trace_point_emit_ptr(cb_arg); - rte_trace_point_emit_int(count); +) +RTE_TRACE_POINT( + rte_eal_trace_intr_enable, + RTE_TRACE_POINT_ARGS(const struct rte_intr_handle *handle, int rc), + rte_trace_point_emit_int(rc); + rte_trace_point_emit_int(handle->vfio_dev_fd); + rte_trace_point_emit_int(handle->fd); + rte_trace_point_emit_int(handle->type); + rte_trace_point_emit_u32(handle->max_intr); + rte_trace_point_emit_u32(handle->nb_efd); +) +RTE_TRACE_POINT( + rte_eal_trace_intr_disable, + RTE_TRACE_POINT_ARGS(const struct rte_intr_handle *handle, int rc), + rte_trace_point_emit_int(rc); + rte_trace_point_emit_int(handle->vfio_dev_fd); + rte_trace_point_emit_int(handle->fd); + rte_trace_point_emit_int(handle->type); + rte_trace_point_emit_u32(handle->max_intr); + rte_trace_point_emit_u32(handle->nb_efd); ) /* Memory */ @@ -223,54 +271,6 @@ RTE_TRACE_POINT( rte_trace_point_emit_string(cpuset); ) -/* Interrupt */ -RTE_TRACE_POINT( - rte_eal_trace_intr_callback_register, - RTE_TRACE_POINT_ARGS(const struct rte_intr_handle *handle, - rte_intr_callback_fn cb, void *cb_arg, int rc), - rte_trace_point_emit_int(rc); - rte_trace_point_emit_int(handle->vfio_dev_fd); - rte_trace_point_emit_int(handle->fd); - rte_trace_point_emit_int(handle->type); - rte_trace_point_emit_u32(handle->max_intr); - rte_trace_point_emit_u32(handle->nb_efd); - rte_trace_point_emit_ptr(cb); - rte_trace_point_emit_ptr(cb_arg); -) -RTE_TRACE_POINT( - rte_eal_trace_intr_callback_unregister, - RTE_TRACE_POINT_ARGS(const struct rte_intr_handle *handle, - rte_intr_callback_fn cb, void *cb_arg, int rc), - rte_trace_point_emit_int(rc); - rte_trace_point_emit_int(handle->vfio_dev_fd); - rte_trace_point_emit_int(handle->fd); - rte_trace_point_emit_int(handle->type); - rte_trace_point_emit_u32(handle->max_intr); - rte_trace_point_emit_u32(handle->nb_efd); - rte_trace_point_emit_ptr(cb); - rte_trace_point_emit_ptr(cb_arg); -) -RTE_TRACE_POINT( - rte_eal_trace_intr_enable, - RTE_TRACE_POINT_ARGS(const struct rte_intr_handle *handle, int rc), - rte_trace_point_emit_int(rc); - rte_trace_point_emit_int(handle->vfio_dev_fd); - rte_trace_point_emit_int(handle->fd); - rte_trace_point_emit_int(handle->type); - rte_trace_point_emit_u32(handle->max_intr); - rte_trace_point_emit_u32(handle->nb_efd); -) -RTE_TRACE_POINT( - rte_eal_trace_intr_disable, - RTE_TRACE_POINT_ARGS(const struct rte_intr_handle *handle, int rc), - rte_trace_point_emit_int(rc); - rte_trace_point_emit_int(handle->vfio_dev_fd); - rte_trace_point_emit_int(handle->fd); - rte_trace_point_emit_int(handle->type); - rte_trace_point_emit_u32(handle->max_intr); - rte_trace_point_emit_u32(handle->nb_efd); -) - #ifdef __cplusplus } #endif diff --git a/lib/librte_eal/include/rte_trace_point.h b/lib/librte_eal/include/rte_trace_point.h index 377c2414aa..b039602772 100644 --- a/lib/librte_eal/include/rte_trace_point.h +++ b/lib/librte_eal/include/rte_trace_point.h @@ -34,10 +34,6 @@ extern "C" { /** The tracepoint object. */ typedef uint64_t rte_trace_point_t; -/** Macro to define the tracepoint. */ -#define RTE_TRACE_POINT_DEFINE(tp) \ -rte_trace_point_t __attribute__((section("__rte_trace_point"))) __##tp - /** * Macro to define the tracepoint arguments in RTE_TRACE_POINT macro. @@ -69,7 +65,7 @@ _tp _args \ * * @param tp * Tracepoint object. Before using the tracepoint, an application needs to - * define the tracepoint using RTE_TRACE_POINT_DEFINE macro. + * define the tracepoint using RTE_TRACE_POINT_REGISTER macro. * @param args * C function style input arguments to define the arguments to tracepoint * function. @@ -77,7 +73,7 @@ _tp _args \ * Define the payload of trace function. The payload will be formed using * rte_trace_point_emit_* macros. Use ";" delimiter between two payloads. * - * @see RTE_TRACE_POINT_ARGS, RTE_TRACE_POINT_DEFINE, rte_trace_point_emit_* + * @see RTE_TRACE_POINT_ARGS, RTE_TRACE_POINT_REGISTER, rte_trace_point_emit_* */ #define RTE_TRACE_POINT(tp, args, ...) \ __RTE_TRACE_POINT(generic, tp, args, __VA_ARGS__) @@ -90,7 +86,7 @@ _tp _args \ * * @param tp * Tracepoint object. Before using the tracepoint, an application needs to - * define the tracepoint using RTE_TRACE_POINT_DEFINE macro. + * define the tracepoint using RTE_TRACE_POINT_REGISTER macro. * @param args * C function style input arguments to define the arguments to tracepoint. * function. @@ -109,7 +105,7 @@ _tp _args \ * Register a tracepoint. * * @param trace - * The tracepoint object created using RTE_TRACE_POINT_DEFINE. + * The tracepoint object created using RTE_TRACE_POINT_REGISTER. * @param name * The name of the tracepoint object. * @return @@ -256,7 +252,7 @@ void __rte_trace_point_emit_field(size_t sz, const char *field, * Use RTE_TRACE_POINT_REGISTER macro for tracepoint registration. * * @param trace - * The tracepoint object created using RTE_TRACE_POINT_DEFINE. + * The tracepoint object created using RTE_TRACE_POINT_REGISTER. * @param name * The name of the tracepoint object. * @param register_fn diff --git a/lib/librte_eal/include/rte_trace_point_register.h b/lib/librte_eal/include/rte_trace_point_register.h index 4e7c25ba10..4f5c86552d 100644 --- a/lib/librte_eal/include/rte_trace_point_register.h +++ b/lib/librte_eal/include/rte_trace_point_register.h @@ -15,8 +15,12 @@ RTE_DECLARE_PER_LCORE(volatile int, trace_point_sz); #define RTE_TRACE_POINT_REGISTER(trace, name) \ +rte_trace_point_t __attribute__((section("__rte_trace_point"))) __##trace; \ +RTE_INIT(trace##_init) \ +{ \ __rte_trace_point_register(&__##trace, RTE_STR(name), \ - (void (*)(void)) trace) + (void (*)(void)) trace); \ +} #define __rte_trace_point_emit_header_generic(t) \ RTE_PER_LCORE(trace_point_sz) = __RTE_TRACE_EVENT_HEADER_SZ diff --git a/lib/librte_ethdev/ethdev_trace_points.c b/lib/librte_ethdev/ethdev_trace_points.c index 722578c1c4..2919409a15 100644 --- a/lib/librte_ethdev/ethdev_trace_points.c +++ b/lib/librte_ethdev/ethdev_trace_points.c @@ -6,38 +6,26 @@ #include -RTE_TRACE_POINT_DEFINE(rte_ethdev_trace_configure); -RTE_TRACE_POINT_DEFINE(rte_ethdev_trace_rxq_setup); -RTE_TRACE_POINT_DEFINE(rte_ethdev_trace_txq_setup); -RTE_TRACE_POINT_DEFINE(rte_ethdev_trace_start); -RTE_TRACE_POINT_DEFINE(rte_ethdev_trace_stop); -RTE_TRACE_POINT_DEFINE(rte_ethdev_trace_close); -RTE_TRACE_POINT_DEFINE(rte_ethdev_trace_rx_burst); -RTE_TRACE_POINT_DEFINE(rte_ethdev_trace_tx_burst); +RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_configure, + lib.ethdev.configure) -RTE_INIT(ethdev_trace_init) -{ - RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_configure, - lib.ethdev.configure); +RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_rxq_setup, + lib.ethdev.rxq.setup) - RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_rxq_setup, - lib.ethdev.rxq.setup); +RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_txq_setup, + lib.ethdev.txq.setup) - RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_txq_setup, - lib.ethdev.txq.setup); +RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_start, + lib.ethdev.start) - RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_start, - lib.ethdev.start); +RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_stop, + lib.ethdev.stop) - RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_stop, - lib.ethdev.stop); +RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_close, + lib.ethdev.close) - RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_close, - lib.ethdev.close); +RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_rx_burst, + lib.ethdev.rx.burst) - RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_rx_burst, - lib.ethdev.rx.burst); - - RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_tx_burst, - lib.ethdev.tx.burst); -} +RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_tx_burst, + lib.ethdev.tx.burst) diff --git a/lib/librte_eventdev/eventdev_trace_points.c b/lib/librte_eventdev/eventdev_trace_points.c index 3c06087143..1a0ccc4481 100644 --- a/lib/librte_eventdev/eventdev_trace_points.c +++ b/lib/librte_eventdev/eventdev_trace_points.c @@ -7,167 +7,114 @@ #include "rte_eventdev_trace.h" /* Eventdev trace points */ -RTE_TRACE_POINT_DEFINE(rte_eventdev_trace_configure); -RTE_TRACE_POINT_DEFINE(rte_eventdev_trace_queue_setup); -RTE_TRACE_POINT_DEFINE(rte_eventdev_trace_port_setup); -RTE_TRACE_POINT_DEFINE(rte_eventdev_trace_port_link); -RTE_TRACE_POINT_DEFINE(rte_eventdev_trace_port_unlink); -RTE_TRACE_POINT_DEFINE(rte_eventdev_trace_start); -RTE_TRACE_POINT_DEFINE(rte_eventdev_trace_stop); -RTE_TRACE_POINT_DEFINE(rte_eventdev_trace_close); -RTE_TRACE_POINT_DEFINE(rte_eventdev_trace_enq_burst); -RTE_TRACE_POINT_DEFINE(rte_eventdev_trace_deq_burst); +RTE_TRACE_POINT_REGISTER(rte_eventdev_trace_configure, + lib.eventdev.configure) -/* Eventdev Rx adapter trace points */ -RTE_TRACE_POINT_DEFINE(rte_eventdev_trace_eth_rx_adapter_create); -RTE_TRACE_POINT_DEFINE(rte_eventdev_trace_eth_rx_adapter_free); -RTE_TRACE_POINT_DEFINE(rte_eventdev_trace_eth_rx_adapter_queue_add); -RTE_TRACE_POINT_DEFINE(rte_eventdev_trace_eth_rx_adapter_queue_del); -RTE_TRACE_POINT_DEFINE(rte_eventdev_trace_eth_rx_adapter_start); -RTE_TRACE_POINT_DEFINE(rte_eventdev_trace_eth_rx_adapter_stop); - -/* Eventdev Tx adapter trace points */ -RTE_TRACE_POINT_DEFINE(rte_eventdev_trace_eth_tx_adapter_create); -RTE_TRACE_POINT_DEFINE(rte_eventdev_trace_eth_tx_adapter_free); -RTE_TRACE_POINT_DEFINE(rte_eventdev_trace_eth_tx_adapter_queue_add); -RTE_TRACE_POINT_DEFINE(rte_eventdev_trace_eth_tx_adapter_queue_del); -RTE_TRACE_POINT_DEFINE(rte_eventdev_trace_eth_tx_adapter_start); -RTE_TRACE_POINT_DEFINE(rte_eventdev_trace_eth_tx_adapter_stop); -RTE_TRACE_POINT_DEFINE(rte_eventdev_trace_eth_tx_adapter_enqueue); - -/* Eventdev Timer adapter trace points */ -RTE_TRACE_POINT_DEFINE(rte_eventdev_trace_timer_adapter_create); -RTE_TRACE_POINT_DEFINE(rte_eventdev_trace_timer_adapter_start); -RTE_TRACE_POINT_DEFINE(rte_eventdev_trace_timer_adapter_stop); -RTE_TRACE_POINT_DEFINE(rte_eventdev_trace_timer_adapter_free); -RTE_TRACE_POINT_DEFINE(rte_eventdev_trace_timer_arm_burst); -RTE_TRACE_POINT_DEFINE(rte_eventdev_trace_timer_arm_tmo_tick_burst); -RTE_TRACE_POINT_DEFINE(rte_eventdev_trace_timer_cancel_burst); - -/* Eventdev Crypto adapter trace points */ -RTE_TRACE_POINT_DEFINE(rte_eventdev_trace_crypto_adapter_create); -RTE_TRACE_POINT_DEFINE(rte_eventdev_trace_crypto_adapter_free); -RTE_TRACE_POINT_DEFINE(rte_eventdev_trace_crypto_adapter_queue_pair_add); -RTE_TRACE_POINT_DEFINE(rte_eventdev_trace_crypto_adapter_queue_pair_del); -RTE_TRACE_POINT_DEFINE(rte_eventdev_trace_crypto_adapter_start); -RTE_TRACE_POINT_DEFINE(rte_eventdev_trace_crypto_adapter_stop); - -RTE_INIT(eventdev_trace_init) -{ - /* Eventdev trace points */ - RTE_TRACE_POINT_REGISTER(rte_eventdev_trace_configure, - lib.eventdev.configure); +RTE_TRACE_POINT_REGISTER(rte_eventdev_trace_queue_setup, + lib.eventdev.queue.setup) - RTE_TRACE_POINT_REGISTER(rte_eventdev_trace_queue_setup, - lib.eventdev.queue.setup); +RTE_TRACE_POINT_REGISTER(rte_eventdev_trace_port_setup, + lib.eventdev.port.setup) - RTE_TRACE_POINT_REGISTER(rte_eventdev_trace_port_setup, - lib.eventdev.port.setup); +RTE_TRACE_POINT_REGISTER(rte_eventdev_trace_port_link, + lib.eventdev.port.link) - RTE_TRACE_POINT_REGISTER(rte_eventdev_trace_port_link, - lib.eventdev.port.link); +RTE_TRACE_POINT_REGISTER(rte_eventdev_trace_port_unlink, + lib.eventdev.port.unlink) - RTE_TRACE_POINT_REGISTER(rte_eventdev_trace_port_unlink, - lib.eventdev.port.unlink); +RTE_TRACE_POINT_REGISTER(rte_eventdev_trace_start, + lib.eventdev.start) - RTE_TRACE_POINT_REGISTER(rte_eventdev_trace_start, - lib.eventdev.start); +RTE_TRACE_POINT_REGISTER(rte_eventdev_trace_stop, + lib.eventdev.stop) - RTE_TRACE_POINT_REGISTER(rte_eventdev_trace_stop, - lib.eventdev.stop); +RTE_TRACE_POINT_REGISTER(rte_eventdev_trace_close, + lib.eventdev.close) - RTE_TRACE_POINT_REGISTER(rte_eventdev_trace_close, - lib.eventdev.close); +RTE_TRACE_POINT_REGISTER(rte_eventdev_trace_enq_burst, + lib.eventdev.enq.burst) - RTE_TRACE_POINT_REGISTER(rte_eventdev_trace_enq_burst, - lib.eventdev.enq.burst); +RTE_TRACE_POINT_REGISTER(rte_eventdev_trace_deq_burst, + lib.eventdev.deq.burst) - RTE_TRACE_POINT_REGISTER(rte_eventdev_trace_deq_burst, - lib.eventdev.deq.burst); - - - /* Eventdev Rx adapter trace points */ - RTE_TRACE_POINT_REGISTER(rte_eventdev_trace_eth_rx_adapter_create, - lib.eventdev.rx.adapter.create); - - RTE_TRACE_POINT_REGISTER(rte_eventdev_trace_eth_rx_adapter_free, - lib.eventdev.rx.adapter.free); +/* Eventdev Rx adapter trace points */ +RTE_TRACE_POINT_REGISTER(rte_eventdev_trace_eth_rx_adapter_create, + lib.eventdev.rx.adapter.create) - RTE_TRACE_POINT_REGISTER(rte_eventdev_trace_eth_rx_adapter_queue_add, - lib.eventdev.rx.adapter.queue.add); +RTE_TRACE_POINT_REGISTER(rte_eventdev_trace_eth_rx_adapter_free, + lib.eventdev.rx.adapter.free) - RTE_TRACE_POINT_REGISTER(rte_eventdev_trace_eth_rx_adapter_queue_del, - lib.eventdev.rx.adapter.queue.del); +RTE_TRACE_POINT_REGISTER(rte_eventdev_trace_eth_rx_adapter_queue_add, + lib.eventdev.rx.adapter.queue.add) - RTE_TRACE_POINT_REGISTER(rte_eventdev_trace_eth_rx_adapter_start, - lib.eventdev.rx.adapter.start); +RTE_TRACE_POINT_REGISTER(rte_eventdev_trace_eth_rx_adapter_queue_del, + lib.eventdev.rx.adapter.queue.del) - RTE_TRACE_POINT_REGISTER(rte_eventdev_trace_eth_rx_adapter_stop, - lib.eventdev.rx.adapter.stop); +RTE_TRACE_POINT_REGISTER(rte_eventdev_trace_eth_rx_adapter_start, + lib.eventdev.rx.adapter.start) - /* Eventdev Tx adapter trace points */ - RTE_TRACE_POINT_REGISTER(rte_eventdev_trace_eth_tx_adapter_create, - lib.eventdev.tx.adapter.create); +RTE_TRACE_POINT_REGISTER(rte_eventdev_trace_eth_rx_adapter_stop, + lib.eventdev.rx.adapter.stop) - RTE_TRACE_POINT_REGISTER(rte_eventdev_trace_eth_tx_adapter_free, - lib.eventdev.tx.adapter.free); +/* Eventdev Tx adapter trace points */ +RTE_TRACE_POINT_REGISTER(rte_eventdev_trace_eth_tx_adapter_create, + lib.eventdev.tx.adapter.create) - RTE_TRACE_POINT_REGISTER(rte_eventdev_trace_eth_tx_adapter_queue_add, - lib.eventdev.tx.adapter.queue.add); +RTE_TRACE_POINT_REGISTER(rte_eventdev_trace_eth_tx_adapter_free, + lib.eventdev.tx.adapter.free) - RTE_TRACE_POINT_REGISTER(rte_eventdev_trace_eth_tx_adapter_queue_del, - lib.eventdev.tx.adapter.queue.del); +RTE_TRACE_POINT_REGISTER(rte_eventdev_trace_eth_tx_adapter_queue_add, + lib.eventdev.tx.adapter.queue.add) - RTE_TRACE_POINT_REGISTER(rte_eventdev_trace_eth_tx_adapter_start, - lib.eventdev.tx.adapter.start); +RTE_TRACE_POINT_REGISTER(rte_eventdev_trace_eth_tx_adapter_queue_del, + lib.eventdev.tx.adapter.queue.del) - RTE_TRACE_POINT_REGISTER(rte_eventdev_trace_eth_tx_adapter_stop, - lib.eventdev.tx.adapter.stop); +RTE_TRACE_POINT_REGISTER(rte_eventdev_trace_eth_tx_adapter_start, + lib.eventdev.tx.adapter.start) - RTE_TRACE_POINT_REGISTER(rte_eventdev_trace_eth_tx_adapter_enqueue, - lib.eventdev.tx.adapter.enq); +RTE_TRACE_POINT_REGISTER(rte_eventdev_trace_eth_tx_adapter_stop, + lib.eventdev.tx.adapter.stop) +RTE_TRACE_POINT_REGISTER(rte_eventdev_trace_eth_tx_adapter_enqueue, + lib.eventdev.tx.adapter.enq) - /* Eventdev Timer adapter trace points */ - RTE_TRACE_POINT_REGISTER(rte_eventdev_trace_timer_adapter_create, - lib.eventdev.timer.create); +/* Eventdev Timer adapter trace points */ +RTE_TRACE_POINT_REGISTER(rte_eventdev_trace_timer_adapter_create, + lib.eventdev.timer.create) - RTE_TRACE_POINT_REGISTER(rte_eventdev_trace_timer_adapter_start, - lib.eventdev.timer.start); +RTE_TRACE_POINT_REGISTER(rte_eventdev_trace_timer_adapter_start, + lib.eventdev.timer.start) - RTE_TRACE_POINT_REGISTER(rte_eventdev_trace_timer_adapter_stop, - lib.eventdev.timer.stop); +RTE_TRACE_POINT_REGISTER(rte_eventdev_trace_timer_adapter_stop, + lib.eventdev.timer.stop) - RTE_TRACE_POINT_REGISTER(rte_eventdev_trace_timer_adapter_free, - lib.eventdev.timer.free); +RTE_TRACE_POINT_REGISTER(rte_eventdev_trace_timer_adapter_free, + lib.eventdev.timer.free) - RTE_TRACE_POINT_REGISTER(rte_eventdev_trace_timer_arm_burst, - lib.eventdev.timer.burst); +RTE_TRACE_POINT_REGISTER(rte_eventdev_trace_timer_arm_burst, + lib.eventdev.timer.burst) - RTE_TRACE_POINT_REGISTER(rte_eventdev_trace_timer_arm_tmo_tick_burst, - lib.eventdev.timer.tick.burst); +RTE_TRACE_POINT_REGISTER(rte_eventdev_trace_timer_arm_tmo_tick_burst, + lib.eventdev.timer.tick.burst) - RTE_TRACE_POINT_REGISTER(rte_eventdev_trace_timer_cancel_burst, - lib.eventdev.timer.cancel); +RTE_TRACE_POINT_REGISTER(rte_eventdev_trace_timer_cancel_burst, + lib.eventdev.timer.cancel) - /* Eventdev Crypto adapter trace points */ - RTE_TRACE_POINT_REGISTER(rte_eventdev_trace_crypto_adapter_create, - lib.eventdev.crypto.create); +/* Eventdev Crypto adapter trace points */ +RTE_TRACE_POINT_REGISTER(rte_eventdev_trace_crypto_adapter_create, + lib.eventdev.crypto.create) - RTE_TRACE_POINT_REGISTER(rte_eventdev_trace_crypto_adapter_free, - lib.eventdev.crypto.free); +RTE_TRACE_POINT_REGISTER(rte_eventdev_trace_crypto_adapter_free, + lib.eventdev.crypto.free) - RTE_TRACE_POINT_REGISTER( - rte_eventdev_trace_crypto_adapter_queue_pair_add, - lib.eventdev.crypto.queue.add); +RTE_TRACE_POINT_REGISTER(rte_eventdev_trace_crypto_adapter_queue_pair_add, + lib.eventdev.crypto.queue.add) - RTE_TRACE_POINT_REGISTER( - rte_eventdev_trace_crypto_adapter_queue_pair_del, - lib.eventdev.crypto.queue.del); +RTE_TRACE_POINT_REGISTER(rte_eventdev_trace_crypto_adapter_queue_pair_del, + lib.eventdev.crypto.queue.del) - RTE_TRACE_POINT_REGISTER(rte_eventdev_trace_crypto_adapter_start, - lib.eventdev.crypto.start); +RTE_TRACE_POINT_REGISTER(rte_eventdev_trace_crypto_adapter_start, + lib.eventdev.crypto.start) - RTE_TRACE_POINT_REGISTER(rte_eventdev_trace_crypto_adapter_stop, - lib.eventdev.crypto.stop); -} +RTE_TRACE_POINT_REGISTER(rte_eventdev_trace_crypto_adapter_stop, + lib.eventdev.crypto.stop) diff --git a/lib/librte_mempool/mempool_trace_points.c b/lib/librte_mempool/mempool_trace_points.c index df4368b173..4ad76deb34 100644 --- a/lib/librte_mempool/mempool_trace_points.c +++ b/lib/librte_mempool/mempool_trace_points.c @@ -6,102 +6,74 @@ #include "rte_mempool_trace.h" -RTE_TRACE_POINT_DEFINE(rte_mempool_trace_ops_dequeue_bulk); -RTE_TRACE_POINT_DEFINE(rte_mempool_trace_ops_dequeue_contig_blocks); -RTE_TRACE_POINT_DEFINE(rte_mempool_trace_ops_enqueue_bulk); -RTE_TRACE_POINT_DEFINE(rte_mempool_trace_generic_put); -RTE_TRACE_POINT_DEFINE(rte_mempool_trace_put_bulk); -RTE_TRACE_POINT_DEFINE(rte_mempool_trace_generic_get); -RTE_TRACE_POINT_DEFINE(rte_mempool_trace_get_bulk); -RTE_TRACE_POINT_DEFINE(rte_mempool_trace_get_contig_blocks); -RTE_TRACE_POINT_DEFINE(rte_mempool_trace_create); -RTE_TRACE_POINT_DEFINE(rte_mempool_trace_create_empty); -RTE_TRACE_POINT_DEFINE(rte_mempool_trace_free); -RTE_TRACE_POINT_DEFINE(rte_mempool_trace_populate_iova); -RTE_TRACE_POINT_DEFINE(rte_mempool_trace_populate_virt); -RTE_TRACE_POINT_DEFINE(rte_mempool_trace_populate_default); -RTE_TRACE_POINT_DEFINE(rte_mempool_trace_populate_anon); -RTE_TRACE_POINT_DEFINE(rte_mempool_trace_cache_create); -RTE_TRACE_POINT_DEFINE(rte_mempool_trace_cache_free); -RTE_TRACE_POINT_DEFINE(rte_mempool_trace_default_cache); -RTE_TRACE_POINT_DEFINE(rte_mempool_trace_get_page_size); -RTE_TRACE_POINT_DEFINE(rte_mempool_trace_cache_flush); -RTE_TRACE_POINT_DEFINE(rte_mempool_trace_ops_populate); -RTE_TRACE_POINT_DEFINE(rte_mempool_trace_ops_alloc); -RTE_TRACE_POINT_DEFINE(rte_mempool_trace_ops_free); -RTE_TRACE_POINT_DEFINE(rte_mempool_trace_set_ops_byname); +RTE_TRACE_POINT_REGISTER(rte_mempool_trace_ops_dequeue_bulk, + lib.mempool.ops.deq.bulk) -RTE_INIT(mempool_trace_init) -{ - RTE_TRACE_POINT_REGISTER(rte_mempool_trace_ops_dequeue_bulk, - lib.mempool.ops.deq.bulk); +RTE_TRACE_POINT_REGISTER(rte_mempool_trace_ops_dequeue_contig_blocks, + lib.mempool.ops.deq.contig) - RTE_TRACE_POINT_REGISTER(rte_mempool_trace_ops_dequeue_contig_blocks, - lib.mempool.ops.deq.contig); +RTE_TRACE_POINT_REGISTER(rte_mempool_trace_ops_enqueue_bulk, + lib.mempool.ops.enq.bulk) - RTE_TRACE_POINT_REGISTER(rte_mempool_trace_ops_enqueue_bulk, - lib.mempool.ops.enq.bulk); +RTE_TRACE_POINT_REGISTER(rte_mempool_trace_generic_put, + lib.mempool.generic.put) - RTE_TRACE_POINT_REGISTER(rte_mempool_trace_generic_put, - lib.mempool.generic.put); +RTE_TRACE_POINT_REGISTER(rte_mempool_trace_put_bulk, + lib.mempool.put.bulk) - RTE_TRACE_POINT_REGISTER(rte_mempool_trace_put_bulk, - lib.mempool.put.bulk); +RTE_TRACE_POINT_REGISTER(rte_mempool_trace_generic_get, + lib.mempool.generic.get) - RTE_TRACE_POINT_REGISTER(rte_mempool_trace_generic_get, - lib.mempool.generic.get); +RTE_TRACE_POINT_REGISTER(rte_mempool_trace_get_bulk, + lib.mempool.get.bulk) - RTE_TRACE_POINT_REGISTER(rte_mempool_trace_get_bulk, - lib.mempool.get.bulk); +RTE_TRACE_POINT_REGISTER(rte_mempool_trace_get_contig_blocks, + lib.mempool.get.blocks) - RTE_TRACE_POINT_REGISTER(rte_mempool_trace_get_contig_blocks, - lib.mempool.get.blocks); +RTE_TRACE_POINT_REGISTER(rte_mempool_trace_create, + lib.mempool.create) - RTE_TRACE_POINT_REGISTER(rte_mempool_trace_create, - lib.mempool.create); +RTE_TRACE_POINT_REGISTER(rte_mempool_trace_create_empty, + lib.mempool.create.empty) - RTE_TRACE_POINT_REGISTER(rte_mempool_trace_create_empty, - lib.mempool.create.empty); +RTE_TRACE_POINT_REGISTER(rte_mempool_trace_free, + lib.mempool.free) - RTE_TRACE_POINT_REGISTER(rte_mempool_trace_free, - lib.mempool.free); +RTE_TRACE_POINT_REGISTER(rte_mempool_trace_populate_iova, + lib.mempool.populate.iova) - RTE_TRACE_POINT_REGISTER(rte_mempool_trace_populate_iova, - lib.mempool.populate.iova); +RTE_TRACE_POINT_REGISTER(rte_mempool_trace_populate_virt, + lib.mempool.populate.virt) - RTE_TRACE_POINT_REGISTER(rte_mempool_trace_populate_virt, - lib.mempool.populate.virt); +RTE_TRACE_POINT_REGISTER(rte_mempool_trace_populate_default, + lib.mempool.populate.default) - RTE_TRACE_POINT_REGISTER(rte_mempool_trace_populate_default, - lib.mempool.populate.default); +RTE_TRACE_POINT_REGISTER(rte_mempool_trace_populate_anon, + lib.mempool.populate.anon) - RTE_TRACE_POINT_REGISTER(rte_mempool_trace_populate_anon, - lib.mempool.populate.anon); +RTE_TRACE_POINT_REGISTER(rte_mempool_trace_cache_create, + lib.mempool.cache_create) - RTE_TRACE_POINT_REGISTER(rte_mempool_trace_cache_create, - lib.mempool.cache_create); +RTE_TRACE_POINT_REGISTER(rte_mempool_trace_cache_free, + lib.mempool.cache.free) - RTE_TRACE_POINT_REGISTER(rte_mempool_trace_cache_free, - lib.mempool.cache.free); +RTE_TRACE_POINT_REGISTER(rte_mempool_trace_default_cache, + lib.mempool.default.cache) - RTE_TRACE_POINT_REGISTER(rte_mempool_trace_default_cache, - lib.mempool.default.cache); +RTE_TRACE_POINT_REGISTER(rte_mempool_trace_get_page_size, + lib.mempool.get.page.size) - RTE_TRACE_POINT_REGISTER(rte_mempool_trace_get_page_size, - lib.mempool.get.page.size); +RTE_TRACE_POINT_REGISTER(rte_mempool_trace_cache_flush, + lib.mempool.cache.flush) - RTE_TRACE_POINT_REGISTER(rte_mempool_trace_cache_flush, - lib.mempool.cache.flush); +RTE_TRACE_POINT_REGISTER(rte_mempool_trace_ops_populate, + lib.mempool.ops.populate) - RTE_TRACE_POINT_REGISTER(rte_mempool_trace_ops_populate, - lib.mempool.ops.populate); +RTE_TRACE_POINT_REGISTER(rte_mempool_trace_ops_alloc, + lib.mempool.ops.alloc) - RTE_TRACE_POINT_REGISTER(rte_mempool_trace_ops_alloc, - lib.mempool.ops.alloc); +RTE_TRACE_POINT_REGISTER(rte_mempool_trace_ops_free, + lib.mempool.ops.free) - RTE_TRACE_POINT_REGISTER(rte_mempool_trace_ops_free, - lib.mempool.ops.free); - - RTE_TRACE_POINT_REGISTER(rte_mempool_trace_set_ops_byname, - lib.mempool.set.ops.byname); -} +RTE_TRACE_POINT_REGISTER(rte_mempool_trace_set_ops_byname, + lib.mempool.set.ops.byname) -- 2.23.0