Once we’re no longer using DIA this should be a lot easier to control on our side <br><div class="gmail_quote"><div dir="ltr">On Tue, Oct 16, 2018 at 11:17 AM Vedant Kumar <<a href="mailto:vsk@apple.com">vsk@apple.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word;line-break:after-white-space"><br><div><br><blockquote type="cite"><div>On Oct 16, 2018, at 10:59 AM, Stella Stamenova <<a href="mailto:stilis@microsoft.com" target="_blank">stilis@microsoft.com</a>> wrote:</div><br class="m_5803760029254534711Apple-interchange-newline"><div><div class="m_5803760029254534711WordSection1" style="font-family:Helvetica;font-size:14px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><div style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif">The windows error is because the names are different, as you expected:<u></u><u></u></div><div style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif"><u></u> <u></u></div><div style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif;line-height:12pt;background-color:rgb(30,30,30)"><span style="font-size:9pt;font-family:Consolas;color:rgb(212,212,212)">AssertionError: 'void sink(void)' != 'sink()'<u></u><u></u></span></div><div style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif"><u></u> <u></u></div><div style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif">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.</div></div></div></blockquote><div><br></div><div>I used a substring check in r344634.</div><div><br></div><br><blockquote type="cite"><div class="m_5803760029254534711WordSection1" style="font-family:Helvetica;font-size:14px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><div style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif"><u></u><u></u></div><div style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif">I’ll look into the Linux error as well and let you know what I find.</div></div></blockquote><div><br></div><div>Thank you very much! I really appreciate your help and patience with this.</div><div><br></div><div>The "step" logging channel should provide detailed information about what goes wrong when parsing the DWARF for call site information and creating artificial frames.</div></div></div><div style="word-wrap:break-word;line-break:after-white-space"><div><div><br></div><div>vedant</div><br><blockquote type="cite"><div class="m_5803760029254534711WordSection1" style="font-family:Helvetica;font-size:14px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><div style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif"><u></u><u></u></div><div style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif"><u></u> <u></u></div><div style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif"><u></u> <u></u></div><div><div style="border-style:solid none none;border-top-width:1pt;border-top-color:rgb(225,225,225);padding:3pt 0in 0in"><div style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif"><b>From:</b><span class="m_5803760029254534711Apple-converted-space"> </span><a href="mailto:vsk@apple.com" target="_blank">vsk@apple.com</a> <<a href="mailto:vsk@apple.com" target="_blank">vsk@apple.com</a>><span class="m_5803760029254534711Apple-converted-space"> </span><br><b>Sent:</b><span class="m_5803760029254534711Apple-converted-space"> </span>Monday, October 15, 2018 8:34 PM<br><b>To:</b><span class="m_5803760029254534711Apple-converted-space"> </span>Frédéric Riss <<a href="mailto:friss@apple.com" target="_blank">friss@apple.com</a>><br><b>Cc:</b><span class="m_5803760029254534711Apple-converted-space"> </span><a href="mailto:reviews+D50478+public+7e86b794a09096e3@reviews.llvm.org" target="_blank">reviews+D50478+public+7e86b794a09096e3@reviews.llvm.org</a>; Adrian Prantl <<a href="mailto:aprantl@apple.com" target="_blank">aprantl@apple.com</a>>; <a href="mailto:paul.robinson@sony.com" target="_blank">paul.robinson@sony.com</a>; <a href="mailto:jdevlieghere@apple.com" target="_blank">jdevlieghere@apple.com</a>; Jim Ingham <<a href="mailto:jingham@apple.com" target="_blank">jingham@apple.com</a>>; <a href="mailto:zturner@google.com" target="_blank">zturner@google.com</a>; Stella Stamenova <<a href="mailto:stilis@microsoft.com" target="_blank">stilis@microsoft.com</a>>; <a href="mailto:abidh.haq@gmail.com" target="_blank">abidh.haq@gmail.com</a>; <a href="mailto:teemperor@gmail.com" target="_blank">teemperor@gmail.com</a>; <a href="mailto:sgraenitz@apple.com" target="_blank">sgraenitz@apple.com</a>; <a href="mailto:mgrang@codeaurora.org" target="_blank">mgrang@codeaurora.org</a>; <a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>; <a href="mailto:lldb-commits@lists.llvm.org" target="_blank">lldb-commits@lists.llvm.org</a><br><b>Subject:</b><span class="m_5803760029254534711Apple-converted-space"> </span>Re: [PATCH] D50478: Add support for artificial tail call frames<u></u><u></u></div></div></div><div style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif"><u></u> <u></u></div><div style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif"><u></u> <u></u></div><div><div style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif"><br><br><u></u><u></u></div><blockquote style="margin-top:5pt;margin-bottom:5pt"><div><div style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif">On Oct 15, 2018, at 4:46 PM, Frédéric Riss <<a href="mailto:friss@apple.com" style="color:purple;text-decoration:underline" target="_blank">friss@apple.com</a>> wrote:<u></u><u></u></div></div><div style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif"><u></u> <u></u></div><div><div style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif"><br><span style="font-size:10.5pt;font-family:Helvetica,sans-serif"><br style="font-variant-caps:normal;text-align:start;word-spacing:0px"><br></span><u></u><u></u></div><blockquote style="margin-top:5pt;margin-bottom:5pt"><div><div style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif"><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" style="color:purple;text-decoration:underline" target="_blank"><span style="font-size:10.5pt;font-family:Helvetica,sans-serif">vsk@apple.com</span></a><span style="font-size:10.5pt;font-family:Helvetica,sans-serif">> wrote:<u></u><u></u></span></div></div><div style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif"><span style="font-size:10.5pt;font-family:Helvetica,sans-serif"><u></u> <u></u></span></div><div><div style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif"><span style="font-size:9pt;font-family:Helvetica,sans-serif"><br><br style="font-variant-caps:normal;text-align:start;word-spacing:0px"><br></span><span style="font-size:10.5pt;font-family:Helvetica,sans-serif"><u></u><u></u></span></div><blockquote style="margin-top:5pt;margin-bottom:5pt"><div style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif"><span style="font-size:9pt;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" style="color:purple;text-decoration:underline" target="_blank"><span style="font-size:9pt;font-family:Helvetica,sans-serif">reviews@reviews.llvm.org</span></a><span style="font-size:9pt;font-family:Helvetica,sans-serif">> wrote:<br><br>stella.stamenova added a comment.<br><br>In<span class="m_5803760029254534711apple-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%7C9ce5a5c509814cfbe40c08d633183492%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636752576410558617&sdata=FAl5MxKngJHYaphvhHxwZmkM%2FYzOFNN%2F1tc%2B9tn%2B9a4%3D&reserved=0" style="color:purple;text-decoration:underline" target="_blank"><span style="font-size:9pt;font-family:Helvetica,sans-serif">https://reviews.llvm.org/D50478#1262717</span></a><span style="font-size:9pt;font-family:Helvetica,sans-serif">, @vsk wrote:<br><br><br><u></u><u></u></span></div><blockquote style="margin-top:5pt;margin-bottom:5pt"><div style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif"><span style="font-size:9pt;font-family:Helvetica,sans-serif">In<span class="m_5803760029254534711apple-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%7C9ce5a5c509814cfbe40c08d633183492%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636752576410558617&sdata=QxwDMhgyu1zOnJjSMtG2QzOmhwBtOiRGRKHuyU0gJoU%3D&reserved=0" style="color:purple;text-decoration:underline" target="_blank"><span style="font-size:9pt;font-family:Helvetica,sans-serif">https://reviews.llvm.org/D50478#1262710</span></a><span style="font-size:9pt;font-family:Helvetica,sans-serif">, @stella.stamenova wrote:<br><br><br><u></u><u></u></span></div><blockquote style="margin-top:5pt;margin-bottom:5pt"><div style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif"><span style="font-size:9pt;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.<u></u><u></u></span></div></blockquote><div style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif"><span style="font-size:9pt;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?<u></u><u></u></span></div></blockquote><div style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif"><span style="font-size:9pt;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)<u></u><u></u></span></div></blockquote><div style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif"><span style="font-size:9pt;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><span style="font-size:10.5pt;font-family:Helvetica,sans-serif"><u></u><u></u></span></div></div></blockquote><div><div style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif"><span style="font-size:10.5pt;font-family:Helvetica,sans-serif"><u></u> <u></u></span></div></div><div><div style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif"><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.<u></u><u></u></span></div></div></div></blockquote><div><div style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif"><u></u> <u></u></div></div><div style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif">Thanks, done in r344581.<u></u><u></u></div></div><div><div style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif"><u></u> <u></u></div></div><div><div style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif">vedant<u></u><u></u></div></div><div><div style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif"><br><br><u></u><u></u></div><blockquote style="margin-top:5pt;margin-bottom:5pt"><div><div><div style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif"><span style="font-size:10.5pt;font-family:Helvetica,sans-serif"><u></u> <u></u></span></div></div><div><div style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif"><span style="font-size:10.5pt;font-family:Helvetica,sans-serif">Fred <u></u><u></u></span></div></div><div style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif"><span style="font-size:10.5pt;font-family:Helvetica,sans-serif"><br style="font-variant-caps:normal;text-align:start;word-spacing:0px"><br></span><u></u><u></u></div><blockquote style="margin-top:5pt;margin-bottom:5pt"><div><div style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif"><span style="font-size:9pt;font-family:Helvetica,sans-serif"><br style="font-variant-caps:normal;text-align:start;word-spacing:0px"><br></span><span style="font-size:10.5pt;font-family:Helvetica,sans-serif"><u></u><u></u></span></div><blockquote style="margin-top:5pt;margin-bottom:5pt"><div style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif"><span style="font-size:9pt;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)=<unavailable>) 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<u></u><u></u></span></div></blockquote><div style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif"><span style="font-size:9pt;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 style="font-variant-caps:normal;text-align:start;word-spacing:0px"><br></span><span style="font-size:10.5pt;font-family:Helvetica,sans-serif"><u></u><u></u></span></div><blockquote style="margin-top:5pt;margin-bottom:5pt"><div style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif"><span style="font-size:9pt;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><stdin>:3:2: note: scanning from here<br> frame #1: 0x00000000004005b8 a.out`main(argc=1, (null)=<unavailable>) at main.cpp:28:3 [opt]<br> ^<br><stdin>:3:80: note: possible intended match here<br> frame #1: 0x00000000004005b8 a.out`main(argc=1, (null)=<unavailable>) 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%7C9ce5a5c509814cfbe40c08d633183492%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636752576410558617&sdata=LikQhFyzQHlkQnx39JzJileqEWz4i9BLZe3nRmNeYSM%3D&reserved=0" style="color:purple;text-decoration:underline" target="_blank"><span style="font-size:9pt;font-family:Helvetica,sans-serif">https://reviews.llvm.org/D50478</span></a></div></blockquote></div></blockquote></div></blockquote></div></div></blockquote></div><br></div></blockquote></div>