@@ -35,27 +35,22 @@ public TotalTenuredRenderer(ModelChartImpl modelChart) {
35
35
public Polygon computePolygon (ModelChart modelChart , GCModel model ) {
36
36
ScaledPolygon polygon = createMemoryScaledPolygon ();
37
37
polygon .addPoint (0.0d , 0.0d );
38
- double lastTotal = 0.0d ;
38
+ double lastTotal = 0 ;
39
39
for (Iterator <AbstractGCEvent <?>> i = model .getStopTheWorldEvents (); i .hasNext ();) {
40
40
AbstractGCEvent <?> abstractGCEvent = i .next ();
41
41
if (abstractGCEvent instanceof GCEvent ) {
42
42
GCEvent event = (GCEvent ) abstractGCEvent ;
43
43
GCEvent tenured = event .getTenured ();
44
44
if (hasMemoryInformation (event ) && tenured != null ) {
45
- double total = tenured .getTotal ();
46
45
if (polygon .npoints == 1 ) {
47
46
// first point needs to be treated different from the rest,
48
47
// because otherwise the polygon would not start with a vertical line at 0,
49
48
// but with a slanting line between 0 and after the first pause
50
- polygon .addPoint (0.0d , total );
51
- lastTotal = total ;
49
+ polygon .addPoint (0 , (double )tenured .getTotal ());
52
50
}
53
-
54
- if (lastTotal != total ) {
55
- polygon .addPoint (tenured .getTimestamp () - model .getFirstPauseTimeStamp (), lastTotal );
56
- }
57
- polygon .addPoint (tenured .getTimestamp () - model .getFirstPauseTimeStamp () + tenured .getPause (), total );
58
- lastTotal = total ;
51
+ polygon .addPoint (tenured .getTimestamp () - model .getFirstPauseTimeStamp () + event .getPause (),
52
+ tenured .getTotal ());
53
+ lastTotal = tenured .getTotal ();
59
54
}
60
55
}
61
56
}
0 commit comments