harpoon.Instrumentation.AllocationStatistics
Class AllocationNumbering

java.lang.Object
  extended by harpoon.Instrumentation.AllocationStatistics.AllocationNumbering
All Implemented Interfaces:
AllocationNumberingInterf, Serializable

public class AllocationNumbering
extends Object
implements AllocationNumberingInterf, Serializable

An AllocationNumbering object assigns unique numbers to each allocations site from a program and (possibly) to each call sites. Later, these numbers can be used in the instrumenting code (e.g. InstrumentAllocs).

Version:
$Id: AllocationNumbering.java,v 1.6 2003/06/04 18:46:09 salcianu Exp $
Author:
C. Scott Ananian <cananian@alumni.princeton.edu>
See Also:
Serialized Form

Field Summary
 Map alloc2int
           
 Map call2int
           
 
Constructor Summary
AllocationNumbering(CachingCodeFactory ccf, ClassHierarchy ch, boolean callSites)
          Creates an AllocationNumbering object.
 
Method Summary
 int allocID(Quad q)
           
 int callID(Quad q)
          Return an integer identifying the CALL quad q.
 Set getAllocs()
          Return the set of instrumented allocation sites.
 Set getCalls()
          Return the set of instrumented CALLs.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

alloc2int

public final Map alloc2int

call2int

public final Map call2int
Constructor Detail

AllocationNumbering

public AllocationNumbering(CachingCodeFactory ccf,
                           ClassHierarchy ch,
                           boolean callSites)
Creates an AllocationNumbering object.

Parameters:
ccf - CachingCodeFactory giving the code that will later be instrumented
ch - ClassHierarchy for the code from hcf
callSites - if true, instrument the call sites too
Method Detail

allocID

public int allocID(Quad q)
Specified by:
allocID in interface AllocationNumberingInterf
Returns:
an integer identifying the allocation site q

getAllocs

public Set getAllocs()
Return the set of instrumented allocation sites.


callID

public int callID(Quad q)
Return an integer identifying the CALL quad q.


getCalls

public Set getCalls()
Return the set of instrumented CALLs.