<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Pmu on 300.Watts</title><link>https://300watts.me/tags/pmu/</link><description>Recent content in Pmu on 300.Watts</description><generator>Hugo</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/pmu/index.xml" 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>morristai01@gmail.com (Morris)</author><guid>https://300watts.me/posts/rust-profiling-essentials-with-perf/</guid><description>&lt;h2 id="what-is-profiling" class="headerLink"&gt;
 &lt;a href="#what-is-profiling" class="header-mark"&gt;&lt;/a&gt;What is profiling?&lt;/h2&gt;&lt;blockquote&gt;
 &lt;p&gt;A: &lt;strong&gt;Sampling&lt;/strong&gt; the program &lt;strong&gt;at specific times&lt;/strong&gt;, and do some statistics analysis.&lt;/p&gt;

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