timemory 3.3.0
Modular C++ Toolkit for Performance Analysis and Logging. Profiling API and Tools for C, C++, CUDA, Fortran, and Python. The C++ template API is essentially a framework to creating tools: it is designed to provide a unifying interface for recording various performance measurements alongside data logging and interfaces to other tools.
|
#include "timemory/trace.hpp"
#include "timemory/compat/library.h"
#include "timemory/library.h"
#include "timemory/runtime/configure.hpp"
#include "timemory/timemory.hpp"
#include "timemory/utility/bits/signals.hpp"
#include <cstdarg>
#include <cstdlib>
#include <deque>
#include <iostream>
#include <unordered_map>
Go to the source code of this file.
Macros | |
#define | TIMEMORY_LIBRARY_SOURCE 1 |
Typedefs | |
using | string_t = std::string |
using | overhead_map_t = std::unordered_map< size_t, std::pair< wall_clock, size_t > > |
using | throttle_set_t = std::set< size_t > |
using | traceset_t = tim::component_bundle< TIMEMORY_API, user_trace_bundle > |
using | trace_map_t = std::unordered_map< size_t, std::deque< traceset_t > > |
using | mpi_trace_bundle_t = tim::component_tuple<> |
Functions | |
std::array< bool, 2 > & | get_library_state () |
bool | setup_mpi_gotcha () |
bool | timemory_trace_is_initialized () |
bool | timemory_is_throttled (const char *name) |
void | timemory_reset_throttle (const char *name) |
void | timemory_add_hash_id (uint64_t id, const char *name) |
void | timemory_add_hash_ids (uint64_t nentries, uint64_t *ids, const char **names) |
void | timemory_copy_hash_ids () |
void | timemory_push_trace_hash (uint64_t id) |
void | timemory_pop_trace_hash (uint64_t id) |
void | timemory_push_trace (const char *name) |
void | timemory_pop_trace (const char *name) |
void | timemory_trace_set_env (const char *env_var, const char *env_val) |
void | timemory_trace_init (const char *comps, bool read_command_line, const char *cmd) |
void | timemory_trace_finalize (void) |
using mpi_trace_bundle_t = tim::component_tuple<> |
using overhead_map_t = std::unordered_map<size_t, std::pair<wall_clock, size_t> > |
using throttle_set_t = std::set<size_t> |
using trace_map_t = std::unordered_map<size_t, std::deque<traceset_t> > |
using traceset_t = tim::component_bundle<TIMEMORY_API, user_trace_bundle> |
std::array< bool, 2 > & get_library_state | ( | ) |
Definition at line 127 of file library.cpp.
Referenced by timemory_finalize_library(), timemory_init_library(), timemory_library_is_initialized(), timemory_pop_trace(), timemory_pop_trace_hash(), timemory_push_trace(), timemory_push_trace_hash(), timemory_trace_is_initialized(), and timemory_trace_set_env().
void timemory_add_hash_id | ( | uint64_t | id, |
const char * | name | ||
) |
Definition at line 392 of file trace.cpp.
References tim::debug.
Referenced by timemory_add_hash_ids().
void timemory_add_hash_ids | ( | uint64_t | nentries, |
uint64_t * | ids, | ||
const char ** | names | ||
) |
Definition at line 420 of file trace.cpp.
References tim::debug, and timemory_add_hash_id().
void timemory_copy_hash_ids | ( | ) |
Definition at line 431 of file trace.cpp.
References tim::debug.
Referenced by timemory_push_trace_hash().
void timemory_pop_trace | ( | const char * | name | ) |
Definition at line 632 of file trace.cpp.
References get_library_state(), std::max(), and timemory_pop_trace_hash().
void timemory_pop_trace_hash | ( | uint64_t | id | ) |
Definition at line 514 of file trace.cpp.
References get_library_state().
Referenced by timemory_pop_trace().
void timemory_push_trace | ( | const char * | name | ) |
Definition at line 608 of file trace.cpp.
References tim::debug, tim::enabled, get_library_state(), std::max(), PRINT_HERE, timemory_push_trace_hash(), timemory_trace_init(), and timemory_trace_is_initialized().
void timemory_push_trace_hash | ( | uint64_t | id | ) |
Definition at line 448 of file trace.cpp.
References tim::consume_parameters(), tim::debug, tim::enabled, get_library_state(), PRINT_HERE, timemory_copy_hash_ids(), timemory_trace_init(), and timemory_trace_is_initialized().
Referenced by timemory_push_trace().
void timemory_trace_finalize | ( | void | ) |
Definition at line 808 of file trace.cpp.
void timemory_trace_init | ( | const char * | comps, |
bool | read_command_line, | ||
const char * | cmd | ||
) |
Definition at line 671 of file trace.cpp.
References tim::plotting::cmd, tim::exe_name, tim::manager::instance(), tim::output_path, tim::config::read_command_line(), and timemory_init_library().
Referenced by timemory_push_trace(), and timemory_push_trace_hash().
bool timemory_trace_is_initialized | ( | void | ) |
Definition at line 366 of file trace.cpp.
References get_library_state().
Referenced by timemory_push_trace(), and timemory_push_trace_hash().
void timemory_trace_set_env | ( | const char * | env_var, |
const char * | env_val | ||
) |
Definition at line 658 of file trace.cpp.
References get_library_state(), and tim::settings::parse().