Hi, I''m having a problem with USDT probes on FreeBSD. What probes should the child process have when the parent is the one who installs USDT probes? I see a problem with postgresql where drti.o installs the USDT probes but then postgresql forks and the new child(s) don''t install any new probes. From my understand of the code, this was expected. Any idea what should be happening here? Thanks, -- Rui Paulo
> I''m having a problem with USDT probes on FreeBSD. What probes should the child process have when the parent is the one who installs USDT probes? > I see a problem with postgresql where drti.o installs the USDT probes but then postgresql forks and the new child(s) don''t install any new probes. From my understand of the code, this was expected. > > Any idea what should be happening here?When a process with registered USDT probes forks, those probes should be copied into the child process. We do this from cfork() where the interesting part is here: http://cvs.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/uts/common/dtrace/dtrace.c#dtrace_helpers_duplicate Adam
> I''m having a problem with USDT probes on FreeBSD. What probes should the child process have when the parent is the one who installs USDT probes? > I see a problem with postgresql where drti.o installs the USDT probes but then postgresql forks and the new child(s) don''t install any new probes. From my understand of the code, this was expected. > > Any idea what should be happening here?When a process with registered USDT probes forks, those probes should be copied into the child process. We do this from cfork() where the interesting part is here: http://cvs.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/uts/common/dtrace/dtrace.c#dtrace_helpers_duplicate Adam
On 7 Sep 2010, at 17:38, Adam Leventhal wrote:>> I''m having a problem with USDT probes on FreeBSD. What probes should the child process have when the parent is the one who installs USDT probes? >> I see a problem with postgresql where drti.o installs the USDT probes but then postgresql forks and the new child(s) don''t install any new probes. From my understand of the code, this was expected. >> >> Any idea what should be happening here? > > When a process with registered USDT probes forks, those probes should > be copied into the child process. We do this from cfork() where the > interesting part is here: > > http://cvs.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/uts/common/dtrace/dtrace.c#dtrace_helpers_duplicateThis makes more sense now. Thanks! Regards, -- Rui Paulo