https://bugs.ruby-lang.org/https://bugs.ruby-lang.org/favicon.ico?17113305112014-01-03T20:51:57ZRuby Issue Tracking SystemRuby master - Bug #9357: TracePoint's c_return traces return from call to 'trace'https://bugs.ruby-lang.org/issues/9357?journal_id=440612014-01-03T20:51:57Zdeivid (David Rodríguez)
<ul></ul><p>I think this is expected because tracing is enabled <em>inside</em> the trace method, not after, nor before.</p>
<p>Does that behaviour cause any trouble?</p> Ruby master - Bug #9357: TracePoint's c_return traces return from call to 'trace'https://bugs.ruby-lang.org/issues/9357?journal_id=440662014-01-03T23:23:28ZAnonymous
<ul></ul><p>It doesn't cause any issues, however that doesn't seem to happen when one<br>
traces on c_call. Here's the code:</p>
<p><a href="https://eval.in/85228" class="external">https://eval.in/85228</a></p>
<p>Thanks.</p>
<p>On 3 January 2014 11:51, deivid (David Rodríguez) <<br>
<a href="mailto:deivid.rodriguez@gmail.com" class="email">deivid.rodriguez@gmail.com</a>> wrote:</p>
<blockquote>
<p>Issue <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: TracePoint's c_return traces return from call to 'trace' (Closed)" href="https://bugs.ruby-lang.org/issues/9357">#9357</a> has been updated by deivid (David Rodríguez).</p>
<p>I think this is expected because tracing is enabled <em>inside</em> the trace<br>
method, not after, nor before.</p>
<a name="Does-that-behaviour-cause-any-trouble"></a>
<h2 >Does that behaviour cause any trouble?<a href="#Does-that-behaviour-cause-any-trouble" class="wiki-anchor">¶</a></h2>
<p>Bug <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: TracePoint's c_return traces return from call to 'trace' (Closed)" href="https://bugs.ruby-lang.org/issues/9357">#9357</a>: TracePoint's c_return traces return from call to 'trace'<br>
<a href="https://bugs.ruby-lang.org/issues/9357#change-44061" class="external">https://bugs.ruby-lang.org/issues/9357#change-44061</a></p>
<p>Author: andhapp (Anuj Dutta)<br>
Status: Open<br>
Priority: Normal<br>
Assignee:<br>
Category:<br>
Target version:<br>
ruby -v: 2.1.0<br>
Backport: 1.9.3: UNKNOWN, 2.0.0: UNKNOWN, 2.1: UNKNOWN</p>
<p>=begin<br>
Hello,</p>
<p>In TracePoint, trace on 'c_call' doesn't trace the call made to 'trace'<br>
method, where as trace on 'c_return' does, is this expected behaviour?</p>
<p>Here's the code I used to reproduce it:</p>
<p>=== Code (c_return)<br>
class Car<br>
def self.start<br>
print "Started..."<br>
end<br>
end</p>
<pre><code>TracePoint.trace(:c_return) do |tp|
puts "'#{tp.event}' event occurred in
</code></pre>
<p>#{tp.defined_class}##{tp.method_id}"<br>
end</p>
<pre><code>Car.start
</code></pre>
<p>=== Env</p>
<p>Ruby 2.1.0</p>
<p>=== Actual output</p>
<pre><code>'c_return' event occurred in #<Class:TracePoint>#trace
Started...'c_return' event occurred in IO#write
'c_return' event occurred in Kernel#print
</code></pre>
<p>=== Expected output</p>
<pre><code>Started...'c_return' event occurred in IO#write
'c_return' event occurred in Kernel#print
</code></pre>
<p>=== Code on eval.in</p>
<p>Here's the link to code on eval.in:</p>
<p><a href="https://eval.in/85264" class="external">https://eval.in/85264</a></p>
<p>Thanks.</p>
<p>--<br>
<a href="http://bugs.ruby-lang.org/" class="external">http://bugs.ruby-lang.org/</a></p>
</blockquote>
<p>--<br>
Anuj DUTTA</p> Ruby master - Bug #9357: TracePoint's c_return traces return from call to 'trace'https://bugs.ruby-lang.org/issues/9357?journal_id=440672014-01-03T23:42:15Zdeivid (David Rodríguez)
<ul></ul><p>Yes, because tracing is enabled after the 'c_call' and before the 'c_return' event.</p> Ruby master - Bug #9357: TracePoint's c_return traces return from call to 'trace'https://bugs.ruby-lang.org/issues/9357?journal_id=440682014-01-03T23:53:19ZAnonymous
<ul></ul><p>Makes sense.</p>
<p>Thanks.</p>
<p>Will close this now.</p>
<p>On 3 January 2014 14:42, deivid (David Rodríguez) <<br>
<a href="mailto:deivid.rodriguez@gmail.com" class="email">deivid.rodriguez@gmail.com</a>> wrote:</p>
<blockquote>
<p>Issue <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: TracePoint's c_return traces return from call to 'trace' (Closed)" href="https://bugs.ruby-lang.org/issues/9357">#9357</a> has been updated by deivid (David Rodríguez).</p>
<h2>Yes, because tracing is enabled after the 'c_call' and before the<br>
'c_return' event.</h2>
<p>Bug <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: TracePoint's c_return traces return from call to 'trace' (Closed)" href="https://bugs.ruby-lang.org/issues/9357">#9357</a>: TracePoint's c_return traces return from call to 'trace'<br>
<a href="https://bugs.ruby-lang.org/issues/9357#change-44067" class="external">https://bugs.ruby-lang.org/issues/9357#change-44067</a></p>
<p>Author: andhapp (Anuj Dutta)<br>
Status: Open<br>
Priority: Normal<br>
Assignee:<br>
Category:<br>
Target version:<br>
ruby -v: 2.1.0<br>
Backport: 1.9.3: UNKNOWN, 2.0.0: UNKNOWN, 2.1: UNKNOWN</p>
<p>=begin<br>
Hello,</p>
<p>In TracePoint, trace on 'c_call' doesn't trace the call made to 'trace'<br>
method, where as trace on 'c_return' does, is this expected behaviour?</p>
<p>Here's the code I used to reproduce it:</p>
<p>=== Code (c_return)<br>
class Car<br>
def self.start<br>
print "Started..."<br>
end<br>
end</p>
<pre><code>TracePoint.trace(:c_return) do |tp|
puts "'#{tp.event}' event occurred in
</code></pre>
<p>#{tp.defined_class}##{tp.method_id}"<br>
end</p>
<pre><code>Car.start
</code></pre>
<p>=== Env</p>
<p>Ruby 2.1.0</p>
<p>=== Actual output</p>
<pre><code>'c_return' event occurred in #<Class:TracePoint>#trace
Started...'c_return' event occurred in IO#write
'c_return' event occurred in Kernel#print
</code></pre>
<p>=== Expected output</p>
<pre><code>Started...'c_return' event occurred in IO#write
'c_return' event occurred in Kernel#print
</code></pre>
<p>=== Code on eval.in</p>
<p>Here's the link to code on eval.in:</p>
<p><a href="https://eval.in/85264" class="external">https://eval.in/85264</a></p>
<p>Thanks.</p>
<p>--<br>
<a href="http://bugs.ruby-lang.org/" class="external">http://bugs.ruby-lang.org/</a></p>
</blockquote>
<p>--<br>
Anuj DUTTA</p> Ruby master - Bug #9357: TracePoint's c_return traces return from call to 'trace'https://bugs.ruby-lang.org/issues/9357?journal_id=793302019-07-12T03:44:38Zjeremyevans0 (Jeremy Evans)merch-redmine@jeremyevans.net
<ul><li><strong>Status</strong> changed from <i>Open</i> to <i>Closed</i></li><li><strong>Backport</strong> deleted (<del><i>1.9.3: UNKNOWN, 2.0.0: UNKNOWN, 2.1: UNKNOWN</i></del>)</li></ul>