Agree that we don't need provide two drivers to collect the similar 
information. It's better to incorporate the new feature and ftrace format into 
the current driver. The change may break the binary format combability but I 
think it's acceptable to get the more feature and clean implementation.

-----Original Message-----
From: Gregory Nutt <spudan...@gmail.com> 
Sent: Wednesday, June 17, 2020 10:13 AM
To: dev@nuttx.apache.org
Subject: Re: NXView


> The major differences are:
>
> - Different trace data format between the accumulated data in the memory and 
> /dev/tracer output
>    It is because to reduce the trace data size in the memory. The accumulated 
> data contains packed (not aligned) values and
>    task is recorded by its PID, not the name. The correspondence between PID 
> and task name string is hold in the separated task name buffer.
>    On the other hand, the output from /dev/tracer contains aligned words and 
> contains the task name string for each trace entries.
>    It is because easy to handle the data by the application code (nsh trace 
> command).

That is a trivial difference and there are some misconceptions.

The structures can be packed by simply adding the packed attribute to the 
structures.  That does not justify a redesign.

The current implementation does *not* use the task name, it uses the pid.  The 
task name is provided only when the task is created.  The provides the 
associated between pid and name. Thereafter only the pid is uses.

Your implementation has two much overlap and should not come upstream as a 
separate implementation.  Extensions and improvements to the existing 
implementation are welcome, however.

Greg


Reply via email to