Skip to content

zero_alloc: always compute summaries#1335

Merged
gretay-js merged 1 commit intooxcaml:mainfrom
gretay-js:zero_alloc_summaries_always
May 3, 2023
Merged

zero_alloc: always compute summaries#1335
gretay-js merged 1 commit intooxcaml:mainfrom
gretay-js:zero_alloc_summaries_always

Conversation

@gretay-js
Copy link
Copy Markdown
Contributor

Always run Checkmach analysis to compute sumaries needed for checking zero_alloc assertions and store the summaries in cmx files.

Use Clflags.zero_alloc_check for assertion checking only, not for computing summaries. Currently, -zero-alloc-flag flag does both. This PR proposes to change the meaning of -zero-alloc-check because the overhead of always having summaries is low (to be confirmed on a large build). Having summaries makes it easy to turn the check on for a particular file or library, because there is no need to rebuild its dependencies.

@gretay-js gretay-js requested a review from xclerc as a code owner April 28, 2023 15:20
@gretay-js gretay-js force-pushed the zero_alloc_summaries_always branch from 92a8f9e to 8b4ad2a Compare May 2, 2023 15:31
@gretay-js
Copy link
Copy Markdown
Contributor Author

Testing this PR on a large build with flambda1:

  • Build times are not significantly affected.
  • Size of .cmx files increased by less than 2% as expected.

@gretay-js gretay-js merged commit b455fd6 into oxcaml:main May 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants