Git Product home page Git Product logo

Comments (3)

jbachorik avatar jbachorik commented on July 24, 2024

[author="j.bachorik", created="Tue, 11 Oct 2011 21:16:04 +0200"]

Did you try it with the unmodified sample script? When I try run the Profiling.java sample everything works as expected.

Also, it is rather suspicious an innerclass is visited - there are no inner classes in the sample and if an erroneous bytecode should be caused by a syntax error the standard java compiler, which btrace does use, would encounter the problem and throw an exception.

Can you attach the sample source you are using?

Thanks.

from btrace.

jbachorik avatar jbachorik commented on July 24, 2024

[author="mjakl", created="Wed, 12 Oct 2011 10:26:20 +0200"]

Hi, I've attached the Samplecode (it should be the unmodified version of the Profiling example).

On my machine this still leads to this:

mjakl@T510:BTrace % bin/btrace 2514 Profiling.java
com.sun.btrace.VerifierException: nested and inner classes are not allowed
at com.sun.btrace.runtime.Verifier.reportError(Verifier.java:390)
at com.sun.btrace.runtime.Verifier.reportError(Verifier.java:381)
at com.sun.btrace.runtime.Verifier.visitInnerClass(Verifier.java:155)
at com.sun.btrace.org.objectweb.asm.ClassReader.accept(Unknown Source)
at com.sun.btrace.org.objectweb.asm.ClassReader.accept(Unknown Source)
at com.sun.btrace.runtime.InstrumentUtils.accept(InstrumentUtils.java:66)
at com.sun.btrace.runtime.InstrumentUtils.accept(InstrumentUtils.java:62)
at com.sun.btrace.agent.Client.verify(Client.java:391)
at com.sun.btrace.agent.Client.loadClass(Client.java:218)
at com.sun.btrace.agent.RemoteClient.(RemoteClient.java:59)
at com.sun.btrace.agent.Main.startServer(Main.java:379)
at com.sun.btrace.agent.Main.access$000(Main.java:65)
at com.sun.btrace.agent.Main$3.run(Main.java:166)
at java.lang.Thread.run(Thread.java:662)

There is in fact a hidden inner class. It's only used, not embedded in the sample script itself. In line 21 we use BTraceUtils.Profiling.newProfiler(), Profiling is the inner class of BTraceUtils.

HTH,
Michael

from btrace.

jbachorik avatar jbachorik commented on July 24, 2024

[author="j.bachorik", created="Tue, 18 Oct 2011 12:24:30 +0200"]

fixed
http://kenai.com/projects/btrace/sources/hg/revision/434

from btrace.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.