Issues with dtraceasm, and a workaround
Paul Sandoz
paul.sandoz at oracle.com
Tue Feb 23 21:28:21 UTC 2021
This worked for me:
Get https://ftp.gnu.org/gnu/binutils/binutils-2.31.1.tar.bz2 and extract to some location, D say.
$ cd <JDK repo>/src/utils/hsdis
$ which make
/usr/bin/make
$ gcc -v
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
Apple clang version 11.0.0 (clang-1100.0.33.8)
Target: x86_64-apple-darwin19.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
$ make BINUTILS=<D>/binutils-2.31.1 ARCH=amd64
(cd build/macosx-amd64; CC=gcc CFLAGS=" -fPIC -O" AR="ar" /Users/sandoz/Projects/jdk/binutils/binutils-2.31.1/configure --disable-nls )
…
$ ls -l build/macosx-amd64/
total 4424
-rw-r--r-- 1 sandoz staff 376179 Feb 23 13:18 Makefile
drwxr-xr-x 107 sandoz staff 3424 Feb 23 13:19 bfd
-rw-r--r-- 1 sandoz staff 24217 Feb 23 13:18 config.log
-rwxr-xr-x 1 sandoz staff 31245 Feb 23 13:18 config.status
-rwxr-xr-x 1 sandoz staff 1823736 Feb 23 13:19 hsdis-amd64.dylib
drwxr-xr-x 8 sandoz staff 256 Feb 23 13:19 intl
drwxr-xr-x 80 sandoz staff 2560 Feb 23 13:19 libiberty
drwxr-xr-x 29 sandoz staff 928 Feb 23 13:19 opcodes
-rw-r--r-- 1 sandoz staff 13 Feb 23 13:18 serdep.tmp
drwxr-xr-x 24 sandoz staff 768 Feb 23 13:19 zlib
I generally copy hsdis-amd64.dylib to the current directory where I perform JMH executions, to avoid fighting with the Mac security settings.
Paul.
On Feb 23, 2021, at 12:59 PM, Henri Tremblay <henri.tremblay at gmail.com<mailto:henri.tremblay at gmail.com>> wrote:
Awesome!
Paul, do you know how to get hsdis to compile?
On Tue, 23 Feb 2021 at 14:03, Aleksey Shipilev <shade at redhat.com<mailto:shade at redhat.com>> wrote:
On 2/23/21 3:42 PM, Henri Tremblay wrote:
> Seems to work perfectly. As I said, I can't get hsdis to work but I see the normal address output so
> it looks good to me.
> I tried with 1.8.0_275, 11.0.9 and 16-ea-30. I also tried GraalVM CE 20.1.0. It works as well. The
> funny part is that it resolves the addresses a bit more. Here are the outputs:
Integrated!
--
Thanks,
-Aleksey
More information about the jmh-dev
mailing list