All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] to remove TODO
@ 2021-11-24  1:40 Hongzhan Chen
  2021-11-24  1:40 ` [PATCH 1/2] cobalt/trace: dovetail: improve xntrace_user_stop to replace TODO Hongzhan Chen
  2021-11-24  1:40 ` [PATCH 2/2] cobalt/trace: dovetail: remove TODO and return -ENOSYS for unportable features Hongzhan Chen
  0 siblings, 2 replies; 4+ messages in thread
From: Hongzhan Chen @ 2021-11-24  1:40 UTC (permalink / raw)
  To: xenomai

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(-)

-- 
2.17.1



^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/2] cobalt/trace: dovetail: improve xntrace_user_stop to replace TODO
  2021-11-24  1:40 [PATCH 0/2] to remove TODO Hongzhan Chen
@ 2021-11-24  1:40 ` Hongzhan Chen
  2021-11-25 10:03   ` Jan Kiszka
  2021-11-24  1:40 ` [PATCH 2/2] cobalt/trace: dovetail: remove TODO and return -ENOSYS for unportable features Hongzhan Chen
  1 sibling, 1 reply; 4+ messages in thread
From: Hongzhan Chen @ 2021-11-24  1:40 UTC (permalink / raw)
  To: xenomai

xntrace_user_stop is widely similar to xntrace_user_freeze, call
trace_cobalt_trigger to improve it.

Signed-off-by: Hongzhan Chen <hongzhan.chen@intel.com>
---
 include/cobalt/kernel/dovetail/pipeline/trace.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/include/cobalt/kernel/dovetail/pipeline/trace.h b/include/cobalt/kernel/dovetail/pipeline/trace.h
index 513d9b48b..68b5fdb23 100644
--- a/include/cobalt/kernel/dovetail/pipeline/trace.h
+++ b/include/cobalt/kernel/dovetail/pipeline/trace.h
@@ -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;
 }
 
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] cobalt/trace: dovetail: remove TODO and return -ENOSYS for unportable features
  2021-11-24  1:40 [PATCH 0/2] to remove TODO Hongzhan Chen
  2021-11-24  1:40 ` [PATCH 1/2] cobalt/trace: dovetail: improve xntrace_user_stop to replace TODO Hongzhan Chen
@ 2021-11-24  1:40 ` Hongzhan Chen
  1 sibling, 0 replies; 4+ messages in thread
From: Hongzhan Chen @ 2021-11-24  1:40 UTC (permalink / raw)
  To: xenomai

Some 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.

Signed-off-by: Hongzhan Chen <hongzhan.chen@intel.com>
---
 .../cobalt/kernel/dovetail/pipeline/trace.h    | 18 ++++++------------
 1 file changed, 6 insertions(+), 12 deletions(-)

diff --git a/include/cobalt/kernel/dovetail/pipeline/trace.h b/include/cobalt/kernel/dovetail/pipeline/trace.h
index 68b5fdb23..1a2e86cc1 100644
--- a/include/cobalt/kernel/dovetail/pipeline/trace.h
+++ b/include/cobalt/kernel/dovetail/pipeline/trace.h
@@ -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)
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/2] cobalt/trace: dovetail: improve xntrace_user_stop to replace TODO
  2021-11-24  1:40 ` [PATCH 1/2] cobalt/trace: dovetail: improve xntrace_user_stop to replace TODO Hongzhan Chen
@ 2021-11-25 10:03   ` Jan Kiszka
  0 siblings, 0 replies; 4+ messages in thread
From: Jan Kiszka @ 2021-11-25 10:03 UTC (permalink / raw)
  To: Hongzhan Chen, xenomai

On 24.11.21 02:40, Hongzhan Chen via Xenomai wrote:
> xntrace_user_stop is widely similar to xntrace_user_freeze, call
> trace_cobalt_trigger to improve it.
> 
> Signed-off-by: Hongzhan Chen <hongzhan.chen@intel.com>
> ---
>  include/cobalt/kernel/dovetail/pipeline/trace.h | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/include/cobalt/kernel/dovetail/pipeline/trace.h b/include/cobalt/kernel/dovetail/pipeline/trace.h
> index 513d9b48b..68b5fdb23 100644
> --- a/include/cobalt/kernel/dovetail/pipeline/trace.h
> +++ b/include/cobalt/kernel/dovetail/pipeline/trace.h
> @@ -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

-- 
Siemens AG, T RDA IOT
Corporate Competence Center Embedded Linux


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-11-25 10:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-24  1:40 [PATCH 0/2] to remove TODO Hongzhan Chen
2021-11-24  1:40 ` [PATCH 1/2] cobalt/trace: dovetail: improve xntrace_user_stop to replace TODO Hongzhan Chen
2021-11-25 10:03   ` Jan Kiszka
2021-11-24  1:40 ` [PATCH 2/2] cobalt/trace: dovetail: remove TODO and return -ENOSYS for unportable features Hongzhan Chen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.