From 564cd0067361caa0c5ea386e9b6c5a470e9ffe58 Mon Sep 17 00:00:00 2001 From: Mike Wittman Date: Mon, 11 Mar 2019 17:41:32 +0000 Subject: [PATCH] [Sampling profiler] Remove unused constructor There's no need to make a distinction between profiling the current thread and other threads, and all profiling of the current thread is already using the other constructor. Bug: 909957 Change-Id: I5fd82ccbedb52100f7f71809704c8e45f13b8cd3 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1513769 Commit-Queue: Charlie Andrews Auto-Submit: Mike Wittman Reviewed-by: Charlie Andrews Cr-Commit-Position: refs/heads/master@{#639554} --- base/profiler/stack_sampling_profiler.cc | 9 --------- base/profiler/stack_sampling_profiler.h | 16 ++++------------ 2 files changed, 4 insertions(+), 21 deletions(-) diff --git a/base/profiler/stack_sampling_profiler.cc b/base/profiler/stack_sampling_profiler.cc index 944f0bf87e349e..d119e0d43939c9 100644 --- a/base/profiler/stack_sampling_profiler.cc +++ b/base/profiler/stack_sampling_profiler.cc @@ -625,15 +625,6 @@ void StackSamplingProfiler::TestPeer::PerformSamplingThreadIdleShutdown( void StackSamplingProfiler::ProfileBuilder::RecordMetadata() {} -StackSamplingProfiler::StackSamplingProfiler( - const SamplingParams& params, - std::unique_ptr profile_builder, - NativeStackSamplerTestDelegate* test_delegate) - : StackSamplingProfiler(PlatformThread::CurrentId(), - params, - std::move(profile_builder), - test_delegate) {} - StackSamplingProfiler::StackSamplingProfiler( PlatformThreadId thread_id, const SamplingParams& params, diff --git a/base/profiler/stack_sampling_profiler.h b/base/profiler/stack_sampling_profiler.h index 597313720be8bd..aff7c6bb286d31 100644 --- a/base/profiler/stack_sampling_profiler.h +++ b/base/profiler/stack_sampling_profiler.h @@ -124,19 +124,11 @@ class BASE_EXPORT StackSamplingProfiler { DISALLOW_COPY_AND_ASSIGN(ProfileBuilder); }; - // Creates a profiler for the CURRENT thread. An optional |test_delegate| can - // be supplied by tests. The caller must ensure that this object gets - // destroyed before the current thread exits. - StackSamplingProfiler( - const SamplingParams& params, - std::unique_ptr profile_builder, - NativeStackSamplerTestDelegate* test_delegate = nullptr); - - // Creates a profiler for ANOTHER thread. An optional |test_delegate| can be - // supplied by tests. + // Creates a profiler for the specified thread. An optional |test_delegate| + // can be supplied by tests. // - // IMPORTANT: The caller must ensure that the thread being sampled does not - // exit before this object gets destructed or Bad Things(tm) may occur. + // The caller must ensure that this object gets destroyed before the thread + // exits. StackSamplingProfiler( PlatformThreadId thread_id, const SamplingParams& params,