summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKoichi Sasada <ko1@atdot.net>2021-01-06 13:05:30 +0900
committerKoichi Sasada <ko1@atdot.net>2021-01-06 14:57:48 +0900
commit442bd0e92cb8ca8e54f8121fc33adeb6b2b53e73 (patch)
tree02bf0bc53c36ae4b2a155e0460b38a30240f3347
parentfa8295ccb91e931e7ede2c02a5820cbba9787234 (diff)
show more info about imemo_callcache
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/4030
-rw-r--r--gc.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/gc.c b/gc.c
index c7220e564b..fdb1a475b9 100644
--- a/gc.c
+++ b/gc.c
@@ -12442,11 +12442,14 @@ rb_raw_obj_info(char *buff, const int buff_size, VALUE obj)
{
const struct rb_callcache *cc = (const struct rb_callcache *)obj;
VALUE class_path = cc->klass ? rb_class_path_cached(cc->klass) : Qnil;
-
- APPENDF((BUFF_ARGS, "(klass:%s, cme:%s (%p) call:%p",
- NIL_P(class_path) ? "??" : RSTRING_PTR(class_path),
- vm_cc_cme(cc) ? rb_id2name(vm_cc_cme(cc)->called_id) : "<NULL>",
- (void *)vm_cc_cme(cc), (void *)vm_cc_call(cc)));
+ const rb_callable_method_entry_t *cme = vm_cc_cme(cc);
+
+ APPENDF((BUFF_ARGS, "(klass:%s cme:%s%s (%p) call:%p",
+ NIL_P(class_path) ? (cc->klass ? "??" : "<NULL>") : RSTRING_PTR(class_path),
+ cme ? rb_id2name(cme->called_id) : "<NULL>",
+ cme ? (METHOD_ENTRY_INVALIDATED(cme) ? " [inv]" : "") : "",
+ (void *)cme,
+ (void *)vm_cc_call(cc)));
break;
}
default: