<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/test/-ext-/debug/test_profile_frames.rb, branch v3_2_11</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>Fix `rb_profile_frames` output includes dummy main thread frame</title>
<updated>2022-07-26T01:43:44+00:00</updated>
<author>
<name>Ivo Anjo</name>
<email>ivo.anjo@datadoghq.com</email>
</author>
<published>2022-07-11T13:51:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=649bfbe00d8032fa2c0536e596a284f69926e87f'/>
<id>649bfbe00d8032fa2c0536e596a284f69926e87f</id>
<content type='text'>
The `rb_profile_frames` API did not skip the two dummy frames that
each thread has at its beginning. This was unlike `backtrace_each` and
`rb_ec_parcial_backtrace_object`, which do skip them.

This does not seem to be a problem for non-main thread frames,
because both `VM_FRAME_RUBYFRAME_P(cfp)` and
`rb_vm_frame_method_entry(cfp)` are NULL for them.

BUT, on the main thread `VM_FRAME_RUBYFRAME_P(cfp)` was true
and thus the dummy thread was still included in the output of
`rb_profile_frames`.

I've now made `rb_profile_frames` skip this extra frame (like
`backtrace_each` and friends), as well as add a test that asserts
the size and contents of `rb_profile_frames`.

Fixes [Bug #18907] (&lt;https://bugs.ruby-lang.org/issues/18907&gt;)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The `rb_profile_frames` API did not skip the two dummy frames that
each thread has at its beginning. This was unlike `backtrace_each` and
`rb_ec_parcial_backtrace_object`, which do skip them.

This does not seem to be a problem for non-main thread frames,
because both `VM_FRAME_RUBYFRAME_P(cfp)` and
`rb_vm_frame_method_entry(cfp)` are NULL for them.

BUT, on the main thread `VM_FRAME_RUBYFRAME_P(cfp)` was true
and thus the dummy thread was still included in the output of
`rb_profile_frames`.

I've now made `rb_profile_frames` skip this extra frame (like
`backtrace_each` and friends), as well as add a test that asserts
the size and contents of `rb_profile_frames`.

Fixes [Bug #18907] (&lt;https://bugs.ruby-lang.org/issues/18907&gt;)
</pre>
</div>
</content>
</entry>
<entry>
<title>vm_backtrace.c: let rb_profile_frames show cfunc frames</title>
<updated>2020-07-28T04:18:08+00:00</updated>
<author>
<name>Yusuke Endoh</name>
<email>mame@ruby-lang.org</email>
</author>
<published>2020-07-08T08:32:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=da31900d9d9e4e9dcd6381a23dd863b18fe65e3d'/>
<id>da31900d9d9e4e9dcd6381a23dd863b18fe65e3d</id>
<content type='text'>
... in addition to normal iseq frames.
It is sometimes useful to point the bottleneck more precisely.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
... in addition to normal iseq frames.
It is sometimes useful to point the bottleneck more precisely.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix rb_profile_frame_classpath to handle module singletons</title>
<updated>2020-05-07T15:46:36+00:00</updated>
<author>
<name>Jean Boussier</name>
<email>jean.boussier@gmail.com</email>
</author>
<published>2020-05-06T16:49:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=cbe4f75ef802f13d05f94e42274b65a062bd3666'/>
<id>cbe4f75ef802f13d05f94e42274b65a062bd3666</id>
<content type='text'>
Right now `SomeClass.method` is properly named, but `SomeModule.method`
is displayed as `#&lt;Module:0x000055eb5d95adc8&gt;.method` which makes
profiling annoying.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Right now `SomeClass.method` is properly named, but `SomeModule.method`
is displayed as `#&lt;Module:0x000055eb5d95adc8&gt;.method` which makes
profiling annoying.
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "Fix use of `rb_profile_frames` start parameter"</title>
<updated>2018-04-27T00:13:51+00:00</updated>
<author>
<name>tenderlove</name>
<email>tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e</email>
</author>
<published>2018-04-27T00:13:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=c03f86b389d00cf45edf133c9aa23479e6efc06e'/>
<id>c03f86b389d00cf45edf133c9aa23479e6efc06e</id>
<content type='text'>
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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix use of `rb_profile_frames` start parameter</title>
<updated>2018-04-26T22:49:00+00:00</updated>
<author>
<name>tenderlove</name>
<email>tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e</email>
</author>
<published>2018-04-26T22:49:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=d676ad1050c0f570d6a2d1f983c1223611d45570'/>
<id>d676ad1050c0f570d6a2d1f983c1223611d45570</id>
<content type='text'>
rb_profile_frames was always behaving as if the value given for the
start parameter was 0.

The reason for this was that it would check if (start &gt; 0) { then
continue without updating the control frame pointer or anything other
than decrementing start.

[ruby-core:86147] [Bug #14607]

Co-authored-by: Dylan Thacker-Smith &lt;Dylan.Smith@shopify.com&gt;

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63265 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
rb_profile_frames was always behaving as if the value given for the
start parameter was 0.

The reason for this was that it would check if (start &gt; 0) { then
continue without updating the control frame pointer or anything other
than decrementing start.

[ruby-core:86147] [Bug #14607]

Co-authored-by: Dylan Thacker-Smith &lt;Dylan.Smith@shopify.com&gt;

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63265 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</pre>
</div>
</content>
</entry>
<entry>
<title>vm_backtrace.c: ignore ifunc frames</title>
<updated>2015-12-21T01:18:48+00:00</updated>
<author>
<name>nobu</name>
<email>nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e</email>
</author>
<published>2015-12-21T01:18:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=cc52f511b1d942f8542a4d909ce0a1375ea07738'/>
<id>cc52f511b1d942f8542a4d909ce0a1375ea07738</id>
<content type='text'>
* 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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* 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
</pre>
</div>
</content>
</entry>
<entry>
<title>Add frozen_string_literal: false for all files</title>
<updated>2015-12-16T05:07:31+00:00</updated>
<author>
<name>naruse</name>
<email>naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e</email>
</author>
<published>2015-12-16T05:07:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=3e92b635fb5422207b7bbdc924e292e51e21f040'/>
<id>3e92b635fb5422207b7bbdc924e292e51e21f040</id>
<content type='text'>
When you change this to true, you may need to add more tests.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When you change this to true, you may need to add more tests.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</pre>
</div>
</content>
</entry>
<entry>
<title>* vm_core.h: remove rb_iseq_t::klass to reduce dynamic data.</title>
<updated>2015-07-06T18:44:54+00:00</updated>
<author>
<name>ko1</name>
<email>ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e</email>
</author>
<published>2015-07-06T18:44:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=02d5868962417298cf041ce723d406e16a635693'/>
<id>02d5868962417298cf041ce723d406e16a635693</id>
<content type='text'>
* internal.h, iseq.c (rb_iseq_klass): remove it because
  rb_iseq_t::klass is removed.
* vm_insnhelper.c (vm_super_outside): do not see cfp-&gt;iseq, but
  check callable method entry on a frame.
  This fix simplify the logic to search super class.
* test/ruby/test_method.rb: support super() from Proc.
  Now, [Bug #4881] and [Bug #3136] was solved.
* proc.c (rb_mod_define_method): catch up this change.
* vm.c (vm_define_method): ditto.
* vm_backtrace.c (rb_profile_frames): now, each `frame' objects
  are rb_callable_method_entry_t data or iseq VALUEs.
  This fix introduce minor compatibility issue that
  rb_profile_frame_label() always returns
  rb_profile_frame_base_label().
* test/-ext-/debug/test_profile_frames.rb: catch up this change.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51166 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* internal.h, iseq.c (rb_iseq_klass): remove it because
  rb_iseq_t::klass is removed.
* vm_insnhelper.c (vm_super_outside): do not see cfp-&gt;iseq, but
  check callable method entry on a frame.
  This fix simplify the logic to search super class.
* test/ruby/test_method.rb: support super() from Proc.
  Now, [Bug #4881] and [Bug #3136] was solved.
* proc.c (rb_mod_define_method): catch up this change.
* vm.c (vm_define_method): ditto.
* vm_backtrace.c (rb_profile_frames): now, each `frame' objects
  are rb_callable_method_entry_t data or iseq VALUEs.
  This fix introduce minor compatibility issue that
  rb_profile_frame_label() always returns
  rb_profile_frame_base_label().
* test/-ext-/debug/test_profile_frames.rb: catch up this change.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51166 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</pre>
</div>
</content>
</entry>
<entry>
<title>* vm_backtrace.c (rb_profile_frame_classpath): handle singleton</title>
<updated>2013-10-27T19:17:24+00:00</updated>
<author>
<name>tmm1</name>
<email>tmm1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e</email>
</author>
<published>2013-10-27T19:17:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=5b529e5a3df75df05f790ff18275ed9dacf5bdd4'/>
<id>5b529e5a3df75df05f790ff18275ed9dacf5bdd4</id>
<content type='text'>
  methods defined directly on an object.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43442 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
  methods defined directly on an object.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43442 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</pre>
</div>
</content>
</entry>
<entry>
<title>test_profile_frames.rb: assert first_lineno</title>
<updated>2013-10-14T19:14:20+00:00</updated>
<author>
<name>nobu</name>
<email>nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e</email>
</author>
<published>2013-10-14T19:14:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=5f7f1e516218a05ee904c9d4977e5fa4436a6e16'/>
<id>5f7f1e516218a05ee904c9d4977e5fa4436a6e16</id>
<content type='text'>
* test/-ext-/debug/test_profile_frames.rb (test_profile_frames):
  assert first_lineno, only the top level of methods for the time
  being.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43286 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* test/-ext-/debug/test_profile_frames.rb (test_profile_frames):
  assert first_lineno, only the top level of methods for the time
  being.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43286 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</pre>
</div>
</content>
</entry>
</feed>
