public static void agentmain(String agentArgs,Instrumentation inst) throws Exception {
synchronized (JVMAgent.class) {
    if (instance == null) {
      instance=new JVMAgent(inst);
      waitForInstance.countDown();
    }
  }
}

public static void agentmain ( String agentArgs , Instrumentation inst ) throws Exception { synchronized ( JVMAgent . class ) { if ( instance == null ) { instance = new JVMAgent ( inst ) ; waitForInstance . countDown ( ) ; } } }
when the agent gets loaded , this method is called , giving us an instrumentation instance . voila !
