fgraph: Format error pointers as signed errno values
The BTF-aware funcgraph-retval formatter currently treats all pointer
returns as hexadecimal values. Error pointers returned with ERR_PTR()
therefore appear as high unsigned addresses in smart mode, obscuring the
underlying errno.
Recognize error-pointer values for pointer return types in
btf_trim_retval() and select signed decimal formatting.
Before:
trim_retval_ptr_error(); /* ret=0xffffffffffffffea */
After:
trim_retval_ptr_error(); /* ret=-22 */
Users who need to inspect the raw encoded value can enable
funcgraph-retval-hex, which produces:
trim_retval_ptr_error(); /* ret=0xffffffffffffffea */
Link: https://patch.msgid.link/20261020104710.2366146-1-dolinux.peng@gmail.com
Signed-off-by: pengdonglin <pengdonglin@xiaomi.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
1 file changed