-
Notifications
You must be signed in to change notification settings - Fork 8
Conversation
This commit enables tracing of dynamic memory operations (alloc/free/realloc) using the existing logging support in ualloc. Note that this support is preliminary, check the code for more details. In particular, "prevent_tracing" will have to go away eventually, but for now we need it. Tracing must be enabled via "yotta config": { "debug": { "options": { "memory-trace": true } } }
Fixed logging inconsistencies and curly bracket placement. |
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.
Should be possible to have a re-entrant logging format (surround messages by matching brackets?), which would make this OK. This seems like a suitable solution for now though, especially as we don't malloc from interrupt handlers.
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.
Actually, I think this is already re-entrant, since it always starts with a known prefix that isn't repeated im the rest of the message. I can't remove prevent_tracing
yet tohugh, because of printf.
If people are fine with this first version of the tracer, i'd like to merge it. |
I think it's good enough for now. +1 |
+1 |
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.
this should be inside separate trace library, because for example it might be that sometimes user wan't to change endpoint where to print these debug messages (=traces), or change trace format easily without touching ualloc -library.
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.
Please file this as an issue against this repo.
This commit enables tracing of dynamic memory operations
(alloc/free/realloc) using the existing logging support in ualloc.
Note that this support is preliminary, check the code for more details.
In particular, "prevent_tracing" will have to go away eventually, but
for now we need it.
Tracing must be enabled via "yotta config":
{
"debug": {
"options": {
"memory-trace": true
}
}
}