<?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>某人的栖息地 &#187; xdebug</title>
	<atom:link href="http://www.ooso.net/tag/xdebug/feed" rel="self" type="application/rss+xml" />
	<link>http://www.ooso.net</link>
	<description>Linux + Apache + Mysql + Php + Flash</description>
	<lastBuildDate>Thu, 19 Jan 2012 01:21:44 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>查看xdebug profile文件的几个程序</title>
		<link>http://www.ooso.net/archives/397</link>
		<comments>http://www.ooso.net/archives/397#comments</comments>
		<pubDate>Tue, 13 May 2008 02:07:09 +0000</pubDate>
		<dc:creator>Volcano</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[xdebug]]></category>
		<category><![CDATA[优化]]></category>

		<guid isPermaLink="false">http://www.ooso.net/index.php/archives/397</guid>
		<description><![CDATA[在优化php代码执行效率过程中，有个好办法是利用xdebug生成profile文件，然后查看整个程序的瓶颈在哪里。现在xdebug profile的查看程序有好几个，在这里罗列一下.
Wincachegrind
Wincachegrind是windows下的profile查看程序，使用起来感觉还不错，profile文件太大的话偶尔会崩溃。
今天在高春辉的博客上看到这些:

				<span class="readmore"><a href="http://www.ooso.net/archives/397" title="查看xdebug profile文件的几个程序">阅读全文（1264字）</a></span>]]></description>
			<content:encoded><![CDATA[<p>在优化php代码执行效率过程中，有个好办法是利用<a href="/?tag=xdebug">xdebug</a>生成profile文件，然后查看整个程序的瓶颈在哪里。现在xdebug profile的查看程序有好几个，在这里罗列一下.</p>
<h3>Wincachegrind</h3>
<p><a href="http://sourceforge.net/project/showfiles.php?group_id=135562">Wincachegrind</a>是windows下的profile查看程序，使用起来感觉还不错，profile文件太大的话偶尔会崩溃。</p>
<p>今天在<a href="http://www.paulgao.com.cn/index.php?itemid=134">高春辉的博客</a>上看到这些:</p>
<blockquote><p>最近又开始拿 Xdebug 和 wincachegrind 对项目的 PHP 代码进行分析和优化，但是发现和自己输出的执行时间总是相差十倍，差的不是零头，而是十倍。<br />
上网搜索了一下，原来在 Xdebug 2.0.0RC4 版本开始，对 profiler 日志中的时间单位进行了修改。<br />
（“Use µ seconds instead of a tenths of µ seconds to avoid confusion in profile information. ”）<br />
而 wincachegrind 又不再升级维护了，所以凡是用 2.0.0RC4 以及之后版本的 Xdebug 输出的 profiler 日志用 wincachegrind 来分析的话，都会有十倍的时间差距。</p></blockquote>
<p>他已经提供了hack后的版本，可以解决时间差距的问题，有兴趣的同学可以试试。</p>
<h3>CachegrindVisualizer</h3>
<p><a href="http://code.google.com/p/cachegrindvisualizer/">CachegrindVisualizer</a>是一个xdebug的profile文件查看客户端,采用Adobe的<a href="/?tag=air">AIR</a>制作。</p>
<p>更详细的介绍可以看以前写的<a href="http://www.ooso.net/index.php/archives/338">关于CachegrindVisualizer的介绍</a>。</p>
<h3>Kcachegrind</h3>
<p>Kcachegrind是linux下的一个图形化profile查看工具，功能很强劲。</p>
<blockquote><p>Callgrind uses runtime instrumentation via the Valgrind framework for its cache simulation and call-graph generation. This way, even shared libraries and dynamically opened plugins can be profiled. The data files generated by Callgrind can be loaded into KCachegrind for browsing the performance results.</p></blockquote>
<h3>webgrind</h3>
<p><a href="http://code.google.com/p/webgrind/">webgrind</a>和wincachegrind的功能差不多，但是webgrind是基于web的，采用php写的查看工具。看了一下代码，跑在linux的服务器比较好。</p>
<blockquote><p>Webgrind is an Xdebug profiling web frontend in PHP5. It implements only a minimal subset of the features of kcachegrind, but installs in seconds and works on all platforms. For quick&#8217;n'dirty optimizations it does the job. </p></blockquote>
<p>下面是用webgrind查看phpmyadmin的profile抓图：<br />
<a href="http://jokke.dk/media/2008-webgrind/webgrind_large.png"><img src="http://jokke.dk/media/2008-webgrind/webgrind_small.png" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ooso.net/archives/397/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>CachegrindVisualizer</title>
		<link>http://www.ooso.net/archives/338</link>
		<comments>http://www.ooso.net/archives/338#comments</comments>
		<pubDate>Mon, 28 Jan 2008 04:35:50 +0000</pubDate>
		<dc:creator>Volcano</dc:creator>
				<category><![CDATA[flash]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[air]]></category>
		<category><![CDATA[xdebug]]></category>

		<guid isPermaLink="false">http://www.ooso.net/index.php/archives/338</guid>
		<description><![CDATA[CachegrindVisualizer是一个xdebug的profile文件查看客户端,采用Adobe的AIR制作,很让人惊讶,因为目前我看到的采用AIR制作的软件少的可怜.
与CachegrindVisualizer具有类似功能的软件还有wincachegrind,相比之下,wincachegrind的功能更为强大,使用上也更方便.但是即便如此,我还是乐见CachegrindVisualizer发展的更好.
CachegrindVisualizer支持的操作系统
Windows 2000 SP4, Windows XP SP2, Windows Vista Home and Ultimate Edition, Mac OS 10.4.7 and above (Intel and PowerPC), Mac OS X Leopard.

				<span class="readmore"><a href="http://www.ooso.net/archives/338" title="CachegrindVisualizer">阅读全文（375字）</a></span>]]></description>
			<content:encoded><![CDATA[<p><a href="http://code.google.com/p/cachegrindvisualizer/">CachegrindVisualizer</a>是一个<a href="/index.php?tag=xdebug">xdebug</a>的profile文件查看客户端,采用Adobe的<a href="/index.php?tag=air">AIR</a>制作,很让人惊讶,因为目前我看到的采用AIR制作的软件少的可怜.</p>
<p>与CachegrindVisualizer具有类似功能的软件还有wincachegrind,相比之下,wincachegrind的功能更为强大,使用上也更方便.但是即便如此,我还是乐见CachegrindVisualizer发展的更好.</p>
<h2>CachegrindVisualizer支持的操作系统</h2>
<p>Windows 2000 SP4, Windows XP SP2, Windows Vista Home and Ultimate Edition, Mac OS 10.4.7 and above (Intel and PowerPC), Mac OS X Leopard.</p>
<h2>运行时的抓图</h2>
<p><img src="http://cachegrindvisualizer.googlecode.com/files/p_CachegrindVisualizer-0.5.2-screenshot.png" alt="CachegrindVisualizer" /></p>
<h2>相关连接</h2>
<ul>
<li><a href="http://labs.adobe.com/downloads/air.html">AIR RUNTIME下载</a></li>
<li><a href="http://xdebug.org">xdebug</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.ooso.net/archives/338/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>ubuntu下安装xdebug的笔记</title>
		<link>http://www.ooso.net/archives/360</link>
		<comments>http://www.ooso.net/archives/360#comments</comments>
		<pubDate>Sun, 22 Jul 2007 04:27:18 +0000</pubDate>
		<dc:creator>Volcano</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[xdebug]]></category>

		<guid isPermaLink="false">http://www.ooso.net/index.php/archives/360</guid>
		<description><![CDATA[在ubuntu下安装xdebug的笔记。

下载xdebug 2.0: http://www.xdebug.org/link.php?url=xdebug200 
解压:

				<span class="readmore"><a href="http://www.ooso.net/archives/360" title="ubuntu下安装xdebug的笔记">阅读全文（340字）</a></span>]]></description>
			<content:encoded><![CDATA[<p>在ubuntu下安装xdebug的笔记。</p>
<ul>
<li>下载xdebug 2.0: http://www.xdebug.org/link.php?url=xdebug200 </li>
<li>解压:
<pre><code>tar xzvf xdebug-2.0.0.tgz</code></pre>
</li>
<li>编译安装：
<pre><code>cd xdebug-2.0.0
phpize
./configure --enable-xdebug
make
cp modules/xdebug.so /usr/lib/php5/20051025/</code></pre>
<p>这里的/usr/lib/php5/20051025/是我的php extension_dir目录
</li>
<li>修改配置文件php.ini，添加一行
<pre><code>zend_extension="/wherever/you/put/it/xdebug.so"</code></pre>
</li>
<li>重启apache</li>
</ul>
<p>顺便贴个 <a href="http://www.ooso.net/index.php/archives/272">ubuntu下安装php5 + pdo</a> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.ooso.net/archives/360/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>用xdebug优化php的三个小窍门</title>
		<link>http://www.ooso.net/archives/359</link>
		<comments>http://www.ooso.net/archives/359#comments</comments>
		<pubDate>Sun, 22 Jul 2007 02:25:42 +0000</pubDate>
		<dc:creator>Volcano</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[xdebug]]></category>
		<category><![CDATA[优化]]></category>

		<guid isPermaLink="false">http://www.ooso.net/index.php/archives/359</guid>
		<description><![CDATA[xdebug的2.0正式版已经发布了。这个工具用在php的代码调试，优化方面效果很不错。下面贴上俺使用过程中的几个小窍门。

xdebug生成profile文件，可以用KCachegrind来查看，但是这个工具只在linux下面可用，没有windows下的版本。这里推荐一个win下的免费工具——wincachegrind，也可以查看xdebug的profile文件，用来分析php代码运行情况足够用了（偶尔不太稳定）。
xdebug一般情况下只会对一个请求做profile记录，如果需要查看几个请求的运行情况合集，可以设置xdebug.ini的

				<span class="readmore"><a href="http://www.ooso.net/archives/359" title="用xdebug优化php的三个小窍门">阅读全文（552字）</a></span>]]></description>
			<content:encoded><![CDATA[<p><a href="/du/index.php?tag=xdebug">xdebug</a>的2.0正式版已经发布了。这个工具用在php的代码调试，优化方面效果很不错。下面贴上俺使用过程中的几个小窍门。</p>
<ul>
<li>xdebug生成profile文件，可以用KCachegrind来查看，但是这个工具只在linux下面可用，没有windows下的版本。这里推荐一个win下的免费工具——<a href="http://sourceforge.net/project/showfiles.php?group_id=135562">wincachegrind</a>，也可以查看xdebug的profile文件，用来分析php代码运行情况足够用了（偶尔不太稳定）。</li>
<li>xdebug一般情况下只会对一个请求做profile记录，如果需要查看几个请求的运行情况合集，可以设置xdebug.ini的
<pre><code>xdebug.profiler_aggregate = 1</code></pre>
<p>记得重启你的apache。</li>
<li>如果在xdebug.ini里设置了
<pre><code>xdebug.profiler_enable = 1</code></pre>
<p>那么每次程序运行期间xdebug都会记录profile，这样对程序的运行速度有很大的影响。为了避免这一情况发生，可以让xdebug仅在需要的时候运行——设置
<pre><code>xdebug.profiler_enable_trigger = 1</code></pre>
<p>这样，只有你用get/post方式提交XDEBUG_PROFILE变量的情况下，xdebug才会开始干活。</li>
</ul>
<p>另:将最新版本的<a href="http://www.xdebug.org">xdebug</a>和APC同时使用，没有出现兼容性问题，运行良好。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ooso.net/archives/359/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

