SICStus Prolog JIT compiler
Asked Answered
L

1

6

SICStus Prolog 4.3 added a JIT compiler for x86-64 processors.

I have two questions regarding the JIT compiler.

First, where can I find some documentation (papers, notes, or memos) on the capabilities (and limitations, design, and techniques) of the JIT compiler?

And second, can SICStus be directed to emit the x86-64 assembly code produced by the JIT compiler?

Lighthouse answered 3/3, 2015 at 20:16 Comment(3)
Official doc has some info about JIT sicstus.sics.se/sicstus/docs/latest4/pdf/sicstus.pdf (search fro JIT), 4.3.1 Overview... Some statistics and tuning are described...Riata
I was already aware of the respective parts of the SICStus Prolog manual... I utilized the environment variables for turning the JIT compiler on and off in the micro-benchmarks I did.Lighthouse
With strace you can see allocation of memory for jitted code (mmaps or mprotects with PROT_EXEC flag), and also you can check /proc/PID/maps (or smaps; PID is pid of active SICStus process) and search for memory segments with x (exec) flag. But this information will allow you only to dump jitted code (for example with gdb, breakpointing on mmap/mprotects with PROT_EXEC and watching for writes to segments; dumping the mem; possibly disassembling the machine code), but not to find documentation, papers, patents; no direct info on limitations...Riata
C
4

There is no public information available about the SICStus Prolog JIT implementation.

You can get some information from perf in Linux if you follow the instructions in library/perf/sp_jit_objdump in the SICStus installation. Among other things perf can show the disassembly of the jitted code.

Calceiform answered 9/12, 2016 at 13:0 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.