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.
|
Classes | |
struct | group_info |
struct | TIMEMORY_PIPE |
Typedefs | |
using | string_t = std::string |
using | strvec_t = std::vector< string_t > |
Functions | |
group_info & | get_group_info () |
void | drop_privileges (int permanent) |
void | restore_privileges () |
int | open_devnull (int fd) |
void | sanitize_files () |
pid_t | fork () |
TIMEMORY_PIPE * | popen (const char *path, char **argv, char **envp) |
int | pclose (TIMEMORY_PIPE *p) |
strvec_t | read_fork (TIMEMORY_PIPE *proc, int max_counter) |
std::ostream & | flush_output (std::ostream &os, TIMEMORY_PIPE *proc, int max_counter) |
TIMEMORY_UTILITY_LINKAGE (TIMEMORY_PIPE *) popen(const char *path | |
TIMEMORY_UTILITY_LINKAGE (int) pclose(TIMEMORY_PIPE *p) | |
TIMEMORY_UTILITY_LINKAGE (pid_t) fork() | |
TIMEMORY_UTILITY_LINKAGE (void) sanitize_files() | |
TIMEMORY_UTILITY_LINKAGE (strvec_t) read_fork(TIMEMORY_PIPE *proc | |
Variables | |
char ** | argv = nullptr |
char char ** | envp = nullptr) |
int | max_counter = 50) |
struct tim::popen::group_info |
struct tim::popen::TIMEMORY_PIPE |
using tim::popen::string_t = typedef std::string |
using tim::popen::strvec_t = typedef std::vector<string_t> |
void tim::popen::drop_privileges | ( | int | permanent | ) |
Definition at line 75 of file popen.cpp.
References get_group_info(), tim::popen::group_info::group_id, tim::popen::group_info::ngroups, NGROUPS_MAX, and tim::popen::group_info::user_id.
Referenced by fork().
std::ostream & tim::popen::flush_output | ( | std::ostream & | os, |
TIMEMORY_PIPE * | proc, | ||
int | max_counter | ||
) |
Definition at line 426 of file popen.cpp.
References tim::popen::TIMEMORY_PIPE::child_pid, tim::popen::TIMEMORY_PIPE::child_status, max_counter, tim::os, and tim::popen::TIMEMORY_PIPE::read_fd.
Referenced by tim::if().
pid_t tim::popen::fork | ( | ) |
Definition at line 208 of file popen.cpp.
References drop_privileges(), fork(), and sanitize_files().
|
inline |
Definition at line 66 of file popen.cpp.
Referenced by drop_privileges(), and restore_privileges().
int tim::popen::open_devnull | ( | int | fd | ) |
int tim::popen::pclose | ( | TIMEMORY_PIPE * | p | ) |
Definition at line 327 of file popen.cpp.
References tim::popen::TIMEMORY_PIPE::child_pid, tim::popen::TIMEMORY_PIPE::child_status, std::max(), tim::popen::TIMEMORY_PIPE::read_fd, and tim::popen::TIMEMORY_PIPE::write_fd.
TIMEMORY_PIPE * tim::popen::popen | ( | const char * | path, |
char ** | argv, | ||
char ** | envp | ||
) |
Definition at line 229 of file popen.cpp.
References argv, tim::popen::TIMEMORY_PIPE::child_pid, tim::plotting::close(), environ, envp, fork(), tim::popen::TIMEMORY_PIPE::read_fd, and tim::popen::TIMEMORY_PIPE::write_fd.
Referenced by tim::if().
strvec_t tim::popen::read_fork | ( | TIMEMORY_PIPE * | proc, |
int | max_counter | ||
) |
Definition at line 385 of file popen.cpp.
References tim::popen::TIMEMORY_PIPE::child_pid, tim::popen::TIMEMORY_PIPE::child_status, tim::delimit(), max_counter, and tim::popen::TIMEMORY_PIPE::read_fd.
void tim::popen::restore_privileges | ( | ) |
void tim::popen::sanitize_files | ( | ) |
tim::popen::TIMEMORY_UTILITY_LINKAGE | ( | int | ) |
tim::popen::TIMEMORY_UTILITY_LINKAGE | ( | pid_t | ) |
tim::popen::TIMEMORY_UTILITY_LINKAGE | ( | strvec_t | ) |
tim::popen::TIMEMORY_UTILITY_LINKAGE | ( | TIMEMORY_PIPE * | ) | const |
tim::popen::TIMEMORY_UTILITY_LINKAGE | ( | void | ) |
char char** tim::popen::envp = nullptr) |
int tim::popen::max_counter = 50) |
Definition at line 90 of file popen.hpp.
Referenced by flush_output(), and read_fork().