Skip to content

schedstatistics: Convert to ztimer#17216

Merged
fjmolinas merged 3 commits intoRIOT-OS:masterfrom
bergzand:pr/ps_schedstatistics/ztimer
Dec 7, 2021
Merged

schedstatistics: Convert to ztimer#17216
fjmolinas merged 3 commits intoRIOT-OS:masterfrom
bergzand:pr/ps_schedstatistics/ztimer

Conversation

@bergzand
Copy link
Copy Markdown
Member

Contribution description

Another ztimer conversion, this time sys/schedstatistics

Testing procedure

there is a test in tests/ps_schedstatistics

Issues/PRs references

Another one for #17111

@bergzand bergzand requested a review from kaspar030 November 16, 2021 14:52
@bergzand bergzand added the Type: cleanup The issue proposes a clean-up / The PR cleans-up parts of the codebase / documentation label Nov 16, 2021
@github-actions github-actions bot added Area: Kconfig Area: Kconfig integration Area: sys Area: System Area: tests Area: tests and testing framework labels Nov 16, 2021
kaspar030
kaspar030 previously approved these changes Nov 16, 2021
Copy link
Copy Markdown
Contributor

@kaspar030 kaspar030 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@bergzand bergzand added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Nov 16, 2021
@bergzand
Copy link
Copy Markdown
Member Author

Also includes conversion of tests/periph_spi now because it uses internal schedstatistics members.

@bergzand bergzand dismissed kaspar030’s stale review November 17, 2021 09:16

tests/periph_spi is now included in this PR

@bergzand bergzand removed the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Nov 17, 2021
@fjmolinas
Copy link
Copy Markdown
Contributor

Also includes conversion of tests/periph_spi now because it uses internal schedstatistics members.

Can you show some log on the spi part?

@fjmolinas
Copy link
Copy Markdown
Contributor

@bergzand are there no updates required on Kconfig?

@bergzand
Copy link
Copy Markdown
Member Author

@bergzand are there no updates required on Kconfig?

grml, might have forgotten to update the app.config.test

@fjmolinas fjmolinas added this to the Release 2022.01 milestone Nov 18, 2021
@bergzand
Copy link
Copy Markdown
Member Author

grml, might have forgotten to update the app.config.test

Added, thanks for the heads-up.

@fjmolinas fjmolinas added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Dec 7, 2021
@fjmolinas
Copy link
Copy Markdown
Contributor

@bergzand

diff --git a/tests/periph_spi_dma/app.config.test b/tests/periph_spi_dma/app.config.test
index 29981de4c5..e00e33a81b 100644
--- a/tests/periph_spi_dma/app.config.test
+++ b/tests/periph_spi_dma/app.config.test
@@ -6,4 +6,6 @@ CONFIG_MODULE_PERIPH_SPI=y
 CONFIG_MODULE_SHELL=y
 CONFIG_MODULE_SHELL_COMMANDS=y
 CONFIG_MODULE_SCHEDSTATISTICS=y
-CONFIG_MODULE_XTIMER=y
+CONFIG_MODULE_ZTIMER=y
+CONFIG_MODULE_ZTIMER_SEC=y
+CONFIG_ZTIMER_USEC=y

@fjmolinas
Copy link
Copy Markdown
Contributor

And blacklisting:

--- FAILED build outputs:
--- build output of app tests/periph_spi for board samd10-xmini:gnu (raw, runtime=0.5s):
-- running on worker mobi6.inet.haw-hamburg.de-17 thread 1, build number 1692.
make: Entering directory '/tmp/dwq.0.045125125006728495/61d9b9ef168c13ef99eaa7037570e517/tests/periph_spi'
Building application "tests_periph_spi" for "samd10-xmini" with MCU "samd21".

@bergzand
Copy link
Copy Markdown
Member Author

bergzand commented Dec 7, 2021

@bergzand

done, thanks

And blacklisting:

and done.

@bergzand bergzand force-pushed the pr/ps_schedstatistics/ztimer branch from 54ed6a6 to cffa260 Compare December 7, 2021 10:07
@bergzand
Copy link
Copy Markdown
Member Author

bergzand commented Dec 7, 2021

and squashed.

config MODULE_SCHEDSTATISTICS
bool "Scheduler statistics support"
depends on MODULE_XTIMER
depends on MODULE_ZTIMER_USEC
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
depends on MODULE_ZTIMER_USEC
select ZTIMER_USEC

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

CONFIG_MODULE_XTIMER=y
CONFIG_MODULE_ZTIMER=y
CONFIG_MODULE_ZTIMER_SEC=y
CONFIG_MODULE_ZTIMER_USEC=y
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
CONFIG_MODULE_ZTIMER_USEC=y
CONFIG_ZTIMER_USEC=y

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed!

@bergzand bergzand force-pushed the pr/ps_schedstatistics/ztimer branch from cffa260 to a6910f1 Compare December 7, 2021 15:31
@fjmolinas fjmolinas enabled auto-merge December 7, 2021 19:19
Copy link
Copy Markdown
Contributor

@fjmolinas fjmolinas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK, tested on nucleo-l152re works as expected:

2021-12-07 20:21:39,151 # 	pid | name                 | state    Q | pri | stack  ( used) ( free) | base addr  | current     | runtime  | switches  | runtime_usec 
2021-12-07 20:21:39,181 # 	  - | isr_stack            | -        - |   - |    512 (  232) (  280) | 0x20000000 | 0x200001c8
2021-12-07 20:21:39,229 # 	  1 | main                 | running  Q |   7 |   1536 (  808) (  728) | 0x2000182c | 0x20001b0c  |  2.170% |     19530  |    2145751 
2021-12-07 20:21:39,271 # 	  2 | thread               | bl mutex _ |   6 |   1024 (  412) (  612) | 0x2000042c | 0x20000744  | 10.463% |     60596  |   10345876 
2021-12-07 20:21:39,319 # 	  3 | thread               | bl mutex _ |   6 |   1024 (  412) (  612) | 0x2000082c | 0x20000b44  | 15.066% |     60626  |   14898045 
2021-12-07 20:21:39,367 # 	  4 | thread               | bl mutex _ |   6 |   1024 (  412) (  612) | 0x20000c2c | 0x20000f44  | 19.675% |     60656  |   19454675 
2021-12-07 20:21:39,415 # 	  5 | thread               | bl mutex _ |   6 |   1024 (  412) (  612) | 0x2000102c | 0x20001344  | 24.287% |     60686  |   24015775 
2021-12-07 20:21:39,457 # 	  6 | thread               | bl mutex _ |   6 |   1024 (  412) (  612) | 0x2000142c | 0x20001744  |  5.878% |     60716  |    5812808 
2021-12-07 20:21:39,481 # 	    | SUM                  |            |     |   7168 ( 3100) ( 4068)

@fjmolinas fjmolinas merged commit 97b4dd3 into RIOT-OS:master Dec 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: Kconfig Area: Kconfig integration Area: sys Area: System Area: tests Area: tests and testing framework CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Type: cleanup The issue proposes a clean-up / The PR cleans-up parts of the codebase / documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants