| OLD | NEW |
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 |
| 11 // with the distribution. | 11 // with the distribution. |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 has_been_globally_setup_ = true; | 146 has_been_globally_setup_ = true; |
| 147 #endif | 147 #endif |
| 148 } | 148 } |
| 149 | 149 |
| 150 | 150 |
| 151 void RuntimeProfiler::Optimize(JSFunction* function, bool eager, int delay) { | 151 void RuntimeProfiler::Optimize(JSFunction* function, bool eager, int delay) { |
| 152 ASSERT(function->IsOptimizable()); | 152 ASSERT(function->IsOptimizable()); |
| 153 if (FLAG_trace_opt) { | 153 if (FLAG_trace_opt) { |
| 154 PrintF("[marking (%s) ", eager ? "eagerly" : "lazily"); | 154 PrintF("[marking (%s) ", eager ? "eagerly" : "lazily"); |
| 155 function->PrintName(); | 155 function->PrintName(); |
| 156 PrintF(" 0x%" V8PRIxPTR, reinterpret_cast<intptr_t>(function->address())); |
| 156 PrintF(" for recompilation"); | 157 PrintF(" for recompilation"); |
| 157 if (delay > 0) { | 158 if (delay > 0) { |
| 158 PrintF(" (delayed %0.3f ms)", static_cast<double>(delay) / 1000); | 159 PrintF(" (delayed %0.3f ms)", static_cast<double>(delay) / 1000); |
| 159 } | 160 } |
| 160 PrintF("]\n"); | 161 PrintF("]\n"); |
| 161 } | 162 } |
| 162 | 163 |
| 163 // The next call to the function will trigger optimization. | 164 // The next call to the function will trigger optimization. |
| 164 function->MarkForLazyRecompilation(); | 165 function->MarkForLazyRecompilation(); |
| 165 } | 166 } |
| (...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 479 } else { | 480 } else { |
| 480 return RuntimeProfiler::WaitForSomeIsolateToEnterJS(); | 481 return RuntimeProfiler::WaitForSomeIsolateToEnterJS(); |
| 481 } | 482 } |
| 482 } | 483 } |
| 483 #endif | 484 #endif |
| 484 return false; | 485 return false; |
| 485 } | 486 } |
| 486 | 487 |
| 487 | 488 |
| 488 } } // namespace v8::internal | 489 } } // namespace v8::internal |
| OLD | NEW |