<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html lang="en">
<head>
<meta content="text/html; charset=US-ASCII" http-equiv="Content-Type">
<title>
GitLab
</title>



<style>img {
max-width: 100%; height: auto;
}
</style>
</head>
<body>
<div class="content">

<h3>
Matthew Pickering pushed to branch wip/con-info
at <a href="https://gitlab.haskell.org/ghc/ghc">Glasgow Haskell Compiler / GHC</a>
</h3>
<h4>
Commits:
</h4>
<ul>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/ff1846e061095ffd5ac45ff853ca8068f1edf600">ff1846e0</a></strong>
<div>
<span>by Matthew Pickering</span>
<i>at 2020-11-23T10:42:39+00:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Profiling by info table mode (-hi)

This profiling mode creates bands by the address of the info table for
each closure. This provides a much more fine-grained profiling output
than any of the other profiling modes.

The `-hi` profiling mode does not require a profiling build.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/2225627386f0a1b443ef3bd2ca630e6aeee04406">22256273</a></strong>
<div>
<span>by Matthew Pickering</span>
<i>at 2020-11-23T10:45:36+00:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Add -finfo-table-map which maps info tables to source positions

This new flag embeds a lookup table from the address of an info table
to information about that info table.

The main interface for consulting the map is the `lookupIPE` C function

> InfoProvEnt * lookupIPE(StgInfoTable *info)

The `InfoProvEnt` has the following structure:

> typedef struct InfoProv_{
>     char * table_name;
>     char * closure_desc;
>     char * ty_desc;
>     char * label;
>     char * module;
>     char * srcloc;
> } InfoProv;
>
> typedef struct InfoProvEnt_ {
>     StgInfoTable * info;
>     InfoProv prov;
>     struct InfoProvEnt_ *link;
> } InfoProvEnt;

The source positions are approximated in a similar way to the source
positions for DWARF debugging information. They are only approximate but
in our experience provide a good enough hint about where the problem
might be. It is therefore recommended to use this flag in conjunction
with `-g<n>` for more accurate locations.

The lookup table is also emitted into the eventlog when it is available
as it is intended to be used with the `-hi` profiling mode.

Using this flag will significantly increase the size of the resulting
object file but only by a factor of 2-3x in our experience.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/ff57d01f593fd21ad3065f9503161ead460d6213">ff57d01f</a></strong>
<div>
<span>by Matthew Pickering</span>
<i>at 2020-11-23T11:03:18+00:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Add option to give each usage of a data constructor its own info table

The `-fdistinct-constructor-tables` flag will generate a fresh info
table for the usage of any data constructor. This is useful for
debugging as now by inspecting the info table, you can determine which
usage of a constructor caused that allocation rather than the old
situation where the info table always mapped to the definition site of
the data constructor which is useless.

In conjunction with `-hi` and `-finfo-table-map` this gives a more fine
grained understanding of where constructor allocations arise from in a
program.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/ad2e6d1e81d6293a345f27bfa5beadb59ebf4da2">ad2e6d1e</a></strong>
<div>
<span>by Matthew Pickering</span>
<i>at 2020-11-23T11:06:01+00:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Add whereFrom and whereFrom# primop

The `whereFrom` function provides a Haskell interface for using the
information created by `-finfo-table-map`. Given a Haskell value, the
info table address will be passed to the `lookupIPE` function in order
to attempt to find the source location information for that particular closure.

At the moment it's not possible to distinguish the absense of the map
and a failed lookup.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/21fd02c3338801e4267067cdc442397858ab42d4">21fd02c3</a></strong>
<div>
<span>by Matthew Pickering</span>
<i>at 2020-11-23T11:10:42+00:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Add test for whereFrom#
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/d3d304578c90a96ccb3d97ac15af05b5e118fdbf">d3d30457</a></strong>
<div>
<span>by Matthew Pickering</span>
<i>at 2020-11-23T11:10:46+00:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Add release notes for -hi, -finfo-table-map and -fdistinct-constructor-tables
</pre>
</li>
</ul>
<h4>30 changed files:</h4>
<ul>
<li class="file-stats">
<a href="#451725cc4e5d443a3b7c2adcdf224840f953b7e2">
compiler/GHC/Builtin/primops.txt.pp
</a>
</li>
<li class="file-stats">
<a href="#db697f6aea9f93f1583f1d5c62d25570a1e07f73">
compiler/GHC/Cmm/CLabel.hs
</a>
</li>
<li class="file-stats">
<a href="#d79a8a61508cb6c5f38a23ab2b691bb77306f672">
compiler/GHC/CoreToStg.hs
</a>
</li>
<li class="file-stats">
<a href="#9df7e695170800345fb44916a8e8f4b8f3c55be0">
compiler/GHC/Driver/CodeOutput.hs
</a>
</li>
<li class="file-stats">
<a href="#2e5692f568fd7b67a6b172e2a60469da8392508c">
compiler/GHC/Driver/Flags.hs
</a>
</li>
<li class="file-stats">
<a href="#8e72a25145f803aab964beb710b25dd6cd38aafc">
compiler/GHC/Driver/Hooks.hs
</a>
</li>
<li class="file-stats">
<a href="#9a679a2680ef6061397f1987091ea9f96ffe095d">
compiler/GHC/Driver/Main.hs
</a>
</li>
<li class="file-stats">
<a href="#774d88050336ef660c7a219fb06c480c2fc639bc">
compiler/GHC/Driver/Session.hs
</a>
</li>
<li class="file-stats">
<a href="#90a56cf7f130d66194a6a61cb5f372eb339ab111">
compiler/GHC/Stg/CSE.hs
</a>
</li>
<li class="file-stats">
<a href="#9d790ca611a17d0b485f5d79e362962120d86f89">
<span class="new-file">
+
compiler/GHC/Stg/Debug.hs
</span>
</a>
</li>
<li class="file-stats">
<a href="#305c148430a70c23122a9aed4b8b89d96bf14b46">
compiler/GHC/Stg/DepAnal.hs
</a>
</li>
<li class="file-stats">
<a href="#0d4e7518cb6dad64554be6eafc0d6219e968df8d">
compiler/GHC/Stg/FVs.hs
</a>
</li>
<li class="file-stats">
<a href="#cfd807bd18e4d16c58aee578cf320694fbb0782e">
compiler/GHC/Stg/Lift.hs
</a>
</li>
<li class="file-stats">
<a href="#657eec52eed3c8be846a0b60eb6088d5f465de8a">
compiler/GHC/Stg/Lift/Analysis.hs
</a>
</li>
<li class="file-stats">
<a href="#7c8535980861f0195aefc14e35e7ead5ea396ada">
compiler/GHC/Stg/Lift/Monad.hs
</a>
</li>
<li class="file-stats">
<a href="#395cb654293c1fc577e034de4856683f093cc356">
compiler/GHC/Stg/Lint.hs
</a>
</li>
<li class="file-stats">
<a href="#6bc3dee83fb9880a99e34d8e70094a117f905dc3">
compiler/GHC/Stg/Stats.hs
</a>
</li>
<li class="file-stats">
<a href="#ab7f5bb638d3dce352affbd617434b76735301b0">
compiler/GHC/Stg/Syntax.hs
</a>
</li>
<li class="file-stats">
<a href="#4675150d494f381e32f32e7b58c494b88e8d2584">
compiler/GHC/Stg/Unarise.hs
</a>
</li>
<li class="file-stats">
<a href="#aa1ca517ccf154900e46e9f1db33050e272840be">
compiler/GHC/StgToCmm.hs
</a>
</li>
<li class="file-stats">
<a href="#2f341f858154eb8e1900d5bd92a156b13ddd06f3">
compiler/GHC/StgToCmm/Bind.hs
</a>
</li>
<li class="file-stats">
<a href="#aec24e3b6966335ef5c0aac97b5106fc67c6e5ea">
compiler/GHC/StgToCmm/Closure.hs
</a>
</li>
<li class="file-stats">
<a href="#d7a83b440e11aa7b31112ff697e0a50bbde388d8">
compiler/GHC/StgToCmm/DataCon.hs
</a>
</li>
<li class="file-stats">
<a href="#77c485508ade5a11428d9fce17204d33c5825722">
compiler/GHC/StgToCmm/Expr.hs
</a>
</li>
<li class="file-stats">
<a href="#f117e9b1b1b9964c4d89aa403162f1c388114cda">
compiler/GHC/StgToCmm/Monad.hs
</a>
</li>
<li class="file-stats">
<a href="#d12a108e34fe83acc9c99357ae841e22a0af0a23">
compiler/GHC/StgToCmm/Prim.hs
</a>
</li>
<li class="file-stats">
<a href="#8390b439f37437a2642e4e31bd6e7e91438915d1">
compiler/GHC/StgToCmm/Prof.hs
</a>
</li>
<li class="file-stats">
<a href="#13bc6c694b9a1fa78aeab1e992926d759374ecb2">
compiler/GHC/StgToCmm/Utils.hs
</a>
</li>
<li class="file-stats">
<a href="#26dbb322e14341de82047033d8554b8dcac43f9a">
<span class="new-file">
+
compiler/GHC/Types/IPE.hs
</span>
</a>
</li>
<li class="file-stats">
<a href="#9b5f1671f007d547cf3b5ec40babeafdffb99b1a">
compiler/GHC/Types/SrcLoc.hs
</a>
</li>
</ul>
<h5>The diff was not included because it is too large.</h5>

</div>
<div class="footer" style="margin-top: 10px;">
<p style="font-size: small; color: #666;">

<br>
<a href="https://gitlab.haskell.org/ghc/ghc/-/compare/d23b9858b5306fef2e2f2371f08ca4a7c06e31de...d3d304578c90a96ccb3d97ac15af05b5e118fdbf">View it on GitLab</a>.
<br>
You're receiving this email because of your account on gitlab.haskell.org.
If you'd like to receive fewer emails, you can
adjust your notification settings.



</p>
</div>
</body>
</html>