The exec files structure

55 views
Skip to first unread message

winter

unread,
Aug 21, 2020, 11:32:21 PM8/21/20
to JaCoCo and EclEmma Users
What's in the dump file .exec, is there some document I can study, thank u

Marc Hoffmann

unread,
Aug 22, 2020, 3:05:56 AM8/22/20
to JaCoCo and EclEmma Users
Hi,

it is a internal binary format that basically contains a boolean array for every class with the executed probes. We do not have a formal specification but from the code you can get an idea:


To interpret the probes you need to understand the control flow analysis which is is implemented in JaCoCo, see our documentation:


In any case we do not consider the exec file format as an API and it might change at any point in time (and already did in the past). We recommend using the public Java API or the XML reports.

Cheers,
-marc
  

On 22. Aug 2020, at 05:32, winter <qiaom...@gmail.com> wrote:

What's in the dump file .exec, is there some document I can study, thank u

--
You received this message because you are subscribed to the Google Groups "JaCoCo and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jacoco+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jacoco/b228c2ce-c3e3-4390-900f-6bcebb891038n%40googlegroups.com.

winter

unread,
Aug 22, 2020, 7:53:03 AM8/22/20
to JaCoCo and EclEmma Users
Thank u!, ExecutionDataWriter.java it helps me a lot!

I noticed the exec file record the probes array, such as [true,true,false], but How jacoco knows the probes position? jacoco report required exec files, class files and source, It can show which line is covered, but exec file didn't have information about probe position.

Marc Hoffmann

unread,
Aug 22, 2020, 9:08:30 AM8/22/20
to jac...@googlegroups.com
Correct, exec files alone do not contain enough information to generate a coverage report. You also need the control flow and optionally line number information. That‘s why JaCoCo uses the original class files for report generation. Source files are only used to highlight the code in HTML reports.

See the second link I sent you how this process works.

On 22. Aug 2020, at 13:53, winter <qiaom...@gmail.com> wrote:

Thank u!, ExecutionDataWriter.java it helps me a lot!
Reply all
Reply to author
Forward
0 new messages