| Index: runtime/vm/profiler_service.cc
|
| diff --git a/runtime/vm/profiler_service.cc b/runtime/vm/profiler_service.cc
|
| index 64197073f9373f1d4a39df5e699f7959b845a972..39f863bbc6bfe7177f7875e97ef83a70cfd77520 100644
|
| --- a/runtime/vm/profiler_service.cc
|
| +++ b/runtime/vm/profiler_service.cc
|
| @@ -1051,12 +1051,7 @@ class ProfileBuilder : public ValueObject {
|
|
|
| void FilterSamples() {
|
| ScopeTimer sw("ProfileBuilder::FilterSamples", FLAG_trace_profiler);
|
| - MutexLocker profiler_data_lock(isolate_->profiler_data_mutex());
|
| - IsolateProfilerData* profiler_data = isolate_->profiler_data();
|
| - if (profiler_data == NULL) {
|
| - return;
|
| - }
|
| - SampleBuffer* sample_buffer = profiler_data->sample_buffer();
|
| + SampleBuffer* sample_buffer = Profiler::sample_buffer();
|
| if (sample_buffer == NULL) {
|
| return;
|
| }
|
| @@ -2203,13 +2198,10 @@ void ProfilerService::PrintJSONImpl(Thread* thread,
|
| // Disable profile interrupts while processing the buffer.
|
| Profiler::EndExecution(isolate);
|
|
|
| - {
|
| - MutexLocker profiler_data_lock(isolate->profiler_data_mutex());
|
| - IsolateProfilerData* profiler_data = isolate->profiler_data();
|
| - if (profiler_data == NULL) {
|
| - stream->PrintError(kFeatureDisabled, NULL);
|
| - return;
|
| - }
|
| + SampleBuffer* sample_buffer = Profiler::sample_buffer();
|
| + if (sample_buffer == NULL) {
|
| + stream->PrintError(kFeatureDisabled, NULL);
|
| + return;
|
| }
|
|
|
| {
|
| @@ -2281,13 +2273,10 @@ void ProfilerService::ClearSamples() {
|
| // Disable profile interrupts while processing the buffer.
|
| Profiler::EndExecution(isolate);
|
|
|
| - MutexLocker profiler_data_lock(isolate->profiler_data_mutex());
|
| - IsolateProfilerData* profiler_data = isolate->profiler_data();
|
| - if (profiler_data == NULL) {
|
| + SampleBuffer* sample_buffer = Profiler::sample_buffer();
|
| + if (sample_buffer == NULL) {
|
| return;
|
| }
|
| - SampleBuffer* sample_buffer = profiler_data->sample_buffer();
|
| - ASSERT(sample_buffer != NULL);
|
|
|
| ClearProfileVisitor clear_profile(isolate);
|
| sample_buffer->VisitSamples(&clear_profile);
|
|
|