Add elf type and load segment information to mapping

Đang mở
#808 1 bình luận 3 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
42/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
go
Lĩnh vực
performance

Hướng nghiên cứu

Bắt đầu bằng cách đọc logic chuẩn hóa được liên kết trong internal/elfexec/elfexec.go và internal/binutils/binutils.go, sau đó theo dõi cách các trường mapping được biểu diễn trong định dạng pprof. Issue mô tả việc thêm kiểu ELF, offset của load-segment và địa chỉ ảo cho mỗi mapping; phần hoàn thành cần bao gồm các giá trị này trong các profile và duy trì việc symbolization chính xác cho các tệp thực thi độc lập vị trí.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Priority: p3
What version of pprof are you using?

This is about pprof as a format, not the toolchain.

What operating system and processor architecture are you using?

Linux amd64 and arm64

What did you do?

We operate a profiling service and among other things, we allow users to send profiling data in pprof format to our service.

The service can perform asynchronous symbolization, where the production binary doesn't have to contain symbols, and the server side will perform symbolization at some undefined point in time. The time at which the receiving side receives debuginfo is also not defined. Debuginfo may not contain the .text section, but only DWARF sections for symbolization purposes.

The problem is, same as the pprof toolchain getting the Base for "normalization" purposes we need the same information, but pprof provides no fields to set this. The convenient thing about having it in the format is that by definition wherever the profiling data is recorded, the .text section must be present, as it's required for the execution of the binary.

Without this information asynchronous symbolization is going to be incorrect, which is especially common for position-independent executables.

What did you expect to see?

Fields to communicate elf type, load segment offset, and vaddr to the toolchain per mapping.

What did you see instead?

Symbolization errors with position-independent executables because the debuginfo doesn't have the .text section, and the pprof profile can't communicate it to the toolchain either.

Ngôn ngữ chính
Go
Star
9.3k
Fork
686
Merge trung bình
4 ngày 17 giờ
Pull request đã merge (30 ngày)
14

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của google/pprof

Tất cả issue của google/pprof

Issue tương tự

Thêm issue về Go

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.