Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

ctk21
Copy link
Owner

@ctk21 ctk21 commented Apr 21, 2022

This PR re-enables mark stack compression when the mark stack reaches more than 1/32th of the major heap.

The PR introduces a simple mark-stack compression scheme. All the mark entries are converted into compressed entries of two words (page, bitfield). For a contiguous heap of size H words and 64bit words, there can be no more than H/64 compressed entries. We also keep contiguous mark stack entries that can not be more effectively compressed as (page, bitfield); for example a very large record or array.

The first 5 commits are refactorings to make things go smoothly at the end. The last commit introduces the compression scheme which utilises the addrmap to collate the compressed entries.

This scheme of mark stack compression, is simpler than schemes which require synchronisation and scanning pages; see ocaml-multicore#474 which utilised a synchronisation scheme to make rescanning work.

dra27 and others added 14 commits May 12, 2021 14:36
The string @qs@ is available to use in template.in files that produce
OCaml code allowing strings to be written as
{@qs@|@variable_from_configure@|@qs@} guaranteeing that any value of
@variable_from_configure@ yields a properly quoted OCaml string.

The calculation inserts 'o' characters until none of the strings passed
to AC_SUBST include the sequence |o..o}
* Fixed memory leak from sigaltstack
…N) (ocaml#11095)

* [Minor] Clean-up some atomic casts

* Strengthen test

* Add an acquire fence after `young_limit` triggers an allocation failure

The output has been disassembled (gcc -O2, arch=x86-64) to confirm
that `CAMLunlikely` works as intended and produces equivalent code as
before.

* Reintroduce caml_update_young_limit

This function ensures that young_limit is always reset to its desired
value, without risk of race.

Also avoid relying on an information-carrying value for young_limit.

* Always reset young limit with dedicated function

Aim to take all requests into account to simplify reasoning

Reset young_limit after reinitialisation of interrupt variables

* [minor] Simplify assertion and make it clearer at least to me

(the absence of race in the assertion depended on who calls it)
`ranlib` seems unnecessary if a POSIX-compliant `ar` is used and time stamps are preserved when a `.a` file is installed.
…adunsafe

Document that Scanf is not thread-safe
Joining more than once on a domain no longer raises an exception.
value block;
uintnat offset;
value* start;
value* end;

Choose a reason for hiding this comment

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

IIUC end points to the word after the last markable word? If so, perhaps worth adding a comment here.

dra27 and others added 15 commits April 24, 2022 10:52
GNU make needs to know that the compiler libs .cmo and .cmi are produced
simultaneously by the same recipe. The fix exploits the fact that while
GNU make multi-target rules are quite new (GNU make 4.3+), multi-target
pattern rules have existed for a long time.

Previously, only the dependency of byte/dynlink_compilerlibs.cmi on
byte/dynlink_compilerlibs.cmo was given to GNU make. GNU make
(correctly) infers that as no rules emit byte/dynlink_compilerlibs.cmi,
it can't change during the build. It therefore only checks the state of
byte/dynlink_compilerlibs.cmo at the start of the build, so if it
then changes _during_ the build, it does not propagate any rebuilds to
things which depended on byte/dynlink_compilerlibs.cmi which in this
case includes dynlink_common.cmo. The lack of this dependency allowed
dynlink.cma to be relinked with inconsistent assumptions when rebuilding
in parallel.
The Iload constructor was changed from a triple to a record, but the
disabled backends weren't updated.
Eliminates the partial match warning in these backends, but obviously
the emitters are still broken.
Unused variable r12 was originally removed in PR#502.
Extra parameter added in the multicore merge. Obviously the emitter
remains broken.
The i386 emitter still had the 4.x name.
Octachron and others added 27 commits May 18, 2022 13:38
Fix or document concurrency issues on channels in Multicore
The test triggers a stack overflow in the type checker.  With the new
default max stack size, it takes forever to reach the overflow.

Co-authored-by: Florian Angeletti <[email protected]>
This had been forgotten in ocaml#11243
Guard additional uses of _MSC_VER to suppress undefined variable warnings

(cherry picked from commit 2c2e990)
Factors out some common usage between Warnings and Location for
zero-length ghost locations.
Load_path.find{,_uncap} now invoke a hook before raising Not_found,
which provides a mechanism for automatically adding directories to the
Load_path if required.
[1/3] Restructure LIBDIR: Move Dynlink, Str and Unix to sub-directories
Suggested-by: Guillaume Munch-Maccagnoni <[email protected]>
Suggested-by: David Allsopp <[email protected]>
Reviewed-by: KC Sivaramakrishnan <[email protected]>
protect Max_domains with CAML_INTERNALS
Before this commit, the -cmi-file option was recognized only by ocamlc.

This commit makes sure the option is also recognized by ocamlopt.
Make sure ocamlopt recognizes the -cmi-file command-line option
Makefile.config_if_required can be include'd more than once which
overrides any changes made to flags.
Ensure Makefile.build_config is only loaded once
@ctk21 ctk21 force-pushed the mark_stack_compression branch from 43a9649 to a15e30a Compare May 30, 2022 15:40
@ctk21
Copy link
Owner Author

ctk21 commented May 30, 2022

unfortunately the rebase to upstream has broken the diff here. Going to reopen afresh as #3...

@ctk21 ctk21 closed this May 30, 2022
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.