Bytecode Instrumentation

| 2004 JavaOne
SM
Conference | Session 3042 Copyright Hewlett Packard Co., 2004.
72
Analyzing your changes
Use javap to analyze the file created
public void a1();
Code:
0: iconst_0
1: iconst_0
2: invokestatic #37; //Method MyMon.countMethodEntry:(II)V
5: ldc #5; //int 1000000
7: istore_1
36: return
public void a2();
Code:
0: ldc #5; //int 1000000
2: istore_1