[llvm-branch-commits] [compiler-rt] [llvm] [ctxprof] Track unhandled call targets (PR #131417)
Snehasish Kumar via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Mon Mar 17 21:10:06 PDT 2025
================
@@ -265,7 +275,16 @@ Error llvm::createCtxProfFromYAML(StringRef Profile, raw_ostream &Out) {
if (!TopList)
return createStringError(
"Unexpected error converting internal structure to ctx profile");
- Writer.writeContextual(*TopList, DC.TotalRootEntryCount);
+
+ ctx_profile::ContextNode *FirstUnhandled = nullptr;
+ for (const auto &U : DC.Unhandled) {
+ SerializableCtxRepresentation Unhandled;
+ Unhandled.Guid = U.first;
+ Unhandled.Counters.insert(Unhandled.Counters.begin(), U.second.begin(),
----------------
snehasish wrote:
Repeatedly inserting in the front is inefficient. How about reserve(size), append and then reverse the vector?
https://github.com/llvm/llvm-project/pull/131417
More information about the llvm-branch-commits
mailing list