Having trouble profiling multiple events for an existing process in ARM CortexA53

Jerry Duan via oprofile-list <[email protected]> Mon, 29 Apr 2019 18:37:00 +0000 (UTC)
Newsgroups gmane.linux.oprofile
Message-ID <[email protected]>
Hi, 
I am trying to use Oprofile (1.3.0) to get some cache miss rate for our application in our platform (ARMv8 CortexA53, kernel 4.9.0, Yocto). It is kind of working now. But, when using operf to profile multiple events for an existing process, it always failed to start profiling by saying the target program is already ended.

$operf  --vmlinux /boot/vmlinux-4.9.0  --events L2D_CACHE:5000:0:1:1,L2D_CACHE_REFILL:5000:0:1:1 -p 3253
events L2D_CACHE:5000:0:1:1,L2D_CACHE_REFILL:5000:0:1:1 -p 3253x /boot/vmlinux-4.9.0  -- 
!!!! No samples collected !!!
The target program/command ended before profiling was started.
operf record init failed
usage: operf [ options ] [ --system-wide | --pid <pid> | [ command [ args ] ] ]
$

Am I doing something wrong? Could someone shed a light for me?

But I don't have any issue if I profile only one event (i.e, L2D_CACHE,L2D_CACHE_WB or L2D_CACHE_REFILL) for the same existing process,at least the operf started profiling and opreport gave me some result.

$operf  --vmlinux /boot/vmlinux-4.9.0  --events L2D_CACHE:5000:0:1:1 -p 3253
operf: Press Ctl-c or 'kill -SIGINT 4800' to stop profiling
operf: Profiler started
^C
Profiling done.
$ opreport 
Using /mnt/localdisk/oprofile_data/samples/ for samples directory.
CPU: ARM Cortex-A53, speed 1200 MHz (estimated)
Counted L2D_CACHE events (Level 2 data cache access) with a unit mask of 0x00 (No unit mask) count 5000
   L2D_CACHE:5000|
  samples|      %|
------------------
    39594 100.000 wl4app
       L2D_CACHE:5000|
      samples|      %|
    ------------------
        15632 39.4807 myapp
        15191 38.3669 vmlinux-4.9.0
         3578  9.0367 libc-2.24.so
         2732  6.9000 libzmq.so.5.0.1
         1624  4.1016 libpthread-2.24.so
          327  0.8259 libczmq.so.4.0.2
          287  0.7249 [vdso] (tgid:3253 range:0x7fa4845000-0x7fa4845fff)
          180  0.4546 libmemTrace.so.0.0.0
           31  0.0783 librt-2.24.so
            6  0.0152 ld-2.24.so
            3  0.0076 libcrypto.so.1.0.2
            2  0.0051 mylib
            1  0.0025 libsystemd.so.0.15.0
$ 
$operf  --vmlinux /boot/vmlinux-4.9.0  --events L2D_CACHE_REFILL:5000:0:1:1 -p 3253
operf: Press Ctl-c or 'kill -SIGINT 4831' to stop profiling
operf: Profiler started
^C
Profiling done.
$ 

$ operf --version
operf: oprofile 1.3.0 compiled on Apr 25 2019 12:06:54
$ 

Regards,
Jerry

_______________________________________________
oprofile-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/oprofile-list