eventlog: Log the current stack size when stack overflows
ClosedPublic

Authored by mpickering on Oct 31 2018, 5:52 AM.

Diff Detail

Repository
rGHC Glasgow Haskell Compiler
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
mpickering created this revision.Oct 31 2018, 5:52 AM
mpickering updated this revision to Diff 18536.Oct 31 2018, 5:53 AM
  • indentation

But this doesn't actually send the size to the eventlog, only stderr. Is this intentional?

In order for this to affect the eventlog you will need to modify EventLog.c:postSchedEvent. However, it looks like info2 may already be used for something else in the EVENT_STOP_THREAD case (although it's not clear what).

In order for this to affect the eventlog you will need to modify EventLog.c:postSchedEvent. However, it looks like info2 may already be used for something else in the EVENT_STOP_THREAD case (although it's not clear what).

It is used for the BlockedOnBlackHole event which is emitted just above the code I added.

simonmar requested changes to this revision.Nov 5 2018, 2:09 AM
simonmar added inline comments.
rts/Schedule.c
491

This can never be true, StackOverflow is not a valid value for the why_blocked field.

This revision now requires changes to proceed.Nov 5 2018, 2:09 AM
mpickering updated this revision to Diff 18590.Nov 5 2018, 3:39 AM
  • Remove redundant conditional
mpickering marked an inline comment as done.Nov 5 2018, 3:40 AM

I removed that branch now I understand what is going on more.

simonmar accepted this revision.Nov 9 2018, 2:27 AM
simonmar added inline comments.
rts/Trace.c
222

please fix the lint

This revision is now accepted and ready to land.Nov 9 2018, 2:27 AM
mpickering updated this revision to Diff 18629.Nov 9 2018, 2:55 AM
  • indentation
  • Remove redundant conditional
  • fix link
mpickering marked an inline comment as done.Nov 9 2018, 3:14 AM
This revision was automatically updated to reflect the committed changes.