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

Reduce the size of the coverage mapping section #32846

Open
vedantk opened this issue Jun 18, 2017 · 4 comments
Open

Reduce the size of the coverage mapping section #32846

vedantk opened this issue Jun 18, 2017 · 4 comments
Assignees
Labels
bugzilla Issues migrated from bugzilla clang:codegen

Comments

@vedantk
Copy link
Collaborator

vedantk commented Jun 18, 2017

Bugzilla Link 33499
Version trunk
OS All

Extended Description

Binaries produced with -fcoverage-mapping enabled tend to have very large coverage mapping sections. For LLVM tools, they are in the hundreds of megabytes range. One factor is that multiple copies of the same source mappings are emitted into binaries (e.g from headers). We should investigate any other contributing factors, and see what can be done to reduce the size of this section.

Note that coverage mapping data is highly compressible. E.g extracting the coverage section from llc and compressing it with gzip gives a 50% size reduction. However, compressing coverage mappings on a per translation unit basis is not a win.

@vedantk
Copy link
Collaborator Author

vedantk commented Jun 18, 2017

assigned to @vedantk

@llvmbot
Copy link
Member

llvmbot commented Jun 20, 2017

The compression can be done by a linker plugin. The linker plugin can also have an option to strip the covmap section from the executable and emit it into a separate file.

Another choice is to leave the coverage map data in the object files and only emit minimal mapping data in the executable so that the coverage tool can use to locate the object files (and read covmap data from them)

@efriedma-quic
Copy link
Collaborator

mentioned in issue llvm/llvm-bugzilla-archive#34533

1 similar comment
@kcc
Copy link
Contributor

kcc commented Nov 26, 2021

mentioned in issue llvm/llvm-bugzilla-archive#34533

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla clang:codegen
Projects
None yet
Development

No branches or pull requests

4 participants