| 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 2521 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2532 | 2532 |
| 2533 | 2533 |
| 2534 const char* ProfileTrieWalker::CurrentToken() { | 2534 const char* ProfileTrieWalker::CurrentToken() { |
| 2535 if (current_ == NULL) { | 2535 if (current_ == NULL) { |
| 2536 return NULL; | 2536 return NULL; |
| 2537 } | 2537 } |
| 2538 if (code_trie_) { | 2538 if (code_trie_) { |
| 2539 return NULL; | 2539 return NULL; |
| 2540 } | 2540 } |
| 2541 ProfileFunction* func = profile_->GetFunction(current_->table_index()); | 2541 ProfileFunction* func = profile_->GetFunction(current_->table_index()); |
| 2542 const Function& function = Function::Handle(func->function()->raw()); | 2542 const Function& function = *(func->function()); |
| 2543 if (function.IsNull()) { | 2543 if (function.IsNull()) { |
| 2544 // No function. | 2544 // No function. |
| 2545 return NULL; | 2545 return NULL; |
| 2546 } | 2546 } |
| 2547 const Script& script = Script::Handle(function.script()); | 2547 const Script& script = Script::Handle(function.script()); |
| 2548 if (script.IsNull()) { | 2548 if (script.IsNull()) { |
| 2549 // No script. | 2549 // No script. |
| 2550 return NULL; | 2550 return NULL; |
| 2551 } | 2551 } |
| 2552 const TokenStream& token_stream = TokenStream::Handle(script.tokens()); | 2552 const TokenStream& token_stream = TokenStream::Handle(script.tokens()); |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2745 // Disable thread interrupts while processing the buffer. | 2745 // Disable thread interrupts while processing the buffer. |
| 2746 DisableThreadInterruptsScope dtis(thread); | 2746 DisableThreadInterruptsScope dtis(thread); |
| 2747 | 2747 |
| 2748 ClearProfileVisitor clear_profile(isolate); | 2748 ClearProfileVisitor clear_profile(isolate); |
| 2749 sample_buffer->VisitSamples(&clear_profile); | 2749 sample_buffer->VisitSamples(&clear_profile); |
| 2750 } | 2750 } |
| 2751 | 2751 |
| 2752 #endif // !PRODUCT | 2752 #endif // !PRODUCT |
| 2753 | 2753 |
| 2754 } // namespace dart | 2754 } // namespace dart |
| OLD | NEW |