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?

repeat
  • 18,496
  • 4
  • 54
  • 166
  • Official doc has some info about JIT https://sicstus.sics.se/sicstus/docs/latest4/pdf/sicstus.pdf (search fro JIT), 4.3.1 Overview... Some statistics and tuning are described... – osgx Mar 06 '15 at 02:53
  • 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. – repeat Mar 07 '15 at 12:56
  • With strace you can see allocation of memory for jitted code (`mmap`s or `mprotect`s 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](http://serverfault.com/questions/173999/); possibly disassembling the machine code), but not to find documentation, papers, patents; no direct info on limitations... – osgx Mar 07 '15 at 20:46

1 Answers1

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.

Per Mildner
  • 10,469
  • 23
  • 30