Lu Fang, University of California, Irvine Liang Dou, East China Normal University Harry Xu, University of California, Irvine
2015-07-09
Lu Fang, University of California, Irvine Liang Dou, East China - - PowerPoint PPT Presentation
Lu Fang, University of California, Irvine Liang Dou, East China Normal University Harry Xu, University of California, Irvine 2015-07-09 Inefficient code regions [G. Jin et al. PLDI 2012] Inefficient code regions [G. Jin et al. PLDI
Lu Fang, University of California, Irvine Liang Dou, East China Normal University Harry Xu, University of California, Irvine
2015-07-09
Inefficient code regions [G. Jin et al. PLDI
2012]
Inefficient code regions [G. Jin et al. PLDI
2012]
Inefficient code regions [G. Jin et al. PLDI
2012]
Inefficient code regions [G. Jin et al. PLDI
2012]
Widely exist
Inefficient code regions [G. Jin et al. PLDI
2012]
Widely exist
Consequences
Existing solutions
Existing solutions
Existing solutions
Existing solutions
Large workloads
NOT available in testing environment, usually
Find and fix performance problems
Find and fix performance problems
Focus on me
memo mory ry rel related ated performance problems
etc.
Find and fix performance problems
Focus on me
memo mory ry rel related ated performance problems
etc.
y red edundant ndant co compu puta tations tions
Such as unnecessary function calls
A novel performance testing framework
A novel performance testing framework
General idea: amplify performance problems
A novel performance testing framework
General idea: amplify performance problems
De Desc scribe the ribe the sympt symptoms
and d co counte unter r ex examples amples
A novel performance testing framework
General idea: amplify performance problems
A novel performance testing framework
General idea: amplify performance problems
A novel performance testing framework
General idea: amplify performance problems
A novel performance testing framework
General idea: amplify performance problems
used aga gain, n, so
not le leaki king ng e.g.
to dete tect ct me memo mory leaks, ks,
not used used fo for a a l lon
g time me
A novel performance testing framework
General idea: amplify performance problems
Virtual amplification
ISL (Instrumentation Specification Language)
Mirror chain
Amplification (at object level)
Amplification (at object level)
Virtual
Amplification (at object level)
Virtual
Virtual Space Overhead (VSO)
P is the sum of counters of all the tracked objects S is the size of the live heap
Describe performance problems manifested
by memory inefficiencies
Describe performance problems manifested
by memory inefficiencies
A simple, event-based language
Describe performance problems manifested
by memory inefficiencies
A simple, event-based language
An ISL program consists of:
Tr Track acked ed Ob Objects ects
TObject ect
ntext xt
Tr Track acked ed Ob Objects ects
TObject ect
ntext xt Hi Hist story
In Info formation mation
Hist story
Parti titio tion
Tr Track acked ed Ob Objects ects
TObject ect
ntext xt Hi Hist story
In Info formation mation
Hist story
Parti titio tion Sy Symp mptoms toms and nd Counter unterexa examples mples
vent
Memory leaks in Java programs
seles ess objects cannot be reclaimed because of unnece necess ssary ary references
Memory leak symptoms in Java programs
more (st stale)
The counterexamples of memory leaks
Context TrackingContext { sequence = "*,*.main,*"; type = "java.lang.Object"; } TObject MyObj{ include = TrackingContext; partition = P; instance boolean useFlag = false; //Instance Field } History UseHistory { type = "boolean"; size = 10;//User Parameter } Partition P { kind = all; history = UseHistory; } Event on_rw(Object o, Field f, Word w1, Word w2){
deamplify(o); } Event on_reachedOnce(Object o){ UseHistory h = getHistory(o); h.update(o.useFlag); if(h.isFull() && !h.contains(true)){ amplify(o); } }
Sp Specify cify the e tra rack cked ed obje jects cts
Context : (1) Calling Context (2) Object Type TObject : Tracked Object Specification
Context TrackingContext { sequence = "*,*.main,*"; type = "java.lang.Object"; } TObject MyObj{ include = TrackingContext; partition = P; instance boolean useFlag = false; //Instance Field } History UseHistory { type = "boolean"; size = 10;//User Parameter } Partition P { kind = all; history = UseHistory; } Event on_rw(Object o, Field f, Word w1, Word w2){
deamplify(o); } Event on_reachedOnce(Object o){ UseHistory h = getHistory(o); h.update(o.useFlag); if(h.isFull() && !h.contains(true)){ amplify(o); } }
Record cord his istory tory information formation
History : Execution Windows Partition: (1) Heap Partitioning (2) The Binding History
Context TrackingContext { sequence = "*,*.main,*"; type = "java.lang.Object"; } TObject MyObj{ include = TrackingContext; partition = P; instance boolean useFlag = false; //Instance Field } History UseHistory { type = "boolean"; size = 10;//User Parameter } Partition P { kind = all; history = UseHistory; } Event on_rw(Object o, Field f, Word w1, Word w2){
deamplify(o); } Event on_reachedOnce(Object o){ UseHistory h = getHistory(o); h.update(o.useFlag); if(h.isFull() && !h.contains(true)){ amplify(o); } }
De Define fine the e action tions
Event: (1) Counterexamples (2) Symptoms
Very useful for debugging [G. Xu et al, PLDI
2011]
Very useful for debugging [G. Xu et al, PLDI
2011]
Difficult to obtain
Backward information of object graph is not available In practice, GC implementations use BFS
Wha hat t we we wa want nt Wha hat t we we ge get
Details can be found in our paper
Wha hat t we we wa want nt Wha hat t we we ge get
We have implemented 3 amplifiers
Benchmarks
OOPSLA 2006]
Totally we have found 11 performance
problems
Programs with confirmed unknown leaks
10 20 30 40 50 60 antlr bloat eclipse fop luindex lusearch pmd hsqldb jython xalan VSOs caused by confirmed memory leaks Basic VSOs
VSO is large The program is very like to have leaks
10 20 30 40 50 60 antlr bloat eclipse fop luindex lusearch pmd hsqldb jython xalan VSOs caused by confirmed under-utilized containers Basic VSOs
Programs with confirmed unknown UUCs VSO is large The program is very likely to have UUCs
5 10 15 20 25 30 antlr bloat eclipse fop luindex lusearch pmd xalan hsqldb jython VSOs caused by confirmed over-populated containers Basic VSOs
Programs with confirmed unknown OPCs VSO is large The program is very like to have OPCs
Benchma nchmark rk Space Space Reducti uction
Time me Reduct ductio ion xalan-leak 25.4% 14.6% jython-leak 24.3% 7.4% hsqldb-leak 15.6% 3.1% xalan-UUC 5.4% 34.1% jython-UUC 19.1% 1.1% hsqldb-UUC 17.4% 0.7% hsqldb-OPC 14.9% 2.9%
Time overheads
Space overheads
Propose a framework for performance testing Develop compiler and runtime system
support
Successfully amplify three different types of
performance problems
even in the testing environment