From: Anuj Dutta Date: 2014-01-03T14:49:44+00:00 Subject: [ruby-core:59528] Re: [ruby-trunk - Bug #9357] TracePoint's c_return traces return from call to 'trace' --001a11c2aa6a7d0c8604ef120613 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Makes sense. Thanks. Will close this now. On 3 January 2014 14:42, deivid (David Rodr=EDguez) < deivid.rodriguez@gmail.com> wrote: > > Issue #9357 has been updated by deivid (David Rodr=EDguez). > > > Yes, because tracing is enabled after the 'c_call' and before the > 'c_return' event. > ---------------------------------------- > Bug #9357: TracePoint's c_return traces return from call to 'trace' > https://bugs.ruby-lang.org/issues/9357#change-44067 > > Author: andhapp (Anuj Dutta) > Status: Open > Priority: Normal > Assignee: > Category: > Target version: > ruby -v: 2.1.0 > Backport: 1.9.3: UNKNOWN, 2.0.0: UNKNOWN, 2.1: UNKNOWN > > > =3Dbegin > Hello, > > In TracePoint, trace on 'c_call' doesn't trace the call made to 'trace' > method, where as trace on 'c_return' does, is this expected behaviour? > > Here's the code I used to reproduce it: > > =3D=3D=3D Code (c_return) > class Car > def self.start > print "Started..." > end > end > > TracePoint.trace(:c_return) do |tp| > puts "'#{tp.event}' event occurred in > #{tp.defined_class}##{tp.method_id}" > end > > Car.start > > =3D=3D=3D Env > > Ruby 2.1.0 > > > =3D=3D=3D Actual output > > 'c_return' event occurred in ##trace > Started...'c_return' event occurred in IO#write > 'c_return' event occurred in Kernel#print > > =3D=3D=3D Expected output > > Started...'c_return' event occurred in IO#write > 'c_return' event occurred in Kernel#print > > =3D=3D=3D Code on eval.in > > Here's the link to code on eval.in: > > https://eval.in/85264 > > Thanks. > > > -- > http://bugs.ruby-lang.org/ > --=20 Anuj DUTTA --001a11c2aa6a7d0c8604ef120613 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Makes sense.=A0

Thanks.=A0
Will close this now.



On 3 January 2014 14:42, dei= vid (David Rodr=EDguez) <deivid.rodriguez@gmail.com> wrote:

Issue #9357 has been updated by deivid (David Rodr=EDguez).


Yes, because tracing is enabled after the 'c_call' and before= the 'c_return' event.
----------------------------------------
Bug #9357: TracePoint's c_return traces return from call to 'trace&= #39;
https://bugs.ruby-lang.org/issues/9357#change-44067

Author: andhapp (Anuj Dutta)
Status: Open
Priority: Normal
Assignee:
Category:
Target version:
ruby -v: 2.1.0
Backport: 1.9.3: UNKNOWN, 2.0.0: UNKNOWN, 2.1: UNKNOWN


=3Dbegin
Hello,

In TracePoint, trace on 'c_call' doesn't trace the call made to= 'trace' method, where as trace on 'c_return' does, is this= expected behaviour?

Here's the code I used to reproduce it:

=3D=3D=3D Code (c_return)
=A0 =A0 class Car
=A0 =A0 =A0 def self.start
=A0 =A0 =A0 =A0 print "Started..."
=A0 =A0 =A0 end
=A0 =A0 end

=A0 =A0 TracePoint.trace(:c_return) do |tp|
=A0 =A0 =A0 puts "'#{tp.event}' event occurred in #{tp.defined= _class}##{tp.method_id}"
=A0 =A0 end

=A0 =A0 Car.start

=3D=3D=3D Env

Ruby 2.1.0


=3D=3D=3D Actual output

=A0 =A0 'c_return' event occurred in #<Class:TracePoint>#trac= e
=A0 =A0 Started...'c_return' event occurred in IO#write
=A0 =A0 'c_return' event occurred in Kernel#print

=3D=3D=3D Expected output

=A0 =A0 Started...'c_return' event occurred in IO#write
=A0 =A0 'c_return' event occurred in Kernel#print

=3D=3D=3D Code on eval.in<= br>
Here's the link to code on eval.in:

https://eval.in/85264

Thanks.


--
http://bugs.ruby-l= ang.org/



--
= Anuj DUTTA
--001a11c2aa6a7d0c8604ef120613--