C++ Build Insights SDK: event table

The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. To see the documentation for these versions, set the Visual Studio Version selector control for this article to Visual Studio 2017 or Visual Studio 2019. It's found at the top of the table of contents on this page.

Compiler events

COMPILER
COMMAND_LINE
ENVIRONMENT_VARIABLE
FILE_INPUT
OBJ_OUTPUT
FRONT_END_PASS
BACK_END_PASS

Compiler front-end events

C1_DLL
FRONT_END_FILE
TEMPLATE_INSTANTIATION
SYMBOL_NAME

Compiler back-end events

C2_DLL
WHOLE_PROGRAM_ANALYSIS
TOP_DOWN
BOTTOM_UP
CODE_GENERATION
THREAD
FUNCTION
FORCE_INLINEE

Linker events

LINKER
COMMAND_LINE
ENVIRONMENT_VARIABLE
FILE_INPUT
EXECUTABLE_IMAGE_OUTPUT
EXP_OUTPUT
IMP_LIB_OUTPUT
LIB_OUTPUT
PASS1
PRE_LTCG_OPT_REF
LTCG
OPT_REF
OPT_ICF
OPT_LBR
PASS2

Event table

Event Property Description
BACK_END_PASS Type Activity
Parents COMPILER
Children C2_DLL
Properties - Absolute path to input source file
- Absolute path to output object file
Capture classes Activity
CompilerPass
BackEndPass
Description Occurs at the start and stop of the compiler back-end pass. This pass is responsible for optimizing parsed C/C++ source code and converting it into machine code.
BOTTOM_UP Type Activity
Parents WHOLE_PROGRAM_ANALYSIS
Children None
Properties None
Capture classes Activity
BottomUp
Description Occurs at the start and stop of the whole program analysis' bottom-up pass.
C1_DLL Type Activity
Parents FRONT_END_PASS
Children FRONT_END_FILE
SYMBOL_NAME
TEMPLATE_INSTANTIATION
Properties None
Capture classes Activity
C1DLL
Description Occurs at the start and stop of a c1.dll or c1xx.dll invocation. These DLLs are the C and C++ front end of the compiler. They're invoked solely by the compiler driver (cl.exe).
C2_DLL Type Activity
Parents BACK_END_PASS
LTCG
Children CODE_GENERATION
WHOLE_PROGRAM_ANALYSIS
Properties None
Capture classes Activity
C2DLL
Description Occurs at the start and stop of a c2.dll invocation. This DLL is the back end of the compiler. It's called by the compiler driver (cl.exe). It's also invoked by the linker (link.exe) when link-time code generation is used.
CODE_GENERATION Type Activity
Parents C2_DLL
Children FUNCTION
THREAD
Properties None
Capture classes Activity
CodeGeneration
Description Occurs at the start and stop of the back end's code generation phase.
COMMAND_LINE Type Simple Event
Parents COMPILER
LINKER
Children None
Properties - The command line that was used to invoke cl.exe or link.exe
Capture classes SimpleEvent
CommandLine
Description Occurs when the compiler and linker are done evaluating the command line. The evaluated command line includes all cl.exe and link.exe parameters passed via a response file. It also includes parameters to cl.exe and link.exe passed via environment variables such as CL, _CL_, LINK, and _LINK_.
COMPILER Type Activity
Parents None
Children BACK_END_PASS
COMMAND_LINE
ENVIRONMENT_VARIABLE
FILE_INPUT
OBJ_OUTPUT
FRONT_END_PASS
Properties - Compiler version
- Working directory
- Absolute path to the invoked cl.exe
Capture classes Activity
Invocation
Compiler
Description Occurs at the start and stop of a cl.exe invocation.
ENVIRONMENT_VARIABLE Type Simple Event
Parents COMPILER
LINKER
Children None
Properties - The name of the environment variable
- The value of the environment variable.
Capture classes SimpleEvent
EnvironmentVariable
Description Occurs once for every existing environment variable at the time cl.exe or link.exe is invoked.
EXECUTABLE_IMAGE_OUTPUT Type Simple Event
Parents LINKER
Children None
Properties - The absolute path to a DLL or executable output file.
Capture classes SimpleEvent
FileOutput
ExecutableImageOutput
Description Occurs when one of the linker inputs is a DLL or an executable image file.
EXP_OUTPUT Type Simple Event
Parents LINKER
Children None
Properties - The absolute path to an .exp output file.
Capture classes SimpleEvent
FileOutput
ExpOutput
Description Occurs when one of the linker outputs is an .exp file.
FILE_INPUT Type Simple Event
Parents COMPILER
LINKER
Children None
Properties - The absolute path to the input file
- The type of input file
Capture classes SimpleEvent
FileInput
Description Occurs to announce a cl.exe or link.exe input.
FORCE_INLINEE Type Simple Event
Parents FUNCTION
Children None
Properties - The name of the force-inlined function.
- The size of the force-inlined function, represented as an intermediate instruction count.
Capture classes Activity
ForceInlinee
Description Occurs when a function is being force-inlined into another function through the use of the __forceinline keyword.
FRONT_END_FILE Type Activity
Parents C1_DLL
FRONT_END_FILE
Children FRONT_END_FILE
TEMPLATE_INSTANTIATION
Properties - Absolute path to the file.
Capture classes Activity
FrontEndFile
Description Occurs when the compiler front end starts and stops processing a file. This event is recursive. Recursion happens when the front end is parsing included files.
FRONT_END_PASS Type Activity
Parents COMPILER
Children C1_DLL
Properties - Absolute path to input source file
- Absolute path to output object file
Capture classes Activity
CompilerPass
FrontEndPass
Description Occurs at the start and stop of the compiler front-end pass. This pass is responsible for parsing C/C++ source code and converting it into intermediate language.
FUNCTION Type Activity
Parents CODE_GENERATION
THREAD
TOP_DOWN
Children FORCE_INLINEE
Properties - Name of the function
Capture classes Activity
Function
Description Occurs when starting and ending generating the code for a function.
IMP_LIB_OUTPUT Type Simple Event
Parents LINKER
Children None
Properties - The absolute path to an import library output file.
Capture classes SimpleEvent
FileOutput
ImpLibOutput
Description Occurs when one of the linker's outputs is an import library.
LIB_OUTPUT Type Simple Event
Parents LINKER
Children None
Properties - The absolute path to a static library output file.
Capture classes SimpleEvent
FileOutput
LibOutput
Description Occurs when one of the linker's outputs is static library.
LINKER Type Activity
Parents None
Children COMMAND_LINE
ENVIRONMENT_VARIABLE
EXECUTABLE_IMAGE_OUTPUT
EXP_OUTPUT
FILE_INPUT
IMP_LIB_OUTPUT
LIB_OUTPUT
PASS1
PASS2
Properties - Linker version
- Working directory
- Absolute path to the invoked link.exe
Capture classes Activity
Invocation
Linker
Description Occurs at the start and stop of a link.exe invocation.
LTCG Type Activity
Parents PASS1
Children C2_DLL
Properties None
Capture classes Activity
LTCG
Description Occurs at the start and stop of link-time code generation.
OBJ_OUTPUT Type Simple Event
Parents COMPILER
Children None
Properties - The absolute path to the .obj output file
Capture classes SimpleEvent
FileOutput
ObjOutput
Description Occurs once for every .obj output produced by cl.exe.
OPT_ICF Type Activity
Parents PASS1
Children None
Properties None
Capture classes Activity
OptICF
Description Occurs at the start and stop of the identical COMDAT folding (/OPT:ICF) linker optimization.
OPT_LBR Type Activity
Parents PASS1
Children None
Properties None
Capture classes Activity
OptLBR
Description Occurs at the start and stop of the long branch (/OPT:LBR) linker optimization.
OPT_REF Type Activity
Parents PASS1
Children None
Properties None
Capture classes Activity
OptRef
Description Occurs at the start and stop of the unreferenced functions and data elimination (/OPT:REF) linker optimization.
PASS1 Type Activity
Parents LINKER
Children LTCG
OPT_ICF
OPT_LBR
OPT_REF
Properties None
Capture classes Activity
Pass1
Description Occurs at the start and stop of the linker's pass 1.
PASS2 Type Activity
Parents LINKER
Children None
Properties None
Capture classes Activity
Pass2
Description Occurs at the start and stop of the linker's pass 2.
PRE_LTCG_OPT_REF Type Activity
Parents PASS1
Children None
Properties None
Capture classes Activity
PreLTCGOptRef
Description Occurs at the start and stop of the linker optimization pass that eliminates unreferenced functions and data (/OPT:REF). It's done before link-time code generation.
SYMBOL_NAME Type Simple Event
Parents C1_DLL
Children None
Properties - A type key
- The type's name
Capture classes SimpleEvent
SymbolName
Description Occurs at the end of the front-end pass: once for every type involved in template instantiations. The key is a numerical identifier for the type, while the name is its text representation. Type keys are unique within the trace being analyzed. However, different keys coming from different compiler front-end passes may point to the same type. Comparing types between different compiler front-end passes requires using their names. SYMBOL_NAME events are emitted at the end of a compiler front-end pass, after all template instantiations have taken place.
TEMPLATE_INSTANTIATION Type Activity
Parents C1_DLL
FRONT_END_FILE
TEMPLATE_INSTANTIATION
Children TEMPLATE_INSTANTIATION
Properties - The key for the specialized type
- The key for the primary template's type
- The kind of template that was instantiated
Capture classes Activity
TemplateInstantiation
Description Occurs at the beginning and end of a template instantiation. A primary template type (such as vector) is instantiated, resulting in a specialized type (such as std::vector<int>). A key is given for both types. Use the SYMBOL_NAME event to convert a key into the type's name. Type keys are unique within the trace being analyzed. However, different keys coming from different compiler front-end passes may point to the same type. Comparing types between different compiler front-end passes requires using symbol names. This event is recursive. Recursion happens in some cases when the front end is instantiating nested templates.
THREAD Type Activity
Parents CODE_GENERATION
TOP_DOWN
Children FUNCTION
Properties None
Capture classes Activity
Thread
Description Occurs at the start and end of a compiler back-end thread execution. A thread being suspended is considered ended. A thread being woken up is considered started.
TOP_DOWN Type Activity
Parents WHOLE_PROGRAM_ANALYSIS
Children FUNCTION
THREAD
Properties None
Capture classes Activity
TopDown
Description Occurs at the start and stop of the whole program analysis' top-down pass.
WHOLE_PROGRAM_ANALYSIS Type Activity
Parents C2_DLL
Children BOTTOM_UP
TOP_DOWN
Properties None
Capture classes Activity
WholeProgramAnalysis
Description Occurs at the start and stop of the whole-program analysis phase of link-time code generation.