<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><i>Have you considered putting begin/end markers in the lexer for when we<br>
enter and leave a file, to make it easier to see which header files<br>
are expensive?<br></i></blockquote><div><br></div><div>Not the lexer per se, but my current patch does have sections for "which files the frontend spends time on", that I implemented by adding begin/end sections in SemaPPCallbacks (code around here <a href="https://github.com/aras-p/llvm-project-20170507/pull/2/files#diff-2856c75f844d1133220fc68717852bf1R98">https://github.com/aras-p/llvm-project-20170507/pull/2/files#diff-2856c75f844d1133220fc68717852bf1R98</a>).</div><div><br></div><div>The files are visible in any tracing viewer, e.g. SpeedScope (<a href="https://www.speedscope.app/">https://www.speedscope.app/</a>) nicely displays their filenames: <a href="http://aras-p.info/img/blog/2019/clang-timetrace-speedscope.png">http://aras-p.info/img/blog/2019/clang-timetrace-speedscope.png</a></div><div><br></div><div><br></div><div><br></div></div>-- <br><div dir="ltr" class="gmail_signature">Aras Pranckevičius<br>work: <a href="http://unity3d.com" target="_blank">http://unity3d.com</a><br>home: <a href="http://aras-p.info" target="_blank">http://aras-p.info</a></div><div dir="ltr" class="gmail_signature"><br></div></div></div></div></div>