Skip to content
This repository has been archived by the owner on Sep 20, 2022. It is now read-only.

sniffer: use fmt instead of printf #36

Merged
merged 3 commits into from
Oct 2, 2018
Merged

Conversation

miri64
Copy link
Member

@miri64 miri64 commented Jun 19, 2018

I know this is a little more extreme change, but I was able to reduce stack usage by 2/3 on samr21-xpro. Additionally, I removed the leading 0x for the hexadecimal numbers. The parsing script knows which numbers are hex (all of them) and they just waste time both on the node and in the parsing script.

(Needs to be adapted if #33 is merged before done)

@miri64 miri64 requested a review from jnohlgard June 19, 2018 08:34
@miri64
Copy link
Member Author

miri64 commented Jun 19, 2018

Tested new stacksize on samr21-xpro and z1

@jnohlgard
Copy link
Member

needs rebase

@miri64 miri64 force-pushed the sniffer/enh/fmt branch from 12b0e96 to 755d7d4 Compare June 19, 2018 18:40
@miri64
Copy link
Member Author

miri64 commented Jun 19, 2018

Rebased (and adapted)

Copy link
Member

@jnohlgard jnohlgard left a comment

Choose a reason for hiding this comment

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

looks fine to me. Output format looks to be the same except for the 0x prefix. Untested ACK

@@ -45,7 +47,7 @@
/**
* @brief Stack for the raw dump thread
*/
static char rawdmp_stack[THREAD_STACKSIZE_MAIN];
static char rawdmp_stack[THREAD_STACKSIZE_SMALL];
Copy link
Member

Choose a reason for hiding this comment

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

This change may need verification on some more platforms though (AVR, msp430, mips)

Copy link
Member Author

Choose a reason for hiding this comment

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

z1 is an msp430 platform, so this I already tested. I'm not sure XBee works with the sniffer, but we can maybe try with an OpenLabs for the AVR-based board. Same goes probably for MIPS, though SPI is just in the works.

Copy link
Member Author

Choose a reason for hiding this comment

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

The z1 would even be happy with THREAD_STACKSIZE_TINY btw ;-)

@miri64
Copy link
Member Author

miri64 commented Jul 14, 2018

Ping

I was able to reduce stack usage by 2/3 on `samr21-xpro`. Additionally,
I removed the leading `0x` for the hexadecimal numbers. The parsing
script knows which numbers are hex (all of them) and they just waste
time both on the node and in the parsing script
@miri64
Copy link
Member Author

miri64 commented Sep 26, 2018

Ping and rebased.

Copy link
Member

@smlng smlng left a comment

Choose a reason for hiding this comment

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

tested ACK

@jnohlgard
Copy link
Member

sorry for the delay, I forgot about this one.

@miri64 miri64 merged commit b34372f into RIOT-OS:master Oct 2, 2018
@miri64 miri64 deleted the sniffer/enh/fmt branch October 2, 2018 09:35
chrysn pushed a commit to chrysn-pull-requests/RIOT that referenced this pull request Sep 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants