From: Dave Brolley <brolley@redhat.com>
To: sid@sources.redhat.com
Subject: [patch][commit] sid/bsp Support and Documentation of new sw-profile-gprof Interface
Date: Mon, 26 Jun 2006 22:03:00 -0000 [thread overview]
Message-ID: <44A059B2.3070607@redhat.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 252 bytes --]
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
[-- Attachment #2: sid-gprof-doc.ChangeLog --]
[-- Type: text/plain, Size: 458 bytes --]
2006-06-26 Dave Brolley <brolley@redhat.com>
* sw-profile-gprof.xml: Document new sampling interface.
* sw-profile-gprof.txt: Regenerated.
2006-06-26 Dave Brolley <brolley@redhat.com>
* 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.
[-- Attachment #3: sid-gprof-doc.patch.txt --]
[-- Type: text/plain, Size: 6928 bytes --]
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 ----
<!-- pins -->
<defpin name="reset" direction="in" legalvalues="any" behaviors="resetting" />
+ <defpin name="pc" direction="in" legalvalues="any" behaviors="data gathering" />
+ <defpin name="pc-hi" direction="in" legalvalues="any" behaviors="data gathering" />
<defpin name="sample" direction="in" legalvalues="any" behaviors="data gathering" />
<defpin name="cg-caller" direction="in" legalvalues="any" behaviors="data gathering" />
<defpin name="cg-caller-hi" direction="in" legalvalues="any" behaviors="data gathering" />
***************
*** 21,27 ****
<defattribute name="limit-max" category="setting" legalvalues="decimal string" defaultvalue="infinity" behaviors="data gathering" />
<defattribute name="bucket-size" category="setting" legalvalues="integer" defaultvalue="1" behaviors="data gathering" />
<defattribute name="pc-size" category="setting" legalvalues="4 or 8" defaultvalue="4" behaviors="data gathering" />
- <defattribute name="value-attribute" category="setting" legalvalues="name" defaultvalue="'pc'" behaviors="data gathering" />
<defattribute name="output-file" category="setting" legalvalues="file name" defaultvalue="'gmon.out'" behaviors="configuration" />
<defattribute name="output-file-endianness" category="setting" legalvalues="0/1/2/little/big/unknown" defaultvalue="unknown" behaviors="configuration" />
<defattribute name="reset" category="pin" behaviors="resetting" />
--- 23,28 ----
***************
*** 55,62 ****
<p>
This component needs to be configured with the <relation>target-component</relation>
relation. The first element in the relation will be used as the
! target of profiling. The <attribute>value-attribute</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"
</p>
<p>
--- 56,62 ----
<p>
This component needs to be configured with the <relation>target-component</relation>
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"
</p>
<p>
***************
*** 78,90 ****
<behavior name="data gathering">
<p>
Whenever the <pin>sample</pin> 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 <attribute>bucket-size</attribute>-wide buckets.
! If the target component is unset, or its target attribute does
! not result in a valid numeric string, no sample is accumulated.
</p>
<p>Alternately, if the <pin>cg-caller</pin> and perhaps the <pin>cg-caller-hi</pin>
and then the <pin>cg-callee</pin> and perhaps the <pin>cg-callee-hi</pin>
--- 78,89 ----
<behavior name="data gathering">
<p>
Whenever the <pin>sample</pin> 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 <pin>pc</pin> and the <pin>pc-hi</pin> pins to form one 64 bit index.
! This index is then masked into <attribute>bucket-size</attribute>-wide buckets.
! If the target component is unset then no sample is accumulated.
</p>
<p>Alternately, if the <pin>cg-caller</pin> and perhaps the <pin>cg-caller-hi</pin>
and then the <pin>cg-callee</pin> and perhaps the <pin>cg-callee-hi</pin>
***************
*** 144,161 ****
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>).
! Perhaps the simplest way is to take a CPU PC sample every time
! the CPU has completed a batch of instructions.</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 foo output -> cpu step!
! connect-pin foo output -> gprof sample
! # Set sampling interval by number of CPU instructions.
! set cpu step-insn-count 127
</code>
<title>
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
reply other threads:[~2006-06-26 22:03 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=44A059B2.3070607@redhat.com \
--to=brolley@redhat.com \
--cc=sid@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).