Invocation count overflow when profiling
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 3.3k
- Forks
- 334
- PR merge metrics
- No merged PRs in 30d
Description
When profiling a program, Visualvm gives a methods invocation count. However that count seems to be stored in an int and thus overflows at 2^31. The invocation count approaches 2^31 and when reaching it the corresponding method just disappears from the list of methods. (probably that list only shows methods that got invoked > 0 times) When waiting for long enough it eventually reaches positive numbers again.
Of course the obvious solution is to store the invocation count as long.
The problem occurred with version 1.4.1 in Intellij 2018.1 .
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing profiling with a method invocation count approaching 2^31, then trace where that count is stored and how methods with non-positive counts are filtered from the list. Done means invocation counts continue increasing past 2^31 and the profiled method remains visible.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- performance
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100