OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/renderer/devtools/v8_sampling_profiler.h" | 5 #include "content/renderer/devtools/v8_sampling_profiler.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 #include <string.h> | 8 #include <string.h> |
9 | 9 |
10 #include "base/format_macros.h" | 10 #include "base/format_macros.h" |
(...skipping 621 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
632 } | 632 } |
633 | 633 |
634 void V8SamplingProfiler::OnTraceLogDisabled() { | 634 void V8SamplingProfiler::OnTraceLogDisabled() { |
635 StopSamplingThread(); | 635 StopSamplingThread(); |
636 } | 636 } |
637 | 637 |
638 void V8SamplingProfiler::EnableSamplingEventForTesting(int code_added_events, | 638 void V8SamplingProfiler::EnableSamplingEventForTesting(int code_added_events, |
639 int sample_events) { | 639 int sample_events) { |
640 render_thread_sampler_->SetEventsToCollectForTest(code_added_events, | 640 render_thread_sampler_->SetEventsToCollectForTest(code_added_events, |
641 sample_events); | 641 sample_events); |
642 waitable_event_for_testing_.reset(new base::WaitableEvent(false, false)); | 642 waitable_event_for_testing_.reset( |
| 643 new base::WaitableEvent(base::WaitableEvent::ResetPolicy::AUTOMATIC, |
| 644 base::WaitableEvent::InitialState::NOT_SIGNALED)); |
643 } | 645 } |
644 | 646 |
645 void V8SamplingProfiler::WaitSamplingEventForTesting() { | 647 void V8SamplingProfiler::WaitSamplingEventForTesting() { |
646 waitable_event_for_testing_->Wait(); | 648 waitable_event_for_testing_->Wait(); |
647 } | 649 } |
648 | 650 |
649 } // namespace content | 651 } // namespace content |
OLD | NEW |