Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-8500

Support logging the stacktrace of bytecode generation

    XMLWordPrintableJSON

Details

    Description

      Add `groovy.log.classgen.stacktrace.max.depth` option to control max depth of stacktrace(default value is 0).

       

       For example, if -Dgroovy.log.classgen=true -Dgroovy.log.classgen.stacktrace.max.depth=3 is passed into JVM, the bytecode will be attached with some stacktrace tracking where the bytecode generated.

       

      bytecode snippet:

                                              // org.codehaus.groovy.classgen.AsmClassGenerator#onLineNumber:2215
                                              // org.codehaus.groovy.classgen.asm.StatementWriter#writeReturn:593
                                              // org.codehaus.groovy.classgen.AsmClassGenerator#visitReturnStatement:677
      LINENUMBER 13 L1
      

      Attachments

        Activity

          People

            daniel_sun Daniel Sun
            daniel_sun Daniel Sun
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: