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/hash_map.h" | 8 #include "vm/hash_map.h" |
9 #include "vm/log.h" | 9 #include "vm/log.h" |
10 #include "vm/native_symbol.h" | 10 #include "vm/native_symbol.h" |
(...skipping 1603 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1614 current = AppendKind(code, current); | 1614 current = AppendKind(code, current); |
1615 } | 1615 } |
1616 current = ProcessFunction(current, sample_index, sample, frame_index, | 1616 current = ProcessFunction(current, sample_index, sample, frame_index, |
1617 function, token_position, code_index); | 1617 function, token_position, code_index); |
1618 if (!inclusive_tree_) { | 1618 if (!inclusive_tree_) { |
1619 current = AppendKind(code, current); | 1619 current = AppendKind(code, current); |
1620 } | 1620 } |
1621 return current; | 1621 return current; |
1622 } | 1622 } |
1623 | 1623 |
| 1624 if (!code.is_optimized()) { |
| 1625 OS::PrintErr("Code that should be optimized is not. Please file a bug\n"); |
| 1626 OS::PrintErr("Code object: %s\n", code.ToCString()); |
| 1627 OS::PrintErr("Inlined functions length: %" Pd "\n", |
| 1628 inlined_functions->length()); |
| 1629 for (intptr_t i = 0; i < inlined_functions->length(); i++) { |
| 1630 OS::PrintErr("IF[%" Pd "] = %s\n", i, |
| 1631 (*inlined_functions)[i]->ToFullyQualifiedCString()); |
| 1632 } |
| 1633 } |
| 1634 |
1624 ASSERT(code.is_optimized()); | 1635 ASSERT(code.is_optimized()); |
1625 | 1636 |
1626 if (inclusive_tree_) { | 1637 if (inclusive_tree_) { |
1627 for (intptr_t i = 0; i < inlined_functions->length(); i++) { | 1638 for (intptr_t i = 0; i < inlined_functions->length(); i++) { |
1628 const Function* inlined_function = (*inlined_functions)[i]; | 1639 const Function* inlined_function = (*inlined_functions)[i]; |
1629 ASSERT(inlined_function != NULL); | 1640 ASSERT(inlined_function != NULL); |
1630 ASSERT(!inlined_function->IsNull()); | 1641 ASSERT(!inlined_function->IsNull()); |
1631 TokenPosition inlined_token_position = (*inlined_token_positions)[i]; | 1642 TokenPosition inlined_token_position = (*inlined_token_positions)[i]; |
1632 const bool inliner = i == 0; | 1643 const bool inliner = i == 0; |
1633 if (inliner) { | 1644 if (inliner) { |
(...skipping 1164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2798 // Disable thread interrupts while processing the buffer. | 2809 // Disable thread interrupts while processing the buffer. |
2799 DisableThreadInterruptsScope dtis(thread); | 2810 DisableThreadInterruptsScope dtis(thread); |
2800 | 2811 |
2801 ClearProfileVisitor clear_profile(isolate); | 2812 ClearProfileVisitor clear_profile(isolate); |
2802 sample_buffer->VisitSamples(&clear_profile); | 2813 sample_buffer->VisitSamples(&clear_profile); |
2803 } | 2814 } |
2804 | 2815 |
2805 #endif // !PRODUCT | 2816 #endif // !PRODUCT |
2806 | 2817 |
2807 } // namespace dart | 2818 } // namespace dart |
OLD | NEW |