Add initial events into the eventlog for forkProcess child
Needs RevisionPublic

Authored by duncan on Jul 10 2014, 5:11 AM.

Details

Summary

In the RTS, when we forkProcess we set up the eventlog for the child process. However we currently don't emit any initial events into that child's eventlog. That's wrong because then when reading that eventlog you cannot tell what is going on, you don't know the capsets or tasks or anything.

Now, I must admit that this code has not been tested. I found it in an old git stash pile :-). So this may not be tracing everything, we'll have to eyeball a couple eventlogs to compare them.

Test Plan

Look at a eventlog created from the forkProcess child and compare it with one from a normal process startup. They ought to contain the same information.

Could also try using the ghc-events validate command.

Diff Detail

Lint
Lint Skipped
Unit
Unit Tests Skipped
duncan updated this revision to Diff 121.Jul 10 2014, 5:11 AM
duncan retitled this revision from to Add initial events into the eventlog for forkProcess child.
duncan updated this object.
duncan edited the test plan for this revision. (Show Details)
duncan added reviewers: simonmar, edsko.
duncan added a project: GHC.
simonmar accepted this revision.Jul 11 2014, 10:03 PM
simonmar edited edge metadata.

I think a better way would be to extract the events that we need to emit at the start of a new event log, and share that between forkProcess, the ordinary startup code, and the new support for starting event logging at runtime that Karolis is working on.

This revision is now accepted and ready to land.Jul 11 2014, 10:03 PM
simonmar requested changes to this revision.Jul 11 2014, 10:03 PM
simonmar edited edge metadata.

oops, didn't mean to accept

This revision now requires changes to proceed.Jul 11 2014, 10:03 PM
Mikolaj requested changes to this revision.Oct 3 2014, 3:54 PM
Mikolaj edited edge metadata.
Mikolaj added inline comments.
rts/Schedule.c
1914

I have no idea if it matters, but in RtsStartup.c all these events are logged just before initTimer(), not after

1923

insert something like "cap = capabilities[i]"

1932

I'm quite lost in this code, but don't we also here need

traceEventHeapInfo(CAPSET_HEAP_DEFAULT,
                   RtsFlags.GcFlags.generations,
                   RtsFlags.GcFlags.maxHeapSize * BLOCK_SIZE_W * sizeof(W_),
                   RtsFlags.GcFlags.minAllocAreaSize * BLOCK_SIZE_W * sizeof(W_),
                   MBLOCK_SIZE_W * sizeof(W_),
                   BLOCK_SIZE_W  * sizeof(W_));

this is taken from

RtsStartup.c- initStorage();

Other than that, I couldn't find any events we miss, by comparing this code and the normal init sequence. Comparing the eventlogs may reveal more.