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 E5311A04EF; Wed, 3 Jun 2020 01:04:53 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1B3AB1C0D2; Wed, 3 Jun 2020 01:03:59 +0200 (CEST) Received: from mail-lj1-f195.google.com (mail-lj1-f195.google.com [209.85.208.195]) by dpdk.org (Postfix) with ESMTP id 547D21C0B8 for ; Wed, 3 Jun 2020 01:03:58 +0200 (CEST) Received: by mail-lj1-f195.google.com with SMTP id n24so289522lji.10 for ; Tue, 02 Jun 2020 16:03:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=LHlAb1z42AG9LyDm6x4AYa/r3zc1UWVG/v4HM8tjcwQ=; b=efLBYD8HnjW6J1HHGpINf+7C1tZ2nhniZ6FHlCGDPKKNHhCbGW4pJT9eyRJOqMbcU0 mJj6hXLJsLSDa2HO8SwaCO27gGnQZ83qqzZGmHGfPt8eCVG5XzSYK0y+MHnuqLyj1A5l 5SjNPqXTUEImc6cEzuUsv4E+gkLZSGu49kiyh2m+0kliCVxzRF/SH/ICGV2LjA1hYBqT VRlj4dp5buGOPdyyVB0rIXzgqI7/xINC59Xl7MKgwOcyDBUOnj+BZ3ZOOOayqTqtoBtW wHxoSBTQqEv+R1MZbKRIIpq/M1AsNZFyRi2zbUB7xTfuZJ09SqMDxckNyY3VOq/fDpHu gdlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=LHlAb1z42AG9LyDm6x4AYa/r3zc1UWVG/v4HM8tjcwQ=; b=hYZ/mLi0BpJKdZ5p2i+84fQkLv9yyceIu67y9k9cQm8mg0dOcTQ6s2iA0OuucPgWRh pVxmlip9m+JihhR1Te5/EfbxcJ9A7H/I5sn8gCzNVioJBqKG9vzF59QZln/XIOWjEik6 KG+73D8y9xVSwd7+6yuj1ycUBwKjGm95CVhXmtsGaArcQDL7Y4v8U5KmQqao55NRqHOD 2wg6LQBnksenxWNO9M4ln3exusPVx2hYDzrmKv5Evf45gMdApc0HBPSghlMU8sbvCSxj i+E5fEeIQ6QkaLoo8sNKgb1lWvLXXVw3d9EMx0ZEKg5RWbT0ZT/8Xd2uXsu4KIazHZOr yd/Q== X-Gm-Message-State: AOAM532/muHxINyrrzIWpFtX8CoNccTr6eRSH9n1DKJaVHP+xuznrhVP /f8YBAwg2z5BwWd20GsMttdvqNSvNo1ImQ== X-Google-Smtp-Source: ABdhPJxf5fyZ2h9rWjhvLRMwW9BSBxf+a65r9Vkn/p5TGDNrgdz+ZvwRGfo298zouUFLVSrHKVUvgg== X-Received: by 2002:a2e:9242:: with SMTP id v2mr635781ljg.41.1591139037498; Tue, 02 Jun 2020 16:03:57 -0700 (PDT) Received: from localhost.localdomain (broadband-37-110-65-23.ip.moscow.rt.ru. [37.110.65.23]) by smtp.gmail.com with ESMTPSA id s18sm67471ljj.63.2020.06.02.16.03.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jun 2020 16:03:57 -0700 (PDT) From: Dmitry Kozlyuk To: dev@dpdk.org Cc: Dmitry Malloy , Narcisa Ana Maria Vasile , Fady Bader , Tal Shnaiderman , Dmitry Kozlyuk , Jerin Jacob , Harini Ramakrishnan , Omar Cardona , Pallavi Kadam , Ranjit Menon Date: Wed, 3 Jun 2020 02:03:25 +0300 Message-Id: <20200602230329.17838-8-dmitry.kozliuk@gmail.com> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20200602230329.17838-1-dmitry.kozliuk@gmail.com> References: <20200525003720.6410-1-dmitry.kozliuk@gmail.com> <20200602230329.17838-1-dmitry.kozliuk@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v6 07/11] eal/windows: add tracing support stubs 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" EAL common code depends on tracepoint calls, but generic implementation cannot be enabled on Windows due to missing standard library facilities. Add stub functions to support tracepoint compilation, so that common code does not have to conditionally include tracepoints until proper support is added. Signed-off-by: Dmitry Kozlyuk --- lib/librte_eal/common/eal_common_thread.c | 5 +--- lib/librte_eal/common/meson.build | 1 + lib/librte_eal/windows/eal.c | 34 ++++++++++++++++++++++- 3 files changed, 35 insertions(+), 5 deletions(-) diff --git a/lib/librte_eal/common/eal_common_thread.c b/lib/librte_eal/common/eal_common_thread.c index f9f588c17..370bb1b63 100644 --- a/lib/librte_eal/common/eal_common_thread.c +++ b/lib/librte_eal/common/eal_common_thread.c @@ -15,9 +15,7 @@ #include #include #include -#ifndef RTE_EXEC_ENV_WINDOWS #include -#endif #include "eal_internal_cfg.h" #include "eal_private.h" @@ -169,9 +167,8 @@ static void *rte_thread_init(void *arg) free(params); } -#ifndef RTE_EXEC_ENV_WINDOWS __rte_trace_mem_per_thread_alloc(); -#endif + return start_routine(routine_arg); } diff --git a/lib/librte_eal/common/meson.build b/lib/librte_eal/common/meson.build index d91c22220..4e9208129 100644 --- a/lib/librte_eal/common/meson.build +++ b/lib/librte_eal/common/meson.build @@ -14,6 +14,7 @@ if is_windows 'eal_common_log.c', 'eal_common_options.c', 'eal_common_thread.c', + 'eal_common_trace_points.c', ) subdir_done() endif diff --git a/lib/librte_eal/windows/eal.c b/lib/librte_eal/windows/eal.c index d084606a6..e7461f731 100644 --- a/lib/librte_eal/windows/eal.c +++ b/lib/librte_eal/windows/eal.c @@ -17,6 +17,7 @@ #include #include #include +#include #include "eal_windows.h" @@ -221,7 +222,38 @@ rte_eal_init_alert(const char *msg) RTE_LOG(ERR, EAL, "%s\n", msg); } - /* Launch threads, called at application init(). */ +/* Stubs to enable EAL trace point compilation + * until eal_common_trace.c can be compiled. + */ + +RTE_DEFINE_PER_LCORE(volatile int, trace_point_sz); +RTE_DEFINE_PER_LCORE(void *, trace_mem); + +void +__rte_trace_mem_per_thread_alloc(void) +{ +} + +void +__rte_trace_point_emit_field(size_t sz, const char *field, + const char *type) +{ + RTE_SET_USED(sz); + RTE_SET_USED(field); + RTE_SET_USED(type); +} + +int +__rte_trace_point_register(rte_trace_point_t *trace, const char *name, + void (*register_fn)(void)) +{ + RTE_SET_USED(trace); + RTE_SET_USED(name); + RTE_SET_USED(register_fn); + return -ENOTSUP; +} + +/* Launch threads, called at application init(). */ int rte_eal_init(int argc, char **argv) { -- 2.25.4