<html><head></head><body><div><div style="line-height:1.6;font-size:14px"><div class="" dir="auto"><span>Can you send the results for each benchmark in SpecCPU2006 in detail instead of Geometric? I can compare your results with SpecCPU2017 because there are some common benchmarks in SpecCPU2006 and </span><span class=" backgroundcolor fontweight  fontsize fontcolor " style="background-color:rgba(0,0,0,0);font-weight:400;font-size:14px;color:#1f2329">SpecCPU2017.</span></div><div class="" dir="auto"><br></div><div class="" dir="auto"><span class=" fontfamily backgroundcolor fontweight  fontsize fontcolor " style="font-family:Calibri,sans-serif;background-color:rgb(255,255,255);font-weight:400;font-size:14.6667px;color:#1f2329">And in patch </span><span class="outer-u-container "><span class=" hyperlink-href:https://reviews.llvm.org/D110081 u fontfamily backgroundcolor fontweight  fontsize " style="font-family:Calibri,sans-serif;background-color:rgb(255,255,255);font-weight:400;font-size:14.6667px"><a href="https://reviews.llvm.org/D110081" rel="noopener" target="_blank" style="color:rgb(51,112,255);text-decoration:none"><u><span><a href="https://reviews.llvm.org/D110081" target="_blank">https://reviews.llvm.org/D110081</a></span></u></a></span></span></div><div class="" dir="auto"><span>I also have questions:</span></div><ol start="1" style="margin:0px;padding:0px;list-style-position:inside"><li start="1" class=" " style="padding-left:0px;line-height:1.6;vertical-align:-4px;display:list-item;list-style-type:decimal"><span style="display:none"></span><span class="pocket-ignore pocket-ignore-faketext">​</span><span>Have you seen the compilation error when you use CSSPGO in SpecCPU2006? I </span><span class=""><span class="grammar-check-c186b643-76c7-46ad-810a-c185aab53ae8 gcheck">seen</span></span><span> the error in SpecCPU2017-502.gcc_r. This benchmark also exists in SpecCPU2006.</span></li><li start="2" class=" " style="padding-left:0px;line-height:1.6;vertical-align:-4px;display:list-item;list-style-type:decimal"><span style="display:none"></span><span class="pocket-ignore pocket-ignore-faketext">​</span><span>About the fix, we may have better choice.</span><span class=" i fontfamily backgroundcolor  fontcolor " style="font-family:Lato,Helvetica,Arial,sans-serif;background-color:rgb(248,249,252);color:rgb(70,76,92)"><i> About the question: </i></span><span class=" i fontfamily backgroundcolor fontweight  fontsize fontcolor " style="font-family:Lato,Helvetica,Arial,sans-serif;background-color:rgb(248,249,252);font-weight:400;font-size:13px;color:rgb(70,76,92)"><i>Can we potentially lose contexts when an invalid line offset is one of the frames? Like A:-1 @ B:2 @ C:3, without this change, we could still have samples for B:2 @ C:3. But I think that's rare.</i></span></li></ol><div class="" dir="auto"><ul class="list-indent1 " style="margin:0px;padding:0px;list-style-type:none;margin-left:21px"><li style="display:block"><span class=" fontfamily backgroundcolor fontweight  fontsize fontcolor " style="font-family:Lato,Helvetica,Arial,sans-serif;background-color:rgb(255,255,255);font-weight:400;font-size:13px;color:rgb(146,150,157)">You say that: you haven't seen those cases, it seems it only happened for leaf frame. Even </span><span class=""><span class="grammar-check-9c2260b7-1ab7-4863-a1ea-fb5af5ac40b4 gcheck fontfamily backgroundcolor fontweight  fontsize fontcolor " style="font-family:Lato,Helvetica,Arial,sans-serif;background-color:rgb(255,255,255);font-weight:400;font-size:13px;color:rgb(146,150,157)">it</span></span><span class=" fontfamily backgroundcolor fontweight  fontsize fontcolor " style="font-family:Lato,Helvetica,Arial,sans-serif;background-color:rgb(255,255,255);font-weight:400;font-size:13px;color:rgb(146,150,157)"> can be leaf call, there </span><span class=""><span class="grammar-check-b5e1c5a5-7145-4e79-a64e-5e2af88c3917 gcheck fontfamily backgroundcolor fontweight  fontsize fontcolor " style="font-family:Lato,Helvetica,Arial,sans-serif;background-color:rgb(255,255,255);font-weight:400;font-size:13px;color:rgb(146,150,157)">is</span></span><span class=" fontfamily backgroundcolor fontweight  fontsize fontcolor " style="font-family:Lato,Helvetica,Arial,sans-serif;background-color:rgb(255,255,255);font-weight:400;font-size:13px;color:rgb(146,150,157)"> no samples hit the callee. </span><span class=""><span class="grammar-check-b15b064a-426d-415c-ba6b-f47e0c737d1b gcheck fontfamily backgroundcolor fontweight  fontsize fontcolor " style="font-family:Lato,Helvetica,Arial,sans-serif;background-color:rgb(255,255,255);font-weight:400;font-size:13px;color:rgb(146,150,157)">you</span></span><span class=" fontfamily backgroundcolor fontweight  fontsize fontcolor " style="font-family:Lato,Helvetica,Arial,sans-serif;background-color:rgb(255,255,255);font-weight:400;font-size:13px;color:rgb(146,150,157)"> can add a warning on the non-leaf frame invalid line of stack address.</span></li></ul></div><div class="" dir="auto"><ul class="list-indent1 " style="margin:0px;padding:0px;list-style-type:none;margin-left:21px"><li style="display:block"><span class=" fontfamily backgroundcolor fontweight  fontsize fontcolor " style="font-family:Lato,Helvetica,Arial,sans-serif;background-color:rgb(255,255,255);font-weight:400;font-size:13px;color:rgb(0,0,0)">As for me, I have seen</span><span class="grammar-check-ignore fontfamily backgroundcolor fontweight  fontsize fontcolor " style="font-family:Lato,Helvetica,Arial,sans-serif;background-color:rgb(255,255,255);font-weight:400;font-size:13px;color:rgb(0,0,0)"> the</span><span class=" fontfamily backgroundcolor fontweight  fontsize fontcolor " style="font-family:Lato,Helvetica,Arial,sans-serif;background-color:rgb(255,255,255);font-weight:400;font-size:13px;color:rgb(0,0,0)"> cases that happened for non-leaf frame. And if you filter out such callstack, the number of samples will decrease sharply. I haven't use the llvm-master successfully. After that I expect to show you.</span></li></ul></div><div class="" dir="auto"><br></div><div class="" dir="auto"><span class=" fontfamily backgroundcolor fontweight  fontsize fontcolor " style="font-family:LarkHackSafariFont,LarkEmojiFont,LarkChineseQuote,-apple-system,system-ui,Arial,sans-serif;background-color:rgb(255,255,255);font-weight:400;font-size:14px;color:rgb(43,47,54)">If possible, I look forward to a voice conference with you if </span><span class="grammar-check-ignore fontfamily backgroundcolor fontweight  fontsize fontcolor " style="font-family:LarkHackSafariFont,LarkEmojiFont,LarkChineseQuote,-apple-system,system-ui,Arial,sans-serif;background-color:rgb(255,255,255);font-weight:400;font-size:14px;color:rgb(43,47,54)">you are</span><span class=" fontfamily backgroundcolor fontweight  fontsize fontcolor " style="font-family:LarkHackSafariFont,LarkEmojiFont,LarkChineseQuote,-apple-system,system-ui,Arial,sans-serif;background-color:rgb(255,255,255);font-weight:400;font-size:14px;color:rgb(43,47,54)">  convenient at any time.</span></div><div class="" style="padding-left:12px;border-left:0.5px solid rgb(187,191,196)" id="lark-mail-quote-163584459"><div><blockquote class="" id="lark-mail-block-content-163584459" style="padding:0px;margin:0px"><blockquote class="" id="lark-mail-block-content-163584459" style="padding:0px;margin:0px"><div id="lark-mail-quote-d40922c81327ea8bbd617d8ce90ae78d"><div class="" id="lark-mail-block-attr-163584459" style="color:rgb(143,149,158)">On Tue, Nov 2, 2021, 14:42 <<a href="mailto:xuqingqing.0729@bytedance.com" style="color:rgb(51,112,255)">xuqingqing.0729@bytedance.com</a>> wrote:</div><blockquote style="padding:0px;margin:8px 0px 0px" class="" id="lark-mail-block-content-163584459"><div class="msg-CJjaznrSNYLOkzG"><div><div><div style="line-height:1.6;font-size:14px"><div class="" dir="auto"><span>As you suggested, I remove </span><span class="fontfamily backgroundcolor fontweight  fontsize fontcolor" style="font-family:Calibri,sans-serif;background-color:rgb(255,255,255);font-weight:400;font-size:14px;color:#000000">-fdebug-info-for-profiling in first compiling process and add -flto in second compiling process for CSSPGO, -flto can bring great improvement.</span></div><div class="" dir="auto"><br></div><div class="" dir="auto"><span class="fontfamily backgroundcolor fontweight  fontsize fontcolor" style="font-family:Calibri,sans-serif;background-color:rgb(255,255,255);font-weight:400;font-size:14px;color:#000000">To be fair, I also add -flto in </span><span class="grammar-check-ignore fontfamily backgroundcolor fontweight  fontsize fontcolor" style="font-family:Calibri,sans-serif;background-color:rgb(255,255,255);font-weight:400;font-size:14px;color:#000000">second</span><span class="fontfamily backgroundcolor fontweight  fontsize fontcolor" style="font-family:Calibri,sans-serif;background-color:rgb(255,255,255);font-weight:400;font-size:14px;color:#000000"> compiling process for AutoFDO. The result </span><span class="grammar-check-ignore fontfamily backgroundcolor fontweight  fontsize fontcolor" style="font-family:Calibri,sans-serif;background-color:rgb(255,255,255);font-weight:400;font-size:14px;color:#000000">shows</span><span class="fontfamily backgroundcolor fontweight  fontsize fontcolor" style="font-family:Calibri,sans-serif;background-color:rgb(255,255,255);font-weight:400;font-size:14px;color:#000000"> that AutoFDO </span><span class="grammar-check-ignore fontfamily backgroundcolor fontweight  fontsize fontcolor" style="font-family:Calibri,sans-serif;background-color:rgb(255,255,255);font-weight:400;font-size:14px;color:#000000">bring</span><span class="fontfamily backgroundcolor fontweight  fontsize fontcolor" style="font-family:Calibri,sans-serif;background-color:rgb(255,255,255);font-weight:400;font-size:14px;color:#000000"> more performance benefits over CSSPGO (about 20% on SpecCPU2017's 523.xalancbmk_r).</span></div><div class="" dir="auto"><br></div><div class="" dir="auto"><span class="fontfamily backgroundcolor fontweight  fontsize fontcolor" style="font-family:Calibri,sans-serif;background-color:rgb(255,255,255);font-weight:400;font-size:14px;color:#000000">The version of llvm I used is llvm-12. And your RFC is also based on llvm-12 according the time of RFC. Have I missed anything in the usage of CSSPGO? Is there any option for CSSPGO which I need to open manually? Could you please test the branch release/12.x and confirm the results to help me to get performance benefits over AutoFDO?</span></div><div class="" dir="auto"><br></div><div class="" dir="auto"><span class="fontfamily backgroundcolor fontweight  fontsize fontcolor" style="font-family:Calibri,sans-serif;background-color:rgb(255,255,255);font-weight:400;font-size:14px;color:#000000">Thanks,</span></div><div class="" dir="auto"><span class="fontfamily backgroundcolor fontweight  fontsize fontcolor" style="font-family:Calibri,sans-serif;background-color:rgb(255,255,255);font-weight:400;font-size:14px;color:#000000">Qingqing</span></div><div class="" style="padding-left:12px;border-left:0.5px solid rgb(187,191,196);margin-top:12px" id="lark-mail-quote-163583532"><div><blockquote class="" id="lark-mail-block-content-163583532" style="padding:0px;margin:0px"><div id="lark-mail-quote-68c9f82979e84af734d090b6ef2f30de" style="margin-top:12px"><div class="" id="lark-mail-block-attr-163583532" style="color:rgb(143,149,158)">On Sat, Oct 30, 2021, 04:53 <<a href="mailto:wlei@fb.com" style="color:rgb(51,112,255)" rel="nofollow noopener noreferrer">wlei@fb.com</a>> wrote:</div><blockquote style="padding:0px;margin:8px 0px 0px" class="" id="lark-mail-block-content-163583532"><div class="msg-UaMVuJTpxEDi0u4">


<style>.msg-CJjaznrSNYLOkzG .msg-UaMVuJTpxEDi0u4 p.MsoNormal,.msg-CJjaznrSNYLOkzG .msg-UaMVuJTpxEDi0u4 li.MsoNormal,.msg-CJjaznrSNYLOkzG .msg-UaMVuJTpxEDi0u4 div.MsoNormal{margin:0in;font-size:11.0pt;font-family:"Calibri",sans-serif}.msg-CJjaznrSNYLOkzG .msg-UaMVuJTpxEDi0u4 a:link,.msg-CJjaznrSNYLOkzG .msg-UaMVuJTpxEDi0u4 span.MsoHyperlink{color:blue;text-decoration:underline}.msg-CJjaznrSNYLOkzG .msg-UaMVuJTpxEDi0u4 span.grammar-check-ignore{}.msg-CJjaznrSNYLOkzG .msg-UaMVuJTpxEDi0u4 span.outer-u-container{}.msg-CJjaznrSNYLOkzG .msg-UaMVuJTpxEDi0u4 span.hyperlink-hrefhttpsgroupsgooglecomgllvm-devc1p1rdybl93smijjcmus7awaj{}.msg-CJjaznrSNYLOkzG .msg-UaMVuJTpxEDi0u4 span.pocket-ignore{}.msg-CJjaznrSNYLOkzG .msg-UaMVuJTpxEDi0u4 span.EmailStyle23{font-family:"Calibri",sans-serif;color:windowtext}.msg-CJjaznrSNYLOkzG .msg-UaMVuJTpxEDi0u4 .MsoChpDefault{font-size:10.0pt}@page WordSection1{size:8.5in 11.0in;margin:1.0in 1.0in 1.0in 1.0in}.msg-CJjaznrSNYLOkzG .msg-UaMVuJTpxEDi0u4 div.WordSection1{page:WordSection1}.msg-CJjaznrSNYLOkzG .msg-UaMVuJTpxEDi0u4 ol{margin-bottom:0in}.msg-CJjaznrSNYLOkzG .msg-UaMVuJTpxEDi0u4 ul{margin-bottom:0in}</style>

<div lang="EN-US" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal">BTW, regarding the issue in  <a href="https://groups.google.com/g/llvm-dev/c/QJFIzk6bP1Y/m/8YlhrhXDAQAJ" rel="nofollow noopener noreferrer">https://groups.google.com/g/llvm-dev/c/QJFIzk6bP1Y/m/8YlhrhXDAQAJ</a>. (Sorry I overlooked the message)</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">We have a fix in <a href="https://reviews.llvm.org/D110081" rel="nofollow noopener noreferrer">https://reviews.llvm.org/D110081</a> which can filter out the negative LineOffset, you can have a try on latest llvm-profgen.</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Thanks.</p>
<p class="MsoNormal">Lei</p>
<p class="MsoNormal"> </p>
<div id="lark-mail-quote-243675d28c66224a4308a13c6a2ebc53" style="margin-top:12px"><div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:12.0pt;color:black">From: </span></b><span style="font-size:12.0pt;color:black"><span>Hongtao Yu <<a href="mailto:hoy@fb.com" rel="nofollow noopener noreferrer">hoy@fb.com</a>></span><br>
<b>Date: </b>Friday, October 29, 2021 at 12:57 PM<br>
<b>To: </b><span>Wenlei He <<a href="mailto:wenlei@fb.com" rel="nofollow noopener noreferrer">wenlei@fb.com</a>>, </span></span><span lang="ZH-CN" style="font-size:12pt;font-family:sans-serif;color:black">徐青青</span><span style="font-size:12.0pt;color:black"><span> <<a href="mailto:xuqingqing.0729@bytedance.com" rel="nofollow noopener noreferrer">xuqingqing.0729@bytedance.com</a>>, via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" rel="nofollow noopener noreferrer">llvm-dev@lists.llvm.org</a>></span><br>
<b>Cc: </b><span>Lei Wang <<a href="mailto:wlei@fb.com" rel="nofollow noopener noreferrer">wlei@fb.com</a>></span><br>
<b>Subject: </b>Re: [llvm-dev] Performance benefits shown in [RFC: CSSPGO with Pseudo-Instrumentation] can't be reproduced.</span></p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<p class="MsoNormal">Please also be noted that in order to maximize the benefit from CSSPGO and its improved inlining, LTO mode is recommended. I suggest to try out -flto.</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Thanks,</p>
<p class="MsoNormal">Hongtao</p>
<p class="MsoNormal"> </p>
<div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal" style="margin-right:0in;margin-bottom:12.0pt;margin-left:.5in">
<b><span style="font-size:12.0pt;color:black">From: </span></b><span style="font-size:12.0pt;color:black"><span>Wenlei He <<a href="mailto:wenlei@fb.com" rel="nofollow noopener noreferrer">wenlei@fb.com</a>></span><br>
<b>Date: </b>Friday, October 29, 2021 at 12:49 PM<br>
<b>To: </b></span><span lang="ZH-CN" style="font-size:12pt;font-family:sans-serif;color:black">徐青青</span><span style="font-size:12.0pt;color:black"><span> <<a href="mailto:xuqingqing.0729@bytedance.com" rel="nofollow noopener noreferrer">xuqingqing.0729@bytedance.com</a>>, via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" rel="nofollow noopener noreferrer">llvm-dev@lists.llvm.org</a>></span><br>
<b>Cc: </b><span>Hongtao Yu <<a href="mailto:hoy@fb.com" rel="nofollow noopener noreferrer">hoy@fb.com</a>>, Lei Wang <<a href="mailto:wlei@fb.com" rel="nofollow noopener noreferrer">wlei@fb.com</a>></span><br>
<b>Subject: </b>Re: [llvm-dev] Performance benefits shown in [RFC: CSSPGO with Pseudo-Instrumentation] can't be reproduced.</span></p>
</div>
<p class="MsoNormal" style="margin-left:.5in">For Spec2017, we’ve seen 1%+ CPU improvements on Broadwell hosts in the past. We use spec only for bringing up new technologies and we no longer tracks spec results now as we move towards production workload. Also
 note that the measurement was done on our internal fork, with some internal patches. We’re still working on upstreaming some of them.
</p>
<p class="MsoNormal" style="margin-left:.5in"> </p>
<p class="MsoNormal" style="margin-left:.5in">For the setup, <span style="font-size:10.5pt;color:black;background:white">
-fdebug-info-for-profiling needs to be removed. </span><span style="font-size:10.5pt;background:white"></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.5pt;background:white"> </span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.5pt;color:black;background:white">Thanks,</span><span style="font-size:10.5pt;background:white"></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.5pt;color:black;background:white">Wenlei</span><span style="font-size:10.5pt;background:white"></span></p>
<p class="MsoNormal" style="margin-left:.5in"> </p>
<div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal" style="margin-right:0in;margin-bottom:12.0pt;margin-left:.5in">
<b><span style="font-size:12.0pt;color:black">From: </span></b><span style="font-size:12.0pt;color:black"><span>llvm-dev <<a href="mailto:llvm-dev-bounces@lists.llvm.org" rel="nofollow noopener noreferrer">llvm-dev-bounces@lists.llvm.org</a>> on behalf of
</span></span><span lang="ZH-CN" style="font-size:12pt;font-family:sans-serif;color:black">徐青青</span><span style="font-size:12.0pt;color:black"><span> via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" rel="nofollow noopener noreferrer">llvm-dev@lists.llvm.org</a>></span><br>
<b>Date: </b>Thursday, October 28, 2021 at 1:26 AM<br>
<b>To: </b><span>via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" rel="nofollow noopener noreferrer">llvm-dev@lists.llvm.org</a>></span><br>
<b>Subject: </b>[llvm-dev] Performance benefits shown in [RFC: CSSPGO with Pseudo-Instrumentation] can't be reproduced.</span></p>
</div>
<div>
<div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.5pt">Hi All,</span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.5pt"> </span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.5pt">I am using
<b>CSSPGO with Pseudo-Instrumentation</b>. But I found that the performance benefits
<span class="grammar-check-ignore">shown</span> in <span class="hyperlink-hrefhttpsgroupsgooglecomgllvm-devc1p1rdybl93smijjcmus7awaj">
<a href="https://groups.google.com/g/llvm-dev/c/1p1rdYbL93s/m/iJjcmUS7AwAJ" rel="nofollow noopener noreferrer"><span style="color:#3370ff;text-decoration:none">[RFC: CSSPGO with Pseudo-Instrumentation]</span></a></span> <b><span style="color:black">can't be reproduced on Spec CPU 2017</span></b> based on
<b>llvm-12</b>. In RFC, results show that CSSPGO with Pseudo-Instrumentation achieves better performance over AutoFDO.</span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.5pt"> </span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.5pt">Here, I have two question:</span></p>
</div>
<p class="MsoNormal" style="margin-left:1.0in">
<span style="font-size:10.5pt"><span style="">1.<span style="font:7.0pt "Times New Roman"">      
</span></span></span><span class="pocket-ignore"><span style="font-size:10.5pt">​</span></span><span style="font-size:10.5pt">Why choose Spec CPU 2006
 instead of Spec CPU 2017? Do you have results on <span style="color:black">Spec CPU 2017?</span></span></p>
<p class="MsoNormal" style="margin-left:1.0in">
<span style="font-size:10.5pt"><span style="">2.<span style="font:7.0pt "Times New Roman"">      
</span></span></span><span class="pocket-ignore"><span style="font-size:10.5pt">​</span></span><span style="font-size:10.5pt">Please point out if there
<span class="grammar-check-ignore">is</span> any <span class="grammar-check-ignore">
error</span> with my usage of <span style="color:black">CSSPGO, the steps are as follows:</span></span></p>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.5pt">Suppose that my program is test.cpp.</span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.5pt">Step 1:
<span style="color:black;background:white">clang  -O3  -g3  -fno-omit-frame-pointer  -fdebug-info-for-profiling  -fpseudo-probe-for-profiling  test.cpp  -o  test</span></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.5pt;color:black;background:white">Step 2:
</span><span style="font-size:10.5pt;font-family:SourceCodeProMac;color:black;background:white">perf  record  -g  --call-graph  fp  -e  br_inst_retired.near_taken:uppp  -c  16009  -b  -o  test.perf.data  ./test</span><span style="font-size:10.5pt"></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.5pt;font-family:SourceCodeProMac;color:black;background:white">Step 3: perf  script  -F  ip,brstack  -i  test.perf.data  --show-mmap-event  &>  test.perf.script</span><span style="font-size:10.5pt"></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.5pt;font-family:SourceCodeProMac;color:black;background:white">Step 4: llvm_install/bin/llvm-profgen  --perfscript=test.perf.script  --binary=./test  --output=test.spgo.profraw  --format=text</span><span style="font-size:10.5pt"></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.5pt;font-family:SourceCodeProMac;color:black;background:white">Step 5: llvm_install/bin/llvm-profdata  merge  --text  --sample  -output=test.spgo.prof  test.profraw ...</span><span style="font-size:10.5pt"></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.5pt;font-family:SourceCodeProMac;color:black;background:white">Step 6: clang  -O3  -g3  -fpseudo-probe-for-profiling  --fprofile-sample-use=test.spgo.prof  test.cpp  -o  cs_test</span><span style="font-size:10.5pt"></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.5pt;font-family:SourceCodeProMac;color:black;background:white">Step 7: ./cs_test</span><span style="font-size:10.5pt"></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.5pt"> </span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.5pt;font-family:SourceCodeProMac;color:black;background:white">Thanks,</span><span style="font-size:10.5pt"></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.5pt;font-family:SourceCodeProMac;color:black;background:white">Qingqing Xu</span><span style="font-size:10.5pt"></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.5pt"> </span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span class="outer-u-container"><span style="font-size:10.5pt"><a href="mailto:*llvm-dev@lists.llvm.org" rel="nofollow noopener noreferrer"><span style="color:#3370ff;text-decoration:none"><span></span></span></a><a href="mailto:llvm-dev@lists.llvm.org" rel="nofollow noopener noreferrer">llvm-dev@lists.llvm.org</a></span></span><span style="font-size:10.5pt"></span></p>
</div>
</div>
</div>
</div></div>

</div></div></blockquote></div></blockquote></div></div></div></div></div></div></blockquote></div></blockquote></blockquote></div></div></div></div></body></html>