|
From: Frank L. <fra...@go...> - 2009-11-06 14:55:55
|
Hello list, I guess it's a FAQ/RTMF thing, but I've searched the docs and the web and couldn't find a clue. I'm trying to run callgrind on daemon process that forks childs. The child processes accept network connections, authenticate the remote user and will seteuid ... to some system user. Im calling valgind like this: $ sudo valgrind --tool=callgrind --trace-children=yes <path to binary> ==3473== Callgrind, a call-graph generating cache profiler. ... $ ls -l callgrind.* -rw------- 1 root root 16087 2009-11-06 15:52 callgrind.out.3473 ... remote client logs in... ==3960== Error: can not open cache simulation output file `/home/frank/callgrind.out.3473' I must run valgrind as root, because the binary must be run as root (a fileserver daemon process listening on TCP port 548 (Netatalk)) and the children seteuid ... as described. The main process started under valgrind then writes to to its output file callgrind.out.$PID. The problem is, apparently the forked child tries to write to the same file instead of its own: ==3960== Error: can not open cache simulation output file `/home/frank/callgrind.out.3473' I'm using valgrind 3.3.0. Any hints? Thanks! -Frank |