Re:Apple Silicon M1 Emulating x86 Is Still Faster Than Every...
by cormacrelf on Monday November 16, 2020 @05:15AM
(#25110090)
JITs usually mark +x pages -w again after they've written them for sanity, so watching in platform libc mprotect could do it, but you could also force them to be -w anyway and then maybe use the page fault handler. How much integration with the kernel does it have?
[ Parent
| on HN ]
Re:Apple Silicon M1 Emulating x86 Is Still Faster Than Every...
by littlecranky67 on Monday November 16, 2020 @07:00AM
(#25110644)
Javascript being the extreme example here (no one is going to run Chrome or Firefox in Rosetta2 probably) but it is re-JITing very often (I think Firefox starts with interpreting JS code, and then replaces hot code paths with JIT compiled equivalents when they become available).
I also see issues with self-modifying code, but this is also very rare (I knew some .NET code that was injecting/manipulating its own JIT code to go around C# private/protected encapsulation).
Re:Apple Silicon M1 Emulating x86 Is Still Faster Than Every...
by The_Colonel on Monday November 16, 2020 @07:35AM
(#25110882)
> no one is going to run Chrome or Firefox in Rosetta2 probably
Browsers themselves no, but there's many apps out there based on browser tech (e.g. electron apps). Also many apps shipping with their own JVM or other JIT engine.
Anecdote incoming, my pet project is based on electron, I am currently building a mac x86 version but don't plan to ship an ARM version (since testing it without an actual physical mac is going to be even more difficult / impossible).