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

Side by Side Diff: src/deoptimizer.cc

Issue 23698002: Revert "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: 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();
787 if (FLAG_log_timer_events && 788 if (FLAG_log_timer_events &&
788 compiled_code_->kind() == Code::OPTIMIZED_FUNCTION) { 789 compiled_code_->kind() == Code::OPTIMIZED_FUNCTION) {
789 LOG(isolate(), CodeDeoptEvent(compiled_code_)); 790 LOG(isolate(), CodeDeoptEvent(compiled_code_));
790 } 791 }
791 ElapsedTimer timer;
792 if (trace_) { 792 if (trace_) {
793 timer.Start();
794 PrintF("[deoptimizing (DEOPT %s): begin 0x%08" V8PRIxPTR " ", 793 PrintF("[deoptimizing (DEOPT %s): begin 0x%08" V8PRIxPTR " ",
795 MessageFor(bailout_type_), 794 MessageFor(bailout_type_),
796 reinterpret_cast<intptr_t>(function_)); 795 reinterpret_cast<intptr_t>(function_));
797 PrintFunctionName(); 796 PrintFunctionName();
798 PrintF(" @%d, FP to SP delta: %d]\n", bailout_id_, fp_to_sp_delta_); 797 PrintF(" @%d, FP to SP delta: %d]\n", bailout_id_, fp_to_sp_delta_);
799 if (bailout_type_ == EAGER || bailout_type_ == SOFT) { 798 if (bailout_type_ == EAGER || bailout_type_ == SOFT) {
800 compiled_code_->PrintDeoptLocation(bailout_id_); 799 compiled_code_->PrintDeoptLocation(bailout_id_);
801 } 800 }
802 } 801 }
803 802
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
864 case Translation::LITERAL: 863 case Translation::LITERAL:
865 case Translation::ARGUMENTS_OBJECT: 864 case Translation::ARGUMENTS_OBJECT:
866 default: 865 default:
867 UNREACHABLE(); 866 UNREACHABLE();
868 break; 867 break;
869 } 868 }
870 } 869 }
871 870
872 // Print some helpful diagnostic information. 871 // Print some helpful diagnostic information.
873 if (trace_) { 872 if (trace_) {
874 double ms = timer.Elapsed().InMillisecondsF(); 873 double ms = static_cast<double>(OS::Ticks() - start) / 1000;
875 int index = output_count_ - 1; // Index of the topmost frame. 874 int index = output_count_ - 1; // Index of the topmost frame.
876 JSFunction* function = output_[index]->GetFunction(); 875 JSFunction* function = output_[index]->GetFunction();
877 PrintF("[deoptimizing (%s): end 0x%08" V8PRIxPTR " ", 876 PrintF("[deoptimizing (%s): end 0x%08" V8PRIxPTR " ",
878 MessageFor(bailout_type_), 877 MessageFor(bailout_type_),
879 reinterpret_cast<intptr_t>(function)); 878 reinterpret_cast<intptr_t>(function));
880 PrintFunctionName(); 879 PrintFunctionName();
881 PrintF(" @%d => node=%d, pc=0x%08" V8PRIxPTR ", state=%s, alignment=%s," 880 PrintF(" @%d => node=%d, pc=0x%08" V8PRIxPTR ", state=%s, alignment=%s,"
882 " took %0.3f ms]\n", 881 " took %0.3f ms]\n",
883 bailout_id_, 882 bailout_id_,
884 node_id.ToInt(), 883 node_id.ToInt(),
(...skipping 2425 matching lines...) Expand 10 before | Expand all | Expand 10 after
3310 3309
3311 void DeoptimizedFrameInfo::Iterate(ObjectVisitor* v) { 3310 void DeoptimizedFrameInfo::Iterate(ObjectVisitor* v) {
3312 v->VisitPointer(BitCast<Object**>(&function_)); 3311 v->VisitPointer(BitCast<Object**>(&function_));
3313 v->VisitPointers(parameters_, parameters_ + parameters_count_); 3312 v->VisitPointers(parameters_, parameters_ + parameters_count_);
3314 v->VisitPointers(expression_stack_, expression_stack_ + expression_count_); 3313 v->VisitPointers(expression_stack_, expression_stack_ + expression_count_);
3315 } 3314 }
3316 3315
3317 #endif // ENABLE_DEBUGGER_SUPPORT 3316 #endif // ENABLE_DEBUGGER_SUPPORT
3318 3317
3319 } } // namespace v8::internal 3318 } } // 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