|
From: Ice F. <ice...@gm...> - 2013-02-06 09:26:37
|
Hi folks, I have a simple question. I'm using Valgrind for database profiling. The db server is a daemon program, and it seems I can only do profiling by attaching Valgrind to the daemon. I googled and still cannot find the answer. Please let me know how can I do that. BTW, the kcachegrind website( http://kcachegrind.sourceforge.net/) has been available. Great thanks!! Thanks, |
|
From: vijay n. <vi...@gm...> - 2013-02-06 10:04:09
|
Nope, i guess its control of the task memory layout right from start On Wed, Feb 6, 2013 at 2:51 PM, Ice Frog <ice...@gm...> wrote: > Hi folks, > > I have a simple question. I'm using Valgrind for database profiling. The db > server is a daemon program, and it seems I can only do profiling by > attaching Valgrind to the daemon. I googled and still cannot find the > answer. > Please let me know how can I do that. BTW, the kcachegrind > website(http://kcachegrind.sourceforge.net/) has been available. > > > Great thanks!! > > Thanks, > > ------------------------------------------------------------------------------ > Free Next-Gen Firewall Hardware Offer > Buy your Sophos next-gen firewall before the end March 2013 > and get the hardware for free! Learn more. > http://p.sf.net/sfu/sophos-d2d-feb > _______________________________________________ > Valgrind-users mailing list > Val...@li... > https://lists.sourceforge.net/lists/listinfo/valgrind-users > |
|
From: vijay n. <vi...@gm...> - 2013-02-06 10:04:43
|
Typo! Nope, i guess it needs control of the task memory layout right from start > > On Wed, Feb 6, 2013 at 2:51 PM, Ice Frog <ice...@gm...> wrote: >> Hi folks, >> >> I have a simple question. I'm using Valgrind for database profiling. The db >> server is a daemon program, and it seems I can only do profiling by >> attaching Valgrind to the daemon. I googled and still cannot find the >> answer. >> Please let me know how can I do that. BTW, the kcachegrind >> website(http://kcachegrind.sourceforge.net/) has been available. >> >> >> Great thanks!! >> >> Thanks, >> >> ------------------------------------------------------------------------------ >> Free Next-Gen Firewall Hardware Offer >> Buy your Sophos next-gen firewall before the end March 2013 >> and get the hardware for free! Learn more. >> http://p.sf.net/sfu/sophos-d2d-feb >> _______________________________________________ >> Valgrind-users mailing list >> Val...@li... >> https://lists.sourceforge.net/lists/listinfo/valgrind-users >> |
|
From: John R. <jr...@bi...> - 2013-02-06 15:33:08
|
> I have a simple question. I'm using Valgrind for database profiling. The db server is a daemon program, and it seems I can only do profiling by attaching Valgrind to the daemon. I googled and still cannot find the answer. > Please let me know how can I do that. BTW, the kcachegrind website(http://kcachegrind.sourceforge.net/) has been available. It would help if there were more explanation than just "database profiling." Ordinarily "profiling" means applying some measurements to the dynamic subroutine call graph, such as: count the number of times each subroutine is entered (and perhaps from which caller), time the duration of execution within each subroutine (and perhaps as a "black box" [including all routines that it calls], and perhaps separated by which routine was the caller.) Or, use "cache misses" as the measurement unit (instead of nanoseconds); etc. Anyway, apply the usual trick for intercepting daemons: Move the current executable program somewhere else (give it a new name or a new directory), create an executable shell script which invokes valgrind on the moved daemon, and put the shell script at the old pathname of the daemon. Then terminate execution of the current daemon process ("kill -TERM <pid>", etc.) and re-start the daemon; sometimes such a restart is "automatic". If you have "no control" over the daemon, then 'oprofile' might be the only effective option. Oprofile can be invoked at any time, then samples the pc and accumulates a histogram of which subroutine it was in. -- |
|
From: Josef W. <Jos...@gm...> - 2013-02-06 15:45:46
|
Am 06.02.2013 10:21, schrieb Ice Frog: > Hi folks, > > I have a simple question. I'm using Valgrind for database profiling. The > db server is a daemon program, and it seems I can only do profiling by > attaching Valgrind to the daemon. Valgrind does not allow attaching to a running process. With some development effort, it may be possible to add such a feature (e.g. Intel Pin, quite similar to Valgrind, but not open-source, allows for this). However, this only would be useful for profiling tools. For correctness checkers (memcheck, helgrind, ...), its useless, as these tools need to observe all actions from program start to work. Thus, afaik, attaching to running programs is not on the TODO list for Valgrind. Josef I googled and still cannot find the > answer. > Please let me know how can I do that. BTW, the kcachegrind > website(http://kcachegrind.sourceforge.net/) has been available. > > > Great thanks!! > > Thanks, > > > ------------------------------------------------------------------------------ > Free Next-Gen Firewall Hardware Offer > Buy your Sophos next-gen firewall before the end March 2013 > and get the hardware for free! Learn more. > http://p.sf.net/sfu/sophos-d2d-feb > > > > _______________________________________________ > Valgrind-users mailing list > Val...@li... > https://lists.sourceforge.net/lists/listinfo/valgrind-users > |