From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26174 invoked by alias); 26 Jun 2006 22:03:38 -0000 Received: (qmail 26166 invoked by uid 22791); 26 Jun 2006 22:03:37 -0000 X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 26 Jun 2006 22:03:35 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id k5QM3XrP028030 for ; Mon, 26 Jun 2006 18:03:33 -0400 Received: from pobox.toronto.redhat.com (pobox.toronto.redhat.com [172.16.14.4]) by int-mx1.corp.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id k5QM3VIB030647 for ; Mon, 26 Jun 2006 18:03:32 -0400 Received: from [172.16.14.227] (IDENT:gJOalUKQznRWJlqp7XvZQfQGRNBPhQzL@topaz.toronto.redhat.com [172.16.14.227]) by pobox.toronto.redhat.com (8.12.8/8.12.8) with ESMTP id k5QM3Uve023701 for ; Mon, 26 Jun 2006 18:03:30 -0400 Message-ID: <44A059B2.3070607@redhat.com> Date: Mon, 26 Jun 2006 22:03:00 -0000 From: Dave Brolley User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050317) MIME-Version: 1.0 To: sid@sources.redhat.com Subject: [patch][commit] sid/bsp Support and Documentation of new sw-profile-gprof Interface Content-Type: multipart/mixed; boundary="------------020802040505090203030406" X-IsSubscribed: yes Mailing-List: contact sid-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: sid-owner@sourceware.org X-SW-Source: 2006-q2/txt/msg00054.txt.bz2 This is a multi-part message in MIME format. --------------020802040505090203030406 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 252 Hi, I've committed the attached patch which documents the new sw-profile-gprof interface. ALso, I don't know it it's supported anymore, but I also updated sid/bsp/configrun-sid.in to generate the correct configuration for the new interface. Dave --------------020802040505090203030406 Content-Type: text/plain; name="sid-gprof-doc.ChangeLog" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="sid-gprof-doc.ChangeLog" Content-length: 458 2006-06-26 Dave Brolley * sw-profile-gprof.xml: Document new sampling interface. * sw-profile-gprof.txt: Regenerated. 2006-06-26 Dave Brolley * configrun-sid.in (opt_gprof): Do not "connect-pin target-sched 0-event -> gprof sample". Do not "set gprof value-attribute pc". connect-pin cpu sample-gprof -> gprof sample. connect-pin cpu gprof-pc -> gprof pc. connect-pin cpu gprof-pc-hi -> gprof pc-hi. --------------020802040505090203030406 Content-Type: text/plain; name="sid-gprof-doc.patch.txt" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="sid-gprof-doc.patch.txt" Content-length: 6928 Index: sid/bsp/configrun-sid.in =================================================================== RCS file: /cvs/src/src/sid/bsp/configrun-sid.in,v retrieving revision 1.37 diff -c -p -r1.37 configrun-sid.in *** sid/bsp/configrun-sid.in 16 Dec 2005 10:23:12 -0000 1.37 --- sid/bsp/configrun-sid.in 26 Jun 2006 21:57:15 -0000 *************** if ($opt_cpu eq "mt") *** 499,510 **** if ($opt_gprof) { $second_section .= "# gprof connections - connect-pin target-sched 0-event -> gprof sample connect-pin deinit-sequence output-7 -> gprof store ! relate gprof target-component cpu connect-pin cpu cg-caller -> gprof cg-caller connect-pin cpu cg-callee -> gprof cg-callee ! set gprof value-attribute pc set gprof bucket-size 4 # bytes per bucket "; } --- 499,511 ---- if ($opt_gprof) { $second_section .= "# gprof connections connect-pin deinit-sequence output-7 -> gprof store ! connect-pin cpu sample-gprof -> gprof sample ! connect-pin cpu gprof-pc -> gprof pc ! connect-pin cpu gprof-pc-hi -> gprof pc-hi connect-pin cpu cg-caller -> gprof cg-caller connect-pin cpu cg-callee -> gprof cg-callee ! relate gprof target-component cpu set gprof bucket-size 4 # bytes per bucket "; } Index: sid/component/profiling/sw-profile-gprof.xml =================================================================== RCS file: /cvs/src/src/sid/component/profiling/sw-profile-gprof.xml,v retrieving revision 1.4 diff -c -p -r1.4 sw-profile-gprof.xml *** sid/component/profiling/sw-profile-gprof.xml 11 May 2006 16:04:38 -0000 1.4 --- sid/component/profiling/sw-profile-gprof.xml 26 Jun 2006 21:57:16 -0000 *************** *** 6,11 **** --- 6,13 ---- + + *************** *** 21,27 **** - --- 23,28 ---- *************** *** 55,62 ****

This component needs to be configured with the target-component relation. The first element in the relation will be used as the ! target of profiling. The value-attribute setting contains the ! name of the target component's attribute that will be collected. If pc-size is 64, then the target component should also have an attribute with the same name suffixed by "-hi"

--- 56,62 ----

This component needs to be configured with the target-component relation. The first element in the relation will be used as the ! target of profiling. If pc-size is 64, then the target component should also have an attribute with the same name suffixed by "-hi"

*************** *** 78,90 ****

Whenever the sample pin is driven, this component ! takes a single sample of the configured target component's value ! attribute. The attribute is interpreted as a numeric string, ! and the resulting number is accumulated in a big histogram, in ! the appropriate bucket. The bucket is chosen by masking the ! number into bucket-size-wide buckets. ! If the target component is unset, or its target attribute does ! not result in a valid numeric string, no sample is accumulated.

Alternately, if the cg-caller and perhaps the cg-caller-hi and then the cg-callee and perhaps the cg-callee-hi --- 78,89 ----

Whenever the sample pin is driven, this component ! takes a single sample using the number drive on the pin. ! The resulting number is accumulated in a big histogram, in ! the appropriate bucket. The bucket is chosen by combining the two 32 bit values ! last driven on the pc and the pc-hi pins to form one 64 bit index. ! This index is then masked into bucket-size-wide buckets. ! If the target component is unset then no sample is accumulated.

Alternately, if the cg-caller and perhaps the cg-caller-hi and then the cg-callee and perhaps the cg-callee-hi *************** *** 144,161 **** be driven by any activity in SID, such as bus traffic (see hw-probe-bus), or host or target schedulers (see sid-sched-*). ! Perhaps the simplest way is to take a CPU PC sample every time ! the CPU has completed a batch of instructions.

new sw-profile-gprof gprof new SOME_KIND_OF_CPU cpu relate gprof target-component cpu connect-pin shutdown-manager output-5 -> gprof store ! connect-pin foo output -> cpu step! ! connect-pin foo output -> gprof sample ! # Set sampling interval by number of CPU instructions. ! set cpu step-insn-count 127 Host system --- 143,157 ---- be driven by any activity in SID, such as bus traffic (see <tt>hw-probe-bus</tt>), or host or target schedulers (see <tt>sid-sched-*</tt>). ! </p> <code> new sw-profile-gprof gprof new SOME_KIND_OF_CPU cpu relate gprof target-component cpu connect-pin shutdown-manager output-5 -> gprof store ! connect-pin cpu sample-gprof -> gprof sample ! connect-pin cpu gprof-pc -> gprof pc </code> <title> Host system --------------020802040505090203030406--