From: Maynard J. <may...@us...> - 2008-11-24 16:43:57
|
Maynard Johnson wrote: > Robert Richter wrote: >> Signed-off-by: Robert Richter <rob...@am...> >> --- >> utils/opcontrol | 2 +- >> 1 files changed, 1 insertions(+), 1 deletions(-) >> >> diff --git a/utils/opcontrol b/utils/opcontrol >> index 7378928..7cfddbf 100644 >> --- a/utils/opcontrol >> +++ b/utils/opcontrol >> @@ -945,7 +945,7 @@ do_stop() >> do_kill_daemon() >> { >> if test ! -f "$LOCK_FILE"; then >> - # no error message, do_kill_deamon imply stop and stop already >> + # no error message, do_kill_daemon imply stop and stop already >> # output "Daemon not running" >> return >> fi > Looks fine. Applied. Thanks. -Maynard > > -Maynard > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > oprofile-list mailing list > opr...@li... > https://lists.sourceforge.net/lists/listinfo/oprofile-list |
From: Maynard J. <may...@us...> - 2008-11-14 17:45:58
|
Robert Richter wrote: > There are unreachable vecho commands in the code that are never > executed since the options are parsed later. I added --verbose to I can't find any such vecho commands. Can you point some out to me? In the code inspection I just did, it appears to me that all vecho commands currently in the code will be executed if --verbose option is used. > check_options_early(). Additional I removed the check of the --verbose > option that allows its usage only for --start or --start-daemon > options. This check was put in the code intentionally (see ChangeLog-2003 from 2003-12-29). Why should it be removed now? Are there some vecho calls that are in paths that are *not* part of --start or --start-daemon? Thanks. -Maynard > > Signed-off-by: Robert Richter <rob...@am...> > --- > utils/opcontrol | 27 +++++++++++---------------- > 1 files changed, 11 insertions(+), 16 deletions(-) > > diff --git a/utils/opcontrol b/utils/opcontrol > index 7cfddbf..840235c 100644 > --- a/utils/opcontrol > +++ b/utils/opcontrol > @@ -290,7 +290,6 @@ do_init() > NOTE_SIZE=0 > VMLINUX= > XENIMAGE="none" > - VERBOSE="" > SEPARATE_LIB=0 > SEPARATE_KERNEL=0 > SEPARATE_THREAD=0 > @@ -829,20 +828,16 @@ do_options() > DO_SETUP=yes > ;; > > - -V|--verbose) > - if test -z "$val"; then > - VERBOSE="all" > - else > - VERBOSE=$val > - fi > - ;; > - > -l|--list-events) > EXCLUSIVE_ARGC=`expr $EXCLUSIVE_ARGC + 1` > EXCLUSIVE_ARGV="$arg" > exec $OPHELP > ;; > > + # ignore early option > + -V|--verbose) > + ;; > + > *) > echo "Unknown option \"$arg\". See opcontrol --help" >&2 > exit 1 > @@ -864,13 +859,6 @@ do_options() > exit 1 > fi > > - if test -n "$VERBOSE"; then > - if test "$START" != "yes" -a "$START_DAEMON" != "yes"; then > - echo "Option --verbose may only be used with --start or --start-daemon" >&2 > - exit 1 > - fi > - fi > - > if test "$DO_SETUP" = "yes"; then > SETUP="$DO_SETUP" > fi > @@ -1690,6 +1678,13 @@ check_options_early() > $OPHELP --version | cut -d' ' -f2- > exit 0 > ;; > + -V|--verbose) > + if test -z "$val"; then > + VERBOSE="all" > + else > + VERBOSE=$val > + fi > + ;; > --session-dir) > error_if_empty $arg $val > SESSION_DIR="$val" |
From: Robert R. <rob...@am...> - 2008-11-17 14:24:05
|
On 14.11.08 11:46:00, Maynard Johnson wrote: > Robert Richter wrote: > > There are unreachable vecho commands in the code that are never > > executed since the options are parsed later. I added --verbose to > I can't find any such vecho commands. Can you point some out to me? In the code inspection I just did, it appears to me that all vecho commands currently in the code will be executed if --verbose option is used. > > check_options_early(). Additional I removed the check of the --verbose > > option that allows its usage only for --start or --start-daemon > > options. > This check was put in the code intentionally (see ChangeLog-2003 > from 2003-12-29). Why should it be removed now? Are there some > vecho calls that are in paths that are *not* part of --start or > --start-daemon? That code is introduced in the next patch (#4) to dump setup parameters. I reused the parameter dump code for this. Now it can be used also to dump parameters in combination with the setup option. I would not restrict --verbose to only --start or --start-daemon, instead simply enable vecho output no matter if there is something to print or not. This would also reduce unexpected behaviour after code changes (e.g. adding vecho output to other parts of the code). -Robert -- Advanced Micro Devices, Inc. Operating System Research Center email: rob...@am... |
From: Maynard J. <may...@us...> - 2008-11-17 22:53:43
|
Robert Richter wrote: > This adds an xsl script allowing the creation of one event per line > dumps with opreport. The dump is usefull to get text formated output > of all the data in the sampling buffer. The script is installed in the > /usr/share/oprofile/xslt directory. I'll admit to being pretty clueless about xslt. But I couldn't get this patch to give me any output. Would this be depdendent on some particular version of xsltproce Can you paste in an example of what the output looks like? What exactly can you get from this that you can't get from a text report? -Maynard > > Usage: > > opreport -X | xsltproc /usr/share/oprofile/xslt/opreport-denormalize.xsl - > > Signed-off-by: Robert Richter <rob...@am...> > --- > pp/Makefile.am | 23 ++++++++ > pp/xslt/opreport-denormalize.xsl | 105 ++++++++++++++++++++++++++++++++++++++ > 2 files changed, 128 insertions(+), 0 deletions(-) > create mode 100644 pp/xslt/opreport-denormalize.xsl > > diff --git a/pp/Makefile.am b/pp/Makefile.am > index 1436473..adb34e9 100644 > --- a/pp/Makefile.am > +++ b/pp/Makefile.am > @@ -43,3 +43,26 @@ oparchive_SOURCES = oparchive.cpp \ > oparchive_options.h oparchive_options.cpp \ > $(pp_common) > oparchive_LDADD = $(common_libs) > + > +xslt_files = \ > + xslt/opreport-denormalize.xsl > + > +install-data-local: > + for i in ${xslt_files} ; do \ > + dir=`dirname $$i` ; \ > + mkdir -p $(DESTDIR)$(pkgdatadir)/$$dir ; \ > + $(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)$(pkgdatadir)/$$i ; \ > + done > + > +uninstall-local: > + for i in ${xslt_files} ; do \ > + dir=`dirname $$i` ; \ > + if test -f $(DESTDIR)$(pkgdatadir)/$$i ; then \ > + rm $(DESTDIR)$(pkgdatadir)/$$i ; \ > + fi; \ > + if test -d $(DESTDIR)$(pkgdatadir)/$$dir ; then \ > + rmdir --ignore-fail-on-non-empty $(DESTDIR)$(pkgdatadir)/$$dir ; \ > + fi; \ > + done > + > +EXTRA_DIST = $(xslt_files) > diff --git a/pp/xslt/opreport-denormalize.xsl b/pp/xslt/opreport-denormalize.xsl > new file mode 100644 > index 0000000..8437827 > --- /dev/null > +++ b/pp/xslt/opreport-denormalize.xsl > @@ -0,0 +1,105 @@ > +<xsl:stylesheet version="1.0" > +xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> > + > +<xsl:key name="get_class" match="class" use="@name" /> > +<xsl:key name="get_event" match="eventsetup" use="@id" /> > +<xsl:key name="get_symbol" match="symboldata" use="@id" /> > + > +<xsl:template match="/"> > + > +<xsl:text>schemaversion: </xsl:text><xsl:value-of select="profile/@schemaversion"/><xsl:text>
</xsl:text> > +<xsl:text>cputype : </xsl:text><xsl:value-of select="profile/@cputype"/><xsl:text>
</xsl:text> > +<xsl:text>processor : </xsl:text><xsl:value-of select="profile/@processor"/><xsl:text>
</xsl:text> > +<xsl:text>separatedcpus: </xsl:text><xsl:value-of select="profile/@separatedcpus"/><xsl:text>
</xsl:text> > +<xsl:text>mhz : </xsl:text><xsl:value-of select="profile/@mhz"/><xsl:text>
</xsl:text> > +<xsl:text>title : </xsl:text><xsl:value-of select="profile/@title"/><xsl:text>
</xsl:text> > +<xsl:text>
</xsl:text> > + > +<xsl:for-each select="profile/binary"> > + > +<xsl:for-each select="count"> > +<xsl:apply-templates select="key('get_class', @class)"/> > +<xsl:text>	</xsl:text> > +<xsl:value-of select="../@name"/> > +<xsl:text>	</xsl:text> > +<xsl:text>(mod)	</xsl:text> > +<xsl:text>(sym)	</xsl:text> > +<xsl:number value="."/> > +<xsl:text>
</xsl:text> > +</xsl:for-each> > + > +<xsl:for-each select="symbol"> > + > +<xsl:for-each select="count"> > +<xsl:apply-templates select="key('get_class', @class)"/> > +<xsl:text>	</xsl:text> > +<xsl:value-of select="../../@name"/> > +<xsl:text>	</xsl:text> > +<xsl:text>(mod)	</xsl:text> > +<xsl:apply-templates select="key('get_symbol', ../@idref)"/> > +<xsl:text>	</xsl:text> > +<xsl:number value="."/> > +<xsl:text>
</xsl:text> > +</xsl:for-each> > + > +</xsl:for-each> > + > +<xsl:for-each select="module"> > + > +<xsl:for-each select="count"> > +<xsl:apply-templates select="key('get_class', @class)"/> > +<xsl:text>	</xsl:text> > +<xsl:value-of select="../../@name"/> > +<xsl:text>	</xsl:text> > +<xsl:value-of select="../@name"/> > +<xsl:text>	</xsl:text> > +<xsl:text>(sym)	</xsl:text> > +<xsl:number value="."/> > +<xsl:text>
</xsl:text> > +</xsl:for-each> > + > +<xsl:for-each select="symbol"> > + > +<xsl:for-each select="count"> > +<xsl:apply-templates select="key('get_class', @class)"/> > +<xsl:text>	</xsl:text> > +<xsl:value-of select="../../../@name"/> > +<xsl:text>	</xsl:text> > +<xsl:value-of select="../../@name"/> > +<xsl:text>	</xsl:text> > +<xsl:apply-templates select="key('get_symbol', ../@idref)"/> > +<xsl:text>	</xsl:text> > +<xsl:number value="."/> > +<xsl:text>
</xsl:text> > +</xsl:for-each> > + > +</xsl:for-each> > + > +</xsl:for-each> > + > +</xsl:for-each> > + > +</xsl:template> > + > +<xsl:template match="class"> > +<xsl:apply-templates select="key('get_event', @event)"/> > +<xsl:text>	</xsl:text> > +<xsl:value-of select="@cpu"/> > +</xsl:template> > + > +<xsl:template match="eventsetup"> > +<xsl:value-of select="@eventname"/> > +<xsl:text>	</xsl:text> > +<xsl:value-of select="@unitmask"/> > +<xsl:text>	</xsl:text> > +<xsl:value-of select="@setupcount"/> > +</xsl:template> > + > +<xsl:template match="symboldata"> > +<xsl:value-of select="@name"/> > +<xsl:text>(</xsl:text> > +<xsl:value-of select="@startingaddr"/> > +<xsl:text>)</xsl:text> > +</xsl:template> > + > +</xsl:stylesheet> |
From: Robert R. <rob...@am...> - 2008-11-18 09:33:26
|
On 17.11.08 16:53:33, Maynard Johnson wrote: > Robert Richter wrote: > > This adds an xsl script allowing the creation of one event per line > > dumps with opreport. The dump is usefull to get text formated output > > of all the data in the sampling buffer. The script is installed in the > > /usr/share/oprofile/xslt directory. > I'll admit to being pretty clueless about xslt. But I couldn't get this patch to give me any output. Would this be depdendent on some particular version of xsltproce Can you paste in an example of what the output looks like? What exactly can you get from this that you can't get from a text report? The script converts xml into a raw text dump without summarizing or postprocessing the data. See below. -Robert # opreport -X 2> /dev/null | xsltproc /usr/share/oprofile/xslt/opreport-denormalize.xsl - <?xml version="1.0"?> schemaversion: 2.0 cputype : x86-64 processor : family10 separatedcpus: mhz : 2100.00 title : opreport -X /bin/bash (mod) (sym) 220 /bin/bash (mod) /bin/bash(00000000) 220 /bin/cat (mod) (sym) 1 /bin/cat (mod) /bin/cat(00000000) 1 /bin/dirname (mod) (sym) 1 /bin/dirname (mod) /bin/dirname(00000000) 1 /bin/expr (mod) (sym) 1 /bin/expr (mod) /bin/expr(00000000) 1 /bin/gawk-3.1.5 (mod) (sym) 6 /bin/gawk-3.1.5 (mod) /bin/gawk-3.1.5(00000000) 6 /bin/grep (mod) (sym) 6 /bin/grep (mod) /bin/grep(00000000) 6 /lib64/ld-2.6.1.so (mod) (sym) 111 /lib64/ld-2.6.1.so (mod) /lib64/ld-2.6.1.so(00000000) 111 /lib64/libc-2.6.1.so (mod) (sym) 356 /lib64/libc-2.6.1.so (mod) /lib64/libc-2.6.1.so(00000000) 356 /lib64/libdl-2.6.1.so (mod) (sym) 2 /lib64/libdl-2.6.1.so (mod) /lib64/libdl-2.6.1.so(00000000) 2 /lib64/libm-2.6.1.so (mod) (sym) 1 /lib64/libm-2.6.1.so (mod) /lib64/libm-2.6.1.so(00000000) 1 /usr/lib64/libpopt.so.0.0.0 (mod) (sym) 1 /usr/lib64/libpopt.so.0.0.0 (mod) /usr/lib64/libpopt.so.0.0.0(00000000) 1 /no-vmlinux (mod) (sym) 8746 /no-vmlinux (mod) /no-vmlinux(00000000) 8746 /usr/sbin/ntpd (mod) (sym) 1 /usr/sbin/ntpd (mod) /usr/sbin/ntpd(00000000) 1 /usr/bin/ophelp (mod) (sym) 1 /usr/bin/ophelp (mod) main(00401630) 1 /usr/bin/oprofiled (mod) (sym) 26 /usr/bin/oprofiled (mod) opd_put_sample(00404bf0) 6 /usr/bin/oprofiled (mod) sfile_find(00403860) 5 /usr/bin/oprofiled (mod) opd_process_samples(00405150) 3 /usr/bin/oprofiled (mod) odb_update_node_with_offset(0040a640) 2 /usr/bin/oprofiled (mod) pop_buffer_value(00404b50) 2 /usr/bin/oprofiled (mod) code_ctx_switch(00404e20) 1 /usr/bin/oprofiled (mod) get_file(00403e20) 1 /usr/bin/oprofiled (mod) odb_grow_hashtable(0040a120) 1 /usr/bin/oprofiled (mod) odb_init(0040a210) 1 /usr/bin/oprofiled (mod) op_mangle_filename(0040c000) 1 /usr/bin/oprofiled (mod) sfile_get(00403810) 1 /usr/bin/oprofiled (mod) sfile_log_sample_count(004041e0) 1 /usr/bin/oprofiled (mod) sfile_put(00403830) 1 /usr/sbin/sshd (mod) (sym) 1 /usr/sbin/sshd (mod) /usr/sbin/sshd(00000000) 1 # opreport -X warning: /no-vmlinux could not be found. <?xml version="1.0" ?> <profile schemaversion="2.0" cputype="x86-64" processor="family10" mhz="2100.00" title="opreport -X "> <options /> <setup> <eventsetup id="0" eventname="CPU_CLK_UNHALTED" unitmask="0" setupcount="100000"/> </setup> <binary name="/bin/bash"> <count> 220</count> <symbol idref="0"> <count> 220</count> </symbol> </binary> <binary name="/bin/cat"> <count> 1</count> <symbol idref="1"> <count> 1</count> </symbol> </binary> <binary name="/bin/dirname"> <count> 1</count> <symbol idref="2"> <count> 1</count> </symbol> </binary> <binary name="/bin/expr"> <count> 1</count> <symbol idref="3"> <count> 1</count> </symbol> </binary> <binary name="/bin/gawk-3.1.5"> <count> 6</count> <symbol idref="4"> <count> 6</count> </symbol> </binary> <binary name="/bin/grep"> <count> 6</count> <symbol idref="5"> <count> 6</count> </symbol> </binary> <binary name="/lib64/ld-2.6.1.so"> <count> 111</count> <symbol idref="6"> <count> 111</count> </symbol> </binary> <binary name="/lib64/libc-2.6.1.so"> <count> 356</count> <symbol idref="7"> <count> 356</count> </symbol> </binary> <binary name="/lib64/libdl-2.6.1.so"> <count> 2</count> <symbol idref="8"> <count> 2</count> </symbol> </binary> <binary name="/lib64/libm-2.6.1.so"> <count> 1</count> <symbol idref="9"> <count> 1</count> </symbol> </binary> <binary name="/usr/lib64/libpopt.so.0.0.0"> <count> 1</count> <symbol idref="10"> <count> 1</count> </symbol> </binary> <binary name="/no-vmlinux"> <count> 8746</count> <symbol idref="11"> <count> 8746</count> </symbol> </binary> <binary name="/usr/sbin/ntpd"> <count> 1</count> <symbol idref="12"> <count> 1</count> </symbol> </binary> <binary name="/usr/bin/ophelp"> <count> 1</count> <symbol idref="13"> <count> 1</count> </symbol> </binary> <binary name="/usr/bin/oprofiled"> <count> 26</count> <symbol idref="14"> <count> 6</count> </symbol> <symbol idref="15"> <count> 5</count> </symbol> <symbol idref="16"> <count> 3</count> </symbol> <symbol idref="17"> <count> 2</count> </symbol> <symbol idref="18"> <count> 2</count> </symbol> <symbol idref="19"> <count> 1</count> </symbol> <symbol idref="20"> <count> 1</count> </symbol> <symbol idref="21"> <count> 1</count> </symbol> <symbol idref="22"> <count> 1</count> </symbol> <symbol idref="23"> <count> 1</count> </symbol> <symbol idref="24"> <count> 1</count> </symbol> <symbol idref="25"> <count> 1</count> </symbol> <symbol idref="26"> <count> 1</count> </symbol> </binary> <binary name="/usr/sbin/sshd"> <count> 1</count> <symbol idref="27"> <count> 1</count> </symbol> </binary> <symboltable> <symboldata id="0" name="/bin/bash" startingaddr="00000000"/> <symboldata id="1" name="/bin/cat" startingaddr="00000000"/> <symboldata id="2" name="/bin/dirname" startingaddr="00000000"/> <symboldata id="3" name="/bin/expr" startingaddr="00000000"/> <symboldata id="4" name="/bin/gawk-3.1.5" startingaddr="00000000"/> <symboldata id="5" name="/bin/grep" startingaddr="00000000"/> <symboldata id="6" name="/lib64/ld-2.6.1.so" startingaddr="00000000"/> <symboldata id="7" name="/lib64/libc-2.6.1.so" startingaddr="00000000"/> <symboldata id="8" name="/lib64/libdl-2.6.1.so" startingaddr="00000000"/> <symboldata id="9" name="/lib64/libm-2.6.1.so" startingaddr="00000000"/> <symboldata id="10" name="/usr/lib64/libpopt.so.0.0.0" startingaddr="00000000"/> <symboldata id="11" name="/no-vmlinux" startingaddr="00000000"/> <symboldata id="12" name="/usr/sbin/ntpd" startingaddr="00000000"/> <symboldata id="13" name="main" startingaddr="00401630"/> <symboldata id="14" name="opd_put_sample" startingaddr="00404bf0"/> <symboldata id="15" name="sfile_find" startingaddr="00403860"/> <symboldata id="16" name="opd_process_samples" startingaddr="00405150"/> <symboldata id="17" name="odb_update_node_with_offset" startingaddr="0040a640"/> <symboldata id="18" name="pop_buffer_value" startingaddr="00404b50"/> <symboldata id="19" name="code_ctx_switch" startingaddr="00404e20"/> <symboldata id="20" name="get_file" startingaddr="00403e20"/> <symboldata id="21" name="odb_grow_hashtable" startingaddr="0040a120"/> <symboldata id="22" name="odb_init" startingaddr="0040a210"/> <symboldata id="23" name="op_mangle_filename" startingaddr="0040c000"/> <symboldata id="24" name="sfile_get" startingaddr="00403810"/> <symboldata id="25" name="sfile_log_sample_count" startingaddr="004041e0"/> <symboldata id="26" name="sfile_put" startingaddr="00403830"/> <symboldata id="27" name="/usr/sbin/sshd" startingaddr="00000000"/> </symboltable> </profile> # opreport -l warning: /no-vmlinux could not be found. CPU: AMD64 family10, speed 2100 MHz (estimated) Counted CPU_CLK_UNHALTED events (Cycles outside of halt state) with a unit mask of 0x00 (No unit mask) count 100000 samples % app name symbol name 8746 92.2477 no-vmlinux /no-vmlinux 356 3.7549 libc-2.6.1.so /lib64/libc-2.6.1.so 220 2.3204 bash /bin/bash 111 1.1708 ld-2.6.1.so /lib64/ld-2.6.1.so 6 0.0633 gawk-3.1.5 /bin/gawk-3.1.5 6 0.0633 grep /bin/grep 6 0.0633 oprofiled opd_put_sample 5 0.0527 oprofiled sfile_find 3 0.0316 oprofiled opd_process_samples 2 0.0211 libdl-2.6.1.so /lib64/libdl-2.6.1.so 2 0.0211 oprofiled odb_update_node_with_offset 2 0.0211 oprofiled pop_buffer_value 1 0.0105 cat /bin/cat 1 0.0105 dirname /bin/dirname 1 0.0105 expr /bin/expr 1 0.0105 libm-2.6.1.so /lib64/libm-2.6.1.so 1 0.0105 libpopt.so.0.0.0 /usr/lib64/libpopt.so.0.0.0 1 0.0105 ntpd /usr/sbin/ntpd 1 0.0105 ophelp main 1 0.0105 oprofiled code_ctx_switch 1 0.0105 oprofiled get_file 1 0.0105 oprofiled odb_grow_hashtable 1 0.0105 oprofiled odb_init 1 0.0105 oprofiled op_mangle_filename 1 0.0105 oprofiled sfile_get 1 0.0105 oprofiled sfile_log_sample_count 1 0.0105 oprofiled sfile_put 1 0.0105 sshd /usr/sbin/sshd -- Advanced Micro Devices, Inc. Operating System Research Center email: rob...@am... |
From: Maynard J. <may...@us...> - 2008-11-19 18:02:57
|
Robert Richter wrote: > On 17.11.08 16:53:33, Maynard Johnson wrote: >> Robert Richter wrote: >>> This adds an xsl script allowing the creation of one event per line >>> dumps with opreport. The dump is usefull to get text formated output >>> of all the data in the sampling buffer. The script is installed in the >>> /usr/share/oprofile/xslt directory. >> I'll admit to being pretty clueless about xslt. But I couldn't get this patch to give me any output. Would this be depdendent on some particular version of xsltproce Can you paste in an example of what the output looks like? What exactly can you get from this that you can't get from a text report? > > The script converts xml into a raw text dump without summarizing or > postprocessing the data. See below. OK, I got some output now. I didn't realize the "-" at the end of the command was necessary. Still escapes me what that's for. But I'm still wondering what the intended use is for this patch. The output below seems pretty unintelligible to me. Under what circumstances have you used this and how does it help you analyze a profile? -Maynard > > -Robert > > # opreport -X 2> /dev/null | xsltproc /usr/share/oprofile/xslt/opreport-denormalize.xsl - > <?xml version="1.0"?> > schemaversion: 2.0 > cputype : x86-64 > processor : family10 > separatedcpus: > mhz : 2100.00 > title : opreport -X > > /bin/bash (mod) (sym) 220 > /bin/bash (mod) /bin/bash(00000000) 220 > /bin/cat (mod) (sym) 1 > /bin/cat (mod) /bin/cat(00000000) 1 > /bin/dirname (mod) (sym) 1 > /bin/dirname (mod) /bin/dirname(00000000) 1 > /bin/expr (mod) (sym) 1 > /bin/expr (mod) /bin/expr(00000000) 1 > /bin/gawk-3.1.5 (mod) (sym) 6 > /bin/gawk-3.1.5 (mod) /bin/gawk-3.1.5(00000000) 6 > /bin/grep (mod) (sym) 6 > /bin/grep (mod) /bin/grep(00000000) 6 > /lib64/ld-2.6.1.so (mod) (sym) 111 > /lib64/ld-2.6.1.so (mod) /lib64/ld-2.6.1.so(00000000) 111 > /lib64/libc-2.6.1.so (mod) (sym) 356 > /lib64/libc-2.6.1.so (mod) /lib64/libc-2.6.1.so(00000000) 356 > /lib64/libdl-2.6.1.so (mod) (sym) 2 > /lib64/libdl-2.6.1.so (mod) /lib64/libdl-2.6.1.so(00000000) 2 > /lib64/libm-2.6.1.so (mod) (sym) 1 > /lib64/libm-2.6.1.so (mod) /lib64/libm-2.6.1.so(00000000) 1 > /usr/lib64/libpopt.so.0.0.0 (mod) (sym) 1 > /usr/lib64/libpopt.so.0.0.0 (mod) /usr/lib64/libpopt.so.0.0.0(00000000) 1 > /no-vmlinux (mod) (sym) 8746 > /no-vmlinux (mod) /no-vmlinux(00000000) 8746 > /usr/sbin/ntpd (mod) (sym) 1 > /usr/sbin/ntpd (mod) /usr/sbin/ntpd(00000000) 1 > /usr/bin/ophelp (mod) (sym) 1 > /usr/bin/ophelp (mod) main(00401630) 1 > /usr/bin/oprofiled (mod) (sym) 26 > /usr/bin/oprofiled (mod) opd_put_sample(00404bf0) 6 > /usr/bin/oprofiled (mod) sfile_find(00403860) 5 > /usr/bin/oprofiled (mod) opd_process_samples(00405150) 3 > /usr/bin/oprofiled (mod) odb_update_node_with_offset(0040a640) 2 > /usr/bin/oprofiled (mod) pop_buffer_value(00404b50) 2 > /usr/bin/oprofiled (mod) code_ctx_switch(00404e20) 1 > /usr/bin/oprofiled (mod) get_file(00403e20) 1 > /usr/bin/oprofiled (mod) odb_grow_hashtable(0040a120) 1 > /usr/bin/oprofiled (mod) odb_init(0040a210) 1 > /usr/bin/oprofiled (mod) op_mangle_filename(0040c000) 1 > /usr/bin/oprofiled (mod) sfile_get(00403810) 1 > /usr/bin/oprofiled (mod) sfile_log_sample_count(004041e0) 1 > /usr/bin/oprofiled (mod) sfile_put(00403830) 1 > /usr/sbin/sshd (mod) (sym) 1 > /usr/sbin/sshd (mod) /usr/sbin/sshd(00000000) 1 > > # opreport -X > warning: /no-vmlinux could not be found. > <?xml version="1.0" ?> > <profile schemaversion="2.0" cputype="x86-64" > processor="family10" > mhz="2100.00" > title="opreport -X "> > <options /> > <setup> > <eventsetup id="0" eventname="CPU_CLK_UNHALTED" unitmask="0" setupcount="100000"/> > </setup> > > <binary name="/bin/bash"> > <count> > 220</count> > <symbol idref="0"> > <count> > 220</count> > </symbol> > </binary> > <binary name="/bin/cat"> > <count> > 1</count> > <symbol idref="1"> > <count> > 1</count> > </symbol> > </binary> > <binary name="/bin/dirname"> > <count> > 1</count> > <symbol idref="2"> > <count> > 1</count> > </symbol> > </binary> > <binary name="/bin/expr"> > <count> > 1</count> > <symbol idref="3"> > <count> > 1</count> > </symbol> > </binary> > <binary name="/bin/gawk-3.1.5"> > <count> > 6</count> > <symbol idref="4"> > <count> > 6</count> > </symbol> > </binary> > <binary name="/bin/grep"> > <count> > 6</count> > <symbol idref="5"> > <count> > 6</count> > </symbol> > </binary> > <binary name="/lib64/ld-2.6.1.so"> > <count> > 111</count> > <symbol idref="6"> > <count> > 111</count> > </symbol> > </binary> > <binary name="/lib64/libc-2.6.1.so"> > <count> > 356</count> > <symbol idref="7"> > <count> > 356</count> > </symbol> > </binary> > <binary name="/lib64/libdl-2.6.1.so"> > <count> > 2</count> > <symbol idref="8"> > <count> > 2</count> > </symbol> > </binary> > <binary name="/lib64/libm-2.6.1.so"> > <count> > 1</count> > <symbol idref="9"> > <count> > 1</count> > </symbol> > </binary> > <binary name="/usr/lib64/libpopt.so.0.0.0"> > <count> > 1</count> > <symbol idref="10"> > <count> > 1</count> > </symbol> > </binary> > <binary name="/no-vmlinux"> > <count> > 8746</count> > <symbol idref="11"> > <count> > 8746</count> > </symbol> > </binary> > <binary name="/usr/sbin/ntpd"> > <count> > 1</count> > <symbol idref="12"> > <count> > 1</count> > </symbol> > </binary> > <binary name="/usr/bin/ophelp"> > <count> > 1</count> > <symbol idref="13"> > <count> > 1</count> > </symbol> > </binary> > <binary name="/usr/bin/oprofiled"> > <count> > 26</count> > <symbol idref="14"> > <count> > 6</count> > </symbol> > <symbol idref="15"> > <count> > 5</count> > </symbol> > <symbol idref="16"> > <count> > 3</count> > </symbol> > <symbol idref="17"> > <count> > 2</count> > </symbol> > <symbol idref="18"> > <count> > 2</count> > </symbol> > <symbol idref="19"> > <count> > 1</count> > </symbol> > <symbol idref="20"> > <count> > 1</count> > </symbol> > <symbol idref="21"> > <count> > 1</count> > </symbol> > <symbol idref="22"> > <count> > 1</count> > </symbol> > <symbol idref="23"> > <count> > 1</count> > </symbol> > <symbol idref="24"> > <count> > 1</count> > </symbol> > <symbol idref="25"> > <count> > 1</count> > </symbol> > <symbol idref="26"> > <count> > 1</count> > </symbol> > </binary> > <binary name="/usr/sbin/sshd"> > <count> > 1</count> > <symbol idref="27"> > <count> > 1</count> > </symbol> > </binary> > <symboltable> > <symboldata id="0" name="/bin/bash" startingaddr="00000000"/> > <symboldata id="1" name="/bin/cat" startingaddr="00000000"/> > <symboldata id="2" name="/bin/dirname" startingaddr="00000000"/> > <symboldata id="3" name="/bin/expr" startingaddr="00000000"/> > <symboldata id="4" name="/bin/gawk-3.1.5" startingaddr="00000000"/> > <symboldata id="5" name="/bin/grep" startingaddr="00000000"/> > <symboldata id="6" name="/lib64/ld-2.6.1.so" startingaddr="00000000"/> > <symboldata id="7" name="/lib64/libc-2.6.1.so" startingaddr="00000000"/> > <symboldata id="8" name="/lib64/libdl-2.6.1.so" startingaddr="00000000"/> > <symboldata id="9" name="/lib64/libm-2.6.1.so" startingaddr="00000000"/> > <symboldata id="10" name="/usr/lib64/libpopt.so.0.0.0" startingaddr="00000000"/> > <symboldata id="11" name="/no-vmlinux" startingaddr="00000000"/> > <symboldata id="12" name="/usr/sbin/ntpd" startingaddr="00000000"/> > <symboldata id="13" name="main" startingaddr="00401630"/> > <symboldata id="14" name="opd_put_sample" startingaddr="00404bf0"/> > <symboldata id="15" name="sfile_find" startingaddr="00403860"/> > <symboldata id="16" name="opd_process_samples" startingaddr="00405150"/> > <symboldata id="17" name="odb_update_node_with_offset" startingaddr="0040a640"/> > <symboldata id="18" name="pop_buffer_value" startingaddr="00404b50"/> > <symboldata id="19" name="code_ctx_switch" startingaddr="00404e20"/> > <symboldata id="20" name="get_file" startingaddr="00403e20"/> > <symboldata id="21" name="odb_grow_hashtable" startingaddr="0040a120"/> > <symboldata id="22" name="odb_init" startingaddr="0040a210"/> > <symboldata id="23" name="op_mangle_filename" startingaddr="0040c000"/> > <symboldata id="24" name="sfile_get" startingaddr="00403810"/> > <symboldata id="25" name="sfile_log_sample_count" startingaddr="004041e0"/> > <symboldata id="26" name="sfile_put" startingaddr="00403830"/> > <symboldata id="27" name="/usr/sbin/sshd" startingaddr="00000000"/> > </symboltable> > </profile> > # opreport -l > warning: /no-vmlinux could not be found. > CPU: AMD64 family10, speed 2100 MHz (estimated) > Counted CPU_CLK_UNHALTED events (Cycles outside of halt state) with a unit mask of 0x00 (No unit mask) count 100000 > samples % app name symbol name > 8746 92.2477 no-vmlinux /no-vmlinux > 356 3.7549 libc-2.6.1.so /lib64/libc-2.6.1.so > 220 2.3204 bash /bin/bash > 111 1.1708 ld-2.6.1.so /lib64/ld-2.6.1.so > 6 0.0633 gawk-3.1.5 /bin/gawk-3.1.5 > 6 0.0633 grep /bin/grep > 6 0.0633 oprofiled opd_put_sample > 5 0.0527 oprofiled sfile_find > 3 0.0316 oprofiled opd_process_samples > 2 0.0211 libdl-2.6.1.so /lib64/libdl-2.6.1.so > 2 0.0211 oprofiled odb_update_node_with_offset > 2 0.0211 oprofiled pop_buffer_value > 1 0.0105 cat /bin/cat > 1 0.0105 dirname /bin/dirname > 1 0.0105 expr /bin/expr > 1 0.0105 libm-2.6.1.so /lib64/libm-2.6.1.so > 1 0.0105 libpopt.so.0.0.0 /usr/lib64/libpopt.so.0.0.0 > 1 0.0105 ntpd /usr/sbin/ntpd > 1 0.0105 ophelp main > 1 0.0105 oprofiled code_ctx_switch > 1 0.0105 oprofiled get_file > 1 0.0105 oprofiled odb_grow_hashtable > 1 0.0105 oprofiled odb_init > 1 0.0105 oprofiled op_mangle_filename > 1 0.0105 oprofiled sfile_get > 1 0.0105 oprofiled sfile_log_sample_count > 1 0.0105 oprofiled sfile_put > 1 0.0105 sshd /usr/sbin/sshd > > |
From: Robert R. <rob...@am...> - 2008-11-20 10:06:56
|
On 19.11.08 12:03:07, Maynard Johnson wrote: > Robert Richter wrote: > > On 17.11.08 16:53:33, Maynard Johnson wrote: > >> Robert Richter wrote: > >>> This adds an xsl script allowing the creation of one event per line > >>> dumps with opreport. The dump is usefull to get text formated output > >>> of all the data in the sampling buffer. The script is installed in the > >>> /usr/share/oprofile/xslt directory. > >> I'll admit to being pretty clueless about xslt. But I couldn't get this patch to give me any output. Would this be depdendent on some particular version of xsltproce Can you paste in an example of what the output looks like? What exactly can you get from this that you can't get from a text report? > > > > The script converts xml into a raw text dump without summarizing or > > postprocessing the data. See below. > OK, I got some output now. I didn't realize the "-" at the end of the command was necessary. Still escapes me what that's for. This is the filename for stdin. > But I'm still wondering what the intended use is for this patch. The output below seems pretty unintelligible to me. Under what circumstances have you used this and how does it help you analyze a profile? This is a raw dump of the event buffer. You get all the data that is available as a text dump. This could be used for postprocessing on the commmand line (sed, awk, grep, ...). Otherwise you would have to look directly into the sample files. There was no option in opreport for this. opreport does not have an option showing everything in the sampling files text formated. Instead of implementing this option I used xsl for this, allowing a user to modify the output easily without recompling opreport. -Robert -- Advanced Micro Devices, Inc. Operating System Research Center email: rob...@am... |
From: Maynard J. <may...@us...> - 2008-11-21 17:02:54
|
Robert Richter wrote: > On 19.11.08 12:03:07, Maynard Johnson wrote: >> Robert Richter wrote: >>> On 17.11.08 16:53:33, Maynard Johnson wrote: >>>> Robert Richter wrote: >>>>> This adds an xsl script allowing the creation of one event per line >>>>> dumps with opreport. The dump is usefull to get text formated output >>>>> of all the data in the sampling buffer. The script is installed in the >>>>> /usr/share/oprofile/xslt directory. >>>> I'll admit to being pretty clueless about xslt. But I couldn't get this patch to give me any output. Would this be depdendent on some particular version of xsltproce Can you paste in an example of what the output looks like? What exactly can you get from this that you can't get from a text report? >>> The script converts xml into a raw text dump without summarizing or >>> postprocessing the data. See below. >> OK, I got some output now. I didn't realize the "-" at the end of the command was necessary. Still escapes me what that's for. > > This is the filename for stdin. > >> But I'm still wondering what the intended use is for this patch. The output below seems pretty unintelligible to me. Under what circumstances have you used this and how does it help you analyze a profile? > > This is a raw dump of the event buffer. You get all the data that is > available as a text dump. This could be used for postprocessing on the > commmand line (sed, awk, grep, ...). Otherwise you would have to look > directly into the sample files. There was no option in opreport for > this. opreport does not have an option showing everything in the > sampling files text formated. Instead of implementing this option I > used xsl for this, allowing a user to modify the output easily without > recompling opreport. OK, evidently, you've found this to be a useful tool. I would like to hear from the broader oprofile community if there's interest in pulling this style sheet into oprofile source. For those who are interested, is there consensus that your style sheet is sufficient? Perhaps we could start off by posting the style sheet on the oprofile website, and ask those who visit the page to post their feedback. Does that sound reasonable? Thanks. -Maynard > > -Robert > |