<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Perf - Tag - 300.Watts</title><link>https://300watts.me/tags/perf/</link><description>Perf - Tag - 300.Watts</description><generator>Hugo -- gohugo.io</generator><language>en</language><managingEditor>morristai01@gmail.com (Morris)</managingEditor><webMaster>morristai01@gmail.com (Morris)</webMaster><copyright>This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.</copyright><lastBuildDate>Mon, 09 Oct 2023 10:04:55 +0800</lastBuildDate><atom:link href="https://300watts.me/tags/perf/" rel="self" type="application/rss+xml"/><item><title>Rust Profiling Essentials with perf</title><link>https://300watts.me/posts/rust-profiling-essentials-with-perf/</link><pubDate>Mon, 09 Oct 2023 10:04:55 +0800</pubDate><author><name>Morris</name></author><guid>https://300watts.me/posts/rust-profiling-essentials-with-perf/</guid><description><![CDATA[<h2 id="what-is-profiling" class="headerLink">
    <a href="#what-is-profiling" class="header-mark"></a>What is profiling?</h2><blockquote>
  <p>A: Sampling the program at specific times, and do some statistics analysis.</p>

</blockquote><p>It can be one of the following:</p>
<ul>
<li><strong>Reading Backtraces</strong> of the program for every 1000th cycles, and represent in ﬂamegraph.</li>
<li><strong>Reading Backtraces</strong> of the program for every 1000th cache miss, and represent in ﬂamegraph.</li>
<li><strong>Reading Backtraces</strong> of the program for every 10th memory allocation, and represent in ﬂamegraph.</li>
<li><strong>Get return address</strong> of the program for every 10th memory allocation, and show counts for every line.</li>
</ul>
<h2 id="how-to-trigger-a-sample" class="headerLink">
    <a href="#how-to-trigger-a-sample" class="header-mark"></a>How to trigger a sample?</h2><p>Kind of triggers:</p>]]></description></item></channel></rss>