Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strips binary keep a static symbol table #2081

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

zhongyuankai
Copy link

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

@linrunqi08
Copy link
Collaborator

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?

@zhongyuankai
Copy link
Author

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

@linrunqi08 linrunqi08 closed this Feb 11, 2025
@linrunqi08
Copy link
Collaborator

linrunqi08 commented Feb 11, 2025

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?

@zhongyuankai
Copy link
Author

before:
image

after:
image

Tools such as pstack and perf will become available.

@zhongyuankai
Copy link
Author

@linrunqi08 Has it been closed?

@linrunqi08 linrunqi08 reopened this Feb 11, 2025
@linrunqi08
Copy link
Collaborator

@linrunqi08 Has it been closed?

Sorry, maybe I clicked the button by mistake.

@linrunqi08
Copy link
Collaborator

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.

@zhongyuankai
Copy link
Author

Sorry, the above test is obtained in RelWithDebInfo mode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants