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

Side by Side Diff: src/arm/deoptimizer-arm.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
« no previous file with comments | « no previous file | src/compiler.h » ('j') | src/compiler.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 data->deoptimizing_code_list_ = node; 93 data->deoptimizing_code_list_ = node;
94 94
95 // We might be in the middle of incremental marking with compaction. 95 // We might be in the middle of incremental marking with compaction.
96 // Tell collector to treat this code object in a special way and 96 // Tell collector to treat this code object in a special way and
97 // ignore all slots that might have been recorded on it. 97 // ignore all slots that might have been recorded on it.
98 isolate->heap()->mark_compact_collector()->InvalidateCode(code); 98 isolate->heap()->mark_compact_collector()->InvalidateCode(code);
99 99
100 // Set the code for the function to non-optimized version. 100 // Set the code for the function to non-optimized version.
101 function->ReplaceCode(function->shared()->code()); 101 function->ReplaceCode(function->shared()->code());
102 102
103 function->shared()->IncrementAndCheckDeoptCount();
104
103 if (FLAG_trace_deopt) { 105 if (FLAG_trace_deopt) {
104 PrintF("[forced deoptimization: "); 106 PrintF("[forced deoptimization: ");
105 function->PrintName(); 107 function->PrintName();
106 PrintF(" / %x]\n", reinterpret_cast<uint32_t>(function)); 108 PrintF(" / %x]\n", reinterpret_cast<uint32_t>(function));
107 } 109 }
108 } 110 }
109 111
110 112
111 void Deoptimizer::PatchStackCheckCodeAt(Code* unoptimized_code, 113 void Deoptimizer::PatchStackCheckCodeAt(Code* unoptimized_code,
112 Address pc_after, 114 Address pc_after,
(...skipping 637 matching lines...) Expand 10 before | Expand all | Expand 10 after
750 __ push(ip); 752 __ push(ip);
751 __ b(&done); 753 __ b(&done);
752 ASSERT(masm()->pc_offset() - start == table_entry_size_); 754 ASSERT(masm()->pc_offset() - start == table_entry_size_);
753 } 755 }
754 __ bind(&done); 756 __ bind(&done);
755 } 757 }
756 758
757 #undef __ 759 #undef __
758 760
759 } } // namespace v8::internal 761 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/compiler.h » ('j') | src/compiler.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698