<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: Poor man&#8217;s contention profiling</title>
	<atom:link href="http://dom.as/2009/02/15/poor-mans-contention-profiling/feed/" rel="self" type="application/rss+xml" />
	<link>http://dom.as/2009/02/15/poor-mans-contention-profiling/</link>
	<description></description>
	<lastBuildDate>Sat, 17 Dec 2011 20:14:59 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Mark Callaghan</title>
		<link>http://dom.as/2009/02/15/poor-mans-contention-profiling/#comment-1474</link>
		<dc:creator><![CDATA[Mark Callaghan]]></dc:creator>
		<pubDate>Wed, 18 Feb 2009 18:40:42 +0000</pubDate>
		<guid isPermaLink="false">http://dammit.lt/?p=378#comment-1474</guid>
		<description><![CDATA[I modified the script to prepend the thread id to each comma-separated stack so that I can only look at traces for specific threads. This works great as I want to know where a thread spends all time (CPU, blocked on mutex, blocked on IO).]]></description>
		<content:encoded><![CDATA[<p>I modified the script to prepend the thread id to each comma-separated stack so that I can only look at traces for specific threads. This works great as I want to know where a thread spends all time (CPU, blocked on mutex, blocked on IO).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark Callaghan</title>
		<link>http://dom.as/2009/02/15/poor-mans-contention-profiling/#comment-1473</link>
		<dc:creator><![CDATA[Mark Callaghan]]></dc:creator>
		<pubDate>Sun, 15 Feb 2009 18:35:57 +0000</pubDate>
		<guid isPermaLink="false">http://dammit.lt/?p=378#comment-1473</guid>
		<description><![CDATA[And the full script
# mpid = mysqld pid
mpid=15739 ; nsamples=1; sleeptime=1;
for x in $( seq 0 $nsamples) ; do
  gdb  -ex &quot;set pagination 0&quot; -ex &quot;thread apply all bt&quot; --batch -p $mpid
  sleep $sleeptime
done &#124; \
awk &#039;BEGIN { s = &quot;&quot;; }  /Thread/ { print s; s = &quot;&quot;; } /^\#/ { if (s != &quot;&quot; ) { s = s &quot;,&quot; $4} else { s = $4 } } END { print s }&#039; -  &#124; \
sort &#124; uniq -c &#124; sort -r -n -k 1,1]]></description>
		<content:encoded><![CDATA[<p>And the full script<br />
# mpid = mysqld pid<br />
mpid=15739 ; nsamples=1; sleeptime=1;<br />
for x in $( seq 0 $nsamples) ; do<br />
  gdb  -ex &#8220;set pagination 0&#8243; -ex &#8220;thread apply all bt&#8221; &#8211;batch -p $mpid<br />
  sleep $sleeptime<br />
done | \<br />
awk &#8216;BEGIN { s = &#8220;&#8221;; }  /Thread/ { print s; s = &#8220;&#8221;; } /^\#/ { if (s != &#8220;&#8221; ) { s = s &#8220;,&#8221; $4} else { s = $4 } } END { print s }&#8217; &#8211;  | \<br />
sort | uniq -c | sort -r -n -k 1,1</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark Callaghan</title>
		<link>http://dom.as/2009/02/15/poor-mans-contention-profiling/#comment-1472</link>
		<dc:creator><![CDATA[Mark Callaghan]]></dc:creator>
		<pubDate>Sun, 15 Feb 2009 18:27:34 +0000</pubDate>
		<guid isPermaLink="false">http://dammit.lt/?p=378#comment-1472</guid>
		<description><![CDATA[Collapse the call stacks into strings with this:
BEGIN { s = &quot;&quot;; }
/Thread/ { print s; s = &quot;&quot;; }
/^\#/ { if (s != &quot;&quot; ) { s = s &quot;,&quot; $4} else { s = $4 } }
END { print s }

And then aggregate the result with: &#039;sort &#124; uniq -c&#039;]]></description>
		<content:encoded><![CDATA[<p>Collapse the call stacks into strings with this:<br />
BEGIN { s = &#8220;&#8221;; }<br />
/Thread/ { print s; s = &#8220;&#8221;; }<br />
/^\#/ { if (s != &#8220;&#8221; ) { s = s &#8220;,&#8221; $4} else { s = $4 } }<br />
END { print s }</p>
<p>And then aggregate the result with: &#8216;sort | uniq -c&#8217;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark Callaghan</title>
		<link>http://dom.as/2009/02/15/poor-mans-contention-profiling/#comment-1471</link>
		<dc:creator><![CDATA[Mark Callaghan]]></dc:creator>
		<pubDate>Sun, 15 Feb 2009 18:07:01 +0000</pubDate>
		<guid isPermaLink="false">http://dammit.lt/?p=378#comment-1471</guid>
		<description><![CDATA[Domas,
You need to share the 20 lines of Perl/Python/Awk.]]></description>
		<content:encoded><![CDATA[<p>Domas,<br />
You need to share the 20 lines of Perl/Python/Awk.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

