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

Side by Side Diff: src/deoptimizer.cc

Issue 211393007: Backport https://code.google.com/p/v8/source/detail?r=19360 to 3.24.35 (Closed) Base URL: https://github.com/v8/v8.git@3.24
Patch Set: Created 6 years, 9 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 | « src/compiler.cc ('k') | src/flag-definitions.h » ('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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 737 matching lines...) Expand 10 before | Expand all | Expand 10 after
748 748
749 // We rely on this function not causing a GC. It is called from generated code 749 // We rely on this function not causing a GC. It is called from generated code
750 // without having a real stack frame in place. 750 // without having a real stack frame in place.
751 void Deoptimizer::DoComputeOutputFrames() { 751 void Deoptimizer::DoComputeOutputFrames() {
752 // Print some helpful diagnostic information. 752 // Print some helpful diagnostic information.
753 if (FLAG_log_timer_events && 753 if (FLAG_log_timer_events &&
754 compiled_code_->kind() == Code::OPTIMIZED_FUNCTION) { 754 compiled_code_->kind() == Code::OPTIMIZED_FUNCTION) {
755 LOG(isolate(), CodeDeoptEvent(compiled_code_)); 755 LOG(isolate(), CodeDeoptEvent(compiled_code_));
756 } 756 }
757 ElapsedTimer timer; 757 ElapsedTimer timer;
758
759 // Determine basic deoptimization information. The optimized frame is
760 // described by the input data.
761 DeoptimizationInputData* input_data =
762 DeoptimizationInputData::cast(compiled_code_->deoptimization_data());
763
758 if (trace_scope_ != NULL) { 764 if (trace_scope_ != NULL) {
759 timer.Start(); 765 timer.Start();
760 PrintF(trace_scope_->file(), 766 PrintF(trace_scope_->file(),
761 "[deoptimizing (DEOPT %s): begin 0x%08" V8PRIxPTR " ", 767 "[deoptimizing (DEOPT %s): begin 0x%08" V8PRIxPTR " ",
762 MessageFor(bailout_type_), 768 MessageFor(bailout_type_),
763 reinterpret_cast<intptr_t>(function_)); 769 reinterpret_cast<intptr_t>(function_));
764 PrintFunctionName(); 770 PrintFunctionName();
765 PrintF(trace_scope_->file(), 771 PrintF(trace_scope_->file(),
766 " @%d, FP to SP delta: %d]\n", 772 " (opt #%d) @%d, FP to SP delta: %d]\n",
773 input_data->OptimizationId()->value(),
767 bailout_id_, 774 bailout_id_,
768 fp_to_sp_delta_); 775 fp_to_sp_delta_);
769 if (bailout_type_ == EAGER || bailout_type_ == SOFT) { 776 if (bailout_type_ == EAGER || bailout_type_ == SOFT) {
770 compiled_code_->PrintDeoptLocation(trace_scope_->file(), bailout_id_); 777 compiled_code_->PrintDeoptLocation(trace_scope_->file(), bailout_id_);
771 } 778 }
772 } 779 }
773 780
774 // Determine basic deoptimization information. The optimized frame is
775 // described by the input data.
776 DeoptimizationInputData* input_data =
777 DeoptimizationInputData::cast(compiled_code_->deoptimization_data());
778 BailoutId node_id = input_data->AstId(bailout_id_); 781 BailoutId node_id = input_data->AstId(bailout_id_);
779 ByteArray* translations = input_data->TranslationByteArray(); 782 ByteArray* translations = input_data->TranslationByteArray();
780 unsigned translation_index = 783 unsigned translation_index =
781 input_data->TranslationIndex(bailout_id_)->value(); 784 input_data->TranslationIndex(bailout_id_)->value();
782 785
783 // Do the input frame to output frame(s) translation. 786 // Do the input frame to output frame(s) translation.
784 TranslationIterator iterator(translations, translation_index); 787 TranslationIterator iterator(translations, translation_index);
785 Translation::Opcode opcode = 788 Translation::Opcode opcode =
786 static_cast<Translation::Opcode>(iterator.Next()); 789 static_cast<Translation::Opcode>(iterator.Next());
787 ASSERT(Translation::BEGIN == opcode); 790 ASSERT(Translation::BEGIN == opcode);
(...skipping 2706 matching lines...) Expand 10 before | Expand all | Expand 10 after
3494 3497
3495 void DeoptimizedFrameInfo::Iterate(ObjectVisitor* v) { 3498 void DeoptimizedFrameInfo::Iterate(ObjectVisitor* v) {
3496 v->VisitPointer(BitCast<Object**>(&function_)); 3499 v->VisitPointer(BitCast<Object**>(&function_));
3497 v->VisitPointers(parameters_, parameters_ + parameters_count_); 3500 v->VisitPointers(parameters_, parameters_ + parameters_count_);
3498 v->VisitPointers(expression_stack_, expression_stack_ + expression_count_); 3501 v->VisitPointers(expression_stack_, expression_stack_ + expression_count_);
3499 } 3502 }
3500 3503
3501 #endif // ENABLE_DEBUGGER_SUPPORT 3504 #endif // ENABLE_DEBUGGER_SUPPORT
3502 3505
3503 } } // namespace v8::internal 3506 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/compiler.cc ('k') | src/flag-definitions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698