Re: [PATCH v2 dwarves 4/8] btf_encoder: discard CUs after BTF encoding

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

 



Em Thu, Oct 08, 2020 at 04:39:56PM -0700, Andrii Nakryiko escreveu:
> From: Andrii Nakryiko <andriin@xxxxxx>
> 
> When doing BTF encoding/deduping, DWARF CUs are never used after BTF encoding
> is done, so there is no point in wasting memory and keeping them in memory. So
> discard them immediately.

Right now, yes, but DW_TAG_partial_unit may require we keep them around.

I'm applying the patch since the common case, the kernel, is not yet
using that DWARF compression technique.

- Arnaldo
 
> Signed-off-by: Andrii Nakryiko <andriin@xxxxxx>
> ---
>  pahole.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/pahole.c b/pahole.c
> index 61522175519e..bd9b993777ee 100644
> --- a/pahole.c
> +++ b/pahole.c
> @@ -2384,7 +2384,7 @@ static enum load_steal_kind pahole_stealer(struct cu *cu,
>  			fprintf(stderr, "Encountered error while encoding BTF.\n");
>  			exit(1);
>  		}
> -		return LSK__KEEPIT;
> +		return LSK__DELETE;
>  	}
>  
>  	if (ctf_encode) {
> -- 
> 2.24.1
> 

-- 

- Arnaldo



[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