public static MethodInvocation start ( String objectName , String methodName , int lineNumber ) { bigMessage ( "Starting profiling... " + objectName + "#" + methodName + " (" + lineNumber + ")" ) ; if ( profiling ( ) ) { logger . error ( "Profiling was already started for '{}'" , callstack . getFirst ( ) . getCls ( ) + "#" + callstack . getFirst ( ) . getMethod ( ) ) ; throw new IllegalStateException ( ) ; } MethodDescriptor methodDescriptor = new MethodDescriptor ( objectName , methodName , lineNumber ) ; MethodInvocation rootInvocation = new MethodInvocation ( methodDescriptor ) ; invocations . add ( rootInvocation ) ; callstack . add ( rootInvocation ) ; Agent . setRootInvocation ( rootInvocation ) ; return rootInvocation ; }
the first invocation for this profiling session .