Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(213)

Side by Side Diff: runtime/vm/flow_graph_compiler.cc

Issue 1300033002: Fix compiler stats (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Review comments Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « runtime/vm/compiler_stats.cc ('k') | runtime/vm/isolate.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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/globals.h" // Needed here to get TARGET_ARCH_XXX. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_XXX.
6 6
7 #include "vm/flow_graph_compiler.h" 7 #include "vm/flow_graph_compiler.h"
8 8
9 #include "vm/bit_vector.h" 9 #include "vm/bit_vector.h"
10 #include "vm/cha.h" 10 #include "vm/cha.h"
(...skipping 884 matching lines...) Expand 10 before | Expand all | Expand 10 after
895 deopt_infos_.Add(stub); 895 deopt_infos_.Add(stub);
896 return stub->entry_label(); 896 return stub->entry_label();
897 } 897 }
898 898
899 899
900 void FlowGraphCompiler::FinalizeExceptionHandlers(const Code& code) { 900 void FlowGraphCompiler::FinalizeExceptionHandlers(const Code& code) {
901 ASSERT(exception_handlers_list_ != NULL); 901 ASSERT(exception_handlers_list_ != NULL);
902 const ExceptionHandlers& handlers = ExceptionHandlers::Handle( 902 const ExceptionHandlers& handlers = ExceptionHandlers::Handle(
903 exception_handlers_list_->FinalizeExceptionHandlers(code.EntryPoint())); 903 exception_handlers_list_->FinalizeExceptionHandlers(code.EntryPoint()));
904 code.set_exception_handlers(handlers); 904 code.set_exception_handlers(handlers);
905 INC_STAT(isolate(), total_code_size, 905 if (FLAG_compiler_stats) {
906 ExceptionHandlers::InstanceSize(handlers.num_entries())); 906 Thread* thread = Thread::Current();
907 INC_STAT(isolate(), total_code_size, handlers.num_entries() * sizeof(uword)); 907 INC_STAT(thread, total_code_size,
908 ExceptionHandlers::InstanceSize(handlers.num_entries()));
909 INC_STAT(thread, total_code_size, handlers.num_entries() * sizeof(uword));
910 }
908 } 911 }
909 912
910 913
911 void FlowGraphCompiler::FinalizePcDescriptors(const Code& code) { 914 void FlowGraphCompiler::FinalizePcDescriptors(const Code& code) {
912 ASSERT(pc_descriptors_list_ != NULL); 915 ASSERT(pc_descriptors_list_ != NULL);
913 const PcDescriptors& descriptors = PcDescriptors::Handle( 916 const PcDescriptors& descriptors = PcDescriptors::Handle(
914 pc_descriptors_list_->FinalizePcDescriptors(code.EntryPoint())); 917 pc_descriptors_list_->FinalizePcDescriptors(code.EntryPoint()));
915 if (!is_optimizing_) descriptors.Verify(parsed_function_.function()); 918 if (!is_optimizing_) descriptors.Verify(parsed_function_.function());
916 code.set_pc_descriptors(descriptors); 919 code.set_pc_descriptors(descriptors);
917 code.set_entry_patch_pc_offset(entry_patch_pc_offset_); 920 code.set_entry_patch_pc_offset(entry_patch_pc_offset_);
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
1005 if (static_calls_target_table_[i]->function != NULL) { 1008 if (static_calls_target_table_[i]->function != NULL) {
1006 targets.SetAt(target_ix + Code::kSCallTableFunctionEntry, 1009 targets.SetAt(target_ix + Code::kSCallTableFunctionEntry,
1007 *static_calls_target_table_[i]->function); 1010 *static_calls_target_table_[i]->function);
1008 } 1011 }
1009 if (static_calls_target_table_[i]->code != NULL) { 1012 if (static_calls_target_table_[i]->code != NULL) {
1010 targets.SetAt(target_ix + Code::kSCallTableCodeEntry, 1013 targets.SetAt(target_ix + Code::kSCallTableCodeEntry,
1011 *static_calls_target_table_[i]->code); 1014 *static_calls_target_table_[i]->code);
1012 } 1015 }
1013 } 1016 }
1014 code.set_static_calls_target_table(targets); 1017 code.set_static_calls_target_table(targets);
1015 INC_STAT(isolate(), total_code_size, targets.Length() * sizeof(uword)); 1018 INC_STAT(Thread::Current(),
1019 total_code_size,
1020 targets.Length() * sizeof(uword));
1016 } 1021 }
1017 1022
1018 1023
1019 // Returns 'true' if code generation for this function is complete, i.e., 1024 // Returns 'true' if code generation for this function is complete, i.e.,
1020 // no fall-through to regular code is needed. 1025 // no fall-through to regular code is needed.
1021 void FlowGraphCompiler::TryIntrinsify() { 1026 void FlowGraphCompiler::TryIntrinsify() {
1022 // Intrinsification skips arguments checks, therefore disable if in checked 1027 // Intrinsification skips arguments checks, therefore disable if in checked
1023 // mode. 1028 // mode.
1024 if (FLAG_intrinsify && !isolate()->flags().type_checks()) { 1029 if (FLAG_intrinsify && !isolate()->flags().type_checks()) {
1025 if (parsed_function().function().kind() == RawFunction::kImplicitGetter) { 1030 if (parsed_function().function().kind() == RawFunction::kImplicitGetter) {
(...skipping 801 matching lines...) Expand 10 before | Expand all | Expand 10 after
1827 1832
1828 1833
1829 void FlowGraphCompiler::FrameStateClear() { 1834 void FlowGraphCompiler::FrameStateClear() {
1830 ASSERT(!is_optimizing()); 1835 ASSERT(!is_optimizing());
1831 frame_state_.TruncateTo(0); 1836 frame_state_.TruncateTo(0);
1832 } 1837 }
1833 #endif 1838 #endif
1834 1839
1835 1840
1836 } // namespace dart 1841 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/compiler_stats.cc ('k') | runtime/vm/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698