<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Helvetica;
        panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
span.apple-converted-space
        {mso-style-name:apple-converted-space;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">Hey Vedant,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I’ve attached the logs from Linux.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Most of the tests now pass on Windows with the exception of TestSteppingOutWithArtificialFrames and TestTailCallFrameSBAPI. Both of these attempt to get a specific frame by calling GetFrameAtIndex which only works partially on Windows right
 now. I think we should mark these as XFAIL on Windows and link them to: <a href="https://bugs.llvm.org/show_bug.cgi?id=26265">
https://bugs.llvm.org/show_bug.cgi?id=26265</a>.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thanks,<o:p></o:p></p>
<p class="MsoNormal">-Stella<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b>From:</b> vsk@apple.com <vsk@apple.com> <br>
<b>Sent:</b> Tuesday, October 16, 2018 11:17 AM<br>
<b>To:</b> Stella Stamenova <stilis@microsoft.com><br>
<b>Cc:</b> Frédéric Riss <friss@apple.com>; reviews+D50478+public+7e86b794a09096e3@reviews.llvm.org; Adrian Prantl <aprantl@apple.com>; paul.robinson@sony.com; jdevlieghere@apple.com; Jim Ingham <jingham@apple.com>; zturner@google.com; abidh.haq@gmail.com;
 teemperor@gmail.com; sgraenitz@apple.com; mgrang@codeaurora.org; dblaikie@gmail.com; lldb-commits@lists.llvm.org<br>
<b>Subject:</b> Re: [PATCH] D50478: Add support for artificial tail call frames<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal"><br>
<br>
<o:p></o:p></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<p class="MsoNormal">On Oct 16, 2018, at 10:59 AM, Stella Stamenova <<a href="mailto:stilis@microsoft.com">stilis@microsoft.com</a>> wrote:<o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">The windows error is because the names are different, as you expected:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:12.0pt;background:#1E1E1E"><span style="font-size:9.0pt;font-family:Consolas;color:#D4D4D4">AssertionError: 'void sink(void)' != 'sink()'</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">You can probably update the test to look for a different name on Windows (though if I recall correctly, different versions of the DIA sdk provide different detail on the names, so that might not be robust either) or look for a substring
 in the full name.<o:p></o:p></p>
</div>
</div>
</blockquote>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">I used a substring check in r344634.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<p class="MsoNormal"><br>
<br>
<o:p></o:p></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<p class="MsoNormal">I’ll look into the Linux error as well and let you know what I find.<o:p></o:p></p>
</div>
</blockquote>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Thank you very much! I really appreciate your help and patience with this.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">The "step" logging channel should provide detailed information about what goes wrong when parsing the DWARF for call site information and creating artificial frames.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">vedant<o:p></o:p></p>
</div>
<p class="MsoNormal"><br>
<br>
<o:p></o:p></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<div>
<p class="MsoNormal"><b>From:</b><span class="apple-converted-space"> </span><a href="mailto:vsk@apple.com">vsk@apple.com</a> <<a href="mailto:vsk@apple.com">vsk@apple.com</a>><span class="apple-converted-space">
</span><br>
<b>Sent:</b><span class="apple-converted-space"> </span>Monday, October 15, 2018 8:34 PM<br>
<b>To:</b><span class="apple-converted-space"> </span>Frédéric Riss <<a href="mailto:friss@apple.com">friss@apple.com</a>><br>
<b>Cc:</b><span class="apple-converted-space"> </span><a href="mailto:reviews+D50478+public+7e86b794a09096e3@reviews.llvm.org">reviews+D50478+public+7e86b794a09096e3@reviews.llvm.org</a>; Adrian Prantl <<a href="mailto:aprantl@apple.com">aprantl@apple.com</a>>;
<a href="mailto:paul.robinson@sony.com">paul.robinson@sony.com</a>; <a href="mailto:jdevlieghere@apple.com">
jdevlieghere@apple.com</a>; Jim Ingham <<a href="mailto:jingham@apple.com">jingham@apple.com</a>>;
<a href="mailto:zturner@google.com">zturner@google.com</a>; Stella Stamenova <<a href="mailto:stilis@microsoft.com">stilis@microsoft.com</a>>;
<a href="mailto:abidh.haq@gmail.com">abidh.haq@gmail.com</a>; <a href="mailto:teemperor@gmail.com">
teemperor@gmail.com</a>; <a href="mailto:sgraenitz@apple.com">sgraenitz@apple.com</a>;
<a href="mailto:mgrang@codeaurora.org">mgrang@codeaurora.org</a>; <a href="mailto:dblaikie@gmail.com">
dblaikie@gmail.com</a>; <a href="mailto:lldb-commits@lists.llvm.org">lldb-commits@lists.llvm.org</a><br>
<b>Subject:</b><span class="apple-converted-space"> </span>Re: [PATCH] D50478: Add support for artificial tail call frames<o:p></o:p></p>
</div>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><br>
<br>
<br>
<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<div>
<p class="MsoNormal">On Oct 15, 2018, at 4:46 PM, Frédéric Riss <<a href="mailto:friss@apple.com"><span style="color:purple">friss@apple.com</span></a>> wrote:<o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><br>
<span style="font-size:10.5pt;font-family:"Helvetica",sans-serif"><br>
<br>
<br>
</span><o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<div>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Helvetica",sans-serif">On Oct 15, 2018, at 4:40 PM, Vedant Kumar <</span><a href="mailto:vsk@apple.com"><span style="font-size:10.5pt;font-family:"Helvetica",sans-serif;color:purple">vsk@apple.com</span></a><span style="font-size:10.5pt;font-family:"Helvetica",sans-serif">>
 wrote:</span><o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Helvetica",sans-serif"><br>
<br>
<br>
<br>
</span><o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Helvetica",sans-serif">On Oct 15, 2018, at 3:47 PM, Stella Stamenova via Phabricator <</span><a href="mailto:reviews@reviews.llvm.org"><span style="font-size:9.0pt;font-family:"Helvetica",sans-serif;color:purple">reviews@reviews.llvm.org</span></a><span style="font-size:9.0pt;font-family:"Helvetica",sans-serif">>
 wrote:<br>
<br>
stella.stamenova added a comment.<br>
<br>
In<span class="apple-converted-space"> </span></span><a href="https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Freviews.llvm.org%2FD50478%231262717&data=02%7C01%7Cstilis%40microsoft.com%7Cf9216ae492894050d92c08d633939d6f%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636753106442955534&sdata=B7OOidlsIkojfOmNrwDf77eFvcMGnusASMyjrYa8lEI%3D&reserved=0"><span style="font-size:9.0pt;font-family:"Helvetica",sans-serif;color:purple">https://reviews.llvm.org/D50478#1262717</span></a><span style="font-size:9.0pt;font-family:"Helvetica",sans-serif">,
 @vsk wrote:<br>
<br>
<br>
<br>
</span><o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Helvetica",sans-serif">In<span class="apple-converted-space">
</span></span><a href="https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Freviews.llvm.org%2FD50478%231262710&data=02%7C01%7Cstilis%40microsoft.com%7Cf9216ae492894050d92c08d633939d6f%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636753106442955534&sdata=%2BdQxQwN%2B5svfM%2FFNvOR%2FpUhf3lArVs%2FEeeshtYk2qsM%3D&reserved=0"><span style="font-size:9.0pt;font-family:"Helvetica",sans-serif;color:purple">https://reviews.llvm.org/D50478#1262710</span></a><span style="font-size:9.0pt;font-family:"Helvetica",sans-serif">,
 @stella.stamenova wrote:<br>
<br>
<br>
<br>
</span><o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Helvetica",sans-serif">Unfortunately, the bots are broken because of the FileCheck issue, so I can't confirm with them, but I see a number of these tests fail in our local testing. Some fail on
 both Windows and Linux and some just fail on Linux. Here are the failing tests:<br>
<br>
Linux:<br>
lldb-Suite :: functionalities/tail_call_frames/disambiguate_call_site/TestDisambiguateCallSite.py<br>
lldb-Suite :: functionalities/tail_call_frames/disambiguate_paths_to_common_sink/TestDisambiguatePathsToCommonSink.py<br>
lldb-Suite :: functionalities/tail_call_frames/disambiguate_tail_call_seq/TestDisambiguateTailCallSeq.py<br>
lldb-Suite :: functionalities/tail_call_frames/inlining_and_tail_calls/TestInliningAndTailCalls.py<br>
lldb-Suite :: functionalities/tail_call_frames/sbapi_support/TestTailCallFrameSBAPI.py<br>
lldb-Suite :: functionalities/tail_call_frames/thread_step_out_message/TestArtificialFrameStepOutMessage.py<br>
lldb-Suite :: functionalities/tail_call_frames/unambiguous_sequence/TestUnambiguousTailCalls.py<br>
<br>
Windows:<br>
lldb-Suite :: functionalities/tail_call_frames/sbapi_support/TestTailCallFrameSBAPI.py<br>
lldb-Suite :: functionalities/tail_call_frames/thread_step_out_or_return/TestSteppingOutWithArtificialFrames.py<br>
<br>
<br>
Let me know what you need to investigate.</span><o:p></o:p></p>
</div>
</blockquote>
<div>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Helvetica",sans-serif"><br>
<br>
Strange, I didn't get any bot failure notifications in the days after this landed. Could you share the output from the failing tests?</span><o:p></o:p></p>
</div>
</blockquote>
<div>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Helvetica",sans-serif"><br>
<br>
All the failures on Windows are happening when validating the function name. For example:<br>
<br>
======================================================================<br>
<br>
FAIL: test_tail_call_frame_sbapi (TestTailCallFrameSBAPI.TestTailCallFrameSBAPI)<br>
<br>
----------------------------------------------------------------------<br>
<br>
Traceback (most recent call last):<br>
<br>
File "E:\_work\55\s\llvm\tools\lldb\packages\Python\lldbsuite\test\functionalities\tail_call_frames\sbapi_support\TestTailCallFrameSBAPI.py", line 19, in test_tail_call_frame_sbapi<br>
<br>
self.do_test()<br>
<br>
File "E:\_work\55\s\llvm\tools\lldb\packages\Python\lldbsuite\test\functionalities\tail_call_frames\sbapi_support\TestTailCallFrameSBAPI.py", line 64, in do_test<br>
<br>
self.assertTrue(frame.GetDisplayFunctionName() == name)</span><o:p></o:p></p>
</div>
</blockquote>
<div>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Helvetica",sans-serif"><br>
It could be that the display name of a function is formatted differently on Windows. Do you have an easy way of determining what frame.GetDisplayFunctionName() is?</span><o:p></o:p></p>
</div>
</div>
</blockquote>
<div>
<div>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Helvetica",sans-serif">If you use assertEqual(a,b) instead of assertTrue, it will print out the values and make it easier to debug.</span><o:p></o:p></p>
</div>
</div>
</div>
</blockquote>
<div>
<p class="MsoNormal">Thanks, done in r344581.<o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal">vedant<o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><br>
<br>
<br>
<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Helvetica",sans-serif">Fred
</span><o:p></o:p></p>
</div>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Helvetica",sans-serif"><br>
<br>
<br>
</span><o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<div>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Helvetica",sans-serif"><br>
<br>
<br>
</span><o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Helvetica",sans-serif"><br>
AssertionError: False is not True<br>
<br>
Config=x86_64-E:\_work\55\b\LLVMBuild\Release\bin\clang.exe<br>
<br>
----------------------------------------------------------------------<br>
<br>
There are several different failures on Linux. Here's the first one:<br>
<br>
FAIL: LLDB (/vstsdrive/_work/38/b/LLVMBuild/bin/clang-8-x86_64) :: test_dwarf (lldbsuite.test.lldbtest.TestDisambiguateCallSite)<br>
<br>
--- FileCheck trace (code=1) ---<br>
/vstsdrive/_work/38/b/LLVMBuild/bin/FileCheck /vstsdrive/_work/38/s/llvm/tools/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/disambiguate_call_site/main.cpp -implicit-check-not=artificial<br>
<br>
FileCheck input:<br>
* thread #1, name = 'a.out', stop reason = breakpoint 1.1<br>
* frame #0: 0x0000000000400580 a.out`sink() at main.cpp:13:4 [opt]<br>
frame #1: 0x00000000004005b8 a.out`main(argc=1, (null)=) at main.cpp:28:3 [opt]<br>
frame #2: 0x00007f980aff7830 libc.so.6`__libc_start_main + 240<br>
frame #3: 0x00000000004004a9 a.out`_start + 41</span><o:p></o:p></p>
</div>
</blockquote>
<div>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Helvetica",sans-serif"><br>
It looks like we're not generating tail call frames on Linux at all. It would help to have logs from "log enable -f /tmp/linux-stepping.log lldb step".<br>
<br>
I'm headed out of the office now, but If you need to disable the tests on Windows/Linux , the fastest way to do that would be to add a platform check to skipUnlessHasCallSiteInfo in decorators.py.<br>
<br>
vedant<br>
<br>
<br>
<br>
<br>
</span><o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Helvetica",sans-serif"><br>
<br>
FileCheck output:<br>
<br>
/vstsdrive/_work/38/s/llvm/tools/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/disambiguate_call_site/main.cpp:15:17: error: CHECK-NEXT: expected string not found in input<br>
// CHECK-NEXT: func2{{.*}} [opt] [artificial]<br>
^<br>
:3:2: note: scanning from here<br>
frame #1: 0x00000000004005b8 a.out`main(argc=1, (null)=) at main.cpp:28:3 [opt]<br>
^<br>
:3:80: note: possible intended match here<br>
frame #1: 0x00000000004005b8 a.out`main(argc=1, (null)=) at main.cpp:28:3 [opt]<br>
^<br>
<br>
Let me know if you need more logs.<br>
<br>
<br>
Repository:<br>
rLLDB LLDB<br>
<br>
</span><a href="https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Freviews.llvm.org%2FD50478&data=02%7C01%7Cstilis%40microsoft.com%7Cf9216ae492894050d92c08d633939d6f%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636753106442955534&sdata=NtVhAL0OUf26pOdcD2EdILhwqG8Mfgrc3kEEywrZ5as%3D&reserved=0"><span style="font-size:9.0pt;font-family:"Helvetica",sans-serif;color:purple">https://reviews.llvm.org/D50478</span></a><o:p></o:p></p>
</div>
</blockquote>
</div>
</blockquote>
</div>
</blockquote>
</div>
</blockquote>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>