Skip to content

Commit

Permalink
[Sampling profiler] Remove unused constructor
Browse files Browse the repository at this point in the history
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 <charliea@chromium.org>
Auto-Submit: Mike Wittman <wittman@chromium.org>
Reviewed-by: Charlie Andrews <charliea@chromium.org>
Cr-Commit-Position: refs/heads/master@{#639554}
  • Loading branch information
Mike Wittman authored and Commit Bot committed Mar 11, 2019
1 parent 6b89ee0 commit 564cd00
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 21 deletions.
9 changes: 0 additions & 9 deletions base/profiler/stack_sampling_profiler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -625,15 +625,6 @@ void StackSamplingProfiler::TestPeer::PerformSamplingThreadIdleShutdown(

void StackSamplingProfiler::ProfileBuilder::RecordMetadata() {}

StackSamplingProfiler::StackSamplingProfiler(
const SamplingParams& params,
std::unique_ptr<ProfileBuilder> profile_builder,
NativeStackSamplerTestDelegate* test_delegate)
: StackSamplingProfiler(PlatformThread::CurrentId(),
params,
std::move(profile_builder),
test_delegate) {}

StackSamplingProfiler::StackSamplingProfiler(
PlatformThreadId thread_id,
const SamplingParams& params,
Expand Down
16 changes: 4 additions & 12 deletions base/profiler/stack_sampling_profiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<ProfileBuilder> 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,
Expand Down

0 comments on commit 564cd00

Please sign in to comment.