Add counters for requested/inserted/executed soft deopts

R=rossberg@chromium.org

Review URL: https://codereview.chromium.org/17498003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15253 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
jkummerow@chromium.org 2013-06-20 16:53:22 +00:00
parent 6a91645a84
commit 0e54a418db
3 changed files with 6 additions and 0 deletions

View File

@ -547,6 +547,7 @@ Deoptimizer::Deoptimizer(Isolate* isolate,
if (function != NULL && function->IsOptimized()) {
function->shared()->increment_deopt_count();
if (bailout_type_ == Deoptimizer::SOFT) {
isolate->counters()->soft_deopts_executed()->Increment();
// Soft deopts shouldn't count against the overall re-optimization count
// that can eventually lead to disabling optimization for a function.
int opt_count = function->shared()->opt_count();

View File

@ -4664,9 +4664,11 @@ void HOptimizedGraphBuilder::PushAndAdd(HInstruction* instr) {
void HOptimizedGraphBuilder::AddSoftDeoptimize() {
isolate()->counters()->soft_deopts_requested()->Increment();
if (FLAG_always_opt) return;
if (current_block()->IsDeoptimizing()) return;
AddInstruction(new(zone()) HSoftDeoptimize());
isolate()->counters()->soft_deopts_inserted()->Increment();
current_block()->MarkAsDeoptimizing();
graph()->set_has_soft_deoptimize(true);
}

View File

@ -238,6 +238,9 @@ namespace internal {
SC(transcendental_cache_miss, V8.TranscendentalCacheMiss) \
SC(stack_interrupts, V8.StackInterrupts) \
SC(runtime_profiler_ticks, V8.RuntimeProfilerTicks) \
SC(soft_deopts_requested, V8.SoftDeoptsRequested) \
SC(soft_deopts_inserted, V8.SoftDeoptsInserted) \
SC(soft_deopts_executed, V8.SoftDeoptsExecuted) \
SC(new_space_bytes_available, V8.MemoryNewSpaceBytesAvailable) \
SC(new_space_bytes_committed, V8.MemoryNewSpaceBytesCommitted) \
SC(new_space_bytes_used, V8.MemoryNewSpaceBytesUsed) \