-
Notifications
You must be signed in to change notification settings - Fork 575
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
apps/nshlib: Using lib_get_tempbuffer()
to save stack space
#2943
apps/nshlib: Using lib_get_tempbuffer()
to save stack space
#2943
Conversation
Applications should not depend on any properties of nshlib Signed-off-by: chao an <[email protected]>
LINE_MAX: apache/nuttx#15344 Signed-off-by: wangjianyu3 <[email protected]>
[Experimental Bot, please feedback here] This PR description mostly meets the NuttX requirements but could be improved. Here's a breakdown: Strengths:
Weaknesses:
Suggested Improvements: Summary
Impact
TestingI confirm that changes are verified on local setup and works as intended:
Testing logs before change:
Testing logs after change:
Stack Usage Comparison: (Include your tables as before) CI Status: [Link to CI run] or "CI passed successfully." By making these improvements, the PR description will be clearer, more complete, and better aligned with the NuttX requirements. This will make it easier for reviewers to understand and approve the changes. |
@xiaoxiang781216 @anchao Could you review this PR please? |
TODO: Remove
|
c97e003
to
07f57b3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @JianyuWang0623 amazing work squeezing every bit and byte out of hw :-)
Lets just wait for the CI to complete test builds :-)
Comparison Config: "esp32s3-devkit:adb" with `CONFIG_LINE_MAX=512` Test CMD: `ls | cat | cat | cat` Without this patch | | Before Test CMD | After Test CMD | |---------------:|----------------:|----------------:| | nsh_main.STACK | 0002624/0008096 | 0002624/0008096 | | sh.STACK | 0003360/0004008 | 0003360/0004008 | | Free/Total | 355288/403116 | 355288/403116 | With this patch | | Before Test CMD | After Test CMD | |---------------:|----------------:|----------------:| | nsh_main.STACK | 0001616/0008096 | 0001616/0008096 | | sh.STACK | 0002352/0004008 | 0002352/0004008 | | Free/Total | 355288/403116 | 354760/403116 | Signed-off-by: wangjianyu3 <[email protected]>
07f57b3
to
a2c74cf
Compare
Details: apache/nuttx-apps#2943 Signed-off-by: wangjianyu3 <[email protected]>
Details: apache/nuttx-apps#2943 1. find boards/ -name defconfig | xargs sed -i 's/CONFIG_NSH_LINELEN/CONFIG_LINE_MAX/g' 2. ./tools/refresh.sh --silent --defaults all Signed-off-by: wangjianyu3 <[email protected]>
Details: apache/nuttx-apps#2943 1. find boards/ -name defconfig | xargs sed -i 's/CONFIG_NSH_LINELEN/CONFIG_LINE_MAX/g' 2. ./tools/refresh.sh --silent --defaults all Signed-off-by: wangjianyu3 <[email protected]>
apache/nuttx#15541 apache#2943 Signed-off-by: wangjianyu3 <[email protected]>
apache#15541 apache/nuttx-apps#2943 Signed-off-by: wangjianyu3 <[email protected]>
NSH_LINELEN is replaced by POSIX standard LINE_MAX. apache/nuttx#15541 apache#2943 Signed-off-by: wangjianyu3 <[email protected]>
Details: apache/nuttx-apps#2943 1. find boards/ -name defconfig | xargs sed -i 's/CONFIG_NSH_LINELEN/CONFIG_LINE_MAX/g' 2. ./tools/refresh.sh --silent --defaults all Signed-off-by: wangjianyu3 <[email protected]>
NSH_LINELEN is replaced by POSIX standard LINE_MAX. apache/nuttx#15541 #2943 Signed-off-by: wangjianyu3 <[email protected]>
Details: apache/nuttx-apps#2943 1. find boards/ -name defconfig | xargs sed -i 's/CONFIG_NSH_LINELEN/CONFIG_LINE_MAX/g' 2. ./tools/refresh.sh --silent --defaults all Signed-off-by: wangjianyu3 <[email protected]>
NSH_LINELEN is replaced by POSIX standard LINE_MAX. apache/nuttx#15541 apache/nuttx-apps#2943 Signed-off-by: wangjianyu3 <[email protected]>
Details: apache/nuttx-apps#2943 1. find boards/ -name defconfig | xargs sed -i 's/CONFIG_NSH_LINELEN/CONFIG_LINE_MAX/g' 2. ./tools/refresh.sh --silent --defaults all Signed-off-by: wangjianyu3 <[email protected]>
NSH_LINELEN is replaced by POSIX standard LINE_MAX. apache/nuttx#15541 apache/nuttx-apps#2943 Signed-off-by: wangjianyu3 <[email protected]>
NSH_LINELEN is replaced by POSIX standard LINE_MAX. apache/nuttx#15541 apache/nuttx-apps#2943 Signed-off-by: wangjianyu3 <[email protected]>
Summary
Using
lib_get_tempbuffer()
to save stack spacelib_get_tempbuffer()
to save stack spaceCONFIG_NSH_LINELEN
toLINE_MAX
CONFIG_NSH_LINELEN
toLINE_MAX
(Picked from apps/system: replace CONFIG_NSH_LINELEN to LINE_MAX #2918 by @anchao )Impact
Testing
Config: "esp32s3-devkit:adb" with
CONFIG_LINE_MAX=512
Test CMD:
ls | cat | cat | cat
Without this patch
With this patch