Commit Graph

13 Commits (master)

Author SHA1 Message Date
David Allsopp 692bd73123 OCAMLRUNPARAM=b=2 => load debuginfo
Load the debug information during runtime startup if OCAMLRUNPARAM=b=2.
This guards against the specific case of running out of fds, since the
debug information can't then be loaded.
2018-12-11 10:17:04 +01:00
David Allsopp 43b28fac00 Improve error messages when loading backtrace info
Before, any errors when loading bytecode backtrace information were
fatal and the error message was potentially misleading.
2018-12-11 08:54:49 +01:00
Stephen Dolan 0040c5d783 Print function names (derived from Lambda.scoped_location) in backtraces
Function names now appear in backtraces and are available via Printexc.
2020-04-27 12:58:53 +01:00
Stephen Dolan 060f6e8e47 Avoid scanning the stack twice when collecting callstacks in Memprof. 2020-02-03 10:51:53 +00:00
Stephen Dolan 8633c32525 Distinguish "0" from "don't care" in caml_current_callstack_write. 2020-01-25 22:55:56 +01:00
Stephen Dolan f874b3ee01 Memprof: report different callstacks for different combined allocations 2020-01-25 22:55:56 +01:00
Xavier Leroy 53327d777d Avoid duplicate definitions of "common" global variables
The variables are caml_debug_info and caml_atom_table.
The multiple definitions look like a cut-and-paste error.
They cause problems with C compilers that don't follow the "common" model.

Fixes: #9144
2019-12-12 16:41:17 +01:00
Stephen Dolan f3c650b257 Remove excessive stack usage in caml_get_exception_raw_backtrace
caml_alloc is now used allocate backtraces, which is safe now that
caml_alloc can't call async callbacks.
2019-08-27 14:58:07 +01:00
KC Sivaramakrishnan 126383b2b2 Fix long lines 2019-08-23 09:50:05 +05:30
KC Sivaramakrishnan c06038a0ee Move backtrace support global variables to domain state.
Since we cannot access backtrace position in cmmgen.ml anymore,
Cmm.raise_kind in removed. Instead, we use Lambda.raise_kind. When
assembly code is generated, we reset the backtrace position to 0 in the
case of regular raise. Importantly, the semantics remains the same.
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 052a950dea Statistical memory profiling of blocks allocated in the major heap. 2019-05-09 16:40:45 +02:00
Sébastien Hinderer d3e73595e5 Merge the asmrun and byterun directories into the runtime directory 2018-06-28 17:50:33 +02:00