harpoon.Instrumentation.AllocationStatistics
Class InstrumentAllocs2

java.lang.Object
  extended by harpoon.Analysis.Transformation.MethodMutator
      extended by harpoon.Instrumentation.AllocationStatistics.InstrumentAllocs2
All Implemented Interfaces:
Serializable

public class InstrumentAllocs2
extends MethodMutator
implements Serializable

InstrumentAllocs2 can be used together with InstrumentedAllocationStrategy to instrument the allocation sites from a program to record how many times each of them is executed, and the total amount of memory allocated at each site.

Unlike InstrumentAllocs (which takes place at Quad level), InstrumentAllocs2 operates at the Tree form level. It changes the allocation properties of each allocation site such that the code generated for it in Tree form will contain a call to an instrumentation method, passing it both an unique identifier and the length of the memory allocated there.

Version:
$Id: InstrumentAllocs2.java,v 1.6 2004/02/08 03:21:32 cananian Exp $
Author:
Alexandru Salcianu <salcianu@MIT.edu>
See Also:
Serialized Form

Constructor Summary
InstrumentAllocs2(HCodeFactory parent, HMethod main, Linker linker, AllocationNumbering an)
          Creates a InstrumentAllocs2 object.
 
Method Summary
protected  HCode mutateHCode(HCodeAndMaps input)
          Override this method to effect transformations on split methods.
 
Methods inherited from class harpoon.Analysis.Transformation.MethodMutator
cloneHCode, codeFactory, mutateCodeName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InstrumentAllocs2

public InstrumentAllocs2(HCodeFactory parent,
                         HMethod main,
                         Linker linker,
                         AllocationNumbering an)
Creates a InstrumentAllocs2 object.

Parameters:
parent - code factory providing the original, uninstrumented code
main - main method of the program
linker - linker for the analyzed program
an - provides a globally unique integer ID for each allocation site from the program
Method Detail

mutateHCode

protected HCode mutateHCode(HCodeAndMaps input)
Description copied from class: MethodMutator
Override this method to effect transformations on split methods.

Overrides:
mutateHCode in class MethodMutator