Changes between Version 14 and Version 15 of Commentary/Compiler/StrictnessAnalysis/KirstenNotes


Ignore:
Timestamp:
Nov 7, 2006 10:20:32 PM (8 years ago)
Author:
kirsten
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Commentary/Compiler/StrictnessAnalysis/KirstenNotes

    v14 v15  
    5252}; 
    5353}}} 
    54 Here, {{{Main_zdwrepeated_ct}}} is actually an {{{StgEntCounter}}} (this type is declared in [[GhcFile(includes/StgTicky.h)]]). The counters get used by {{{printRegisteredCounterInfo}}} in [[GhcFile(rts/Ticky.c)]], which prints out the ticky reports. The counter fields are accessed using offsets defined in [[GhcFile(includes/GHCConstants.h)]] ({{{oFFSET_StgEntCounter_*}}}), which in turn get generated from [[GhcFile(includes/mkDerivedConstants.c)]] (change it and then run {{{make}}} in {{{includes/}}}. Note that the first 3 fields of the counters are 16-bit ints and so the generated ticky-counter registration code has to reflect that (I fixed a bug where the first field was getting treated as a 32-bit int.) 
     54Here, {{{Main_zdwrepeated_ct}}} is actually an {{{StgEntCounter}}} (this type is declared in [[GhcFile(includes/StgTicky.h)]]). The counters get used by {{{printRegisteredCounterInfo}}} in [[GhcFile(rts/Ticky.c)]], which prints out the ticky reports. The counter fields are accessed using offsets defined in [[GhcFile(includes/GHCConstants.h)]] ({{{oFFSET_StgEntCounter_*}}}), which in turn get generated from [[GhcFile(includes/mkDerivedConstants.c)]] (change it and then run {{{make}}} in {{{includes/}}}.  
     55 
     56<s>Note that the first 3 fields of the counters are 16-bit ints and so the generated ticky-counter registration code has to reflect that (I fixed a bug where the first field was getting treated as a 32-bit int.)</s> I modified the {{{StgEntCounter}}} type so that all fields are {{{StgWord}}}s, because it seems that the code generator can't cope with anything else anyway (i.e., in the declaration above, {{{Main_zdwrepeated_ct[]}}} is an array of {{{StgWord}}}s, even though the C type declaration implies that some fields are halfwords.)