MLIR  20.0.0git
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
mlir::tracing::DebugConfig Class Reference

#include "mlir/Debug/CLOptionsSetup.h"

Public Member Functions

void enableDebuggerActionHook (bool enabled=true)
 Options. More...
 
bool isDebuggerActionHookEnabled () const
 Return true if the debugger action hook is enabled. More...
 
DebugConfiglogActionsTo (StringRef filename)
 Set the filename to use for logging actions, use "-" for stdout. More...
 
StringRef getLogActionsTo () const
 Get the filename to use for logging actions. More...
 
StringRef getProfileActionsTo () const
 Get the filename to use for profiling actions. More...
 
void addLogActionLocFilter (tracing::BreakpointManager *breakpointManager)
 Set a location breakpoint manager to filter out action logging based on the attached IR location in the Action context. More...
 
ArrayRef< tracing::BreakpointManager * > getLogActionsLocFilters () const
 Get the location breakpoint managers to use to filter out action logging. More...
 

Static Public Member Functions

static void registerCLOptions ()
 Register the options as global LLVM command line options. More...
 
static DebugConfig createFromCLOptions ()
 Create a new config with the default set from the CL options. More...
 

Protected Attributes

bool enableDebuggerActionHookFlag = false
 Enable the Debugger action hook: a debugger (like gdb or lldb) can intercept MLIR Actions. More...
 
std::string logActionsToFlag
 Log action execution to the given file (or "-" for stdout) More...
 
std::string profileActionsToFlag
 Profile action execution to the given file (or "-" for stdout) More...
 
std::vector< tracing::BreakpointManager * > logActionLocationFilter
 Location Breakpoints to filter the action logging. More...
 

Detailed Description

Definition at line 22 of file CLOptionsSetup.h.

Member Function Documentation

◆ addLogActionLocFilter()

void mlir::tracing::DebugConfig::addLogActionLocFilter ( tracing::BreakpointManager breakpointManager)
inline

Set a location breakpoint manager to filter out action logging based on the attached IR location in the Action context.

Ownership stays with the caller.

Definition at line 59 of file CLOptionsSetup.h.

References logActionLocationFilter.

◆ createFromCLOptions()

DebugConfig DebugConfig::createFromCLOptions ( )
static

Create a new config with the default set from the CL options.

Definition at line 76 of file CLOptionsSetup.cpp.

References clOptionsConfig.

Referenced by mlir::MlirOptMainConfig::createFromCLOptions().

◆ enableDebuggerActionHook()

void mlir::tracing::DebugConfig::enableDebuggerActionHook ( bool  enabled = true)
inline

Options.

Enable the Debugger action hook: it makes a debugger (like gdb or lldb) able to intercept MLIR Actions.

Definition at line 36 of file CLOptionsSetup.h.

References enableDebuggerActionHookFlag.

◆ getLogActionsLocFilters()

ArrayRef<tracing::BreakpointManager *> mlir::tracing::DebugConfig::getLogActionsLocFilters ( ) const
inline

Get the location breakpoint managers to use to filter out action logging.

Definition at line 64 of file CLOptionsSetup.h.

References logActionLocationFilter.

Referenced by mlir::tracing::InstallDebugHandler::Impl::Impl().

◆ getLogActionsTo()

StringRef mlir::tracing::DebugConfig::getLogActionsTo ( ) const
inline

Get the filename to use for logging actions.

Definition at line 51 of file CLOptionsSetup.h.

References logActionsToFlag.

Referenced by mlir::tracing::InstallDebugHandler::Impl::Impl().

◆ getProfileActionsTo()

StringRef mlir::tracing::DebugConfig::getProfileActionsTo ( ) const
inline

Get the filename to use for profiling actions.

Definition at line 54 of file CLOptionsSetup.h.

References profileActionsToFlag.

Referenced by mlir::tracing::InstallDebugHandler::Impl::Impl().

◆ isDebuggerActionHookEnabled()

bool mlir::tracing::DebugConfig::isDebuggerActionHookEnabled ( ) const
inline

Return true if the debugger action hook is enabled.

Definition at line 41 of file CLOptionsSetup.h.

References enableDebuggerActionHookFlag.

Referenced by mlir::tracing::InstallDebugHandler::Impl::Impl().

◆ logActionsTo()

DebugConfig& mlir::tracing::DebugConfig::logActionsTo ( StringRef  filename)
inline

Set the filename to use for logging actions, use "-" for stdout.

Definition at line 46 of file CLOptionsSetup.h.

References logActionsToFlag.

◆ registerCLOptions()

void DebugConfig::registerCLOptions ( )
static

Register the options as global LLVM command line options.

Definition at line 74 of file CLOptionsSetup.cpp.

References clOptionsConfig.

Referenced by mlir::MlirOptMainConfig::registerCLOptions().

Member Data Documentation

◆ enableDebuggerActionHookFlag

bool mlir::tracing::DebugConfig::enableDebuggerActionHookFlag = false
protected

Enable the Debugger action hook: a debugger (like gdb or lldb) can intercept MLIR Actions.

Definition at line 71 of file CLOptionsSetup.h.

Referenced by enableDebuggerActionHook(), and isDebuggerActionHookEnabled().

◆ logActionLocationFilter

std::vector<tracing::BreakpointManager *> mlir::tracing::DebugConfig::logActionLocationFilter
protected

Location Breakpoints to filter the action logging.

Definition at line 80 of file CLOptionsSetup.h.

Referenced by addLogActionLocFilter(), and getLogActionsLocFilters().

◆ logActionsToFlag

std::string mlir::tracing::DebugConfig::logActionsToFlag
protected

Log action execution to the given file (or "-" for stdout)

Definition at line 74 of file CLOptionsSetup.h.

Referenced by getLogActionsTo(), and logActionsTo().

◆ profileActionsToFlag

std::string mlir::tracing::DebugConfig::profileActionsToFlag
protected

Profile action execution to the given file (or "-" for stdout)

Definition at line 77 of file CLOptionsSetup.h.

Referenced by getProfileActionsTo().


The documentation for this class was generated from the following files: