Thread: Oprofile with postgresql

Oprofile with postgresql

From
"崔岩ccuiyyan@sina.com"
Date:
<div dir="ltr">Hi all:<br /><br />      Recently i do a test of postgresql. To get more information of the functions in
PostgreSQL,i use<br /> <br />opgprof and opannotate, which are two tools in Oprofile. But i can't work with the tools
correctly.<br /><br />PostgreSQL is compiled with -g option and the errors are like this:<br /><br /> opgprof error:
parse_filename()invalid filename:
/var/lib/oprofile/samples/current/{root}/var/lib/oprofile/samples/current/{root}/home/ubuntu/tpcc-uva/bin/tm/{dep}/{anon:[vdso]}/7208.0x7fff7a972000.0x7fff7a974000/CPU_CLK_UNHALTED.90000.0.all.all.all/{dep}/{root}/var/lib/oprofile/samples/current/{root}/home/ubuntu/tpcc-uva/bin/tm/{dep}/{anon:[vdso]}/7208.0x7fff7a972000.0x7fff7a974000/CPU_CLK_UNHALTED.90000.0.all.all.all/{cg}/{root}/usr/bin/oprofiled/CPU_CLK_UNHALTED.90000.0.all.all.all<br
/><br/>and opannotate<br /><br />warning: [heap] (tgid:7302 range:0x8e7000-0xa18000) could not be found.<br />warning:
[vdso](tgid:7295 range:0x7fff3ddfe000-0x7fff3de00000) could not be found.<br />warning: [vdso] (tgid:7296
range:0x7fff3ddfe000-0x7fff3de00000)could not be found.<br /> warning: [vdso] (tgid:7297
range:0x7fff3ddfe000-0x7fff3de00000)could not be found.<br />warning: [vdso] (tgid:7298
range:0x7fff3ddfe000-0x7fff3de00000)could not be found.<br />warning: [vdso] (tgid:7299
range:0x7fff3ddfe000-0x7fff3de00000)could not be found.<br /> warning: [vdso] (tgid:7300
range:0x7fff3ddfe000-0x7fff3de00000)could not be found.<br />warning: [vdso] (tgid:7301
range:0x7fff3ddfe000-0x7fff3de00000)could not be found.<br />warning: [vdso] (tgid:7302
range:0x7fff3ddfe000-0x7fff3de00000)could not be found.<br /> opannotate (warning): unable to open for reading:
aset.c<br/>opannotate (warning): unable to open for reading: heaptuple.c<br />opannotate (warning): unable to open for
reading:bufmgr.c<br />opannotate (warning): unable to open for reading: execQual.c<br /> opannotate (warning): unable
toopen for reading: list.c<br />opannotate (warning): unable to open for reading: nbtree.c<br />opannotate (warning):
unableto open for reading: fmgr.c<br />opannotate (warning): unable to open for reading: catcache.c<br /> opannotate
(warning):unable to open for reading: nodeIndexscan.c<br />opannotate (warning): unable to open for reading:
clauses.c<br/>opannotate (warning): unable to open for reading: ri_triggers.c<br />opannotate (warning): unable to open
forreading: lock.c<br /> opannotate (warning): unable to open for reading: planner.c<br />opannotate (warning): unable
toopen for reading: selfuncs.c<br />opannotate (warning): unable to open for reading: postgres.c<br />opannotate
(warning):unable to open for reading: trigger.c<br /> ...<br /><br /><br />if i want to use the two tools on PostgreSQL
,what should i do?<br /><br /><br />                                                    Best wishes<br /><br
/>                                                     Yyan<br /></div> 

Re: Oprofile with postgresql

From
Tom Lane
Date:
"崔岩ccuiyyan@sina.com" <ccuiyyan@gmail.com> writes:
> Hi all:
>       Recently i do a test of postgresql. To get more information of the
> functions in PostgreSQL, i use

> opgprof and opannotate, which are two tools in Oprofile. But i can't work
> with the tools correctly.

I think you need to read the oprofile documentation a bit more and
possibly contact an oprofile mailing list for help.  This isn't a
Postgres-related question.

FWIW, I've used oprofile many times with postgres; it works as expected.
I'd be the first to agree it's got a steep learning curve though.
        regards, tom lane