Classes | |
struct | ImageLoaderInfo |
struct | LINUX_LOADER_IMAGE_INFO |
Typedefs | |
typedef PINVM::PINSYNC_POD_LOCK | PIN_MUTEX |
typedef PINVM::PINSYNC_POD_RWLOCK | PIN_RWMUTEX |
typedef PINVM::PINSYNC_POD_SEMAPHORE | PIN_SEMAPHORE |
typedef BOOL(*) | MESSAGE_CALLBACK (const string &message, PIN_ERRTYPE type, INT32 userType, INT32 severity, INT32 numArgs, va_list ap) |
typedef STAT_INTEGRAL< UINT32 > | STAT_UINT32 |
typedef STAT_INTEGRAL< SIZE > | STAT_SIZE |
typedef STAT_INTEGRAL< UINT64 > | STAT_UINT64 |
typedef STAT_INTEGRAL< INT64 > | STAT_INT64 |
typedef STAT_SINGLE< FLT32 > | STAT_FLT32 |
typedef STAT_SINGLE< FLT64 > | STAT_FLT64 |
typedef STAT_FLT64 | STAT1 |
typedef INT32 | TLS_KEY |
typedef UINT8 | REGTYPE |
typedef UINT64 | REG_CLASS_BITS |
typedef VOID(*) | AFUNPTR () |
typedef VOID *(*) | THREAD_STARTROUTINE (void *) |
typedef VOID(*) | DESTRUCTFUN (void *) |
typedef UINT16 | OPCODE |
typedef PREDICATE_IA32 | PREDICATE |
Enumerations | |
enum | KNOB_MODE { KNOB_MODE_INVALID, KNOB_MODE_COMMENT, KNOB_MODE_WRITEONCE, KNOB_MODE_OVERWRITE, KNOB_MODE_ACCUMULATE, KNOB_MODE_APPEND, KNOB_MODE_LAST } |
enum | LOGTYPE { LOGTYPE_CONSOLE, LOGTYPE_LOGFILE, LOGTYPE_CONSOLE_AND_LOGFILE } |
enum | PIN_LOAD_STATUS { PIN_LOAD_STATUS_INVALID, PIN_LOAD_STATUS_INJECTOR, PIN_LOAD_STATUS_ATTACHED, PIN_LOAD_STATUS_CLEAR, PIN_LOAD_STATUS_CHILD_RUNS_APP, PIN_LOAD_STATUS_PARENT_RUNS_APP, PIN_LOAD_STATUS_SELF_RUNS_APP, PIN_LOAD_STATUS_DETACHED_LITE, PIN_LOAD_STATUS_DETACHED_FULL } |
enum | REGALLOC_HINT_TYPE { REGALLOC_HINT_INVALID, REGALLOC_HINT_FREEBEFORE, REGALLOC_HINT_FREEAFTER, REGALLOC_HINT_REG_IN_PREG_AFTER, REGALLOC_HINT_REG_IN_MEM_AFTER } |
enum | STAT_TYPE { STAT_TYPE_INVALID, STAT_TYPE_SINGLE, STAT_TYPE_SD, STAT_TYPE_BA, STAT_TYPE_NORM } |
enum | PREDICATE_IA32 { PREDICATE_ALWAYS_TRUE, PREDICATE_INVALID, PREDICATE_BELOW, PREDICATE_BELOW_OR_EQUAL, PREDICATE_LESS, PREDICATE_LESS_OR_EQUAL, PREDICATE_NOT_BELOW, PREDICATE_NOT_BELOW_OR_EQUAL, PREDICATE_NOT_LESS, PREDICATE_NOT_LESS_OR_EQUAL, PREDICATE_NOT_OVERFLOW, PREDICATE_NOT_PARITY, PREDICATE_NOT_SIGN, PREDICATE_NOT_ZERO, PREDICATE_OVERFLOW, PREDICATE_PARITY, PREDICATE_SIGN, PREDICATE_ZERO, PREDICATE_CX_NON_ZERO, PREDICATE_ECX_NON_ZERO, PREDICATE_RCX_NON_ZERO, PREDICATE_SAVED_GCX_NON_ZERO, PREDICATE_LAST } |
enum | CPU_FEATURE { CPU_FEATURE_FIRST = 0, CPU_FEATURE_SSE = CPU_FEATURE_FIRST, CPU_FEATURE_SSE2, CPU_FEATURE_SSE3, CPU_FEATURE_EST, CPU_FEATURE_PBE, CPU_FEATURE_FXSR, CPU_FEATURE_CX8, CPU_FEATURE_CMOV, CPU_FEATURE_LAHF_SAHF, CPU_FEATURE_AVX, CPU_FEATURE_AVX2, CPU_FEATURE_LAST = CPU_FEATURE_AVX2 } |
enum | CPU_XFEATURE_BIT { CPU_XFEATURE_BIT_X87 = (1 << 0), CPU_XFEATURE_BIT_SSE = (1 << 1), CPU_XFEATURE_BIT_AVX = (1 << 2) } |
enum | REG { REG_INVALID_ = 0, REG_GR_BASE = REG_RBASE, REG_EDI = REG_GR_BASE, REG_GDI = REG_EDI, REG_ESI, REG_GSI = REG_ESI, REG_EBP, REG_GBP = REG_EBP, REG_ESP, REG_STACK_PTR = REG_ESP, REG_EBX, REG_GBX = REG_EBX, REG_EDX, REG_GDX = REG_EDX, REG_ECX, REG_GCX = REG_ECX, REG_EAX, REG_GAX = REG_EAX, REG_GR_LAST = REG_EAX, REG_SEG_BASE, REG_SEG_CS = REG_SEG_BASE, REG_SEG_SS, REG_SEG_DS, REG_SEG_ES, REG_SEG_FS, REG_SEG_GS, REG_SEG_LAST = REG_SEG_GS, REG_EFLAGS, REG_GFLAGS = REG_EFLAGS, REG_EIP, REG_INST_PTR = REG_EIP, REG_AL, REG_AH, REG_AX, REG_CL, REG_CH, REG_CX, REG_DL, REG_DH, REG_DX, REG_BL, REG_BH, REG_BX, REG_BP, REG_SI, REG_DI, REG_SP, REG_FLAGS, REG_IP, REG_MM_BASE, REG_MM0 = REG_MM_BASE, REG_MM1, REG_MM2, REG_MM3, REG_MM4, REG_MM5, REG_MM6, REG_MM7, REG_MM_LAST = REG_MM7, REG_EMM_BASE, REG_EMM0 = REG_EMM_BASE, REG_EMM1, REG_EMM2, REG_EMM3, REG_EMM4, REG_EMM5, REG_EMM6, REG_EMM7, REG_EMM_LAST = REG_EMM7, REG_X87, REG_XMM_BASE, REG_FIRST_FP_REG = REG_XMM_BASE, REG_XMM0 = REG_XMM_BASE, REG_XMM1, REG_XMM2, REG_XMM3, REG_XMM4, REG_XMM5, REG_XMM6, REG_XMM7, REG_XMM_LAST = REG_XMM7, REG_YMM_BASE, REG_YMM0 = REG_YMM_BASE, REG_YMM1, REG_YMM2, REG_YMM3, REG_YMM4, REG_YMM5, REG_YMM6, REG_YMM7, REG_YMM_LAST = REG_YMM7, REG_ZMM_BASE, REG_ZMM_LAST = REG_ZMM_BASE, REG_K_BASE, REG_K_LAST = REG_K_BASE, REG_MXCSR, REG_MXCSRMASK, REG_ORIG_EAX, REG_ORIG_GAX = REG_ORIG_EAX, REG_DR_BASE, REG_DR0 = REG_DR_BASE, REG_DR1, REG_DR2, REG_DR3, REG_DR4, REG_DR5, REG_DR6, REG_DR7, REG_DR_LAST = REG_DR7, REG_CR_BASE, REG_CR0 = REG_CR_BASE, REG_CR1, REG_CR2, REG_CR3, REG_CR4, REG_CR_LAST = REG_CR4, REG_TSSR, REG_LDTR, REG_TR_BASE, REG_TR = REG_TR_BASE, REG_TR3, REG_TR4, REG_TR5, REG_TR6, REG_TR7, REG_TR_LAST = REG_TR7, REG_FPST_BASE, REG_FPSTATUS_BASE = REG_FPST_BASE, REG_FPCW = REG_FPSTATUS_BASE, REG_FPSW, REG_FPTAG, REG_FPIP_OFF, REG_FPIP_SEL, REG_FPOPCODE, REG_FPDP_OFF, REG_FPDP_SEL, REG_FPSTATUS_LAST = REG_FPDP_SEL, REG_FPTAG_FULL, REG_ST_BASE, REG_ST0 = REG_ST_BASE, REG_ST1, REG_ST2, REG_ST3, REG_ST4, REG_ST5, REG_ST6, REG_ST7, REG_ST_LAST = REG_ST7, REG_FPST_LAST = REG_ST_LAST, REG_SEG_GS_BASE, REG_SEG_FS_BASE, REG_INST_BASE, REG_INST_SCRATCH_BASE = REG_INST_BASE, REG_INST_G0 = REG_INST_SCRATCH_BASE, REG_INST_G1, REG_INST_G2, REG_INST_G3, REG_INST_G4, REG_INST_G5, REG_INST_G6, REG_INST_G7, REG_INST_G8, REG_INST_G9, REG_INST_G10, REG_INST_G11, REG_INST_G12, REG_INST_G13, REG_INST_G14, REG_INST_G15, REG_INST_G16, REG_INST_G17, REG_INST_G18, REG_INST_G19, REG_INST_G20, REG_INST_G21, REG_INST_G22, REG_INST_G23, REG_INST_G24, REG_INST_G25, REG_INST_G26, REG_INST_G27, REG_INST_G28, REG_INST_G29, REG_INST_TOOL_FIRST = REG_INST_G0, REG_INST_TOOL_LAST = REG_INST_G29, REG_BUF_BASE0, REG_BUF_BASE1, REG_BUF_BASE2, REG_BUF_BASE3, REG_BUF_BASE4, REG_BUF_BASE5, REG_BUF_BASE6, REG_BUF_BASE7, REG_BUF_BASE8, REG_BUF_BASE9, REG_BUF_BASE_LAST = REG_BUF_BASE9, REG_BUF_END0, REG_BUF_END1, REG_BUF_END2, REG_BUF_END3, REG_BUF_END4, REG_BUF_END5, REG_BUF_END6, REG_BUF_END7, REG_BUF_END8, REG_BUF_END9, REG_BUF_ENDLAST = REG_BUF_END9, REG_BUF_LAST = REG_BUF_ENDLAST, REG_INST_SCRATCH_LAST = REG_BUF_ENDLAST, REG_LAST } |
enum | REGNAME { REGNAME_LAST } |
enum | REGWIDTH { REGWIDTH_8 = 0, REGWIDTH_16 = 1, REGWIDTH_32 = 2, REGWIDTH_64 = 3, REGWIDTH_80, REGWIDTH_128, REGWIDTH_256, REGWIDTH_512, REGWIDTH_FPSTATE, REGWIDTH_INVALID, REGWIDTH_NATIVE = REGWIDTH_64 } |
enum | REG_CLASS { REG_CLASS_NONE = 0, REG_CLASS_PSEUDO, REG_CLASS_GR, REG_CLASS_GRU8, REG_CLASS_GRL8, REG_CLASS_GRH16, REG_CLASS_GRH32, REG_CLASS_SEG, REG_CLASS_MM, REG_CLASS_EMM, REG_CLASS_XMM, REG_CLASS_YMM, REG_CLASS_ZMM, REG_CLASS_K, REG_CLASS_FPST, REG_CLASS_ST, REG_CLASS_CR, REG_CLASS_DR, REG_CLASS_TR, REG_CLASS_FLAGS, REG_CLASS_FLAGS16, REG_CLASS_FLAGS32, REG_CLASS_STATUS_FLAGS, REG_CLASS_DFLAG, REG_CLASS_X87, REG_CLASS_MXCSR, REG_CLASS_MXCSRMASK, REG_CLASS_IP, REG_CLASS_IP16, REG_CLASS_IP32, REG_CLASS_ARCH, REG_CLASS_PIN_GR, REG_CLASS_PIN_GRU8, REG_CLASS_PIN_GRL8, REG_CLASS_PIN_GRH16, REG_CLASS_PIN_GRH32, REG_CLASS_PIN_XMM, REG_CLASS_PIN_YMM, REG_CLASS_PIN_ZMM, REG_CLASS_PIN_K, REG_CLASS_PIN_X87, REG_CLASS_PIN_MXCSR, REG_CLASS_PIN_FLAGS, REG_CLASS_PIN_STATUS_FLAGS, REG_CLASS_PIN_DFLAG } |
enum | REG_SUBCLASS { REG_SUBCLASS_NONE = 0, REG_SUBCLASS_REX, REG_SUBCLASS_FULL_STACKPTR, REG_SUBCLASS_PIN_FULL_STACKPTR, REG_SUBCLASS_PIN_TMP, REG_SUBCLASS_PIN_INST_GR, REG_SUBCLASS_PIN_INST_GR_H32, REG_SUBCLASS_PIN_INST_BUF, REG_SUBCLASS_PIN_INST_COND } |
enum | REG_ALLOC_TYPE { REG_ALLOC_NONE = 0, REG_ALLOC_PART, REG_ALLOC_ANY_GR, REG_ALLOC_IDENT, REG_ALLOC_CR = REG_ALLOC_IDENT, REG_ALLOC_DR = REG_ALLOC_IDENT, REG_ALLOC_TR = REG_ALLOC_IDENT, REG_ALLOC_ST = REG_ALLOC_IDENT, REG_ALLOC_MM = REG_ALLOC_IDENT, REG_ALLOC_EMM = REG_ALLOC_IDENT, REG_ALLOC_XMM = REG_ALLOC_IDENT, REG_ALLOC_YMM = REG_ALLOC_IDENT, REG_ALLOC_ZMM = REG_ALLOC_IDENT, REG_ALLOC_K = REG_ALLOC_IDENT, REG_ALLOC_SEG = REG_ALLOC_IDENT, REG_ALLOC_STACK_PTR = REG_ALLOC_IDENT, REG_ALLOC_X87 = REG_ALLOC_IDENT, REG_ALLOC_FLAGS = REG_ALLOC_IDENT, REG_ALLOC_STATUS_FLAGS = REG_ALLOC_IDENT, REG_ALLOC_DFLAG = REG_ALLOC_IDENT } |
Functions | |
LOCALFUN INT32 | MEGA (INT32 v) |
LOCALFUN INT32 | KILO (INT32 v) |
LOCALVAR STAT_NORM | StatStripeBytes ("mem","bytes","stripe","",&StatRawMmapBytes) |
LOCALVAR STAT_UINT64 | STAT_ArrayBaseAlloc ("pin","array_base","alloc","") |
LOCALVAR STAT_UINT64 | STAT_ArrayBaseFree ("pin","array_base","free","") |
STAT_UINT64 | STAT_TotalAttempts_COMPLEXLOCK ("pin","complexlock","attempts","") |
STAT_UINT64 | STAT_TotalSpins_COMPLEXLOCK ("pin","complexlock","spins_total","") |
STAT_UINT64 | STAT_MaxSpins_COMPLEXLOCK ("pin","complexlock","spins_max","") |
STAT_NORM | STAT_WaitTime_COMPLEXLOCK ("pin","time","complexlock_wait","",&TimerApp) |
ATOMIC_STATS | STAT_Backoff_COMPLEXLOCK ("pin","complexlock") |
LOCALCONST char * | SeverityToString (int num) |
LOCALFUN string | StripNewline (const string &cstr) |
LOCALFUN VOID | XML_encode (const string &source, string &destination) |
LOCALFUN string | LowerDash (const string &s) |
LOCALFUN int | cmp (const void *x1, const void *x2) |
LOCALVAR KNOB_COMMENT | KnobUserAndPintoolFamily ("user&pintool","General switches (available in pin and tool)") |
LOCALVAR KNOB_COMMENT | KnobMemoryConstraintsFamily ("user:memory","Knobs for constraining memory usage") |
KNOB< BOOL > | KnobSlowAsserts (KNOB_MODE_WRITEONCE,"user&pintool","slow_asserts","0","Perform expensive sanity checks") |
KNOB< BOOL > | KnobIFeelLucky (KNOB_MODE_WRITEONCE,"user","ifeellucky","0","skip warning message for unsupported platforms and convert some errors to warnings") |
KNOB< BOOL > | KnobAllowMt (KNOB_MODE_WRITEONCE,"user","mt","1","Allow multithreaded programs") |
KNOB< UINT32 > | KnobAttachToProcessPid (KNOB_MODE_WRITEONCE,"user","pid","0","Attach to process with PID") |
KNOB< BOOL > | KnobDetachReattachActive (KNOB_MODE_WRITEONCE,"user","detach_reattach","0","Allow detach and reattach in probe mode") |
KNOB< UINT32 > | KnobWaitingProcess (KNOB_MODE_WRITEONCE,"internal","waiting_process","0","Attach to waiting process with PID") |
KNOB< UINT32 > | KnobWaitingInjector (KNOB_MODE_WRITEONCE,"internal","waiting_injector","0","PID of waiting injector process") |
KNOB< UINT32 > | KnobSigChildHandler (KNOB_MODE_WRITEONCE,"internal","sigchld_handler","0","PID of waiting injector process") |
KNOB< string > | KnobErrorFile (KNOB_MODE_WRITEONCE,"user","error_file","","The error file name") |
KNOB< BOOL > | KnobUniqueErrorFile (KNOB_MODE_WRITEONCE,"user","unique_error_file","0","The error file name will contain the pid") |
KNOB< string > | KnobLogFile (KNOB_MODE_WRITEONCE,"user","logfile","pin.log","The log file path and file name") |
KNOB< BOOL > | KnobUniqueLogFiles (KNOB_MODE_WRITEONCE,"user","unique_logfile","0","The log file names will contain the pid") |
KNOB< BOOL > | KnobAppendLogFile (KNOB_MODE_WRITEONCE,"supported","append_logfile","0","Append to the end of the log file if it already exists") |
KNOB< string > | P64Knob (KNOB_MODE_WRITEONCE,"user","p64","","Specify Pin binary for Intel(R) 64 architecture") |
KNOB< string > | P32Knob (KNOB_MODE_WRITEONCE,"user","p32","","Specify Pin binary for IA-32 architecture") |
KNOB< string > | T64Knob (KNOB_MODE_WRITEONCE,"user","t64","","Specify tool binary for Intel(R) 64 architecture") |
KNOB< BOOL > | KnobFollowChild (KNOB_MODE_WRITEONCE,"user","follow_execv","0","Execute with Pin all processes spawned by execv class system calls") |
KNOB< BOOL > | KnobLateInjection (KNOB_MODE_WRITEONCE,"supported","late_injection","0","Late injection (after initialization APC) on Windows") |
KNOB< BOOL > | KnobDebugInstrumentedProcesses (KNOB_MODE_WRITEONCE,"user","debug_instrumented_processes","0","Print message to allow debugger attach to instrumented processes") |
KNOB< BOOL > | KnobHelp (KNOB_MODE_WRITEONCE,"user","help","0","Print help message") |
KNOB< BOOL > | KnobVersion (KNOB_MODE_WRITEONCE,"user","version","0","Print version message") |
KNOB< BOOL > | KnobVersionLong (KNOB_MODE_WRITEONCE,"user","version_long","0","Print version/diagnostic message") |
VOID | PIN_InitLock (PIN_LOCK *lock) |
VOID | PIN_GetLock (PIN_LOCK *lock, INT32 val) |
INT32 | PIN_ReleaseLock (PIN_LOCK *lock) |
BOOL | PIN_MutexInit (PIN_MUTEX *lock) |
VOID | PIN_MutexFini (PIN_MUTEX *lock) |
VOID | PIN_MutexLock (PIN_MUTEX *lock) |
VOID | PIN_MutexUnlock (PIN_MUTEX *lock) |
BOOL | PIN_MutexTryLock (PIN_MUTEX *lock) |
BOOL | PIN_RWMutexInit (PIN_RWMUTEX *lock) |
VOID | PIN_RWMutexFini (PIN_RWMUTEX *lock) |
VOID | PIN_RWMutexReadLock (PIN_RWMUTEX *lock) |
VOID | PIN_RWMutexWriteLock (PIN_RWMUTEX *lock) |
VOID | PIN_RWMutexUnlock (PIN_RWMUTEX *lock) |
BOOL | PIN_RWMutexTryReadLock (PIN_RWMUTEX *lock) |
BOOL | PIN_RWMutexTryWriteLock (PIN_RWMUTEX *lock) |
BOOL | PIN_SemaphoreInit (PIN_SEMAPHORE *sem) |
VOID | PIN_SemaphoreFini (PIN_SEMAPHORE *sem) |
VOID | PIN_SemaphoreSet (PIN_SEMAPHORE *sem) |
VOID | PIN_SemaphoreClear (PIN_SEMAPHORE *sem) |
BOOL | PIN_SemaphoreIsSet (PIN_SEMAPHORE *sem) |
VOID | PIN_SemaphoreWait (PIN_SEMAPHORE *sem) |
BOOL | PIN_SemaphoreTimedWait (PIN_SEMAPHORE *sem, unsigned timeout) |
MESSAGE_TYPE | MessageTypeNonFatalError ("non_fatal_error","NFE: ", false, false, true, false, LOGTYPE_CONSOLE_AND_LOGFILE,"errors") |
MESSAGE_TYPE | MessageTypeError ("error","E: ", true, false, true, false, LOGTYPE_CONSOLE_AND_LOGFILE,"errors") |
MESSAGE_TYPE | MessageTypeCriticalError ("critical_error","E: ", false, false, true, false, LOGTYPE_CONSOLE_AND_LOGFILE,"errors") |
MESSAGE_TYPE | MessageTypeWarning ("warning","W: ", false, false, true, false, LOGTYPE_LOGFILE,"warnings") |
MESSAGE_TYPE | MessageTypeConsole ("console","C: ", false, false, true, false, LOGTYPE_CONSOLE,"console") |
MESSAGE_TYPE | MessageTypeConsoleNoPrefix ("console_noprefix","", false, false, true, false, LOGTYPE_CONSOLE,"console") |
MESSAGE_TYPE_ALWAYS_ON | MessageTypeAssert ("assert","A: ", true, true, false, LOGTYPE_CONSOLE_AND_LOGFILE,"assert") |
MESSAGE_TYPE | MessageTypePhase ("phase","P: ", false, false, true, true, LOGTYPE_CONSOLE,"phase") |
MESSAGE_TYPE | MessageTypeKnown ("known","K: ", false, false, true, false, LOGTYPE_CONSOLE,"known problem") |
MESSAGE_TYPE | MessageTypeInfo ("info","I: ", false, false, true, false, LOGTYPE_CONSOLE,"info") |
MESSAGE_TYPE | MessageTypeDebug ("debug","D: ", false, false, false, false, LOGTYPE_CONSOLE,"generic debug") |
MESSAGE_TYPE | MessageTypeOpportunity ("opportunity","O: ", false, false, true, false, LOGTYPE_CONSOLE,"generic optimization opportunity") |
MESSAGE_TYPE | MessageTypeStats ("stats","S: ", false, false, true, false, LOGTYPE_CONSOLE,"statistic") |
MESSAGE_TYPE | MessageTypeLog ("log","", false, false, true, false, LOGTYPE_LOGFILE,"generic log") |
const string | Line1 (80,'#') |
const string | Line2 (80,'=') |
const string | Line3 (80,'-') |
const string | Line4 (80,'.') |
UINT64 | MilliSecondsElapsed () |
UINT64 | KiloBytesUsed () |
string | ResourceInfo () |
string | AssertString (const char *fileName, const char *functionName, unsigned line, const std::string &message) |
LOCALVAR KNOB< UINT32 > | PauseAbortKnob (KNOB_MODE_WRITEONCE,"supported:basic","pause_abort","0","Pause and print pid so gdb can attach before pin aborts") |
VOID | BreakMe () |
UINT32 | DivZero (UINT32 x) |
VOID | SegFault () |
LOCALFUN VOID | SignalHandler (int arg) |
VOID | InstallSignalHandlers () |
KNOB< string > | KnobMesgOn (KNOB_MODE_APPEND,"supported:message","mesgon","","enable given message type") |
KNOB< string > | KnobMesgOff (KNOB_MODE_APPEND,"supported:message","mesgoff","","disable given message type") |
PIN_LOAD_STATUS | PinStatusGetLoadStatus () |
VOID | PinStatusSetLoadStatus (PIN_LOAD_STATUS ls) |
PIN_LOAD_STATUS | PinStatusGetInjectionType () |
string | LoadStatusString (PIN_LOAD_STATUS load_status) |
string | PinStatusString (PIN_STATUS *ps) |
KNOB< BOOL > | KnobSeparatelyHandledXmm (KNOB_MODE_WRITEONCE,"supported","separately_handled_xmm","1","separtely handled xmm") |
string | REGALLOCHINT_String (const REGALLOC_HINT_TYPE hint) |
LOCALVAR KNOB_COMMENT | KnobStatFamily ("supported:stat","Statistic switches") |
KNOB< BOOL > | KnobStatistics (KNOB_MODE_WRITEONCE,"supported:stat","statistic","0","print general statistics") |
LOCALFUN int | cmp (const VOID *x1, const VOID *x2) |
LOCALFUN VOID | TestStringForBadChars (const string &s) |
STAT_NORM | TimerApp ("pin","time","total","", 0) |
LOCALVAR STAT_NORM | TimerOtherApp ("pin","time","cc+tool","",&TimerApp, TRUE) |
STAT_NORM | TimerVm ("pin","time","vm","",&TimerApp) |
STAT_NORM | TimerCompile ("pin","time","Compile","",&TimerVm) |
STAT_NORM | TimerMakeRegion ("pin","time","MakeRegion","",&TimerCompile) |
STAT_NORM | TimerMakeApplication ("pin","time","MakeApplication","",&TimerMakeRegion) |
STAT_NORM | TimerFetchRegion ("pin","time","FetchRegion","",&TimerMakeApplication) |
VOID | StartApplicationTimer () |
VOID | StopApplicationTimer () |
CHAR * | GetCmdArg (const CHAR *cmdPtr, BOOL isFile, CHAR *buf, size_t bufSize, size_t *pArgSize, const CHAR **pNextPtr) |
CHAR * | GetAppCmdLine (const CHAR *pinCmdLine) |
string | SplitString (string *input, const string &delimiter=" ") |
VOID | SetAddress0x (BOOL val) |
BOOL | CharIsSpace (CHAR c) |
CHAR | CharToUpper (CHAR c) |
string | ptrstr (const VOID *val) |
string | StringFromAddrint (ADDRINT l) |
string | StringDec (UINT64 l, UINT32 digits, CHAR padding) |
string | StringDecSigned (INT64 l, UINT32 digits, CHAR padding) |
string | StringBignum (INT64 l, UINT32 digits, CHAR padding) |
string | Reformat (const string &s, const string &prefix, UINT32 min_line, UINT32 max_line) |
string | StringHex32 (UINT32 l, UINT32 digits, BOOL prefix_0x) |
LOCALFUN VOID | InsertCommas (CHAR *buffer, INT32 width) |
string | StringFlt (FLT64 val, UINT32 precision, UINT32 width) |
string | StringBool (BOOL b) |
string | StringTri (TRI t) |
INT32 | Int32FromString (const string &s) |
UINT32 | Uint32FromString (const string &s) |
UINT64 | Uint64FromString (const string &s) |
FLT64 | FLT64FromString (const string &s) |
INT | CharToHexDigit (CHAR c) |
ADDRINT | AddrintFromString (const string &str) |
UINT32 | BitCount (ADDRINT val) |
string | ReadLine (istream &inputFile, UINT32 *lineNum) |
UINT32 | Tokenize (const string &line, string *array, UINT32 n) |
string | StringHex (UINT32 l, UINT32 digits, BOOL prefix_0x=TRUE) |
string | decstr (INT64 val, UINT32 width=0) |
string | decstr (INT32 val, UINT32 width=0) |
string | decstr (INT16 val, UINT32 width=0) |
string | decstr (UINT64 val, UINT32 width=0) |
string | decstr (UINT32 val, UINT32 width=0) |
string | decstr (UINT16 val, UINT32 width=0) |
string | hexstr (INT64 val, UINT32 width=0) |
string | hexstr (INT32 val, UINT32 width=0) |
string | hexstr (INT16 val, UINT32 width=0) |
string | hexstr (UINT64 val, UINT32 width=0) |
string | hexstr (VOID *p, UINT32 width=0) |
string | hexstr (const VOID *p, UINT32 width=0) |
string | hexstr (UINT32 val, UINT32 width=0) |
string | hexstr (UINT16 val, UINT32 width=0) |
string | fltstr (FLT64 val, UINT32 prec=0, UINT32 width=0) |
string | ljstr (const string &s, UINT32 width, CHAR padding= ' ') |
template<typename ITER, typename CONV> | |
GLOBALTEMPLATEFUN string | StringSequence (ITER begin, ITER end, const CONV &conv, const string &delimiter=string(" ")) |
VOID * | Addrint2VoidStar (ADDRINT addr) |
ADDRINT | VoidStar2Addrint (const VOID *addr) |
ADDRINT | VoidStar2Addrint (VOID *addr) |
template<typename T> | |
GLOBALTEMPLATEFUN BOOL | IsPowerOf2 (T value) |
template<typename T> | |
GLOBALTEMPLATEFUN T | RoundToNextPower2 (T value) |
template<typename T> | |
GLOBALTEMPLATEFUN T | RoundUp (T value, size_t alignment) |
template<typename T> | |
GLOBALTEMPLATEFUN T * | RoundUp (T *ptr, size_t alignment) |
template<typename T> | |
GLOBALTEMPLATEFUN T | RoundUpPowerOf2 (T value, size_t alignment) |
template<typename T> | |
GLOBALTEMPLATEFUN T * | RoundUpPowerOf2 (T *ptr, size_t alignment) |
template<typename T> | |
GLOBALTEMPLATEFUN T | RoundDown (T value, size_t alignment) |
template<typename T> | |
GLOBALTEMPLATEFUN T * | RoundDown (T *ptr, size_t alignment) |
template<typename T> | |
GLOBALTEMPLATEFUN T | RoundDownPowerOf2 (T value, size_t alignment) |
template<typename T> | |
GLOBALTEMPLATEFUN T * | RoundDownPowerOf2 (T *ptr, size_t alignment) |
template<typename T> | |
GLOBALTEMPLATEFUN ADDRINT | PointerToInt (const T *ptr) |
template<typename T> | |
GLOBALTEMPLATEFUN T * | IntToPointer (ADDRINT addr) |
INT64 | VoidStar2Int (VOID *addr) |
BOOL | UnsignedImmediateFits (const UINT64 value, const UINT32 bits) |
void | RangeCheck (const UINT32 value, const UINT32 bits) |
BOOL | SignedImmediateFits (const INT64 value, const UINT32 origSize, const UINT32 extendedSize) |
BOOL | SignedImmediateFits (const INT64 value, const UINT32 origSize) |
template<UINT32 size> | |
GLOBALTEMPLATEFUN UINT32 | internalHashData (UINT32 prevHash, const CHAR *bytes) |
template<> | |
GLOBALTEMPLATEFUN UINT32 | internalHashData< 1 > (UINT32 prevHash, const CHAR *bytes) |
template<> | |
GLOBALTEMPLATEFUN UINT32 | internalHashData< 2 > (UINT32 prevHash, const CHAR *bytes) |
template<> | |
GLOBALTEMPLATEFUN UINT32 | internalHashData< 4 > (UINT32 prevHash, const CHAR *bytes) |
template<> | |
GLOBALTEMPLATEFUN UINT32 | internalHashData< 8 > (UINT32 prevHash, const CHAR *bytes) |
template<typename T> | |
GLOBALTEMPLATEFUN UINT32 | HashData (UINT32 oldHash, const T &data) |
BOOL | HasBaseName (const char *fileName, const char *baseNameToCheckFor) |
INT32 | MEMORY_ReadInt32 (ADDRINT address) |
VOID | MEMORY_WriteInt32 (ADDRINT address, INT32 value) |
UINT32 | MEMORY_ReadUint32 (ADDRINT address) |
VOID | MEMORY_WriteUint32 (ADDRINT address, UINT32 value) |
INT64 | MEMORY_ReadInt64 (ADDRINT address) |
VOID | MEMORY_WriteInt64 (ADDRINT address, INT64 value) |
UINT64 | MEMORY_ReadUint64 (ADDRINT address) |
VOID | MEMORY_WriteUint64 (ADDRINT address, UINT32 value) |
ADDRINT | GetPageOfAddr (ADDRINT addr) |
const VOID * | GetSp () |
size_t | PtrDiff (const VOID *ptr1, const VOID *ptr2) |
VOID * | PtrAtOffset (VOID *ptr, size_t offset) |
const VOID * | PtrAtOffset (const VOID *ptr, size_t offset) |
template<typename T> | |
GLOBALTEMPLATEFUN VOID * | PushDataToStack (VOID *stack, const T *data, size_t alignment=1, size_t size=sizeof(T)) |
VOID * | PushAddrintToStack (VOID *stack, ADDRINT value) |
string | MemRangeToString (const MemRange &range) |
MemRange | MemPageRange (ADDRINT addr) |
MemRange | MemPageRange (const VOID *addr) |
STAT_NORM | StatRawMmapBytes ("mem","bytes","RawMmap","",&StatReservedBytes) |
STAT_NORM | StatReservedBytes ("mem","bytes","Reserved","", 0) |
LOCALVAR STAT_NORM | StatOtherBytes ("mem","bytes","other","",&StatRawMmapBytes, TRUE) |
USIZE | GetRawMmapBytes () |
VOID | UpdateRawMmapBytes () |
VOID | PullinPinMalloc () |
const CHAR * | GetEnvFromArray (const CHAR *envArray[], const CHAR *name) |
string | VersionShort () |
string | ReleaseShort () |
string | VersionLong () |
string | ReleaseLong () |
const CHAR * | CharmVersion () |
GLOBALDLLCFUN const CHAR * | CharmVersionC () |
string | VersionDetailed () |
string | VersionFancy () |
VOID * | FunctionCodeAddress (void(*fp)()) |
LOCALVAR KNOB< BOOL > | KnobAllowAvxSupport (KNOB_MODE_WRITEONCE,"supported","allow_AVX_support","1","allow AVX suport") |
CPU_INFO & | Cpu () |
LOCALVAR KNOB< BOOL > | KnobNoCmov (KNOB_MODE_WRITEONCE,"supported","nocmov","0","disable the use of CMOV even on machines which support it") |
BOOL | CanUseCMOV () |
BOOL | CpuSupportsLahfSahf () |
GLOBALCFUN ADDRINT | HaveAvxSupport () |
GLOBALCFUN ADDRINT | HaveAvx2Support () |
VOID | InitRegTables () |
BOOL | REG_is_reg (REG reg) |
BOOL | REG_is_pseudo (REG reg) |
BOOL | REG_is_gr (REG reg) |
BOOL | REG_is_fr (REG reg) |
BOOL | REG_is_br (REG reg) |
BOOL | REG_is_gr64 (REG reg) |
REG | operator++ (REG &r) |
BOOL | REG_is_gr32 (REG reg) |
BOOL | REG_is_gr16 (REG reg) |
BOOL | REG_is_gr8 (REG reg) |
BOOL | REG_is_seg (REG reg) |
BOOL | REG_is_fr_for_get_context (REG reg) |
BOOL | REG_is_fr_or_x87 (REG reg) |
BOOL | REG_is_mxcsr (REG reg) |
BOOL | REG_is_any_mxcsr (REG reg) |
BOOL | REG_is_any_x87 (REG reg) |
REG | REG_st_return_reg () |
BOOL | REG_is_mm (REG reg) |
BOOL | REG_is_emm (REG reg) |
BOOL | REG_is_xmm (REG reg) |
BOOL | REG_is_ymm (REG reg) |
BOOL | REG_is_zmm (REG reg) |
BOOL | REG_is_xmm_ymm_zmm (REG reg) |
BOOL | REG_is_k_mask (REG reg) |
REG | REG_corresponding_ymm_reg (REG reg) |
BOOL | REG_is_dr (REG reg) |
BOOL | REG_is_cr (REG reg) |
BOOL | REG_is_tr (REG reg) |
BOOL | REG_is_st (REG reg) |
BOOL | REG_is_fpst (REG reg) |
BOOL | REG_is_in_X87 (REG reg) |
BOOL | REG_is_machine (REG reg) |
BOOL | REG_is_application (REG reg) |
BOOL | REG_is_pin (REG reg) |
BOOL | REG_is_subclass_none (REG reg) |
BOOL | REG_is_pin_gpr (REG reg) |
BOOL | REG_is_seg_base (REG reg) |
BOOL | REG_valid_for_iarg_reg_value (REG reg) |
BOOL | REG_is_pin_gr (REG reg) |
BOOL | REG_is_pin_gr_half32 (REG reg) |
BOOL | REG_is_pin_xmm (REG reg) |
BOOL | REG_is_pin_ymm (REG reg) |
BOOL | REG_is_pin_zmm (REG reg) |
BOOL | REG_is_pin_k_mask (REG reg) |
BOOL | REG_is_gr_type (REG reg) |
REG | REG_AppFlags () |
BOOL | REG_is_flags (REG reg) |
BOOL | REG_is_pin_flags (REG reg) |
BOOL | REG_is_status_flags (REG reg) |
BOOL | REG_is_pin_status_flags (REG reg) |
BOOL | REG_is_df_flag (REG reg) |
BOOL | REG_is_pin_df_flag (REG reg) |
BOOL | REG_is_flags_type (REG reg) |
BOOL | REG_is_flags_any_size_type (REG reg) |
BOOL | REG_is_status_flags_type (REG reg) |
BOOL | REG_is_app_status_flags_type (REG reg) |
BOOL | REG_is_df_flag_type (REG reg) |
BOOL | REG_is_app_df_flag_type (REG reg) |
BOOL | REG_is_any_flags_type (REG reg) |
BOOL | REG_is_any_pin_flags (REG reg) |
BOOL | REG_is_any_app_flags (REG reg) |
REG | REG_get_status_flags_reg_of_type (REG reg) |
REG | REG_get_df_flag_reg_of_type (REG reg) |
REG | REG_get_full_flags_reg_of_type (REG reg) |
BOOL | REG_is_stackptr_type (REG reg) |
BOOL | REG_is_representative_reg (REG reg) |
BOOL | REG_is_x87_reg (REG reg) |
BOOL | REG_is_pin_inst (REG reg) |
BOOL | REG_is_buffer (REG reg) |
BOOL | REG_is_inst_scratch (REG reg) |
ADDRINT | REG_regSubClassBitMapTable () |
ADDRINT | REG_regDefTable () |
BOOL | REG_is_pin_tmp (REG reg) |
REG | REG_INVALID () |
BOOL | REG_valid (REG reg) |
UINT32 | REG_SpilledSize (const REG reg) |
UINT32 | REG_SpilledAlignment (const REG reg) |
REG | REG_PinToMachine (const REG reg, BOOL strict) |
REG | REG_MachineToPin (const REG reg) |
BOOL | REG_is_pin64 (REG reg) |
BOOL | REG_RequiresRex (const REG reg) |
REGWIDTH | REG_WidthOfGr (REG reg) |
REGWIDTH | REGWIDTH_FromByteWidth (UINT32 byteWidth) |
INT32 | BitWidth_FromREGWIDTH (REGWIDTH regWidth) |
BOOL | REG_needs_identical_phys_reg (REG vreg) |
UINT32 | REG_Size (REG reg) |
REG | REG_FullRegName (const REG reg) |
string | REG_StringShort (REG reg) |
BOOL | REG_SameType (const REG vreg, const REG preg) |
REG | REG_IdentityCopy (const REG reg) |
REG | REG_SpillPtr () |
REG | REG_PinToMachineAndSpillPtr (const REG reg, BOOL strict) |
UINT32 | REG_SizeFromREGWIDTH (REGWIDTH width) |
INT32 | REG_NmCondCallThenExtraReadRegs () |
INT32 | REG_NmCondCallThenExtraWriteRegs () |
REG | REG_GetCondCallExtraRegRead (INT32 index) |
REG | REG_GetCondCallExtraRegWritten (INT32 index) |
BOOL | REG_is_Half16 (const REG reg) |
REGWIDTH | REG_Width (REG reg) |
BOOL | REG_is_Half32 (const REG reg) |
BOOL | REG_is_Lower8 (const REG reg) |
BOOL | REG_is_Upper8 (const REG reg) |
BOOL | REG_is_Any8 (const REG reg) |
REG | REG_Half16 (const REG reg, const BOOL must_success) |
REG | REG_Half32 (const REG reg, const BOOL must_success) |
REG | REG_Lower8 (const REG reg, const BOOL must_succeed) |
REG | REG_Upper8 (const REG reg, const BOOL must_succeed) |
REG | REG_Xmm (const REG reg, const BOOL must_succeed) |
BOOL | REG_is_partialreg (const REG reg) |
VOID | SanityCheckPartialRegisters () |
VOID | REG_SetHalf16 (ADDRINT &fullvalue, ADDRINT half16) |
VOID | REG_SetLower8 (ADDRINT &fullvalue, ADDRINT lower8) |
VOID | REG_SetUpper8 (ADDRINT &fullvalue, ADDRINT upper8) |
Variables | |
LOCALCONST INT32 | MEMORY_CHUNK_ALLOCATION_SIZE = GetMemoryAllocationGranularity() |
LOCALCONST PIN_ERROR_DESCRIPTOR | PinErrorDescriptors [] |
LOCALCONST string | ArgumentNumber [] |
LOCALVAR PINVM::PINSYNC_SAFEPOD_LOCK | MessageLock |
LOCALVAR PIN_STATUS | PinStatus = {PIN_LOAD_STATUS_CHILD_RUNS_APP, PIN_LOAD_STATUS_CHILD_RUNS_APP} |
LOCALVAR STAT_TIMER | AppTimer |
GLOBALCONST TLS_KEY | INVALID_TLS_KEY = (-1) |
LOCALVAR BOOL | Address0x = false |
LOCALVAR const CHAR | HexTab [] = "0123456789abcdef" |
LOCALVAR const CHAR | Version [] = "$Rev: 71293 $" |
LOCALVAR const CHAR | charmVersion [] = "@CHARM-VERSION: $Rev: 71293 $" |
SECTION_END LOCALVAR const CHAR | CharmBuilder [] = "@CHARM-BUILDER: " STRINGIFY(BUILDER) |
LOCALVAR BOOL | cpuSupportsCMOV = Cpu().Supports(CPU_FEATURE_CMOV) |
LOCALVAR BOOL | cpuSupportsLahfSahf = Cpu().Supports(CPU_FEATURE_LAHF_SAHF) |
LOCALVAR BOOL | cpuSupportsAVX = Cpu().Supports(CPU_FEATURE_AVX) |
LOCALVAR BOOL | cpuSupportsAVX2 = Cpu().Supports(CPU_FEATURE_AVX2) |
GLOBALCONST ADDRINT | AC_FLAG_BIT = 0x40000 |
GLOBALCONST ADDRINT | NUM_PHYSICAL_REGS = REG_PHYSICAL_CONTEXT_END - REG_PHYSICAL_CONTEXT_BEGIN + 1 |
GLOBALCONST ADDRINT | NUM_SCRATCH_REGS = REG_INST_SCRATCH_LAST - REG_INST_SCRATCH_BASE + 1 |
GLOBALCONST ADDRINT | NUM_SPECIAL_REGS = 2 + NUM_SCRATCH_REGS |
GLOBALCONST ADDRINT | NUM_CONTEXT_INT_REGS = NUM_PHYSICAL_REGS + NUM_SPECIAL_REGS |
GLOBALCONST ADDRINT | ARCH_STATE_SIZE |
GLOBALCONST UINT32 | NUM_BUFFER_REGS = REG_BUF_LAST - REG_BUF_BASE0 + 1 |
const REGDEF_ENTRY | _regDefTable [] |
UINT64 | _regClassBitMapTable [REG_LAST] |
UINT64 | _regSubClassBitMapTable [REG_LAST] |
UINT32 | _regSpillSizeTable [REG_LAST] |
REGWIDTH | _regWidthTable [REG_LAST] |
REG_ALLOC_TYPE | _regAllocTypeTable [REG_LAST] |
REG | _regFullNameTable [REG_LAST] |
REG | _regMachineNameTable [REG_LAST] |
REG | _regPinNameTable [REG_LAST] |
INT32 | _regWidthToBitWidth [] |
GLOBALCONST UINT32 | OPCODE_TABLE_NREADS = (11) |
GLOBALCONST UINT32 | OPCODE_TABLE_NWRITES = (9) |
GLOBALCONST REG_CLASS_BITS | REGCBIT_APP_ALL |
GLOBALCONST REG_CLASS_BITS | REGCBIT_PIN_ALL |
GLOBALCONST REG_CLASS_BITS | REGCBIT_ALL_REGS = REGCBIT_APP_ALL | REGCBIT_PIN_ALL |
GLOBALCONST REG_CLASS_BITS | REGCBIT_APP_FLAGS |
GLOBALCONST REG_CLASS_BITS | REGCBIT_PIN_FLAGS |
GLOBALCONST REG_CLASS_BITS | REGCBIT_PARTIAL |
GLOBALCONST REG_SUBCLASS_BITS | REGSBIT_PIN_INST_ALL |
GLOBALCONST REG_SUBCLASS_BITS | REGSBIT_PIN_SCRATCH_ALL |
GLOBALCONST REG_SUBCLASS_BITS | REGSBIT_STACKPTR_ALL |
GLOBALCONST UINT32 | PIN_INFINITE_TIMEOUT = static_cast<UINT32>(-1) |
GLOBALCONST UINT32 | PIN_MAX_THREADS = 2048 |
typedef BOOL(*) LEVEL_BASE::MESSAGE_CALLBACK(const string &message, PIN_ERRTYPE type, INT32 userType, INT32 severity, INT32 numArgs, va_list ap) |
A call-back function that is called whenever a MESSAGE_TYPE object prints a message.
[in] | messageName | Name of the MESSAGE_TYPE object. This is empty for messages printed via PrintMessageAndExit(). |
[in] | message | The text of the message. |
[in] | type | The type of the message. |
[in] | ap | A variable list of additional arguments for the message. |
typedef STAT_FLT64 LEVEL_BASE::STAT1 |
FLT64 single value stat.
typedef STAT_SINGLE<FLT32> LEVEL_BASE::STAT_FLT32 |
FLT32 single value stat.
typedef STAT_SINGLE<FLT64> LEVEL_BASE::STAT_FLT64 |
FLT64 single value stat.
typedef STAT_INTEGRAL<INT64> LEVEL_BASE::STAT_INT64 |
INT64 single value stat.
typedef STAT_INTEGRAL<SIZE> LEVEL_BASE::STAT_SIZE |
SIZE single value stat.
typedef STAT_INTEGRAL<UINT32> LEVEL_BASE::STAT_UINT32 |
UINT32 single value stat.
typedef STAT_INTEGRAL<UINT64> LEVEL_BASE::STAT_UINT64 |
UINT64 single value stat.
Types of CPU features
Bits of the XFEATURE_ENABLED_MASK in the extended control register XCR0. These bits specify processor states that are enabled on the processor. A combination of these bits also specifies which part of the extended state should be saved/restored by XSAVE/XRSTORE instructions. See IA-32 manual, vol.3, section 2.6. and vol 2B. XSAVE/XRSTOR
enum LEVEL_BASE::LOGTYPE |
this reflects the state of the pin process which is part of the application process. There maybe another pin process, the injector. The state of this latter process will always be PIN_LOAD_STATUS_INJECTOR.
Types of hints for guiding the register allocator. They need to be defined in level_base as they are used in val.C
Types of STAT's
Functions that need to iterate over all stats can use this to determine the type
VOID* LEVEL_BASE::Addrint2VoidStar | ( | ADDRINT | addr | ) |
Convert ADDRINT to "void *"
string LEVEL_BASE::AssertString | ( | const char * | fileName, | |
const char * | functionName, | |||
unsigned | line, | |||
const std::string & | message | |||
) |
Create a string for an assertion failure.
[in] | fileName | Name of the file containing the assertion failure or the empty string. |
[in] | functionName | Name of the function containing the assertion failure. |
[in] | line | Line number of the assertion failure. |
[in] | message | Message describing the failure. |
UINT32 LEVEL_BASE::BitCount | ( | ADDRINT | val | ) |
popcount/bitcount code using the usual trick
INT32 LEVEL_BASE::BitWidth_FromREGWIDTH | ( | REGWIDTH | regWidth | ) |
return the width in bits given the REGWIDTH
VOID LEVEL_BASE::BreakMe | ( | ) |
x
BOOL LEVEL_BASE::CanUseCMOV | ( | ) |
const CHAR* LEVEL_BASE::CharmVersion | ( | ) |
Return pointer to contents of .charmversion section
CPU_INFO& LEVEL_BASE::Cpu | ( | ) |
Return reference to the CPU_INFO instance.
BOOL LEVEL_BASE::CpuSupportsLahfSahf | ( | ) |
UINT32 LEVEL_BASE::DivZero | ( | UINT32 | x | ) |
x
VOID* LEVEL_BASE::FunctionCodeAddress | ( | void(*)() | fp | ) |
CHAR* LEVEL_BASE::GetAppCmdLine | ( | const CHAR * | pinCmdLine | ) |
Given pin's command line, return substring containing application's command line.
[in] | pinCmdLine | command line of pin exe process. |
CHAR* LEVEL_BASE::GetCmdArg | ( | const CHAR * | cmdPtr, | |
BOOL | isFile, | |||
CHAR * | buf, | |||
size_t | bufSize, | |||
size_t * | pArgSize, | |||
const CHAR ** | pNextPtr | |||
) |
Given a command line (sub)string, find and parse its first argument. Parsing rules (see MS CRT): File names =========== Quoted string -> non-quoted string (quotes are not copied)
Regular argument ================ 2N backslashes + " -> N backslashes + begin/end quoted string (quote is not copied) 2N+1 backslashes + " -> N backslashes + literal " " + " in a quoted string -> single literal " all other combinations of symbols are copied as is
[in] | cmdPtr | pointer to the command line (sub)string |
[in] | isFile | TRUE - use parsing rules for file name FALSE - use parsing rules for regular argument |
[out] | buf | buffer that receives argument after parsing. If this parameter is NULL, the argument is not copied. If the buffer is too small, the terminating NULL is not copied into the buffer. |
[in] | bufSize | size of the buffer; ignored if <buf> is NULL. |
[out] | pArgSize | pointer to variable that receives size of the argument to be copied into the buffer, not including terminating NULL. If this parameter is NULL, the argument size is not returned. Otherwise, the size value is returned even if <buf> is NULL. |
[out] | pNextPtr | pointer to variable that receives pointer to the command line substring following the found attribute. If this parameter is NULL, the pointer is not returned. |
const CHAR* LEVEL_BASE::GetEnvFromArray | ( | const CHAR * | envArray[], | |
const CHAR * | name | |||
) |
Find value of environment variable
ADDRINT LEVEL_BASE::GetPageOfAddr | ( | ADDRINT | addr | ) |
Get the address of the page that addr is in
USIZE LEVEL_BASE::GetRawMmapBytes | ( | ) |
Get StatRawMmapBytes - the number of bytes allocated by Pin. Note that this returns bytes currently allocated, not all bytes that have ever been allocated. Basically, this value will rise and fall during execution.
const VOID* LEVEL_BASE::GetSp | ( | ) |
BOOL LEVEL_BASE::HasBaseName | ( | const char * | fileName, | |
const char * | baseNameToCheckFor | |||
) |
Determine if the fileName has the BaseName baseNameToCheckFor On Windows comparison is case-insensitive, others are case sensitive
[in] | fileName | The file name that is to be checked |
[in] | baseNameToCheckFor | Check if the file name has this name as it's filename
|
GLOBALTEMPLATEFUN UINT32 LEVEL_BASE::HashData | ( | UINT32 | oldHash, | |
const T & | data | |||
) | [inline] |
Function to incrementally construct a hash value.
[in] | prevHash | Previous hash value (or zero) |
[in] | data | New data item to include in hash value. |
GLOBALCFUN ADDRINT LEVEL_BASE::HaveAvx2Support | ( | ) |
GLOBALCFUN ADDRINT LEVEL_BASE::HaveAvxSupport | ( | ) |
VOID LEVEL_BASE::InstallSignalHandlers | ( | ) |
install signal handler for SIGSEGV,SIGBUS,SIGILL that will behave like an assert
GLOBALTEMPLATEFUN UINT32 LEVEL_BASE::internalHashData | ( | UINT32 | prevHash, | |
const CHAR * | bytes | |||
) |
Internal helper for HashData().
GLOBALTEMPLATEFUN UINT32 LEVEL_BASE::internalHashData< 1 > | ( | UINT32 | prevHash, | |
const CHAR * | bytes | |||
) | [inline] |
Specialization for optimization (1 byte data size).
GLOBALTEMPLATEFUN UINT32 LEVEL_BASE::internalHashData< 2 > | ( | UINT32 | prevHash, | |
const CHAR * | bytes | |||
) | [inline] |
Specialization for optimization (2 byte data size).
GLOBALTEMPLATEFUN UINT32 LEVEL_BASE::internalHashData< 4 > | ( | UINT32 | prevHash, | |
const CHAR * | bytes | |||
) | [inline] |
Specialization for optimization (4 byte data size).
GLOBALTEMPLATEFUN UINT32 LEVEL_BASE::internalHashData< 8 > | ( | UINT32 | prevHash, | |
const CHAR * | bytes | |||
) | [inline] |
Specialization for optimization (8 byte data size).
GLOBALTEMPLATEFUN T* LEVEL_BASE::IntToPointer | ( | ADDRINT | addr | ) |
Convert an ADDRINT to a pointer.
GLOBALTEMPLATEFUN BOOL LEVEL_BASE::IsPowerOf2 | ( | T | value | ) |
Determine whether a value is a power of 2
[in] | value | any input value |
UINT64 LEVEL_BASE::KiloBytesUsed | ( | ) |
KiloBytes used by program according to /proc/self/status
KNOB<BOOL> LEVEL_BASE::KnobAllowMt | ( | KNOB_MODE_WRITEONCE | , | |
"user" | , | |||
"mt" | , | |||
"1" | , | |||
"Allow multithreaded programs" | ||||
) |
Allow multithreading. When the automatic cache flush is implemented, we can delete this
KNOB<BOOL> LEVEL_BASE::KnobAppendLogFile | ( | KNOB_MODE_WRITEONCE | , | |
"supported" | , | |||
"append_logfile" | , | |||
"0" | , | |||
"Append to the end of the log file if it already exists" | ||||
) |
Indicates that new log messages should be appended to the end of the log file if it already exists. This is particularly useful on Unix when using -follow_execv because the log messages after the exec are appended to any messages that happen before the exec.
KNOB<UINT32> LEVEL_BASE::KnobAttachToProcessPid | ( | KNOB_MODE_WRITEONCE | , | |
"user" | , | |||
"pid" | , | |||
"0" | , | |||
"Attach to process with PID" | ||||
) |
pin attach/detach knobs
KNOB<BOOL> LEVEL_BASE::KnobDebugInstrumentedProcesses | ( | KNOB_MODE_WRITEONCE | , | |
"user" | , | |||
"debug_instrumented_processes" | , | |||
"0" | , | |||
"Print message to allow debugger attach to instrumented processes" | ||||
) |
Pop-up debug message to allow debugger attach to instrumented processes. In follow child scenario, active only if parent is being debugged
KNOB<BOOL> LEVEL_BASE::KnobDetachReattachActive | ( | KNOB_MODE_WRITEONCE | , | |
"user" | , | |||
"detach_reattach" | , | |||
"0" | , | |||
"Allow detach and reattach in probe mode" | ||||
) |
pin attach/detach knobs
KNOB<string> LEVEL_BASE::KnobErrorFile | ( | KNOB_MODE_WRITEONCE | , | |
"user" | , | |||
"error_file" | , | |||
"" | , | |||
"The error file name" | ||||
) |
specifies the error file name.
KNOB<BOOL> LEVEL_BASE::KnobFollowChild | ( | KNOB_MODE_WRITEONCE | , | |
"user" | , | |||
"follow_execv" | , | |||
"0" | , | |||
"Execute with Pin all processes spawned by execv class system calls" | ||||
) |
Should the VM follow spawned processes?
KNOB<BOOL> LEVEL_BASE::KnobHelp | ( | KNOB_MODE_WRITEONCE | , | |
"user" | , | |||
"help" | , | |||
"0" | , | |||
"Print help message" | ||||
) |
Print help message
KNOB<BOOL> LEVEL_BASE::KnobIFeelLucky | ( | KNOB_MODE_WRITEONCE | , | |
"user" | , | |||
"ifeellucky" | , | |||
"0" | , | |||
"skip warning message for unsupported platforms and convert some errors to warnings" | ||||
) |
Knob for skipping a warning message about unsupported platforms; It also converts some error messages to warnings to try to allow further progress.
KNOB<BOOL> LEVEL_BASE::KnobLateInjection | ( | KNOB_MODE_WRITEONCE | , | |
"supported" | , | |||
"late_injection" | , | |||
"0" | , | |||
"Late injection (after initialization APC) on Windows" | ||||
) |
Late injection vs. early injection
KNOB<string> LEVEL_BASE::KnobLogFile | ( | KNOB_MODE_WRITEONCE | , | |
"user" | , | |||
"logfile" | , | |||
"pin.log" | , | |||
"The log file path and file name" | ||||
) |
specifies the log file name.
KNOB<string> LEVEL_BASE::KnobMesgOff | ( | KNOB_MODE_APPEND | , | |
"supported:message" | , | |||
"mesgoff" | , | |||
"" | , | |||
"disable given message type" | ||||
) |
disable specific message type
KNOB<string> LEVEL_BASE::KnobMesgOn | ( | KNOB_MODE_APPEND | , | |
"supported:message" | , | |||
"mesgon" | , | |||
"" | , | |||
"enable given message type" | ||||
) |
enable specific message type
KNOB<BOOL> LEVEL_BASE::KnobSeparatelyHandledXmm | ( | KNOB_MODE_WRITEONCE | , | |
"supported" | , | |||
"separately_handled_xmm" | , | |||
"1" | , | |||
"separtely handled xmm" | ||||
) |
Knob to control the handling of xmm regs as separately-handled-partial-regs when Pin is running on a system with AVX
KNOB<UINT32> LEVEL_BASE::KnobSigChildHandler | ( | KNOB_MODE_WRITEONCE | , | |
"internal" | , | |||
"sigchld_handler" | , | |||
"0" | , | |||
"PID of waiting injector process" | ||||
) |
parent injector process that waits for injection completion
KNOB<BOOL> LEVEL_BASE::KnobSlowAsserts | ( | KNOB_MODE_WRITEONCE | , | |
"user&pintool" | , | |||
"slow_asserts" | , | |||
"0" | , | |||
"Perform expensive sanity checks" | ||||
) |
Knob for deciding whether using expensive sanity checks.
KNOB<BOOL> LEVEL_BASE::KnobStatistics | ( | KNOB_MODE_WRITEONCE | , | |
"supported:stat" | , | |||
"statistic" | , | |||
"0" | , | |||
"print general statistics" | ||||
) |
Print general statistic info
KNOB<BOOL> LEVEL_BASE::KnobUniqueErrorFile | ( | KNOB_MODE_WRITEONCE | , | |
"user" | , | |||
"unique_error_file" | , | |||
"0" | , | |||
"The error file name will contain the pid" | ||||
) |
indicates that the pid should be added to the error file name.
KNOB<BOOL> LEVEL_BASE::KnobUniqueLogFiles | ( | KNOB_MODE_WRITEONCE | , | |
"user" | , | |||
"unique_logfile" | , | |||
"0" | , | |||
"The log file names will contain the pid" | ||||
) |
indicates that the pid should be added to the log file name.
KNOB<BOOL> LEVEL_BASE::KnobVersion | ( | KNOB_MODE_WRITEONCE | , | |
"user" | , | |||
"version" | , | |||
"0" | , | |||
"Print version message" | ||||
) |
Print version message
KNOB<BOOL> LEVEL_BASE::KnobVersionLong | ( | KNOB_MODE_WRITEONCE | , | |
"user" | , | |||
"version_long" | , | |||
"0" | , | |||
"Print version/diagnostic message" | ||||
) |
Print version/diagnostic message
KNOB<UINT32> LEVEL_BASE::KnobWaitingInjector | ( | KNOB_MODE_WRITEONCE | , | |
"internal" | , | |||
"waiting_injector" | , | |||
"0" | , | |||
"PID of waiting injector process" | ||||
) |
parent injector process that waits for injection completion
KNOB<UINT32> LEVEL_BASE::KnobWaitingProcess | ( | KNOB_MODE_WRITEONCE | , | |
"internal" | , | |||
"waiting_process" | , | |||
"0" | , | |||
"Attach to waiting process with PID" | ||||
) |
pin attach/detach knobs
const string LEVEL_BASE::Line1 | ( | 80 | , | |
'#' | ||||
) |
line of 80 '#' characters
const string LEVEL_BASE::Line2 | ( | 80 | , | |
' | = ' | |||
) |
line of 80 '=' characters
const string LEVEL_BASE::Line3 | ( | 80 | , | |
'-' | ||||
) |
line of 80 '-' characters
const string LEVEL_BASE::Line4 | ( | 80 | , | |
'.' | ||||
) |
line of 80 '.' characters
string LEVEL_BASE::LoadStatusString | ( | PIN_LOAD_STATUS | load_status | ) |
x
MemRange LEVEL_BASE::MemPageRange | ( | const VOID * | addr | ) |
Get the page that contains the specified address
[in] | addr | address inside the requested page |
MemRange LEVEL_BASE::MemPageRange | ( | ADDRINT | addr | ) |
Get the page that contains the specified address
[in] | addr | address inside the requested page |
string LEVEL_BASE::MemRangeToString | ( | const MemRange & | range | ) |
MESSAGE_TYPE_ALWAYS_ON LEVEL_BASE::MessageTypeAssert | ( | "assert" | , | |
"A: " | , | |||
true | , | |||
true | , | |||
false | , | |||
LOGTYPE_CONSOLE_AND_LOGFILE | , | |||
"assert" | ||||
) |
Assert message object
MESSAGE_TYPE LEVEL_BASE::MessageTypeConsole | ( | "console" | , | |
"C: " | , | |||
false | , | |||
false | , | |||
true | , | |||
false | , | |||
LOGTYPE_CONSOLE | , | |||
"console" | ||||
) |
Console message object
MESSAGE_TYPE LEVEL_BASE::MessageTypeConsoleNoPrefix | ( | "console_noprefix" | , | |
"" | , | |||
false | , | |||
false | , | |||
true | , | |||
false | , | |||
LOGTYPE_CONSOLE | , | |||
"console" | ||||
) |
Console message object - No prefix
MESSAGE_TYPE LEVEL_BASE::MessageTypeCriticalError | ( | "critical_error" | , | |
"E: " | , | |||
false | , | |||
false | , | |||
true | , | |||
false | , | |||
LOGTYPE_CONSOLE_AND_LOGFILE | , | |||
"errors" | ||||
) |
Error message object for fatal errors that require post-logging handling. These errors do not cause the process termination in the MESSAGE_TYPE::Message() function.
MESSAGE_TYPE LEVEL_BASE::MessageTypeDebug | ( | "debug" | , | |
"D: " | , | |||
false | , | |||
false | , | |||
false | , | |||
false | , | |||
LOGTYPE_CONSOLE | , | |||
"generic debug" | ||||
) |
Debug message object
MESSAGE_TYPE LEVEL_BASE::MessageTypeError | ( | "error" | , | |
"E: " | , | |||
true | , | |||
false | , | |||
true | , | |||
false | , | |||
LOGTYPE_CONSOLE_AND_LOGFILE | , | |||
"errors" | ||||
) |
Error message object (terminates)
MESSAGE_TYPE LEVEL_BASE::MessageTypeInfo | ( | "info" | , | |
"I: " | , | |||
false | , | |||
false | , | |||
true | , | |||
false | , | |||
LOGTYPE_CONSOLE | , | |||
"info" | ||||
) |
Info message object
MESSAGE_TYPE LEVEL_BASE::MessageTypeKnown | ( | "known" | , | |
"K: " | , | |||
false | , | |||
false | , | |||
true | , | |||
false | , | |||
LOGTYPE_CONSOLE | , | |||
"known problem" | ||||
) |
Known-warning message object
MESSAGE_TYPE LEVEL_BASE::MessageTypeLog | ( | "log" | , | |
"" | , | |||
false | , | |||
false | , | |||
true | , | |||
false | , | |||
LOGTYPE_LOGFILE | , | |||
"generic log" | ||||
) |
Log message object
MESSAGE_TYPE LEVEL_BASE::MessageTypeNonFatalError | ( | "non_fatal_error" | , | |
"NFE: " | , | |||
false | , | |||
false | , | |||
true | , | |||
false | , | |||
LOGTYPE_CONSOLE_AND_LOGFILE | , | |||
"errors" | ||||
) |
Error message object for non-fatal error.
MESSAGE_TYPE LEVEL_BASE::MessageTypeOpportunity | ( | "opportunity" | , | |
"O: " | , | |||
false | , | |||
false | , | |||
true | , | |||
false | , | |||
LOGTYPE_CONSOLE | , | |||
"generic optimization opportunity" | ||||
) |
Optimization opportunity message object
MESSAGE_TYPE LEVEL_BASE::MessageTypePhase | ( | "phase" | , | |
"P: " | , | |||
false | , | |||
false | , | |||
true | , | |||
true | , | |||
LOGTYPE_CONSOLE | , | |||
"phase" | ||||
) |
Phase message object
MESSAGE_TYPE LEVEL_BASE::MessageTypeStats | ( | "stats" | , | |
"S: " | , | |||
false | , | |||
false | , | |||
true | , | |||
false | , | |||
LOGTYPE_CONSOLE | , | |||
"statistic" | ||||
) |
Statistcis message object
MESSAGE_TYPE LEVEL_BASE::MessageTypeWarning | ( | "warning" | , | |
"W: " | , | |||
false | , | |||
false | , | |||
true | , | |||
false | , | |||
LOGTYPE_LOGFILE | , | |||
"warnings" | ||||
) |
Warning message object
UINT64 LEVEL_BASE::MilliSecondsElapsed | ( | ) |
MilliSeconds elapsed since last invocation of this function
REG LEVEL_BASE::operator++ | ( | REG & | r | ) |
reg++ is convenient for loops over registers
KNOB<string> LEVEL_BASE::P32Knob | ( | KNOB_MODE_WRITEONCE | , | |
"user" | , | |||
"p32" | , | |||
"" | , | |||
"Specify Pin binary for IA-32 architecture" | ||||
) |
Specify Pin binary for 32-bit applications
KNOB<string> LEVEL_BASE::P64Knob | ( | KNOB_MODE_WRITEONCE | , | |
"user" | , | |||
"p64" | , | |||
"" | , | |||
"Specify Pin binary for Intel(R) 64 architecture" | ||||
) |
Specify Pin binary for 64-bit (IA32E) applications
PIN_LOAD_STATUS LEVEL_BASE::PinStatusGetInjectionType | ( | ) |
Return the type of injection used by Pin
PIN_LOAD_STATUS LEVEL_BASE::PinStatusGetLoadStatus | ( | ) |
x
VOID LEVEL_BASE::PinStatusSetLoadStatus | ( | PIN_LOAD_STATUS | ls | ) |
x
string LEVEL_BASE::PinStatusString | ( | PIN_STATUS * | ps | ) |
x
GLOBALTEMPLATEFUN ADDRINT LEVEL_BASE::PointerToInt | ( | const T * | ptr | ) |
Convert a pointer to an ADDRINT.
VOID* LEVEL_BASE::PtrAtOffset | ( | VOID * | ptr, | |
size_t | offset | |||
) |
Return pointer whose offset, in bytes, from <ptr> is <offset>
size_t LEVEL_BASE::PtrDiff | ( | const VOID * | ptr1, | |
const VOID * | ptr2 | |||
) |
Return offset, in bytes, of <ptr1> from <ptr2>
VOID LEVEL_BASE::PullinPinMalloc | ( | ) |
A function calling all malloc-related functions. Calling PullinPinMalloc() in pin and pinclient forces the dynamic loader to pull in the Pin's malloc.
VOID* LEVEL_BASE::PushAddrintToStack | ( | VOID * | stack, | |
ADDRINT | value | |||
) |
Push ADDRINT value into stack and return updated value of top of stack
[in] | stack | top of stack |
[in] | value | value to be pushed |
GLOBALTEMPLATEFUN VOID* LEVEL_BASE::PushDataToStack | ( | VOID * | stack, | |
const T * | data, | |||
size_t | alignment = 1 , |
|||
size_t | size = sizeof(T) | |||
) |
Push data into stack and return updated value of top of stack the stack is growing to the lower addresses
[in] | stack | top of stack |
[in] | data | pointer to the data to be copied |
[in] | alignment | new value of top of stack suppose to be aligned on "alignment" value, in bytes. the value has to be power of 2 |
[in] | size | size of the data, in bytes |
void LEVEL_BASE::RangeCheck | ( | const UINT32 | value, | |
const UINT32 | bits | |||
) |
REG LEVEL_BASE::REG_GetCondCallExtraRegRead | ( | INT32 | index | ) |
No such regs - only write regs
REG LEVEL_BASE::REG_GetCondCallExtraRegWritten | ( | INT32 | index | ) |
Will write the REG_PIN_DF_FLAGS
REG LEVEL_BASE::REG_Half16 | ( | const REG | reg, | |
const BOOL | must_success | |||
) |
Return the lower 16-bit version of reg
REG LEVEL_BASE::REG_Half32 | ( | const REG | reg, | |
const BOOL | must_success | |||
) |
Return the lower 32-bit version of reg
REG LEVEL_BASE::REG_Lower8 | ( | const REG | reg, | |
const BOOL | must_succeed | |||
) |
Return the lower 8-bit version of reg
BOOL LEVEL_BASE::REG_needs_identical_phys_reg | ( | REG | vreg | ) |
Return TRUE iff the vreg is required to be allocated to it's correponding preg
INT32 LEVEL_BASE::REG_NmCondCallThenExtraReadRegs | ( | ) |
No such regs - only write regs
INT32 LEVEL_BASE::REG_NmCondCallThenExtraWriteRegs | ( | ) |
Will write the REG_PIN_DF_FLAGS
REG LEVEL_BASE::REG_PinToMachine | ( | const REG | reg, | |
BOOL | strict | |||
) |
Return the identity copy of reg. If it is not a Pin reg and strict is not set, its physical copy is simply reg itself. If strict is set, its physical copy is REG_INVALID().
BOOL LEVEL_BASE::REG_RequiresRex | ( | const REG | reg | ) |
Does this register require a REX prefix when encoded on Intel(R) 64 architecture?
BOOL LEVEL_BASE::REG_SameType | ( | const REG | vreg, | |
const REG | preg | |||
) |
Return true if reg can replace orig during register re-allocation
VOID LEVEL_BASE::REG_SetHalf16 | ( | ADDRINT & | fullvalue, | |
ADDRINT | half16 | |||
) |
Set the bottom 16 bits of the register without changing the rest of the register's bits.
VOID LEVEL_BASE::REG_SetLower8 | ( | ADDRINT & | fullvalue, | |
ADDRINT | lower8 | |||
) |
Set the bottom 8 bits of the register without changing the rest of the register's bits.
VOID LEVEL_BASE::REG_SetUpper8 | ( | ADDRINT & | fullvalue, | |
ADDRINT | upper8 | |||
) |
Set the upper 8 bits (of the bottom 16) of the register without changing the rest of the register's bits. Note - All instances of upper 8 in the documentation below refers to the upper 8 bits of the lower 16.
UINT32 LEVEL_BASE::REG_SizeFromREGWIDTH | ( | REGWIDTH | width | ) |
return the register size in bytes given a REGWIDTH
UINT32 LEVEL_BASE::REG_SpilledAlignment | ( | const REG | reg | ) |
Return the size (in bytes) of the alignment of the the spill slot dedicated for reg
UINT32 LEVEL_BASE::REG_SpilledSize | ( | const REG | reg | ) |
Return the size (in bytes) of a spill slot dedicated for reg
REG LEVEL_BASE::REG_SpillPtr | ( | ) |
The physical register assigned to hold the spill pointer
REG LEVEL_BASE::REG_Upper8 | ( | const REG | reg, | |
const BOOL | must_succeed | |||
) |
Return the upper 8-bit version of reg
REGWIDTH LEVEL_BASE::REG_WidthOfGr | ( | REG | reg | ) |
return the register width for GRs only.
REG LEVEL_BASE::REG_Xmm | ( | const REG | reg, | |
const BOOL | must_succeed | |||
) |
Return the xmm reg part of the ymm reg
string LEVEL_BASE::REGALLOCHINT_String | ( | const REGALLOC_HINT_TYPE | hint | ) |
REGWIDTH LEVEL_BASE::REGWIDTH_FromByteWidth | ( | UINT32 | byteWidth | ) |
return the register width given a width in bytes
string LEVEL_BASE::ReleaseLong | ( | ) |
return full CVS based version string
string LEVEL_BASE::ReleaseShort | ( | ) |
return version component of CVS based version string
string LEVEL_BASE::ResourceInfo | ( | ) |
stringified resource info for use with phase messages
GLOBALTEMPLATEFUN T* LEVEL_BASE::RoundDown | ( | T * | ptr, | |
size_t | alignment | |||
) |
Specialization of the RoundDown function for pointer type
GLOBALTEMPLATEFUN T LEVEL_BASE::RoundDown | ( | T | value, | |
size_t | alignment | |||
) |
Round integer of type <T> down to given alignment.
GLOBALTEMPLATEFUN T* LEVEL_BASE::RoundDownPowerOf2 | ( | T * | ptr, | |
size_t | alignment | |||
) |
Specialization of the RoundDownPowerOf2 function for pointer type
GLOBALTEMPLATEFUN T LEVEL_BASE::RoundDownPowerOf2 | ( | T | value, | |
size_t | alignment | |||
) |
Round integer of type <T> down to given alignment. The alignment must be power of two.
GLOBALTEMPLATEFUN T LEVEL_BASE::RoundToNextPower2 | ( | T | value | ) |
Round integer of type <T> up to the next power of two.
[in] | size | the integer (in bytes). |
GLOBALTEMPLATEFUN T* LEVEL_BASE::RoundUp | ( | T * | ptr, | |
size_t | alignment | |||
) |
Specialization of the RoundUp function for pointer type
GLOBALTEMPLATEFUN T LEVEL_BASE::RoundUp | ( | T | value, | |
size_t | alignment | |||
) |
Round integer of type <T> up to given alignment.
GLOBALTEMPLATEFUN T* LEVEL_BASE::RoundUpPowerOf2 | ( | T * | ptr, | |
size_t | alignment | |||
) |
Specialization of the RoundUpPowerOf2 function for pointer type
GLOBALTEMPLATEFUN T LEVEL_BASE::RoundUpPowerOf2 | ( | T | value, | |
size_t | alignment | |||
) |
Round integer of type <T> up to given alignment. The alignment must be power of two.
VOID LEVEL_BASE::SanityCheckPartialRegisters | ( | ) |
Ensure that we don't re-create Mantis 1903, where a register was short but not partial. This function checks that the partial register information is internally consistent.
It is called when we have the -slow_asserts flag.
VOID LEVEL_BASE::SegFault | ( | ) |
x
LOCALFUN VOID LEVEL_BASE::SignalHandler | ( | int | arg | ) |
install signal handler for SIGSEGV,SIGBUS,SIGILL that will behave like an assert
BOOL LEVEL_BASE::SignedImmediateFits | ( | const INT64 | value, | |
const UINT32 | origSize | |||
) |
Wrapper for 3-arg SignedImmediateFits()
value | the value to whose size we are checking | |
origSize | where to look for the sign bit (typically 8,16,32 or 64) |
BOOL LEVEL_BASE::SignedImmediateFits | ( | const INT64 | value, | |
const UINT32 | origSize, | |||
const UINT32 | extendedSize | |||
) |
Sign extend from origSize to extendedSize and check if it fits in a field of extendedSize
[in] | value | - value to whose size we are checking |
[in] | origSize | - position of sign bit in value |
[in] | extendedSize | - size extend to this size, if 0 then extendedSize is origSize |
string LEVEL_BASE::SplitString | ( | string * | input, | |
const string & | delimiter = " " | |||
) |
Split string into 2 sub strings. Example1: prefix = SplitString(input = "aaa bbb ccc", " ") -> prefix = "aaa", input = "bbb ccc" Example2: prefix = SplitString(input = "aaa", " ") -> prefix = "aaa", input = ""
inout] | input - input string. remove prefix and set the new string into input. | |
[in] | delimiter | - delimiter |
VOID LEVEL_BASE::StartApplicationTimer | ( | ) |
Start the application timer
ATOMIC_STATS LEVEL_BASE::STAT_Backoff_COMPLEXLOCK | ( | "pin" | , | |
"complexlock" | ||||
) |
Exponential backoff statistics while incrementing recursive count.
STAT_UINT64 LEVEL_BASE::STAT_MaxSpins_COMPLEXLOCK | ( | "pin" | , | |
"complexlock" | , | |||
"spins_max" | , | |||
"" | ||||
) |
Max number of Yield() spins for a single lock attempt.
STAT_UINT64 LEVEL_BASE::STAT_TotalAttempts_COMPLEXLOCK | ( | "pin" | , | |
"complexlock" | , | |||
"attempts" | , | |||
"" | ||||
) |
Total number of attempts to acquire lock.
STAT_UINT64 LEVEL_BASE::STAT_TotalSpins_COMPLEXLOCK | ( | "pin" | , | |
"complexlock" | , | |||
"spins_total" | , | |||
"" | ||||
) |
Total number of Yield() spins while waiting for lock to be free.
STAT_NORM LEVEL_BASE::STAT_WaitTime_COMPLEXLOCK | ( | "pin" | , | |
"time" | , | |||
"complexlock_wait" | , | |||
"" | , | |||
& | TimerApp | |||
) |
Total time waiting for all Yield() spins.
LOCALVAR STAT_NORM LEVEL_BASE::StatOtherBytes | ( | "mem" | , | |
"bytes" | , | |||
"other" | , | |||
"" | , | |||
& | StatRawMmapBytes, | |||
TRUE | ||||
) |
Unattributed allocations
STAT_NORM LEVEL_BASE::StatRawMmapBytes | ( | "mem" | , | |
"bytes" | , | |||
"RawMmap" | , | |||
"" | , | |||
& | StatReservedBytes | |||
) |
Total net bytes allocated by RawMmap and RawMunmap. This must be global because another stats are normalized to this value. The actual value is kept as a local variable in sysfuncs_* and updated by UpdateRawMmapBytes to avoid accessing this variable before the constructor has run.
STAT_NORM LEVEL_BASE::StatReservedBytes | ( | "mem" | , | |
"bytes" | , | |||
"Reserved" | , | |||
"" | , | |||
0 | ||||
) |
Total net bytes reserved.
LOCALVAR STAT_NORM LEVEL_BASE::StatStripeBytes | ( | "mem" | , | |
"bytes" | , | |||
"stripe" | , | |||
"" | , | |||
& | StatRawMmapBytes | |||
) |
allocate a memory region of "size" bytes at location address
not used with the single mmap approach
VOID LEVEL_BASE::StopApplicationTimer | ( | ) |
Stop the application timer
GLOBALTEMPLATEFUN string LEVEL_BASE::StringSequence | ( | ITER | begin, | |
ITER | end, | |||
const CONV & | conv, | |||
const string & | delimiter = string(" ") | |||
) |
Convert the sequence [begin, end) to string. Use the <conv> object to convert the elements. Separate the elements by <delimiter>.
KNOB<string> LEVEL_BASE::T64Knob | ( | KNOB_MODE_WRITEONCE | , | |
"user" | , | |||
"t64" | , | |||
"" | , | |||
"Specify tool binary for Intel(R) 64 architecture" | ||||
) |
Specify Tool for 64-bit (IA32E) applications
STAT_NORM LEVEL_BASE::TimerApp | ( | "pin" | , | |
"time" | , | |||
"total" | , | |||
"" | , | |||
0 | ||||
) |
Entire time that Pin is running.
STAT_NORM LEVEL_BASE::TimerCompile | ( | "pin" | , | |
"time" | , | |||
"Compile" | , | |||
"" | , | |||
& | TimerVm | |||
) |
Timer for Compilation
STAT_NORM LEVEL_BASE::TimerFetchRegion | ( | "pin" | , | |
"time" | , | |||
"FetchRegion" | , | |||
"" | , | |||
& | TimerMakeApplication | |||
) |
Time spent fetching while MakeApplication.
STAT_NORM LEVEL_BASE::TimerMakeApplication | ( | "pin" | , | |
"time" | , | |||
"MakeApplication" | , | |||
"" | , | |||
& | TimerMakeRegion | |||
) |
Timer for MakeApplication
STAT_NORM LEVEL_BASE::TimerMakeRegion | ( | "pin" | , | |
"time" | , | |||
"MakeRegion" | , | |||
"" | , | |||
& | TimerCompile | |||
) |
Timer for compiler
STAT_NORM LEVEL_BASE::TimerVm | ( | "pin" | , | |
"time" | , | |||
"vm" | , | |||
"" | , | |||
& | TimerApp | |||
) |
Timer for VM
BOOL LEVEL_BASE::UnsignedImmediateFits | ( | const UINT64 | value, | |
const UINT32 | bits | |||
) |
integer bit width check
VOID LEVEL_BASE::UpdateRawMmapBytes | ( | ) |
Update StatRawMmapBytes from a local variable. We can't update the stat directly in RawMmap because it might be called before the constructor for the stat has been executed.
string LEVEL_BASE::VersionDetailed | ( | ) |
return full CVS based version string
string LEVEL_BASE::VersionFancy | ( | ) |
return full CVS based version string
string LEVEL_BASE::VersionLong | ( | ) |
return full CVS based version string
string LEVEL_BASE::VersionShort | ( | ) |
return version component of CVS based version string
ADDRINT LEVEL_BASE::VoidStar2Addrint | ( | VOID * | addr | ) |
Convert "void *" to ADDRINT
ADDRINT LEVEL_BASE::VoidStar2Addrint | ( | const VOID * | addr | ) |
Convert "void *" to ADDRINT.
INT64 LEVEL_BASE::VoidStar2Int | ( | VOID * | addr | ) |
convert "void *" to int
GLOBALCONST ADDRINT LEVEL_BASE::AC_FLAG_BIT = 0x40000 |
GLOBALCONST ADDRINT LEVEL_BASE::ARCH_STATE_SIZE |
Initial value:
(NUM_PHYSICAL_REGS + NUM_SPECIAL_REGS)*sizeof(ADDRINT) + (FPSTATE_SIZE // because CONTEXT size must // be at least as big as // CONTEXT_CANONICAL size, // and CONTEXT_CANONICAL._fpstate is used + FPSTATE_ALIGNMENT)
LOCALCONST string LEVEL_BASE::ArgumentNumber[] |
Initial value:
{ "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", }
LOCALVAR PINVM::PINSYNC_SAFEPOD_LOCK LEVEL_BASE::MessageLock |
Lock that serializes message logging
GLOBALCONST UINT32 LEVEL_BASE::NUM_BUFFER_REGS = REG_BUF_LAST - REG_BUF_BASE0 + 1 |
Total number of buffer registers, which is also the maximum number of buf ids.
GLOBALCONST ADDRINT LEVEL_BASE::NUM_CONTEXT_INT_REGS = NUM_PHYSICAL_REGS + NUM_SPECIAL_REGS |
Total number of integer registers in CONTEXT
GLOBALCONST ADDRINT LEVEL_BASE::NUM_PHYSICAL_REGS = REG_PHYSICAL_CONTEXT_END - REG_PHYSICAL_CONTEXT_BEGIN + 1 |
GLOBALCONST ADDRINT LEVEL_BASE::NUM_SCRATCH_REGS = REG_INST_SCRATCH_LAST - REG_INST_SCRATCH_BASE + 1 |
GLOBALCONST ADDRINT LEVEL_BASE::NUM_SPECIAL_REGS = 2 + NUM_SCRATCH_REGS |
REG_SEG_FS_BASE and REG_SEG_GS_BASE are represented as special IA-32/Intel(R) 64 architecture registers
GLOBALCONST UINT32 LEVEL_BASE::OPCODE_TABLE_NREADS = (11) |
GLOBALCONST UINT32 LEVEL_BASE::OPCODE_TABLE_NWRITES = (9) |
GLOBALCONST UINT32 LEVEL_BASE::PIN_INFINITE_TIMEOUT = static_cast<UINT32>(-1) |
Timeout interval that never elapses.
GLOBALCONST UINT32 LEVEL_BASE::PIN_MAX_THREADS = 2048 |
Maximum number of threads supported by PIN.