private void generateGlobalProfilingEnd() {

            // inject template body profiling bytecode - end and generate event
            TypeDesc methodObserverType = makeDesc(MergedClass.InvocationEventObserver.class);
            mBuilder.invokeStatic(mUnit.getRuntimeContext().getName(),
                "getInvocationObserver", methodObserverType);
            mBuilder.loadConstant(mUnit.getName());
            mBuilder.loadConstant(null);
            mBuilder.invokeStatic(mUnit.getRuntimeContext().getName(),
                "getInvocationObserver", methodObserverType);
            mBuilder.invokeInterface(methodObserverType.getFullName(), "currentTime",
                makeDesc(long.class));
            mBuilder.loadLocal(mGlobalTime);
            mBuilder.math(Opcode.LSUB);
            mBuilder.invokeInterface(methodObserverType.getFullName(), "invokedEvent", null,
                new TypeDesc[] { makeDesc(String.class), makeDesc(String.class),
                    makeDesc(long.class) });
        }