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

ruby-changes:69165

From: John <ko1@a...>
Date: Thu, 21 Oct 2021 08:21:04 +0900 (JST)
Subject: [ruby-changes:69165] 7482744e04 (master): Add jit_obj_info_dump

https://git.ruby-lang.org/ruby.git/commit/?id=7482744e04

From 7482744e042992e7d9a00151b6f6f073b185f9ee Mon Sep 17 00:00:00 2001
From: John Hawthorn <john@h...>
Date: Mon, 20 Sep 2021 11:51:31 -0700
Subject: Add jit_obj_info_dump

---
 yjit_codegen.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/yjit_codegen.c b/yjit_codegen.c
index fed7714cc9..a748de0ef7 100644
--- a/yjit_codegen.c
+++ b/yjit_codegen.c
@@ -70,6 +70,16 @@ jit_print_loc(jitstate_t* jit, const char* msg) https://github.com/ruby/ruby/blob/trunk/yjit_codegen.c#L70
     fprintf(stderr, "%s %.*s:%u\n", msg, (int)len, ptr, rb_iseq_line_no(jit->iseq, jit->insn_idx));
 }
 
+// dump an object for debugging purposes
+RBIMPL_ATTR_MAYBE_UNUSED()
+static void
+jit_obj_info_dump(codeblock_t *cb, x86opnd_t opnd) {
+    push_regs(cb);
+    mov(cb, C_ARG_REGS[0], opnd);
+    call_ptr(cb, REG0, (void *)rb_obj_info_dump);
+    pop_regs(cb);
+}
+
 // Get the current instruction's opcode
 static int
 jit_get_opcode(jitstate_t* jit)
-- 
cgit v1.2.1


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

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