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

Disable poll insertion in Configure #967

Merged

Conversation

gretay-js
Copy link
Contributor

Add a compiler configuration option --enable-poll-insertion, off by default, to make it easier to evalute the impact of poll point insertion on performance. Unlike compilation flag -disable-poll-insertion from #899, configure option disables poll insertion in stdlib and other libraries installed within the compiler itself.

A dual compilation flag -enable-poll-insertion may be handy when testing/benchmarking with a compiler configured without poll insertion. It is added in a separate commit that can easily be removed if reviewers disagree.

Note that the change only affects the flamba-backend (i.e., the installed compiler and libraries), not ocaml/asmcomp where poll points will be inserted unconditionally.

Some CI configurations are updated to build with --enable-poll-insertion.

@gretay-js gretay-js added build system CI Github Actions CI changes labels Nov 21, 2022
Copy link
Contributor

@xclerc xclerc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(The new ocaml/configure file is produced with
an older version of autoconf - 2.69 vs 2.71. It
is still >= AC_PREREQ, which is 2.69, but I
wonder whether we could get a slightly different
behaviour in some corner cases.)

(It looks like the newly-introduced no-poll-insertion
ocamltest tag is never used.)

Copy link
Collaborator

@mshinwell mshinwell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just need to regenerate configure with the matching autoconf

@gretay-js gretay-js force-pushed the disable_poll_insertion_in_configure branch from 5f3b231 to ffc8a66 Compare December 2, 2022 09:34
@gretay-js
Copy link
Contributor Author

gretay-js commented Dec 2, 2022

(The new ocaml/configure file is produced with an older version of autoconf - 2.69 vs 2.71. It is still >= AC_PREREQ, which is 2.69, but I wonder whether we could get a slightly different behaviour in some corner cases.)

I made a PR to change back to 2.69, temporarily (#1012).

(It looks like the newly-introduced no-poll-insertion ocamltest tag is never used.)

yes, I thought that was the case for other actions and is added for symmetry.

Use the new configure option
Add -enable-poll-insertion compilation flag
Fix tests
ocaml/configure updated
Add --enable-poll-insertion to CI
Add to build_ocaml_compiler.sexp
Remove CR (it's done by this PR)
Use Config.poll_insertion to set the default for the compile flag
@gretay-js gretay-js force-pushed the disable_poll_insertion_in_configure branch from ffc8a66 to 581f6cd Compare December 2, 2022 14:29
@gretay-js gretay-js enabled auto-merge (squash) December 2, 2022 14:30
@gretay-js gretay-js merged commit 03a3cde into ocaml-flambda:main Dec 2, 2022
mshinwell added a commit to mshinwell/flambda-backend that referenced this pull request Dec 13, 2022
06c189a4c5 flambda-backend: Make stack allocation the default (ocaml-flambda#1013)
98debd51d5 flambda-backend: Initial support for value slots not of value kind (ocaml-flambda#946)
deb1714de3 flambda-backend: Add is_last flag to closinfo words (ocaml-flambda#938)
d07fce15aa flambda-backend: Disable poll insertion in Configure (ocaml-flambda#967)
0f1ce0eeab flambda-backend: Regenerate ocaml/configure autoconf 2.69 (instead of 2.71) (ocaml-flambda#1012)
27132d8005 flambda-backend: Fix for spurious typing error related to expanding through functor arguments (ocaml-flambda#997)
724fb68074 flambda-backend: Use `Compilation_unit.t` instead of `Ident.t` for globals (ocaml-flambda#871)
396d5b8837 flambda-backend: Add a test for frametable setup in natdynlinked libraries (ocaml-flambda#983)
b73ab126cf flambda-backend: Fix invocation of `caml_shared_startup` in native dynlink (ocaml-flambda#980)
7c7d75a6b1 flambda-backend: Fix split_default_wrapper which did not trigger anymore with flambda2 (ocaml-flambda#970)
8fb75bd345 flambda-backend: Port ocaml/ocaml#11727 and ocaml/ocaml#11732 (ocaml-flambda#965)
fdb79872c6 flambda-backend: Fix include functor issue after 4.14 merge. (ocaml-flambda#948)
9745cdb28a flambda-backend: Print -dprofile/-dtimings output to stdout like 4.12 (ocaml-flambda#943)
5f51f2124f flambda-backend: Merge pull request ocaml-flambda#932 from mshinwell/4.14-upgrade
841687d523 flambda-backend: Run make alldepend in ocaml/ (ocaml-flambda#936)
72a7658a4b flambda-backend: Remove reformatting changes only in dynlink/dune (preserving PR889 and adjusting to minimise diff)
6d758cd63c flambda-backend: Revert whitespace changes in dune files, to match upstream
c86bf6e035 flambda-backend: Remove duplicate tests for polling
971dbeb55b flambda-backend: Testsuite fixes
32f835689b flambda-backend: Topeval fix for symbols patch
befea0169e flambda-backend: Compilation fixes / rectify merge faults
a84543f6a6 flambda-backend: Merge ocaml-jst
8e65056085 flambda-backend: Merge ocaml-jst
4d70045a5e flambda-backend: Remove filename from system frametable (amd64) (ocaml-flambda#920)
5e57b7d80d flambda-backend: Bugfix for runtime frame_descr logic for C frames (ocaml-flambda#918)
6423d5e8ce flambda-backend: Merge pull request ocaml-flambda#914 from mshinwell/merge-ocaml-jst-2022-10-24
ead605caf3 flambda-backend: Add a missing Extract_exception (ocaml-flambda#916)
c8f1481246 flambda-backend: Resolve conflicts and add specialise/specialised attributes to Builtin_attributes
cf4d0d34a8 flambda-backend: Merge fixes (#21)
c2f742fca7 flambda-backend: Re-enable some tests for Flambda2 (ocaml-flambda#881)
3d38d13bea flambda-backend: Long frames in frametable (ocaml-flambda#797)
85aec7bb78 flambda-backend: Add loop attribute to Builtin_attributes
c0f16e325b flambda-backend: Compilation fixes
90dea23141 flambda-backend: Merge flambda-backend/main
5acc6eaf90 flambda-backend: Fixes after merge
e5019466b5 flambda-backend: Merge ocaml-jst
115083b765 flambda-backend: Merge ocaml-jst
9943b2ecc2 flambda-backend: Revert "Revert "Transform tail-recursive functions into recursive continuations (ocaml-flambda#893)"" (ocaml-flambda#909)
ce339f19f5 flambda-backend: Fix alloc modes and call kinds for overapplications (ocaml-flambda#902)
e6a317c866 flambda-backend: Revert "Transform tail-recursive functions into recursive continuations (ocaml-flambda#893)"
853c4884fd flambda-backend: Transform tail-recursive functions into recursive continuations (ocaml-flambda#893)
5a977e4483 flambda-backend: Fix missing End_region primitives on switch arms (ocaml-flambda#898)
7fa7f9dd96 flambda-backend: Add missing dependencies to Dune files (ocaml-flambda#889)
3cd36f0058 flambda-backend: Have Lambda `Pgetglobal` and `Psetglobal` take `Compilation_unit.t` (ocaml-flambda#896)
75659153a1 flambda-backend: [@poll error] attribute (ocaml-flambda#745)
9eb9448e6d flambda-backend: Backport the main safepoints PRs (ocaml-flambda#740)
689bddabd9 flambda-backend: Add strict mode for ocamldep (ocaml-flambda#892)

git-subtree-dir: ocaml
git-subtree-split: 06c189a4c5505be62c8c658eee186a7aa6ba4c68
mshinwell added a commit to mshinwell/flambda-backend that referenced this pull request Dec 13, 2022
06c189a4c5 flambda-backend: Make stack allocation the default (ocaml-flambda#1013)
98debd51d5 flambda-backend: Initial support for value slots not of value kind (ocaml-flambda#946)
deb1714de3 flambda-backend: Add is_last flag to closinfo words (ocaml-flambda#938)
d07fce15aa flambda-backend: Disable poll insertion in Configure (ocaml-flambda#967)
0f1ce0eeab flambda-backend: Regenerate ocaml/configure autoconf 2.69 (instead of 2.71) (ocaml-flambda#1012)
27132d8005 flambda-backend: Fix for spurious typing error related to expanding through functor arguments (ocaml-flambda#997)
724fb68074 flambda-backend: Use `Compilation_unit.t` instead of `Ident.t` for globals (ocaml-flambda#871)
396d5b8837 flambda-backend: Add a test for frametable setup in natdynlinked libraries (ocaml-flambda#983)
b73ab126cf flambda-backend: Fix invocation of `caml_shared_startup` in native dynlink (ocaml-flambda#980)
7c7d75a6b1 flambda-backend: Fix split_default_wrapper which did not trigger anymore with flambda2 (ocaml-flambda#970)
8fb75bd345 flambda-backend: Port ocaml/ocaml#11727 and ocaml/ocaml#11732 (ocaml-flambda#965)
fdb79872c6 flambda-backend: Fix include functor issue after 4.14 merge. (ocaml-flambda#948)
9745cdb28a flambda-backend: Print -dprofile/-dtimings output to stdout like 4.12 (ocaml-flambda#943)
5f51f2124f flambda-backend: Merge pull request ocaml-flambda#932 from mshinwell/4.14-upgrade
841687d523 flambda-backend: Run make alldepend in ocaml/ (ocaml-flambda#936)
72a7658a4b flambda-backend: Remove reformatting changes only in dynlink/dune (preserving PR889 and adjusting to minimise diff)
6d758cd63c flambda-backend: Revert whitespace changes in dune files, to match upstream
c86bf6e035 flambda-backend: Remove duplicate tests for polling
971dbeb55b flambda-backend: Testsuite fixes
32f835689b flambda-backend: Topeval fix for symbols patch
befea0169e flambda-backend: Compilation fixes / rectify merge faults
a84543f6a6 flambda-backend: Merge ocaml-jst
8e65056085 flambda-backend: Merge ocaml-jst
4d70045a5e flambda-backend: Remove filename from system frametable (amd64) (ocaml-flambda#920)
5e57b7d80d flambda-backend: Bugfix for runtime frame_descr logic for C frames (ocaml-flambda#918)
6423d5e8ce flambda-backend: Merge pull request ocaml-flambda#914 from mshinwell/merge-ocaml-jst-2022-10-24
ead605caf3 flambda-backend: Add a missing Extract_exception (ocaml-flambda#916)
c8f1481246 flambda-backend: Resolve conflicts and add specialise/specialised attributes to Builtin_attributes
cf4d0d34a8 flambda-backend: Merge fixes (#21)
c2f742fca7 flambda-backend: Re-enable some tests for Flambda2 (ocaml-flambda#881)
3d38d13bea flambda-backend: Long frames in frametable (ocaml-flambda#797)
85aec7bb78 flambda-backend: Add loop attribute to Builtin_attributes
c0f16e325b flambda-backend: Compilation fixes
90dea23141 flambda-backend: Merge flambda-backend/main
5acc6eaf90 flambda-backend: Fixes after merge
e5019466b5 flambda-backend: Merge ocaml-jst
115083b765 flambda-backend: Merge ocaml-jst
9943b2ecc2 flambda-backend: Revert "Revert "Transform tail-recursive functions into recursive continuations (ocaml-flambda#893)"" (ocaml-flambda#909)
ce339f19f5 flambda-backend: Fix alloc modes and call kinds for overapplications (ocaml-flambda#902)
e6a317c866 flambda-backend: Revert "Transform tail-recursive functions into recursive continuations (ocaml-flambda#893)"
853c4884fd flambda-backend: Transform tail-recursive functions into recursive continuations (ocaml-flambda#893)
5a977e4483 flambda-backend: Fix missing End_region primitives on switch arms (ocaml-flambda#898)
7fa7f9dd96 flambda-backend: Add missing dependencies to Dune files (ocaml-flambda#889)
3cd36f0058 flambda-backend: Have Lambda `Pgetglobal` and `Psetglobal` take `Compilation_unit.t` (ocaml-flambda#896)
75659153a1 flambda-backend: [@poll error] attribute (ocaml-flambda#745)
9eb9448e6d flambda-backend: Backport the main safepoints PRs (ocaml-flambda#740)
689bddabd9 flambda-backend: Add strict mode for ocamldep (ocaml-flambda#892)

git-subtree-dir: ocaml
git-subtree-split: 06c189a4c5505be62c8c658eee186a7aa6ba4c68
mshinwell added a commit to mshinwell/flambda-backend that referenced this pull request Dec 28, 2022
b11eea1fae flambda-backend: Introduce Import_info (ocaml-flambda#1036)
bc5b135137 flambda-backend: Fix `ocamlobjinfo` on flambda2 .cmx files (ocaml-flambda#1029)
c8babbdaf4 flambda-backend: Compilation_unit optimisations (ocaml-flambda#1035)
e8d3e22320 flambda-backend: Use 4.14.0 opam switch for building (includes upgrading ocamlformat to 0.24.1) (ocaml-flambda#1030)
eb14a86db9 flambda-backend: Port PR81 from ocaml-jst (ocaml-flambda#1024)
131bc12b53 flambda-backend: Merge ocaml-jst 2022-12-13 (ocaml-flambda#1022)
06c189a4c5 flambda-backend: Make stack allocation the default (ocaml-flambda#1013)
98debd51d5 flambda-backend: Initial support for value slots not of value kind (ocaml-flambda#946)
deb1714de3 flambda-backend: Add is_last flag to closinfo words (ocaml-flambda#938)
d07fce15aa flambda-backend: Disable poll insertion in Configure (ocaml-flambda#967)
0f1ce0eeab flambda-backend: Regenerate ocaml/configure autoconf 2.69 (instead of 2.71) (ocaml-flambda#1012)
27132d8005 flambda-backend: Fix for spurious typing error related to expanding through functor arguments (ocaml-flambda#997)
724fb68074 flambda-backend: Use `Compilation_unit.t` instead of `Ident.t` for globals (ocaml-flambda#871)
396d5b8837 flambda-backend: Add a test for frametable setup in natdynlinked libraries (ocaml-flambda#983)
b73ab126cf flambda-backend: Fix invocation of `caml_shared_startup` in native dynlink (ocaml-flambda#980)
7c7d75a6b1 flambda-backend: Fix split_default_wrapper which did not trigger anymore with flambda2 (ocaml-flambda#970)
8fb75bd345 flambda-backend: Port ocaml/ocaml#11727 and ocaml/ocaml#11732 (ocaml-flambda#965)
fdb79872c6 flambda-backend: Fix include functor issue after 4.14 merge. (ocaml-flambda#948)
9745cdb28a flambda-backend: Print -dprofile/-dtimings output to stdout like 4.12 (ocaml-flambda#943)
5f51f2124f flambda-backend: Merge pull request ocaml-flambda#932 from mshinwell/4.14-upgrade
841687d523 flambda-backend: Run make alldepend in ocaml/ (ocaml-flambda#936)
72a7658a4b flambda-backend: Remove reformatting changes only in dynlink/dune (preserving PR889 and adjusting to minimise diff)
6d758cd63c flambda-backend: Revert whitespace changes in dune files, to match upstream
c86bf6e035 flambda-backend: Remove duplicate tests for polling
971dbeb55b flambda-backend: Testsuite fixes
32f835689b flambda-backend: Topeval fix for symbols patch
befea0169e flambda-backend: Compilation fixes / rectify merge faults
a84543f6a6 flambda-backend: Merge ocaml-jst
8e65056085 flambda-backend: Merge ocaml-jst
4d70045a5e flambda-backend: Remove filename from system frametable (amd64) (ocaml-flambda#920)
5e57b7d80d flambda-backend: Bugfix for runtime frame_descr logic for C frames (ocaml-flambda#918)
6423d5e8ce flambda-backend: Merge pull request ocaml-flambda#914 from mshinwell/merge-ocaml-jst-2022-10-24
ead605caf3 flambda-backend: Add a missing Extract_exception (ocaml-flambda#916)
c8f1481246 flambda-backend: Resolve conflicts and add specialise/specialised attributes to Builtin_attributes
cf4d0d34a8 flambda-backend: Merge fixes (#21)
c2f742fca7 flambda-backend: Re-enable some tests for Flambda2 (ocaml-flambda#881)
3d38d13bea flambda-backend: Long frames in frametable (ocaml-flambda#797)
85aec7bb78 flambda-backend: Add loop attribute to Builtin_attributes
c0f16e325b flambda-backend: Compilation fixes
90dea23141 flambda-backend: Merge flambda-backend/main
5acc6eaf90 flambda-backend: Fixes after merge
e5019466b5 flambda-backend: Merge ocaml-jst
115083b765 flambda-backend: Merge ocaml-jst
9943b2ecc2 flambda-backend: Revert "Revert "Transform tail-recursive functions into recursive continuations (ocaml-flambda#893)"" (ocaml-flambda#909)
ce339f19f5 flambda-backend: Fix alloc modes and call kinds for overapplications (ocaml-flambda#902)
e6a317c866 flambda-backend: Revert "Transform tail-recursive functions into recursive continuations (ocaml-flambda#893)"
853c4884fd flambda-backend: Transform tail-recursive functions into recursive continuations (ocaml-flambda#893)
5a977e4483 flambda-backend: Fix missing End_region primitives on switch arms (ocaml-flambda#898)
7fa7f9dd96 flambda-backend: Add missing dependencies to Dune files (ocaml-flambda#889)
3cd36f0058 flambda-backend: Have Lambda `Pgetglobal` and `Psetglobal` take `Compilation_unit.t` (ocaml-flambda#896)
75659153a1 flambda-backend: [@poll error] attribute (ocaml-flambda#745)
9eb9448e6d flambda-backend: Backport the main safepoints PRs (ocaml-flambda#740)
689bddabd9 flambda-backend: Add strict mode for ocamldep (ocaml-flambda#892)

git-subtree-dir: ocaml
git-subtree-split: b11eea1fae9ed1661d61ab41e0ed84099c9d0de2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build system CI Github Actions CI changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants