RE: Ask help for oprofile
SHENG Jason <[email protected]>
| Newsgroups | gmane.linux.oprofile,gmane.spam.detected |
|---|---|
| Message-ID | <9D5579CF9FB381419585002BC69BFDFC372C2B62@CNSHJMBX04.ad4.ad.alcatel.com> |
Hi Will and All,
Thanks for your support in advance.
My oprofile version is 0.9.5, and CPU is ARM1176JZS (Arm-v6). And kernel version is 3.4.24, configured the oprofile module and load the kernel to board, there is oprofile in /sys/module/oprofile
The following is the event file and unit_masks file.
Events file:
# ARM V6 events
#
event:0x00 counters:0,1 um:zero minimum:500 name:IFU_IFETCH_MISS : number of instruction fetch misses
event:0x01 counters:0,1 um:zero minimum:500 name:CYCLES_IFU_MEM_STALL : cycles instruction fetch pipe is stalled
event:0x02 counters:0,1 um:zero minimum:500 name:CYCLES_DATA_STALL : cycles stall occurs for due to data dependency
event:0x03 counters:0,1 um:zero minimum:500 name:ITLB_MISS : number of Instruction MicroTLB misses
event:0x04 counters:0,1 um:zero minimum:500 name:DTLB_MISS : number of Data MicroTLB misses
event:0x05 counters:0,1 um:zero minimum:500 name:BR_INST_EXECUTED : branch instruction executed w/ or w/o program flow change
event:0x06 counters:0,1 um:zero minimum:500 name:BR_INST_MISS_PRED : branch mispredicted
event:0x07 counters:0,1 um:zero minimum:500 name:INSN_EXECUTED : instructions executed
event:0x09 counters:0,1 um:zero minimum:500 name:DCACHE_ACCESS : data cache access, cacheable locations
event:0x0a counters:0,1 um:zero minimum:500 name:DCACHE_ACCESS_ALL : data cache access, all locations
event:0x0b counters:0,1 um:zero minimum:500 name:DCACHE_MISS : data cache miss
event:0x0c counters:0,1 um:zero minimum:500 name:DCACHE_WB : data cache writeback, 1 event for every half cacheline
event:0x0d counters:0,1 um:zero minimum:500 name:PC_CHANGE : number of times the program counter was changed without a mode switch
event:0x0f counters:0,1 um:zero minimum:500 name:TLB_MISS : Main TLB miss
event:0x10 counters:0,1 um:zero minimum:500 name:EXP_EXTERNAL : Explict external data access
event:0x11 counters:0,1 um:zero minimum:500 name:LSU_STALL : cycles stalled because Load Store request queque is full
event:0x12 counters:0,1 um:zero minimum:500 name:WRITE_DRAIN : Times write buffer was drained
event:0x20 counters:0,1 um:zero minimum:500 name:ETMEXTOUT0 : nuber of cycles ETMEXTOUT[0] signal was asserted
event:0x21 counters:0,1 um:zero minimum:500 name:ETMEXTOUT1 : nuber of cycles ETMEXTOUT[1] signal was asserted
event:0x22 counters:0,1 um:zero minimum:500 name:ETMEXTOUT_BOTH : nuber of cycles both ETMEXTOUT [0] and [1] were asserted * 2
event:0xff counters:0,1,2 um:zero minimum:500 name:CPU_CYCLES : clock cycles counter
unit_masks:
# ARM V6 PMU possible unit masks
#
name:zero type:mandatory default:0x00
0x00 No unit mask
In my test, I have to comment line "# 0x00 No unit mask", otherwise, it will hit following error.
~/oprofile/bin # ./opcontrol --setup --event=CPU_CYCLES:1000:0:0:1
oprofile: parse error in /repo1/ksheng/main1230/sw/vobs/esam/build/reborn/buildroot-isam-reborn-arm-catan/output/host/usr/bin/share/oprofile//arm/armv6/unit_masks, line 4
parse_um() expected :value
Then I commented this line, will hit the following error which has been described in last mail, as follows:
~/oprofile/bin # ./opcontrol --start
> mandatory um zero doesn't contain exactly one entry (arm/armv6)
> Using default event: CPU_CYCLES:100000:0:1:1
> mandatory um zero doesn't contain exactly one entry (arm/armv6)
>
> ~/oprofile/bin #>
> ~/oprofile/bin # ./opcontrol --setup --event=CPU_CYCLES:1000:0:0:1
> --session-dir=/home/opt
> mandatory um zero doesn't contain exactly one entry (arm/armv6)
> ~/oprofile/bin #
Thanks,
Jason
-----Original Message-----
From: William Cohen [mailto:[email protected]]
Sent: 2015年2月10日 23:23
To: SHENG Jason; oprofile-list
Subject: Re: Ask help for oprofile
On 02/10/2015 03:29 AM, SHENG Jason wrote:
> Hi Cohen,
>
>
>
> From the oprpfile webpage, I found you are the current maintainers and primary contributes. And I found your mail address in webpage too. During use the oprofile on my own board, I hit an error, searched in internet, but no more help. Could you give me a hand? The following is the detailed information.
>
>
>
> My board uses a ARM cpu, arm1176s. I used the cross-compile tool built out the oprofile tools and ship to my board with supported files, such as (events, unit_masks).
>
> But when I start the “opcontrol”, it hit the following error. I searched the source code, the error message was printed in function check_unit_mask(), could you please give me a hand? Let the opcontrol can be run on my board.
>
>
>
> ~/oprofile/bin #
>
> ~/oprofile/bin # ./opcontrol --start
>
> mandatory um zero doesn't contain exactly one entry (arm/armv6)
>
> Using default event: CPU_CYCLES:100000:0:1:1
>
> mandatory um zero doesn't contain exactly one entry (arm/armv6)
>
> ~/oprofile/bin #
>
> ~/oprofile/bin #
>
> ~/oprofile/bin # ./opcontrol --setup --event=CPU_CYCLES:1000:0:0:1
> --session-dir=/home/opt
>
> mandatory um zero doesn't contain exactly one entry (arm/armv6)
>
> ~/oprofile/bin #
>
> ~/oprofile/bin #
>
>
>
> Thanks,
>
> Jason
>
>
>
Hi Jason,
I am including the oprofile mailing list because others might come across the same problem.
I tried a similar experiment with oprofile-0.9.9 on a "ARM Cortex-A9" which should have similar event. It doesn't appear to have that problem:
[wcohen@wecf19arm ~]$ ophelp -d
CPU_CYCLES:100000:0:1:1
[wcohen@wecf19arm ~]$ sudo opcontrol --start --no-vmlinux
ATTENTION: Use of opcontrol is discouraged. Please see the man page for operf.
Using default event: CPU_CYCLES:100000:0:1:1 Using 2.6+ OProfile kernel interface.
Using log file /var/lib/oprofile/samples/oprofiled.log
Daemon started.
Profiler running.
What version of OProfile are you using? Also could you attach the events/arm/armv6/events and events/arm/armv6/unit_masks files from the version of oprofile you are using?
-Will
------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
oprofile-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/oprofile-list