[project @ 2000-06-13 15:35:29 by simonmar]
authorsimonmar <unknown>
Tue, 13 Jun 2000 15:35:29 +0000 (15:35 +0000)
committersimonmar <unknown>
Tue, 13 Jun 2000 15:35:29 +0000 (15:35 +0000)
Crude allocation-counting extension to ticky-ticky profiling.

Allocations are counted against the closest lexically enclosing
function closure, so you need to map the output back to the STG code.

ghc/driver/mangler/ghc-asm.lprl

index 193e710..a09a1db 100644 (file)
@@ -492,6 +492,7 @@ sub mangle_asm {
 
        } elsif ( /^$TUS[A-Za-z0-9_]+\.\d+$TPOSTLBL[@]?$/o
               || /^$TUS[@]?.*_CAT$TPOSTLBL[@]?$/o              # PROF: _entryname_CAT
+              || /^$TUS[@]?CC_.*_struct$TPOSTLBL[@]?$/o        # PROF: _CC_ccident_struct
               || /^$TUS[@]?.*_done$TPOSTLBL[@]?$/o             # PROF: _module_done
               || /^$TUS[@]?_module_registered$TPOSTLBL[@]?$/o  # PROF: _module_registered
               ) {
@@ -509,7 +510,7 @@ sub mangle_asm {
            $chkcat[$i]  = 'toc';
            $chksymb[$i] = $1;
 
-       } elsif ( /^$TUS[@]?([A-Za-z0-9_]+)_cc(s)?$TPOSTLBL[@]?$/o ) {
+       } elsif ( /^$TUS[@]?CC(S)?_.*$/ ) {
             # all CC_ symbols go in the data section...
            $chk[++$i]   = $_;
            $chkcat[$i]  = 'data';