Coder Social home page Coder Social logo

Comments (5)

SpaceFox avatar SpaceFox commented on July 18, 2024

I also tested with me.escoffier.loom:loom-unit:0.3.0 from @cescoffier and as expected, the behaviour is the same.

from quarkus.

cescoffier avatar cescoffier commented on July 18, 2024

Unfortunately, there is not much we can do.

Let me explain. We trigger JFR recording to detect pinning and analyze when a specific event is fired. Unfortunately, to ensure we do not miss any events, we must ensure the JFR recording is on and off. We fire a mock event and wait until we read it.

The JFR recording API is not great, and it takes a lot of time to do these loops, there are many file reads. As you can see, it takes around 2 seconds to start and 2 seconds to stop. But without them, we cannot be sure we are not missing an event.

I hope it will be improved in future versions of the JDK. I know we kind of abuse something that was not meant to be used like that.

I have tried other ways, based on bytecode manipulation - but manipulating classes from the JDK is... never a good idea.

from quarkus.

cescoffier avatar cescoffier commented on July 18, 2024

(obviously if you think of a better way, I would love to hear about it)

from quarkus.

SpaceFox avatar SpaceFox commented on July 18, 2024

Thank you very much for your explanation.

I’m not aware enough of JVM internals to have a better solution that the current one; however, I can add your explanation to the @VirtualThreadUnit annotation Javadoc. This would at least warn users about the potential performance issues.

Let me know if this is a good idea and if yes, I’ll do it (I know some projects prefer not having this kind of data in their Javadoc).

PS: I could also add a note about the usage of JFR, thus this won’t work with JVM that don’t support it (as OpenJ9).

from quarkus.

cescoffier avatar cescoffier commented on July 18, 2024

Yes! Having a note in the javadoc would be great! Ping me once you have a PR.

from quarkus.

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.