PROJECT : 9th OCT
Agenda : Trace selection and Trace collection
Global table : table which hold the info about the traces.
1. Start of Trace.
- destination of backward jump.
- exits from fragments already present.
- all function calls destination
2. End of Trace.
- two possibilities
- trace is a loop
- no of insn > Threshold
- encountering start of trace
- begining of fucntion definition
- no of insn > Threshold
- ret insn is encountered
Now, We just take a look at how the control flow is gonna take place.
Interpretation Starts.
- from begining of code.
- a branch tranfer insn is encountered.
- forward jump
- change the fetch addr for interpreter.
- backward jump
- its a special case.
- exect'n of collected linear code.
- making an entry in global table.
- check count, perform reqd. operation.
- function calls
- exect'n of collected linear code.
- entry made in global table.
- if already present, increment the count.
- and check for threshold.
Once you find trace crossed the threshold :
- start collecting the trace
- start of trace already defined
- end of trace alreay defined
Contents of trace can be :
- forward jumps inside fragments
- backward jumps inside fragments
- jumps to outside the fragment
- instructions - calls to functions
Actions taken for these above mentioned cases :
- forward jump inside fragments
- care taken during relocation.
- backward jump inside fragments
- care taken during relocation.
- jump outside fragments
- control transferred to epilogue.
- an entry is present for desti'n of exits.
as all exits from fragments are probabale
candidates for trace.
- incrementaing the count in the global table.
- control finally transferred to epilogue.
- function calls
- should be replaced by exit stubs.
- if this exit stub crosses the threshold ,
it is optimised and linked into fragment cache.
Some important considerations :
- Every fragment will have a unique fragment id.
- Also in the global table, there will be a field for this _frag_id.
- The use of this fragment id :
- If two or more fragments have same exit destinations
from the fragment, we willtwo separate entries for
that in the gloabal table.
- If sometime later, an exit is made through the
exit stub, the corrseponding entry in the global
table will be bumped.
- This is to help, the linking of fragments, e.g. if
siometimes later the exit path's counter execeeds
the threshold, we can optimise it and link it to the
existing fragments.
Global table : table which hold the info about the traces.
1. Start of Trace.
- destination of backward jump.
- exits from fragments already present.
- all function calls destination
2. End of Trace.
- two possibilities
- trace is a loop
- no of insn > Threshold
- encountering start of trace
- begining of fucntion definition
- no of insn > Threshold
- ret insn is encountered
Now, We just take a look at how the control flow is gonna take place.
Interpretation Starts.
- from begining of code.
- a branch tranfer insn is encountered.
- forward jump
- change the fetch addr for interpreter.
- backward jump
- its a special case.
- exect'n of collected linear code.
- making an entry in global table.
- check count, perform reqd. operation.
- function calls
- exect'n of collected linear code.
- entry made in global table.
- if already present, increment the count.
- and check for threshold.
Once you find trace crossed the threshold :
- start collecting the trace
- start of trace already defined
- end of trace alreay defined
Contents of trace can be :
- forward jumps inside fragments
- backward jumps inside fragments
- jumps to outside the fragment
- instructions - calls to functions
Actions taken for these above mentioned cases :
- forward jump inside fragments
- care taken during relocation.
- backward jump inside fragments
- care taken during relocation.
- jump outside fragments
- control transferred to epilogue.
- an entry is present for desti'n of exits.
as all exits from fragments are probabale
candidates for trace.
- incrementaing the count in the global table.
- control finally transferred to epilogue.
- function calls
- should be replaced by exit stubs.
- if this exit stub crosses the threshold ,
it is optimised and linked into fragment cache.
Some important considerations :
- Every fragment will have a unique fragment id.
- Also in the global table, there will be a field for this _frag_id.
- The use of this fragment id :
- If two or more fragments have same exit destinations
from the fragment, we willtwo separate entries for
that in the gloabal table.
- If sometime later, an exit is made through the
exit stub, the corrseponding entry in the global
table will be bumped.
- This is to help, the linking of fragments, e.g. if
siometimes later the exit path's counter execeeds
the threshold, we can optimise it and link it to the
existing fragments.


0 Comments:
Post a Comment
<< Home