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

Side by Side Diff: src/deoptimizer.cc

Issue 23490015: Reland^2 "Add Chromium-style TimeDelta, Time and TimeTicks classes, and a new ElapsedTimer class." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Some windows cleanup Created 7 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 | Annotate | Revision Log
« no previous file with comments | « src/cpu-profiler.cc ('k') | src/hydrogen.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 766 matching lines...) Expand 10 before | Expand all | Expand 10 after
777 777
778 // We rely on this function not causing a GC. It is called from generated code 778 // We rely on this function not causing a GC. It is called from generated code
779 // without having a real stack frame in place. 779 // without having a real stack frame in place.
780 void Deoptimizer::DoComputeOutputFrames() { 780 void Deoptimizer::DoComputeOutputFrames() {
781 if (bailout_type_ == OSR) { 781 if (bailout_type_ == OSR) {
782 DoComputeOsrOutputFrame(); 782 DoComputeOsrOutputFrame();
783 return; 783 return;
784 } 784 }
785 785
786 // Print some helpful diagnostic information. 786 // Print some helpful diagnostic information.
787 int64_t start = OS::Ticks();
788 if (FLAG_log_timer_events && 787 if (FLAG_log_timer_events &&
789 compiled_code_->kind() == Code::OPTIMIZED_FUNCTION) { 788 compiled_code_->kind() == Code::OPTIMIZED_FUNCTION) {
790 LOG(isolate(), CodeDeoptEvent(compiled_code_)); 789 LOG(isolate(), CodeDeoptEvent(compiled_code_));
791 } 790 }
791 ElapsedTimer timer;
792 if (trace_) { 792 if (trace_) {
793 timer.Start();
793 PrintF("[deoptimizing (DEOPT %s): begin 0x%08" V8PRIxPTR " ", 794 PrintF("[deoptimizing (DEOPT %s): begin 0x%08" V8PRIxPTR " ",
794 MessageFor(bailout_type_), 795 MessageFor(bailout_type_),
795 reinterpret_cast<intptr_t>(function_)); 796 reinterpret_cast<intptr_t>(function_));
796 PrintFunctionName(); 797 PrintFunctionName();
797 PrintF(" @%d, FP to SP delta: %d]\n", bailout_id_, fp_to_sp_delta_); 798 PrintF(" @%d, FP to SP delta: %d]\n", bailout_id_, fp_to_sp_delta_);
798 if (bailout_type_ == EAGER || bailout_type_ == SOFT) { 799 if (bailout_type_ == EAGER || bailout_type_ == SOFT) {
799 compiled_code_->PrintDeoptLocation(bailout_id_); 800 compiled_code_->PrintDeoptLocation(bailout_id_);
800 } 801 }
801 } 802 }
802 803
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
863 case Translation::LITERAL: 864 case Translation::LITERAL:
864 case Translation::ARGUMENTS_OBJECT: 865 case Translation::ARGUMENTS_OBJECT:
865 default: 866 default:
866 UNREACHABLE(); 867 UNREACHABLE();
867 break; 868 break;
868 } 869 }
869 } 870 }
870 871
871 // Print some helpful diagnostic information. 872 // Print some helpful diagnostic information.
872 if (trace_) { 873 if (trace_) {
873 double ms = static_cast<double>(OS::Ticks() - start) / 1000; 874 double ms = timer.Elapsed().InMillisecondsF();
874 int index = output_count_ - 1; // Index of the topmost frame. 875 int index = output_count_ - 1; // Index of the topmost frame.
875 JSFunction* function = output_[index]->GetFunction(); 876 JSFunction* function = output_[index]->GetFunction();
876 PrintF("[deoptimizing (%s): end 0x%08" V8PRIxPTR " ", 877 PrintF("[deoptimizing (%s): end 0x%08" V8PRIxPTR " ",
877 MessageFor(bailout_type_), 878 MessageFor(bailout_type_),
878 reinterpret_cast<intptr_t>(function)); 879 reinterpret_cast<intptr_t>(function));
879 PrintFunctionName(); 880 PrintFunctionName();
880 PrintF(" @%d => node=%d, pc=0x%08" V8PRIxPTR ", state=%s, alignment=%s," 881 PrintF(" @%d => node=%d, pc=0x%08" V8PRIxPTR ", state=%s, alignment=%s,"
881 " took %0.3f ms]\n", 882 " took %0.3f ms]\n",
882 bailout_id_, 883 bailout_id_,
883 node_id.ToInt(), 884 node_id.ToInt(),
(...skipping 2425 matching lines...) Expand 10 before | Expand all | Expand 10 after
3309 3310
3310 void DeoptimizedFrameInfo::Iterate(ObjectVisitor* v) { 3311 void DeoptimizedFrameInfo::Iterate(ObjectVisitor* v) {
3311 v->VisitPointer(BitCast<Object**>(&function_)); 3312 v->VisitPointer(BitCast<Object**>(&function_));
3312 v->VisitPointers(parameters_, parameters_ + parameters_count_); 3313 v->VisitPointers(parameters_, parameters_ + parameters_count_);
3313 v->VisitPointers(expression_stack_, expression_stack_ + expression_count_); 3314 v->VisitPointers(expression_stack_, expression_stack_ + expression_count_);
3314 } 3315 }
3315 3316
3316 #endif // ENABLE_DEBUGGER_SUPPORT 3317 #endif // ENABLE_DEBUGGER_SUPPORT
3317 3318
3318 } } // namespace v8::internal 3319 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/cpu-profiler.cc ('k') | src/hydrogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698