Comments (7)
Please leave a comment if you know anything about LuaJIT internals :).
from blog.
Could be that what I really want is better perf
integration. For example, for perf top
to be able to zoom in and show me machine code annotated with IR code. That would be something :-).
from blog.
I'm sure I know less than you, but I read a little of the source after Mike's talk and could stand to read more.
from blog.
@darius maybe we can thrash our way through it together a bit.
I'm looking now in lj_asm_trace
and it seems like the machine code is created by iterating backwards from the last IR instruction. Each instruction is assembled in order and emits some machine code (also in backwards order?).
Thinking aloud...
Then it would seem like you could output a really neat interleaved IR/mcode dump because the order of instructions would be identical in both and each mcode instruction would correspond to one definite IR instruction. Sound reasonable?
Then I wonder if such an interleaved trace could be exported to perf top
so that it could be annotated in realtime with profiler information (as you get with C code). I wonder if that would require some hacking on perftools too? I haven't yet dug into the details of the data file that LuaJIT optionally exports for use by perf -- I know the current usage is quite limited (only matching instructions to trace numbers but not showing the IR/mcode).
Could also be that perf
is the wrong tool and it would be better to add this to LuaJIT's own profiler.
from blog.
Yes, looks like it's emitting back-to-front. Makes me feel a little vindicated since my own x86 machine-code emitter worked that way and it got me a few funny looks.
The dump sounds reasonable too, though you'd want to make it a separate function to keep any overhead out of the normal asm function -- that's important, I assume?
Will email you tonight to catch up.
from blog.
The dropbox link in the reddit thread seems dead (For the thesis you mention). Do you have any other uploads of it?
from blog.
Not on my laptop anymore, I'm afraid.
from blog.
Related Issues (20)
- RaptorJIT+Studio: Analyzing the evolving C heap of a JIT compiler HOT 2
- The curse of "high-impact medium-generality" optimizations HOT 8
- Celebrating Intel and Mellanox for their open driver interfaces
- How I started working on network device drivers HOT 7
- How a tracing JIT discovers and uses type information
- Speculative optimization in tracing JIT compilers
- How speculative optimizations work in RaptorJIT HOT 2
- The major speculative optimizations in RaptorJIT
- The unit of compilation in RaptorJIT
- Lua tracing JIT performance: Good news, bad news, and more good news
- Mechanical sympathy between modern CPUs and tracing JITs
- Thought experiment on guard instructions and CPU micro architecture
- Joe the office mate HOT 3
- I love the idea of writing a blog in Github Issues, but... HOT 3
- Tracing JIT and guitar looper pedals HOT 1
- Great Social Media Shakeup of 2022 HOT 17
- Ping, or, Bayesian random bits
- kons-9 for ad-hoc data visualization HOT 1
- Sequential Monte Carlo 3D diagnostic with kons-9
- kons-9 ad-hoc posterior predictive check 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 blog.