Skip to content

Commit eeb1c85

Browse files
Add a summary document about the ghc work/branches
1 parent 2f78a12 commit eeb1c85

1 file changed

Lines changed: 76 additions & 0 deletions

File tree

dev/ghc-work.md

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
## **GHC 8.8.4**
2+
3+
### **Original Work**
4+
5+
* **Tag:** `ghc-8.8.4-eventlog-enhancements`
6+
7+
* Introduced `threadCPUTime#` primop early in development.
8+
* CPU time was initially measured using `clock_gettime` before and after thread execution in the scheduler.
9+
* Later transitioned to **eventlog-based measurement**, making the primop unused in practice.
10+
11+
#### **Follow-up Work**
12+
13+
* **Tag:** `ghc-8.8.4-threadCPUTime-add-alloc-sched-count`
14+
15+
* Revived `threadCPUTime#` primop hooks.
16+
* Added additional counters:
17+
18+
* Scheduler count
19+
* Allocation tracking
20+
* Enabled **in-memory performance data collection**, allowing:
21+
22+
* CPU time
23+
* Allocations
24+
* Scheduler count
25+
* Works **without requiring eventlogs**.
26+
27+
---
28+
29+
## **GHC 8.10.7**
30+
31+
### **Eventlog Enhancements Port**
32+
33+
* **Tag:** `ghc-8.10.7-eventlog-enhancements`
34+
35+
* Port of eventlog-based counter work from 8.8.4.
36+
37+
#### **Primop Enhancements**
38+
39+
* **Tag:** `ghc-8.10.7-primop-enhancements`
40+
41+
* Port of in-memory performance counter collection using primops.
42+
43+
##### **Debug Enhancements**
44+
45+
* **Tag:** `ghc-8.10.7-debug-enhancements`
46+
47+
* Added tracing hooks in `forkOn`.
48+
* Purpose:
49+
50+
* Track and account for all threads created
51+
* Covers both:
52+
53+
* GHC runtime-created threads
54+
* User-created threads
55+
56+
---
57+
58+
## **GHC 9.2.8**
59+
60+
### **File Lock Debugging**
61+
62+
* **Tag:** `ghc-9.2.8-file-lock-debug`
63+
64+
* Introduced debugging code for a file locking bug in GHC.
65+
66+
### **Performance Counters (threadCPUTime#)**
67+
68+
* **Tag:** `ghc-9.2.8-perf-counters-1-rc1`
69+
70+
* Port of the 8.10.7 `primop-enhancements` work.
71+
72+
#### **Memory Leak Profiling**
73+
74+
* **Tag:** `ghc-9.2.8-leak-profiling-1-rc1`
75+
76+
* Added work related to memory leak profiling.

0 commit comments

Comments
 (0)