24 #include <unordered_map> 25 #include <unordered_set> 29 #include "platform/thread.h" 31 #include "trace_config.h" 32 #include "trace_context.h" 108 void start(std::lock_guard<TraceLog>&,
114 void stop(
bool shutdown =
false);
121 void stop(std::lock_guard<TraceLog>&,
bool shutdown =
false);
137 template <
typename T,
typename U>
145 auto cl = getChunkTenant();
150 platform::getCurrentThreadIDCached(),
171 template <
typename T>
175 logEvent(tpi, type, argA,
NoneType());
205 const AtomicCategoryStatus& getCategoryStatus(
206 const char* category_group);
218 std::unique_ptr<TraceBuffer> getBuffer();
227 std::unique_ptr<TraceBuffer> getBuffer(std::lock_guard<TraceLog>&);
244 TraceContext getTraceContext(std::lock_guard<TraceLog>&);
251 bool isEnabled()
const;
273 void registerThread(
const std::string& thread_name =
"");
283 void deregisterThread();
321 std::unique_lock<ChunkTenant> getChunkTenant();
350 void evictThreads(std::lock_guard<TraceLog>& lh);
356 void clearDeregisteredThreads();
361 void maybe_stop(
size_t _generation);
static constexpr TraceArgument asArgument(T arg)
Definition: tracepoint_info.h:31
void logEvent(const tracepoint_info *tpi, TraceEvent::Type type, T argA, U argB)
Definition: trace_log.h:138
void logEvent(const tracepoint_info *tpi, TraceEvent::Type type, T argA)
Definition: trace_log.h:172
Definition: trace_log.h:54
Definition: trace_config.h:188
CategoryRegistry registry
Definition: trace_log.h:420
Definition: category_registry.h:48
Definition: trace_context.h:39
Definition: trace_event.h:40
Type
Definition: trace_event.h:45
void logEvent(const tracepoint_info *tpi, TraceEvent::Type type)
Definition: trace_log.h:190
void lock()
Definition: trace_log.h:290
Definition: chunk_lock.h:168
std::unordered_set< ChunkTenant * > registered_chunk_tenants
Definition: trace_log.h:415
std::atomic< bool > enabled
Definition: trace_log.h:380
std::set< uint64_t > deregistered_threads
Definition: trace_log.h:430
Definition: trace_config.h:123
Definition: trace_argument.h:38
std::atomic< size_t > generation
Definition: trace_log.h:410
std::unordered_map< uint64_t, std::string > thread_names
Definition: trace_log.h:425
std::mutex mutex
Definition: trace_log.h:391
void unlock()
Definition: trace_log.h:299
Definition: category_registry.h:32
std::unique_ptr< TraceBuffer > buffer
Definition: trace_log.h:403
Definition: stats_callback.h:45
TraceConfig trace_config
Definition: trace_log.h:371
static constexpr TraceArgument::Type getType()