[Git][ghc/ghc][wip/con-info] Start of documentation
Matthew Pickering
gitlab at gitlab.haskell.org
Wed Nov 4 08:22:50 UTC 2020
Matthew Pickering pushed to branch wip/con-info at Glasgow Haskell Compiler / GHC
Commits:
fb288e29 by Matthew Pickering at 2020-11-04T08:22:41+00:00
Start of documentation
- - - - -
1 changed file:
- docs/users_guide/debug-info.rst
Changes:
=====================================
docs/users_guide/debug-info.rst
=====================================
@@ -331,3 +331,54 @@ Further Reading
For more information about the debug information produced by GHC see
Peter Wortmann's PhD thesis, `*Profiling Optimized Haskell: Causal
Analysis and Implementation* <http://etheses.whiterose.ac.uk/8321/>`__.
+
+
+Direct Mapping
+==============
+
+In addition to the DWARF debug information, which can be used by many
+standard tools, using the ``-finfo-table-map`` flag
+
+
+.. ghc-flag:: -finfo-table-map
+ :shortdesc: Embed a lookup table in the generated binary which
+ maps the address of an info table to the source position
+ the closure originated from.
+ :type: dynamic
+ :category: debugging
+
+ :since: 9.2
+
+ This flag enables the generation of a table which maps the address of
+ an info table to an approximate source position of where that
+ info table statically originated from.
+
+.. ghc-flag:: -fdistinct-constructor-tables
+ :shortdesc: Generate a fresh info table for each usage
+ of a data constructor.
+ :type: dynamic
+ :category: debugging
+
+ :since: 9.2
+
+ For every usage of a data constructor in the source program
+ a new info table will be created. This is useful for debugging
+ as if each usage has a unique info table then the info table map
+ and profiling modes can distinguish the allocation sites of
+ a data constructor.
+
+
+
+Querying the Info Table Map
+---------------------------
+
+If it is generated then the info table map can be used
+in two ways.
+
+1. The ``whereFrom`` function can be used to determine the source
+ position which we think a specific closure was created.
+2. The complete mapping is also dumped into the eventlog.
+
+If you are using gdb then you can use the ``lookupIPE`` function
+directly in order to find any information which is known
+about the info table for a specific closure.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/fb288e2950e3644cf4978aab6d8a3c7f2722d0ae
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/fb288e2950e3644cf4978aab6d8a3c7f2722d0ae
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20201104/07006e6f/attachment-0001.html>
More information about the ghc-commits
mailing list