<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=GB2312">
<STYLE>
BLOCKQUOTE {
        MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; MARGIN-LEFT: 2em
}
OL {
        MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px
}
UL {
        MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px
}
P {
        MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px
}
BODY {
        FONT-SIZE: 10.5pt; COLOR: #000080; LINE-HEIGHT: 1.5; FONT-FAMILY: ËÎÌå
}
</STYLE>

<META content="MSHTML 6.00.6000.17107" name=GENERATOR></HEAD>
<BODY style="MARGIN: 10px">
<DIV>
<DIV><STRONG>
<DIV>
<DIV 
style="FONT-WEIGHT: normal">Jinmei wrote:</DIV></STRONG>>Now, the possibly related question to the original point: do we still</DIV></DIV>
<DIV>>have the same-output-file problem if run it within the source tree?</DIV>
<DIV>>If not, we'll not have to use GMON_OUT_PREFIX, much less modifying the</DIV>
<DIV>>bind10 script.  We might still mention the tweak to the bind10 script</DIV>
<DIV>>in case someone really wants to run it under an installed environment,</DIV>
<DIV>>but I guess it would be a supplemental note.</DIV></DIV>
<DIV> </DIV>
<DIV>My answer is yes. the "same-output-file problem" exists 
there if we run it in the source tree.</DIV>
<DIV>because the gmon.out will be produced in the working directory(the 
directory which we run bind10 scripts),</DIV>
<DIV>and not the directory where the binary executable files store or 
locate.</DIV>
<DIV> </DIV>
<DIV>but you give me a valuable information that the user could test the bind10 
in source tree, not under production directory,</DIV>
<DIV>then they will run "run_bind10.sh" instead of bind10 scripts.</DIV>
<DIV>So the bind10 in source tree should be also modified to solve the 
"same-out-file problem" if user runs bind 10 in source tree.</DIV>
<DIV> </DIV>
<DIV>and thanks for your valuable suggestion. </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV>
<HR style="WIDTH: 210px; HEIGHT: 1px" align=left color=#b5c4df SIZE=1>

<DIV><SPAN>zhanghaikuo</SPAN></DIV>
<DIV> </DIV>
<DIV 
style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0cm; BORDER-TOP: #b5c4df 1pt solid; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: medium none; PADDING-TOP: 3pt; BORDER-BOTTOM: medium none">
<DIV 
style="PADDING-RIGHT: 8px; PADDING-LEFT: 8px; FONT-SIZE: 12px; BACKGROUND: #efefef; PADDING-BOTTOM: 8px; COLOR: #000000; PADDING-TOP: 8px">
<DIV><B>From:</B> <A href="mailto:jinmei@isc.org">JINMEI Tatuya 
/ÉñÃ÷ß_ÔÕ</A></DIV>
<DIV><B>Date:</B> 2012-02-10 02:14</DIV>
<DIV><B>To:</B> <A href="mailto:zhanghaikuo@cnnic.cn">zhanghaikuo</A></DIV>
<DIV><B>CC:</B> <A 
href="mailto:bind10-dev@lists.isc.org">bind10-dev</A></DIV>
<DIV><B>Subject:</B> Re: [bind10-dev] discussion about the approach of 
gprof</DIV></DIV></DIV>
<DIV>
<DIV>At Wed, 8 Feb 2012 10:18:28 +0800,</DIV>
<DIV>zhanghaikuo <zhanghaikuo@cnnic.cn> wrote:</DIV>
<DIV> </DIV>
<DIV>> If the GMON_OUT_PREFIX is defined as you said,the rule of profiling</DIV>
<DIV>> data file name is "GMON_OUT_PREFIX"+"PID" (PID is process ID).When</DIV>
<DIV>> you run bind10,all the sub-processes will get the same value of</DIV>
<DIV>> GMON_OUT_PREFIX and you don't know sub-processes's PID, so you don't</DIV>
<DIV>> know which profiling data file is for b10-auth,and which is for</DIV>
<DIV>> b10-resolver.</DIV>
<DIV> </DIV>
<DIV>Ah, okay, understood.</DIV>
<DIV> </DIV>
<DIV>I have a different, but possibly related question/comment.  I don't</DIV>
<DIV>think it a common operation to install executables built with -pg due</DIV>
<DIV>to its severe performance impact.  At least it would be very unlikely</DIV>
<DIV>that they are installed under production directory.  I suspect a</DIV>
<DIV>common practice would be to run it within the source tree, using the</DIV>
<DIV>run_bind10.sh script.</DIV>
<DIV> </DIV>
<DIV>I suggest noting this (and how to do it) in the wiki page.</DIV>
<DIV> </DIV>
<DIV>Now, the possibly related question to the original point: do we still</DIV>
<DIV>have the same-output-file problem if run it within the source tree?</DIV>
<DIV>If not, we'll not have to use GMON_OUT_PREFIX, much less modifying the</DIV>
<DIV>bind10 script.  We might still mention the tweak to the bind10 script</DIV>
<DIV>in case someone really wants to run it under an installed environment,</DIV>
<DIV>but I guess it would be a supplemental note.</DIV>
<DIV> </DIV>
<DIV>---</DIV>
<DIV>JINMEI, Tatuya</DIV>
<DIV>Internet Systems Consortium, Inc.</DIV></DIV></BODY></HTML>