[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1446d966-1b7d-322e-bdd9-d0cb4506c080@sangfor.com.cn>
Date: Tue, 21 Mar 2023 11:24:44 +0800
From: Donglin Peng <pengdonglin@...gfor.com.cn>
To: Ding Hui <dinghui@...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/21 10:31, Ding Hui wrote:
> 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.
Yeah, I will remove the return value conversion for char and short
types in the "smart" mode.
>
>> +- 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
>
Powered by blists - more mailing lists