souffle  2.0.2-371-g6315b36
Public Member Functions | Static Public Attributes | Private Attributes
souffle::ast::analysis::ProfileUseAnalysis Class Reference

Analysis that loads profile data and has a profile query interface. More...

#include <ProfileUse.h>

Inheritance diagram for souffle::ast::analysis::ProfileUseAnalysis:
Inheritance graph
Collaboration diagram for souffle::ast::analysis::ProfileUseAnalysis:
Collaboration graph

Public Member Functions

size_t getRelationSize (const QualifiedName &rel) const
 Return size of relation in the profile. More...
 
bool hasRelationSize (const QualifiedName &rel) const
 Check whether the relation size exists in profile. More...
 
void print (std::ostream &os) const override
 Output some profile information. More...
 
 ProfileUseAnalysis ()
 
void run (const TranslationUnit &translationUnit) override
 Run analysis. More...
 
- Public Member Functions inherited from souffle::ast::analysis::Analysis
 Analysis (std::string identifier)
 
virtual const std::string & getName () const
 get name of the analysis More...
 
virtual ~Analysis ()=default
 

Static Public Attributes

static constexpr const char * name = "profile-use"
 Name of analysis. More...
 

Private Attributes

std::shared_ptr< profile::ProgramRunprogramRun
 performance model of profile run More...
 

Additional Inherited Members

- Protected Attributes inherited from souffle::ast::analysis::Analysis
const std::string identifier
 

Detailed Description

Analysis that loads profile data and has a profile query interface.

Definition at line 43 of file ProfileUse.h.

Constructor & Destructor Documentation

◆ ProfileUseAnalysis()

souffle::ast::analysis::ProfileUseAnalysis::ProfileUseAnalysis ( )
inline

Definition at line 48 of file ProfileUse.h.

56  :
57  /** performance model of profile run */

Member Function Documentation

◆ getRelationSize()

size_t souffle::ast::analysis::ProfileUseAnalysis::getRelationSize ( const QualifiedName rel) const

Return size of relation in the profile.

Get relation size from profile.

Definition at line 61 of file ProfileUse.cpp.

Referenced by souffle::ast::ProfileUseSips::evaluateCosts().

◆ hasRelationSize()

bool souffle::ast::analysis::ProfileUseAnalysis::hasRelationSize ( const QualifiedName rel) const

Check whether the relation size exists in profile.

Check whether relation size is defined in profile.

Definition at line 54 of file ProfileUse.cpp.

54  {
55  if (const auto* profRel = programRun->getRelation(rel.toString())) {
56  return profRel->size();

References programRun, and rel().

Here is the call graph for this function:

◆ print()

void souffle::ast::analysis::ProfileUseAnalysis::print ( std::ostream &  os) const
overridevirtual

Output some profile information.

Print analysis.

Reimplemented from souffle::ast::analysis::Analysis.

Definition at line 49 of file ProfileUse.cpp.

◆ run()

void souffle::ast::analysis::ProfileUseAnalysis::run ( const TranslationUnit translationUnit)
overridevirtual

Run analysis.

Run analysis, i.e., retrieve profile information.

Implements souffle::ast::analysis::Analysis.

Definition at line 39 of file ProfileUse.cpp.

42  {}
43 
44 /**

Field Documentation

◆ name

constexpr const char* souffle::ast::analysis::ProfileUseAnalysis::name = "profile-use"
staticconstexpr

Name of analysis.

Definition at line 46 of file ProfileUse.h.

◆ programRun

std::shared_ptr<profile::ProgramRun> souffle::ast::analysis::ProfileUseAnalysis::programRun
private

performance model of profile run

Definition at line 65 of file ProfileUse.h.

Referenced by hasRelationSize().


The documentation for this class was generated from the following files:
souffle::ast::analysis::ProfileUseAnalysis::programRun
std::shared_ptr< profile::ProgramRun > programRun
performance model of profile run
Definition: ProfileUse.h:65
rel
void rel(size_t limit, bool showLimit=true)
Definition: Tui.h:1086