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

Side by Side Diff: src/x64/deoptimizer-x64.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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 data->deoptimizing_code_list_ = node; 96 data->deoptimizing_code_list_ = node;
97 97
98 // We might be in the middle of incremental marking with compaction. 98 // We might be in the middle of incremental marking with compaction.
99 // Tell collector to treat this code object in a special way and 99 // Tell collector to treat this code object in a special way and
100 // ignore all slots that might have been recorded on it. 100 // ignore all slots that might have been recorded on it.
101 isolate->heap()->mark_compact_collector()->InvalidateCode(code); 101 isolate->heap()->mark_compact_collector()->InvalidateCode(code);
102 102
103 // Set the code for the function to non-optimized version. 103 // Set the code for the function to non-optimized version.
104 function->ReplaceCode(function->shared()->code()); 104 function->ReplaceCode(function->shared()->code());
105 105
106 function->shared()->IncrementAndCheckDeoptCount();
107
106 if (FLAG_trace_deopt) { 108 if (FLAG_trace_deopt) {
107 PrintF("[forced deoptimization: "); 109 PrintF("[forced deoptimization: ");
108 function->PrintName(); 110 function->PrintName();
109 PrintF(" / %" V8PRIxPTR "]\n", reinterpret_cast<intptr_t>(function)); 111 PrintF(" / %" V8PRIxPTR "]\n", reinterpret_cast<intptr_t>(function));
110 } 112 }
111 } 113 }
112 114
113 115
114 void Deoptimizer::PatchStackCheckCodeAt(Code* unoptimized_code, 116 void Deoptimizer::PatchStackCheckCodeAt(Code* unoptimized_code,
115 Address pc_after, 117 Address pc_after,
(...skipping 627 matching lines...) Expand 10 before | Expand all | Expand 10 after
743 } 745 }
744 __ bind(&done); 746 __ bind(&done);
745 } 747 }
746 748
747 #undef __ 749 #undef __
748 750
749 751
750 } } // namespace v8::internal 752 } } // namespace v8::internal
751 753
752 #endif // V8_TARGET_ARCH_X64 754 #endif // V8_TARGET_ARCH_X64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698