Re: [PATCH dwarves] btf_encoder: Filter out __gendwarfksyms_ptr_

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Mar 17, 2025 at 10:24:24PM +0000, Sami Tolvanen wrote:
> With CONFIG_GENDWARFKSYMS, __gendwarfksyms_ptr_<symbol>
> variables are added to the kernel in EXPORT_SYMBOL() to ensure
> DWARF type information is available for exported symbols in the
> TUs where they're actually exported. These symbols are dropped
> when linking vmlinux, but dangling references to them remain
> in DWARF, which results in thousands of 0 address variables
> that pahole needs to validate (since commit 9810758003ce
> ("btf_encoder: Verify 0 address DWARF variables are in ELF
> section")).
> 
> Filter out symbols with the __gendwarfksyms_ptr_ name prefix in
> filter_variable_name() instead of calling variable_in_sec()
> for all of them. This reduces the time it takes to process
> .tmp_vmlinux1 by ~77% on my test system:
> 
> Before: 35.775 +- 0.121  seconds time elapsed  ( +-  0.34% )
>  After: 8.3516 +- 0.0407 seconds time elapsed  ( +-  0.49% )

makes sense to me, I just can't reproduce the speedup
could you please share your .config?

thanks,
jirka


> 
> Signed-off-by: Sami Tolvanen <samitolvanen@xxxxxxxxxx>
> ---
>  btf_encoder.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/btf_encoder.c b/btf_encoder.c
> index 1bde310..2bf7c59 100644
> --- a/btf_encoder.c
> +++ b/btf_encoder.c
> @@ -2239,6 +2239,7 @@ static bool filter_variable_name(const char *name)
>  		X("__UNIQUE_ID"),
>  		X("__tpstrtab_"),
>  		X("__exitcall_"),
> +		X("__gendwarfksyms_ptr_"),
>  		X("__func_stack_frame_non_standard_")
>  		#undef X
>  	};
> 
> base-commit: a0be596ae76c720d21eef257dec1cf2462130da1
> -- 
> 2.49.0.rc1.451.g8f38331e32-goog
> 




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux