Thank you for your reply. I still have some uncertainties regarding the 
probe insertion points used by JaCoCo. I'm somewhat unclear about the 
insertion of probes of the SEQUENCE type, which, according to the 
documentation(https://www.jacoco.org/jacoco/trunk/doc/flow.html), are 
inserted between two instructions. 
However, after reviewing the *MethodProbesAdapter* section of JaCoCo's 
code, it seems to me that JaCoCo inserts probes at the following locations: 
1. before return/throw statements; 
2. at jumps and switches that have multiple targets; 
3. at the beginning and end of the try block in try-catch constructs, as 
well as at the beginning of the catch block. 
*Could you confirm if my understanding is correct?*

On Wednesday, August 21, 2024 at 1:04:22 AM UTC-4 Marc R. Hoffmann wrote:

> Dear Mai,
>
> exactly, JaCoCo stores a boolean array per class to record execution 
> status. The documentation provides an overview of the implementation:
>
> https://www.jacoco.org/jacoco/trunk/doc/implementation.html
> https://www.jacoco.org/jacoco/trunk/doc/flow.html
>
> JaCoCo does not record the sequence of probes (this would result in a 
> large list of probe identifiers). I can’t point you to specific files to 
> achieve this, you will need to implement a new runtime for such a global 
> list. Also you need a new analysis implementation that provides the 
> information in some meaningful way (again, this will be huge for typical 
> executions).
>
> Regards,
> -marc
>
>
> On 20. Aug 2024, at 22:06, mai <owhva...@gmail.com> wrote:
>
> Dear developers,
>
> Hello! I understand that JaCoCo inserts Boolean probes to collect code 
> coverage information. Currently, I am interested in collecting information 
> about the sequence of statements executed by a Java application during test 
> case execution. Could you please inform me if it is possible to directly 
> obtain this information using JaCoCo? If not, could you advise which files 
> within JaCoCo I should focus on to achieve this goal? I look forward to 
> your response.
>
> Best regards,
>
> Mai
>
> -- 
> 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/ce84e5f1-4c9a-4988-a3c4-169c12f655b1n%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/jacoco/ce84e5f1-4c9a-4988-a3c4-169c12f655b1n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
>
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/b4a7f03d-6ad9-42fd-9596-35f307808b08n%40googlegroups.com.

Reply via email to