GCC Middle and Back End API Reference
timer::named_items Class Reference
Collaboration diagram for timer::named_items:

Public Member Functions

 named_items (timer *t)
 
 ~named_items ()
 
void push (const char *item_name)
 
void pop ()
 
void print (FILE *fp, const timevar_time_def *total)
 
std::unique_ptr< json::valuemake_json () const
 

Private Types

typedef hash_map< const char *, timer::timevar_defhash_map_t
 

Private Attributes

timerm_timer
 
hash_map_t m_hash_map
 
auto_vec< const char * > m_names
 

Detailed Description

The implementation of timing events for jit client code, allowing arbitrary named items to appear on the timing stack.

Member Typedef Documentation

◆ hash_map_t

Constructor & Destructor Documentation

◆ named_items()

timer::named_items::named_items ( timer * t)
The constructor for class timer::named_items.

References m_hash_map, m_names, m_timer, and timer::timer().

◆ ~named_items()

timer::named_items::~named_items ( )
The destructor for class timer::named_items.

Member Function Documentation

◆ make_json()

std::unique_ptr< json::value > timer::named_items::make_json ( ) const
Create a json value representing this object, suitable for use in SARIF output.

References gcc_assert, hash_map< KeyId, Value, Traits >::get(), m_hash_map, m_names, and make_unique().

◆ pop()

void timer::named_items::pop ( )
Pop the top item from the timer stack.

References m_timer.

◆ print()

void timer::named_items::print ( FILE * fp,
const timevar_time_def * total )
Print the given client item. Helper function for timer::print.

References gcc_assert, m_hash_map, m_names, and m_timer.

◆ push()

void timer::named_items::push ( const char * item_name)
Push the named item onto the timer stack.

References gcc_assert, m_hash_map, m_names, and m_timer.

Field Documentation

◆ m_hash_map

hash_map_t timer::named_items::m_hash_map
private

Referenced by make_json(), named_items(), print(), and push().

◆ m_names

auto_vec<const char *> timer::named_items::m_names
private

Referenced by make_json(), named_items(), print(), and push().

◆ m_timer

timer* timer::named_items::m_timer
private

Referenced by named_items(), pop(), print(), and push().


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