jimingham wrote:

This is compiling the "get me extended backtrace info function".  That's a 
ClangFunction, so we should only compile it once and then reuse it for the rest 
of the session.  Is it possible we aren't reusing this?  After all, this is a 
compile of a function that's pretty careful not to have a lot of external type 
references, so it is odd it's taking that long to compile!

Jim


> On Aug 23, 2024, at 7:09 PM, jeffreytan81 ***@***.***> wrote:
> 
> 
> And just for fun, here is an extreme one with 18 seconds of sampling time, 
> 99.6% time is from this hot path. Note: they are all from linux machines 
> because we only enable perf sampling by default for linux platform so we have 
> no Mac data.
> 
> # time of first sample : 2646936.334980
> # time of last sample : 2646954.518041
> # sample duration :  18183.061 ms
> 
>     99.63%     0.00%  lldb-dap         lldb-dap              [.] main
>             |
>             ---main
>                lldb_dap::DAP::Loop()
>                lldb_dap::DAP::HandleObject(llvm::json::Object const&)
>                (anonymous namespace)::request_stackTrace(llvm::json::Object 
> const&)
>                |
>                 --99.60%--lldb::SBThread::GetCurrentExceptionBacktrace()
>                           lldb_private::Thread::GetCurrentExceptionBacktrace()
>                           lldb_private::Thread::GetCurrentException()
>                           
> lldb_private::ItaniumABILanguageRuntime::GetExceptionObjectForThread(std::shared_ptr<lldb_private::Thread>)
>                           |
>                            
> --99.60%--lldb_private::FunctionCaller::ExecuteFunction(lldb_private::ExecutionContext&,
>  unsigned long*, lldb_private::EvaluateExpressionOptions const&, 
> lldb_private::DiagnosticManager&, lldb_private::Value&)
>                                      |
>                                      
> |--44.33%--lldb_private::ClangFunctionCaller::CompileFunction(std::shared_ptr<lldb_private::Thread>,
>  lldb_private::DiagnosticManager&)
>                                      |          |
>                                      |          
> |--39.56%--lldb_private::ClangExpressionParser::ParseInternal(lldb_private::DiagnosticManager&,
>  clang::CodeCompleteConsumer*, unsigned int, unsigned int)
>                                      |          |          |
>                                      |          |          
> |--21.86%--clang::ParseAST(clang::Sema&, bool, bool)
>                                      |          |          |          |
>                                      |          |          |          
> |--17.47%--clang::Parser::ParseFirstTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&,
>  clang::Sema::ModuleImportState&)
>                                      |          |          |          |       
>    clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&, 
> clang::Sema::ModuleImportState&)
>                                      |          |          |          |       
>    clang::Parser::ParseExternalDeclaration(clang::ParsedAttributes&, 
> clang::ParsedAttributes&, clang::ParsingDeclSpec*)
>                                      |          |          |          |       
>    
> clang::Parser::ParseDeclarationOrFunctionDefinition(clang::ParsedAttributes&, 
> clang::ParsedAttributes&, clang::ParsingDeclSpec*, clang::AccessSpecifier)
>                                      |          |          |          |       
>    clang::Parser::ParseDeclOrFunctionDefInternal(clang::ParsedAttributes&, 
> clang::ParsedAttributes&, clang::ParsingDeclSpec&,
> ...
> —
> Reply to this email directly, view it on GitHub 
> <https://github.com/llvm/llvm-project/pull/104874#issuecomment-2307993033>, 
> or unsubscribe 
> <https://github.com/notifications/unsubscribe-auth/ADUPVW5UFKUQGIOZS4ZFHUDZS7TNBAVCNFSM6AAAAABMYVIOMOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMBXHE4TGMBTGM>.
> You are receiving this because your review was requested.
> 



https://github.com/llvm/llvm-project/pull/104874
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to