Wrong method invocation count

Questions about YourKit Java Profiler
Locked
lredor
Posts: 6
Joined: Tue Aug 31, 2021 8:26 am

Wrong method invocation count

Post by lredor »

Hi,

During some analysis of JUnit tests, I observed a wrong method invocation count. Indeed, if I add a "System.out" in the concerned method, the number of calls is not the same than what is in the Yourkit snapshot.

For example, the analysis is done on ManageBehaviorPCsDeployment a test class from Capella.

The method

Code: Select all

org.polarsys.capella.core.sirius.analysis.CapellaServices.forceRefresh(DDiagram)
is called 2 times. But in Yourkit the method invocation count is "3". As you can see on the below screenshot, there are 2 calls from

Code: Select all

org.eclipse.acceleo.query.runtime.impl.JavaMethodService.internalInvoke(Object[])
, with the line number 162 in the code, and 1 call from the same method but without a line number of code.

Image

Do you have an explanation ?

For information, I use "YourKit Java Profiler 2020.9-b416".

Regards,

Laurent
lredor
Posts: 6
Joined: Tue Aug 31, 2021 8:26 am

Re: Wrong method invocation count

Post by lredor »

For information, if I launch the same analysis but just with "Call counting" instead of "Tracing", I have 2 invocation count for

Code: Select all

 org.polarsys.capella.core.sirius.analysis.CapellaServices.forceRefresh(DDiagram)
.
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Re: Wrong method invocation count

Post by Anton Katilin »

Hello Laurent,

Do you see the problem with the latest profiler version 2021.3? The version you're using is no longer supported.

Best regards,
Anton
lredor
Posts: 6
Joined: Tue Aug 31, 2021 8:26 am

Re: Wrong method invocation count

Post by lredor »

Hello Anton,
I've just tried to record a new snapshot with 2021.3 and the problem is exactly the same.
Laurent
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Re: Wrong method invocation count

Post by Anton Katilin »

Hello Laurent,

Could you please provide the problematic snapshot file. You can send a download link to [email protected]

Best regards,
Anton
lredor
Posts: 6
Joined: Tue Aug 31, 2021 8:26 am

Re: Wrong method invocation count

Post by lredor »

Hello,
I've just sent you the snapshot file through WeTransfer (Capella Perf JUnit tests-2021-09-09-withProblem.snapshot).
I no had longer this snapshot so I recorded it again. And I discovered something because in the first snapshot, I had not the problem. It seems that if I record the snapshot without "Apply filters" checked, I have not the problem. But if I record the snapsot with "Apply filters" checked, I have the problem. I think it's strange but maybe it'll help you in the analysis....
I also sent the snapshot without the problem (Capella Perf JUnit tests-2021-09-09-withoutProblem.snapshot).
Regards,
Laurent
lredor
Posts: 6
Joined: Tue Aug 31, 2021 8:26 am

Re: Wrong method invocation count

Post by lredor »

Here is the my filters list (I don't know if it could help):
Image
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Re: Wrong method invocation count

Post by Anton Katilin »

Hi Laurent,

Thank you for sharing the snapshots. I confirm that we have received and started analyzing them.
It seems that if I record the snapshot without "Apply filters" checked, I have not the problem. But if I record the snapsot with "Apply filters" checked, I have the problem. I think it's strange but maybe it'll help you in the analysis....
It's really strange because the filters are used in the profiler UI only. The profiler agent does not use any of them in runtime. A snapshot should not depend on the filter settings.

We believe there should be another factor affecting the problem reproducibility.

Best regards,
Anton
lredor
Posts: 6
Joined: Tue Aug 31, 2021 8:26 am

Re: Wrong method invocation count

Post by lredor »

Hello Anton,

Here is the result of tests done:
* A- KO : Apply filters checked and "disablestacktelemetry,exceptions=off"
* B- KO : Apply filters unchecked and "disablestacktelemetry,exceptions=off"
* C- OK : Apply filters unchecked and default options (ie stacktelemetry and exceptions activated)
* D- OK : Apply filters checked and default options (ie stacktelemetry and exceptions activated)
* E- KO : Apply filters checked and "disablestacktelemetry" (default for exceptions, ie activated)
* F- KO : Apply filters checked and "exceptions=off" (default for stacktelemetry, ie activated)

These tests confirm that "filters" are not the cause of the problem. But as soon as I disable stacktelemetry or exceptions, the problem occurs.

Laurent

P.S.: I kept the six snapshots if it can help you.
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Re: Wrong method invocation count

Post by Anton Katilin »

Hello Laurent,

We answered by email.

Best regards,
Anton
danielfrans
Posts: 1
Joined: Wed Dec 22, 2021 2:12 am

Re: Wrong method invocation count

Post by danielfrans »

i have the same problem, i need this information,
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Re: Wrong method invocation count

Post by Anton Katilin »

It's expected the issue has been solved. If you experience something similar with the latest version of the profiler, please provide detail.
awais_ahmed
Posts: 2
Joined: Sat Jan 01, 2022 5:23 am

Re: Wrong method invocation count

Post by awais_ahmed »

I have also the same problem. Please guide me for that.
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Re: Wrong method invocation count

Post by Anton Katilin »

It's expected the issue has been solved. If you experience something similar with the latest version of the profiler, please provide detail.
awais_ahmed
Posts: 2
Joined: Sat Jan 01, 2022 5:23 am

Re: Wrong method invocation count

Post by awais_ahmed »

Anton Katilin wrote:It's expected the issue has been solved. If you experience something similar with the latest version of the profiler, please provide detail.
Thanks a lot, the issue is resolved now.
Locked