You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nuttx.apache.org by Yu...@sony.com on 2021/01/05 07:33:18 UTC

RE: Nuttx Task Trace

Hi Sebastian,

I had mainly tested NuttX Task Trace with spresense:nsh and maix-bit:nsh.
I confirmed the feature by the latest source code by changing the following configs and found that it still works.
If possible, would you share the configuration to get the error ?

diff boards/arm/cxd56xx/spresense/configs/nsh/defconfig boards/arm/cxd56xx/spresense/configs/nsh-trace/defconfig
28a29,30
> CONFIG_DRIVER_NOTE=y
> CONFIG_DRIVER_NOTECTL=y
45c47,50
< CONFIG_SCHED_WAITPID=y
---
> CONFIG_SCHED_INSTRUMENTATION=y
> CONFIG_SCHED_INSTRUMENTATION_FILTER=y
> CONFIG_SCHED_INSTRUMENTATION_IRQHANDLER=y
> CONFIG_SCHED_INSTRUMENTATION_SYSCALL=y
52a58,59
> CONFIG_SYSTEM_SYSTEM=y
> CONFIG_SYSTEM_TRACE=y

Thanks,
Yuuichi Nakamura

-----Original Message-----
From: Sebastian Glatz <se...@voliro.com> 
Sent: Wednesday, December 30, 2020 9:49 PM
To: dev@nuttx.apache.org
Subject: Nuttx Task Trace

Hi all,

I want to set up *NuttX Task Trace *to profile and debug performance related issues of our PX4 modification.

For that I have followed this description:
https://nuttx.apache.org/docs/latest/guides/tasktraceuser.html#nuttx-kernel-configuration
I have edited the .config file. I tried it for both the PX4 project (running on Pixhawk 4) and a plain STM32 blink LED app (running on STM32 Blue Pill). Neither would build with those kernel configurations in place.

I would get make errors like this:
make[3]: Entering directory '~/nuttx/apps/system/trace'
CC: trace.c
<command-line>:0:6: error: expected identifier or '(' before numeric constant

Has someone successfully used NuttX Task Trace? How did you proceed?
Also does anyone have some comments on my error message?

Best,
Seb

RE: Nuttx Task Trace

Posted by Yu...@sony.com.
Dear Sebastian,

> NuttX/nuttx/include/sys/syscall_lookup.h:350:18: error: attempt to use poisoned "getenv"

PX4 project seems to prohibit some APIs by using GCC #pragma in src/include/visibility.h
#pragma GCC poison getenv setenv putenv

Because NuttX Task Trace creates wrappers for all APIs to get syscall trace, the prohibited APIs by pragma will be used.
If you have no need to use syscall trace, removing “CONFIG_SCHED_INSTRUMENTATION_SYSCALL=y” may solve the problem.
Or, the PX4 project build system may should be fixed not to include visibility.h when compiling the NuttX kernel code.
Anyway, basically it seems the matter of PX4 project. I’m not familiar with the project, sorry.

Thanks,
Yuuichi Nakamura


From: Sebastian Glatz <se...@voliro.com>
Sent: Thursday, January 7, 2021 11:00 PM
To: dev@nuttx.apache.org
Cc: Nakamura, Yuuichi (Sony) <Yu...@sony.com>
Subject: Re: Nuttx Task Trace

Dear Yuuichi
I have changed the configuration by invoking: make px4_fmu-v5_default menuconfig
The corresponding configfile is: PX4-Autopilot/boards/px4/fmu-v5/nuttx-config/nsh/defconfig
With these changes:
+CONFIG_DRIVER_NOTE=y
+CONFIG_DRIVER_NOTECTL=y
-CONFIG_SCHED_INSTRUMENTATION_EXTERNAL=y
+CONFIG_SCHED_INSTRUMENTATION_FILTER=y
+CONFIG_SCHED_INSTRUMENTATION_IRQHANDLER=y
+CONFIG_SCHED_INSTRUMENTATION_SYSCALL=y
-CONFIG_SCHED_WAITPID=y
+CONFIG_SYSTEM_SYSTEM=y
+CONFIG_SYSTEM_TRACE=y
Then when I build the target: make px4_fmu-v5_default
I would get errors in the autogenerated code, such as:
NuttX/nuttx/include/sys/syscall_lookup.h:350:18: error: attempt to use poisoned "getenv"
If you have any ideas what I could try, please let me know.

Thank you,
Sebastian

On Tue, Jan 5, 2021 at 8:33 AM <Yu...@sony.com>> wrote:
Hi Sebastian,

I had mainly tested NuttX Task Trace with spresense:nsh and maix-bit:nsh.
I confirmed the feature by the latest source code by changing the following configs and found that it still works.
If possible, would you share the configuration to get the error ?

diff boards/arm/cxd56xx/spresense/configs/nsh/defconfig boards/arm/cxd56xx/spresense/configs/nsh-trace/defconfig
28a29,30
> CONFIG_DRIVER_NOTE=y
> CONFIG_DRIVER_NOTECTL=y
45c47,50
< CONFIG_SCHED_WAITPID=y
---
> CONFIG_SCHED_INSTRUMENTATION=y
> CONFIG_SCHED_INSTRUMENTATION_FILTER=y
> CONFIG_SCHED_INSTRUMENTATION_IRQHANDLER=y
> CONFIG_SCHED_INSTRUMENTATION_SYSCALL=y
52a58,59
> CONFIG_SYSTEM_SYSTEM=y
> CONFIG_SYSTEM_TRACE=y

Thanks,
Yuuichi Nakamura

-----Original Message-----
From: Sebastian Glatz <se...@voliro.com>>
Sent: Wednesday, December 30, 2020 9:49 PM
To: dev@nuttx.apache.org<ma...@nuttx.apache.org>
Subject: Nuttx Task Trace

Hi all,

I want to set up *NuttX Task Trace *to profile and debug performance related issues of our PX4 modification.

For that I have followed this description:
https://nuttx.apache.org/docs/latest/guides/tasktraceuser.html#nuttx-kernel-configuration
I have edited the .config file. I tried it for both the PX4 project (running on Pixhawk 4) and a plain STM32 blink LED app (running on STM32 Blue Pill). Neither would build with those kernel configurations in place.

I would get make errors like this:
make[3]: Entering directory '~/nuttx/apps/system/trace'
CC: trace.c
<command-line>:0:6: error: expected identifier or '(' before numeric constant

Has someone successfully used NuttX Task Trace? How did you proceed?
Also does anyone have some comments on my error message?

Best,
Seb


--
[Voliro AG]
Sebastian Glatz
Robotics Engineer | Voliro AG
phone:  +41 44 632 41 92<tel:+41+44+632+41+92>
mobile:
site:  www.voliro.com<http://www.voliro.com/>
address:  Weinbergstrasse 35, 8092 Zurich - Switzerland
[https://storage.googleapis.com/voliro.com/linkedin.png]<https://www.linkedin.com/company/voliro-ch/>
[https://storage.googleapis.com/voliro.com/youtube.png]<https://www.youtube.com/channel/UCcwGMLl9kG_E1ZTD3QoIF5g>
[https://storage.googleapis.com/voliro.com/instagram.png]<https://www.instagram.com/voliro.airborne.robotics/?hl=en>

IMPORTANT: The contents of this email and any attachments are confidential. It is strictly forbidden to share any part of this message with any third party, without a written consent of the sender. If you received this message by mistake, please reply to this message and follow with its deletion, so that we can ensure such a mistake does not occur in the future.


Re: Nuttx Task Trace

Posted by Sebastian Glatz <se...@voliro.com>.
Dear Yuuichi

I have changed the configuration by invoking: make px4_fmu-v5_default
menuconfig
The corresponding configfile is:
PX4-Autopilot/boards/px4/fmu-v5/nuttx-config/nsh/defconfig
With these changes:
+CONFIG_DRIVER_NOTE=y
+CONFIG_DRIVER_NOTECTL=y
-CONFIG_SCHED_INSTRUMENTATION_EXTERNAL=y
+CONFIG_SCHED_INSTRUMENTATION_FILTER=y
+CONFIG_SCHED_INSTRUMENTATION_IRQHANDLER=y
+CONFIG_SCHED_INSTRUMENTATION_SYSCALL=y
-CONFIG_SCHED_WAITPID=y
+CONFIG_SYSTEM_SYSTEM=y
+CONFIG_SYSTEM_TRACE=y

Then when I build the target: make px4_fmu-v5_default
I would get errors in the autogenerated code, such as:
NuttX/nuttx/include/sys/syscall_lookup.h:350:18: error: attempt to use
poisoned "getenv"

If you have any ideas what I could try, please let me know.

Thank you,
Sebastian

On Tue, Jan 5, 2021 at 8:33 AM <Yu...@sony.com> wrote:

> Hi Sebastian,
>
> I had mainly tested NuttX Task Trace with spresense:nsh and maix-bit:nsh.
> I confirmed the feature by the latest source code by changing the
> following configs and found that it still works.
> If possible, would you share the configuration to get the error ?
>
> diff boards/arm/cxd56xx/spresense/configs/nsh/defconfig
> boards/arm/cxd56xx/spresense/configs/nsh-trace/defconfig
> 28a29,30
> > CONFIG_DRIVER_NOTE=y
> > CONFIG_DRIVER_NOTECTL=y
> 45c47,50
> < CONFIG_SCHED_WAITPID=y
> ---
> > CONFIG_SCHED_INSTRUMENTATION=y
> > CONFIG_SCHED_INSTRUMENTATION_FILTER=y
> > CONFIG_SCHED_INSTRUMENTATION_IRQHANDLER=y
> > CONFIG_SCHED_INSTRUMENTATION_SYSCALL=y
> 52a58,59
> > CONFIG_SYSTEM_SYSTEM=y
> > CONFIG_SYSTEM_TRACE=y
>
> Thanks,
> Yuuichi Nakamura
>
> -----Original Message-----
> From: Sebastian Glatz <se...@voliro.com>
> Sent: Wednesday, December 30, 2020 9:49 PM
> To: dev@nuttx.apache.org
> Subject: Nuttx Task Trace
>
> Hi all,
>
> I want to set up *NuttX Task Trace *to profile and debug performance
> related issues of our PX4 modification.
>
> For that I have followed this description:
>
> https://nuttx.apache.org/docs/latest/guides/tasktraceuser.html#nuttx-kernel-configuration
> I have edited the .config file. I tried it for both the PX4 project
> (running on Pixhawk 4) and a plain STM32 blink LED app (running on STM32
> Blue Pill). Neither would build with those kernel configurations in place.
>
> I would get make errors like this:
> make[3]: Entering directory '~/nuttx/apps/system/trace'
> CC: trace.c
> <command-line>:0:6: error: expected identifier or '(' before numeric
> constant
>
> Has someone successfully used NuttX Task Trace? How did you proceed?
> Also does anyone have some comments on my error message?
>
> Best,
> Seb
>


-- 
[image: Voliro AG]

Sebastian Glatz
Robotics Engineer | Voliro AG
phone:  +41 44 632 41 92 <+41+44+632+41+92>
mobile:
site:  www.voliro.com
address:  Weinbergstrasse 35, 8092 Zurich - Switzerland
<https://www.linkedin.com/company/voliro-ch/>
<https://www.youtube.com/channel/UCcwGMLl9kG_E1ZTD3QoIF5g>
<https://www.instagram.com/voliro.airborne.robotics/?hl=en>
IMPORTANT: The contents of this email and any attachments are confidential.
It is strictly forbidden to share any part of this message with any third
party, without a written consent of the sender. If you received this
message by mistake, please reply to this message and follow with its
deletion, so that we can ensure such a mistake does not occur in the
future.