BIND 10 #1565: document how to profile - gprof
BIND 10 Development
do-not-reply at isc.org
Thu Feb 2 06:12:05 UTC 2012
#1565: document how to profile - gprof
-------------------------------------+-------------------------------------
Reporter: jelte | Owner: haikuo
Type: task | Status: accepted
Priority: major | Milestone:
Component: | Sprint-20120207
Unclassified | Resolution:
Keywords: | Sensitive: 0
Defect Severity: N/A | Sub-Project: DNS
Feature Depending on Ticket: | Estimated Difficulty: 0
Add Hours to Ticket: 0 | Total Hours: 0
Internal?: 0 |
-------------------------------------+-------------------------------------
Comment (by haikuo):
when we use "pg" option to build bind10 software, all the ELF executable
files(eg. b10-auth and b10-resolver in PATH/libexec/bind10-devel/) would
produce the same default profiling file which named "gmon.out" at the same
working directory.
If want to produce different files, we should assign different values to
the "GMON_OUT_PREFIX" environmental variable when spawn different sub-
processes. Take from example, b10-auth ELF executable file will produce
b10-auth.PID file if we assign "b10-auth" to "GMON_OUT_PREFIX",and
b10-resolver ELF executable file will produce b10-resolver.PID file when
we assign "b10-resolver" to "GMON_OUT_PREFIX".
I have a suggestion to handle the name conflict. we could modify the
bind10 scripts in PATH/sbin, add "spawn_env['GMON_OUT_PREFIX'] =
self.args[0]" to _spawn function, like that:
[zhanghk at iscloud01 tmp]$ diff bind10 bind10-new
144a145
> spawn_env['GMON_OUT_PREFIX'] = self.args[0]
then bind10 will produce different profiling files, and we can use gprof
to collect data for the differenct ELF executable files .
--
Ticket URL: <http://bind10.isc.org/ticket/1565#comment:3>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development
More information about the bind10-tickets
mailing list