summaryrefslogtreecommitdiff
path: root/vm_backtrace.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-12-21 01:18:48 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-12-21 01:18:48 (GMT)
commitcc52f511b1d942f8542a4d909ce0a1375ea07738 (patch)
treeef80cc80d37ca6b3c29b9e77ea56599dded3f59a /vm_backtrace.c
parent8ec531ba9c512f15bcd39b17255b95a8cc9bdcae (diff)
vm_backtrace.c: ignore ifunc frames
* vm_backtrace.c (rb_profile_frames): ignore ifunc frames as it did before. [ruby-core:72409] [Bug #11851] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53225 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_backtrace.c')
-rw-r--r--vm_backtrace.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/vm_backtrace.c b/vm_backtrace.c
index 4267b0d..bef61d8 100644
--- a/vm_backtrace.c
+++ b/vm_backtrace.c
@@ -1248,25 +1248,25 @@ rb_profile_frames(int start, int limit, VALUE *buff, int *lines)
int i;
rb_thread_t *th = GET_THREAD();
rb_control_frame_t *cfp = th->cfp, *end_cfp = RUBY_VM_END_CONTROL_FRAME(th);
+ const rb_callable_method_entry_t *cme;
for (i=0; i<limit && cfp != end_cfp;) {
- const rb_callable_method_entry_t *cme = rb_vm_frame_method_entry(cfp);
-
- if ((cme && cme->def->type == VM_METHOD_TYPE_ISEQ) || (cfp->iseq && cfp->pc)) {
+ if (cfp->iseq && cfp->pc) {
if (start > 0) {
start--;
continue;
}
/* record frame info */
- if (cme) {
+ cme = rb_vm_frame_method_entry(cfp);
+ if (cme && cme->def->type == VM_METHOD_TYPE_ISEQ) {
buff[i] = (VALUE)cme;
}
else {
buff[i] = (VALUE)cfp->iseq;
}
- if (cfp->iseq && lines) lines[i] = calc_lineno(cfp->iseq, cfp->pc);
+ if (lines) lines[i] = calc_lineno(cfp->iseq, cfp->pc);
i++;
}