Fork me on GitHub
#clojure-dev
<
2019-08-26
>
devn22:08:25

@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.

andy.fingerhut22:08:55

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.

andy.fingerhut22:08:59

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

jumar08:08:53

Did you try to compile your own version? https://github.com/liuzhengyang/hsdis

jumar08:08:24

Btw. unless you're super-proficient in reading Hotspot's assembly I thin it's a lost cause to try to analyze that output

andy.fingerhut14:08:14

@U06BE1L6T 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.

andy.fingerhut14:08:43

I may give up on trying to read HotSpot's assembly soon, but not until after I have at least started trying 🙂

👍 1
andy.fingerhut18:08:29

@U06BE1L6T Have you used jitwatch on a Clojure program before, with useful results?

jumar03:08:54

Not really, just tried a demo on some Java code as far as I remember