-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This goes a bit in opposite (or complements) the commits [1] and [2]. For [1] I don't see any strong reason to keep aligned with Arm TF. I think it is better to have a uniform output within OP-TEE than keeping aligned with Arm TF and at the same time this save precious space and also makes it easier to read/find the actual debug message since it aligns up a bit nicer. The format now is <type>/<where> [<thread_id>] [<func:line>] <message> <type>: * D = DEBUG * E = ERROR * I = INFO * F = FLOW <where>: * TA = Trusted Application * TC = TEE Core The CFG_MSG_LONG_PREFIX_THRESHOLD is nice as such, but not very user friendly when it comes to enable and disable things. I've kept it here, but I think I would prefer using something like the new CFG_TRACE_... like propopsed here. In the future we could introduce a "trace psuedo TA" where one could enable/disable various debug print features. I.e., our own little "ftrace psuedo TA". [1] OP-TEE@f4aa5b1 [2] OP-TEE@2bfab75
- Loading branch information
There are no files selected for viewing
6 comments
on commit 0d3305a
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.
I like this.
How about an even more compact format.
When tread info is disabled or if there's no current thread:
<type>/<where> [<func:line>] <message>
else
<type><thread id><where> [<func:line>] <message>
Where <thread id>
is a single 0-9
number, more threads than that is unusual
Another thing that relates to this, but doesn't have to be covered in this commit. In fact I haven't even thought it through completely.
When it comes to <func:line>
, sometimes it's just what you need in a print and sometimes you'd rather print something else, but together with <func:line>
it would be far to much or slightly redundant. So if the was a way to indicate that a certain string is to be used instead of <func:line>
or only if <func:line>
isn't available I think that could be useful.
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.
- Looks good to me
- +1 for formatting
<thread id>
on one digit -- but allow for more because >9 can still happen. - Please make sure you're not breaking
symbolize.py
(I think it should be OK, but needs checking!). The help text of the tool will need updating, at least. The documentation [1] also. Update This does break the script, because there is no column anymore before the stack addresses. - What if some users have tools that parse the current format? (any other Linaro team relying on this format?)
[1] https://github.com/OP-TEE/build/blob/master/docs/debug.md#3-abort-dumps-panics
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.
looks good to me as it simplifies the traces. There is no official definitive trace format so i think it's ok if we break from the current one.
Regarding jens' comment on func/line
, it think the xMSG_RAW()
is the kind of macro you expect to use for basic, unformatted traces (or very minimal prefixing).
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.
@jbech-linaro I think it would be good if you would create a PR for this, thanks!
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.
Ok, since you seem interested in this, I'll clean it up a bit and send an official PR for it and then we can continue the discussion there.
Please make sure you're not breaking symbolize.py (I think it should be OK, but needs checking!).
I had some issues with that script when trying it when doing the hotp
examples. Bascially it seemed like it couldn't find any address at all. So before checking how this affects that script I need to know that I can run it on the current configuration.
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.
@jbech-linaro sure, you know who to contact for tech support re. symbolize.py
;-)
minor: i would rather keep the
/
here and havelvl_strs
as a simple character array.