Commit Graph

21 Commits (be6eb2ccdabb957c4817b8a24280b2f4249ac87f)

Author SHA1 Message Date
Damien Doligez e92d13c986 last commit before branching 4.11 2020-04-22 17:28:08 +02:00
Jacques-Henri Jourdan 7dbbfce890 New ephemeron-free API for Memprof.
The user can register several callbacks, which are called for various
events during the block's lifetime. We need to maintain a data
structure for tracked blocks in the runtime. When using threads,
callbacks can be called concurrently in a reentrant way, so the
functions manipulating this data structure need to be reentrant.
2019-12-21 10:21:48 +01:00
Xavier Leroy 2c4e6e8144 Fix preprocessor error during make depend
Currently, "make depend" computes dependencies in bytecode mode and in native-code mode for all .c files.  For signals_nat.c, this causes an error in bytecode mode, because HAS_STACK_OVERFLOW_DETECTION is defined but CONTEXT_SP is not defined, as no -DTARGET_$(ARCH) option is given on the command line.

This commit separates bytecode-relevant source files and native-code-relevant source files when computing dependencies.
2019-10-21 15:44:21 +02:00
Florian Angeletti cf5cca65a1 make alldepend 2019-10-18 18:24:08 +02:00
Greta Yorsh 0b6b544fcb Split Linearize into two modules
Separate the description of the IR from the transformations
performed on it by moving type declarations from linearize.ml
into their own file, called linear.ml.
2019-09-04 11:55:11 +01:00
Jacques-Henri Jourdan 90073e96e5 Memprof tracking of interned data. 2019-08-27 19:14:56 +02:00
Jacques-Henri Jourdan c0dbbfdd71 Memprof: stop using C global roots, and use our own root system.
Registering and unregistering global C roots was time consuming.
2019-08-27 19:05:03 +02:00
KC Sivaramakrishnan ad96dec89c Use domain state field names that do not conflict with compatibility.h
The domain state structure (caml_domain_state) uses certaing field names
(young_start, young_limit, etc.) that conflict with the macro
definitions in compatibility.h that use the same names. These macro
definitions are made only when CAML_NAME_SPACE is not defined. To avoid
conflict, when CAML_NAME_SPACE is not defined, we prefix the field names
in caml_domain_state with an underscore.

Update .depend files.
2019-08-23 09:59:53 +05:30
KC Sivaramakrishnan 0d19da48d4 Make depend. Fix reference to ref table. 2019-08-23 09:50:05 +05:30
Jacques-Henri Jourdan 593f94055a Dynlink support for ocamldebug
This commit adds dynlink support for ocamldebug. As a side effect, it also:
  - factorizes the various functions searching for a code fragment into one,
    called [caml_find_code_fragment];
  - removes the [caml_register_code_fragment], which does not seem to
    be used anywhere, and which clearly should not be used by external code.
2019-07-16 10:52:48 +02:00
Jacques-Henri Jourdan 79088fb09d Guarantee that no finalisers will be called while allocating memory in OCaml heap from C code.
The finalizers and all the other asynchronous callbacks (including
signal handlers, memprof callbacks and finalizers) are now called in a
common function, [caml_async_callbacks]. It is called in
[caml_check_urgent_gc] and wherever [caml_process_pending_signals] was
called.

This makes it possible to simplify the [caml_gc_dispatch] logic by
removing the loop it contains, since it no longer calls finalizers.
2019-06-05 14:25:26 +02:00
Jacques-Henri Jourdan b838e48c39 Memprof: Instead of a Poisson process, use a binomial distribution.
The workaround used for ignoring samples in the minor heap in native
mode now makes allocation very slow (or non-terminating) when the
sampling rate is not small enough. This will be fixed when sampling in
the minor heap in native mode will be implemented.
2019-05-21 17:10:16 +02:00
Jacques-Henri Jourdan 052a950dea Statistical memory profiling of blocks allocated in the major heap. 2019-05-09 16:40:45 +02:00
Mark Shinwell dbede46c2e
Improve the packing mechanism used to build Dynlink (#2268) 2019-03-19 10:26:35 +00:00
Mark Shinwell 2cc1ea26b9 Remove gprof support (#2314)
This commit removes support for gprof-based profiling (the -p option to ocamlopt).  It follows a discussion on the core developers' list, which indicated that removing gprof support was a reasonable thing to do. The rationale is that there are better easy-to-use profilers out there now, such as perf for Linux and Instruments on macOS; and the gprof support has always been patchy across targets. We save a whole build of the runtime and simplify some other parts of the codebase by removing it.
2019-03-16 19:56:53 +01:00
Damien Doligez 6bbb913693 last commit before branching 4.08 2019-01-18 15:29:36 +01:00
Leo White fc1e6ad5a2 Update .depend 2018-11-21 03:39:34 -05:00
Alain Frisch 2e5b9d1ef1
"Alerts" as a generalization of "deprecated" (#1804) 2018-11-15 09:51:35 +01:00
Gabriel Scherer 8396c0b8bc make alldepend 2018-11-11 17:20:27 +01:00
Gabriel Scherer d5c76eaa9f make alldepend 2018-08-06 17:31:52 +02:00
Sébastien Hinderer d3e73595e5 Merge the asmrun and byterun directories into the runtime directory 2018-06-28 17:50:33 +02:00