[PATCH] D135657: add time traces for AST serialization
Jan Svoboda via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 19 12:16:47 PDT 2022
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(
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D135657.469006.patch
Type: text/x-patch
Size: 1771 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20221019/00f8a317/attachment.bin>
More information about the cfe-commits
mailing list