Pin
Loading...
Searching...
No Matches
Classes | Typedefs | Enumerations | Functions | Variables

Classes

class  LOGFILE
 
class  MESSAGE_TYPE
 
class  MESSAGE_TYPE_ALWAYS_ON
 

Typedefs

typedef BOOL(* MESSAGE_CALLBACK) (const std::string &message, PIN_ERRTYPE type, INT32 userType, INT32 severity, INT32 numArgs, va_list ap)
 

Enumerations

enum  LOGTYPE {
  LOGTYPE_NONE ,
  LOGTYPE_CONSOLE ,
  LOGTYPE_LOGFILE ,
  LOGTYPE_CONSOLE_AND_LOGFILE
}
 

Functions

UINT64 MilliSecondsElapsed ()
 
std::string AssertString (const char *fileName, const char *functionName, unsigned line, const std::string &message)
 
VOID BreakMe ()
 

Variables

MESSAGE_TYPE MessageTypeNonFatalError
 
MESSAGE_TYPE_ALWAYS_ON MessageTypeError
 
MESSAGE_TYPE MessageTypeCriticalError
 
MESSAGE_TYPE MessageTypeWarning
 
MESSAGE_TYPE MessageTypeConsole
 
MESSAGE_TYPE MessageTypeConsoleNoPrefix
 
MESSAGE_TYPE_ALWAYS_ON MessageTypeAssert
 
MESSAGE_TYPE MessageTypePhase
 
MESSAGE_TYPE MessageTypeKnown
 
MESSAGE_TYPE MessageTypeInfo
 
MESSAGE_TYPE MessageTypeDebug
 
MESSAGE_TYPE MessageTypeOpportunity
 
MESSAGE_TYPE MessageTypeStats
 
MESSAGE_TYPE MessageTypeLog
 

Detailed Description

Typedef Documentation

◆ MESSAGE_CALLBACK

typedef BOOL(* MESSAGE_CALLBACK) (const std::string &message, PIN_ERRTYPE type, INT32 userType, INT32 severity, INT32 numArgs, va_list ap)

NOTE: At the moment all knob parsing is also done inside Pin. This means that if we want message types that are used outside of Pin, we still need to declare them inside Pin, for that purpose we introduce LOGTYPE_NONE.

A call-back function that is called whenever a MESSAGE_TYPE object prints a message.

Parameters
[in]messageNameName of the MESSAGE_TYPE object. This is empty for messages printed via PrintMessageAndExit().
[in]messageThe text of the message.
[in]typeThe type of the message.
[in]apA variable list of additional arguments for the message.
Returns
When TRUE is returned, the message is also printed to the console if the MESSAGE_TYPE would normally do this. When FALSE is returned, the message is not printed to the console.

Enumeration Type Documentation

◆ LOGTYPE

enum LOGTYPE

Type that represents where to put the log.

Enumerator
LOGTYPE_NONE 

Does not output to log or console (for internal use)

LOGTYPE_CONSOLE 

log only to the console

LOGTYPE_LOGFILE 

log only to the log file

LOGTYPE_CONSOLE_AND_LOGFILE 

log to both the log file and console

Function Documentation

◆ AssertString()

std::string AssertString ( const char *  fileName,
const char *  functionName,
unsigned  line,
const std::string &  message 
)
extern

Create a string for an assertion failure.

Parameters
[in]fileNameName of the file containing the assertion failure or the empty string.
[in]functionNameName of the function containing the assertion failure.
[in]lineLine number of the assertion failure.
[in]messageMessage describing the failure.

◆ MilliSecondsElapsed()

UINT64 MilliSecondsElapsed ( )
extern

MilliSeconds elapsed since last invocation of this function

Variable Documentation

◆ MessageTypeAssert

MESSAGE_TYPE_ALWAYS_ON MessageTypeAssert
extern

Assert message object

◆ MessageTypeConsole

MESSAGE_TYPE MessageTypeConsole
extern

Console message object

◆ MessageTypeConsoleNoPrefix

MESSAGE_TYPE MessageTypeConsoleNoPrefix
extern

Console message object - No prefix

◆ MessageTypeCriticalError

MESSAGE_TYPE MessageTypeCriticalError
extern

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.

◆ MessageTypeDebug

MESSAGE_TYPE MessageTypeDebug
extern

Debug message object

◆ MessageTypeError

MESSAGE_TYPE_ALWAYS_ON MessageTypeError
extern

Error message object (terminates) (Always on message, using mesgoff from command line has no effect)

◆ MessageTypeInfo

MESSAGE_TYPE MessageTypeInfo
extern

Info message object

◆ MessageTypeKnown

MESSAGE_TYPE MessageTypeKnown
extern

Known-warning message object

◆ MessageTypeLog

MESSAGE_TYPE MessageTypeLog
extern

Log message object

◆ MessageTypeNonFatalError

MESSAGE_TYPE MessageTypeNonFatalError
extern

Error message object for non-fatal error.

◆ MessageTypeOpportunity

MESSAGE_TYPE MessageTypeOpportunity
extern

Optimization opportunity message object

◆ MessageTypePhase

MESSAGE_TYPE MessageTypePhase
extern

Phase message object

◆ MessageTypeStats

MESSAGE_TYPE MessageTypeStats
extern

Statistcis message object

◆ MessageTypeWarning

MESSAGE_TYPE MessageTypeWarning
extern

Warning message object