LLVM API Documentation
#include <Process.h>
Static Public Member Functions | |
Accessors | |
static unsigned | GetPageSize () |
Get the virtual memory page size. | |
static size_t | GetMallocUsage () |
Return process memory usage. | |
static size_t | GetTotalMemoryUsage () |
static void | GetTimeUsage (TimeValue &elapsed, TimeValue &user_time, TimeValue &sys_time) |
static int | GetCurrentUserId () |
static int | GetCurrentGroupId () |
static void | PreventCoreFiles () |
Prevent core file generation. | |
static bool | StandardInIsUserInput () |
static bool | StandardOutIsDisplayed () |
static bool | StandardErrIsDisplayed () |
This class provides an abstraction for getting information about the currently executing process.
Definition at line 27 of file Process.h.
unsigned llvm::Process::GetPageSize | ( | ) | [static] |
Get the virtual memory page size.
This static function will return the operating system's virtual memory page size.
nothing |
Definition at line 25 of file Unix/SUS/Process.cpp.
static size_t llvm::sys::Process::GetMallocUsage | ( | ) | [static] |
Return process memory usage.
This static function will return the total amount of memory allocated by the process. This only counts the memory allocated via the malloc, calloc and realloc functions and includes any "free" holes in the allocated space.
nothing |
Referenced by getMemUsage().
static size_t llvm::sys::Process::GetTotalMemoryUsage | ( | ) | [static] |
This static function will return the total memory usage of the process. This includes code, data, stack and mapped pages usage. Notei that the value returned here is not necessarily the Running Set Size, it is the total virtual memory usage, regardless of mapped state of that memory.
static void llvm::sys::Process::GetTimeUsage | ( | TimeValue & | elapsed, | |
TimeValue & | user_time, | |||
TimeValue & | sys_time | |||
) | [static] |
This static function will set user_time
to the amount of CPU time spent in user (non-kernel) mode and sys_time
to the amount of CPU time spent in system (kernel) mode. If the operating system does not support collection of these metrics, a zero TimeValue will be for both values.
elapsed | Returns the TimeValue::now() giving current time |
user_time | Returns the current amount of user time for the process |
sys_time | Returns the current amount of system time for the process |
Referenced by getTimeRecord().
static int llvm::sys::Process::GetCurrentUserId | ( | ) | [static] |
This static function will return the process' current user id number. Not all operating systems support this feature. Where it is not supported, the function should return 65536 as the value.
Referenced by llvm::ArchiveMember::ArchiveMember(), and llvm::Archive::writeSymbolTable().
static int llvm::sys::Process::GetCurrentGroupId | ( | ) | [static] |
This static function will return the process' current group id number. Not all operating systems support this feature. Where it is not supported, the function should return 65536 as the value.
Referenced by llvm::ArchiveMember::ArchiveMember(), and llvm::Archive::writeSymbolTable().
static void llvm::sys::Process::PreventCoreFiles | ( | ) | [static] |
Prevent core file generation.
This function makes the necessary calls to the operating system to prevent core files or any other kind of large memory dumps that can occur when a program fails.
static bool llvm::sys::Process::StandardInIsUserInput | ( | ) | [static] |
This function determines if the standard input is connected directly to a user's input (keyboard probably), rather than coming from a file or pipe.
static bool llvm::sys::Process::StandardOutIsDisplayed | ( | ) | [static] |
This function determines if the standard output is connected to a "tty" or "console" window. That is, the output would be displayed to the user rather than being put on a pipe or stored in a file.
Referenced by llvm::CheckBytecodeOutputToConsole().
static bool llvm::sys::Process::StandardErrIsDisplayed | ( | ) | [static] |
This function determines if the standard error is connected to a "tty" or "console" window. That is, the output would be displayed to the user rather than being put on a pipe or stored in a file.