From: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
To: dev@dpdk.org
Cc: Pallavi Kadam <pallavi.kadam@intel.com>,
Narcisa Ana Maria Vasile <Narcisa.Vasile@microsoft.com>,
Ranjit Menon <ranjit.menon@intel.com>,
Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>,
Thomas Monjalon <thomas@monjalon.net>,
Sunil Kumar Kori <skori@marvell.com>,
David Marchand <david.marchand@redhat.com>,
Jerin Jacob <jerinj@marvell.com>
Subject: [dpdk-dev] [PATCH v3] eal: disable tracing on Windows
Date: Sun, 26 Apr 2020 19:41:52 +0300 [thread overview]
Message-ID: <20200426164153.2512126-1-dmitry.kozliuk@gmail.com> (raw)
In-Reply-To: <20200426152819.2496610-1-dmitry.kozliuk@gmail.com>
Fix build errors caused by using Unix-specific functions in common code.
Hide and disable command-line options related to tracing on Windows.
Fixes: 3d26a70ae338 ("trace: add trace configuration parameter")
Fixes: 3b155d24bdaf ("trace: hook subsystem to Linux")
Reported-by: Pallavi Kadam <pallavi.kadam@intel.com>
Suggested-by: Thomas Monjalon <thomas@monjalon.net>
Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
---
lib/librte_eal/common/eal_common_options.c | 6 ++++++
lib/librte_eal/common/eal_common_thread.c | 5 +++++
2 files changed, 11 insertions(+)
diff --git a/lib/librte_eal/common/eal_common_options.c b/lib/librte_eal/common/eal_common_options.c
index 7e3a7df9c..418731ca4 100644
--- a/lib/librte_eal/common/eal_common_options.c
+++ b/lib/librte_eal/common/eal_common_options.c
@@ -34,7 +34,9 @@
#include "eal_options.h"
#include "eal_filesystem.h"
#include "eal_private.h"
+#ifndef RTE_EXEC_ENV_WINDOWS
#include "eal_trace.h"
+#endif
#define BITS_PER_HEX 4
#define LCORE_OPT_LST 1
@@ -1424,6 +1426,7 @@ eal_parse_common_option(int opt, const char *optarg,
break;
}
+#ifndef RTE_EXEC_ENV_WINDOWS
case OPT_TRACE_NUM: {
if (eal_trace_args_save(optarg) < 0) {
RTE_LOG(ERR, EAL, "invalid parameters for --"
@@ -1459,6 +1462,7 @@ eal_parse_common_option(int opt, const char *optarg,
}
break;
}
+#endif /* !RTE_EXEC_ENV_WINDOWS */
case OPT_LCORES_NUM:
if (eal_parse_lcores(optarg) < 0) {
@@ -1735,6 +1739,7 @@ eal_common_usage(void)
" --"OPT_LOG_LEVEL"=<int> Set global log level\n"
" --"OPT_LOG_LEVEL"=<type-match>:<int>\n"
" Set specific log level\n"
+#ifndef RTE_EXEC_ENV_WINDOWS
" --"OPT_TRACE"=<regex-match>\n"
" Enable trace based on regular expression trace name.\n"
" By default, the trace is disabled.\n"
@@ -1758,6 +1763,7 @@ eal_common_usage(void)
" reaches its maximum limit.\n"
" Default mode is 'overwrite' and parameter\n"
" must be specified once only.\n"
+#endif /* !RTE_EXEC_ENV_WINDOWS */
" -v Display version information on startup\n"
" -h, --help This help\n"
" --"OPT_IN_MEMORY" Operate entirely in memory. This will\n"
diff --git a/lib/librte_eal/common/eal_common_thread.c b/lib/librte_eal/common/eal_common_thread.c
index 20dbcc7a0..f9f588c17 100644
--- a/lib/librte_eal/common/eal_common_thread.c
+++ b/lib/librte_eal/common/eal_common_thread.c
@@ -15,7 +15,9 @@
#include <rte_lcore.h>
#include <rte_memory.h>
#include <rte_log.h>
+#ifndef RTE_EXEC_ENV_WINDOWS
#include <rte_trace_point.h>
+#endif
#include "eal_internal_cfg.h"
#include "eal_private.h"
@@ -166,7 +168,10 @@ static void *rte_thread_init(void *arg)
pthread_barrier_destroy(¶ms->configured);
free(params);
}
+
+#ifndef RTE_EXEC_ENV_WINDOWS
__rte_trace_mem_per_thread_alloc();
+#endif
return start_routine(routine_arg);
}
--
2.25.1
next prev parent reply other threads:[~2020-04-26 16:42 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-26 3:22 [dpdk-dev] [PATCH 0/2] eal/windows: fix build by supporing trace Dmitry Kozlyuk
2020-04-26 3:22 ` [dpdk-dev] [PATCH 1/2] eal/windows: replace sys/queue.h with a complete one from FreeBSD Dmitry Kozlyuk
2020-04-26 11:14 ` Jerin Jacob
2020-04-26 3:22 ` [dpdk-dev] [PATCH 2/2] eal/windows: fix build by supporting trace Dmitry Kozlyuk
2020-04-26 11:32 ` Jerin Jacob
2020-04-26 12:02 ` Dmitry Kozlyuk
2020-04-26 12:23 ` Jerin Jacob
2020-04-26 12:36 ` Thomas Monjalon
2020-04-26 12:50 ` Dmitry Kozlyuk
2020-04-26 15:28 ` [dpdk-dev] [PATCH v2 0/3] eal/windows: fix build by enabling trace compilation Dmitry Kozlyuk
2020-04-26 15:28 ` [dpdk-dev] [PATCH v2 1/3] eal/windows: replace sys/queue.h with a complete one from FreeBSD Dmitry Kozlyuk
2020-04-26 15:28 ` [dpdk-dev] [PATCH v2 2/3] eal: add internal directory management API Dmitry Kozlyuk
2020-05-04 20:14 ` Narcisa Ana Maria Vasile
2020-04-26 15:28 ` [dpdk-dev] [PATCH v2 3/3] eal/windows: fix build by enabling trace compilation Dmitry Kozlyuk
2020-04-26 15:38 ` Thomas Monjalon
2020-04-26 16:42 ` Dmitry Kozlyuk
2020-04-26 16:41 ` Dmitry Kozlyuk [this message]
2020-04-26 17:46 ` [dpdk-dev] [PATCH v3] eal: disable tracing on Windows Jerin Jacob
2020-04-26 18:10 ` Thomas Monjalon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200426164153.2512126-1-dmitry.kozliuk@gmail.com \
--to=dmitry.kozliuk@gmail.com \
--cc=Narcisa.Vasile@microsoft.com \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=jerinj@marvell.com \
--cc=pallavi.kadam@intel.com \
--cc=ranjit.menon@intel.com \
--cc=skori@marvell.com \
--cc=thomas@monjalon.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).