GithubHelp home page GithubHelp logo

Comments (2)

javierguerragiraldez avatar javierguerragiraldez commented on May 26, 2024 1

another source of "interpreterness" is too much type unpredictability. for example, if you iterate over an array of values (with ipairs()) but you never know the type of the values there, it might get blacklisted too.

btw, record the TRACE/abort event

from raptorjit.

lukego avatar lukego commented on May 26, 2024

@javierguerragiraldez I'm thinking about this now in the context of the optimization guide (#68). How do we make a profiler that tells you the information you need to eliminate use of the interpreter?

I'm thinking the profiler will use three inputs:

  1. Trace aborts showing each failed attempt to JIT some code.
  2. Blacklistings showing the starting points where traces persistently aborted.
  3. Profiler samples saying how "hot" each blacklisted bytecode is.

Then the profiler will tell you how hot each blacklisted bytecode is (mostly whole functions and loops) and then it can cross-reference this with the trace aborts to see why that bytecode was blacklisted (e.g. it leads to an NYI instruction, or to another blacklisted bytecode, etc.)

On the VM side I think we only need one extension which is for VMProfile to count separately for each blacklisted bytecode. I wonder how? The simplest idea I can think of is for the Lua VM state to include a new field that is the program counter address for the most recently executed ILOOP/IFUNC/etc i.e. the most recently entered blacklisted code. Seems like this would likely work. On the other hand to really count properly you might need to maintain stack discipline on that e.g. when calling a blacklisted loop from inside a blacklisted function, etc...

Thoughts?

from raptorjit.

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.