Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • GHC GHC
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 5,401
    • Issues 5,401
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 590
    • Merge requests 590
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell CompilerGlasgow Haskell Compiler
  • GHCGHC
  • Wiki
  • Event log
  • live monitoring

live monitoring · Changes

Page history
Started the completed tasks list authored Sep 02, 2014 by kvelicka's avatar kvelicka
Hide whitespace changes
Inline Side-by-side
event-log/live-monitoring.md
View page @ a23288d2
......@@ -11,11 +11,6 @@ In case you find some flaws in my understanding, something that you disagree wit
## Goals
### Initial Goals
As set out by [ Duncan Coutts](http://www.well-typed.com/people/duncan):
In the RTS:
......@@ -39,28 +34,15 @@ Basic demo of live monitoring using above new features:
- demo CLI 'monitoring' prog that uses the new ghc-events lib to start reading and decoding the event stream.
- Proof-of-concept EKG-like functionality would be to emit mem/GC summary stats lines every second.
## Notes from meetings
- In current state, RTS writes to the eventlog asynchronously.
- Start/stop of logging would need to stop the HECs for sync. Need to measure the performance of this
- Peter: Stop HECs for sync: Could request a global GC for this? That gives you RTS-wide synchronization for free, and doing a GC is probably (?) cheap enough.
- During this we need to traverse threads in struct generation_, they are in global variable called generations. Also look into StgTSO (thread structures)
- Flushing only needs to flush inactive buffers (that are also not empty)
- Possibly add some GC events (some are currently in tracegc at the moment):
- heap size
- heap live
- Start/stop of streaming is different from the "sync events" mentioned in goals
- Tracing has two levels:
- "Tracing" - more general, prints to stderr, used for debugging
- "Event" - lives in RTS/Eventlog, used for writing \*.eventlog files
- enableEvents needs room for arguments as well as "flags".
- Event should hold its parent Capability in itself, having CapEvents is redundant (may be out of scope for my project)
## Implemented changes
## Proposed APIs
- Implemented an incremental parser for ghc-events
- Made the code compile on both 7.8 and 7.9
- Removed the ErrorT instances (Get has its own fail method now)
- Added an incomplete .eventlog file to the test suite to test incremental parsing
- Cleaned some of the code with hlint
### ghc-events
### API for ghc-events
Client API relevant to real-time event monitoring. The full API is larger; you can find it in the [ ghc-events library documentation](https://hackage.haskell.org/package/ghc-events).
......@@ -137,7 +119,7 @@ data CapEvent
```
### RTS
## Proposed RTS event logging API
C side:
......@@ -198,4 +180,25 @@ initEventLogging:: IO()
setDestination:: Fd -> IO()
-- <...>
-- equivalent to functions on C side
```
\ No newline at end of file
```
## Misc Notes
### Implementation concerns
- In current state, RTS writes to the eventlog asynchronously.
- Start/stop of logging would need to stop the HECs for sync. Need to measure the performance of this
- Peter: Stop HECs for sync: Could request a global GC for this? That gives you RTS-wide synchronization for free, and doing a GC is probably (?) cheap enough.
- During this we need to traverse threads in struct generation_, they are in global variable called generations. Also look into StgTSO (thread structures)
- Flushing only needs to flush inactive buffers (that are also not empty)
- Possibly add some GC events (some are currently in tracegc at the moment):
- heap size
- heap live
- Start/stop of streaming is different from the "sync events" mentioned in goals
- Tracing has two levels:
- "Tracing" - more general, prints to stderr, used for debugging
- "Event" - lives in RTS/Eventlog, used for writing \*.eventlog files
- enableEvents needs room for arguments as well as "flags".
- Event should hold its parent Capability in itself, having CapEvents is redundant (may be out of scope for my project)
Clone repository Edit sidebar
  • Adventures in GHC compile times
  • All things layout
  • AndreasK
  • AndreasPK
  • Back End and Run Time System
  • Backpack refactoring
  • Backpack units
  • Brief Guide for Compiling GHC to iOS
  • Building GHC on Windows with Stack protector support (SSP) (using Make)
  • CAFs
  • CafInfo rework
  • Compiling Case Expressions in ghc
  • Compiling Data.Aeson Error
  • Contributing a Patch
  • Core interface section
View All Pages