patch 'trace: fix metadata dump' has been queued to stable release 20.11.7

luca.boccassi at gmail.com luca.boccassi at gmail.com
Sat Nov 5 18:11:05 CET 2022


Hi,

FYI, your patch has been queued to stable release 20.11.7

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/07/22. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/db083f78abf44f454c667fcdb5693d0b8112d02a

Thanks.

Luca Boccassi

---
>From db083f78abf44f454c667fcdb5693d0b8112d02a Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand at redhat.com>
Date: Thu, 15 Sep 2022 13:35:46 +0200
Subject: [PATCH] trace: fix metadata dump

[ upstream commit d4cbbee345e2ea1126f3f43cbc1fedaf1245feb0 ]

The API does not describe that metadata dump is conditioned to enabling
any trace points.

While at it, merge dump unit tests into the generic trace_autotest to
enhance coverage.

Fixes: f6b2d65dcd5d ("trace: implement debug dump")

Signed-off-by: David Marchand <david.marchand at redhat.com>
Acked-by: Sunil Kumar Kori <skori at marvell.com>
---
 app/test/test_trace.c                        | 36 +++++++++++---------
 lib/librte_eal/common/eal_common_trace_ctf.c |  3 --
 2 files changed, 19 insertions(+), 20 deletions(-)

diff --git a/app/test/test_trace.c b/app/test/test_trace.c
index f62a385af9..4dd083fedc 100644
--- a/app/test/test_trace.c
+++ b/app/test/test_trace.c
@@ -189,6 +189,23 @@ test_generic_trace_points(void)
 	return TEST_SUCCESS;
 }
 
+static int
+test_trace_dump(void)
+{
+	rte_trace_dump(stdout);
+	return 0;
+}
+
+REGISTER_TEST_COMMAND(trace_dump, test_trace_dump);
+
+static int
+test_trace_metadata_dump(void)
+{
+	return rte_trace_metadata_dump(stdout);
+}
+
+REGISTER_TEST_COMMAND(trace_metadata_dump, test_trace_metadata_dump);
+
 static struct unit_test_suite trace_tests = {
 	.suite_name = "trace autotest",
 	.setup = NULL,
@@ -201,6 +218,8 @@ static struct unit_test_suite trace_tests = {
 		TEST_CASE(test_trace_point_globbing),
 		TEST_CASE(test_trace_point_regex),
 		TEST_CASE(test_trace_points_lookup),
+		TEST_CASE(test_trace_dump),
+		TEST_CASE(test_trace_metadata_dump),
 		TEST_CASES_END()
 	}
 };
@@ -212,20 +231,3 @@ test_trace(void)
 }
 
 REGISTER_TEST_COMMAND(trace_autotest, test_trace);
-
-static int
-test_trace_dump(void)
-{
-	rte_trace_dump(stdout);
-	return 0;
-}
-
-REGISTER_TEST_COMMAND(trace_dump, test_trace_dump);
-
-static int
-test_trace_metadata_dump(void)
-{
-	return rte_trace_metadata_dump(stdout);
-}
-
-REGISTER_TEST_COMMAND(trace_metadata_dump, test_trace_metadata_dump);
diff --git a/lib/librte_eal/common/eal_common_trace_ctf.c b/lib/librte_eal/common/eal_common_trace_ctf.c
index 33e419aac7..94726817b2 100644
--- a/lib/librte_eal/common/eal_common_trace_ctf.c
+++ b/lib/librte_eal/common/eal_common_trace_ctf.c
@@ -359,9 +359,6 @@ rte_trace_metadata_dump(FILE *f)
 	char *ctf_meta = trace->ctf_meta;
 	int rc;
 
-	if (!rte_trace_is_enabled())
-		return 0;
-
 	if (ctf_meta == NULL)
 		return -EINVAL;
 
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-11-05 17:11:09.278007086 +0000
+++ 0006-trace-fix-metadata-dump.patch	2022-11-05 17:11:08.574940495 +0000
@@ -1 +1 @@
-From d4cbbee345e2ea1126f3f43cbc1fedaf1245feb0 Mon Sep 17 00:00:00 2001
+From db083f78abf44f454c667fcdb5693d0b8112d02a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d4cbbee345e2ea1126f3f43cbc1fedaf1245feb0 ]
+
@@ -13 +14,0 @@
-Cc: stable at dpdk.org
@@ -18,3 +19,3 @@
- app/test/test_trace.c                 | 44 +++++++++------------------
- lib/eal/common/eal_common_trace_ctf.c |  3 --
- 2 files changed, 15 insertions(+), 32 deletions(-)
+ app/test/test_trace.c                        | 36 +++++++++++---------
+ lib/librte_eal/common/eal_common_trace_ctf.c |  3 --
+ 2 files changed, 19 insertions(+), 20 deletions(-)
@@ -23 +24 @@
-index 2660f52f1d..6bedf14024 100644
+index f62a385af9..4dd083fedc 100644
@@ -26,22 +27 @@
-@@ -20,20 +20,6 @@ test_trace(void)
- 	return TEST_SKIPPED;
- }
- 
--static int
--test_trace_dump(void)
--{
--	printf("trace_dump not supported on Windows, skipping test\n");
--	return TEST_SKIPPED;
--}
--
--static int
--test_trace_metadata_dump(void)
--{
--	printf("trace_metadata_dump not supported on Windows, skipping test\n");
--	return TEST_SKIPPED;
--}
--
- #else
- 
- static int32_t
-@@ -214,6 +200,19 @@ test_generic_trace_points(void)
+@@ -189,6 +189,23 @@ test_generic_trace_points(void)
@@ -57,0 +38,2 @@
++REGISTER_TEST_COMMAND(trace_dump, test_trace_dump);
++
@@ -63,0 +46,2 @@
++REGISTER_TEST_COMMAND(trace_metadata_dump, test_trace_metadata_dump);
++
@@ -67 +51 @@
-@@ -226,6 +225,8 @@ static struct unit_test_suite trace_tests = {
+@@ -201,6 +218,8 @@ static struct unit_test_suite trace_tests = {
@@ -76,2 +60 @@
-@@ -236,21 +237,6 @@ test_trace(void)
- 	return unit_test_suite_runner(&trace_tests);
+@@ -212,20 +231,3 @@ test_trace(void)
@@ -79,0 +63,2 @@
+ REGISTER_TEST_COMMAND(trace_autotest, test_trace);
+-
@@ -86,0 +72,2 @@
+-REGISTER_TEST_COMMAND(trace_dump, test_trace_dump);
+-
@@ -93,4 +79,0 @@
- #endif /* !RTE_EXEC_ENV_WINDOWS */
- 
- REGISTER_TEST_COMMAND(trace_autotest, test_trace);
--REGISTER_TEST_COMMAND(trace_dump, test_trace_dump);
@@ -98,5 +81,5 @@
-diff --git a/lib/eal/common/eal_common_trace_ctf.c b/lib/eal/common/eal_common_trace_ctf.c
-index 335932a271..c6775c3b4d 100644
---- a/lib/eal/common/eal_common_trace_ctf.c
-+++ b/lib/eal/common/eal_common_trace_ctf.c
-@@ -358,9 +358,6 @@ rte_trace_metadata_dump(FILE *f)
+diff --git a/lib/librte_eal/common/eal_common_trace_ctf.c b/lib/librte_eal/common/eal_common_trace_ctf.c
+index 33e419aac7..94726817b2 100644
+--- a/lib/librte_eal/common/eal_common_trace_ctf.c
++++ b/lib/librte_eal/common/eal_common_trace_ctf.c
+@@ -359,9 +359,6 @@ rte_trace_metadata_dump(FILE *f)


More information about the stable mailing list