<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Oct 16, 2018, at 10:59 AM, Stella Stamenova <<a href="mailto:stilis@microsoft.com" class="">stilis@microsoft.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="WordSection1" style="page: WordSection1; caret-color: rgb(0, 0, 0); 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; -webkit-text-stroke-width: 0px; text-decoration: none;"><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">The windows error is because the names are different, as you expected:<o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></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);" class=""><span style="font-size: 9pt; font-family: Consolas; color: rgb(212, 212, 212);" class="">AssertionError: 'void sink(void)' != 'sink()'<o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">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 class=""></div><div>I used a substring check in r344634.</div><div><br class=""></div><br class=""><blockquote type="cite" class=""><div class="WordSection1" style="page: WordSection1; caret-color: rgb(0, 0, 0); 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; -webkit-text-stroke-width: 0px; text-decoration: none;"><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">I’ll look into the Linux error as well and let you know what I find.</div></div></blockquote><div><br class=""></div><div>Thank you very much! I really appreciate your help and patience with this.</div><div><br class=""></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><br class=""></div><div>vedant</div><br class=""><blockquote type="cite" class=""><div class="WordSection1" style="page: WordSection1; caret-color: rgb(0, 0, 0); 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; -webkit-text-stroke-width: 0px; text-decoration: none;"><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div class=""><div style="border-style: solid none none; border-top-width: 1pt; border-top-color: rgb(225, 225, 225); padding: 3pt 0in 0in;" class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><b class="">From:</b><span class="Apple-converted-space"> </span><a href="mailto:vsk@apple.com" class="">vsk@apple.com</a> <<a href="mailto:vsk@apple.com" class="">vsk@apple.com</a>><span class="Apple-converted-space"> </span><br class=""><b class="">Sent:</b><span class="Apple-converted-space"> </span>Monday, October 15, 2018 8:34 PM<br class=""><b class="">To:</b><span class="Apple-converted-space"> </span>Frédéric Riss <<a href="mailto:friss@apple.com" class="">friss@apple.com</a>><br class=""><b class="">Cc:</b><span class="Apple-converted-space"> </span><a href="mailto:reviews+D50478+public+7e86b794a09096e3@reviews.llvm.org" class="">reviews+D50478+public+7e86b794a09096e3@reviews.llvm.org</a>; Adrian Prantl <<a href="mailto:aprantl@apple.com" class="">aprantl@apple.com</a>>; <a href="mailto:paul.robinson@sony.com" class="">paul.robinson@sony.com</a>; <a href="mailto:jdevlieghere@apple.com" class="">jdevlieghere@apple.com</a>; Jim Ingham <<a href="mailto:jingham@apple.com" class="">jingham@apple.com</a>>; <a href="mailto:zturner@google.com" class="">zturner@google.com</a>; Stella Stamenova <<a href="mailto:stilis@microsoft.com" class="">stilis@microsoft.com</a>>; <a href="mailto:abidh.haq@gmail.com" class="">abidh.haq@gmail.com</a>; <a href="mailto:teemperor@gmail.com" class="">teemperor@gmail.com</a>; <a href="mailto:sgraenitz@apple.com" class="">sgraenitz@apple.com</a>; <a href="mailto:mgrang@codeaurora.org" class="">mgrang@codeaurora.org</a>; <a href="mailto:dblaikie@gmail.com" class="">dblaikie@gmail.com</a>; <a href="mailto:lldb-commits@lists.llvm.org" class="">lldb-commits@lists.llvm.org</a><br class=""><b class="">Subject:</b><span class="Apple-converted-space"> </span>Re: [PATCH] D50478: Add support for artificial tail call frames<o:p class=""></o:p></div></div></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><br class=""><br class=""><o:p class=""></o:p></div><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><div class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">On Oct 15, 2018, at 4:46 PM, Frédéric Riss <<a href="mailto:friss@apple.com" style="color: purple; text-decoration: underline;" class="">friss@apple.com</a>> wrote:<o:p class=""></o:p></div></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><br class=""><span style="font-size: 10.5pt; font-family: Helvetica, sans-serif;" class=""><br style="caret-color: rgb(0, 0, 0); font-variant-caps: normal; text-align: start; -webkit-text-stroke-width: 0px; word-spacing: 0px;" class=""><br class=""></span><o:p class=""></o:p></div><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><div class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 10.5pt; font-family: Helvetica, sans-serif;" class="">On Oct 15, 2018, at 4:40 PM, Vedant Kumar <</span><a href="mailto:vsk@apple.com" style="color: purple; text-decoration: underline;" class=""><span style="font-size: 10.5pt; font-family: Helvetica, sans-serif;" class="">vsk@apple.com</span></a><span style="font-size: 10.5pt; font-family: Helvetica, sans-serif;" class="">> wrote:<o:p class=""></o:p></span></div></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 10.5pt; font-family: Helvetica, sans-serif;" class=""><o:p class=""> </o:p></span></div><div class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class=""><br class=""><br style="caret-color: rgb(0, 0, 0); font-variant-caps: normal; text-align: start; -webkit-text-stroke-width: 0px; word-spacing: 0px;" class=""><br class=""></span><span style="font-size: 10.5pt; font-family: Helvetica, sans-serif;" class=""><o:p class=""></o:p></span></div><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">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;" class=""><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">reviews@reviews.llvm.org</span></a><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">> wrote:<br class=""><br class="">stella.stamenova added a comment.<br class=""><br class="">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%7C9ce5a5c509814cfbe40c08d633183492%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636752576410558617&sdata=FAl5MxKngJHYaphvhHxwZmkM%2FYzOFNN%2F1tc%2B9tn%2B9a4%3D&reserved=0" style="color: purple; text-decoration: underline;" class=""><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">https://reviews.llvm.org/D50478#1262717</span></a><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">, @vsk wrote:<br class=""><br class=""><br class=""><o:p class=""></o:p></span></div><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">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%7C9ce5a5c509814cfbe40c08d633183492%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636752576410558617&sdata=QxwDMhgyu1zOnJjSMtG2QzOmhwBtOiRGRKHuyU0gJoU%3D&reserved=0" style="color: purple; text-decoration: underline;" class=""><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">https://reviews.llvm.org/D50478#1262710</span></a><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">, @stella.stamenova wrote:<br class=""><br class=""><br class=""><o:p class=""></o:p></span></div><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">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 class=""><br class="">Linux:<br class="">lldb-Suite :: functionalities/tail_call_frames/disambiguate_call_site/TestDisambiguateCallSite.py<br class="">lldb-Suite :: functionalities/tail_call_frames/disambiguate_paths_to_common_sink/TestDisambiguatePathsToCommonSink.py<br class="">lldb-Suite :: functionalities/tail_call_frames/disambiguate_tail_call_seq/TestDisambiguateTailCallSeq.py<br class="">lldb-Suite :: functionalities/tail_call_frames/inlining_and_tail_calls/TestInliningAndTailCalls.py<br class="">lldb-Suite :: functionalities/tail_call_frames/sbapi_support/TestTailCallFrameSBAPI.py<br class="">lldb-Suite :: functionalities/tail_call_frames/thread_step_out_message/TestArtificialFrameStepOutMessage.py<br class="">lldb-Suite :: functionalities/tail_call_frames/unambiguous_sequence/TestUnambiguousTailCalls.py<br class=""><br class="">Windows:<br class="">lldb-Suite :: functionalities/tail_call_frames/sbapi_support/TestTailCallFrameSBAPI.py<br class="">lldb-Suite :: functionalities/tail_call_frames/thread_step_out_or_return/TestSteppingOutWithArtificialFrames.py<br class=""><br class=""><br class="">Let me know what you need to investigate.<o:p class=""></o:p></span></div></blockquote><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class=""><br class=""><br class="">Strange, I didn't get any bot failure notifications in the days after this landed. Could you share the output from the failing tests?<o:p class=""></o:p></span></div></blockquote><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class=""><br class=""><br class="">All the failures on Windows are happening when validating the function name. For example:<br class=""><br class="">======================================================================<br class=""><br class="">FAIL: test_tail_call_frame_sbapi (TestTailCallFrameSBAPI.TestTailCallFrameSBAPI)<br class=""><br class="">----------------------------------------------------------------------<br class=""><br class="">Traceback (most recent call last):<br class=""><br class=""> 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 class=""><br class=""> self.do_test()<br class=""><br class=""> 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 class=""><br class=""> self.assertTrue(frame.GetDisplayFunctionName() == name)<o:p class=""></o:p></span></div></blockquote><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class=""><br class="">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;" class=""><o:p class=""></o:p></span></div></div></blockquote><div class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 10.5pt; font-family: Helvetica, sans-serif;" class=""><o:p class=""> </o:p></span></div></div><div class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 10.5pt; font-family: Helvetica, sans-serif;" class="">If you use assertEqual(a,b) instead of assertTrue, it will print out the values and make it easier to debug.<o:p class=""></o:p></span></div></div></div></blockquote><div class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Thanks, done in r344581.<o:p class=""></o:p></div></div><div class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div></div><div class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">vedant<o:p class=""></o:p></div></div><div class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><br class=""><br class=""><o:p class=""></o:p></div><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><div class=""><div class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 10.5pt; font-family: Helvetica, sans-serif;" class=""><o:p class=""> </o:p></span></div></div><div class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 10.5pt; font-family: Helvetica, sans-serif;" class="">Fred <o:p class=""></o:p></span></div></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 10.5pt; font-family: Helvetica, sans-serif;" class=""><br style="caret-color: rgb(0, 0, 0); font-variant-caps: normal; text-align: start; -webkit-text-stroke-width: 0px; word-spacing: 0px;" class=""><br class=""></span><o:p class=""></o:p></div><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><div class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class=""><br style="caret-color: rgb(0, 0, 0); font-variant-caps: normal; text-align: start; -webkit-text-stroke-width: 0px; word-spacing: 0px;" class=""><br class=""></span><span style="font-size: 10.5pt; font-family: Helvetica, sans-serif;" class=""><o:p class=""></o:p></span></div><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class=""><br class="">AssertionError: False is not True<br class=""><br class="">Config=x86_64-E:\_work\55\b\LLVMBuild\Release\bin\clang.exe<br class=""><br class="">----------------------------------------------------------------------<br class=""><br class="">There are several different failures on Linux. Here's the first one:<br class=""><br class="">FAIL: LLDB (/vstsdrive/_work/38/b/LLVMBuild/bin/clang-8-x86_64) :: test_dwarf (lldbsuite.test.lldbtest.TestDisambiguateCallSite)<br class=""><br class="">--- FileCheck trace (code=1) ---<br class="">/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 class=""><br class="">FileCheck input:<br class="">* thread #1, name = 'a.out', stop reason = breakpoint 1.1<br class=""> * frame #0: 0x0000000000400580 a.out`sink() at main.cpp:13:4 [opt]<br class=""> frame #1: 0x00000000004005b8 a.out`main(argc=1, (null)=<unavailable>) at main.cpp:28:3 [opt]<br class=""> frame #2: 0x00007f980aff7830 libc.so.6`__libc_start_main + 240<br class=""> frame #3: 0x00000000004004a9 a.out`_start + 41<o:p class=""></o:p></span></div></blockquote><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class=""><br class="">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 class=""><br class="">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 class=""><br class="">vedant<br class=""><br class=""><br style="caret-color: rgb(0, 0, 0); font-variant-caps: normal; text-align: start; -webkit-text-stroke-width: 0px; word-spacing: 0px;" class=""><br class=""></span><span style="font-size: 10.5pt; font-family: Helvetica, sans-serif;" class=""><o:p class=""></o:p></span></div><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class=""><br class=""><br class="">FileCheck output:<br class=""><br class="">/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 class=""> // CHECK-NEXT: func2{{.*}} [opt] [artificial]<br class=""> ^<br class=""><stdin>:3:2: note: scanning from here<br class=""> frame #1: 0x00000000004005b8 a.out`main(argc=1, (null)=<unavailable>) at main.cpp:28:3 [opt]<br class=""> ^<br class=""><stdin>:3:80: note: possible intended match here<br class=""> frame #1: 0x00000000004005b8 a.out`main(argc=1, (null)=<unavailable>) at main.cpp:28:3 [opt]<br class=""> ^<br class=""><br class="">Let me know if you need more logs.<br class=""><br class=""><br class="">Repository:<br class="">rLLDB LLDB<br class=""><br class=""></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;" class=""><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">https://reviews.llvm.org/D50478</span></a></div></blockquote></div></blockquote></div></blockquote></div></div></blockquote></div><br class=""></body></html>