[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4a88721a-ac78-bcad-1b33-f9027baab5ab@sangfor.com.cn>
Date: Tue, 21 Mar 2023 10:31:21 +0800
From: Ding Hui <dinghui@...gfor.com.cn>
To: Donglin Peng <pengdonglin@...gfor.com.cn>, mhiramat@...nel.org,
rostedt@...dmis.org, linux@...linux.org.uk, mark.rutland@....com,
will@...nel.org, catalin.marinas@....com, palmer@...belt.com,
paul.walmsley@...ive.com, tglx@...utronix.de,
dave.hansen@...ux.intel.com, x86@...nel.org, mingo@...hat.com,
xiehuan09@...il.com, huangcun@...gfor.com.cn,
dolinux.peng@...il.com
Cc: linux-trace-kernel@...r.kernel.org,
linux-riscv@...ts.infradead.org,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v5 2/2] tracing: Add documentation for funcgraph-retval
and graph_retval_hex
On 2023/3/20 21:16, Donglin Peng wrote:
> +There are some limitations when using the funcgraph-retval currently:
> +
> +- Even if the function return type is void, a return value will still
> + be printed, and you can just ignore it.
> +
> +- Even if the return value is not an error code actually, it may be
> + displayed as an error code. You should read the code to check.
> + For example, both 0xfe and 0xfffe are be interpreted as -2.
For char and short types, displaying as signed decimal may be not
appropriate, because they are rarely used to store error code.
So in "smart" mode (graph_retval_hex=0), I suggest just smart convert
error value stored in int or pointer to signed decimal.
> +- Only the value of the first return register will be recorded and
> + printed even if the return values may be stored in two registers
> + actually. For example, both the eax and edx are used to store a
> + 64 bit return value in the x86 architecture, and the eax stores
> + the low 32 bit, the edx stores the high 32 bit, however only the
> + value stored in eax will be recorded and printed.
> +
> You can put some comments on specific functions by using
> trace_printk() For example, if you want to put a comment inside
> the __might_sleep() function, you just have to include
--
Thanks,
- Ding Hui
Powered by blists - more mailing lists