|
From: <man...@ve...> - 2004-02-06 07:21:01
|
Hi Folks,
I searched the valgrind documentation, but was not able to find the
answers for the following questions,
* Attach a process id with valgrind, i know it is not possible,
just confirming it.
* I have a scenario where, we have a system monitor which
starts/initializes/monitors all the other core processes. These core
processes cannot be started alone. They are tightly coupled with system
monitor. Is there any way, i will be able to individually attach valgrind
to the core process without attaching to the system monitor. I know of the
--trace-children option, this is not suited for our system, since it spawns
lot of processes in the order of hundreds.
Any help will be deeply appreciated,
Thanks,
Mani.
|
|
From: Nicholas N. <nj...@ca...> - 2004-02-06 08:06:07
|
On Fri, 6 Feb 2004 man...@ve... wrote: > * Attach a process id with valgrind, i know it is not possible, > just confirming it. Correct, you cannot do it. Valgrind has to gain control at startup. If it didn't, then eg. Memcheck wouldn't be able to work, because it couldn't know what memory had been allocated so far, etc. > * I have a scenario where, we have a system monitor which > starts/initializes/monitors all the other core processes. These core > processes cannot be started alone. They are tightly coupled with system > monitor. Is there any way, i will be able to individually attach valgrind > to the core process without attaching to the system monitor. I know of the > --trace-children option, this is not suited for our system, since it spawns > lot of processes in the order of hundreds. When the system monitor spawns the core processes, can you exec them with "valgrind x" instead of "x"? N |
|
From: Tom H. <th...@cy...> - 2004-02-06 08:16:03
|
In message <OF4...@co...>
manikandan x. shanmugam <man...@ve...> wrote:
> * Attach a process id with valgrind, i know it is not possible,
> just confirming it.
Indeed it isn't.
> * I have a scenario where, we have a system monitor which
> starts/initializes/monitors all the other core processes. These core
> processes cannot be started alone. They are tightly coupled with system
> monitor. Is there any way, i will be able to individually attach valgrind
> to the core process without attaching to the system monitor. I know of the
> --trace-children option, this is not suited for our system, since it spawns
> lot of processes in the order of hundreds.
You would have to either change the monitor to start the core process
in question under valgrind, or replace the executable for that process
with a shell script that started the real core process under valgrind.
Tom
--
Tom Hughes (th...@cy...)
Software Engineer, Cyberscience Corporation
http://www.cyberscience.com/
|