|
SandMark version 3.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--sandmark.watermark.ct.trace.callforest.Forest
Field Summary | |
(package private) TracePoint[] |
annotationPoints
|
(package private) ClassHierarchy |
classHierarchy
|
(package private) java.util.Vector |
forest
|
(package private) java.util.Properties |
props
|
(package private) Stats |
statistics
|
Constructor Summary | |
Forest(TracePoint[] annotationPoints,
ClassHierarchy classHierarchy,
Stats stats,
java.util.Properties props)
Construct a forest of call graphs from a set of annotation points. |
Method Summary | |
(package private) void |
construct()
Build the information flow graph. |
Graph |
getCallGraph(int i)
Return the i:th graph in the forest. |
MethodID[] |
getFlowPath(StackFrame from,
MethodID to)
Given two stack frames, returns an array of method ids which require an additional parameter to pass information from the first to the second. |
java.util.Vector |
getForest()
Return a vector of call graphs. |
int |
size()
Return the number of graphs in the forest. |
java.lang.String[] |
toDot()
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
TracePoint[] annotationPoints
ClassHierarchy classHierarchy
Stats statistics
java.util.Properties props
java.util.Vector forest
Constructor Detail |
public Forest(TracePoint[] annotationPoints, ClassHierarchy classHierarchy, Stats stats, java.util.Properties props)
1: P() { 2: sm$mark(); 3: } 4: 5: Q() { 6: sm$mark(); 7: P(); 8: } 9: 10: main() { 11: Q(); 12: Q(); 13: }
We get the call graph below. "Q:2/6" means "call frame #2 for method Q, line number 6".
mark:5 mark:9 ^ ^ | | | | V V mark:3 P:4/7 mark:7 P:8/7 ^ ^ ^ ^ | | | | | | | | V V V V Q:2/6---->Q:2 Q:6/6---->Q:6 ^ ^ | | | | V V main:1/11 ----------------> main:1/12 ^ | rootThe nodes of the graphs are stack frames. The root of each call graph is the frame of whatever run() or main() method started the thread. The leaves are stack frames of sm$mark() method calls. The edge Q:2/6---->Q:2 above indicates that there is a way to pass information from mark:3 to mark:5, but not the other way. Each interior node is labeled by the stack frame (a sandmark.util.StackFrame object) it corresponds to. Each leaf represents a sm$mark() call and is labeled with the sm$mark(...) value given at that location.
annotationPoints
- the set of locations found
during tracing.classHierarchy
- the class hierarchystats
- static statistics about the programprops
- propertiesMethod Detail |
void construct()
public MethodID[] getFlowPath(StackFrame from, MethodID to)
from
- the source stack frameto
- the sink methodpublic java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String[] toDot()
public java.util.Vector getForest()
public int size()
public Graph getCallGraph(int i)
|
SandMark version 3.0 Wed Jan 29 10:30:05 MST 2003 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |