parca-agent icon indicating copy to clipboard operation
parca-agent copied to clipboard

remove upload ExecutableInfo in WriteRawRequest.

Open zdyj3170101136 opened this issue 11 months ago • 2 comments

no need to do that.

in extracing of elf file, you could use this to add enough information to elf file to compute base address.

func(p *elf.Prog) bool {
		// use debuginfo to compute baseAddress
		// function GetBase need elf.FileHeader, elf.ProgHeader and stextOffset.
		// - stextOffset compute from ef.Symbols()
		// - elf.FileHeader would all be written through elfwriter.NewFromSource
		// - elf.ProgHeader need .text and elf.PT_LOAD
		return p.Type == elf.PT_LOAD
	}

zdyj3170101136 avatar Jan 02 '25 12:01 zdyj3170101136

This is not quite correct. Stripped debuginfo does not necessarily have the right offsets anymore (split/objdump remove them because the .text section is not there anymore). The binary that was profiled always will though, because otherwise the executable can't be executed.

brancz avatar Jan 06 '25 16:01 brancz

Also, the agent already doesn't send it anymore, because it already performs normalization locally.

brancz avatar Jan 06 '25 16:01 brancz