@Override
        public byte[] doInTransform(Instrumentor instrumentor, ClassLoader classLoader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
            InstrumentClass target = instrumentor.getInstrumentClass(classLoader, className, classfileBuffer);

            List<InstrumentMethod> childCancelled = target.getDeclaredMethods(MethodFilters.name("childCancelled"));
            for (InstrumentMethod instrumentMethod : childCancelled) {
                instrumentMethod.addInterceptor(CancelledInterceptor.class, VarArgs.va(CoroutinesConstants.SERVICE_TYPE));
            }

            List<InstrumentMethod> parentCancelled = target.getDeclaredMethods(MethodFilters.name("parentCancelled"));
            for (InstrumentMethod instrumentMethod : parentCancelled) {
                instrumentMethod.addInterceptor(CancelledInterceptor.class, VarArgs.va(CoroutinesConstants.SERVICE_TYPE));
            }

            List<InstrumentMethod> notifyCancelling = target.getDeclaredMethods(MethodFilters.name("notifyCancelling"));
            for (InstrumentMethod instrumentMethod : notifyCancelling) {
                instrumentMethod.addInterceptor(NotifyCancellingInterceptor.class, VarArgs.va(CoroutinesConstants.SERVICE_TYPE));
            }

            return target.toBytecode();
        }
Coroutines Lifecycle

           Before                   Run                  After

         +-----------+
         | Start     | -------------+
         +-----------+              |
               |                    |      +---------+
               +------------------- | -----| Executor|-------+
               |                    |      +---------+       |
               |                    |                        |
               V                    V                        |
         +-----------+       +--------------+       +------------+
         | Scheduler | ----> | Continuation | ----> | Dispatcher |
         | Ldispatch |       + L resumeWith |       + Ldispatch  |
         +-----------+       +--------------+       +------------+
                                    |                       |
                                    |                       V
                                    |               +------------+
                                    + ------------> |  Finish    |
                                                    +------------+
agent-module/plugins/kotlin-coroutines/src/main/java/com/navercorp/pinpoint/plugin/kotlinx/coroutines/CoroutinesPlugin.java