| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "vm/profiler_service.h" | 5 #include "vm/profiler_service.h" |
| 6 | 6 |
| 7 #include "vm/growable_array.h" | 7 #include "vm/growable_array.h" |
| 8 #include "vm/native_symbol.h" | 8 #include "vm/native_symbol.h" |
| 9 #include "vm/object.h" | 9 #include "vm/object.h" |
| 10 #include "vm/os.h" | 10 #include "vm/os.h" |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 size_before, size_after, length_before, length_after); | 56 size_before, size_after, length_before, length_after); |
| 57 } | 57 } |
| 58 isolate->set_deoptimized_code_array(current_); | 58 isolate->set_deoptimized_code_array(current_); |
| 59 } | 59 } |
| 60 | 60 |
| 61 private: | 61 private: |
| 62 bool Contained(const Code& code, const GrowableObjectArray& array) { | 62 bool Contained(const Code& code, const GrowableObjectArray& array) { |
| 63 if (array.IsNull() || code.IsNull()) { | 63 if (array.IsNull() || code.IsNull()) { |
| 64 return false; | 64 return false; |
| 65 } | 65 } |
| 66 NoGCScope no_gc_scope; | 66 NoSafepointScope no_safepoint_scope; |
| 67 for (intptr_t i = 0; array.Length(); i++) { | 67 for (intptr_t i = 0; array.Length(); i++) { |
| 68 if (code.raw() == array.At(i)) { | 68 if (code.raw() == array.At(i)) { |
| 69 return true; | 69 return true; |
| 70 } | 70 } |
| 71 } | 71 } |
| 72 return false; | 72 return false; |
| 73 } | 73 } |
| 74 | 74 |
| 75 intptr_t SizeOf(const GrowableObjectArray& array) { | 75 intptr_t SizeOf(const GrowableObjectArray& array) { |
| 76 if (array.IsNull()) { | 76 if (array.IsNull()) { |
| (...skipping 2284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2361 ASSERT(sample_buffer != NULL); | 2361 ASSERT(sample_buffer != NULL); |
| 2362 | 2362 |
| 2363 ClearProfileVisitor clear_profile(isolate); | 2363 ClearProfileVisitor clear_profile(isolate); |
| 2364 sample_buffer->VisitSamples(&clear_profile); | 2364 sample_buffer->VisitSamples(&clear_profile); |
| 2365 | 2365 |
| 2366 // Enable profile interrupts. | 2366 // Enable profile interrupts. |
| 2367 Profiler::BeginExecution(isolate); | 2367 Profiler::BeginExecution(isolate); |
| 2368 } | 2368 } |
| 2369 | 2369 |
| 2370 } // namespace dart | 2370 } // namespace dart |
| OLD | NEW |