New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exclude from a report a part of bytecode that compiler generates for a synchronized statement and that is hard to cover by tests #501

Merged
merged 11 commits into from Mar 28, 2017

Conversation

@Godin
Member

Godin commented Mar 19, 2017

No description provided.

@Godin

This comment has been minimized.

Show comment
Hide comment
@Godin

Godin Mar 25, 2017

Member

Analysis of 17391 classes from rt.jar (≈ 65 Mb) from JDK 1.8.0_121 using following build.xml

<project xmlns:jacoco="antlib:org.jacoco.ant" default="report">
  <taskdef uri="antlib:org.jacoco.ant" resource="org/jacoco/ant/antlib.xml">
    <classpath path="jacocoant.jar"/>
  </taskdef>
  <target name="report">
    <jacoco:report>
      <executiondata>
        <file file="jacoco.exec"/>
      </executiondata>
      <structure name="rt.jar">
        <classfiles>
          <fileset file="rt.jar"/>
        </classfiles>
      </structure>
    </jacoco:report>
  </target>
</project>

takes 5 seconds on my laptop, both without this change as well as with it. So I believe we are safe to merge this.

@marchof do you have objections or some review comments?

Member

Godin commented Mar 25, 2017

Analysis of 17391 classes from rt.jar (≈ 65 Mb) from JDK 1.8.0_121 using following build.xml

<project xmlns:jacoco="antlib:org.jacoco.ant" default="report">
  <taskdef uri="antlib:org.jacoco.ant" resource="org/jacoco/ant/antlib.xml">
    <classpath path="jacocoant.jar"/>
  </taskdef>
  <target name="report">
    <jacoco:report>
      <executiondata>
        <file file="jacoco.exec"/>
      </executiondata>
      <structure name="rt.jar">
        <classfiles>
          <fileset file="rt.jar"/>
        </classfiles>
      </structure>
    </jacoco:report>
  </target>
</project>

takes 5 seconds on my laptop, both without this change as well as with it. So I believe we are safe to merge this.

@marchof do you have objections or some review comments?

@marchof

@Godin I added several comments for things that could be improved from my point of view (especially the documentation issues).

The unit testing facilities I commented about can be improved later from my point of view.

if (tryCatch.start == tryCatch.handler) {
continue;
}
final AbstractInsnNode to = new Matcher(tryCatch.handler).match();

This comment has been minimized.

@Godin

Godin Mar 28, 2017

Member

Number of allocations of Matcher can be reduced here - can allocate and reuse just one for the whole lifetime of a method instead of allocation for TryCatchBlockNode.

@Godin

Godin Mar 28, 2017

Member

Number of allocations of Matcher can be reduced here - can allocate and reuse just one for the whole lifetime of a method instead of allocation for TryCatchBlockNode.

Godin added some commits Mar 28, 2017

@marchof

This comment has been minimized.

Show comment
Hide comment
@marchof

marchof Mar 28, 2017

Member

@Godin Thanks for following up all my picky comments ;-) Let's merge this and continue with another filtering PR. I assume the overall implementation will improve step by step as we see more requirements and use cases.

Member

marchof commented Mar 28, 2017

@Godin Thanks for following up all my picky comments ;-) Let's merge this and continue with another filtering PR. I assume the overall implementation will improve step by step as we see more requirements and use cases.

@Godin

This comment has been minimized.

Show comment
Hide comment
@Godin

Godin Mar 28, 2017

Member

@marchof Hooray! 😋 Will do squash and merge quickly and then will rebase #500 so that to continue with filter that doesn't require changes outside of filter 😉

Member

Godin commented Mar 28, 2017

@marchof Hooray! 😋 Will do squash and merge quickly and then will rebase #500 so that to continue with filter that doesn't require changes outside of filter 😉

@Godin Godin merged commit eaef191 into master Mar 28, 2017

4 checks passed

continuous-integration/appveyor/branch AppVeyor build succeeded
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@Godin Godin deleted the issue-501 branch Mar 28, 2017

@Godin Godin removed this from IN PROGRESS in Current work items Mar 28, 2017

@Godin Godin moved this from TODO to DONE in Filtering Mar 28, 2017

@jacoco jacoco locked as resolved and limited conversation to collaborators Jan 11, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.