[clang] [llvm] Added instant events and marking defered templated instantiation. (PR #103039)
Ilya Biryukov via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 29 09:46:30 PDT 2024
================
@@ -406,34 +450,50 @@ TimeTraceProfilerEntry *llvm::timeTraceProfilerBegin(StringRef Name,
StringRef Detail) {
if (TimeTraceProfilerInstance != nullptr)
return TimeTraceProfilerInstance->begin(
- std::string(Name), [&]() { return std::string(Detail); }, false);
+ std::string(Name), [&]() { return std::string(Detail); },
+ TimeTraceEventType::CompleteEvent);
return nullptr;
}
TimeTraceProfilerEntry *
llvm::timeTraceProfilerBegin(StringRef Name,
llvm::function_ref<std::string()> Detail) {
if (TimeTraceProfilerInstance != nullptr)
- return TimeTraceProfilerInstance->begin(std::string(Name), Detail, false);
+ return TimeTraceProfilerInstance->begin(std::string(Name), Detail,
+ TimeTraceEventType::CompleteEvent);
return nullptr;
}
TimeTraceProfilerEntry *
llvm::timeTraceProfilerBegin(StringRef Name,
llvm::function_ref<TimeTraceMetadata()> Metadata) {
if (TimeTraceProfilerInstance != nullptr)
- return TimeTraceProfilerInstance->begin(std::string(Name), Metadata, false);
+ return TimeTraceProfilerInstance->begin(std::string(Name), Metadata,
+ TimeTraceEventType::CompleteEvent);
return nullptr;
}
TimeTraceProfilerEntry *llvm::timeTraceAsyncProfilerBegin(StringRef Name,
StringRef Detail) {
if (TimeTraceProfilerInstance != nullptr)
return TimeTraceProfilerInstance->begin(
- std::string(Name), [&]() { return std::string(Detail); }, true);
+ std::string(Name), [&]() { return std::string(Detail); },
+ TimeTraceEventType::AsyncEvent);
return nullptr;
}
+void llvm::timeTraceProfilerInsert(StringRef Name, StringRef Detail) {
----------------
ilya-biryukov wrote:
NIT: could we rename this to `timeTraceInstantEvent`?
It should make the uses more obvious, right now `Insert` seems to be open for interpretation.
https://github.com/llvm/llvm-project/pull/103039
More information about the cfe-commits
mailing list