You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "Gary-Hobson (via GitHub)" <gi...@apache.org> on 2024/10/09 12:30:58 UTC
[PR] system/gprof: Support gprof tool [nuttx-apps]
Gary-Hobson opened a new pull request, #2665:
URL: https://github.com/apache/nuttx-apps/pull/2665
## Summary
It can perform statistics on running hot spots or record function calls
arm-none-eabi-gprof nuttx/nuttx gmon.out -b
Flat profile:
```
Each sample counts as 0.001 seconds.
% cumulative self self total
time seconds seconds calls s/call s/call name
66.41 3.55 3.55 43 0.08 0.08 sdelay
33.44 5.34 1.79 44 0.04 0.04 delay
0.07 5.34 0.00 up_idle
0.04 5.34 0.00 nx_start
0.02 5.34 0.00 fdtdump_main
0.02 5.34 0.00 nxsem_wait
0.00 5.34 0.00 1 0.00 5.34 hello_main
0.00 5.34 0.00 1 0.00 0.00 singal_handler
granularity: each sample hit covers 4 byte(s) for 0.02% of 5.34 seconds
index % time self children called name
0.00 5.34 1/1 nxtask_startup [2]
[1] 99.9 0.00 5.34 1 hello_main [1]
3.55 0.00 43/43 sdelay [3]
1.79 0.00 44/44 delay [4]
-----------------------------------------------
<spontaneous>
[2] 99.9 0.00 5.34 nxtask_startup [2]
0.00 5.34 1/1 hello_main [1]
-----------------------------------------------
3.55 0.00 43/43 hello_main [1]
[3] 66.4 3.55 0.00 43 sdelay [3]
-----------------------------------------------
1.79 0.00 44/44 hello_main [1]
[4] 33.4 1.79 0.00 44 delay [4]
-----------------------------------------------
<spontaneous>
[5] 0.1 0.00 0.00 up_idle [5]
-----------------------------------------------
<spontaneous>
[6] 0.0 0.00 0.00 nx_start [6]
-----------------------------------------------
<spontaneous>
[7] 0.0 0.00 0.00 fdtdump_main [7]
-----------------------------------------------
<spontaneous>
[8] 0.0 0.00 0.00 nxsem_wait [8]
-----------------------------------------------
0.00 0.00 1/1 nxsig_deliver [3553]
[9] 0.0 0.00 0.00 1 singal_handler [9]
-----------------------------------------------
Index by function name
[4] delay [6] nx_start [9] singal_handler
[7] fdtdump_main [8] nxsem_wait [5] up_idle
[1] hello_main [3] sdelay
```
Depends on https://github.com/apache/nuttx/pull/13999
## Impact
## Testing
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] system/gprof: Support gprof tool [nuttx-apps]
Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 merged PR #2665:
URL: https://github.com/apache/nuttx-apps/pull/2665
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] system/gprof: Support gprof tool [nuttx-apps]
Posted by "nuttxpr (via GitHub)" <gi...@apache.org>.
nuttxpr commented on PR #2665:
URL: https://github.com/apache/nuttx-apps/pull/2665#issuecomment-2402202642
[**\[Experimental Bot, please feedback here\]**](https://github.com/search?q=repo%3Aapache%2Fnuttx+13552&type=issues)
Let's break down whether this Pull Request (PR) description meets NuttX's requirements.
**Summary:**
* **Why is the change necessary?** The summary states it adds profiling capability which is useful, but doesn't explicitly state a problem this solves (e.g., "Performance analysis was difficult...").
* **What is being changed?** This is unclear. Mentioning "gprof" implies toolchain changes, but it's not specific to NuttX code.
* **How does it work?** The output example is helpful, but a high-level description of how profiling is enabled/used is missing.
* **Related issues:** The dependency on another PR is noted, but are there user-facing issues this addresses?
**Impact:**
* Most fields are left blank. This is where you meticulously detail consequences:
* **New feature?** Definitely YES, describe it!
* **User impact?** Likely YES, how do they enable/use profiling?
* **Build impact?** Maybe YES (new config options?), maybe NO if transparent
* **Hardware impact?** Unlikely, but state it explicitly if so
* **Documentation?** Crucially YES, this needs user guides
* **Security?** Profiling *can* have implications if data is exposed, analyze
* **Compatibility?** Unlikely to break things, but be thorough
**Testing:**
* **Insufficient**. Provide:
* Host OS, compiler versions used for building NuttX *itself*
* Target architecture and board configuration where profiling was tested
* Logs should show:
* How profiling was enabled
* Relevant commands run (not just gprof's output)
* Evidence that results are as expected (did it catch the intended hotspots?)
**Verdict:**
This PR description is **incomplete**. It highlights a valuable feature but lacks the detail and rigor that NuttX requires. Addressing the points above will make it much stronger.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org