Skip to content
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

Stack stats #2642

Merged
merged 7 commits into from
Sep 16, 2016
Merged

Stack stats #2642

merged 7 commits into from
Sep 16, 2016

Conversation

c1728p9
Copy link
Contributor

@c1728p9 c1728p9 commented Sep 7, 2016

Add CMSIS-OS API to get stack usage on all running Threads. Report this information at the end of testing.

@c1728p9
Copy link
Contributor Author

c1728p9 commented Sep 7, 2016

/morph test

@c1728p9
Copy link
Contributor Author

c1728p9 commented Sep 7, 2016

@mbed-bot: TEST

HOST_OSES=ALL
BUILD_TOOLCHAINS=ALL
TARGETS=ALL

@mbed-bot
Copy link

mbed-bot commented Sep 7, 2016

Result: FAILURE

Your command has finished executing! Here's what you wrote!

/morph test

Output

mbed Build Number: 781

Test failed!

@mbed-bot
Copy link

mbed-bot commented Sep 7, 2016

[Build 874]
FAILURE: Something went wrong when building and testing.

@bridadan
Copy link
Contributor

bridadan commented Sep 7, 2016

@c1728p9 There be RTX errors in there, so this was a legitimate failure!

@c1728p9
Copy link
Contributor Author

c1728p9 commented Sep 12, 2016

/morph test

@c1728p9
Copy link
Contributor Author

c1728p9 commented Sep 12, 2016

@mbed-bot: TEST

HOST_OSES=ALL
BUILD_TOOLCHAINS=ALL
TARGETS=ALL

Add the functions osThreadsEnumStart, osThreadEnumNext and
osThreadEnumFree to allow enumeration of running threads. Protect
thread creation, thread exit and thread termination with a mutex
so threads are not created or destroyed while an enumeration is
ongoing.
@mbed-bot
Copy link

Result: ABORTED

Your command has finished executing! Here's what you wrote!

/morph test

Output

mbed Build Number: 842

Build failed!

@c1728p9
Copy link
Contributor Author

c1728p9 commented Sep 12, 2016

/morph test

@mbed-bot
Copy link

Result: FAILURE

Your command has finished executing! Here's what you wrote!

/morph test

Output

mbed Build Number: 843

Test failed!

@mbed-bot
Copy link

[Build 917]
FAILURE: Something went wrong when building and testing.

Add the function osThreadGetInfo to allow various Thread information
to be queried.  This includes stack size and maximum stack usage among
other things.

Note - for Cortex-A devices the worst case stack usage is not
available.
Add an RTX hook which gets called when a thread terminates. Add
the function Thread::attach_terminate_hook() to allow users to attach
a hook to this event at runtime.
@c1728p9
Copy link
Contributor Author

c1728p9 commented Sep 13, 2016

/morph test

@c1728p9
Copy link
Contributor Author

c1728p9 commented Sep 13, 2016

@mbed-bot: TEST

HOST_OSES=ALL
BUILD_TOOLCHAINS=ALL
TARGETS=ALL

@mbed-bot
Copy link

Result: SUCCESS

Your command has finished executing! Here's what you wrote!

/morph test

Output

mbed Build Number: 851

All builds and test passed!

@mbed-bot
Copy link

[Build 921]
FAILURE: Something went wrong when building and testing.

@bridadan
Copy link
Contributor

mbed-bot is complaining about the tests that are failing to build at the moment. These should be fixed by #2682

@mbed-bot
Copy link

[Build ${MBED_BUILD_ID}]
FAILURE: Something went wrong when building and testing.

c1728p9 and others added 4 commits September 13, 2016 15:52
Initialize stack memory since this is required for stack metrics to
work.
Update greentea to report thread information when a thread exits or
is terminated and when testing completes. Also move metrics into
a dedicated greentea file.
Add a leading underscore to give an indication that the new cmsis_os
API functions are not official.
Update the Thread::start function to gracefully handle the failed
creation of a thread when there are no TCBs left. This patch does
the following:
1. Set memory handles to NULL after free to prevent double free
2. Post to the release semaphore so anything that tries to join this
    thread will join immediately
3. Remove dead return path since the new operator should never
    return NULL (it should trap instead)
@c1728p9
Copy link
Contributor Author

c1728p9 commented Sep 13, 2016

/morph test

@c1728p9
Copy link
Contributor Author

c1728p9 commented Sep 13, 2016

@mbed-bot: TEST

HOST_OSES=ALL
BUILD_TOOLCHAINS=ALL
TARGETS=ALL

@mbed-bot
Copy link

Result: SUCCESS

Your command has finished executing! Here's what you wrote!

/morph test

Output

mbed Build Number: 852

All builds and test passed!

@mbed-bot
Copy link

[Build 922]
FAILURE: Something went wrong when building and testing.

@sg- sg- merged commit 52fd7b6 into ARMmbed:master Sep 16, 2016
@sg-
Copy link
Contributor

sg- commented Sep 16, 2016

This will be part of mbed OS 5.2 and not backported to mbed OS 5.1

@RobMeades
Copy link
Contributor

RobMeades commented Sep 23, 2016

I'm integrating a new target (see aborted pull request #2705) onto mbedOS and have had to jump to head rev in which this change has been merged. With this commit in place I'm finding that rt_task_create() fails (returns 0). If I comment out the new void *argv parameter from the OS_TCB struct, rt_task_create() returns 1 and all is good. I'm using "default_lib": "small" (and hence MBED_RTOS_SINGLE_THREAD) and my OS_MAINSTKSIZE is 128 (though switching to 256 doesn't help). Any ideas what I'm doing wrong?

@sg-
Copy link
Contributor

sg- commented Sep 24, 2016

What happens if default lib is std?

@RobMeades
Copy link
Contributor

Won't fit on our platform at the moment unfortunately (we've only got 64 kbytes flash; will have 128 kbyte but not for another few weeks yet).

@RobMeades
Copy link
Contributor

Did you see the OS_TCB_SIZE thing I raised in #2786?

@RobMeades
Copy link
Contributor

I've proposed changing OS_TCB_SIZE to 64 in the above pull request. If a different fix is required, please feel free to reject the pull request.

@sg-
Copy link
Contributor

sg- commented Sep 25, 2016

Not sure how that was missed, I confirmed that the OS_TCB_SIZE was 60 in mbed-os-5.1.4 so the extra pointer needs to be accounted for. I tried to quickly protect this with a compiler assert but the structure and definition of the macro to size it turned out to not be an easy thing to do given the structure of the RTOS. Will come back to this or hope RTX v5 fixes it

@RobMeades
Copy link
Contributor

I guess you don't have have a platform with small libs on CI: that would have picked up the problem I believe. Probably worth adding one.

artokin pushed a commit to artokin/mbed-os that referenced this pull request Jun 22, 2021
…..4a3c5c5

4a3c5c5 Merge remote-tracking branch 'origin/release_internal' into release_external
2b8d2e1 Do not reset radio when MAC data request timeouts (ARMmbed#2647)
95c506a Frame counters for nw keys are now stored to NVM only after send key is set (ARMmbed#2641)
3b3010a Adjusted stagger random to [min,min+max] and for small nw set the stagger value to 10 seconds
02bc33a Adjusted security protocol (EAP-TLS,4WH,2WH) retry timers
eb26726 High Priority timestamp compare overflow support fix.
928723a FHSS WS: Initialize broadcast channel count when enabling FHSS (ARMmbed#2642)
6040d70 Updated change log
667b191 Changed initial EAPOL-key retries from trickle to exponential backup
d925145 Add RTT calculation for DHCP Time calculation
0b82953 Traceroute bug fix.
04de6e2 Merge pull request ARMmbed#2638 from PelionIoT/mbed_os_fix_ufsi_calculation
2012347 Fixed FHSS UFSI calculation unit tests
436f16e Handle timer rollover in calculate_ufsi
411cf5c coding style
d6f4421 Correct ufsi timing calculation
560619d Add network time vendor data element to DHCPv6 reply message
6d290dc System time read/write callbacks (ARMmbed#2637)
7905df6 Restart or remove transmission when MAC data request timeouts (ARMmbed#2636)
c97695c Bug fix: EAPOL parent compare fix
e283e62 Fixed channel mask usage with OFDM configurations (ARMmbed#2633)
24168f8 Do not send too old packets (ARMmbed#2632)
dbd83be Fix copyrights (ARMmbed#2631)
7f0cffd Merge pull request ARMmbed#2630 from PelionIoT/use_pelion_copyright
511bd5a Corrected coding style
57ec028 Corrected comparison
7d853de When EAPOL waiting queue is full oldest entry is removed
acf580f Update copyright in changed MDNS files
933c0bb Update copyright
3aeb2af Statistics for data request latencies (ARMmbed#2629)
3f7eae6 EAPOL FHSS temp entry discover
5200b66 DHCP time elapsed time write fix.
0536874 Removed empty EAPOL-key message send after 4WH completion to nodes on relay
8a2a683 Fixed DHCP wrong time elapsed value write.
283f2ee DHCPv6 update:
99be778 EAPOL temp neighbour update
4f9e3d1 Adaptation layer to remove oldest packet first
20f1f64 Added ignoring of retry messages from RADIUS server when waiting EAP-TLS
8a8b407 Add RSL check for ETX Calculation for RPL parent selection
c05e1da Fix DHCP server Uninitialized memory read
77229ee Fix CPP error from domain prefix check
7e47889 support filtering of EAPOL parents based device-min-sens configuration
618a191 Wi-SUN Expedite forward state update
4371462 Fix NULL read from RPL header addition
7802c7e Update CHANGELOG.md
b2c8104 CHANGELOG for Nanostack v13.0.0 (ARMmbed#2615)

git-subtree-dir: features/nanostack/sal-stack-nanostack
git-subtree-split: 4a3c5c5
artokin pushed a commit to artokin/mbed-os that referenced this pull request Jun 23, 2021
…903b81..4a3c5c5

4a3c5c5 Merge remote-tracking branch 'origin/release_internal' into release_external
2b8d2e1 Do not reset radio when MAC data request timeouts (ARMmbed#2647)
95c506a Frame counters for nw keys are now stored to NVM only after send key is set (ARMmbed#2641)
3b3010a Adjusted stagger random to [min,min+max] and for small nw set the stagger value to 10 seconds
02bc33a Adjusted security protocol (EAP-TLS,4WH,2WH) retry timers
eb26726 High Priority timestamp compare overflow support fix.
928723a FHSS WS: Initialize broadcast channel count when enabling FHSS (ARMmbed#2642)
6040d70 Updated change log
667b191 Changed initial EAPOL-key retries from trickle to exponential backup
d925145 Add RTT calculation for DHCP Time calculation
0b82953 Traceroute bug fix.
04de6e2 Merge pull request ARMmbed#2638 from PelionIoT/mbed_os_fix_ufsi_calculation
2012347 Fixed FHSS UFSI calculation unit tests
436f16e Handle timer rollover in calculate_ufsi
411cf5c coding style
d6f4421 Correct ufsi timing calculation
560619d Add network time vendor data element to DHCPv6 reply message
6d290dc System time read/write callbacks (ARMmbed#2637)
7905df6 Restart or remove transmission when MAC data request timeouts (ARMmbed#2636)
c97695c Bug fix: EAPOL parent compare fix
e283e62 Fixed channel mask usage with OFDM configurations (ARMmbed#2633)
24168f8 Do not send too old packets (ARMmbed#2632)
dbd83be Fix copyrights (ARMmbed#2631)
7f0cffd Merge pull request ARMmbed#2630 from PelionIoT/use_pelion_copyright
511bd5a Corrected coding style
57ec028 Corrected comparison
7d853de When EAPOL waiting queue is full oldest entry is removed
acf580f Update copyright in changed MDNS files
933c0bb Update copyright
3aeb2af Statistics for data request latencies (ARMmbed#2629)
3f7eae6 EAPOL FHSS temp entry discover
5200b66 DHCP time elapsed time write fix.
0536874 Removed empty EAPOL-key message send after 4WH completion to nodes on relay
8a2a683 Fixed DHCP wrong time elapsed value write.
283f2ee DHCPv6 update:
99be778 EAPOL temp neighbour update
4f9e3d1 Adaptation layer to remove oldest packet first
20f1f64 Added ignoring of retry messages from RADIUS server when waiting EAP-TLS
8a8b407 Add RSL check for ETX Calculation for RPL parent selection
c05e1da Fix DHCP server Uninitialized memory read
77229ee Fix CPP error from domain prefix check
7e47889 support filtering of EAPOL parents based device-min-sens configuration
618a191 Wi-SUN Expedite forward state update
4371462 Fix NULL read from RPL header addition
7802c7e Update CHANGELOG.md
b2c8104 CHANGELOG for Nanostack v13.0.0 (ARMmbed#2615)

git-subtree-dir: connectivity/nanostack/sal-stack-nanostack
git-subtree-split: 4a3c5c5
artokin pushed a commit to artokin/mbed-os that referenced this pull request Jun 28, 2021
…903b81..4a3c5c5

4a3c5c5 Merge remote-tracking branch 'origin/release_internal' into release_external
2b8d2e1 Do not reset radio when MAC data request timeouts (ARMmbed#2647)
95c506a Frame counters for nw keys are now stored to NVM only after send key is set (ARMmbed#2641)
3b3010a Adjusted stagger random to [min,min+max] and for small nw set the stagger value to 10 seconds
02bc33a Adjusted security protocol (EAP-TLS,4WH,2WH) retry timers
eb26726 High Priority timestamp compare overflow support fix.
928723a FHSS WS: Initialize broadcast channel count when enabling FHSS (ARMmbed#2642)
6040d70 Updated change log
667b191 Changed initial EAPOL-key retries from trickle to exponential backup
d925145 Add RTT calculation for DHCP Time calculation
0b82953 Traceroute bug fix.
04de6e2 Merge pull request ARMmbed#2638 from PelionIoT/mbed_os_fix_ufsi_calculation
2012347 Fixed FHSS UFSI calculation unit tests
436f16e Handle timer rollover in calculate_ufsi
411cf5c coding style
d6f4421 Correct ufsi timing calculation
560619d Add network time vendor data element to DHCPv6 reply message
6d290dc System time read/write callbacks (ARMmbed#2637)
7905df6 Restart or remove transmission when MAC data request timeouts (ARMmbed#2636)
c97695c Bug fix: EAPOL parent compare fix
e283e62 Fixed channel mask usage with OFDM configurations (ARMmbed#2633)
24168f8 Do not send too old packets (ARMmbed#2632)
dbd83be Fix copyrights (ARMmbed#2631)
7f0cffd Merge pull request ARMmbed#2630 from PelionIoT/use_pelion_copyright
511bd5a Corrected coding style
57ec028 Corrected comparison
7d853de When EAPOL waiting queue is full oldest entry is removed
acf580f Update copyright in changed MDNS files
933c0bb Update copyright
3aeb2af Statistics for data request latencies (ARMmbed#2629)
3f7eae6 EAPOL FHSS temp entry discover
5200b66 DHCP time elapsed time write fix.
0536874 Removed empty EAPOL-key message send after 4WH completion to nodes on relay
8a2a683 Fixed DHCP wrong time elapsed value write.
283f2ee DHCPv6 update:
99be778 EAPOL temp neighbour update
4f9e3d1 Adaptation layer to remove oldest packet first
20f1f64 Added ignoring of retry messages from RADIUS server when waiting EAP-TLS
8a8b407 Add RSL check for ETX Calculation for RPL parent selection
c05e1da Fix DHCP server Uninitialized memory read
77229ee Fix CPP error from domain prefix check
7e47889 support filtering of EAPOL parents based device-min-sens configuration
618a191 Wi-SUN Expedite forward state update
4371462 Fix NULL read from RPL header addition
7802c7e Update CHANGELOG.md
b2c8104 CHANGELOG for Nanostack v13.0.0 (ARMmbed#2615)

git-subtree-dir: connectivity/nanostack/sal-stack-nanostack
git-subtree-split: 4a3c5c5
artokin pushed a commit to artokin/mbed-os that referenced this pull request Jun 28, 2021
…..4a3c5c5

4a3c5c5 Merge remote-tracking branch 'origin/release_internal' into release_external
2b8d2e1 Do not reset radio when MAC data request timeouts (ARMmbed#2647)
95c506a Frame counters for nw keys are now stored to NVM only after send key is set (ARMmbed#2641)
3b3010a Adjusted stagger random to [min,min+max] and for small nw set the stagger value to 10 seconds
02bc33a Adjusted security protocol (EAP-TLS,4WH,2WH) retry timers
eb26726 High Priority timestamp compare overflow support fix.
928723a FHSS WS: Initialize broadcast channel count when enabling FHSS (ARMmbed#2642)
6040d70 Updated change log
667b191 Changed initial EAPOL-key retries from trickle to exponential backup
d925145 Add RTT calculation for DHCP Time calculation
0b82953 Traceroute bug fix.
04de6e2 Merge pull request ARMmbed#2638 from PelionIoT/mbed_os_fix_ufsi_calculation
2012347 Fixed FHSS UFSI calculation unit tests
436f16e Handle timer rollover in calculate_ufsi
411cf5c coding style
d6f4421 Correct ufsi timing calculation
560619d Add network time vendor data element to DHCPv6 reply message
6d290dc System time read/write callbacks (ARMmbed#2637)
7905df6 Restart or remove transmission when MAC data request timeouts (ARMmbed#2636)
c97695c Bug fix: EAPOL parent compare fix
e283e62 Fixed channel mask usage with OFDM configurations (ARMmbed#2633)
24168f8 Do not send too old packets (ARMmbed#2632)
dbd83be Fix copyrights (ARMmbed#2631)
7f0cffd Merge pull request ARMmbed#2630 from PelionIoT/use_pelion_copyright
511bd5a Corrected coding style
57ec028 Corrected comparison
7d853de When EAPOL waiting queue is full oldest entry is removed
acf580f Update copyright in changed MDNS files
933c0bb Update copyright
3aeb2af Statistics for data request latencies (ARMmbed#2629)
3f7eae6 EAPOL FHSS temp entry discover
5200b66 DHCP time elapsed time write fix.
0536874 Removed empty EAPOL-key message send after 4WH completion to nodes on relay
8a2a683 Fixed DHCP wrong time elapsed value write.
283f2ee DHCPv6 update:
99be778 EAPOL temp neighbour update
4f9e3d1 Adaptation layer to remove oldest packet first
20f1f64 Added ignoring of retry messages from RADIUS server when waiting EAP-TLS
8a8b407 Add RSL check for ETX Calculation for RPL parent selection
c05e1da Fix DHCP server Uninitialized memory read
77229ee Fix CPP error from domain prefix check
7e47889 support filtering of EAPOL parents based device-min-sens configuration
618a191 Wi-SUN Expedite forward state update
4371462 Fix NULL read from RPL header addition
7802c7e Update CHANGELOG.md
b2c8104 CHANGELOG for Nanostack v13.0.0 (ARMmbed#2615)

git-subtree-dir: features/nanostack/sal-stack-nanostack
git-subtree-split: 4a3c5c5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants