<p>I'm looking for a profiler in order to find the bottleneck in my C++ code. I'd like to find a free, non-intrusive, and good profiling tool. I'm a game developer, and I use PIX for Xbox&nbsp;360 and found it very good, but it's not free. I know the Intel <a href="https://en.wikipedia.org/wiki/VTune" rel="noreferrer">VTune</a>, but it's not free either.</p>

[{'answer_id': 67577, 'author': 'yrp', 'author_id': 7228, 'author_profile': 'https://Stackoverflow.com/users/7228', 'pm_score': 8, 'selected': True, 'text': '<p><a href="https://gpuopen.com/archived/legacy-codexl/" rel="nofollow noreferrer">CodeXL</a> has now superseded the End Of Line\'d <a href="https://web.archive.org/web/20120607044224/http://developer.amd.com/tools/CodeAnalyst/Pages/default.aspx" rel="nofollow noreferrer">AMD Code Analyst</a> and both are free, but not as advanced as VTune.</p>\n<p>There\'s also <a href="http://www.codersnotes.com/sleepy/" rel="nofollow noreferrer">Sleepy</a>, which is very simple, but does the job in many cases.</p>\n<p>Note: <strong>All three of the tools above are unmaintained since several years.</strong></p>\n'}, {'answer_id': 69153, 'author': 'Harold Ekstrom', 'author_id': 8429, 'author_profile': 'https://Stackoverflow.com/users/8429', 'pm_score': 0, 'selected': False, 'text': '<p>I\'ve used "TrueTime - part of Compuware\'s DevPartner suite for years. There\'s a [free version](you could try Compuware DevPartner Performance Analysis Community Edition.) available.</p>\n'}, {'answer_id': 69452, 'author': 'dudico', 'author_id': 11089, 'author_profile': 'https://Stackoverflow.com/users/11089', 'pm_score': 2, 'selected': False, 'text': '<p>I use AQTime, it is one of the best profiling tools I\'ve ever used.\nIt isn\'t free but you can get a 30 day trial, so if you plan on a optimizing and profiling only one project and 30 days are enough for you then I would recommend using this application. (<a href="https://smartbear.com/product/aqtime-pro/overview/" rel="nofollow noreferrer">http://www.automatedqa.com/downloads/aqtime/index.asp</a>)</p>\n'}, {'answer_id': 566306, 'author': 'epotter', 'author_id': 26339, 'author_profile': 'https://Stackoverflow.com/users/26339', 'pm_score': 3, 'selected': False, 'text': '<p>Microsoft has the <a href="https://learn.microsoft.com/en-us/windows-hardware/test/wpt/" rel="nofollow noreferrer">Windows Performance Toolkit</a>. </p>\n\n<p>It does require Windows&nbsp;Vista, <a href="http://en.wikipedia.org/wiki/Windows_Server_2008" rel="nofollow noreferrer">Windows Server 2008</a>, or Windows&nbsp;7.</p>\n'}, {'answer_id': 597367, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 0, 'selected': False, 'text': '<p>I use VSPerfMon which is the StandAlone Visual Studio Profiler. I wrote a GUI tool to help me run it and look at the results.</p>\n\n<p><a href="http://code.google.com/p/vsptree/" rel="nofollow noreferrer">http://code.google.com/p/vsptree/</a></p>\n'}, {'answer_id': 1421933, 'author': 'Buggieboy', 'author_id': 67875, 'author_profile': 'https://Stackoverflow.com/users/67875', 'pm_score': 3, 'selected': False, 'text': '<p>Another profiler is <a href="http://sourceforge.net/projects/shinyprofiler/" rel="nofollow noreferrer">Shiny</a>.</p>\n<p>\u200b\u200b\u200b\u200b\u200b</p>\n'}, {'answer_id': 1657469, 'author': 'pauldoo', 'author_id': 755, 'author_profile': 'https://Stackoverflow.com/users/755', 'pm_score': 5, 'selected': False, 'text': '<p>Proffy is quite cool:  <a href="http://pauldoo.com/proffy/" rel="noreferrer">http://pauldoo.com/proffy/</a></p>\n\n<p>Disclaimer: I wrote this.</p>\n'}, {'answer_id': 2990425, 'author': 'lsalamon', 'author_id': 47733, 'author_profile': 'https://Stackoverflow.com/users/47733', 'pm_score': 6, 'selected': False, 'text': '<p><a href="http://www.codersnotes.com/sleepy/" rel="noreferrer">Very Sleepy</a> is a C/C++ CPU profiler for Windows systems (free).</p>\n'}, {'answer_id': 4617203, 'author': 'ravenspoint', 'author_id': 16582, 'author_profile': 'https://Stackoverflow.com/users/16582', 'pm_score': 1, 'selected': False, 'text': '<p>Please try my profiler, called cRunWatch.  It is just two files, so it is easy to integrate with your projects, and requires adding exactly one line to instrument a piece of code.</p>\n\n<p><a href="http://ravenspoint.wordpress.com/2010/06/16/timing/" rel="nofollow">http://ravenspoint.wordpress.com/2010/06/16/timing/</a></p>\n\n<p>Requires the Boost library.</p>\n'}, {'answer_id': 8982554, 'author': 'Arty', 'author_id': 1166346, 'author_profile': 'https://Stackoverflow.com/users/1166346', 'pm_score': 4, 'selected': False, 'text': '<p>There is an instrumenting (function-accurate) profiler for MS VC 7.1 and higher called MicroProfiler. <a href="http://visualstudiogallery.msdn.microsoft.com/133d5764-b32b-4ec9-8ee8-5546eca64584" rel="noreferrer">You can get it here (x64)</a> or <a href="http://visualstudiogallery.msdn.microsoft.com/800cc437-8cb9-463f-9382-26bedff7cdf0" rel="noreferrer">here (x86)</a>. It <strong>doesn\'t require any modifications or additions</strong> to your code and is able of displaying function statistics with callers and callees in <strong>real-time</strong> without the need of closing application/stopping the profiling process.</p>\n\n<p>It integrates with VisualStudio, so you can easily enable/disable profiling for a project. It is also possible to install it on the clean machine, it only needs the symbol information be located along with the executable being profiled.</p>\n\n<p>This tool is useful when statistical approximation from sampling profilers like Very Sleepy isn\'t sufficient.</p>\n\n<p>Rough comparison shows, that it beats AQTime (when it is invoked in instrumenting, function-level run). The following program (full optimization, inlining disabled) runs three times faster with micro-profiler displaying results in real-time, than with AQTime simply collecting stats:</p>\n\n<pre><code>void f()\n{\n    srand(time(0));\n\n    vector&lt;double&gt; v(300000);\n\n    generate_n(v.begin(), v.size(), &amp;random);\n    sort(v.begin(), v.end());\n    sort(v.rbegin(), v.rend());\n    sort(v.begin(), v.end());\n    sort(v.rbegin(), v.rend());\n}\n</code></pre>\n'}, {'answer_id': 13342642, 'author': 'Mi-La', 'author_id': 1809845, 'author_profile': 'https://Stackoverflow.com/users/1809845', 'pm_score': 0, 'selected': False, 'text': "<p>You can use EmbeddedProfiler, it's free for both Linux and Windwos.</p>\n\n<p>The profiler is intrusive (by functionality) but it doens't require any code modifications. Just add a specific compiler flag (-finstrument-functios for gcc/MinGW or /GH for MSVC) and link the profiler's library. It can provide you a full call tree or just a funciton list. It has it's own analyzer GUI.</p>\n"}, {'answer_id': 16311387, 'author': 'MW_dev', 'author_id': 46654, 'author_profile': 'https://Stackoverflow.com/users/46654', 'pm_score': 3, 'selected': False, 'text': '<p>I highly recommend <a href="https://learn.microsoft.com/en-us/windows-hardware/test/wpt/windows-performance-analyzer" rel="nofollow noreferrer">Windows Performance Analyzer (WPA)</a> part of the Windows Performance Toolkit.  The command line <a href="https://devblogs.microsoft.com/performance-diagnostics/wpr-intro/" rel="nofollow noreferrer">Windows Performance Recorder (WPR)</a> tool records Event Tracing for Windows (ETW) logs that can be analyzed later using the Windows Performance Analyzer tool. There are some great tutorials on learning how to use the tool.</p>\n<pre><code>wpr.exe -start CPU\n...\nwpr.exe -stop output.etl\nwpa.exe output.etl\n</code></pre>\n'}, {'answer_id': 19702338, 'author': 'INS', 'author_id': 13136, 'author_profile': 'https://Stackoverflow.com/users/13136', 'pm_score': 1, 'selected': False, 'text': '<p>I used <a href="http://lukestackwalker.sourceforge.net/" rel="nofollow">Luke Stackwalker</a> and it did the job for my Visual Studio project.</p>\n\n<p>Other interesting projects are:</p>\n\n<ul>\n<li><a href="http://www.pauldoo.com/proffy" rel="nofollow">Proffy</a></li>\n<li><a href="http://www.dyninst.org/" rel="nofollow">Dyninst</a></li>\n</ul>\n'}]
['https://Stackoverflow.com/questions/67554', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/10120/']