@@ -19,9 +19,9 @@ PROFILER_NAMESPACE_BEGIN
1919// / @enum ProfilerType
2020// / @brief Types of profiling operations supported
2121enum class ProfilerType {
22- CPU , // /< CPU profiling using gperftools
23- HEAP , // /< Heap memory profiling
24- HEAP_GROWTH // /< Heap growth stack analysis
22+ CPU , // /< CPU profiling using gperftools
23+ HEAP , // /< Heap memory profiling
24+ HEAP_GROWTH // /< Heap growth stack analysis
2525};
2626
2727// / @struct ProfilerState
@@ -37,10 +37,10 @@ struct ProfilerState {
3737// / @brief Structure to hold captured stack trace for a thread
3838// / @note Uses fixed-size array for signal-safety
3939struct ThreadStackTrace {
40- pid_t tid; // /< Thread ID
41- void * addresses[64 ]; // /< Array of instruction pointers (fixed size for signal-safety)
42- int depth; // /< Number of valid addresses in the array
43- bool captured; // /< Whether the trace was successfully captured
40+ pid_t tid; // /< Thread ID
41+ void * addresses[64 ]; // /< Array of instruction pointers (fixed size for signal-safety)
42+ int depth; // /< Number of valid addresses in the array
43+ bool captured; // /< Whether the trace was successfully captured
4444};
4545
4646// / @struct SharedStackTrace
@@ -196,24 +196,24 @@ class ProfilerManager {
196196 // / @brief Restore old signal handler
197197 void restoreSignalHandler ();
198198
199- std::string profile_dir_; // /< Directory for profile outputs
199+ std::string profile_dir_; // /< Directory for profile outputs
200200 std::map<ProfilerType, ProfilerState> profiler_states_; // /< Current profiler states
201- mutable std::mutex mutex_; // /< Mutex for thread safety
201+ mutable std::mutex mutex_; // /< Mutex for thread safety
202202
203203 std::atomic<bool > cpu_profiling_in_progress_{false }; // /< CPU profiling concurrency control
204204 std::unique_ptr<Symbolizer> symbolizer_; // /< Symbolizer instance
205205
206- static std::atomic<bool > capture_in_progress_; // /< Stack capture in progress flag
207- static SharedStackTrace* shared_stacks_; // /< Shared stack trace array
208- static int stack_array_size_; // /< Size of stack array
209- static std::atomic<pid_t > excluded_tid_; // /< Thread ID to exclude from capture
210- static std::atomic<int > completed_count_; // /< Count of completed captures
211- static int expected_count_; // /< Expected number of threads to capture
212- static pid_t main_thread_id_; // /< PID of main thread
213- static int stack_capture_signal_; // /< Signal used for stack capture
214- static struct sigaction old_action_; // /< Saved old signal handler
215- static bool old_action_saved_; // /< Whether old handler was saved
216- static bool enable_signal_chaining_; // /< Signal chaining enabled flag
206+ static std::atomic<bool > capture_in_progress_; // /< Stack capture in progress flag
207+ static SharedStackTrace* shared_stacks_; // /< Shared stack trace array
208+ static int stack_array_size_; // /< Size of stack array
209+ static std::atomic<pid_t > excluded_tid_; // /< Thread ID to exclude from capture
210+ static std::atomic<int > completed_count_; // /< Count of completed captures
211+ static int expected_count_; // /< Expected number of threads to capture
212+ static pid_t main_thread_id_; // /< PID of main thread
213+ static int stack_capture_signal_; // /< Signal used for stack capture
214+ static struct sigaction old_action_; // /< Saved old signal handler
215+ static bool old_action_saved_; // /< Whether old handler was saved
216+ static bool enable_signal_chaining_; // /< Signal chaining enabled flag
217217};
218218
219219PROFILER_NAMESPACE_END
0 commit comments