You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by rm...@apache.org on 2023/10/21 06:02:59 UTC
[lucene] branch main updated: add hsdis instructions for the macos
This is an automated email from the ASF dual-hosted git repository.
rmuir pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/lucene.git
The following commit(s) were added to refs/heads/main by this push:
new c09fb560f74 add hsdis instructions for the macos
c09fb560f74 is described below
commit c09fb560f74a26d5e41ee783159dbfda47e7c188
Author: Rob Muir <ro...@ntrepidcorp.com>
AuthorDate: Sat Oct 21 02:02:24 2023 -0400
add hsdis instructions for the macos
---
help/jmh.txt | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/help/jmh.txt b/help/jmh.txt
index d2eaee2753e..f0b5f37b8bb 100644
--- a/help/jmh.txt
+++ b/help/jmh.txt
@@ -43,9 +43,27 @@ java --module-path lucene/benchmark-jmh/build/benchmarks --module org.apache.luc
hsdis setup
===========
+Linux
+
In order to see disassembled instructions and not just binary instructions when using '-prof perfasm':
$ git clone --depth 1 https://github.com/openjdk/jdk/
$ curl -f https://ftp.gnu.org/gnu/binutils/binutils-2.38.tar.gz | tar -zxf -
$ (cd jdk && bash ./configure --with-hsdis=binutils --with-binutils-src=../binutils-2.38 && make build-hsdis)
$ cp jdk/build/linux-x86_64-server-release/support/hsdis/hsdis-amd64.so $JAVA_HOME/lib/server
+
+Mac OS X
+
+In order to see disassembled instructions and not just binary instructions when using '-prof dtraceasm':
+
+This one is a little rough because they removed the Makefile so you have to bring it back from the dead.
+Otherwise you are stuck wrestling down full dependencies of OpenJDK (metal etc) just to compile a single C file.
+Also you must run benchmarks as root to use dtrace, but it works.
+
+ $ git clone --depth 1 https://github.com/openjdk/jdk/
+ $ curl -fo jdk/src/utils/hsdis/binutils/Makefile https://raw.githubusercontent.com/openjdk/jdk/3c7ae1225f0d5575fd927a9b76fb40dc30e208cd/src/utils/hsdis/Makefile
+ $ vi jdk/src/utils/hsdis/binutils/Makefile, change SOURCE = hsdis.c to SOURCE = hsdis-binutils.c
+ $ vi jdk/src/utils/hsdis/binutils/hsdis-binutils.c, change #include "hsdis.h" to #include "../hsdis.h"
+ $ (cd jdk/src/utils/hsdis && make BINUTILS=../../../../../binutils-2.38 ARCH=aarch64)
+ $ cp jdk/src/utils/hsdis/binutils/build/macosx-aarch64/hsdis-aarch64.dylib $JAVA_HOME/lib/server
+