Marc, do you have a comment on this? Especially the "PS" is important to me right now.
On Tue, Jan 6, 2015 at 3:04 PM, Carsten Otto <[email protected]> wrote: > > Hi, > > first of all, sorry for the late reply. Holidays got in the way, and I > also finally handed in my PhD thesis. > > To your question: > The code change I proposed includes a probe in front of each INVOKE > opcode, which basically is the only change. This way one can see if the > code leading to the INVOKE opcode has been executed, or not. Currently, > this cannot be determined in the case where an INVOKE opcode throws an > exception. Instead, only partial information (derived from other probes) is > used for the computation. > > In case I get you correctly, the change you're suggesting goes along these > lines: > > BEFORE: > beforeDummy++; > methodInvocation(); > afterDummy++ > > AFTER: > beforeDummy++; > try { > methodInvocation(); > } catch (Throwable t) { > throw t; // if this block is reached, we know the invocation threw an > exception > } > afterDummy++; > > This way, you can also detect if the method invocation goes through. > However, in addition to the necessary code instrumentation, you'd need to > add more than one probe. > One could also extend the "try" block to cover, for example, the complete > method. However, in thise case there is no way to determine which of the > possibly many opcodes threw an exception. > Maybe I'm not getting you, though. Could you provide a (pseudocode) > example of your idea? > > PS: Could you please give me your current gut feeling regarding the choice > of an inclusion or a fork? I've been approached by a user who was > interested in the additional coverage results reported by my changes, and I > strongly believe there is more interest in the community (this is an > invitation to raise your voice, community!). > > Best regards, > Carsten > -- > Carsten Otto > [email protected] > www.c-otto.de > -- Carsten Otto [email protected] www.c-otto.de -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jacoco/CA%2BgHx6B8AtdpPgKOT2CRUm6do7JSB0sxphi-KPcaeK3PNihkew%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
