llvm-6502/include/llvm/Support
Chandler Carruth 73c35d86b9 Add time getters to the process interface for requesting the elapsed
wall time, user time, and system time since a process started.

For walltime, we currently use TimeValue's interface and a global
initializer to compute a close approximation of total process runtime.

For user time, this adds support for an somewhat more precise timing
mechanism -- clock_gettime with the CLOCK_PROCESS_CPUTIME_ID clock
selected.

For system time, we have to do a full getrusage call to extract the
system time from the OS. This is expensive but unavoidable.

In passing, clean up the implementation of the old APIs and fix some
latent bugs in the Windows code. This might have manifested on Windows
ARM systems or other systems with strange 64-bit integer behavior.

The old API for this both user time and system time simultaneously from
a single getrusage call. While this results in fewer system calls, it
also results in a lower precision user time and if only user time is
desired, it introduces a higher overhead. It may be worthwhile to switch
some of the pass timers to not track system time and directly track user
and wall time. The old API also tracked walltime in a confusing way --
it just set it to the current walltime rather than providing any measure
of wall time since the process started the way buth user and system time
are tracked. The new API is more consistent here.

The plan is to eventually implement these methods for a *child* process
by using the wait3(2) system call to populate an rusage struct
representing the whole subprocess execution. That way, after waiting on
a child process its stats will become accurate and cheap to query.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171551 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-04 23:19:55 +00:00
..
AIXDataTypesFix.h
AlignOf.h Remove the declspecs from small alignments that we can force with 2012-12-31 22:18:01 +00:00
Allocator.h Sort the #include lines for the include/... tree with the script. 2012-12-03 17:02:12 +00:00
Atomic.h
BlockFrequency.h
BranchProbability.h
CallSite.h Move all of the header files which are involved in modelling the LLVM IR 2013-01-02 11:36:10 +00:00
Capacity.h
Casting.h Casting.h: Automatically handle isa<Base>(Derived). 2012-10-11 23:30:40 +00:00
CFG.h Move all of the header files which are involved in modelling the LLVM IR 2013-01-02 11:36:10 +00:00
circular_raw_ostream.h Use empty parens for empty function parameter list instead of '(void)'. 2012-11-15 16:51:49 +00:00
CodeGen.h
COFF.h
CommandLine.h Sort the #include lines for the include/... tree with the script. 2012-12-03 17:02:12 +00:00
Compiler.h Compiler.h: Leave LLVM_BUILTIN_UNREACHABLE undefined if it is unavailable in host compiler. 2013-01-03 03:30:22 +00:00
ConstantFolder.h Move all of the header files which are involved in modelling the LLVM IR 2013-01-02 11:36:10 +00:00
ConstantRange.h
CrashRecoveryContext.h
DataExtractor.h Add a relocation visitor to lib object. This works via caching relocated 2012-11-07 23:22:07 +00:00
DataFlow.h Move all of the header files which are involved in modelling the LLVM IR 2013-01-02 11:36:10 +00:00
DataStream.h
DataTypes.h.cmake
DataTypes.h.in
Debug.h
DebugLoc.h
Disassembler.h
DOTGraphTraits.h
Dwarf.h Add constant definitions for fission dwarf attributes, forms, etc. 2012-11-16 23:04:31 +00:00
DynamicLibrary.h
ELF.h PowerPC: Fix eh_frame relocation for PIC 2013-01-04 19:08:13 +00:00
Endian.h [Support][Endian] Add support for specifying the alignment and native unaligned types. 2013-01-02 20:14:11 +00:00
Errno.h
ErrorHandling.h Sort the #include lines for the include/... tree with the script. 2012-12-03 17:02:12 +00:00
FEnv.h
FileOutputBuffer.h [Support] Make FileOutputBuffer work on Windows. 2012-12-03 22:09:52 +00:00
FileSystem.h Switch LLVM_USE_RVALUE_REFERENCES to LLVM_HAS_RVALUE_REFERENCES. 2012-11-30 11:45:22 +00:00
FileUtilities.h
Format.h
FormattedStream.h
GCOV.h
GetElementPtrTypeIterator.h Move all of the header files which are involved in modelling the LLVM IR 2013-01-02 11:36:10 +00:00
GraphWriter.h Sort the #include lines for the include/... tree with the script. 2012-12-03 17:02:12 +00:00
Host.h
IncludeFile.h
InstIterator.h Move all of the header files which are involved in modelling the LLVM IR 2013-01-02 11:36:10 +00:00
IntegersSubset.h Move all of the header files which are involved in modelling the LLVM IR 2013-01-02 11:36:10 +00:00
IntegersSubsetMapping.h
IRReader.h
LeakDetector.h
LEB128.h
LICENSE.TXT
Locale.h
LockFileManager.h
MachO.h
ManagedStatic.h
MathExtras.h
Memory.h Correcting enum values mentioned in comments. 2012-10-12 21:47:49 +00:00
MemoryBuffer.h
MemoryObject.h
Mutex.h
MutexGuard.h
NoFolder.h Move all of the header files which are involved in modelling the LLVM IR 2013-01-02 11:36:10 +00:00
OutputBuffer.h
PassNameParser.h Sort the #include lines for the include/... tree with the script. 2012-12-03 17:02:12 +00:00
Path.h
PathV1.h
PathV2.h
PatternMatch.h Move all of the header files which are involved in modelling the LLVM IR 2013-01-02 11:36:10 +00:00
PluginLoader.h
PointerLikeTypeTraits.h
PredIteratorCache.h Sort the #include lines for the include/... tree with the script. 2012-12-03 17:02:12 +00:00
PrettyStackTrace.h
Process.h Add time getters to the process interface for requesting the elapsed 2013-01-04 23:19:55 +00:00
Program.h Make it explicit that the only entry points to the Program object are 2012-12-31 23:44:49 +00:00
raw_os_ostream.h
raw_ostream.h
Recycler.h Special case Recycler::clear(BumpPtrAllocator). 2013-01-04 22:35:45 +00:00
RecyclingAllocator.h
Regex.h Add backreference matching capabilities to Support/Regex, with 2012-11-28 19:00:02 +00:00
Registry.h
RegistryParser.h
RWMutex.h
SaveAndRestore.h
Signals.h
SMLoc.h
Solaris.h
SourceMgr.h Add support for passing -main-file-name all the way through to 2012-12-18 00:31:01 +00:00
StreamableMemoryObject.h Sort the #include lines for the include/... tree with the script. 2012-12-03 17:02:12 +00:00
StringPool.h Sort the #include lines for the include/... tree with the script. 2012-12-03 17:02:12 +00:00
SwapByteOrder.h
system_error.h
SystemUtils.h
TargetFolder.h Move all of the header files which are involved in modelling the LLVM IR 2013-01-02 11:36:10 +00:00
TargetRegistry.h Remove MCTargetAsmLexer and its derived classes now that edis, 2012-12-20 14:43:30 +00:00
TargetSelect.h
Threading.h
ThreadLocal.h Sort the #include lines for the include/... tree with the script. 2012-12-03 17:02:12 +00:00
Timer.h Sort the #include lines for the include/... tree with the script. 2012-12-03 17:02:12 +00:00
TimeValue.h Don't #include stuff outside the include guards. 2013-01-02 19:42:53 +00:00
ToolOutputFile.h
type_traits.h
Valgrind.h Sort the #include lines for the include/... tree with the script. 2012-12-03 17:02:12 +00:00
ValueHandle.h Move all of the header files which are involved in modelling the LLVM IR 2013-01-02 11:36:10 +00:00
Win64EH.h Updates to Win64EH.h structures. 2012-12-05 20:12:13 +00:00
YAMLParser.h Sort the #include lines for the include/... tree with the script. 2012-12-03 17:02:12 +00:00
YAMLTraits.h Fix how YAML I/O detects flow sequences. 2013-01-04 19:32:00 +00:00