mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Revert "Fix use of rb_profile_frames
start parameter"
This reverts commit r63265. ko1 said I should not have committed this! I'm sorry! git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63267 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
707cbe6f99
commit
c03f86b389
2 changed files with 2 additions and 5 deletions
|
@ -119,8 +119,4 @@ class TestProfileFrames < Test::Unit::TestCase
|
||||||
a
|
a
|
||||||
end;
|
end;
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_start
|
|
||||||
assert_equal Bug::Debug.profile_frames(0, 10).tap(&:shift), Bug::Debug.profile_frames(1, 9)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -1276,7 +1276,7 @@ rb_profile_frames(int start, int limit, VALUE *buff, int *lines)
|
||||||
const rb_control_frame_t *cfp = ec->cfp, *end_cfp = RUBY_VM_END_CONTROL_FRAME(ec);
|
const rb_control_frame_t *cfp = ec->cfp, *end_cfp = RUBY_VM_END_CONTROL_FRAME(ec);
|
||||||
const rb_callable_method_entry_t *cme;
|
const rb_callable_method_entry_t *cme;
|
||||||
|
|
||||||
for (i=0; i<limit && cfp != end_cfp; cfp = RUBY_VM_PREVIOUS_CONTROL_FRAME(cfp)) {
|
for (i=0; i<limit && cfp != end_cfp;) {
|
||||||
if (cfp->iseq && cfp->pc) {
|
if (cfp->iseq && cfp->pc) {
|
||||||
if (start > 0) {
|
if (start > 0) {
|
||||||
start--;
|
start--;
|
||||||
|
@ -1296,6 +1296,7 @@ rb_profile_frames(int start, int limit, VALUE *buff, int *lines)
|
||||||
|
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
cfp = RUBY_VM_PREVIOUS_CONTROL_FRAME(cfp);
|
||||||
}
|
}
|
||||||
|
|
||||||
return i;
|
return i;
|
||||||
|
|
Loading…
Reference in a new issue