This revision was automatically updated to reflect the committed changes. Closed by commit rG12d007d4ba21: [clang][modules] Add time traces for AST serialization (authored by Trass3r, committed by jansvoboda11).
Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135657/new/ https://reviews.llvm.org/D135657 Files: clang/lib/Serialization/ASTReader.cpp clang/lib/Serialization/ASTWriter.cpp Index: clang/lib/Serialization/ASTWriter.cpp =================================================================== --- clang/lib/Serialization/ASTWriter.cpp +++ clang/lib/Serialization/ASTWriter.cpp @@ -100,6 +100,7 @@ #include "llvm/Support/OnDiskHashTable.h" #include "llvm/Support/Path.h" #include "llvm/Support/SHA1.h" +#include "llvm/Support/TimeProfiler.h" #include "llvm/Support/VersionTuple.h" #include "llvm/Support/raw_ostream.h" #include <algorithm> @@ -4484,6 +4485,7 @@ Module *WritingModule, StringRef isysroot, bool hasErrors, bool ShouldCacheASTInMemory) { + llvm::TimeTraceScope scope("WriteAST", OutputFile); WritingAST = true; ASTHasCompilerErrors = hasErrors; Index: clang/lib/Serialization/ASTReader.cpp =================================================================== --- clang/lib/Serialization/ASTReader.cpp +++ clang/lib/Serialization/ASTReader.cpp @@ -122,6 +122,7 @@ #include "llvm/Support/MemoryBuffer.h" #include "llvm/Support/Path.h" #include "llvm/Support/SaveAndRestore.h" +#include "llvm/Support/TimeProfiler.h" #include "llvm/Support/Timer.h" #include "llvm/Support/VersionTuple.h" #include "llvm/Support/raw_ostream.h" @@ -4208,6 +4209,8 @@ SourceLocation ImportLoc, unsigned ClientLoadCapabilities, SmallVectorImpl<ImportedSubmodule> *Imported) { + llvm::TimeTraceScope scope("ReadAST", FileName); + llvm::SaveAndRestore<SourceLocation> SetCurImportLocRAII(CurrentImportLoc, ImportLoc); llvm::SaveAndRestore<Optional<ModuleKind>> SetCurModuleKindRAII(
Index: clang/lib/Serialization/ASTWriter.cpp =================================================================== --- clang/lib/Serialization/ASTWriter.cpp +++ clang/lib/Serialization/ASTWriter.cpp @@ -100,6 +100,7 @@ #include "llvm/Support/OnDiskHashTable.h" #include "llvm/Support/Path.h" #include "llvm/Support/SHA1.h" +#include "llvm/Support/TimeProfiler.h" #include "llvm/Support/VersionTuple.h" #include "llvm/Support/raw_ostream.h" #include <algorithm> @@ -4484,6 +4485,7 @@ Module *WritingModule, StringRef isysroot, bool hasErrors, bool ShouldCacheASTInMemory) { + llvm::TimeTraceScope scope("WriteAST", OutputFile); WritingAST = true; ASTHasCompilerErrors = hasErrors; Index: clang/lib/Serialization/ASTReader.cpp =================================================================== --- clang/lib/Serialization/ASTReader.cpp +++ clang/lib/Serialization/ASTReader.cpp @@ -122,6 +122,7 @@ #include "llvm/Support/MemoryBuffer.h" #include "llvm/Support/Path.h" #include "llvm/Support/SaveAndRestore.h" +#include "llvm/Support/TimeProfiler.h" #include "llvm/Support/Timer.h" #include "llvm/Support/VersionTuple.h" #include "llvm/Support/raw_ostream.h" @@ -4208,6 +4209,8 @@ SourceLocation ImportLoc, unsigned ClientLoadCapabilities, SmallVectorImpl<ImportedSubmodule> *Imported) { + llvm::TimeTraceScope scope("ReadAST", FileName); + llvm::SaveAndRestore<SourceLocation> SetCurImportLocRAII(CurrentImportLoc, ImportLoc); llvm::SaveAndRestore<Optional<ModuleKind>> SetCurModuleKindRAII(
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits