is there any way to print top used N classes on the current java application programmaticly?
sample output: N=10
num #instances #bytes class name
--------------------------------------
1: 23 4723136 [I
2: 19 4718928 [J
3: 18 4718880 [D
4: 73925 1774200 java.lang.String
5: 208 1226400 [C
6: 28 1205064 [B
7: 18 1179936 [F
8: 68 297040 [Ljava.lang.String;
9: 332 14136 [Ljava.lang.Object;
10: 32 10240 <objArrayKlassKlass>