[前][次][番号順一覧][スレッド一覧]

ruby-changes:73752

From: Maxime <ko1@a...>
Date: Wed, 28 Sep 2022 08:27:44 +0900 (JST)
Subject: [ruby-changes:73752] 8fcbb79742 (master): YJIT: reverse configure.ac changes that disable `--yjit-stats` on Graviton1 (#6457)

https://git.ruby-lang.org/ruby.git/commit/?id=8fcbb79742

From 8fcbb79742b27619683f0a5f25497a402eeca56f Mon Sep 17 00:00:00 2001
From: Maxime Chevalier-Boisvert <maxime.chevalierboisvert@s...>
Date: Tue, 27 Sep 2022 19:27:19 -0400
Subject: YJIT: reverse configure.ac changes that disable `--yjit-stats` on
 Graviton1 (#6457)

Reverse configure.ac changes that disable YJIT stats on Graviton1
---
 configure.ac | 35 +++++++----------------------------
 1 file changed, 7 insertions(+), 28 deletions(-)

diff --git a/configure.ac b/configure.ac
index 206470ae0f..a1a1ea8eb8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3748,44 +3748,23 @@ AS_CASE(["${YJIT_SUPPORT}"], https://github.com/ruby/ruby/blob/trunk/configure.ac#L3748
     ],
     [dev], [
 	rb_rust_target_subdir=debug
-        CARGO_BUILD_ARGS='--features disasm,asm_comments'
+	CARGO_BUILD_ARGS='--features stats,disasm,asm_comments'
 	AC_DEFINE(RUBY_DEBUG, 1)
     ],
     [dev_nodebug], [
 	rb_rust_target_subdir=dev_nodebug
-        CARGO_BUILD_ARGS='--profile dev_nodebug --features disasm,asm_comments'
+	CARGO_BUILD_ARGS='--profile dev_nodebug --features stats,disasm,asm_comments'
     ],
     [stats], [
 	rb_rust_target_subdir=stats
-        CARGO_BUILD_ARGS='--profile stats'
+	CARGO_BUILD_ARGS='--profile stats --features stats'
     ])
 
     AS_IF([test -n "${CARGO_BUILD_ARGS}"], [
-        AC_CHECK_TOOL(CARGO, [cargo], [no])
-        AS_IF([test x"$CARGO" = "xno"],
-            AC_MSG_ERROR([cargo is required. Installation instructions available at https://www.rust-lang.org/tools/install])
-        ])
-
-        # Insn::IncrCounter uses ldaddal, which works only on ARMv8.1+.
-        AC_CACHE_CHECK(yjit stats are broken, rb_cv_broken_yjit_stats, [
-            AC_RUN_IFELSE(
-                [AC_LANG_PROGRAM([[]], [[
-                    @%:@ifdef __aarch64__
-                        asm volatile(".arch armv8-a+lse\n"
-                                     "ldaddal xzr, xzr, @<:@sp@:>@");
-                    @%:@endif
-                ]])],
-                [rb_cv_broken_yjit_stats=no],
-                [rb_cv_broken_yjit_stats=yes],
-                [rb_cv_broken_yjit_stats=yes]
-            )
-        ])
-        # This won't enable stats in release builds because we don't use cargo
-        # for release builds, use rustc directly
-        AS_IF([test "$rb_cv_broken_yjit_stats" = no], [
-            CARGO_BUILD_ARGS="${CARGO_BUILD_ARGS} --features stats"
-        ])
-    )
+             AC_CHECK_TOOL(CARGO, [cargo], [no])
+             AS_IF([test x"$CARGO" = "xno"],
+                AC_MSG_ERROR([cargo is required. Installation instructions available at https://www.rust-lang.org/tools/install])
+             ]))
 
     YJIT_LIBS="yjit/target/${rb_rust_target_subdir}/libyjit.a"
     AS_CASE(["$target_os"],[openbsd*],[
-- 
cgit v1.2.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]