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::value > | make_json () const |
Private Types | |
typedef hash_map< const char *, timer::timevar_def > | hash_map_t |
Private Attributes | |
timer * | m_timer |
hash_map_t | m_hash_map |
auto_vec< const char * > | m_names |
The implementation of timing events for jit client code, allowing arbitrary named items to appear on the timing stack.
|
private |
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().
timer::named_items::~named_items | ( | ) |
The destructor for class timer::named_items.
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().
void timer::named_items::pop | ( | ) |
Pop the top item from the timer stack.
References m_timer.
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.
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.
|
private |
Referenced by make_json(), named_items(), print(), and push().
|
private |
Referenced by make_json(), named_items(), print(), and push().
|
private |
Referenced by named_items(), pop(), print(), and push().