* [PATCH] trace: fix metadata dump
@ 2022-11-24 8:12 David Marchand
2022-11-28 9:27 ` David Marchand
0 siblings, 1 reply; 4+ messages in thread
From: David Marchand @ 2022-11-24 8:12 UTC (permalink / raw)
To: stable; +Cc: ktraynor, Sunil Kumar Kori, Jerin Jacob
[ 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@redhat.com>
Acked-by: Sunil Kumar Kori <skori@marvell.com>
---
app/test/test_trace.c | 32 +++++++++++++--------------
lib/eal/common/eal_common_trace_ctf.c | 3 ---
2 files changed, 15 insertions(+), 20 deletions(-)
diff --git a/app/test/test_trace.c b/app/test/test_trace.c
index f62a385af9..7f07de1aa6 100644
--- a/app/test/test_trace.c
+++ b/app/test/test_trace.c
@@ -189,6 +189,19 @@ test_generic_trace_points(void)
return TEST_SUCCESS;
}
+static int
+test_trace_dump(void)
+{
+ rte_trace_dump(stdout);
+ return 0;
+}
+
+static int
+test_trace_metadata_dump(void)
+{
+ return rte_trace_metadata_dump(stdout);
+}
+
static struct unit_test_suite trace_tests = {
.suite_name = "trace autotest",
.setup = NULL,
@@ -201,6 +214,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 +227,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/eal/common/eal_common_trace_ctf.c b/lib/eal/common/eal_common_trace_ctf.c
index 33e419aac7..94726817b2 100644
--- a/lib/eal/common/eal_common_trace_ctf.c
+++ b/lib/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.38.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] trace: fix metadata dump
2022-11-24 8:12 [PATCH] trace: fix metadata dump David Marchand
@ 2022-11-28 9:27 ` David Marchand
2022-11-28 10:12 ` Kevin Traynor
0 siblings, 1 reply; 4+ messages in thread
From: David Marchand @ 2022-11-28 9:27 UTC (permalink / raw)
To: ktraynor; +Cc: stable, Sunil Kumar Kori, Jerin Jacob
On Thu, Nov 24, 2022 at 9:12 AM David Marchand
<david.marchand@redhat.com> wrote:
>
> [ 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@redhat.com>
> Acked-by: Sunil Kumar Kori <skori@marvell.com>
It is meant for 21.11, but I forgot to make it clear in the title prefix.
Do you want me to resend?
--
David Marchand
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] trace: fix metadata dump
2022-11-28 9:27 ` David Marchand
@ 2022-11-28 10:12 ` Kevin Traynor
2022-11-29 11:55 ` Kevin Traynor
0 siblings, 1 reply; 4+ messages in thread
From: Kevin Traynor @ 2022-11-28 10:12 UTC (permalink / raw)
To: David Marchand; +Cc: stable, Sunil Kumar Kori, Jerin Jacob
On 28/11/2022 09:27, David Marchand wrote:
> On Thu, Nov 24, 2022 at 9:12 AM David Marchand
> <david.marchand@redhat.com> wrote:
>>
>> [ 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@redhat.com>
>> Acked-by: Sunil Kumar Kori <skori@marvell.com>
>
> It is meant for 21.11, but I forgot to make it clear in the title prefix.
> Do you want me to resend?
>
>
No need. It is already pushed to 21.11-staging branch. If any of the
other maintainers spot it in the mailing list, they will be able to read
the clarification in the thead. Thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] trace: fix metadata dump
2022-11-28 10:12 ` Kevin Traynor
@ 2022-11-29 11:55 ` Kevin Traynor
0 siblings, 0 replies; 4+ messages in thread
From: Kevin Traynor @ 2022-11-29 11:55 UTC (permalink / raw)
To: David Marchand; +Cc: stable, Sunil Kumar Kori, Jerin Jacob
On 28/11/2022 10:12, Kevin Traynor wrote:
> On 28/11/2022 09:27, David Marchand wrote:
>> On Thu, Nov 24, 2022 at 9:12 AM David Marchand
>> <david.marchand@redhat.com> wrote:
>>>
>>> [ 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@redhat.com>
>>> Acked-by: Sunil Kumar Kori <skori@marvell.com>
>>
>> It is meant for 21.11, but I forgot to make it clear in the title prefix.
>> Do you want me to resend?
>>
>>
>
> No need. It is already pushed to 21.11-staging branch. If any of the
> other maintainers spot it in the mailing list, they will be able to read
> the clarification in the thead. Thanks.
Pushed to 21.11 branch now. Thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-11-29 11:55 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-24 8:12 [PATCH] trace: fix metadata dump David Marchand
2022-11-28 9:27 ` David Marchand
2022-11-28 10:12 ` Kevin Traynor
2022-11-29 11:55 ` Kevin Traynor
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).