[PATCH v3 1/8] ftrace: Add DYNAMIC_FTRACE_WITH_CALL_OPS

Wangshaobo (bobo) bobo.shaobowang at huawei.com
Mon Jan 30 17:25:51 PST 2023



在 2023/1/30 18:25, Mark Rutland 写道:
> On Sat, Jan 28, 2023 at 04:46:48PM +0800, Wangshaobo (bobo) wrote:
>> 锟斤拷 2023/1/23 21:45, Mark Rutland 写锟斤拷:
>>> +config DYNAMIC_FTRACE_WITH_CALL_OPS
>>> +	def_bool y
>>> +	depends on HAVE_DYNAMIC_FTRACE_WITH_CALL_OPS
>>> +
>> Hi Mark,
> 
> Hi,
> 
>> I have test your patches and it looks fine with my sample module,
> 
> Thanks for testing!
> 
>> but here setting DYNAMIC_FTRACE_WITH_CALL_OPS to y immutably may increase the
>> .text section size by 5% or more, how about making this to optional^^
> 
> We could consider making this optional. I had not made this optional so far as
> in the future I'd like to make this the only implementation of ftrace on arm64
> (once we can drop the old mcount version, and once we've sorted out the
> incompatibility with CFI). In the mean time, it probably makes sense to have
> the option at least to enable testing of each of the two forms.
> 
> Is your concern that the overall kernel image size is larger, or do you care
> specifically about the size of the .text section for some reason?
> 
> Thanks,
> Mark
Embedded devices may pay more attention to Image size, and which may 
also indirectly affects performance, for more reason, I think making 
sense to have the option for testing is more important.

-- Wang ShaoBo
> 
>>
>> -- Wang ShaoBo
>>>    config DYNAMIC_FTRACE_WITH_ARGS
>>>    	def_bool y
>>>    	depends on DYNAMIC_FTRACE
>>> diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
>>> index 442438b93fe9..e634b80f49d1 100644



More information about the linux-arm-kernel mailing list