ilogtail icon indicating copy to clipboard operation
ilogtail copied to clipboard

Strips binary keep a static symbol table

Open zhongyuankai opened this issue 11 months ago • 8 comments

Strips binary, we still to keep a static symbol table for good stack traces.

zhongyuankai avatar Feb 10 '25 08:02 zhongyuankai

Strips binary, we still to keep a static symbol table for good stack traces.

strip-debug will make the binary file larger. Have you tested the difference between using strip-debug and not using strip-debug?

linrunqi08 avatar Feb 11 '25 01:02 linrunqi08

Only 20M of size has been added, I think it can be ignored.

zhongyuankai avatar Feb 11 '25 02:02 zhongyuankai

Only 20M of size has been added, I think it can be ignored.

Can you provide a case to compare the difference in stack information before and after using strip-debug?

linrunqi08 avatar Feb 11 '25 03:02 linrunqi08

before: image

after: image

Tools such as pstack and perf will become available.

zhongyuankai avatar Feb 11 '25 06:02 zhongyuankai

@linrunqi08 Has it been closed?

zhongyuankai avatar Feb 11 '25 06:02 zhongyuankai

@linrunqi08 Has it been closed?

Sorry, maybe I clicked the button by mistake.

linrunqi08 avatar Feb 11 '25 06:02 linrunqi08

before: image

after: image

Tools such as pstack and perf will become available.

Thank you very much for your test results and suggestions. But I think strip should not keep debug information in release mode, but I think there can be more CMAKE_BUILD_TYPE types, such as relwithdebinfo, in which strip can use the strip-debug parameter to keep some symbols. If you agree with my suggestions, you can make some modifications to the PR.

linrunqi08 avatar Feb 12 '25 01:02 linrunqi08

Sorry, the above test is obtained in RelWithDebInfo mode.

zhongyuankai avatar Feb 12 '25 03:02 zhongyuankai