* [dpdk-dev] [PATCH 1/2] trace: fix size_t field emitter @ 2020-08-25 23:24 pbhagavatula 2020-08-25 23:24 ` [dpdk-dev] [PATCH 2/2] trace: add size_t as a generic trace point pbhagavatula 2020-08-30 7:35 ` [dpdk-dev] [PATCH 1/2] trace: fix size_t field emitter Sunil Kumar Kori 0 siblings, 2 replies; 5+ messages in thread From: pbhagavatula @ 2020-08-25 23:24 UTC (permalink / raw) To: jerinj, Sunil Kumar Kori; +Cc: dev, Pavan Nikhilesh From: Pavan Nikhilesh <pbhagavatula@marvell.com> Add size_t CTF format metadata, this is needed by CTF analyzers to parse the emitted CTF trace. Fixes: 262c4ee791c6 ("trace: add size_t field emitter") Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com> --- lib/librte_eal/common/eal_common_trace_ctf.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/librte_eal/common/eal_common_trace_ctf.c b/lib/librte_eal/common/eal_common_trace_ctf.c index 302e2bb74..9dc91df0f 100644 --- a/lib/librte_eal/common/eal_common_trace_ctf.c +++ b/lib/librte_eal/common/eal_common_trace_ctf.c @@ -83,6 +83,11 @@ meta_data_type_emit(char **meta, int *offset) "typealias integer {size = 32; base = x;} := long;\n" #endif "typealias integer {size = 8; signed = false; encoding = ASCII; } := string_bounded_t;\n\n" +#ifdef RTE_ARCH_64 + "typealias integer {size = 64; base = x;} := size_t;\n" +#else + "typealias integer {size = 32; base = x;} := size_t;\n" +#endif "typealias floating_point {\n" " exp_dig = 8;\n" " mant_dig = 24;\n" -- 2.17.1 ^ permalink raw reply [flat|nested] 5+ messages in thread
* [dpdk-dev] [PATCH 2/2] trace: add size_t as a generic trace point 2020-08-25 23:24 [dpdk-dev] [PATCH 1/2] trace: fix size_t field emitter pbhagavatula @ 2020-08-25 23:24 ` pbhagavatula 2020-08-30 7:36 ` Sunil Kumar Kori 2020-08-30 7:35 ` [dpdk-dev] [PATCH 1/2] trace: fix size_t field emitter Sunil Kumar Kori 1 sibling, 1 reply; 5+ messages in thread From: pbhagavatula @ 2020-08-25 23:24 UTC (permalink / raw) To: jerinj, Sunil Kumar Kori, Ray Kinsella, Neil Horman; +Cc: dev, Pavan Nikhilesh From: Pavan Nikhilesh <pbhagavatula@marvell.com> Add size_t as a generic trace point. Also, update test_generic_trace_point() to validate size_t emitter. Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com> --- app/test/test_trace.c | 1 + lib/librte_eal/common/eal_common_trace_points.c | 2 ++ lib/librte_eal/include/rte_eal_trace.h | 6 ++++++ lib/librte_eal/rte_eal_version.map | 3 +++ 4 files changed, 12 insertions(+) diff --git a/app/test/test_trace.c b/app/test/test_trace.c index ddcf416b2..0f9df83c4 100644 --- a/app/test/test_trace.c +++ b/app/test/test_trace.c @@ -166,6 +166,7 @@ test_generic_trace_points(void) rte_eal_trace_generic_double(20000.5000004); rte_eal_trace_generic_ptr(&tmp); rte_eal_trace_generic_str("my string"); + rte_eal_trace_generic_size_t(sizeof(void *)); RTE_EAL_TRACE_GENERIC_FUNC; return TEST_SUCCESS; diff --git a/lib/librte_eal/common/eal_common_trace_points.c b/lib/librte_eal/common/eal_common_trace_points.c index 292ec91be..0b0b25461 100644 --- a/lib/librte_eal/common/eal_common_trace_points.c +++ b/lib/librte_eal/common/eal_common_trace_points.c @@ -36,6 +36,8 @@ 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_size_t, + lib.eal.generic.size_t) RTE_TRACE_POINT_REGISTER(rte_eal_trace_generic_func, lib.eal.generic.func) diff --git a/lib/librte_eal/include/rte_eal_trace.h b/lib/librte_eal/include/rte_eal_trace.h index 6b1a813c7..19df549d2 100644 --- a/lib/librte_eal/include/rte_eal_trace.h +++ b/lib/librte_eal/include/rte_eal_trace.h @@ -129,6 +129,12 @@ RTE_TRACE_POINT( rte_trace_point_emit_string(str); ) +RTE_TRACE_POINT( + rte_eal_trace_generic_size_t, + RTE_TRACE_POINT_ARGS(size_t sz), + rte_trace_point_emit_size_t(sz); +) + RTE_TRACE_POINT( rte_eal_trace_generic_func, RTE_TRACE_POINT_ARGS(const char *func), diff --git a/lib/librte_eal/rte_eal_version.map b/lib/librte_eal/rte_eal_version.map index 0b18e2ef8..4ccfa593f 100644 --- a/lib/librte_eal/rte_eal_version.map +++ b/lib/librte_eal/rte_eal_version.map @@ -397,6 +397,9 @@ EXPERIMENTAL { rte_mp_disable; rte_thread_register; rte_thread_unregister; + + #added in 20.11 + __rte_eal_trace_generic_size_t; }; INTERNAL { -- 2.17.1 ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH 2/2] trace: add size_t as a generic trace point 2020-08-25 23:24 ` [dpdk-dev] [PATCH 2/2] trace: add size_t as a generic trace point pbhagavatula @ 2020-08-30 7:36 ` Sunil Kumar Kori 2020-10-07 12:41 ` Thomas Monjalon 0 siblings, 1 reply; 5+ messages in thread From: Sunil Kumar Kori @ 2020-08-30 7:36 UTC (permalink / raw) To: Pavan Nikhilesh Bhagavatula, Jerin Jacob Kollanukkaran, Ray Kinsella, Neil Horman Cc: dev, Pavan Nikhilesh Bhagavatula >-----Original Message----- >From: pbhagavatula@marvell.com <pbhagavatula@marvell.com> >Sent: Wednesday, August 26, 2020 4:54 AM >To: Jerin Jacob Kollanukkaran <jerinj@marvell.com>; Sunil Kumar Kori ><skori@marvell.com>; Ray Kinsella <mdr@ashroe.eu>; Neil Horman ><nhorman@tuxdriver.com> >Cc: dev@dpdk.org; Pavan Nikhilesh Bhagavatula ><pbhagavatula@marvell.com> >Subject: [dpdk-dev] [PATCH 2/2] trace: add size_t as a generic trace point > >From: Pavan Nikhilesh <pbhagavatula@marvell.com> > >Add size_t as a generic trace point. Also, update >test_generic_trace_point() to validate size_t emitter. > >Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com> >--- > app/test/test_trace.c | 1 + > lib/librte_eal/common/eal_common_trace_points.c | 2 ++ > lib/librte_eal/include/rte_eal_trace.h | 6 ++++++ > lib/librte_eal/rte_eal_version.map | 3 +++ > 4 files changed, 12 insertions(+) > >diff --git a/app/test/test_trace.c b/app/test/test_trace.c index >ddcf416b2..0f9df83c4 100644 >--- a/app/test/test_trace.c >+++ b/app/test/test_trace.c >@@ -166,6 +166,7 @@ test_generic_trace_points(void) > rte_eal_trace_generic_double(20000.5000004); > rte_eal_trace_generic_ptr(&tmp); > rte_eal_trace_generic_str("my string"); >+ rte_eal_trace_generic_size_t(sizeof(void *)); > RTE_EAL_TRACE_GENERIC_FUNC; > > return TEST_SUCCESS; >diff --git a/lib/librte_eal/common/eal_common_trace_points.c >b/lib/librte_eal/common/eal_common_trace_points.c >index 292ec91be..0b0b25461 100644 >--- a/lib/librte_eal/common/eal_common_trace_points.c >+++ b/lib/librte_eal/common/eal_common_trace_points.c >@@ -36,6 +36,8 @@ 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_size_t, >+ lib.eal.generic.size_t) > RTE_TRACE_POINT_REGISTER(rte_eal_trace_generic_func, > lib.eal.generic.func) > >diff --git a/lib/librte_eal/include/rte_eal_trace.h >b/lib/librte_eal/include/rte_eal_trace.h >index 6b1a813c7..19df549d2 100644 >--- a/lib/librte_eal/include/rte_eal_trace.h >+++ b/lib/librte_eal/include/rte_eal_trace.h >@@ -129,6 +129,12 @@ RTE_TRACE_POINT( > rte_trace_point_emit_string(str); > ) > >+RTE_TRACE_POINT( >+ rte_eal_trace_generic_size_t, >+ RTE_TRACE_POINT_ARGS(size_t sz), >+ rte_trace_point_emit_size_t(sz); >+) >+ > RTE_TRACE_POINT( > rte_eal_trace_generic_func, > RTE_TRACE_POINT_ARGS(const char *func), diff --git >a/lib/librte_eal/rte_eal_version.map b/lib/librte_eal/rte_eal_version.map >index 0b18e2ef8..4ccfa593f 100644 >--- a/lib/librte_eal/rte_eal_version.map >+++ b/lib/librte_eal/rte_eal_version.map >@@ -397,6 +397,9 @@ EXPERIMENTAL { > rte_mp_disable; > rte_thread_register; > rte_thread_unregister; >+ >+ #added in 20.11 >+ __rte_eal_trace_generic_size_t; > }; > > INTERNAL { >-- >2.17.1 Acked-by: Sunil Kumar Kori <skori@mavell.com> ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH 2/2] trace: add size_t as a generic trace point 2020-08-30 7:36 ` Sunil Kumar Kori @ 2020-10-07 12:41 ` Thomas Monjalon 0 siblings, 0 replies; 5+ messages in thread From: Thomas Monjalon @ 2020-10-07 12:41 UTC (permalink / raw) To: Pavan Nikhilesh Bhagavatula Cc: Jerin Jacob Kollanukkaran, dev, Sunil Kumar Kori > >From: Pavan Nikhilesh <pbhagavatula@marvell.com> > > > >Add size_t as a generic trace point. Also, update > >test_generic_trace_point() to validate size_t emitter. > > > >Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com> > > Acked-by: Sunil Kumar Kori <skori@mavell.com> Applied, thanks ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH 1/2] trace: fix size_t field emitter 2020-08-25 23:24 [dpdk-dev] [PATCH 1/2] trace: fix size_t field emitter pbhagavatula 2020-08-25 23:24 ` [dpdk-dev] [PATCH 2/2] trace: add size_t as a generic trace point pbhagavatula @ 2020-08-30 7:35 ` Sunil Kumar Kori 1 sibling, 0 replies; 5+ messages in thread From: Sunil Kumar Kori @ 2020-08-30 7:35 UTC (permalink / raw) To: Pavan Nikhilesh Bhagavatula, Jerin Jacob Kollanukkaran Cc: dev, Pavan Nikhilesh Bhagavatula >-----Original Message----- >From: pbhagavatula@marvell.com <pbhagavatula@marvell.com> >Sent: Wednesday, August 26, 2020 4:54 AM >To: Jerin Jacob Kollanukkaran <jerinj@marvell.com>; Sunil Kumar Kori ><skori@marvell.com> >Cc: dev@dpdk.org; Pavan Nikhilesh Bhagavatula ><pbhagavatula@marvell.com> >Subject: [dpdk-dev] [PATCH 1/2] trace: fix size_t field emitter > >From: Pavan Nikhilesh <pbhagavatula@marvell.com> > >Add size_t CTF format metadata, this is needed by CTF analyzers to >parse the emitted CTF trace. > >Fixes: 262c4ee791c6 ("trace: add size_t field emitter") > >Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com> >--- > lib/librte_eal/common/eal_common_trace_ctf.c | 5 +++++ > 1 file changed, 5 insertions(+) > >diff --git a/lib/librte_eal/common/eal_common_trace_ctf.c >b/lib/librte_eal/common/eal_common_trace_ctf.c >index 302e2bb74..9dc91df0f 100644 >--- a/lib/librte_eal/common/eal_common_trace_ctf.c >+++ b/lib/librte_eal/common/eal_common_trace_ctf.c >@@ -83,6 +83,11 @@ meta_data_type_emit(char **meta, int *offset) > "typealias integer {size = 32; base = x;} := long;\n" > #endif > "typealias integer {size = 8; signed = false; encoding = ASCII; } >:= string_bounded_t;\n\n" >+#ifdef RTE_ARCH_64 >+ "typealias integer {size = 64; base = x;} := size_t;\n" >+#else >+ "typealias integer {size = 32; base = x;} := size_t;\n" >+#endif > "typealias floating_point {\n" > " exp_dig = 8;\n" > " mant_dig = 24;\n" >-- >2.17.1 Acked-by: Sunil Kumar Kori <skori@mavell.com> ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-10-07 12:41 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2020-08-25 23:24 [dpdk-dev] [PATCH 1/2] trace: fix size_t field emitter pbhagavatula 2020-08-25 23:24 ` [dpdk-dev] [PATCH 2/2] trace: add size_t as a generic trace point pbhagavatula 2020-08-30 7:36 ` Sunil Kumar Kori 2020-10-07 12:41 ` Thomas Monjalon 2020-08-30 7:35 ` [dpdk-dev] [PATCH 1/2] trace: fix size_t field emitter Sunil Kumar Kori
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).