diff options
author | Fabian Meumertzheim <meumertzheim@code-intelligence.com> | 2021-02-12 14:18:37 +0100 |
---|---|---|
committer | Fabian Meumertzheim <fabian@meumertzhe.im> | 2021-02-22 14:14:52 +0100 |
commit | 0677032a0a698c920f02b44fcf7528fc3a6ce448 (patch) | |
tree | 370a96ae73a0fb0f0ca0e494f9c578f538d8be06 /.bazelrc | |
parent | 97942a9f4924ca4c9cad2a2756e44ad29fb44fca (diff) | |
download | jazzer-api-0677032a0a698c920f02b44fcf7528fc3a6ce448.tar.gz |
Skip instrumentation for known no-throw methods
A method invocation only needs to be instrumented for coverage if the
method can throw an exception (including RuntimeException, which is not
declared via `throws`). For methods in the Java standard library
(in `java.*`), this property is thoroughly documented via Javadoc.
This commit adds a doclet, i.e., a Java program that parses Javadoc, for
automatically compiling a list of known no-throw methods in `java.*`.
The list is loaded lazily at runtime and used to skip calls to these
methods in the coverage instrumentation.
With OpenJDK 15, the list consists of almost 9000 methods, many of which
are used very frequently and in performance-critical parts, e.g.,
StringBuilder#append(String) and List#size().
Diffstat (limited to '.bazelrc')
-rw-r--r-- | .bazelrc | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -7,6 +7,7 @@ build --action_env=CC=clang # Java build --java_language_version=8 +build --tool_java_language_version=9 # Maven publishing build:maven --stamp |