<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Objective-C: Logging Messages to Nil</title>
	<atom:link href="http://www.friday.com/bbum/2008/01/02/objective-c-logging-messages-to-nil/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.friday.com/bbum/2008/01/02/objective-c-logging-messages-to-nil/</link>
	<description>...so google can index my head.</description>
	<lastBuildDate>Thu, 18 Mar 2010 16:53:12 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Macinsoft - Logging Messages to Nil</title>
		<link>http://www.friday.com/bbum/2008/01/02/objective-c-logging-messages-to-nil/comment-page-1/#comment-184624</link>
		<dc:creator>Macinsoft - Logging Messages to Nil</dc:creator>
		<pubDate>Tue, 15 Jan 2008 07:03:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.friday.com/bbum/2008/01/02/objective-c-logging-messages-to-nil/#comment-184624</guid>
		<description>[...] bbum&#8217;s weblog-o-mat: &#8220;Some mechanism for catching, logging, and breaking on messages to nil (and only messages to nil) is needed for the rare&#8212;but often insanity inducing&#8212;case where you need to track down a bug of this nature.&#8221;  Comments RSS &#124; Trackback URL [...]</description>
		<content:encoded><![CDATA[<p>[...] bbum&rsquo;s weblog-o-mat: &ldquo;Some mechanism for catching, logging, and breaking on messages to nil (and only messages to nil) is needed for the rare&mdash;but often insanity inducing&mdash;case where you need to track down a bug of this nature.&rdquo;  Comments RSS | Trackback URL [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: leeg</title>
		<link>http://www.friday.com/bbum/2008/01/02/objective-c-logging-messages-to-nil/comment-page-1/#comment-184389</link>
		<dc:creator>leeg</dc:creator>
		<pubDate>Thu, 03 Jan 2008 11:58:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.friday.com/bbum/2008/01/02/objective-c-logging-messages-to-nil/#comment-184389</guid>
		<description>Nice example, and thanks to Adrian for that D script :-).  BTW bbum, HTML has swallowed the filenames in your #import lines.</description>
		<content:encoded><![CDATA[<p>Nice example, and thanks to Adrian for that D script <img src='http://www.friday.com/bbum/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> .  BTW bbum, HTML has swallowed the filenames in your #import lines.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kevin Ballard</title>
		<link>http://www.friday.com/bbum/2008/01/02/objective-c-logging-messages-to-nil/comment-page-1/#comment-184383</link>
		<dc:creator>Kevin Ballard</dc:creator>
		<pubDate>Thu, 03 Jan 2008 08:40:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.friday.com/bbum/2008/01/02/objective-c-logging-messages-to-nil/#comment-184383</guid>
		<description>Sure, it traps every call, but if the dtrace kernel buffer gets filled it will start discarding events. But trapping messages to nil should be fine. Logging a message for every single invocation of objc_msgSend, on the other hand, would probably start dropping them on the floor.</description>
		<content:encoded><![CDATA[<p>Sure, it traps every call, but if the dtrace kernel buffer gets filled it will start discarding events. But trapping messages to nil should be fine. Logging a message for every single invocation of objc_msgSend, on the other hand, would probably start dropping them on the floor.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Adrian Milliner</title>
		<link>http://www.friday.com/bbum/2008/01/02/objective-c-logging-messages-to-nil/comment-page-1/#comment-184368</link>
		<dc:creator>Adrian Milliner</dc:creator>
		<pubDate>Wed, 02 Jan 2008 22:19:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.friday.com/bbum/2008/01/02/objective-c-logging-messages-to-nil/#comment-184368</guid>
		<description>&#039;Keep up?&#039; it&#039;ll trap every single call; dtrace is not (necessarily) a sampling profiler. 

a dtrace script like:

&lt;pre&gt;
pid$1::objc_msgSend:entry
/arg0==0/
{
  ustack();
}
&lt;/pre&gt;

make little difference to the Finder&#039;s performance, but does really slow down Address Book (as it sends messages to nil tens of thousands of times in a few seconds).</description>
		<content:encoded><![CDATA[<p>&#8216;Keep up?&#8217; it&#8217;ll trap every single call; dtrace is not (necessarily) a sampling profiler. </p>
<p>a dtrace script like:</p>
<pre>
pid$1::objc_msgSend:entry
/arg0==0/
{
  ustack();
}
</pre>
<p>make little difference to the Finder&#8217;s performance, but does really slow down Address Book (as it sends messages to nil tens of thousands of times in a few seconds).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kevin Ballard</title>
		<link>http://www.friday.com/bbum/2008/01/02/objective-c-logging-messages-to-nil/comment-page-1/#comment-184365</link>
		<dc:creator>Kevin Ballard</dc:creator>
		<pubDate>Wed, 02 Jan 2008 20:32:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.friday.com/bbum/2008/01/02/objective-c-logging-messages-to-nil/#comment-184365</guid>
		<description>dtrace executes faster, but objc_msgSend may be called too frequently for dtrace to keep up. It&#039;s not meant for incredibly high-volume stuff. That said, it may still be worth a try.</description>
		<content:encoded><![CDATA[<p>dtrace executes faster, but objc_msgSend may be called too frequently for dtrace to keep up. It&#8217;s not meant for incredibly high-volume stuff. That said, it may still be worth a try.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Tsai - Blog - Logging Messages to Nil</title>
		<link>http://www.friday.com/bbum/2008/01/02/objective-c-logging-messages-to-nil/comment-page-1/#comment-184358</link>
		<dc:creator>Michael Tsai - Blog - Logging Messages to Nil</dc:creator>
		<pubDate>Wed, 02 Jan 2008 15:28:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.friday.com/bbum/2008/01/02/objective-c-logging-messages-to-nil/#comment-184358</guid>
		<description>[...] Bill Bumgarner shows how to use the private _objc_setNilReceiver() function and -resolveInstanceMethod: to log the first time each selector is sent to nil. I imagine that by uncommenting the print statement in -forwardInvocation:  this could be made to work with Objective-C 1.x, but you&#8217;d get a log entry for every message sent to nil. [...]</description>
		<content:encoded><![CDATA[<p>[...] Bill Bumgarner shows how to use the private _objc_setNilReceiver() function and -resolveInstanceMethod: to log the first time each selector is sent to nil. I imagine that by uncommenting the print statement in -forwardInvocation:  this could be made to work with Objective-C 1.x, but you&rsquo;d get a log entry for every message sent to nil. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Adrian Milliner</title>
		<link>http://www.friday.com/bbum/2008/01/02/objective-c-logging-messages-to-nil/comment-page-1/#comment-184349</link>
		<dc:creator>Adrian Milliner</dc:creator>
		<pubDate>Wed, 02 Jan 2008 08:12:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.friday.com/bbum/2008/01/02/objective-c-logging-messages-to-nil/#comment-184349</guid>
		<description>I&#039;ve not tried this but could you use dtrace (and Instruments) to trace entry to objc_msgSend where arg0 is null ?

The probe/instrument would look something like: pid::obj_msgSend:entry and arg0 would be available to the script that runs. You also have the dtrace ustack() method to show where you are.

Sorry, I haven&#039;t done any D for a while and almost none on OSX, so little vague on detail - but a good google should help.

Note that dtrace probes execute *much* faster than a debugger or profiler, so maybe worth doing.</description>
		<content:encoded><![CDATA[<p>I&#8217;ve not tried this but could you use dtrace (and Instruments) to trace entry to objc_msgSend where arg0 is null ?</p>
<p>The probe/instrument would look something like: pid::obj_msgSend:entry and arg0 would be available to the script that runs. You also have the dtrace ustack() method to show where you are.</p>
<p>Sorry, I haven&#8217;t done any D for a while and almost none on OSX, so little vague on detail &#8211; but a good google should help.</p>
<p>Note that dtrace probes execute *much* faster than a debugger or profiler, so maybe worth doing.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
