Re: opreport error: No sample file found

William Cohen <[email protected]> Tue, 24 Sep 2019 15:44:11 -0400
Newsgroups gmane.linux.oprofile
Message-ID <[email protected]>
On 9/24/19 3:42 PM, Yectli Huerta wrote:
> Hi,
> > I try to use opreport but it fails because no sample file is created
> when i run the operf command. i know operf works because the
> default, cpu_clk_unhalted, works.

Hi,

OProfile is doing sampling.  The interval of the sample is that number in the event description.  Given the small number of samples for the cpu_clk_unhalted event (4 total) I would expect the br_inst_retired to very small, possibly zero.  It quite possible for the toy "hello world" to get no samples at all for certain hardware events.  You might use ocount to see get an actual count.  It is likely less than the sample interval.

-Will

> 
> [root@localhost ~]# operf --event br_inst_retired:1000000  ./a.out
> Hello World
> operf: Profiler started
> 
> Profiling done.
> [root@localhost ~]# opreport
> Using /root/oprofile_data/samples/ for samples directory.
> opreport error: No sample file found: If using opcontrol for profiling,
> try running 'opcontrol --dump'; otherwise, specify a session containing
> sample files.
> 
> [root@localhost ~]# operf   ./a.out
> Hello World
> operf: Profiler started
> 
> Profiling done.
> [root@localhost ~]# opreport
> Using /root/oprofile_data/samples/ for samples directory.
> CPU: Intel Skylake microarchitecture, speed 3e+06 MHz (estimated)
> Counted cpu_clk_unhalted events () with a unit mask of 0x00 (Core
> cycles when at least one thread on the physical core is not in halt
> state) count 100000
> cpu_clk_unhalt...|
>   samples|      %|
> ------------------
>         4 100.000 a.out
>     cpu_clk_unhalt...|
>       samples|      %|
>     ------------------
>             3 75.0000 no-vmlinux
>             1 25.0000 ld-2.17.so
> [root@localhost ~]#
> 
> could you give me some pointers? thanks
> 
> yah
> 
> 
> _______________________________________________
> oprofile-list mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/oprofile-list
>