[clang] [llvm] [TimeProfiler][Clang] Add zstd-compressed time-trace output support (PR #228627)
Alina Sbirlea via llvm-commits
llvm-commits at lists.llvm.org
Sun Oct 4 12:18:17 PDT 2026
================
@@ -437,14 +474,35 @@ Error llvm::timeTraceProfilerWrite(StringRef PreferredFileName,
if (Path.empty()) {
Path = FallbackFileName == "-" ? "out" : FallbackFileName.str();
Path += TimeTraceFileExtension;
+ if (TimeTraceProfilerInstance->TimeTraceCompress ==
----------------
alinas wrote:
I find this section confusing, because it makes it look like you could update CompressType when the path is empty and I *think* that shouldn't happen?
Does the following make sense:
```
DebugCompressionType CompressType =
TimeTraceProfilerInstance->TimeTraceCompress;
if (Path.empty()) {
Path = FallbackFileName == "-" ? "out" : FallbackFileName.str();
Path += TimeTraceFileExtension;
if (CompressType == DebugCompressionType::Zstd)
Path += ".zst";
} else if (CompressType == DebugCompressionType::None) {
CompressType = inferTimeTraceCompressionFromPath(Path);
}
if (CompressType != DebugCompressionType::None) {
[...]
```
https://github.com/llvm/llvm-project/pull/228627
More information about the llvm-commits
mailing list