Re: Clarification on support of arm32 with kernel4.1 for oprofile 1.2.0

Michael Petlan <[email protected]>
Newsgroups gmane.linux.oprofile
Message-ID <alpine.LRH.2.20.1804060003250.14033@Diego>
Hi.

The error you're facing means the following:

   "In the sample dir there appear to be no samples for /bin/abc."

That may happen for several reasons. Let's try to narrow the problem down.

1) What does simple "./opreport" print? Does it print any other samples?

--> YES: Everything is OK, just /bin/abc was not hit during profiling.
----> Should /bin/abc be hit? I.e. is it expected to be a heavy load considering
      the used event (*)?
------> YES: Try to profile only /bin/abc (in case you profiled system-wide).
------>      Try to run `ocount /bin/abc` using the same event. This should give
             you much bigger number than the "count" of the event you use for
             profiling (**)
------> NO:  You might try to use different event or decrease the used count (**).

--> NO:  No samples were found, no samples were recorded at all. Try to run ocount
         against the same load with the same event. Does it produce any reasonable
         results?
----> YES: Could the problem be in (**)?
----> NO:  OK, so the event does not get hit at all. What is the event you use?
           Should it be even hit (see (*))? Could it be hit under a different load?
------> If the event should be hit and cannot, it might be a bug in kernel, oprofile
        or even in hardware...

This is just a crossroads that might help you narrowing down the issue. If you provide
more info, e.g. what had been the operf command line before you ran the `opreport`?
(Was there any? If not, you have to do the profiling first!). Which event do you use?
What is the /bin/abc? What is the listing of /lib/oprofile/bin/oprofile_data/samples/
(do `find /lib/oprofile/bin/oprofile_data/samples/ > samples_tree.log` and share the
samples_tree.log file)? Etc. ...

Without further info I cannot help more.

Cheers,
Michael


(*) I.e. an app doing lots of computations should produce lots of "CPU_CLK_UNHALTED"
event occurrences, however, possibly just very little LLC cache misses... Especially,
if you profile system-wide, it might be well understandable why some program is not
even hit.

(**) E.g. I have an event CPU_CLK_UNHALTED which has let's say counter 100000. That
means that when profiling, every 100000th event hit results in a sample taken. Let's
suppose that my app needs 25000 CPU cycles to run (it is some simple app). For such
an app, it is very probable that it won't get hit by any sample when profiled. This
is not necessarily your case, just a possible explanation. You didn't provide any
more concrete info, so I am just guessing.

On Thu, 5 Apr 2018, Vinoth Natarajan wrote:
> Hello Team,
> opreport on oprofile-1.2.0 is throwing the following error.
> 
> ./opreport -l /bin/abc
> 
> Using /lib/oprofile/bin/oprofile_data/samples/ for samples directory.
> 
> error: no sample files found: profile specification too strict ?
> 
> 
> same was working fine in  oprofile-0.9.9.
> 
> 
> I have added all the dependencies and kernel configs .
> 
> Please share your thoughts on this.
> 
> 
> Thanks and Regards,
> 
> Vinoth Natarajan.
> 
> 
> 
> On Tue, Mar 20, 2018 at 9:44 PM, Michael Petlan <[email protected]> wrote:
>       Hi Vinoth!
> 
>       This looks good, your machine's PMU and kernel seems to be OK.
> 
>       You need to do `make install` to have all the sub-tools installed
>       in $PATH. Your operf wants to run `ophelp` to find the default
>       event to be used. It does not find it in path, so it fails. I'd
>       recommend to do the full installation process. You can specify
>       various things to ./configure (target prefixes, etc.).
> 
>       Cheers,
>       Michael
> 
>       On Tue, 20 Mar 2018, Vinoth Natarajan wrote:
>       > Hello Michael,
>       >
>       > Good Day!!!
>       >
>       > Tried running the oprofile-1.2.0 on different ARM hardware which supports PMU.
>       > But when we try to run operf binary,it show the following error.
>       >
>       > # ./operf --system-wide
>       > sh: /home/oprofile/bin/ophelp: not found
>       > Unable to find info for event CPU_CYCLES
>       > I have tried in internet about this error, No luck.
>       > Could you please let us know about this error.
>       >
>       > Note :-
>       > Following are the kernel configs related to PERF enabled on this 4.1 kernel.
>       > CONFIG_HAVE_PERF_EVENTS=y
>       > CONFIG_PERF_USE_VMALLOC=y
>       > CONFIG_PERF_EVENTS=y
>       > # CONFIG_DEBUG_PERF_USE_VMALLOC is not set
>       > CONFIG_HAVE_PERF_REGS=y
>       > CONFIG_HAVE_PERF_USER_STACK_DUMP=y
>       > # CONFIG_PCIEASPM_PERFORMANCE is not set
>       > CONFIG_HW_PERF_EVENTS=y
>       >
>       >
>       > Code given from you is able to get the expected output from the new hardware.
>       >
>       > ioctl(fd, PERF_EVENT_IOC_RESET, 0);
>       > ioctl(fd, PERF_EVENT_IOC_ENABLE, 0);
>       >
>       > printf("Measuring instruction count for this printf\n");
>       >
>       > ioctl(fd, PERF_EVENT_IOC_DISABLE, 0);
>       > read(fd, &count, sizeof(long long));
>       >
>       > printf("Used %lld instructions\n", count);
>       > # ./hello_test_oprofile.o
>       > Measuring instruction count for this printf
>       > Used 3660 instructions
>       >
>       > On Tue, Feb 20, 2018 at 11:11 AM, Vinoth Natarajan <[email protected]> wrote:
>       >       Hello Michael,
>       > Thanks so much for your valuable support.
>       >
>       > For time being am planning to use oprofile-0.9.9 version itself.
>       > Could you please share the test cases you have used to test the oprofile functionalities to its full potential.
>       >
>       > Kindly share all the test cases you have used, so that i dont miss on any test case/functionality of oprofile while i test.
>       >
>       > Thanks in advance!!!
>       >
>       > Thanks and Regards,
>       > Vinoth Natarajan.
>       >
> 
> 
> 
>

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot

_______________________________________________
oprofile-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/oprofile-list
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.