NV::Rules::IAction Class Reference
[NvRules Python garbage-collected classes.]

Action interface. More...


Public Types

enum  NameBase
 Basis for action names. More...

Public Member Functions

virtual PYRETURN IMetricadd_double_metric (const char *value_name, IMetric::ValueKind value_kind, double value)=0
 Add a single floating point metric to this action.
virtual PYRETURN IMetricadd_integer_metric (const char *value_name, IMetric::ValueKind value_kind, uint64_t value)=0
 Add a single integer metric to this action.
virtual PYRETURN IMetricadd_string_metric (const char *value_name, IMetric::ValueKind value_kind, const char *value)=0
 Add a single string metric to this action.
virtual PYRETURN IMetricmetric_by_name (const char *metric_name)=0
 Get a single metric by name.
virtual std::set< std::string > metric_names ()=0
 Get the set of metric names.
virtual const char * name (NameBase base=NameBase::FUNCTION)=0
 Get the action name.
virtual PYRETURN INvtxStatenvtx_state ()=0
 Get the NVTX state associated with this action.
virtual std::string ptx_by_pc (uint64_t address)=0
 Get the PTX for a function address within this action.
virtual std::string sass_by_pc (uint64_t address)=0
 Get the disassembled SASS for a function address within this action.
virtual std::map< std::string,
std::string > 
source_files ()=0
 Get the source files associated with an action.
virtual PYRETURN ISourceInfosource_info (uint64_t address)=0
 Get the source info for a function address within this action.


Detailed Description

Represents an activity such as a CUDA kernel on a single range, for which zero or more metrics were collected

Member Enumeration Documentation

The basis determines how the action name is represented when calling name. FUNCTION is the minimal base name without parameters or return value. DEMANGLED is the demangled name, including parameters and return value. MANGLED is the mangled name, including parameters and return value.


Member Function Documentation

virtual PYRETURN IMetric* NV::Rules::IAction::add_double_metric ( const char *  value_name,
IMetric::ValueKind  value_kind,
double  value 
) [pure virtual]

Returns:
the new IMetric
Add a single floating point metric with name value_name and kind value_kind to this action

virtual PYRETURN IMetric* NV::Rules::IAction::add_integer_metric ( const char *  value_name,
IMetric::ValueKind  value_kind,
uint64_t  value 
) [pure virtual]

Returns:
the new IMetric
Add a single integer metric to with name value_name and kind value_kind this action.

virtual PYRETURN IMetric* NV::Rules::IAction::add_string_metric ( const char *  value_name,
IMetric::ValueKind  value_kind,
const char *  value 
) [pure virtual]

Returns:
the new IMetric
Add a single string metric with name value_name and kind value_kind to this action

virtual PYRETURN IMetric* NV::Rules::IAction::metric_by_name ( const char *  metric_name  )  [pure virtual]

Get a single IMetric by metric_name

virtual std::set<std::string> NV::Rules::IAction::metric_names (  )  [pure virtual]

Get the set of metrics available for this action

virtual const char* NV::Rules::IAction::name ( NameBase  base = NameBase::FUNCTION  )  [pure virtual]

Get the action name

virtual PYRETURN INvtxState* NV::Rules::IAction::nvtx_state (  )  [pure virtual]

Returns:
a new INvtxState object if any NVTX state is available for this action.

virtual std::string NV::Rules::IAction::ptx_by_pc ( uint64_t  address  )  [pure virtual]

Returns:
PTX string. An empty string is returned if no PTX is associated with this address
Get the PTX for a function address within this action. The address is expected to be absolute, i.e. as obtained from the correlation IDs of source-correlated metrics.

virtual std::string NV::Rules::IAction::sass_by_pc ( uint64_t  address  )  [pure virtual]

Returns:
SASS string. An empty string is returned if no SASS is associated with this address
Get the disassembled SASS for a function address within this action. The address is expected to be absolute, i.e. as obtained from the correlation IDs of source-correlated metrics. The SASS may include formatting whitespace as generated by the disassembler.

virtual std::map<std::string, std::string> NV::Rules::IAction::source_files (  )  [pure virtual]

Returns:
a map from file name to file content
Get the map of source files associated with this action, along with their content. If content is not available for a file (e.g. because it hadn't been imported into the report), the file name will map to an empty string.

virtual PYRETURN ISourceInfo* NV::Rules::IAction::source_info ( uint64_t  address  )  [pure virtual]

Returns:
a new ISourceInfo object if it is available
Get the source info for address within this action. Addresses are commonly obtained as correlation ids of source-correlated metrics.


Generated on Wed Jan 18 17:51:49 2023 for NvRulesAPI by  doxygen 1.5.8