<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>DistributedInformation &#187; solaris</title>
	<atom:link href="http://fosiki.com/blog/category/solaris/feed/" rel="self" type="application/rss+xml" />
	<link>http://fosiki.com/blog</link>
	<description>Sven Dowideit - Consulting Wiki Engineer</description>
	<lastBuildDate>Wed, 09 Dec 2009 12:02:22 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>older releases of Solaris 10</title>
		<link>http://fosiki.com/blog/2008/10/12/older-releases-of-solaris-10/</link>
		<comments>http://fosiki.com/blog/2008/10/12/older-releases-of-solaris-10/#comments</comments>
		<pubDate>Sun, 12 Oct 2008 12:06:59 +0000</pubDate>
		<dc:creator>Sven Dowideit</dc:creator>
				<category><![CDATA[enterprise]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[solaris]]></category>
		<category><![CDATA[twiki]]></category>

		<guid isPermaLink="false">http://fosiki.com/blog/?p=110</guid>
		<description><![CDATA[If like me, you&#8217;re looking for an older release of Solaris &#8211; so you can replicate a client&#8217;s setup, you can find them at http://www.sun.com/software/solaris/releases.jsp
I couldn&#8217;t find it without help &#8211; as Sun&#8217;s web site is a study in how to make things impossible to find.
Now to install Solaris 10 update 3 (11/06) on my old [...]]]></description>
			<content:encoded><![CDATA[<div class='microid-mailto+http:sha1:f6620dd9ce92ab2c9aef5f0b7fca8120bf30815e'><p>If like me, you&#8217;re looking for an older release of Solaris &#8211; so you can replicate a client&#8217;s setup, you can find them at http://www.sun.com/software/solaris/releases.jsp</p>
<p>I couldn&#8217;t find it without help &#8211; as Sun&#8217;s web site is a study in how to make things impossible to find.</p>
<p>Now to install Solaris 10 update 3 (11/06) on my old ultra sparc 5 &#8211; yep, 10 year old tech. its been sitting in the garage for the last year or so, but as its built like a tank, it seems to start fine. I do wish the 10K 18.4G Quantum cheetah wasn&#8217;t quite such a painful noise though.</p>
<p>My client chooses to use the http://www.sunfreeware.com/ packages &#8211; which means that to get Perl 5.8.8 humming (and subversion so I could commit TWiki fixes), required me to install:</p>
<ul>
<li>db-4.2.52.NC-sol10-sparc-local</li>
<li>diffutils-2.8.1-sol10-sparc-local</li>
<li>expat-2.0.1-sol10-sparc-local</li>
<li>gcc-3.4.6-sol10-sparc-local</li>
<li>gdbm-1.8.3-sol10-sparc-local</li>
<li>grep-2.5.1a-sol10-sparc-local</li>
<li>libiconv-1.9.2-sol10-sparc-local</li>
<li>libintl-3.4.0-sol10-sparc-local</li>
<li>libxml2-2.6.31-sol10-sparc-local</li>
<li>make-3.81-sol10-sparc-local</li>
<li>ncftp-3.2.1-sol10-sparc-local</li>
<li>neon-0.25.5-sol10-sparc-local</li>
<li>neon-0.28.3-sol10-sparc-local</li>
<li>openssl-0.9.8i-sol10-sparc-local</li>
<li>pcre-7.8-sol10-sparc-local</li>
<li>perl-5.8.8-sol10-sparc-local</li>
<li>rcs-5.7-sol10-sparc-local</li>
<li>subversion-1.4.4-sol10-sparc-local</li>
<li>swig-1.3.36-sol10-sparc-local</li>
<li>wget-1.11.4-sol10-sparc-local</li>
<li>zlib-1.2.3-sol10-sparc-local</li>
</ul>
<p>and after all that, I&#8217;m having weird spillover issues with CPAN, caused by having the built in Perl 5.8.4 in the PATH before /usr/local/bin/perl (the 5.8.8)</p>
<p>So if you have more than one Perl installed, and want to use CPAN &#8211; BE CAREFUL to set the PATH to use your desired Perl&#8217;s path first &#8211; calling it directly will lead to problems.</p>
</div>
<span class="slashdigglicious">
<a href="http://slashdot.org/bookmark.pl?url=http%3A%2F%2Ffosiki.com%2Fblog%2F2008%2F10%2F12%2Folder-releases-of-solaris-10%2F&amp;title=older+releases+of+Solaris+10" title="Slashdot It!"><img src="http://slashdot.org/favicon.ico" height="16" width="16" alt="[Slashdot]" /></a>
<a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Ffosiki.com%2Fblog%2F2008%2F10%2F12%2Folder-releases-of-solaris-10%2F&amp;title=older+releases+of+Solaris+10" title="Digg This Story"><img src="http://digg.com/favicon.ico" width="16" height="16" alt="[Digg]" /></a>
<a href="http://reddit.com/submit?url=http%3A%2F%2Ffosiki.com%2Fblog%2F2008%2F10%2F12%2Folder-releases-of-solaris-10%2F&amp;title=older+releases+of+Solaris+10" title="Reddit"><img src="http://reddit.com/favicon.ico" width="16" height="16" alt="[Reddit]" /></a>
<a href="http://del.icio.us/post?url=http%3A%2F%2Ffosiki.com%2Fblog%2F2008%2F10%2F12%2Folder-releases-of-solaris-10%2F&amp;title=older+releases+of+Solaris+10" title="Save to del.icio.us" onclick="window.open('http://del.icio.us/post?v=4&amp;noui&amp;jump=close&amp;url=http%3A%2F%2Ffosiki.com%2Fblog%2F2008%2F10%2F12%2Folder-releases-of-solaris-10%2F&amp;title=older+releases+of+Solaris+10', 'delicious', 'toolbar=no,width=700,height=400'); return false;"><img src="http://images.del.icio.us/static/img/delicious.small.gif" width="16" height="16" alt="[del.icio.us]" /></a>
<a href="http://www.facebook.com/share.php?u=http%3A%2F%2Ffosiki.com%2Fblog%2F2008%2F10%2F12%2Folder-releases-of-solaris-10%2F" title="Share on Facebook"><img src="http://www.facebook.com/favicon.ico" width="16" height="16" alt="[Facebook]" /></a>
<a href="http://technorati.com/faves?add=http%3A%2F%2Ffosiki.com%2Fblog%2F2008%2F10%2F12%2Folder-releases-of-solaris-10%2F" title="Add to my Technorati Favorites"><img src="http://technorati.com/favicon.ico" width="16" height="16" alt="[Technorati]" /></a>
<a href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Ffosiki.com%2Fblog%2F2008%2F10%2F12%2Folder-releases-of-solaris-10%2F&amp;title=older+releases+of+Solaris+10" title="Save to Google Bookmarks"><img src="http://www.google.com/favicon.ico" width="16" height="16" alt="[Google]" /></a>
<a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Ffosiki.com%2Fblog%2F2008%2F10%2F12%2Folder-releases-of-solaris-10%2F&amp;title=older+releases+of+Solaris+10" title="Stumble it!"><img src="http://www.stumbleupon.com/favicon.ico" width="16" height="16" alt="[StumbleUpon]" /></a>
</span>]]></content:encoded>
			<wfw:commentRss>http://fosiki.com/blog/2008/10/12/older-releases-of-solaris-10/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>ever had Perl CPAN not work on your debian, even though you installed make etc?</title>
		<link>http://fosiki.com/blog/2008/08/20/ever-had-perl-cpan-not-work-on-your-debian-even-though-you-installed-make-etc/</link>
		<comments>http://fosiki.com/blog/2008/08/20/ever-had-perl-cpan-not-work-on-your-debian-even-though-you-installed-make-etc/#comments</comments>
		<pubDate>Wed, 20 Aug 2008 06:29:00 +0000</pubDate>
		<dc:creator>Sven Dowideit</dc:creator>
				<category><![CDATA[debian]]></category>
		<category><![CDATA[dtrace]]></category>
		<category><![CDATA[enterprise]]></category>
		<category><![CDATA[new]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[solaris]]></category>
		<category><![CDATA[twiki]]></category>
		<category><![CDATA[cpan]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[make]]></category>

		<guid isPermaLink="false">http://distributedinformation.com/blog/?p=69</guid>
		<description><![CDATA[CPAN, while incredibly useful, can be a pain, if you forget that you need to re-configure it after installing essential tools.
For example, if you make the mistake of setting up a basic, non-development Debian virtual machine, configure CPAN, try to use it, and on seeing &#8216;make&#8217; errors like (from install Bundle::CPAN of all things) :

Running [...]]]></description>
			<content:encoded><![CDATA[<div class='microid-mailto+http:sha1:ce9f993266f5f921264bab12972452c20ebec23e'><p>CPAN, while incredibly useful, can be a pain, if you forget that you need to re-configure it after installing essential tools.</p>
<p>For example, if you make the mistake of setting up a basic, non-development Debian virtual machine, configure CPAN, try to use it, and on seeing &#8216;make&#8217; errors like (from <code>install Bundle::CPAN</code> of all things) :<br />
<code><br />
Running make test<br />
  Can't test without successful make<br />
Running make install<br />
  make had returned bad status, install seems impossible<br />
Running install for module Compress::Raw::Zlib<br />
Running make for P/PM/PMQS/Compress-Raw-Zlib-2.012.tar.gz<br />
  Is already unwrapped into directory /root/.cpan/build/Compress-Raw-Zlib-2.012<br />
  Has already been processed within this session<br />
Running make test<br />
  Can't test without successful make<br />
Running make install<br />
  make had returned bad status, install seems impossible<br />
Running make for P/PM/PMQS/IO-Compress-Zlib-2.012.tar.gz<br />
  Is already unwrapped into directory /root/.cpan/build/IO-Compress-Zlib-2.012<br />
  Has already been processed within this session<br />
Running make test<br />
  Can't test without successful make<br />
Running make install<br />
  make had returned bad status, install seems impossible</p>
<p>cpan><br />
</code></p>
<p>You install make <code>apt-get update ; apt-get install build-essential</code>&#8230;, only to continue to see the same errors wizz past&#8230;.</p>
<p>CPAN really truly needs to realise that the make settings are mis configured, and tell you.</p>
<p>What you <em>need</em> to do, is to tell your cpan about it by running:<br />
<code>cpan> o conf init</code></p>
<p>OR, if you&#8217;ve not yet messed (configured) up your cpan, install <code>build-essential</code> first.</p>
<p>And while you&#8217;re contemplating using cpan, think hard about trying <code>dh-make-perl</code> instead <img src='http://fosiki.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Ideally, CPAN should be able to realise that it can&#8217;t call make if it does not know where it is &#8211; and point this fact out, rather than making it appear as though the package being installed has an issue.</p>
</div>
<span class="slashdigglicious">
<a href="http://slashdot.org/bookmark.pl?url=http%3A%2F%2Ffosiki.com%2Fblog%2F2008%2F08%2F20%2Fever-had-perl-cpan-not-work-on-your-debian-even-though-you-installed-make-etc%2F&amp;title=ever+had+Perl+CPAN+not+work+on+your+debian%2C+even+though+you+installed+make+etc%3F" title="Slashdot It!"><img src="http://slashdot.org/favicon.ico" height="16" width="16" alt="[Slashdot]" /></a>
<a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Ffosiki.com%2Fblog%2F2008%2F08%2F20%2Fever-had-perl-cpan-not-work-on-your-debian-even-though-you-installed-make-etc%2F&amp;title=ever+had+Perl+CPAN+not+work+on+your+debian%2C+even+though+you+installed+make+etc%3F" title="Digg This Story"><img src="http://digg.com/favicon.ico" width="16" height="16" alt="[Digg]" /></a>
<a href="http://reddit.com/submit?url=http%3A%2F%2Ffosiki.com%2Fblog%2F2008%2F08%2F20%2Fever-had-perl-cpan-not-work-on-your-debian-even-though-you-installed-make-etc%2F&amp;title=ever+had+Perl+CPAN+not+work+on+your+debian%2C+even+though+you+installed+make+etc%3F" title="Reddit"><img src="http://reddit.com/favicon.ico" width="16" height="16" alt="[Reddit]" /></a>
<a href="http://del.icio.us/post?url=http%3A%2F%2Ffosiki.com%2Fblog%2F2008%2F08%2F20%2Fever-had-perl-cpan-not-work-on-your-debian-even-though-you-installed-make-etc%2F&amp;title=ever+had+Perl+CPAN+not+work+on+your+debian%2C+even+though+you+installed+make+etc%3F" title="Save to del.icio.us" onclick="window.open('http://del.icio.us/post?v=4&amp;noui&amp;jump=close&amp;url=http%3A%2F%2Ffosiki.com%2Fblog%2F2008%2F08%2F20%2Fever-had-perl-cpan-not-work-on-your-debian-even-though-you-installed-make-etc%2F&amp;title=ever+had+Perl+CPAN+not+work+on+your+debian%2C+even+though+you+installed+make+etc%3F', 'delicious', 'toolbar=no,width=700,height=400'); return false;"><img src="http://images.del.icio.us/static/img/delicious.small.gif" width="16" height="16" alt="[del.icio.us]" /></a>
<a href="http://www.facebook.com/share.php?u=http%3A%2F%2Ffosiki.com%2Fblog%2F2008%2F08%2F20%2Fever-had-perl-cpan-not-work-on-your-debian-even-though-you-installed-make-etc%2F" title="Share on Facebook"><img src="http://www.facebook.com/favicon.ico" width="16" height="16" alt="[Facebook]" /></a>
<a href="http://technorati.com/faves?add=http%3A%2F%2Ffosiki.com%2Fblog%2F2008%2F08%2F20%2Fever-had-perl-cpan-not-work-on-your-debian-even-though-you-installed-make-etc%2F" title="Add to my Technorati Favorites"><img src="http://technorati.com/favicon.ico" width="16" height="16" alt="[Technorati]" /></a>
<a href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Ffosiki.com%2Fblog%2F2008%2F08%2F20%2Fever-had-perl-cpan-not-work-on-your-debian-even-though-you-installed-make-etc%2F&amp;title=ever+had+Perl+CPAN+not+work+on+your+debian%2C+even+though+you+installed+make+etc%3F" title="Save to Google Bookmarks"><img src="http://www.google.com/favicon.ico" width="16" height="16" alt="[Google]" /></a>
<a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Ffosiki.com%2Fblog%2F2008%2F08%2F20%2Fever-had-perl-cpan-not-work-on-your-debian-even-though-you-installed-make-etc%2F&amp;title=ever+had+Perl+CPAN+not+work+on+your+debian%2C+even+though+you+installed+make+etc%3F" title="Stumble it!"><img src="http://www.stumbleupon.com/favicon.ico" width="16" height="16" alt="[StumbleUpon]" /></a>
</span>]]></content:encoded>
			<wfw:commentRss>http://fosiki.com/blog/2008/08/20/ever-had-perl-cpan-not-work-on-your-debian-even-though-you-installed-make-etc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Blead Perl DTrace probes</title>
		<link>http://fosiki.com/blog/2008/02/15/blead-perl-dtrace-probes/</link>
		<comments>http://fosiki.com/blog/2008/02/15/blead-perl-dtrace-probes/#comments</comments>
		<pubDate>Fri, 15 Feb 2008 07:16:26 +0000</pubDate>
		<dc:creator>Sven Dowideit</dc:creator>
				<category><![CDATA[dtrace]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[solaris]]></category>
		<category><![CDATA[leopard]]></category>
		<category><![CDATA[opensolaris]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[require]]></category>
		<category><![CDATA[use]]></category>

		<guid isPermaLink="false">http://distributedinformation.com/blog/2008/02/15/blead-perl-dtrace-probes/</guid>
		<description><![CDATA[I&#8217;ve ported my additional DTrace probes to blead perl, adding the following probes

new-sv and del-sv to track Perl allocations,
main-enter and main-exit to show what part of Perl&#8217;s execution phase  we&#8217;re in
load-module-entry and load-module-return to instrument use, require, do.

I&#8217;ve also started to document the probes at  http://wikis.sun.com/display/DTrace/perl+Provider
To use the patch,

get bleadperl:

 rsync -avz &#8211;exclude [...]]]></description>
			<content:encoded><![CDATA[<div class='microid-mailto+http:sha1:c0a6cc7a492d3b300cf84f711bfe22d8c78cc11d'><p>I&#8217;ve <a href="http://distributedinformation.com/DTrace/">ported my additional DTrace</a> probes to blead perl, adding the following probes</p>
<ul>
<li>new-sv and del-sv to track Perl allocations,</li>
<li>main-enter and main-exit to show what part of Perl&#8217;s execution phase  we&#8217;re in</li>
<li>load-module-entry and load-module-return to instrument use, require, do.</li>
</ul>
<p>I&#8217;ve also started to document the probes at  <a href="http://wikis.sun.com/display/DTrace/perl+Provider" class="moz-txt-link-freetext">http://wikis.sun.com/display/DTrace/perl+Provider</a><br />
To use the patch,</p>
<ol>
<li>get bleadperl:
<ol>
<li> rsync -avz &#8211;exclude .svn/ &#8211;delete rsync://ftp.linux.activestate.com/perl-current/ bleadperl</li>
</ol>
</li>
<li>apply the patch:</li>
<li>cd bleadperl ; patch ../bleadperl.diff</li>
<li>run configure with dtrace enabled:
<ol>
<li>./Configure -de -Dusedevel -Dinc_version_list=none -Dprefix=/usr/local/bleadperl/ -Dldflags=-Dman3ext=3pm -Duseithreads -Duseshrplib -Uversiononly -Dusedtrace -Doptimize=-g</li>
</ol>
</li>
<li>make</li>
<li>make test</li>
<li>make install</li>
<li>run./perl.d (also found at <a href="http://distributedinformation.com/DTrace/">http://distributedinformation.com/DTrace/</a> ) and then run whatever Perl code you want to instrument.</li>
</ol>
</div>
<span class="slashdigglicious">
<a href="http://slashdot.org/bookmark.pl?url=http%3A%2F%2Ffosiki.com%2Fblog%2F2008%2F02%2F15%2Fblead-perl-dtrace-probes%2F&amp;title=Blead+Perl+DTrace+probes" title="Slashdot It!"><img src="http://slashdot.org/favicon.ico" height="16" width="16" alt="[Slashdot]" /></a>
<a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Ffosiki.com%2Fblog%2F2008%2F02%2F15%2Fblead-perl-dtrace-probes%2F&amp;title=Blead+Perl+DTrace+probes" title="Digg This Story"><img src="http://digg.com/favicon.ico" width="16" height="16" alt="[Digg]" /></a>
<a href="http://reddit.com/submit?url=http%3A%2F%2Ffosiki.com%2Fblog%2F2008%2F02%2F15%2Fblead-perl-dtrace-probes%2F&amp;title=Blead+Perl+DTrace+probes" title="Reddit"><img src="http://reddit.com/favicon.ico" width="16" height="16" alt="[Reddit]" /></a>
<a href="http://del.icio.us/post?url=http%3A%2F%2Ffosiki.com%2Fblog%2F2008%2F02%2F15%2Fblead-perl-dtrace-probes%2F&amp;title=Blead+Perl+DTrace+probes" title="Save to del.icio.us" onclick="window.open('http://del.icio.us/post?v=4&amp;noui&amp;jump=close&amp;url=http%3A%2F%2Ffosiki.com%2Fblog%2F2008%2F02%2F15%2Fblead-perl-dtrace-probes%2F&amp;title=Blead+Perl+DTrace+probes', 'delicious', 'toolbar=no,width=700,height=400'); return false;"><img src="http://images.del.icio.us/static/img/delicious.small.gif" width="16" height="16" alt="[del.icio.us]" /></a>
<a href="http://www.facebook.com/share.php?u=http%3A%2F%2Ffosiki.com%2Fblog%2F2008%2F02%2F15%2Fblead-perl-dtrace-probes%2F" title="Share on Facebook"><img src="http://www.facebook.com/favicon.ico" width="16" height="16" alt="[Facebook]" /></a>
<a href="http://technorati.com/faves?add=http%3A%2F%2Ffosiki.com%2Fblog%2F2008%2F02%2F15%2Fblead-perl-dtrace-probes%2F" title="Add to my Technorati Favorites"><img src="http://technorati.com/favicon.ico" width="16" height="16" alt="[Technorati]" /></a>
<a href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Ffosiki.com%2Fblog%2F2008%2F02%2F15%2Fblead-perl-dtrace-probes%2F&amp;title=Blead+Perl+DTrace+probes" title="Save to Google Bookmarks"><img src="http://www.google.com/favicon.ico" width="16" height="16" alt="[Google]" /></a>
<a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Ffosiki.com%2Fblog%2F2008%2F02%2F15%2Fblead-perl-dtrace-probes%2F&amp;title=Blead+Perl+DTrace+probes" title="Stumble it!"><img src="http://www.stumbleupon.com/favicon.ico" width="16" height="16" alt="[StumbleUpon]" /></a>
</span>]]></content:encoded>
			<wfw:commentRss>http://fosiki.com/blog/2008/02/15/blead-perl-dtrace-probes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Perl DTrace load-module probe added &#8211; see what module is &#8216;do&#8217;, &#8216;use&#8217; or &#8216;require&#8217;d</title>
		<link>http://fosiki.com/blog/2008/01/12/perl-dtrace-load-module-probe-added-see-what-module-is-do-use-or-required/</link>
		<comments>http://fosiki.com/blog/2008/01/12/perl-dtrace-load-module-probe-added-see-what-module-is-do-use-or-required/#comments</comments>
		<pubDate>Sat, 12 Jan 2008 08:45:32 +0000</pubDate>
		<dc:creator>Sven Dowideit</dc:creator>
				<category><![CDATA[dtrace]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[solaris]]></category>

		<guid isPermaLink="false">http://distributedinformation.com/blog/2008/01/12/perl-dtrace-load-module-probe-added-see-what-module-is-do-use-or-required/</guid>
		<description><![CDATA[With the load-module probe, you can see at what point modules are loaded using &#8216;do&#8217;, &#8216;use&#8217; or &#8216;require&#8217;.
The following code:
#!/usr/local/bin/perl -w

use strict;

my $initial = "there once was a fish. Its feet were small";
my $post = func($initial);
my $post2 = func($initial);
print "$post\n";

do 'call2.pl';
#eval `cat call2.pl`;
#use CGI::Session;

sub func {
    $_[0] =~ s/there/There/;
    [...]]]></description>
			<content:encoded><![CDATA[<div class='microid-mailto+http:sha1:812a7c86da176fd418e8caf90dfeb28d8cc44ade'><p>With the load-module probe, you can see at what point modules are loaded using &#8216;do&#8217;, &#8216;use&#8217; or &#8216;require&#8217;.</p>
<p>The following code:</p>
<pre>#!/usr/local/bin/perl -w

use strict;

my $initial = "there once was a fish. Its feet were small";
my $post = func($initial);
my $post2 = func($initial);
print "$post\n";

do 'call2.pl';
#eval `cat call2.pl`;
#use CGI::Session;

sub func {
    $_[0] =~ s/there/There/;
    return $_[0];
}</pre>
<p>produces the following output:</p>
<pre> == call1.pl ==========================================================
  perl*::perl_alloc:main-enter
  perl*::perl_alloc:main-exit,  (0/0) (56 uS)
  perl*::perl_construct:main-enter
  perl*::perl_construct:main-exit,  (12/0) (624 uS)
  perl*::perl_parse:main-enter
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; perl*::Perl_utilize:load-module-start (strict)
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; perl*::Perl_ck_require:load-module-start (strict)
&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt; perl*::Perl_ck_require:load-module-end (strict.pm) (3 uS)
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; perl*::Perl_ck_require:load-module-start (Carp)
&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt; perl*::Perl_ck_require:load-module-end (Carp.pm) (2 uS)
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; perl*::Perl_dofile:load-module-start (call2.pl)
&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt; perl*::Perl_dofile:load-module-end (call2.pl) (3 uS)
  perl*::perl_parse:main-exit,  (299/46) (3069 uS)
  perl*::perl_run:main-enter
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; perl*::Perl_utilize:load-module-start (strict)
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; perl*::Perl_ck_require:load-module-start (strict)
&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt; perl*::Perl_ck_require:load-module-end (strict.pm) (3 uS)
  perl*::perl_run:main-exit,  (69/45) (533 uS)
  perl*::perl_destruct:main-enter
  perl*::perl_destruct:main-exit,  (0/3) (24 uS)</pre>
<p>see <a href="http://trac.distributedinformation.com/index.cgi/timeline">my perl5.8 trac</a> for the code -or grab <a href="http://distributedinformation.com/svn/projects/dtrace/perl-5.8.8/">the modified 5.8.8 source from svn</a></p>
<p>the  perl*::Perl_utilize:load-module-end probe is currently being worked on, and I really would like to see the actual parse component of the load separated out.</p>
</div>
<span class="slashdigglicious">
<a href="http://slashdot.org/bookmark.pl?url=http%3A%2F%2Ffosiki.com%2Fblog%2F2008%2F01%2F12%2Fperl-dtrace-load-module-probe-added-see-what-module-is-do-use-or-required%2F&amp;title=Perl+DTrace+load-module+probe+added+%26%238211%3B+see+what+module+is+%26%238216%3Bdo%26%238217%3B%2C+%26%238216%3Buse%26%238217%3B+or+%26%238216%3Brequire%26%238217%3Bd" title="Slashdot It!"><img src="http://slashdot.org/favicon.ico" height="16" width="16" alt="[Slashdot]" /></a>
<a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Ffosiki.com%2Fblog%2F2008%2F01%2F12%2Fperl-dtrace-load-module-probe-added-see-what-module-is-do-use-or-required%2F&amp;title=Perl+DTrace+load-module+probe+added+%26%238211%3B+see+what+module+is+%26%238216%3Bdo%26%238217%3B%2C+%26%238216%3Buse%26%238217%3B+or+%26%238216%3Brequire%26%238217%3Bd" title="Digg This Story"><img src="http://digg.com/favicon.ico" width="16" height="16" alt="[Digg]" /></a>
<a href="http://reddit.com/submit?url=http%3A%2F%2Ffosiki.com%2Fblog%2F2008%2F01%2F12%2Fperl-dtrace-load-module-probe-added-see-what-module-is-do-use-or-required%2F&amp;title=Perl+DTrace+load-module+probe+added+%26%238211%3B+see+what+module+is+%26%238216%3Bdo%26%238217%3B%2C+%26%238216%3Buse%26%238217%3B+or+%26%238216%3Brequire%26%238217%3Bd" title="Reddit"><img src="http://reddit.com/favicon.ico" width="16" height="16" alt="[Reddit]" /></a>
<a href="http://del.icio.us/post?url=http%3A%2F%2Ffosiki.com%2Fblog%2F2008%2F01%2F12%2Fperl-dtrace-load-module-probe-added-see-what-module-is-do-use-or-required%2F&amp;title=Perl+DTrace+load-module+probe+added+%26%238211%3B+see+what+module+is+%26%238216%3Bdo%26%238217%3B%2C+%26%238216%3Buse%26%238217%3B+or+%26%238216%3Brequire%26%238217%3Bd" title="Save to del.icio.us" onclick="window.open('http://del.icio.us/post?v=4&amp;noui&amp;jump=close&amp;url=http%3A%2F%2Ffosiki.com%2Fblog%2F2008%2F01%2F12%2Fperl-dtrace-load-module-probe-added-see-what-module-is-do-use-or-required%2F&amp;title=Perl+DTrace+load-module+probe+added+%26%238211%3B+see+what+module+is+%26%238216%3Bdo%26%238217%3B%2C+%26%238216%3Buse%26%238217%3B+or+%26%238216%3Brequire%26%238217%3Bd', 'delicious', 'toolbar=no,width=700,height=400'); return false;"><img src="http://images.del.icio.us/static/img/delicious.small.gif" width="16" height="16" alt="[del.icio.us]" /></a>
<a href="http://www.facebook.com/share.php?u=http%3A%2F%2Ffosiki.com%2Fblog%2F2008%2F01%2F12%2Fperl-dtrace-load-module-probe-added-see-what-module-is-do-use-or-required%2F" title="Share on Facebook"><img src="http://www.facebook.com/favicon.ico" width="16" height="16" alt="[Facebook]" /></a>
<a href="http://technorati.com/faves?add=http%3A%2F%2Ffosiki.com%2Fblog%2F2008%2F01%2F12%2Fperl-dtrace-load-module-probe-added-see-what-module-is-do-use-or-required%2F" title="Add to my Technorati Favorites"><img src="http://technorati.com/favicon.ico" width="16" height="16" alt="[Technorati]" /></a>
<a href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Ffosiki.com%2Fblog%2F2008%2F01%2F12%2Fperl-dtrace-load-module-probe-added-see-what-module-is-do-use-or-required%2F&amp;title=Perl+DTrace+load-module+probe+added+%26%238211%3B+see+what+module+is+%26%238216%3Bdo%26%238217%3B%2C+%26%238216%3Buse%26%238217%3B+or+%26%238216%3Brequire%26%238217%3Bd" title="Save to Google Bookmarks"><img src="http://www.google.com/favicon.ico" width="16" height="16" alt="[Google]" /></a>
<a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Ffosiki.com%2Fblog%2F2008%2F01%2F12%2Fperl-dtrace-load-module-probe-added-see-what-module-is-do-use-or-required%2F&amp;title=Perl+DTrace+load-module+probe+added+%26%238211%3B+see+what+module+is+%26%238216%3Bdo%26%238217%3B%2C+%26%238216%3Buse%26%238217%3B+or+%26%238216%3Brequire%26%238217%3Bd" title="Stumble it!"><img src="http://www.stumbleupon.com/favicon.ico" width="16" height="16" alt="[StumbleUpon]" /></a>
</span>]]></content:encoded>
			<wfw:commentRss>http://fosiki.com/blog/2008/01/12/perl-dtrace-load-module-probe-added-see-what-module-is-do-use-or-required/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DTrace shows that readable Perl code is fastest.</title>
		<link>http://fosiki.com/blog/2007/12/29/dtrace-shows-that-readable-perl-code-is-fastest/</link>
		<comments>http://fosiki.com/blog/2007/12/29/dtrace-shows-that-readable-perl-code-is-fastest/#comments</comments>
		<pubDate>Sat, 29 Dec 2007 11:16:05 +0000</pubDate>
		<dc:creator>Sven Dowideit</dc:creator>
				<category><![CDATA[dtrace]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[solaris]]></category>
		<category><![CDATA[calling conventions]]></category>
		<category><![CDATA[dtrace probes]]></category>
		<category><![CDATA[style]]></category>

		<guid isPermaLink="false">http://distributedinformation.com/blog/2007/12/29/dtrace-shows-that-readable-perl-code-is-fastest/</guid>
		<description><![CDATA[I always wondered why some people write unreadable Perl. The most common reason given seems to be &#8216;Its faster that way&#8217;.
And so&#8230; using DTrace, and the extra probes (see the subversion repository with a patched Perl 5.8.8) I added, I thought I&#8217;d take a look.

# dtrace -l &#124; grep perl
85614   perl1226   [...]]]></description>
			<content:encoded><![CDATA[<div class='microid-mailto+http:sha1:3276e6add95c70eb49839b8e4f8185a65c531a92'><p>I always wondered why some people write unreadable Perl. The most common reason given seems to be &#8216;Its faster that way&#8217;.</p>
<p>And so&#8230; using DTrace, and the extra probes (see the <a href="http://distributedinformation.com/svn/projects/dtrace/perl-5.8.8/">subversion repository with a patched Perl 5.8.8</a>) I added, I thought I&#8217;d take a look.</p>
<pre style="border-left: 1px solid black; font-size: 8pt; margin-left: 50px; padding-left: 10px">
# dtrace -l | grep perl
85614   perl1226        libperl.so                      Perl_sv_free del_sv
85615   perl1226        libperl.so                   Perl_sv_replace del_sv
85616   perl1226        libperl.so                          perl_run main_enter
85617   perl1226        libperl.so                        perl_parse main_enter
85618   perl1226        libperl.so                     perl_destruct main_enter
85619   perl1226        libperl.so                    perl_construct main_enter
85620   perl1226        libperl.so                        perl_alloc main_enter
85621   perl1226        libperl.so                          perl_run main_exit
85622   perl1226        libperl.so                        perl_parse main_exit
85623   perl1226        libperl.so                     perl_destruct main_exit
85624   perl1226        libperl.so                    perl_construct main_exit
85625   perl1226        libperl.so                        perl_alloc main_exit
85626   perl1226        libperl.so                       Perl_sv_dup new_sv
85627   perl1226        libperl.so                      Perl_newSVrv new_sv
85628   perl1226        libperl.so                      Perl_newSVsv new_sv
85629   perl1226        libperl.so                  Perl_newRV_noinc new_sv
85630   perl1226        libperl.so                      Perl_newSVuv new_sv
85631   perl1226        libperl.so                      Perl_newSViv new_sv
85632   perl1226        libperl.so                      Perl_newSVnv new_sv
85633   perl1226        libperl.so                    Perl_vnewSVpvf new_sv
85634   perl1226        libperl.so               Perl_newSVpvn_share new_sv
85635   perl1226        libperl.so                     Perl_newSVhek new_sv
85636   perl1226        libperl.so                     Perl_newSVpvn new_sv
85637   perl1226        libperl.so                      Perl_newSVpv new_sv
85638   perl1226        libperl.so                 Perl_sv_newmortal new_sv
85639   perl1226        libperl.so                Perl_sv_mortalcopy new_sv
85640   perl1226        libperl.so                        Perl_newSV new_sv
85641   perl1226        libperl.so                      Perl_pp_sort sub-entry
85642   perl1226        libperl.so                   Perl_pp_dbstate sub-entry
85643   perl1226        libperl.so                  Perl_pp_entersub sub-entry
85644   perl1226        libperl.so                      Perl_pp_last sub-return
85645   perl1226        libperl.so                    Perl_pp_return sub-return
85646   perl1226        libperl.so                     Perl_dounwind sub-return
85647   perl1226        libperl.so                Perl_pp_leavesublv sub-return
85648   perl1226        libperl.so                  Perl_pp_leavesub sub-return</pre>
<p>Using these probes, we can write some &#8216;D&#8217; that tells us what Perl is doing at each of its phases &#8211; startup, parsing, execution, and cleanup.</p>
<p>First off, accessing function call parameters:</p>
<p>Given <a href="http://distributedinformation.com/svn/projects/dtrace/blog1/">3 essentially identical programs</a></p>
<pre style="border-left: 1px solid black; font-size: 8pt; margin-left: 50px; padding-left: 10px">
#!/usr/local/bin/perl -Tw

use strict;

my $initial = "there once was a fish. Its feet were small";
my $post = func($initial);
print "$post\n";

sub func {
    $_[0] =~ s/there/There/;
    return $_[0];
}</pre>
<pre style="border-left: 1px solid black; font-size: 8pt; margin-left: 50px; padding-left: 10px">
#!/usr/local/bin/perl -Tw

use strict;

my $initial = "there once was a fish. Its feet were small";
my $post = func($initial);
print "$post\n";

sub func {
    my ($val) = @_;
    $val =~ s/there/There/;
    return $val;
}</pre>
<pre style="border-left: 1px solid black; font-size: 8pt; margin-left: 50px; padding-left: 10px">
#!/usr/local/bin/perl -Tw

use strict;

my $initial = "there once was a fish. Its feet were small";
my $post = func($initial);
print "$post\n";

sub func {
    my $val = shift;
    $val =~ s/there/There/;
    return $val;
}</pre>
<p>There is a myth that using $_[0] is faster, as it doesn&#8217;t create a temporary variable&#8230;<br />
Dtrace (using the <a href="http://distributedinformation.com/svn/projects/dtrace/blog1/perl.d">general perl stats gathering dtrace script</a>) shows this to be untrue:</p>
<pre style="border-left: 1px solid black; font-size: 8pt; margin-left: 50px; padding-left: 10px">
== call1.pl ==========================================================
  perl*::perl_alloc:main_enter
  perl*::perl_alloc:main_exit,  (0/0) (53119 nS)
  perl*::perl_construct:main_enter
  perl*::perl_construct:main_exit,  (12/0) (564370 nS)
  perl*::perl_parse:main_enter
   --&gt; BEGIN, ./call1.pl
    --&gt; bits, /usr/local/lib/perl5/5.8.8/strict.pm
    &lt;-- bits, /usr/local/lib/perl5/5.8.8/strict.pm (3/2) (48060 nS)
    --&gt; import, /usr/local/lib/perl5/5.8.8/strict.pm
    &lt;-- import, /usr/local/lib/perl5/5.8.8/strict.pm (1/0) (15398 nS)
   &lt;-- BEGIN, ./call1.pl (160/80) (1025874 nS)
  perl*::perl_parse:main_exit,  (299/42) (2856399 nS)
  perl*::perl_run:main_enter
   --&gt; func, ./call1.pl
   &lt;-- func, ./call1.pl (1/0) (47723 nS)
  perl*::perl_run:main_exit,  (0/1) (265677 nS)
  perl*::perl_destruct:main_enter
  perl*::perl_destruct:main_exit,  (0/2) (20763 nS)
total, total (0/0) (3789064 nS)
== call2.pl ==========================================================
  perl*::perl_alloc:main_enter
  perl*::perl_alloc:main_exit,  (0/0) (53251 nS)
  perl*::perl_construct:main_enter
  perl*::perl_construct:main_exit,  (12/0) (509684 nS)
  perl*::perl_parse:main_enter
   --&gt; BEGIN, ./call2.pl
    --&gt; bits, /usr/local/lib/perl5/5.8.8/strict.pm
    &lt;-- bits, /usr/local/lib/perl5/5.8.8/strict.pm (3/2) (36748 nS)
    --&gt; import, /usr/local/lib/perl5/5.8.8/strict.pm
    &lt;-- import, /usr/local/lib/perl5/5.8.8/strict.pm (1/0) (9797 nS)
   &lt;-- BEGIN, ./call2.pl (160/80) (924250 nS)
  perl*::perl_parse:main_exit,  (299/38) (2545953 nS)
  perl*::perl_run:main_enter
   --&gt; func, ./call2.pl
   &lt;-- func, ./call2.pl (1/0) (42165 nS)
  perl*::perl_run:main_exit,  (0/1) (142393 nS)
  perl*::perl_destruct:main_enter
  perl*::perl_destruct:main_exit,  (0/2) (20851 nS)
total, total (0/0) (3301007 nS)
== call3.pl ==========================================================
  perl*::perl_alloc:main_enter
  perl*::perl_alloc:main_exit,  (0/0) (52927 nS)
  perl*::perl_construct:main_enter
  perl*::perl_construct:main_exit,  (12/0) (607783 nS)
  perl*::perl_parse:main_enter
   --&gt; BEGIN, ./call3.pl
    --&gt; bits, /usr/local/lib/perl5/5.8.8/strict.pm
    &lt;-- bits, /usr/local/lib/perl5/5.8.8/strict.pm (3/2) (37066 nS)
    --&gt; import, /usr/local/lib/perl5/5.8.8/strict.pm
    &lt;-- import, /usr/local/lib/perl5/5.8.8/strict.pm (1/0) (10171 nS)
   &lt;-- BEGIN, ./call3.pl (160/80) (924824 nS)
  perl*::perl_parse:main_exit,  (297/37) (2543981 nS)
  perl*::perl_run:main_enter
   --&gt; func, ./call3.pl
   &lt;-- func, ./call3.pl (1/0) (41833 nS)
  perl*::perl_run:main_exit,  (0/1) (140527 nS)
  perl*::perl_destruct:main_enter
  perl*::perl_destruct:main_exit,  (0/2) (20273 nS)
total, total (0/0) (3395310 nS)

allocations / deallocations:
     474 /      122 call3.pl
     476 /      123 call2.pl
     476 /      127 call1.pl</pre>
<p>Counting up the number of allocations and deallocations in the (0/1) output &#8211; and<br />
&#8220;&lt;&#8211; func, ./call2.pl (1/0) &#8221; is always the same&#8230; one allocation.</p>
<p>After all the test runs, I also print out the total allocations for the script,<br />
and it seems that the &#8220;my $val = shift&#8221; version is the most efficient -<br />
using two fewer allocations (apparently during the parse phase).</p>
<p>The deallocation count is interesting too &#8211; with &#8220;$_[0]&#8221; using 5 more deallocations during<br />
the parse phase and &#8220;my ($val) = @_;&#8221; using one more than the &#8220;my $val = shift&#8221; option.</p>
<p>In an attempt to reduce the allocations doesn&#8217;t seem to help &#8211; the following code resulting in 474 allocations,<br />
shift case, but with 3 extra deallocations, again in the parsing phase. Increasing the number of times that func<br />
is called only increases the benefits of using shift.</p>
<pre style="border-left: 1px solid black; font-size: 8pt; margin-left: 50px; padding-left: 10px">
#!/usr/local/bin/perl -Tw

use strict;

my $initial = "there once was a fish. Its feet were small";
$_ = $initial;
my $post = func();
print "$post\n";

sub func {
    s/there/There/;
    return $_;
}</pre>
<p>Interestingly, &#8220;my $val = shift&#8221;  is not only the fastest of the conventions tested, but it also seems that none of the conventions tested cause allocations at run time &#8211; they are all done during the parse phase. I guess I&#8217;ll have to construct a more complex case, using references / hashes &#8211; next time <img src='http://fosiki.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
</div>
<span class="slashdigglicious">
<a href="http://slashdot.org/bookmark.pl?url=http%3A%2F%2Ffosiki.com%2Fblog%2F2007%2F12%2F29%2Fdtrace-shows-that-readable-perl-code-is-fastest%2F&amp;title=DTrace+shows+that+readable+Perl+code+is+fastest." title="Slashdot It!"><img src="http://slashdot.org/favicon.ico" height="16" width="16" alt="[Slashdot]" /></a>
<a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Ffosiki.com%2Fblog%2F2007%2F12%2F29%2Fdtrace-shows-that-readable-perl-code-is-fastest%2F&amp;title=DTrace+shows+that+readable+Perl+code+is+fastest." title="Digg This Story"><img src="http://digg.com/favicon.ico" width="16" height="16" alt="[Digg]" /></a>
<a href="http://reddit.com/submit?url=http%3A%2F%2Ffosiki.com%2Fblog%2F2007%2F12%2F29%2Fdtrace-shows-that-readable-perl-code-is-fastest%2F&amp;title=DTrace+shows+that+readable+Perl+code+is+fastest." title="Reddit"><img src="http://reddit.com/favicon.ico" width="16" height="16" alt="[Reddit]" /></a>
<a href="http://del.icio.us/post?url=http%3A%2F%2Ffosiki.com%2Fblog%2F2007%2F12%2F29%2Fdtrace-shows-that-readable-perl-code-is-fastest%2F&amp;title=DTrace+shows+that+readable+Perl+code+is+fastest." title="Save to del.icio.us" onclick="window.open('http://del.icio.us/post?v=4&amp;noui&amp;jump=close&amp;url=http%3A%2F%2Ffosiki.com%2Fblog%2F2007%2F12%2F29%2Fdtrace-shows-that-readable-perl-code-is-fastest%2F&amp;title=DTrace+shows+that+readable+Perl+code+is+fastest.', 'delicious', 'toolbar=no,width=700,height=400'); return false;"><img src="http://images.del.icio.us/static/img/delicious.small.gif" width="16" height="16" alt="[del.icio.us]" /></a>
<a href="http://www.facebook.com/share.php?u=http%3A%2F%2Ffosiki.com%2Fblog%2F2007%2F12%2F29%2Fdtrace-shows-that-readable-perl-code-is-fastest%2F" title="Share on Facebook"><img src="http://www.facebook.com/favicon.ico" width="16" height="16" alt="[Facebook]" /></a>
<a href="http://technorati.com/faves?add=http%3A%2F%2Ffosiki.com%2Fblog%2F2007%2F12%2F29%2Fdtrace-shows-that-readable-perl-code-is-fastest%2F" title="Add to my Technorati Favorites"><img src="http://technorati.com/favicon.ico" width="16" height="16" alt="[Technorati]" /></a>
<a href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Ffosiki.com%2Fblog%2F2007%2F12%2F29%2Fdtrace-shows-that-readable-perl-code-is-fastest%2F&amp;title=DTrace+shows+that+readable+Perl+code+is+fastest." title="Save to Google Bookmarks"><img src="http://www.google.com/favicon.ico" width="16" height="16" alt="[Google]" /></a>
<a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Ffosiki.com%2Fblog%2F2007%2F12%2F29%2Fdtrace-shows-that-readable-perl-code-is-fastest%2F&amp;title=DTrace+shows+that+readable+Perl+code+is+fastest." title="Stumble it!"><img src="http://www.stumbleupon.com/favicon.ico" width="16" height="16" alt="[StumbleUpon]" /></a>
</span>]]></content:encoded>
			<wfw:commentRss>http://fosiki.com/blog/2007/12/29/dtrace-shows-that-readable-perl-code-is-fastest/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A new begining for Perl and DTrace?</title>
		<link>http://fosiki.com/blog/2007/12/19/a-new-begining-for-perl-and-dtrace/</link>
		<comments>http://fosiki.com/blog/2007/12/19/a-new-begining-for-perl-and-dtrace/#comments</comments>
		<pubDate>Wed, 19 Dec 2007 09:02:19 +0000</pubDate>
		<dc:creator>Sven Dowideit</dc:creator>
				<category><![CDATA[dtrace]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[solaris]]></category>

		<guid isPermaLink="false">http://distributedinformation.com/blog/2007/12/19/a-new-begining-for-perl-and-dtrace/</guid>
		<description><![CDATA[I&#8217;ve just created a subversion repository with perl 5.8.8, and the accumulated DTrace patches &#8211; including the using is-enabled to reduce the performance impact of the Probes when disabled. Byran and I, (and anyone else that would like to help) will be working slowly towards making Perl a first class DTrace citizen over the coming [...]]]></description>
			<content:encoded><![CDATA[<div class='microid-mailto+http:sha1:15ef432a569f0c064cff42698398e10e35858dae'><p>I&#8217;ve just created a <a href="http://distributedinformation.com/svn/projects/dtrace/" title="Perl 5.8.8 with DTrace">subversion repository</a> with perl 5.8.8, and the accumulated DTrace patches &#8211; including the using is-enabled to reduce the performance impact of the Probes when disabled. <a href="http://mirrorshades.org/overflow/">Byran</a> and I, (and anyone else that would like to help) will be working slowly towards making Perl a first class DTrace citizen over the coming months. Next stop &#8211; <a href="http://gisle.aas.no/perl/illguts/">Perl Guts Illustrated</a></p>
<p>Of course, we&#8217;ll also port it all to Perl 5.10 &#8211; the 20th anniversary release <img src='http://fosiki.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
</div>
<span class="slashdigglicious">
<a href="http://slashdot.org/bookmark.pl?url=http%3A%2F%2Ffosiki.com%2Fblog%2F2007%2F12%2F19%2Fa-new-begining-for-perl-and-dtrace%2F&amp;title=A+new+begining+for+Perl+and+DTrace%3F" title="Slashdot It!"><img src="http://slashdot.org/favicon.ico" height="16" width="16" alt="[Slashdot]" /></a>
<a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Ffosiki.com%2Fblog%2F2007%2F12%2F19%2Fa-new-begining-for-perl-and-dtrace%2F&amp;title=A+new+begining+for+Perl+and+DTrace%3F" title="Digg This Story"><img src="http://digg.com/favicon.ico" width="16" height="16" alt="[Digg]" /></a>
<a href="http://reddit.com/submit?url=http%3A%2F%2Ffosiki.com%2Fblog%2F2007%2F12%2F19%2Fa-new-begining-for-perl-and-dtrace%2F&amp;title=A+new+begining+for+Perl+and+DTrace%3F" title="Reddit"><img src="http://reddit.com/favicon.ico" width="16" height="16" alt="[Reddit]" /></a>
<a href="http://del.icio.us/post?url=http%3A%2F%2Ffosiki.com%2Fblog%2F2007%2F12%2F19%2Fa-new-begining-for-perl-and-dtrace%2F&amp;title=A+new+begining+for+Perl+and+DTrace%3F" title="Save to del.icio.us" onclick="window.open('http://del.icio.us/post?v=4&amp;noui&amp;jump=close&amp;url=http%3A%2F%2Ffosiki.com%2Fblog%2F2007%2F12%2F19%2Fa-new-begining-for-perl-and-dtrace%2F&amp;title=A+new+begining+for+Perl+and+DTrace%3F', 'delicious', 'toolbar=no,width=700,height=400'); return false;"><img src="http://images.del.icio.us/static/img/delicious.small.gif" width="16" height="16" alt="[del.icio.us]" /></a>
<a href="http://www.facebook.com/share.php?u=http%3A%2F%2Ffosiki.com%2Fblog%2F2007%2F12%2F19%2Fa-new-begining-for-perl-and-dtrace%2F" title="Share on Facebook"><img src="http://www.facebook.com/favicon.ico" width="16" height="16" alt="[Facebook]" /></a>
<a href="http://technorati.com/faves?add=http%3A%2F%2Ffosiki.com%2Fblog%2F2007%2F12%2F19%2Fa-new-begining-for-perl-and-dtrace%2F" title="Add to my Technorati Favorites"><img src="http://technorati.com/favicon.ico" width="16" height="16" alt="[Technorati]" /></a>
<a href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Ffosiki.com%2Fblog%2F2007%2F12%2F19%2Fa-new-begining-for-perl-and-dtrace%2F&amp;title=A+new+begining+for+Perl+and+DTrace%3F" title="Save to Google Bookmarks"><img src="http://www.google.com/favicon.ico" width="16" height="16" alt="[Google]" /></a>
<a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Ffosiki.com%2Fblog%2F2007%2F12%2F19%2Fa-new-begining-for-perl-and-dtrace%2F&amp;title=A+new+begining+for+Perl+and+DTrace%3F" title="Stumble it!"><img src="http://www.stumbleupon.com/favicon.ico" width="16" height="16" alt="[StumbleUpon]" /></a>
</span>]]></content:encoded>
			<wfw:commentRss>http://fosiki.com/blog/2007/12/19/a-new-begining-for-perl-and-dtrace/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DTrace, Perl and TWiki &#8211; on Solaris</title>
		<link>http://fosiki.com/blog/2007/12/14/dtrace-perl-and-twiki-on-solaris/</link>
		<comments>http://fosiki.com/blog/2007/12/14/dtrace-perl-and-twiki-on-solaris/#comments</comments>
		<pubDate>Fri, 14 Dec 2007 03:36:10 +0000</pubDate>
		<dc:creator>Sven Dowideit</dc:creator>
				<category><![CDATA[dtrace]]></category>
		<category><![CDATA[new]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[solaris]]></category>
		<category><![CDATA[twiki]]></category>

		<guid isPermaLink="false">http://distributedinformation.com/blog/2007/12/14/dtrace-perl-and-twiki-on-solaris/</guid>
		<description><![CDATA[I&#8217;ve been promising myself some time to try  out DTrace on TWiki&#8217;s codebase for over a year. By following Bryan Allen&#8217;s
instructions using Richard Dawe&#8217;s adaption of Alan Burlison&#8217;s work&#8230; I now have a Perl 5.8.8 with DTrace probes.
Sounds great, except for one thing&#8230;. I now have to learn enough about DTrace to use it [...]]]></description>
			<content:encoded><![CDATA[<div class='microid-mailto+http:sha1:7335ce60101f6180e82032e076d688628e1ad7e6'><p>I&#8217;ve been promising myself some time to try  out DTrace on TWiki&#8217;s codebase for over a year. By following <a href="http://mirrorshades.org/overflow/2007/10/perl_and_dtrace.shtml" title="Perl and DTrace">Bryan Allen&#8217;s</a><br />
instructions using <a href="http://richdawe.livejournal.com/">Richard Dawe&#8217;s</a> adaption of <a href="http://blogs.sun.com/alanbur/entry/dtrace_and_perl" title="DTrace and Perl">Alan Burlison&#8217;s</a> work&#8230; I now have a Perl 5.8.8 with DTrace probes.</p>
<p>Sounds great, except for one thing&#8230;. I now have to learn enough about DTrace to use it <img src='http://fosiki.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  The patch that Alan and Richard have (or at least their DTrace scripts) seem to require a priori knowledge of the Perl process&#8217; pid&#8230; not something thats going to work out for what I want to do.</p>
<p>For a quick test, DTrace -c ./view -s /export/home/sven/src/dtrace/subs-tree.d does show the program flow.</p>
<p>The following is while running some perl scripts &#8211;  the 2 numbers are their pids.</p>
<pre># dtrace -l | grep -i perl</pre>
<pre>17803  perl17669        libperl.so                      Perl_pp_sort sub-entry</pre>
<pre>17804  perl17669        libperl.so                   Perl_pp_dbstate sub-entry</pre>
<pre>17805  perl17669        libperl.so                  Perl_pp_entersub sub-entry</pre>
<pre>17806  perl17669        libperl.so                      Perl_pp_last sub-return</pre>
<pre>17807  perl17669        libperl.so                    Perl_pp_return sub-return</pre>
<pre>17808  perl17669        libperl.so                     Perl_dounwind sub-return</pre>
<pre>17809  perl17669        libperl.so                Perl_pp_leavesublv sub-return</pre>
<pre>17810  perl17669        libperl.so                  Perl_pp_leavesub sub-return</pre>
<pre>88501  perl17760        libperl.so                      Perl_pp_sort sub-entry</pre>
<pre>88502  perl17760        libperl.so                   Perl_pp_dbstate sub-entry</pre>
<pre>88503  perl17760        libperl.so                  Perl_pp_entersub sub-entry</pre>
<pre>88504  perl17760        libperl.so                      Perl_pp_last sub-return</pre>
<pre>88505  perl17760        libperl.so                    Perl_pp_return sub-return</pre>
<pre>88506  perl17760        libperl.so                     Perl_dounwind sub-return</pre>
<pre>88507  perl17760        libperl.so                Perl_pp_leavesublv sub-return</pre>
<pre>88508  perl17760        libperl.so                  Perl_pp_leavesub sub-return</pre>
<p>so&#8230; first ignorant modification &#8211;  in subs-tree.d, it wants to trace perl$target:::sub-entry &#8211; change that to perl*:::sub-entry, and of course, it works exactly as I want &#8211; attaches to all subsequent perl process (running my dtrace-perl build) and tells me whats going on. The only caveat being that the DTrace script will only start if there is a Perl process running &#8211; the provider is obviously not persistent.</p>
<p>Brilliant!</p>
<p>Should be a fun Christmas holiday adventure &#8211; 410 pages of dtrace book, and a myriad of web pages to consume and digest.</p>
</div>
<span class="slashdigglicious">
<a href="http://slashdot.org/bookmark.pl?url=http%3A%2F%2Ffosiki.com%2Fblog%2F2007%2F12%2F14%2Fdtrace-perl-and-twiki-on-solaris%2F&amp;title=DTrace%2C+Perl+and+TWiki+%26%238211%3B+on+Solaris" title="Slashdot It!"><img src="http://slashdot.org/favicon.ico" height="16" width="16" alt="[Slashdot]" /></a>
<a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Ffosiki.com%2Fblog%2F2007%2F12%2F14%2Fdtrace-perl-and-twiki-on-solaris%2F&amp;title=DTrace%2C+Perl+and+TWiki+%26%238211%3B+on+Solaris" title="Digg This Story"><img src="http://digg.com/favicon.ico" width="16" height="16" alt="[Digg]" /></a>
<a href="http://reddit.com/submit?url=http%3A%2F%2Ffosiki.com%2Fblog%2F2007%2F12%2F14%2Fdtrace-perl-and-twiki-on-solaris%2F&amp;title=DTrace%2C+Perl+and+TWiki+%26%238211%3B+on+Solaris" title="Reddit"><img src="http://reddit.com/favicon.ico" width="16" height="16" alt="[Reddit]" /></a>
<a href="http://del.icio.us/post?url=http%3A%2F%2Ffosiki.com%2Fblog%2F2007%2F12%2F14%2Fdtrace-perl-and-twiki-on-solaris%2F&amp;title=DTrace%2C+Perl+and+TWiki+%26%238211%3B+on+Solaris" title="Save to del.icio.us" onclick="window.open('http://del.icio.us/post?v=4&amp;noui&amp;jump=close&amp;url=http%3A%2F%2Ffosiki.com%2Fblog%2F2007%2F12%2F14%2Fdtrace-perl-and-twiki-on-solaris%2F&amp;title=DTrace%2C+Perl+and+TWiki+%26%238211%3B+on+Solaris', 'delicious', 'toolbar=no,width=700,height=400'); return false;"><img src="http://images.del.icio.us/static/img/delicious.small.gif" width="16" height="16" alt="[del.icio.us]" /></a>
<a href="http://www.facebook.com/share.php?u=http%3A%2F%2Ffosiki.com%2Fblog%2F2007%2F12%2F14%2Fdtrace-perl-and-twiki-on-solaris%2F" title="Share on Facebook"><img src="http://www.facebook.com/favicon.ico" width="16" height="16" alt="[Facebook]" /></a>
<a href="http://technorati.com/faves?add=http%3A%2F%2Ffosiki.com%2Fblog%2F2007%2F12%2F14%2Fdtrace-perl-and-twiki-on-solaris%2F" title="Add to my Technorati Favorites"><img src="http://technorati.com/favicon.ico" width="16" height="16" alt="[Technorati]" /></a>
<a href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Ffosiki.com%2Fblog%2F2007%2F12%2F14%2Fdtrace-perl-and-twiki-on-solaris%2F&amp;title=DTrace%2C+Perl+and+TWiki+%26%238211%3B+on+Solaris" title="Save to Google Bookmarks"><img src="http://www.google.com/favicon.ico" width="16" height="16" alt="[Google]" /></a>
<a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Ffosiki.com%2Fblog%2F2007%2F12%2F14%2Fdtrace-perl-and-twiki-on-solaris%2F&amp;title=DTrace%2C+Perl+and+TWiki+%26%238211%3B+on+Solaris" title="Stumble it!"><img src="http://www.stumbleupon.com/favicon.ico" width="16" height="16" alt="[StumbleUpon]" /></a>
</span>]]></content:encoded>
			<wfw:commentRss>http://fosiki.com/blog/2007/12/14/dtrace-perl-and-twiki-on-solaris/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic page generated in 0.396 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2010-03-17 03:47:29 -->
