Commit Graph

20951 Commits (e7dbaeb8ce8c3156664b8763b676a544ad417b7a)

Author SHA1 Message Date
Greta Yorsh 1e91d2b7ca add Changes entry 2020-10-19 16:47:50 +01:00
Greta Yorsh 30e1e534d7 Add named text sections for caml_system__code_begin/end symbols 2020-10-19 16:47:13 +01:00
Stephen Dolan a6980b256d Add a test for Memprof.stop within a Memprof callback 2020-10-19 17:11:11 +02:00
Jacques-Henri Jourdan 7e4748cf9c Changes. 2020-10-19 17:11:11 +02:00
Jacques-Henri Jourdan b9abf833ca Memprof/systhreads : call [caml_memprof_delete_th_ctx] when threads gets killed by fork. 2020-10-19 17:11:11 +02:00
Jacques-Henri Jourdan 6d3065be78 Memprof: get rid of the idx_ptr pointers.
Instead, we use a thread-local variable [callback_status] which
contains the index of the corresponding entry when a callback is
running. We can do this since there can only be one running callback
at the same time in a given thread.

This lifts the restriction forbidding the call of Thread.exit from a
memprof callback.
2020-10-19 17:11:11 +02:00
Jacques-Henri Jourdan f83d71830d Memprof: provide the guarantee that an allocation callback is always run in the same thread the allocation takes place.
This is done by using a local entry array for each thread, containing
tracked blocks whose allocation callback has not yet been called.

This allows some simplification in the code running callbacks for
young allocations. Indeed, since the entry array is local to one
thread, we know for sure that it cannot be modified during a callback,
and therefore we no longer need to remember the indices of the
corresponding new entries.
2020-10-19 17:08:17 +02:00
Jacques-Henri Jourdan 18c0f95560 Memprof : Refactor [run_callback_exn] so that it also stores the value returned by the callback. 2020-10-19 17:00:04 +02:00
Jacques-Henri Jourdan ea52bec84b Memprof: thread-local context is now stored as a pointer in systhread's data structures.
Reasons:
- Better abstraction in memprof.h
- Simpler Saving/restore functions
- We introduce a current's thread context, so that we don't need to do a spacial case for the current thread
2020-10-19 17:00:04 +02:00
Jacques-Henri Jourdan 13a874cf3f Memprof : get rid of the tracking_state struct, and create an entry_array struct, which only contains information specific to the array. 2020-10-19 16:41:13 +02:00
Jacques-Henri Jourdan 11411635bc Memprof: refactor realloc_trackst. 2020-10-19 16:41:13 +02:00
Jacques-Henri Jourdan d1800821df Gc.Memprof.stop does no longer try to run pending callbacks.
This is only effetive in native mode, since function calls in bytecode
mode will trigger polling and hence run pending callbacks.
2020-10-19 16:41:13 +02:00
Jacques-Henri Jourdan b371c21396 Memprof: fix rounding error. 2020-10-19 16:41:13 +02:00
Jacques-Henri Jourdan cad494b399 Whitespace, typos. 2020-10-19 16:36:23 +02:00
Florian Angeletti af2096729b release info update 2020-10-19 16:20:18 +02:00
Florian Angeletti 21c33a53cd first commit after branching 4.12 2020-10-19 16:19:49 +02:00
Florian Angeletti 24dbb0976a last commit before branching 4.12 2020-10-19 16:08:29 +02:00
Florian Angeletti 55973d1203 Bump magic numbers for 4.12 (and trunk) 2020-10-19 15:33:26 +02:00
Florian Angeletti 7acf73f2b0
Merge pull request #9980 from xavierleroy/ocamlopt-doc
Ocamlopt documentation updates
2020-10-19 14:38:20 +02:00
Xavier Leroy be02a26305 Revise explanation of -nodynlink 2020-10-19 12:00:01 +02:00
Stephen Dolan 9b3931a156
Ensure Mtype.nondep_sig checks use the correct environment (#9946) 2020-10-19 10:40:25 +01:00
jacobly0 8a46d76bf9
Fix mergeable section flags and use .rodata.cst16 where appropriate (#9981)
On x86-64 ELF, the `.rodata.cst8` section was incorrectly used.
2020-10-18 13:57:53 +02:00
David Allsopp 64f6f83f44
Update HACKING.adoc (#9966)
Clarify why basing topic branches on release tags is bad.
Documented the configure options implied by dev-mode.
2020-10-18 07:59:56 +01:00
David Allsopp 36faf1a2a6
Merge pull request #9967 from dra27/configurable-opt
Add (developer) ability to disable the use of the .opt compilers in the build
2020-10-18 07:57:23 +01:00
Xavier Leroy a9f1f9ee1b
Update manual/manual/cmds/native.etex
Co-authored-by: Vincent Laviron <vincent.laviron@gmail.com>
2020-10-16 10:28:32 +02:00
Xavier Leroy e7d2c394c0 Modernize the description of target-specific ocamlopt aspects
No more "Intel Pentium" and "AMD Athlon".
2020-10-16 10:12:30 +02:00
Xavier Leroy 0fac4b030b Explain -nodynlink better
Including interactions with PIE.

Closes: #8867
2020-10-16 09:55:22 +02:00
Xavier Leroy 8b7ff3532c
Move the examples of labeled functions to StdLabels (#9976)
In the old days, the interfaces of the labeled modules
(ArrayLabels, BytesLabels, ListLabels, StringLabels)
started with short examples of labelings.

Now, the interfaces of the non-labeled modules
(Array, Bytes, List, String) are automatically generated
from the interfaces of the labeled modules.  As a side effect,
the interfaces of Array, Bytes, List and String also start
with short examples of labelings, which is somewhat strange.

This commit reorganizes the documentation as follows:
- The documentation of the StdLabels module is expanded, and includes
  the examples of labeled functions previously scattered in
  ArrayLabels, BytesLabels, ListLabels, StringLabels.
- Array, Bytes, List, String and their labeled counterparts
  briefly mention the labeled modules and point to StdLabels,
  but no longer contain examples.
2020-10-15 15:07:31 +02:00
Thomas Refis 9fdc759ac0
Centralized tracking of frontend's global state (#9963)
import Local_store from merlin, with a simplified API following review comments
2020-10-15 14:47:19 +02:00
Greta Yorsh 5410d0c5d3
Fix example of external C function in the manual (#9977) 2020-10-14 16:31:33 +02:00
Thomas Refis efac790249
Make some locations more accurate (#8987) 2020-10-14 16:03:10 +02:00
Florian Angeletti 5e15dd8eb5
Merge pull request #9861 from trefis/9858
Catch Nondep_cannot_erase
2020-10-13 16:31:34 +02:00
Greta Yorsh 855c13cd6e
ability to restart compilation from .cmir-linear IR files 2020-10-13 15:07:13 +02:00
Nicolás Ojeda Bär 246564e8db
Remove dead code (#9974) 2020-10-13 09:48:16 +02:00
Xavier Leroy 426b10c6a8
Provide semaphores in the threading library (#9930)
This commit adds a new thread-related module Semaphore, implementing
counting semaphores and binary semaphores.

The two kinds of semaphores are presented as two different
abstract types in two sub-modules, Counting and Binary.
2020-10-12 19:09:52 +02:00
Xavier Leroy f809e9dec1
Make sure the process can terminate when the last thread calls Thread.exit (#9973)
To this end, the tick thread must be stopped, otherwise it prevents
the whole process from exiting.

Fixes: #9971
2020-10-12 15:24:40 +02:00
Mehdi Bouaziz 6ab6052e15
[hashtbl] Restore ongoing traversal status after filter_map_inplace (#8746) 2020-10-12 15:12:09 +02:00
Gabriel Scherer 0cec3a353b
Merge pull request #9803 from trefis/pr9799
pat_env points to the correct environment
2020-10-12 11:00:52 +02:00
Gabriel Scherer 82b29828d2
Allow `[@tailcall true]` and `[@tailcall false]` (#9754)
* remove the unused is_native_tail_call_heuristic forward reference

This forward-reference from Lambda to Asmcomp was used to generate
machine-specific tailcall information in -annot output; this only use
was removed in 57d329e07b, so we can now
remove it to simplify the codebase.

The logic was non-trivial and might be useful again in the future.

* [minor] testsuite: convert warnings/w51.ml to an expect-test

* [minor] translattribute: refactor attribute payload deconstruction

* [@tailcall false]: warn if the call *is* a tailcall

(+ constructor renaming suggested by Nicolás during review)

* Changes

* testsuite: add an example with the 'invalid payload' exception

(suggested by Nicolás during review)
2020-10-10 13:41:39 +02:00
Xavier Leroy d910c35301 Add a test for --enable-reserved-header-bits 2020-10-09 14:51:00 +02:00
Xavier Leroy 53ed75072d configure --enable-reserved-header-bits=N: fix range of accepted N
It ranges between 0 and 31, not 0 and 21.
2020-10-09 14:50:13 +02:00
Xavier Leroy 86c8a98f3c
Merge pull request #9948 from nojb/remove_spacetime
The Spacetime memory profiler is not going to be supported in Multicore OCaml, and  is already broken by some of the related changes in OCaml 4.12.  The core development team decided to remove Spacetime support from OCaml 4.12.
2020-10-09 14:43:23 +02:00
Damien Doligez 0069123c61
clean up and fix GC message 0x1 (#9949) 2020-10-09 12:02:00 +02:00
Nicolás Ojeda Bär 8420c3ea9f Bootstrap 2020-10-08 20:28:15 +02:00
Nicolás Ojeda Bär 7e4392a39e Changes 2020-10-08 20:28:15 +02:00
Nicolás Ojeda Bär 899a2013aa Adapt tests 2020-10-08 20:28:15 +02:00
Nicolás Ojeda Bär 43883ae4bc Remove labels after calls, checkbound, and GC points 2020-10-08 20:28:15 +02:00
Nicolás Ojeda Bär 67c9c0772e Remove Spacetime support in marshaller 2020-10-08 20:28:15 +02:00
Nicolás Ojeda Bär 3869f71e98 Remove Cblockheader 2020-10-08 20:28:15 +02:00
Nicolás Ojeda Bär 540996d21e Remove Spacetime 2020-10-08 20:28:12 +02:00