Comments (2)
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.
@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:
- Trace aborts showing each failed attempt to JIT some code.
- Blacklistings showing the starting points where traces persistently aborted.
- 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)
- Idea: Remove Lua C-API HOT 41
- Philosophy: Who is RaptorJIT for? HOT 1
- RaptorJIT language side evolution and Lua compatibility HOT 3
- A world on FFI HOT 6
- Benchmark: FFI
- Idea: Separate snapshot for each function call
- raptorjit release version confusion HOT 2
- Idea: Write Lua parser and bytecode compiler in Lua HOT 19
- Question: How to send relevant fixes to LuaJIT?
- Document VM bootstrap, code generation, build process HOT 2
- Idea: CNEWI sinking across trace boundaries HOT 4
- Demo: Over 50x slowdown on pointer arithmetic due to single branch
- Windows support HOT 2
- Openresty HOT 8
- Optimization: lambda lifting HOT 7
- Initial port of RaptorJIT bytecode interpreter to C
- Filling the gap with Lua 5.3 HOT 2
- Apply to GitHub sponsorship HOT 3
- LuaJIT/RaptorJIT at FOSDEM 2020?
- Linking failed on ArchLinux HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from raptorjit.