MLIR  19.0.0git
Public Member Functions | List of all members
mlir::tracing::ActionProfiler Struct Reference

This class defines an observer that profiles events before and after execution on the provided stream. More...

#include "mlir/Debug/Observers/ActionProfiler.h"

+ Inheritance diagram for mlir::tracing::ActionProfiler:

Public Member Functions

 ActionProfiler (raw_ostream &os)
 
 ~ActionProfiler () override
 
void beforeExecute (const ActionActiveStack *action, Breakpoint *breakpoint, bool willExecute) override
 This method is called before the Action is executed If a breakpoint was hit, it is passed as an argument to the callback. More...
 
void afterExecute (const ActionActiveStack *action) override
 This method is called after the Action is executed, if it was executed. More...
 
- Public Member Functions inherited from mlir::tracing::ExecutionContext::Observer
virtual ~Observer ()=default
 

Detailed Description

This class defines an observer that profiles events before and after execution on the provided stream.

The events are stored in the Chrome trace event format.

Definition at line 25 of file ActionProfiler.h.

Constructor & Destructor Documentation

◆ ActionProfiler()

mlir::tracing::ActionProfiler::ActionProfiler ( raw_ostream &  os)
inline

Definition at line 26 of file ActionProfiler.h.

◆ ~ActionProfiler()

mlir::tracing::ActionProfiler::~ActionProfiler ( )
inlineoverride

Definition at line 31 of file ActionProfiler.h.

Member Function Documentation

◆ afterExecute()

void ActionProfiler::afterExecute ( const ActionActiveStack action)
overridevirtual

This method is called after the Action is executed, if it was executed.

It is not called if the action is skipped. Note that this method will be called from multiple threads concurrently when MLIR multi-threading is enabled.

Reimplemented from mlir::tracing::ExecutionContext::Observer.

Definition at line 29 of file ActionProfiler.cpp.

◆ beforeExecute()

void ActionProfiler::beforeExecute ( const ActionActiveStack action,
Breakpoint breakpoint,
bool  willExecute 
)
overridevirtual

This method is called before the Action is executed If a breakpoint was hit, it is passed as an argument to the callback.

The willExecute argument indicates whether the action will be executed or not. Note that this method will be called from multiple threads concurrently when MLIR multi-threading is enabled.

Reimplemented from mlir::tracing::ExecutionContext::Observer.

Definition at line 24 of file ActionProfiler.cpp.


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