Mercurial > hg > graal-compiler
comparison c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/CompilerObject.java @ 2054:3c0a889a176b
Added GC stats. Enabling intrinsics.
author | Thomas Wuerthinger <wuerthinger@ssw.jku.at> |
---|---|
date | Wed, 12 Jan 2011 19:14:32 +0100 |
parents | 9e5e83ca2259 |
children | b7f06f504206 |
comparison
equal
deleted
inserted
replaced
2053:0db8c8cc5b4a | 2054:3c0a889a176b |
---|---|
26 /** | 26 /** |
27 * Marker interface for all HotSpot Ri... types. | 27 * Marker interface for all HotSpot Ri... types. |
28 * | 28 * |
29 * @author Lukas Stadler | 29 * @author Lukas Stadler |
30 */ | 30 */ |
31 public interface CompilerObject extends Serializable { | 31 public abstract class CompilerObject implements Serializable { |
32 | |
33 | |
34 private static final boolean PrintStats = false; | |
35 private static int AllocatedCount; | |
36 private static int FinalizeCount; | |
37 | |
38 public CompilerObject() { | |
39 AllocatedCount++; | |
40 if (PrintStats && AllocatedCount % 1000 == 0) { | |
41 System.out.println("Allocated " + AllocatedCount); | |
42 } | |
43 } | |
44 | |
45 @Override | |
46 protected void finalize() throws Throwable { | |
47 FinalizeCount++; | |
48 if (PrintStats && FinalizeCount % 1000 == 0) { | |
49 System.out.println("Finalized " + FinalizeCount); | |
50 } | |
51 super.finalize(); | |
52 } | |
32 } | 53 } |