profile cuda program in fly

Hi,
is there any tool which could profile program in fly, just gdb.
for gdb I can debug program like this:
gdb attach

thankds

nvprof can profile in background

[url]Profiler :: CUDA Toolkit Documentation

“profile all processes”

It works, thanks