| OLD | NEW |
| 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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 } | 115 } |
| 116 *percentage = *ic_total_count > 0 | 116 *percentage = *ic_total_count > 0 |
| 117 ? 100 * *ic_with_type_info_count / *ic_total_count | 117 ? 100 * *ic_with_type_info_count / *ic_total_count |
| 118 : 100; | 118 : 100; |
| 119 } | 119 } |
| 120 | 120 |
| 121 | 121 |
| 122 void RuntimeProfiler::Optimize(JSFunction* function, const char* reason) { | 122 void RuntimeProfiler::Optimize(JSFunction* function, const char* reason) { |
| 123 ASSERT(function->IsOptimizable()); | 123 ASSERT(function->IsOptimizable()); |
| 124 | 124 |
| 125 if (FLAG_trace_opt) { | 125 if (FLAG_trace_opt && function->PassesHydrogenFilter()) { |
| 126 PrintF("[marking "); | 126 PrintF("[marking "); |
| 127 function->PrintName(); | 127 function->ShortPrint(); |
| 128 PrintF(" 0x%" V8PRIxPTR, reinterpret_cast<intptr_t>(function->address())); | |
| 129 PrintF(" for recompilation, reason: %s", reason); | 128 PrintF(" for recompilation, reason: %s", reason); |
| 130 if (FLAG_type_info_threshold > 0) { | 129 if (FLAG_type_info_threshold > 0) { |
| 131 int typeinfo, total, percentage; | 130 int typeinfo, total, percentage; |
| 132 GetICCounts(function, &typeinfo, &total, &percentage); | 131 GetICCounts(function, &typeinfo, &total, &percentage); |
| 133 PrintF(", ICs with typeinfo: %d/%d (%d%%)", typeinfo, total, percentage); | 132 PrintF(", ICs with typeinfo: %d/%d (%d%%)", typeinfo, total, percentage); |
| 134 } | 133 } |
| 135 PrintF("]\n"); | 134 PrintF("]\n"); |
| 136 } | 135 } |
| 137 | 136 |
| 138 if (FLAG_parallel_recompilation && !isolate_->bootstrapper()->IsActive()) { | 137 if (FLAG_parallel_recompilation && !isolate_->bootstrapper()->IsActive()) { |
| (...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 421 | 420 |
| 422 | 421 |
| 423 void RuntimeProfiler::UpdateSamplesAfterCompact(ObjectVisitor* visitor) { | 422 void RuntimeProfiler::UpdateSamplesAfterCompact(ObjectVisitor* visitor) { |
| 424 for (int i = 0; i < kSamplerWindowSize; i++) { | 423 for (int i = 0; i < kSamplerWindowSize; i++) { |
| 425 visitor->VisitPointer(&sampler_window_[i]); | 424 visitor->VisitPointer(&sampler_window_[i]); |
| 426 } | 425 } |
| 427 } | 426 } |
| 428 | 427 |
| 429 | 428 |
| 430 } } // namespace v8::internal | 429 } } // namespace v8::internal |
| OLD | NEW |