Commit Graph

52 Commits (master)

Author SHA1 Message Date
Nicolás Ojeda Bär 540996d21e Remove Spacetime 2020-10-08 20:28:12 +02: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 768dcce48f Use allocation-size info on more than just amd64.
Moves the alloc_dbginfo type to Debuginfo, to avoid a circular
dependency on architectures that use Branch_relaxation.

This commit generates frame tables with allocation sizes on all
architectures, but does not yet update the allocation code for
non-amd64 backends.
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
Daniel Bünzli a7afd89003 s/string_of_int/Int.to_string/g 2018-11-07 13:52:02 +01:00
Fourchaux 72cfdd56e9 Typos and basic grammar error fixing (#1280) 2017-08-10 11:59:23 +01:00
Mark Shinwell c9e295ab65 Fix hash table performance problem in Emitaux (PR#7456) (#1092) 2017-03-15 11:54:44 +00:00
KC Sivaramakrishnan abc5360dc1 Remove duplicate live_offset entries from frametables (#453) 2016-12-09 15:41:22 +00:00
Mark Shinwell 5f00ce793e Improve location handling in the middle end (version for merging) (#666) 2016-07-06 15:42:29 +01:00
Mark Shinwell c843ca0691 Labels after calls, call GC points and checkbound points (again) (#660) 2016-07-06 11:44:00 +01:00
Alain Frisch c3c523109e Revert "Labels after calls, call GC points and checkbound points" 2016-07-01 18:42:51 +02:00
Mark Shinwell 432f87f077 Labels after calls, call GC points and checkbound points (#644) 2016-07-01 15:16:03 +01:00
Xavier Leroy 5d02ca6f28 In frame tables, distinguish data pointers from code pointers
Since GPR#247 (stack backtraces aware of inlining) was merged, frame tables contain two kinds of addresses of labels: code labels (as before) and data labels (new, pointing to sub-frames).

On ARM in Thumb mode, the two kinds of pointers must be distinguished, because pointers to Thumb code have the low bit set, and the assembler needs to know whether a label denotes code or data to set the low bit or not.

This commit fixes this problem by splitting the "efa_label" action of record Emitaux.emit_frame_actions into two actions, "efa_code_label" and "efa_data_label".  On all ports except ARM, the two actions are identical.  On ARM, the actions add the appropriate ".type" declaration.

Tested on ARM-32 and x86-64 only.  CI will test the other platforms.
2016-06-27 09:14:54 +02:00
Frédéric Bour 28dc832030 Make backtraces aware of inlining (#247) 2016-05-25 14:00:37 +01:00
Damien Doligez 5401ce8473 Update headers for the new license.
Remains to be done: remove all headers in testsuite/tests.
2016-02-18 16:59:16 +01:00
Damien Doligez b860d63145 whitespace cleanup, cut long lines, add some missing headers
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16415 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-09-11 11:58:31 +00:00
Gabriel Scherer 90062a8a43 GPR#212 Emitaux: also emit column location
(Frédéric Bour)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16311 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-02 15:37:02 +00:00
Damien Doligez 860c670848 merge branch 4.02 from 4.02.1 (rev 15540) to a few fixes after 4.02.2 (rev 16205)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16214 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-17 14:31:05 +00:00
Alain Frisch 9a414baa96 Allow a binary code emitter to avoid the creation of an assembly source file.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/abstract_intel_emit@15187 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-09-03 14:46:53 +00:00
Fabrice Le Fessant c6d4264a09 import new intel emit branch
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/abstract_intel_emit@15097 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-08-18 09:32:20 +00:00
Fabrice Le Fessant 457958a9e6 Add reset functions to make modules reentrant when used through compiler-libs
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14770 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-09 12:01:21 +00:00
Xavier Leroy 29b34438e0 - Constant ropagation for float and int32/int64/nativeint arithmetic.
Constant propagation for floats can be turned off with option
  -no-float-const-prop, for codes that change FP rounding modes at
  run-time.
- Clambda / C-- / Mach: represent float constants as FP numbers of type 
  float rather than literals of type string.
- Tested for AMD64; other archs need testing.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14673 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-25 08:41:13 +00:00
Xavier Leroy 3d7d4b9269 PR#6243: Make "ocamlopt -g" more resistant to ill-formed locations.
(Reflecting commit r14321 on version/4.01)



git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14322 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-11-28 14:34:45 +00:00
Fabrice Le Fessant 9b53f8b10d Re-add configure option -with-frame-pointers
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13738 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-06-03 18:03:59 +00:00
Fabrice Le Fessant 97bc1fa9e2 Reverting -with-frame-pointers
Fails to compile alt-ergo without frame-pointers. No time to debug
before tonight, so I revert and will merge again after fixing the
problem.



git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13732 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-06-03 06:29:33 +00:00
Fabrice Le Fessant 1b2667b9f2 Add -with-frame-pointers to ./configure
This option can be used to tell the native compiler that it should
update frame pointers, so that debuggers and profiling tools 
(especially Linux perf) can use them. For now, it is only supported
by the Unix/amd64 port.



git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13730 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-06-03 04:42:42 +00:00
Damien Doligez def31744f9 remove all $Id keywords
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13013 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-10-15 17:50:56 +00:00
Damien Doligez 997a678d5e clean up TABs and whitespace
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12799 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-07-30 18:04:46 +00:00
Damien Doligez 0c3a7de507 merge changes from 4.00 branching to 4.00.0 (part 1)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12784 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-07-26 19:21:54 +00:00
Fabrice Le Fessant 229044d83a Fix PR#5698: remove harcoded limit of 200000 labels in emitaux.ml
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12770 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-07-24 17:33:46 +00:00
Fabrice Le Fessant f0eff81679 Merge commit 12664 from 4.00 on trunk/
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12665 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-07-09 08:46:10 +00:00
Xavier Leroy 28c206ad37 PR#5643: issues with .cfi and .loc directives generated by ocamlopt -g
(Picking commit 12610 from version/4.00)


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12611 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-06-17 08:17:43 +00:00
Alain Frisch a0a14c08fa Enable and fix more warnings.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12498 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-05-29 11:47:28 +00:00
Xavier Leroy ceabedc058 PR#5603: wrong .file directives generated by ocamlopt -g
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12449 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-05-12 09:51:45 +00:00
Xavier Leroy 2eecf2d4c0 PR#5487: addition of CFI directives and a few filename/linenumber info to generated amd64 and i386 assembly files.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12179 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-02-21 17:41:02 +00:00
Damien Doligez 3b507dd1aa renaming of Objective Caml to OCaml and cleanup of copyright headers
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11156 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-07-27 14:17:02 +00:00
Damien Doligez 04b1656222 clean up spaces and tabs
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@9547 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2010-01-22 12:48:24 +00:00
Damien Doligez bdc0fadee2 merge changes from release/3.11.1 to release/3.11.2
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@9540 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2010-01-20 16:26:46 +00:00
Damien Doligez ed32f569e3 merge changes from ocaml3110 to ocaml3111rc0
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@9270 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2009-05-20 11:52:42 +00:00
Xavier Leroy 4b5512c74c Stack backtraces on uncaught exceptions in native code (merge of the opt_backtrace branch)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7812 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2007-01-29 12:11:18 +00:00
Xavier Leroy cc0f32b054 Changement de la licence
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@2553 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1999-11-17 18:59:06 +00:00
Xavier Leroy be4dd8dd1f Inutile de distinguer le nom du module dans les noms de fonctions
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@1677 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1997-07-30 12:27:45 +00:00
Xavier Leroy 4e28f4d9ec Utiliser . pour separer le nom du module dans les noms de fonctions
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@1662 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1997-07-26 12:22:17 +00:00
Xavier Leroy 274f164366 Representer les constantes entieres par le type Nativeint.t
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@1311 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1997-03-04 10:19:51 +00:00
Xavier Leroy 4d78025b54 Fonctions de sortie des chaines deplacees entierement dans Emitaux.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@989 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1996-09-18 13:23:56 +00:00
Xavier Leroy 2301d778e7 Renommage en Objective Caml
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@782 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1996-04-30 14:53:58 +00:00
Xavier Leroy 9c85a54888 Portage PowerPC
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@595 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1996-01-06 18:56:39 +00:00
Xavier Leroy 6ded20c275 Corrections diverses
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@455 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1995-11-19 16:53:12 +00:00
Xavier Leroy ef00b1aa1f Modif. de emit_string_literal parce que certains assembleurs (GAS 1.92
sous FreeBSD) lisent "\0033" comme un caractere de code 033 au lieu de
deux caracteres.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@334 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1995-10-16 16:19:36 +00:00