Commit Graph

19 Commits (master)

Author SHA1 Message Date
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
Gabriel Scherer 18e545207d
Merge pull request #9362 from stedolan/memprof-debuginfo-fix
Avoid looking up nonexistent Comballoc debuginfo
2020-03-17 06:57:02 +01:00
Stephen Dolan 58f8284aca
Add an assertion that we never try to read debuginfo from system frames (#9366) 2020-03-16 14:27:50 +00:00
Stephen Dolan 05afee9edd Avoid looking up nonexistent Comballoc debuginfo 2020-03-12 13:19:32 +00:00
Stephen Dolan 20f6a17ae3 Review 2020-02-04 11:03:07 +00: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 2ab32f4772 Comments per review. 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
Stephen Dolan 787e2d05a7 Apply suggestions from code review, and make depend.
Co-Authored-By: Damien Doligez <damien.doligez@gmail.com>
2019-10-22 11:47:31 +01:00
Stephen Dolan 34f97941ec Retain debug information about allocation sizes, for statmemprof.
This code is adapted from jhjourdan's 2c93ca1e711. Comballoc is
extended to keep track of allocation sizes and debug info for each
allocation, and the frame table format is modified to store them.

The native code GC-entry logic is changed to match bytecode, by
calling the garbage collector at most once per allocation.

amd64 only, for now.
2019-10-22 11:47:31 +01:00
Stephen Dolan b0ad600b88 Use a more compact representation of debug information.
Locations of inlined frames are now represented as contiguous
sequences rather than linked lists.

The frame tables now refer to debug info by 32-bit offset rather
than word-sized pointer.
2019-10-22 11:46:35 +01:00
KC Sivaramakrishnan 126383b2b2 Fix long lines 2019-08-23 09:50:05 +05:30
KC Sivaramakrishnan 3357490de0 Move native runtime globals used for roots to domain state 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 052a950dea Statistical memory profiling of blocks allocated in the major heap. 2019-05-09 16:40:45 +02:00
Stephen Dolan dda4ad6edd Remove vestigial support for stacks that grow upward (#1880)
Stacks grow downward on all platforms that OCaml supports or is ever likely to, so this PR removes some #ifdefs about the direction of stack growth.

These #ifdefs were added to support HP's PA-RISC, the last major architecture that had stacks growing upward. The last PA-RISC processor was released in 2005, and HP customers looking for an upgrade path were told to move to Intel's Itanium (!). OCaml dropped PA-RISC support in 2011, but these #ifdefs hung around.

There aren't many other machines like this. Some grepping in the Linux sources returns only one other architecture that Linux has ever supported with stacks that grow up, an embedded DSP called Meta. Support has recently been dropped. Apparently the DECSYSTEM-20 (running on the PDP-10) also had stacks growing up, but I doubt OCaml is likely to support that soon either.
2018-07-05 09:58:27 +01:00
Sébastien Hinderer d3e73595e5 Merge the asmrun and byterun directories into the runtime directory 2018-06-28 17:50:33 +02:00