@cgrand what happens if in your loop your recur with an explicit cast of (int (inc ...))? I know the docs say otherwise but Iām curious if an explicit cast to int on the recur changes the timing. Not in front of a machine or Iād give it a whirl.
If anyone has instructions they have followed for making the JVM PrintAssembly
option show Intel/AMD assembler for JIT-compiled methods, without frequent messages like this one: Fatal error: Disassembling failed with error code: 15
I would appreciate knowing them.
I have tried using a pre-compiled hsdis .so file that comes as part of Ubuntu 18.04's libhsdis0-fcml
package, and it often prints Intel disassembly listings of JIT-compiled methods without errors, but it does still give errors sometimes. Details on the steps I have followed in this bash script, in case anyone is curious for something that often (but not always) produces decent results on Ubuntu 18.04 Linux: https://github.com/jafingerhut/leeuwenhoek/blob/master/bin/ubuntu-hsdis-install.sh
Did you try to compile your own version? https://github.com/liuzhengyang/hsdis
Btw. unless you're super-proficient in reading Hotspot's assembly I thin it's a lost cause to try to analyze that output
You may try https://github.com/AdoptOpenJDK/jitwatch/wiki
@jumar thx much for those links. I did try to compile my own version, but lots of trial and error there trying to tweak hsdis Makefile and determine which version of binutils actually works. That github repo hsdis looks like something I wished I had found weeks ago.
I may give up on trying to read HotSpot's assembly soon, but not until after I have at least started trying š
@jumar Have you used jitwatch on a Clojure program before, with useful results?
Not really, just tried a demo on some Java code as far as I remember