libbpf javagc fails when no PID is provided
The libbpf javagc tool fails with no useful error message when no PID is provided even though the "-p" option is described as optional. A quick look at the code let me think that the tool is only meant to trace one PID only and thus the option should have been made mandatory, and the tool should have failed at the parsing stage, with a proper error message. As a side note, the tool help message is lacking compared to the equivalent bcc tool.
@jeromemarchand hi jeromemarchand, you are right,i did not consider it so carefully at the time,when no pid input, the default value is -1, and the pid of no task is -1 in kernel,as a result, no event output from kernel. Can you fix it?
That was fixed by commit ebcc7a72 ("libbpf-tools: javagc: Hints for more information (#5154)")