[coverage] Enable optimizations in block coverage modes
Now that function counts are based on dedicated call counters instead of FeedbackVector::invocation_count, we can enable optimizations for block coverage modes. This significantly speeds up V8 with enabled coverage: Before this CL, the web-tooling-benchmark regressed by 70% (block count coverage vs. no coverage). With this CL, the regression is reduced to 40%. Bug: v8:6000,v8:9148 Change-Id: I6bb538bd66f32f016c66c1d1996bce3b25958232 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1615241 Commit-Queue: Jakob Gruber <jgruber@chromium.org> Reviewed-by: Yang Guo <yangguo@chromium.org> Cr-Commit-Position: refs/heads/master@{#61582}
This commit is contained in:
parent
ba7b25e50f
commit
8c33e289b5
@ -3696,7 +3696,7 @@ CodeTracer* Isolate::GetCodeTracer() {
|
||||
|
||||
bool Isolate::use_optimizer() {
|
||||
return FLAG_opt && !serializer_enabled_ && CpuFeatures::SupportsOptimizer() &&
|
||||
!is_count_code_coverage();
|
||||
!is_precise_count_code_coverage();
|
||||
}
|
||||
|
||||
bool Isolate::NeedsDetailedOptimizedCodeLineInfo() const {
|
||||
|
@ -5251,7 +5251,7 @@ bool SharedFunctionInfo::IsInlineable() {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (GetIsolate()->is_binary_code_coverage() &&
|
||||
if (GetIsolate()->is_precise_binary_code_coverage() &&
|
||||
!has_reported_binary_coverage()) {
|
||||
// We may miss invocations if this function is inlined.
|
||||
TraceInlining(*this, "false (requires reported binary coverage)");
|
||||
|
@ -221,7 +221,7 @@ Running test: testPreciseCountCoverageIncremental
|
||||
result : {
|
||||
result : {
|
||||
type : string
|
||||
value : unoptimized
|
||||
value : optimized
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -262,10 +262,15 @@ Running test: testPreciseCountCoverageIncremental
|
||||
startOffset : 74
|
||||
}
|
||||
[1] : {
|
||||
count : 0
|
||||
count : 1
|
||||
endOffset : 156
|
||||
startOffset : 143
|
||||
}
|
||||
[2] : {
|
||||
count : 1
|
||||
endOffset : 172
|
||||
startOffset : 157
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user