From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Petlan Subject: Re: Oprofile Report Date: Thu, 23 Mar 2017 15:38:03 +0100 (CET) Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; BOUNDARY="571107841-2014297750-1490279885=:19588" Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" To: dhara buch Cc: xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --571107841-2014297750-1490279885=:19588 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8BIT On Thu, 23 Mar 2017, dhara buch wrote: > Hello, > I am doing profiling with command,  > > operf ./test --events=BR_INST_RETIRED > where test.c is a simple c language file.  > > then, I am trying to collect information with command >   > opreport --symbols --debug-info > > From the documents of Oprofile, I assume that the above command lists profiling result as per the symbols i.e. I can get result showing samples, linear info, image name and symbol name. > > As per my command I expect my file name (test.c) to be in the linear info and image name, but shows [no location information] in linear info. The filename does not get listed in image > name also.  > > What is lacking? Hi, I think you need to rebuild the test with '-g' switch. If the test binary does not have debuginfo, opreport cannot resolve that. Me trying with debuginfo: samples % linenr info image name symbol name 10 66.6667 (no location information) no-vmlinux /no-vmlinux 2 13.3333 exact_counts.c:13 exact_counts main 1 6.6667 exact_counts.c:10 exact_counts f_65535x 1 6.6667 exact_counts.c:9 exact_counts f_997x 1 6.6667 (no location information) ld-2.17.so _dl_fini And without: samples % linenr info image name symbol name 10 55.5556 (no location information) no-vmlinux /no-vmlinux 3 16.6667 (no location information) exact_counts f_65535x 2 11.1111 (no location information) exact_counts main 1 5.5556 (no location information) ld-2.17.so _dl_add_to_slotinfo 1 5.5556 (no location information) ld-2.17.so _dl_next_tls_modid 1 5.5556 (no location information) ld-2.17.so _dl_relocate_object Is this the problem you are asking about? > > I tried to set vmlinux with operf --vmlinux option also where vmlinux file in in /usr/lib/debug/lib/4*/vmlinux, still the above commands do not list test file entries. The "--vmlinux" option is there for enabling this for samples obtained in kernelspace. By default (assuming you have no kernel debuginfo available), operf marks all the samples taken in kernel (e.g. your program called a syscall and the sample was taken when the syscall was being executed or you profile systemwide) as "no-vmlinux". This is sufficient if you care about userspace only and not about the "time" spent in kernel. If you care about kernelspace, you need the '--vmlinux' option with correct path specified. > > What is lacking? > > Thank you, > > Dhara buch > > Has this helped? Cheers, Michael > --571107841-2014297750-1490279885=:19588 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KWGVuLWRldmVs IG1haWxpbmcgbGlzdApYZW4tZGV2ZWxAbGlzdHMueGVuLm9yZwpodHRwczovL2xpc3RzLnhlbi5v cmcveGVuLWRldmVsCg== --571107841-2014297750-1490279885=:19588--