forked from OSchip/llvm-project
Revert "Reland "[Modules] Add stats to measure performance of building and loading modules.""
This reverts commit 4000c9ee18
.
Test "LLVM :: Other/statistic.ll" is failing on Windows.
This commit is contained in:
parent
3a85472af2
commit
a28678e20a
|
@ -55,10 +55,6 @@
|
|||
|
||||
using namespace clang;
|
||||
|
||||
#define DEBUG_TYPE "modules"
|
||||
|
||||
ALWAYS_ENABLED_STATISTIC(NumCompiledModules, "Number of compiled modules.");
|
||||
|
||||
CompilerInstance::CompilerInstance(
|
||||
std::shared_ptr<PCHContainerOperations> PCHContainerOps,
|
||||
InMemoryModuleCache *SharedModuleCache)
|
||||
|
@ -1067,7 +1063,6 @@ compileModuleImpl(CompilerInstance &ImportingInstance, SourceLocation ImportLoc,
|
|||
llvm::function_ref<void(CompilerInstance &)> PostBuildStep =
|
||||
[](CompilerInstance &) {}) {
|
||||
llvm::TimeTraceScope TimeScope("Module Compile", ModuleName);
|
||||
++NumCompiledModules;
|
||||
|
||||
// Construct a compiler invocation for creating this module.
|
||||
auto Invocation =
|
||||
|
|
|
@ -100,7 +100,6 @@
|
|||
#include "llvm/ADT/SmallPtrSet.h"
|
||||
#include "llvm/ADT/SmallString.h"
|
||||
#include "llvm/ADT/SmallVector.h"
|
||||
#include "llvm/ADT/Statistic.h"
|
||||
#include "llvm/ADT/StringExtras.h"
|
||||
#include "llvm/ADT/StringMap.h"
|
||||
#include "llvm/ADT/StringRef.h"
|
||||
|
@ -143,15 +142,6 @@ using namespace clang::serialization::reader;
|
|||
using llvm::BitstreamCursor;
|
||||
using llvm::RoundingMode;
|
||||
|
||||
#define DEBUG_TYPE "modules"
|
||||
|
||||
ALWAYS_ENABLED_STATISTIC(NumTryLoadModule, "Number of times tried to load a "
|
||||
"module. Includes failed attempts "
|
||||
"and using cached results.");
|
||||
ALWAYS_ENABLED_STATISTIC(NumReadASTCore,
|
||||
"Number of ReadASTCore() invocations. Includes only "
|
||||
"actual AST core parsing and ignores cached results.");
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// ChainedASTReaderListener implementation
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
@ -4213,7 +4203,6 @@ ASTReader::ASTReadResult ASTReader::ReadAST(StringRef FileName,
|
|||
SourceLocation ImportLoc,
|
||||
unsigned ClientLoadCapabilities,
|
||||
SmallVectorImpl<ImportedSubmodule> *Imported) {
|
||||
++NumTryLoadModule;
|
||||
llvm::SaveAndRestore<SourceLocation>
|
||||
SetCurImportLocRAII(CurrentImportLoc, ImportLoc);
|
||||
|
||||
|
@ -4563,7 +4552,6 @@ ASTReader::ReadASTCore(StringRef FileName,
|
|||
return Failure;
|
||||
}
|
||||
|
||||
++NumReadASTCore;
|
||||
// This is used for compatibility with older PCH formats.
|
||||
bool HaveReadControlBlock = false;
|
||||
while (true) {
|
||||
|
|
|
@ -12,7 +12,6 @@
|
|||
|
||||
#include "llvm/Support/Path.h"
|
||||
#include "llvm/ADT/ArrayRef.h"
|
||||
#include "llvm/ADT/Statistic.h"
|
||||
#include "llvm/Config/llvm-config.h"
|
||||
#include "llvm/Support/Endian.h"
|
||||
#include "llvm/Support/Errc.h"
|
||||
|
@ -32,10 +31,6 @@
|
|||
using namespace llvm;
|
||||
using namespace llvm::support::endian;
|
||||
|
||||
#define DEBUG_TYPE "file-system"
|
||||
|
||||
ALWAYS_ENABLED_STATISTIC(NumStatusCalls, "Number of `status` calls.");
|
||||
|
||||
namespace {
|
||||
using llvm::StringRef;
|
||||
using llvm::sys::path::is_separator;
|
||||
|
|
|
@ -736,7 +736,6 @@ static std::error_code fillStatus(int StatRet, const struct stat &Status,
|
|||
}
|
||||
|
||||
std::error_code status(const Twine &Path, file_status &Result, bool Follow) {
|
||||
++NumStatusCalls;
|
||||
SmallString<128> PathStorage;
|
||||
StringRef P = Path.toNullTerminatedStringRef(PathStorage);
|
||||
|
||||
|
@ -746,7 +745,6 @@ std::error_code status(const Twine &Path, file_status &Result, bool Follow) {
|
|||
}
|
||||
|
||||
std::error_code status(int FD, file_status &Result) {
|
||||
++NumStatusCalls;
|
||||
struct stat Status;
|
||||
int StatRet = ::fstat(FD, &Status);
|
||||
return fillStatus(StatRet, Status, Result);
|
||||
|
|
|
@ -710,7 +710,6 @@ handle_status_error:
|
|||
}
|
||||
|
||||
std::error_code status(const Twine &path, file_status &result, bool Follow) {
|
||||
++NumStatusCalls;
|
||||
SmallString<128> path_storage;
|
||||
SmallVector<wchar_t, 128> path_utf16;
|
||||
|
||||
|
@ -743,13 +742,11 @@ std::error_code status(const Twine &path, file_status &result, bool Follow) {
|
|||
}
|
||||
|
||||
std::error_code status(int FD, file_status &Result) {
|
||||
++NumStatusCalls;
|
||||
HANDLE FileHandle = reinterpret_cast<HANDLE>(_get_osfhandle(FD));
|
||||
return getStatus(FileHandle, Result);
|
||||
}
|
||||
|
||||
std::error_code status(file_t FileHandle, file_status &Result) {
|
||||
++NumStatusCalls;
|
||||
return getStatus(FileHandle, Result);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue