Use full method signature for sampling instead of just the method name
Is your feature request related to a problem? Please describe.
Sampling does not include method parameters. Instead, all calls to methods with the same name are aggregated as calls with parameters ().
Describe the solution you'd like Sampling should behave like profiling with respect to tracking method calls. If that is too computational expensive in general, there should be an option to activate it (maybe limited to certain packages with the possibility of a ** wildcard).
Describe alternatives you've considered Alternative solutions:
- renaming all methods: not feasible in a large project
- using profiling: might slow down the execution too much
Additional context Analyzing a very simple class (see source code below):
| Sampling | Profiling |
|---|---|
![]() |
![]() |
package com;
import java.io.*;
final class VisualvmExperiment
{
public static void main(String[] args) throws InterruptedException, IOException
{
System.out.println("press enter");
System.in.read();
System.out.println("running ...");
call(0);
System.out.println("done");
}
private static void call(int i) throws InterruptedException
{
Thread.sleep(200);
call(++i, false);
if (i < 4)
call(++i);
}
private static void call(int i, boolean b) throws InterruptedException
{
if (i > 10)
return;
Thread.sleep(200);
call(++i);
}
}
You are right that is can be useful. Sampling uses JMX to get the stack traces. Unfortunately the signature is not part of stack trace obtained this way.
Closing as it seems to be not possible.

