Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3287)

Unified Diff: base/profiler/stack_sampling_profiler.cc

Issue 1423583002: Stack sampling profiler: handle unloaded and unloading modules (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkcr
Patch Set: fix gcc compile Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/profiler/stack_sampling_profiler.h ('k') | base/profiler/stack_sampling_profiler_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/profiler/stack_sampling_profiler.cc
diff --git a/base/profiler/stack_sampling_profiler.cc b/base/profiler/stack_sampling_profiler.cc
index a197d844093d13cd08c447a6748d426499d713bc..c7e38c0e52cb65137c8eb8d17ca807acfafd90c8 100644
--- a/base/profiler/stack_sampling_profiler.cc
+++ b/base/profiler/stack_sampling_profiler.cc
@@ -217,10 +217,20 @@ StackSamplingProfiler::SamplingParams::SamplingParams()
sampling_interval(TimeDelta::FromMilliseconds(100)) {
}
-StackSamplingProfiler::StackSamplingProfiler(PlatformThreadId thread_id,
- const SamplingParams& params,
- const CompletedCallback& callback)
- : thread_id_(thread_id), params_(params), completed_callback_(callback) {}
+StackSamplingProfiler::StackSamplingProfiler(
+ PlatformThreadId thread_id,
+ const SamplingParams& params,
+ const CompletedCallback& callback)
+ : StackSamplingProfiler(thread_id, params, callback, nullptr) {}
+
+StackSamplingProfiler::StackSamplingProfiler(
+ PlatformThreadId thread_id,
+ const SamplingParams& params,
+ const CompletedCallback& callback,
+ NativeStackSamplerTestDelegate* test_delegate)
+ : thread_id_(thread_id), params_(params), completed_callback_(callback),
+ test_delegate_(test_delegate) {
+}
StackSamplingProfiler::~StackSamplingProfiler() {
Stop();
@@ -242,7 +252,7 @@ void StackSamplingProfiler::Start() {
return;
scoped_ptr<NativeStackSampler> native_sampler =
- NativeStackSampler::Create(thread_id_);
+ NativeStackSampler::Create(thread_id_, test_delegate_);
if (!native_sampler)
return;
« no previous file with comments | « base/profiler/stack_sampling_profiler.h ('k') | base/profiler/stack_sampling_profiler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698