Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions contents.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,12 @@ Indices and tables
:hidden:

src/glossary
src/tools

* :ref:`genindex`
* :ref:`search`
* :ref:`glossary`
* :ref:`tools`


Bibliography
Expand Down
139 changes: 139 additions & 0 deletions src/tools.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
.. _tools:

Tools
=====

Criterion
---------

`Criterion <https://hackage.haskell.org/package/criterion>`__ is a library for microbenchmarking in Haskell.

* :doc:`Criterion, Gauge, and Tasty-Bench </src/Measurement_Observation/Haskell_Profiling/criterion>`.

Eventlog
--------

`Eventlog <https://downloads.haskell.org/~ghc/9.2.4/docs/html/users_guide/runtime_control.html#rts-eventlog>`__ is a GHC runtime system feature that logs events at runtime of a compiled program. It provides runtime information on the heap, the garbage collector, the scheduler, and arbitrary events that a user inserts into their own code.

* :doc:`Eventlog </src/Measurement_Observation/Haskell_Profiling/eventlog>`.
* :ref:`Klister — investigating a memory leak <src/case_studies/klister:optimization 2: a memory leak casts a long shadow>`.
* :ref:`Klister — locating allocations with info tables <src/case_studies/klister:optimization 4: fixing allscopesets>`.

eventlog2html
~~~~~~~~~~~~~

`eventlog2html <https://mpickering.github.io/eventlog2html/>`__ is a tool for creating interactive visualisations of eventlogs. In particular, it creates interactive charts from the heap profiling events.

* :doc:`Eventlog </src/Measurement_Observation/Haskell_Profiling/eventlog>`.
* :ref:`Klister — investigating a memory leak <src/case_studies/klister:optimization 2: a memory leak casts a long shadow>`.
* :ref:`Klister — locating allocations with info tables <src/case_studies/klister:optimization 4: fixing allscopesets>`.

eventlog-live
~~~~~~~~~~~~~

`eventlog-live <https://hackage.haskell.org/package/eventlog-live/>`__ analyses the eventlog of any Haskell program and streams the resulting telemetry data to any observability platform that supports the OpenTelemetry protocol.

ghc-events
~~~~~~~~~~

`ghc-events <https://hackage.haskell.org/package/ghc-events>`__ is a library and a tool for parsing .eventlog files from GHC.

* :ref:`Eventlog — Requirements <src/measurement_observation/haskell_profiling/eventlog:requirements>`.

hp2ps
~~~~~

`hp2ps <https://downloads.haskell.org/~ghc/9.2.4/docs/html/users_guide/profiling.html#hp2ps-rendering-heap-profiles-to-postscript>`__ converts a .hp file produced by the -h<break-down> runtime option into a PostScript graph of the heap profile.

* :ref:`Klister — investigating a memory leak <src/case_studies/klister:optimization 2: a memory leak casts a long shadow>`.

ghc-debug
---------

`ghc-debug <https://ghc.gitlab.haskell.org/ghc-debug/>`__ provides external inspection of the heap of a Haskell program, supporting analysis of objects, references, and memory use.

* :doc:`GHC Debug </src/Measurement_Observation/Stg_RTS_Profiling/ghc_debug>`.

GHC-vis
-------

`ghc-vis <https://dennis.felsing.org/ghc-vis/>`__ is a tool to visualize live Haskell data structures in GHCi.

* :ref:`Memory Footprints of Data Types — Use GHC-vis <src/measurement_observation/core_profiling/data_type_memory_footprint:use ghc-vis>`.


inspection-testing
------------------

`inspection-testing <https://hackage.haskell.org/package/inspection-testing>`__ is a GHC plugin that allows you to embed assertions about the intermediate code into your Haskell code, and have them checked by GHC.

* :doc:`Inspection Testing </src/Measurement_Observation/Haskell_Profiling/inspection_testing>`.


Linux perf
----------

`Linux perf <https://perfwiki.github.io/>`__ can instrument CPU performance counters, tracepoints, kprobes, and uprobes (dynamic tracing).

* :doc:`Linux perf </src/Measurement_Observation/Binary_Profiling/linux_perf>`.

Speedscope
~~~~~~~~~~

`Speedscope <https://github.com/jlfwong/speedscope>`__ is an interactive web-based viewer for performance profiles.

* :ref:`Linux perf — Helpful One Liners <src/measurement_observation/binary_profiling/linux_perf:helpful one liners>`.

NoThunks
--------

`NoThunks <https://hackage.haskell.org/package/nothunks>`__ is a Haskell library to examine values for unexpected thunks, which can then be used in assertions.

* :doc:`Nothunks </src/Measurement_Observation/Haskell_Profiling/nothunks>`.

Tasty-Bench
-----------

`tasty-bench <https://hackage.haskell.org/package/tasty-bench>`__ is a Haskell framework for performance measurement with a Tasty-style interface.

* :doc:`Criterion, Gauge, and Tasty-Bench </src/Measurement_Observation/Haskell_Profiling/criterion>`.

ThreadScope
-----------

`ThreadScope <https://wiki.haskell.org/ThreadScope>`__ is a tool for performance profiling of parallel Haskell programs.

* :doc:`ThreadScope </src/Measurement_Observation/Thread_Profiling/scopes>`.

Ticky-Ticky Profiling
---------------------

`Ticky-Ticky Profiling <https://downloads.haskell.org/~ghc/9.2.4/docs/html/users_guide/profiling.html#using-ticky-ticky-profiling-for-implementors>`__ is very simple (conceptually): instrument the C code generated by GHC with a lot of extra code that updates counters when various (supposedly) interesting things happen, and generate a report giving the values of the counters when your program terminates. GHC does this instrumentation for you when you compile your program with a special flag.

* :doc:`TickyTicky </src/Measurement_Observation/Stg_RTS_Profiling/ticky_ticky>`.
* :ref:`How to Debug — Keep an Audit Trail <src/preliminaries/how_to_debug:keep an audit trail>`.
* :ref:`Klister — Restate the Problem <src/case_studies/klister:restate the problem>`.
* :ref:`Klister — Optimization 1: Better Data Structures: Maps <src/case_studies/klister:optimization 1: better data structures: maps>`.
* :ref:`Klister — Optimization 4: Fixing allScopeSets <src/case_studies/klister:optimization 4: fixing allscopesets>`.

Valgrind
--------

`Valgrind <https://valgrind.org/docs/manual/manual.html>`__ is an instrumentation framework for building dynamic analysis tools. It comes with a set of tools each of which performs some kind of debugging, profiling, or similar task that helps you improve your programs.

* :doc:`Valgrind </src/Measurement_Observation/Binary_Profiling/valgrind>`.

Cachegrind
~~~~~~~~~~

`Cachegrind <https://valgrind.org/docs/manual/cg-manual.html>`__ is a Valgrind tool, a high-precision tracing profiler.

* :doc:`Using Cachegrind </src/Measurement_Observation/Binary_Profiling/cachegrind>`.

Weigh
-----

`Weigh <https://hackage.haskell.org/package/weigh>`__ is a Haskell package to measure allocations of data constructors and functions.

* :doc:`Weigh </src/Measurement_Observation/Haskell_Profiling/weigh>`.
* :ref:`Memory Footprints of Data Types — Other Ways <src/measurement_observation/core_profiling/data_type_memory_footprint:other ways>`.
Loading