to remove TODO
cover to remove TODO
As discussed in https://xenomai.org/pipermail/xenomai/2021-November/046803.html
1. improve xntrace_user_stop
2. remove TODO and return -ENOSYS directly for unportable features
Hongzhan Chen (2):
cobalt/trace: dovetail: improve xntrace_user_stop to replace TODO cobalt/trace: dovetail: remove TODO and return -ENOSYS for unportable
features
.../cobalt/kernel/dovetail/pipeline/trace.h | 21 +++++++------------ 1 file changed, 8 insertions(+), 13 deletions(-)
Signature · 1 line
2.17.1
PATCH 1/2 cobalt/trace: dovetail: improve xntrace_user_stop to replace TODO
xntrace_user_stop is widely similar to xntrace_user_freeze, call trace_cobalt_trigger to improve it.
--- include/cobalt/kernel/dovetail/pipeline/trace.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
include/cobalt/kernel/dovetail/pipeline/trace.h +2 -1
@@ -51,7 +51,8 @@ static inline int xntrace_user_start(void)static inline int xntrace_user_stop (unsigned long v) { -TODO (); +trace_cobalt_trace_longval (0 , v); +trace_cobalt_trigger ("user-stop" );return 0 ; }
Signature · 1 line
2.17.1
PATCH 2/2 cobalt/trace: dovetail: remove TODO and return -ENOSYS for unportable features
In reply to Hongzhan ChenSome of the features are unportable because ftrace does not provide equivalent functionality to the ipipe tracer (namely double buffering so that you can continue to record in flight-recorder mode while a previous recording remains available).
We remove TODO to pass allyesconfig make.
--- .../cobalt/kernel/dovetail/pipeline/trace.h | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-)
include/cobalt/kernel/dovetail/pipeline/trace.h +6 -12
@@ -27,26 +27,22 @@static inline int xntrace_max_begin (unsigned long v) { -TODO (); -return 0 ; +return -ENOSYS ; }static inline int xntrace_max_end (unsigned long v) { -TODO (); -return 0 ; +return -ENOSYS ; }static inline int xntrace_max_reset (void ) { -TODO (); -return 0 ; +return -ENOSYS ; }static inline int xntrace_user_start (void ) { -TODO (); -return 0 ; +return -ENOSYS ; }static inline int xntrace_user_stop (unsigned long v)
@@ -96,14 +92,12 @@ static inline int xntrace_tick(unsigned long delay_ticks) /* ns */static inline int xntrace_panic_freeze (void ) { -TODO (); -return 0 ; +return -ENOSYS ; }static inline int xntrace_panic_dump (void ) { -TODO (); -return 0 ; +return -ENOSYS ; }static inline bool xntrace_enabled (void )
Signature · 1 line
2.17.1
Re: [PATCH 1/2] cobalt/trace: dovetail: improve xntrace_user_stop to replace TODO
In reply to Hongzhan ChenQuoted 14 lines · Hongzhan Chen via Xenomai
xntrace_user_stopis widely similar toxntrace_user_freeze, calltrace_cobalt_triggerto improve it.Signed-off-by Hongzhan Chen <[email protected]>--- include/cobalt/kernel/dovetail/pipeline/trace.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)include/cobalt/kernel/dovetail/pipeline/trace.h +0
-0
include/cobalt/kernel/dovetail/pipeline/trace.h static inline int xntrace_user_start(void) · line 58
Quoted 9 lines
include/cobalt/kernel/dovetail/pipeline/trace.h +2
-1@@ -51,7 +51,8 @@ static inline int xntrace_user_start(void)static inline int xntrace_user_stop (unsigned long v) { -TODO (); +trace_cobalt_trace_longval (0 , v); +trace_cobalt_trigger ("user-stop" );return 0 ; }
Let's also make xntrace_user_start visible - trace_cobalt_trigger("user-start") - and let it return 0 so that user_stop is not "unbalanced".
Rest looks good.
Jan
Signature · 2 lines
Siemens AG, T RDA IOT Corporate Competence Center Embedded Linux