Subject: | Subtract sys-times and make fork-follow can be turned off |
Alias made good PR for NYTProf, so I tried it out and he didn't
exaggerate. But I miss 2 things:
1) Calls like fork(), select() etc. are fully counted - it should be
possible to see the runtime costs of subroutines without
1a) syscalls, and maybe
1b) calls to other libraries
We have some script which have an own implementation for a thing like
IPC::Run - harmonized with some other features (own rpcd, scheduling
it's requests harmonized with it's running other tasks - using based a
select-based I/O multiplexer). This leads to my second wish:
2) Could the process follow via fork get a flag so that it could be
turned off? When I profile a weekly run of our rpcd, I have more
nytprof.out.${pid} files in the project directory that can be deleted
with a single `rm -f nytprof.out.*` (find | xargs must be used).
Further, that fork follow causes errors (25955 is the original daemon in
debug mode, 25997 is the forked process to exec
`/sapmnt/LN5/exe/cleanipc 11`:
byjk02:ln5adm 13> env NYTPROF=addpid=1 /opt/pkgsrc/bin/perl -d:NYTProf
../bin/BDCappld.pl --applpart SAPSCS --applid LN5NEU --instance 11 -D
ln5adm@byjk02 BDCappld.pl/25955 [#info(1)(core)]: Execute ok for
'BDCtimedTask {TID: 1, STATE: running, TIMEOUT=0.500000s since 'Wed 12
Aug 2009 06:12:07 PM CEST'}'
ln5adm@byjk02 BDCappld.pl/25955 [#info(1)(core)]: Listening at
'/tmp/BDC/BDCappld/=::SAPSCS::LN5NEU::11' with connection id nuGI8sOMDcqbJ
ln5adm@byjk02 BDCappld.pl/25955 [#info(1)(core)]: Execute ok for
'BDCrpcd::KernTask {CID: nuGI8sOMDcqbJ, STATE: running}'
ln5adm@byjk02 BDCappld.pl/25955 [#info(1)(core)]: Execute ok for
'BDCappld::Action {CID: 9uGBc72m5bRkH, STATE: running, ADDRESSEE =>
{DAEMON => appld, FUNCTION => status, MODULE => SAPSCS}, JID => 2,
MESSAGE => {FORCE => 0, ONLY => 0, RUNLEVEL => 25}}'
ln5adm@byjk02 BDCappld.pl/25955 [#info(1)(core)]: Execute ok for
'BDCrpc::Request {CID: nuGlT5deYuDer, STATE: running, ADDRESSEE =>
{DAEMON => rpcd, FUNCTION => status, MODULE => saposcol}, MESSAGE =>
<undef>}'
ln5adm@byjk02 BDCappld.pl/25955 [#info(1)(core)]: Execute ok for
'BDCcommand::AsUser {PID: 25997, STATE: running, CMD =>
/sapmnt/LN5/exe/cleanipc 11}'
ln5adm@byjk02 BDCappld.pl/25997 [#error(core)]: Exception caught
executing 'BDCcommand::AsUser {PID: <n/a>, STATE: prepared, CMD =>
/sapmnt/LN5/exe/cleanipc 11}':
ln5adm@byjk02 BDCappld.pl/25997 [#error(core)]: BDCmanager::start(): 0
previously waiting commands started - 0 waiting, 2 running, 442 file
handles left
ln5adm@byjk02 BDCappld.pl/25997 [#info(1)(core)]: Execute ok for
'BDCtimedTask {TID: 2, STATE: running, TIMEOUT=0.500000s since 'Wed 12
Aug 2009 06:12:30 PM CEST'}'
ln5adm@byjk02 BDCappld.pl/25997 [#info(1)(core)]: Execute ok for
'BDCappld::Action {CID: 9uG1JMU5pHGA5, STATE: running, ADDRESSEE =>
{DAEMON => appld, FUNCTION => status, MODULE => SAPSCS}, JID => 4,
MESSAGE => {FORCE => 0, ONLY => 0, RUNLEVEL => 25}}'
ln5adm@byjk02 BDCappld.pl/25997 [#info(1)(core)]: Execute ok for
'BDCrpc::Request {CID: nuGzGW7GA8PHP, STATE: running, ADDRESSEE =>
{DAEMON => rpcd, FUNCTION => status, MODULE => saposcol}, MESSAGE =>
<undef>}'
ln5adm@byjk02 BDCappld.pl/25997 [#info(1)(core)]: Execute ok for
'BDCcommand::AsUser {PID: 26856, STATE: running, CMD =>
/sapmnt/LN5/exe/cleanipc 11}'
ln5adm@byjk02 BDCappld.pl/25997 [#info(1)(core)]: Execute ok for
'BDCcommand::AsUser {PID: 26862, STATE: running, CMD =>
/sapmnt/LN5/exe/startsap check SCS11 ln5}'
ln5adm@byjk02 BDCappld.pl/25997 [#error(core)]: doing 'status' on child
'BDCappld::SapApplServ::sapstartsrv' returns -2
ln5adm@byjk02 BDCappld.pl/25997 [#info(1)(core)]: Execute ok for
'BDCtimedTask {TID: 3, STATE: running, TIMEOUT=0.500000s since 'Wed 12
Aug 2009 06:23:18 PM CEST'}'
ln5adm@byjk02 BDCappld.pl/25997 [#info(1)(core)]: Execute ok for
'BDCcommand::AsUser {PID: 27141, STATE: running, CMD =>
/sapmnt/LN5/exe/startsap check SCS11 ln5}'
ln5adm@byjk02 BDCappld.pl/25955 [#info(1)(core)]: Execute ok for
'BDCappld::Action {CID: 9uGkVkqhRMDfJ, STATE: running, ADDRESSEE =>
{DAEMON => appld, FUNCTION => status, MODULE => SAPSCS}, JID => 4,
MESSAGE => {FORCE => 0, ONLY => 0, RUNLEVEL => 25}}'
ln5adm@byjk02 BDCappld.pl/25955 [#info(1)(core)]: Execute ok for
'BDCrpc::Request {CID: nuGzGW7GA8PHP, STATE: running, ADDRESSEE =>
{DAEMON => rpcd, FUNCTION => status, MODULE => saposcol}, MESSAGE =>
<undef>}'
ln5adm@byjk02 BDCappld.pl/25955 [#info(1)(core)]: Execute ok for
'BDCcommand::AsUser {PID: 27499, STATE: running, CMD =>
/sapmnt/LN5/exe/cleanipc 11}'
ln5adm@byjk02 BDCappld.pl/27499 [#error(core)]: Exception caught
executing 'BDCcommand::AsUser {PID: <n/a>, STATE: prepared, CMD =>
/sapmnt/LN5/exe/cleanipc 11}'