19 #ifndef GRPC_CORE_LIB_PROFILING_TIMERS_H 20 #define GRPC_CORE_LIB_PROFILING_TIMERS_H 27 void gpr_timer_begin(
const char* tagstr,
int important,
const char* file,
29 void gpr_timer_end(
const char* tagstr,
int important,
const char* file,
36 #if !(defined(GRPC_STAP_PROFILER) + defined(GRPC_BASIC_PROFILER) + \ 37 defined(GRPC_CUSTOM_PROFILER)) 39 #define GPR_TIMER_MARK(tag, important) \ 43 #define GPR_TIMER_SCOPE(tag, important) \ 49 #if defined(GRPC_STAP_PROFILER) && defined(GRPC_BASIC_PROFILER) 50 #error "GRPC_STAP_PROFILER and GRPC_BASIC_PROFILER are mutually exclusive." 52 #if defined(GRPC_STAP_PROFILER) && defined(GRPC_CUSTOM_PROFILER) 53 #error "GRPC_STAP_PROFILER and GRPC_CUSTOM_PROFILER are mutually exclusive." 55 #if defined(GRPC_CUSTOM_PROFILER) && defined(GRPC_BASIC_PROFILER) 56 #error "GRPC_CUSTOM_PROFILER and GRPC_BASIC_PROFILER are mutually exclusive." 60 #define GPR_TIMER_MARK(tag, important) \ 61 gpr_timer_add_mark(tag, important, __FILE__, __LINE__); 63 #ifdef GRPC_STAP_PROFILER 67 #ifdef GRPC_BASIC_PROFILER 74 ProfileScope(
const char* desc,
bool important,
const char* file,
int line)
81 const char*
const desc_;
85 #define GPR_TIMER_SCOPE_NAME_INTERNAL(prefix, line) prefix##line 86 #define GPR_TIMER_SCOPE_NAME(prefix, line) \ 87 GPR_TIMER_SCOPE_NAME_INTERNAL(prefix, line) 88 #define GPR_TIMER_SCOPE(tag, important) \ 89 ::grpc::ProfileScope GPR_TIMER_SCOPE_NAME(_profile_scope_, __LINE__)( \ 90 (tag), (important), __FILE__, __LINE__) void gpr_timer_end(const char *tagstr, int important, const char *file, int line)
void gpr_timers_global_destroy(void)
Definition: basic_timers.cc:288
void gpr_timers_global_init(void)
Definition: basic_timers.cc:286
void gpr_timer_begin(const char *tagstr, int important, const char *file, int line)
Definition: flow_control.h:37
void gpr_timer_set_enabled(int enabled)
Definition: basic_timers.cc:292
void gpr_timers_set_log_filename(const char *filename)
Definition: basic_timers.cc:290
void gpr_timer_add_mark(const char *tagstr, int important, const char *file, int line)