diff --git a/rusage_profiler.h b/rusage_profiler.h index f1cad9d..f4face1 100644 --- a/rusage_profiler.h +++ b/rusage_profiler.h @@ -326,7 +326,7 @@ class RUsageProfiler { // the caller, as if the caller printed them. That makes it easy to attribute // the logged resource usage to the actual user rather than RUsageProfiler. RUsageProfiler( // - RUsageScope scope, // + RUsageScope scope, // Which process/thread to monitor MetricsMask metrics, // Which metrics to track RaiiActionsMask raii_actions, // Which RAII logs to enable SourceLocation location, // Pass SourceLocation{__FILE__, __LINE__} @@ -344,7 +344,7 @@ class RUsageProfiler { // the client can still request explicit snapshots at any time, interleaved // with timelapse ones. RUsageProfiler( // - RUsageScope scope, // + RUsageScope scope, // Which process/thread to monitor MetricsMask metrics, // Which metrics to track absl::Duration timelapse_interval, // Take timelapse snapshots this often bool also_log_timelapses, // Log timelapse snapshots as taken diff --git a/rusage_stats.cc b/rusage_stats.cc index d960de5..8b55f4f 100644 --- a/rusage_stats.cc +++ b/rusage_stats.cc @@ -73,7 +73,7 @@ RUsageScope RUsageScope::ThisThread() { return RUsageScope{getpid(), static_cast(syscall(__NR_gettid))}; } -RUsageScope RUsageScope::Thread(pid_t tid) { +RUsageScope RUsageScope::ThisProcessThread(pid_t tid) { return RUsageScope{getpid(), tid}; } diff --git a/rusage_stats.h b/rusage_stats.h index 236f9d5..c094b84 100644 --- a/rusage_stats.h +++ b/rusage_stats.h @@ -61,8 +61,8 @@ class RUsageScope { static RUsageScope ThisProcess(); static RUsageScope Process(pid_t pid); static RUsageScope ThisThread(); + static RUsageScope ThisProcessThread(pid_t tid); static RUsageScope Thread(pid_t pid, pid_t tid); - static RUsageScope Thread(pid_t tid); // Copyable and movable. RUsageScope(const RUsageScope&) = default;