Filter PIDs to profile #605
Labels
defined-and-prioritized
Tickets that have fully defined the desired outcome & are prioritized to be developed.
enhancement
New feature or request
Filtering processes to profile is a feature that was requested in multiple cases.#482 #298 #274 #573. This ticket is for the first step - filter by PIDs (relevant only in cases where processes remain running).
I suggest:
--pids
parameter that is a number or comma-separated list of numbers, and can also be given multiple times e.g--pids 1,2 --pids 5 --pids 76,76576
. All are accumulated.PIDs are selected for runtime profilers. We can intersect the "selected PIDs" here with the PIDs passed via
--pids
. This class is extended by all runtime profilers classes, so the "easy" way to pass more parameters is to add it in all constructors ofJavaProfiler
etc. I prefer if we find a clean way to do so, so we don't need to modify all runtime profilers, this needs to be decoupled.perf
,PyPerf
andphpspy
. They need to be modified. At the very least,perf
andPyPerf
support receiving target PID(s) as arguments. We need to check aboutphpspy
. Their respective classes should receive thepids
argument and make use of it if passed.--pids a,b,c
and only e.gb
,c
are running anda
is not running.--profile-spawned-processes
with--pids
, because it is meaningless, we target live processes.The text was updated successfully, but these errors were encountered: