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

Side by Side Diff: src/hydrogen.cc

Issue 17498003: Add counters for requested/inserted/executed soft deopts (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 6 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/deoptimizer.cc ('k') | src/v8-counters.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 4642 matching lines...) Expand 10 before | Expand all | Expand 10 after
4653 } 4653 }
4654 4654
4655 4655
4656 void HOptimizedGraphBuilder::PushAndAdd(HInstruction* instr) { 4656 void HOptimizedGraphBuilder::PushAndAdd(HInstruction* instr) {
4657 Push(instr); 4657 Push(instr);
4658 AddInstruction(instr); 4658 AddInstruction(instr);
4659 } 4659 }
4660 4660
4661 4661
4662 void HOptimizedGraphBuilder::AddSoftDeoptimize() { 4662 void HOptimizedGraphBuilder::AddSoftDeoptimize() {
4663 isolate()->counters()->soft_deopts_requested()->Increment();
4663 if (FLAG_always_opt) return; 4664 if (FLAG_always_opt) return;
4664 if (current_block()->IsDeoptimizing()) return; 4665 if (current_block()->IsDeoptimizing()) return;
4665 AddInstruction(new(zone()) HSoftDeoptimize()); 4666 AddInstruction(new(zone()) HSoftDeoptimize());
4667 isolate()->counters()->soft_deopts_inserted()->Increment();
4666 current_block()->MarkAsDeoptimizing(); 4668 current_block()->MarkAsDeoptimizing();
4667 graph()->set_has_soft_deoptimize(true); 4669 graph()->set_has_soft_deoptimize(true);
4668 } 4670 }
4669 4671
4670 4672
4671 template <class Instruction> 4673 template <class Instruction>
4672 HInstruction* HOptimizedGraphBuilder::PreProcessCall(Instruction* call) { 4674 HInstruction* HOptimizedGraphBuilder::PreProcessCall(Instruction* call) {
4673 int count = call->argument_count(); 4675 int count = call->argument_count();
4674 ZoneList<HValue*> arguments(count, zone()); 4676 ZoneList<HValue*> arguments(count, zone());
4675 for (int i = 0; i < count; ++i) { 4677 for (int i = 0; i < count; ++i) {
(...skipping 6908 matching lines...) Expand 10 before | Expand all | Expand 10 after
11584 } 11586 }
11585 } 11587 }
11586 11588
11587 #ifdef DEBUG 11589 #ifdef DEBUG
11588 if (graph_ != NULL) graph_->Verify(false); // No full verify. 11590 if (graph_ != NULL) graph_->Verify(false); // No full verify.
11589 if (allocator_ != NULL) allocator_->Verify(); 11591 if (allocator_ != NULL) allocator_->Verify();
11590 #endif 11592 #endif
11591 } 11593 }
11592 11594
11593 } } // namespace v8::internal 11595 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/deoptimizer.cc ('k') | src/v8-counters.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698