@@ -760,18 +760,18 @@ <h3>Global Deoptimization</h3>
760
760
}
761
761
} ) ;
762
762
function walkCallGraphNode ( node ) {
763
- totalEntries += node . entries ;
764
- inlineEntries += node . inlined_entries ;
765
- speshEntries += node . spesh_entries ;
766
- jitEntries += node . jit_entries ;
767
- deoptOnes += node . deopt_one ;
768
- deoptAlls += node . deopt_all ;
769
- osrs += node . osr ;
763
+ totalEntries += node . entries || 0 ;
764
+ inlineEntries += node . inlined_entries || 0 ;
765
+ speshEntries += node . spesh_entries || 0 ;
766
+ jitEntries += node . jit_entries || 0 ;
767
+ deoptOnes += node . deopt_one || 0 ;
768
+ deoptAlls += node . deopt_all || 0 ;
769
+ osrs += node . osr || 0 ;
770
770
if ( node . callees )
771
771
node . callees . map ( walkCallGraphNode ) ;
772
772
}
773
773
walkCallGraphNode ( rawData [ 0 ] . call_graph ) ;
774
-
774
+
775
775
// Time spent
776
776
var overheadTime = speshTime + gcTime ;
777
777
var executingTime = totalTime - overheadTime ;
@@ -833,11 +833,11 @@ <h3>Global Deoptimization</h3>
833
833
idToOSR [ node . id ] = false ;
834
834
idRecDepth [ node . id ] = 0 ;
835
835
}
836
- idToEntries [ node . id ] += node . entries ;
837
- idToSpeshEntries [ node . id ] += node . spesh_entries ;
838
- idToJITEntries [ node . id ] += node . jit_entries ;
839
- idToExclusive [ node . id ] += node . exclusive_time ;
840
- totalExclusive += node . exclusive_time ;
836
+ idToEntries [ node . id ] += node . entries || 0 ;
837
+ idToSpeshEntries [ node . id ] += node . spesh_entries || 0 ;
838
+ idToJITEntries [ node . id ] += node . jit_entries || 0 ;
839
+ idToExclusive [ node . id ] += node . exclusive_time || 0 ;
840
+ totalExclusive += node . exclusive_time || 0 ;
841
841
if ( node . osr > 0 )
842
842
idToOSR [ node . id ] = true ;
843
843
if ( idRecDepth [ node . id ] == 0 )
@@ -995,31 +995,33 @@ <h3>Global Deoptimization</h3>
995
995
var typeIdToRoutineStats = { } ;
996
996
var maxAllocations = 1 ;
997
997
function walkCallGraphNode ( node ) {
998
- node . allocations . map ( function ( alloc ) {
999
- if ( ! typeIdToName [ alloc . id ] ) {
1000
- typeIdToName [ alloc . id ] = alloc . type == "" ? "<anon>" : alloc . type ;
1001
- typeIdToAllocations [ alloc . id ] = 0 ;
1002
- typeIdToAllocationsByType [ alloc . id ] = [ 0 , 0 , 0 ] ;
1003
- typeIdToRoutineStats [ alloc . id ] = { } ;
1004
- }
1005
- typeIdToAllocations [ alloc . id ] += alloc . count ;
1006
- typeIdToAllocationsByType [ alloc . id ] [ 0 ] += alloc . count - alloc . spesh - alloc . jit ;
1007
- typeIdToAllocationsByType [ alloc . id ] [ 1 ] += alloc . spesh ;
1008
- typeIdToAllocationsByType [ alloc . id ] [ 2 ] += alloc . jit ;
1009
- if ( typeIdToAllocations [ alloc . id ] > maxAllocations )
1010
- maxAllocations = typeIdToAllocations [ alloc . id ] ;
1011
- if ( typeIdToRoutineStats [ alloc . id ] [ node . id ] ) {
1012
- typeIdToRoutineStats [ alloc . id ] [ node . id ] [ 'count' ] += alloc . count ;
1013
- typeIdToRoutineStats [ alloc . id ] [ node . id ] [ 'spesh' ] += alloc . spesh ;
1014
- typeIdToRoutineStats [ alloc . id ] [ node . id ] [ 'jit' ] += alloc . jit ;
1015
- } else {
1016
- typeIdToRoutineStats [ alloc . id ] [ node . id ] = {
1017
- count : alloc . count ,
1018
- spesh : alloc . spesh ,
1019
- jit : alloc . jit
1020
- } ;
1021
- }
1022
- } ) ;
998
+ if ( node . allocations ) {
999
+ node . allocations . map ( function ( alloc ) {
1000
+ if ( ! typeIdToName [ alloc . id ] ) {
1001
+ typeIdToName [ alloc . id ] = alloc . type == "" ? "<anon>" : alloc . type ;
1002
+ typeIdToAllocations [ alloc . id ] = 0 ;
1003
+ typeIdToAllocationsByType [ alloc . id ] = [ 0 , 0 , 0 ] ;
1004
+ typeIdToRoutineStats [ alloc . id ] = { } ;
1005
+ }
1006
+ typeIdToAllocations [ alloc . id ] += alloc . count ;
1007
+ typeIdToAllocationsByType [ alloc . id ] [ 0 ] += alloc . count - ( alloc . spesh || 0 ) - ( alloc . jit || 0 ) ;
1008
+ typeIdToAllocationsByType [ alloc . id ] [ 1 ] += alloc . spesh || 0 ;
1009
+ typeIdToAllocationsByType [ alloc . id ] [ 2 ] += alloc . jit || 0 ;
1010
+ if ( typeIdToAllocations [ alloc . id ] > maxAllocations )
1011
+ maxAllocations = typeIdToAllocations [ alloc . id ] ;
1012
+ if ( typeIdToRoutineStats [ alloc . id ] [ node . id ] ) {
1013
+ typeIdToRoutineStats [ alloc . id ] [ node . id ] [ 'count' ] += alloc . count || 0 ;
1014
+ typeIdToRoutineStats [ alloc . id ] [ node . id ] [ 'spesh' ] += alloc . spesh || 0 ;
1015
+ typeIdToRoutineStats [ alloc . id ] [ node . id ] [ 'jit' ] += alloc . jit || 0 ;
1016
+ } else {
1017
+ typeIdToRoutineStats [ alloc . id ] [ node . id ] = {
1018
+ count : alloc . count || 0 ,
1019
+ spesh : alloc . spesh || 0 ,
1020
+ jit : alloc . jit || 0
1021
+ } ;
1022
+ }
1023
+ } ) ;
1024
+ }
1023
1025
if ( node . callees ) {
1024
1026
node . callees . map ( walkCallGraphNode ) ;
1025
1027
}
@@ -1120,9 +1122,9 @@ <h3>Global Deoptimization</h3>
1120
1122
idToDeoptOne [ node . id ] = 0 ;
1121
1123
idToDeoptAll [ node . id ] = 0 ;
1122
1124
}
1123
- idToOSR [ node . id ] += node . osr ;
1124
- idToDeoptOne [ node . id ] += node . deopt_one ;
1125
- idToDeoptAll [ node . id ] += node . deopt_all ;
1125
+ idToOSR [ node . id ] += node . osr || 0 ;
1126
+ idToDeoptOne [ node . id ] += node . deopt_one || 0 ;
1127
+ idToDeoptAll [ node . id ] += node . deopt_all || 0 ;
1126
1128
if ( idToOSR [ node . id ] > maxOSR )
1127
1129
maxOSR = idToOSR [ node . id ] ;
1128
1130
if ( idToDeoptOne [ node . id ] > maxDeoptOne )
0 commit comments