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

Side by Side Diff: src/mips/deoptimizer-mips.cc

Issue 9207002: Add a deoptimization count to each function to limit number of re-compilations. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 8 years, 11 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
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
Jakob Kummerow 2012/01/16 11:41:25 nit: 2012
fschneider 2012/01/19 10:26:11 Done.
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
11 // with the distribution. 11 // with the distribution.
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 data->deoptimizing_code_list_ = node; 95 data->deoptimizing_code_list_ = node;
96 96
97 // We might be in the middle of incremental marking with compaction. 97 // We might be in the middle of incremental marking with compaction.
98 // Tell collector to treat this code object in a special way and 98 // Tell collector to treat this code object in a special way and
99 // ignore all slots that might have been recorded on it. 99 // ignore all slots that might have been recorded on it.
100 isolate->heap()->mark_compact_collector()->InvalidateCode(code); 100 isolate->heap()->mark_compact_collector()->InvalidateCode(code);
101 101
102 // Set the code for the function to non-optimized version. 102 // Set the code for the function to non-optimized version.
103 function->ReplaceCode(function->shared()->code()); 103 function->ReplaceCode(function->shared()->code());
104 104
105 function->shared()->IncrementAndCheckDeoptCount();
106
105 if (FLAG_trace_deopt) { 107 if (FLAG_trace_deopt) {
106 PrintF("[forced deoptimization: "); 108 PrintF("[forced deoptimization: ");
107 function->PrintName(); 109 function->PrintName();
108 PrintF(" / %x]\n", reinterpret_cast<uint32_t>(function)); 110 PrintF(" / %x]\n", reinterpret_cast<uint32_t>(function));
109 #ifdef DEBUG 111 #ifdef DEBUG
110 if (FLAG_print_code) { 112 if (FLAG_print_code) {
111 code->PrintLn(); 113 code->PrintLn();
112 } 114 }
113 #endif 115 #endif
114 } 116 }
(...skipping 652 matching lines...) Expand 10 before | Expand all | Expand 10 after
767 769
768 ASSERT_EQ(table_entry_size_, masm()->pc_offset() - start); 770 ASSERT_EQ(table_entry_size_, masm()->pc_offset() - start);
769 } 771 }
770 __ bind(&done); 772 __ bind(&done);
771 } 773 }
772 774
773 #undef __ 775 #undef __
774 776
775 777
776 } } // namespace v8::internal 778 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698