summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZhenhua Luo <b19537@freescale.com>2012-09-28 12:42:10 +0000
committerMatthew McClintock <msm@freescale.com>2012-12-04 13:16:52 -0600
commitc7de7d8f23aaf61f14a6e41a0892aedb71931473 (patch)
tree9aa0171fafe0b428567acf0b6bc6bc0229258d83
parentf56c95112738e841a60644e9e1f088483b91761a (diff)
downloadmeta-fsl-ppc-c7de7d8f23aaf61f14a6e41a0892aedb71931473.tar.gz
oprofile: add 0.9.6
oprofile-0.9.7 doesn't support e500mc, the patches of e500mc support are only available for oprofile-0.9.6 Signed-off-by: Zhenhua Luo <b19537@freescale.com>
-rw-r--r--recipes-kernel/oprofile/oprofile/oprofile-0.9.6-add-e500mc-support-in-op_events.patch17
-rw-r--r--recipes-kernel/oprofile/oprofile/oprofile-0.9.6-e500mc-support-2.patch37
-rw-r--r--recipes-kernel/oprofile/oprofile/oprofile-0.9.6-e500mc-support.patch171
-rw-r--r--recipes-kernel/oprofile/oprofile/oprofile-no-query-modules.patch29
-rw-r--r--recipes-kernel/oprofile/oprofile/opstart.patch237
-rw-r--r--recipes-kernel/oprofile/oprofile_0.9.6.bb35
6 files changed, 526 insertions, 0 deletions
diff --git a/recipes-kernel/oprofile/oprofile/oprofile-0.9.6-add-e500mc-support-in-op_events.patch b/recipes-kernel/oprofile/oprofile/oprofile-0.9.6-add-e500mc-support-in-op_events.patch
new file mode 100644
index 0000000..2409a63
--- /dev/null
+++ b/recipes-kernel/oprofile/oprofile/oprofile-0.9.6-add-e500mc-support-in-op_events.patch
@@ -0,0 +1,17 @@
1Upstream-Status: Pending
2
3Add e500mc support in libop/op_events.c
4
5Signed-off-by: Zhenhua Luo <b19537@freescale.com>
6===============================================================================
7diff -urN oprofile-0.9.6/libop/op_events.c oprofile-0.9.6-new/libop/op_events.c
8--- oprofile-0.9.6/libop/op_events.c 2009-11-24 23:25:17.000000000 +0800
9+++ oprofile-0.9.6-new/libop/op_events.c 2010-08-19 11:13:15.000000000 +0800
10@@ -1062,6 +1062,7 @@
11
12 case CPU_PPC_E500:
13 case CPU_PPC_E500_2:
14+ case CPU_PPC_E500MC:
15 case CPU_PPC_E300:
16 descr->name = "CPU_CLK";
17 break;
diff --git a/recipes-kernel/oprofile/oprofile/oprofile-0.9.6-e500mc-support-2.patch b/recipes-kernel/oprofile/oprofile/oprofile-0.9.6-e500mc-support-2.patch
new file mode 100644
index 0000000..297b954
--- /dev/null
+++ b/recipes-kernel/oprofile/oprofile/oprofile-0.9.6-e500mc-support-2.patch
@@ -0,0 +1,37 @@
1Upstream-Status: Pending
2
3Add e500mc event in oprofile Makefile to add e500mc support
4
5Signed-off-by: Luo Zhenhua <b19537@freescale.com>
6===============================================================================
7diff -urN oprofile-0.9.6-old/events/Makefile.am oprofile-0.9.6/events/Makefile.am
8--- oprofile-0.9.6-old/events/Makefile.am 2009-11-24 23:25:18.000000000 +0800
9+++ oprofile-0.9.6/events/Makefile.am 2010-08-13 15:23:24.000000000 +0800
10@@ -55,6 +55,7 @@
11 mips/vr5500/events mips/vr5500/unit_masks \
12 ppc/7450/events ppc/7450/unit_masks \
13 ppc/e500/events ppc/e500/unit_masks \
14+ ppc/e500mc/events ppc/e500mc/unit_masks \
15 ppc/e500v2/events ppc/e500v2/unit_masks \
16 ppc/e300/events ppc/e300/unit_masks
17
18diff -urN oprofile-0.9.6-old/events/Makefile.in oprofile-0.9.6/events/Makefile.in
19--- oprofile-0.9.6-old/events/Makefile.in 2009-11-24 23:25:48.000000000 +0800
20+++ oprofile-0.9.6/events/Makefile.in 2010-08-13 15:23:03.000000000 +0800
21@@ -258,6 +258,7 @@
22 mips/vr5500/events mips/vr5500/unit_masks \
23 ppc/7450/events ppc/7450/unit_masks \
24 ppc/e500/events ppc/e500/unit_masks \
25+ ppc/e500mc/events ppc/e500mc/unit_masks \
26 ppc/e500v2/events ppc/e500v2/unit_masks \
27 ppc/e300/events ppc/e300/unit_masks
28
29@@ -312,7 +313,7 @@
30
31
32 distdir: $(DISTFILES)
33- $(mkdir_p) $(distdir)/alpha/ev4 $(distdir)/alpha/ev5 $(distdir)/alpha/ev6 $(distdir)/alpha/ev67 $(distdir)/alpha/pca56 $(distdir)/arm/armv6 $(distdir)/arm/armv7 $(distdir)/arm/mpcore $(distdir)/arm/xscale1 $(distdir)/arm/xscale2 $(distdir)/avr32 $(distdir)/i386/arch_perfmon $(distdir)/i386/athlon $(distdir)/i386/atom $(distdir)/i386/core $(distdir)/i386/core_2 $(distdir)/i386/core_i7 $(distdir)/i386/nehalem $(distdir)/i386/p4 $(distdir)/i386/p4-ht $(distdir)/i386/p6_mobile $(distdir)/i386/pii $(distdir)/i386/piii $(distdir)/i386/ppro $(distdir)/ia64/ia64 $(distdir)/ia64/itanium $(distdir)/ia64/itanium2 $(distdir)/mips/20K $(distdir)/mips/24K $(distdir)/mips/25K $(distdir)/mips/34K $(distdir)/mips/5K $(distdir)/mips/r10000 $(distdir)/mips/r12000 $(distdir)/mips/rm7000 $(distdir)/mips/rm9000 $(distdir)/mips/sb1 $(distdir)/mips/vr5432 $(distdir)/mips/vr5500 $(distdir)/ppc/7450 $(distdir)/ppc/e300 $(distdir)/ppc/e500 $(distdir)/ppc/e500v2 $(distdir)/ppc64/970 $(distdir)/ppc64/970MP $(distdir)/ppc64/cell-be $(distdir)/ppc64/ibm-compat-v1 $(distdir)/ppc64/pa6t $(distdir)/ppc64/power4 $(distdir)/ppc64/power5 $(distdir)/ppc64/power5+ $(distdir)/ppc64/power5++ $(distdir)/ppc64/power6 $(distdir)/ppc64/power7 $(distdir)/rtc $(distdir)/x86-64/family10 $(distdir)/x86-64/family11h $(distdir)/x86-64/hammer
34+ $(mkdir_p) $(distdir)/alpha/ev4 $(distdir)/alpha/ev5 $(distdir)/alpha/ev6 $(distdir)/alpha/ev67 $(distdir)/alpha/pca56 $(distdir)/arm/armv6 $(distdir)/arm/armv7 $(distdir)/arm/mpcore $(distdir)/arm/xscale1 $(distdir)/arm/xscale2 $(distdir)/avr32 $(distdir)/i386/arch_perfmon $(distdir)/i386/athlon $(distdir)/i386/atom $(distdir)/i386/core $(distdir)/i386/core_2 $(distdir)/i386/core_i7 $(distdir)/i386/nehalem $(distdir)/i386/p4 $(distdir)/i386/p4-ht $(distdir)/i386/p6_mobile $(distdir)/i386/pii $(distdir)/i386/piii $(distdir)/i386/ppro $(distdir)/ia64/ia64 $(distdir)/ia64/itanium $(distdir)/ia64/itanium2 $(distdir)/mips/20K $(distdir)/mips/24K $(distdir)/mips/25K $(distdir)/mips/34K $(distdir)/mips/5K $(distdir)/mips/r10000 $(distdir)/mips/r12000 $(distdir)/mips/rm7000 $(distdir)/mips/rm9000 $(distdir)/mips/sb1 $(distdir)/mips/vr5432 $(distdir)/mips/vr5500 $(distdir)/ppc/7450 $(distdir)/ppc/e300 $(distdir)/ppc/e500 $(distdir)/ppc/e500mc $(distdir)/ppc/e500v2 $(distdir)/ppc64/970 $(distdir)/ppc64/970MP $(distdir)/ppc64/cell-be $(distdir)/ppc64/ibm-compat-v1 $(distdir)/ppc64/pa6t $(distdir)/ppc64/power4 $(distdir)/ppc64/power5 $(distdir)/ppc64/power5+ $(distdir)/ppc64/power5++ $(distdir)/ppc64/power6 $(distdir)/ppc64/power7 $(distdir)/rtc $(distdir)/x86-64/family10 $(distdir)/x86-64/family11h $(distdir)/x86-64/hammer
35 @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
36 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
37 list='$(DISTFILES)'; for file in $$list; do \
diff --git a/recipes-kernel/oprofile/oprofile/oprofile-0.9.6-e500mc-support.patch b/recipes-kernel/oprofile/oprofile/oprofile-0.9.6-e500mc-support.patch
new file mode 100644
index 0000000..022b5bd
--- /dev/null
+++ b/recipes-kernel/oprofile/oprofile/oprofile-0.9.6-e500mc-support.patch
@@ -0,0 +1,171 @@
1Upstream-Status: Pending
2
3Add e500mc event in oprofile to add e500mc support
4
5Signed-off-by: George Stephen <Stephen.George@freescale.com>
6===============================================================================
7diff -urN oprofile-0.9.6/events/ppc/e500mc/events oprofile-0.9.6-new/events/ppc/e500mc/events
8--- oprofile-0.9.6/events/ppc/e500mc/events 1970-01-01 08:00:00.000000000 +0800
9+++ oprofile-0.9.6-new/events/ppc/e500mc/events 2010-08-16 17:57:49.000000000 +0800
10@@ -0,0 +1,120 @@
11+# e500mc Events
12+#
13+# Copyright (C) 2010 Freescale Semiconductor, Inc.
14+#
15+event:0x1 counters:0,1,2,3 um:zero minimum:100 name:CPU_CLK : Cycles
16+event:0x2 counters:0,1,2,3 um:zero minimum:500 name:COMPLETED_INSNS : Completed Instructions (0, 1, or 2 per cycle)
17+event:0x3 counters:0,1,2,3 um:zero minimum:500 name:COMPLETED_OPS : Completed Micro-ops (counts 2 for load/store w/update)
18+event:0x4 counters:0,1,2,3 um:zero minimum:500 name:INSTRUCTION_FETCHES : Instruction fetches
19+event:0x5 counters:0,1,2,3 um:zero minimum:500 name:DECODED_OPS : Micro-ops decoded
20+event:0x8 counters:0,1,2,3 um:zero minimum:500 name:COMPLETED_BRANCHES : Branch Instructions completed
21+event:0x9 counters:0,1,2,3 um:zero minimum:500 name:COMPLETED_LOAD_OPS : Load micro-ops completed
22+event:0xa counters:0,1,2,3 um:zero minimum:500 name:COMPLETED_STORE_OPS : Store micro-ops completed
23+event:0xb counters:0,1,2,3 um:zero minimum:500 name:COMPLETION_REDIRECTS : Number of completion buffer redirects
24+event:0xc counters:0,1,2,3 um:zero minimum:500 name:BRANCHES_FINISHED : Branches finished
25+event:0xd counters:0,1,2,3 um:zero minimum:500 name:TAKEN_BRANCHES_FINISHED : Taken branches finished
26+event:0xe counters:0,1,2,3 um:zero minimum:500 name:BIFFED_BRANCHES_FINISHED : Biffed branches finished
27+event:0xf counters:0,1,2,3 um:zero minimum:500 name:BRANCHES_MISPREDICTED : Branch instructions mispredicted due to direction, target, or IAB prediction
28+event:0x10 counters:0,1,2,3 um:zero minimum:500 name:BRANCHES_MISPREDICTED_DIRECTION : Branches mispredicted due to direction prediction
29+event:0x11 counters:0,1,2,3 um:zero minimum:500 name:BTB_HITS : Branches that hit in the BTB, or missed but are not taken
30+event:0x12 counters:0,1,2,3 um:zero minimum:500 name:DECODE_STALLED : Cycles the instruction buffer was not empty, but 0 instructions decoded
31+event:0x13 counters:0,1,2,3 um:zero minimum:500 name:ISSUE_STALLED : Cycles the issue buffer is not empty but 0 instructions issued
32+event:0x14 counters:0,1,2,3 um:zero minimum:500 name:BRANCH_ISSUE_STALLED : Cycles the branch buffer is not empty but 0 instructions issued
33+event:0x15 counters:0,1,2,3 um:zero minimum:500 name:SRS0_SCHEDULE_STALLED : Cycles SRS0 is not empty but 0 instructions scheduled
34+event:0x16 counters:0,1,2,3 um:zero minimum:500 name:SRS1_SCHEDULE_STALLED : Cycles SRS1 is not empty but 0 instructions scheduled
35+event:0x17 counters:0,1,2,3 um:zero minimum:500 name:VRS_SCHEDULE_STALLED : Cycles VRS is not empty but 0 instructions scheduled
36+event:0x18 counters:0,1,2,3 um:zero minimum:500 name:LRS_SCHEDULE_STALLED : Cycles LRS is not empty but 0 instructions scheduled
37+event:0x19 counters:0,1,2,3 um:zero minimum:500 name:BRS_SCHEDULE_STALLED : Cycles BRS is not empty but 0 instructions scheduled Load/Store, Data Cache, and dLFB Events
38+event:0x1a counters:0,1,2,3 um:zero minimum:500 name:TOTAL_TRANSLATED : Total Ldst microops translated.
39+event:0x1b counters:0,1,2,3 um:zero minimum:500 name:LOADS_TRANSLATED : Number of cacheable L* or EVL* microops translated. (This includes microops from load-multiple, load-update, and load-context instructions.)
40+event:0x1c counters:0,1,2,3 um:zero minimum:500 name:STORES_TRANSLATED : Number of cacheable ST* or EVST* microops translated. (This includes microops from store-multiple, store-update, and save-context instructions.)
41+event:0x1d counters:0,1,2,3 um:zero minimum:500 name:TOUCHES_TRANSLATED : Number of cacheable DCBT and DCBTST instructions translated (L1 only) (Does not count touches that are converted to nops i.e. exceptions, noncacheable, hid0[nopti] bit is set.)
42+event:0x1e counters:0,1,2,3 um:zero minimum:500 name:CACHEOPS_TRANSLATED : Number of dcba, dcbf, dcbst, and dcbz instructions translated (e500 traps on dcbi)
43+event:0x1f counters:0,1,2,3 um:zero minimum:500 name:CACHEINHIBITED_ACCESSES_TRANSLATED : Number of cache inhibited accesses translated
44+event:0x20 counters:0,1,2,3 um:zero minimum:500 name:GUARDED_LOADS_TRANSLATED : Number of guarded loads translated
45+event:0x21 counters:0,1,2,3 um:zero minimum:500 name:WRITETHROUGH_STORES_TRANSLATED : Number of write-through stores translated
46+event:0x22 counters:0,1,2,3 um:zero minimum:500 name:MISALIGNED_ACCESSES_TRANSLATED : Number of misaligned load or store accesses translated.
47+event:0x23 counters:0,1,2,3 um:zero minimum:500 name:TOTAL_ALLOCATED_DLFB : Total allocated to dLFB
48+event:0x24 counters:0,1,2,3 um:zero minimum:500 name:LOADS_TRANSLATED_ALLOCATED_DLFB : Loads translated and allocated to dLFB (Applies to same class of instructions as loads translated.)
49+event:0x25 counters:0,1,2,3 um:zero minimum:500 name:STORES_COMPLETED_ALLOCATED_DLFB : Stores completed and allocated to dLFB (Applies to same class of instructions as stores translated.)
50+event:0x26 counters:0,1,2,3 um:zero minimum:500 name:TOUCHES_TRANSLATED_ALLOCATED_DLFB : Touches translated and allocated to dLFB (Applies to same class of instructions as touches translated.)
51+event:0x27 counters:0,1,2,3 um:zero minimum:500 name:STORES_COMPLETED : Number of cacheable ST* or EVST* microops completed. (Applies to the same class of instructions as stores translated.)
52+event:0x28 counters:0,1,2,3 um:zero minimum:500 name:DL1_LOCKS : Number of cache lines locked in the dL1. (Counts a lock even if an overlock condition is encountered.)
53+event:0x29 counters:0,1,2,3 um:zero minimum:500 name:DL1_RELOADS : This is historically used to determine dcache miss rate (along with loads/stores completed). This counts dL1 reloads for any reason.
54+event:0x2a counters:0,1,2,3 um:zero minimum:500 name:DL1_CASTOUTS : dL1 castouts. Does not count castouts due to DCBF.
55+event:0x2b counters:0,1,2,3 um:zero minimum:500 name:DETECTED_REPLAYS : Times detected replay condition - Load miss with dLFB full.
56+event:0x2c counters:0,1,2,3 um:zero minimum:500 name:LOAD_MISS_QUEUE_FULL_REPLAYS : Load miss with load queue full.
57+event:0x2d counters:0,1,2,3 um:zero minimum:500 name:LOAD_GUARDED_MISS_NOT_LAST_REPLAYS : Load guarded miss when the load is not yet at the bottom of the completion buffer.
58+event:0x2e counters:0,1,2,3 um:zero minimum:500 name:STORE_TRANSLATED_QUEUE_FULL_REPLAYS : Translate a store when the StQ is full.
59+event:0x2f counters:0,1,2,3 um:zero minimum:500 name:ADDRESS_COLLISION_REPLAYS : Address collision.
60+event:0x30 counters:0,1,2,3 um:zero minimum:500 name:DMMU_MISS_REPLAYS : DMMU_MISS_REPLAYS : DMMU miss.
61+event:0x31 counters:0,1,2,3 um:zero minimum:500 name:DMMU_BUSY_REPLAYS : DMMU_BUSY_REPLAYS : DMMU busy.
62+event:0x32 counters:0,1,2,3 um:zero minimum:500 name:SECOND_PART_MISALIGNED_AFTER_MISS_REPLAYS : Second part of misaligned access when first part missed in cache.
63+event:0x33 counters:0,1,2,3 um:zero minimum:500 name:LOAD_MISS_DLFB_FULL_CYCLES : Cycles stalled on replay condition - Load miss with dLFB full.
64+event:0x34 counters:0,1,2,3 um:zero minimum:500 name:LOAD_MISS_QUEUE_FULL_CYCLES : Cycles stalled on replay condition - Load miss with load queue full.
65+event:0x35 counters:0,1,2,3 um:zero minimum:500 name:LOAD_GUARDED_MISS_NOT_LAST_CYCLES : Cycles stalled on replay condition - Load guarded miss when the load is not yet at the bottom of the completion buffer.
66+event:0x36 counters:0,1,2,3 um:zero minimum:500 name:STORE_TRANSLATED_QUEUE_FULL_CYCLES : Cycles stalled on replay condition - Translate a store when the StQ is full.
67+event:0x37 counters:0,1,2,3 um:zero minimum:500 name:ADDRESS_COLLISION_CYCLES : Cycles stalled on replay condition - Address collision.
68+event:0x38 counters:0,1,2,3 um:zero minimum:500 name:DMMU_MISS_CYCLES : Cycles stalled on replay condition - DMMU miss.
69+event:0x39 counters:0,1,2,3 um:zero minimum:500 name:DMMU_BUSY_CYCLES : Cycles stalled on replay condition - DMMU busy.
70+event:0x3a counters:0,1,2,3 um:zero minimum:500 name:SECOND_PART_MISALIGNED_AFTER_MISS_CYCLES : Cycles stalled on replay condition - Second part of misaligned access when first part missed in cache.
71+event:0x3b counters:0,1,2,3 um:zero minimum:500 name:IL1_LOCKS : Number of cache lines locked in the iL1. (Counts a lock even if an overlock condition is encountered.)
72+event:0x3c counters:0,1,2,3 um:zero minimum:500 name:IL1_FETCH_RELOADS : This is historically used to determine icache miss rate (along with instructions completed) Reloads due to demand fetch.
73+event:0x3d counters:0,1,2,3 um:zero minimum:500 name:FETCHES : Counts the number of fetches that write at least one instruction to the instruction buffer. (With instruction fetched, can used to compute instructions-per-fetch)
74+event:0x3e counters:0,1,2,3 um:zero minimum:500 name:IMMU_TLB4K_RELOADS : iMMU TLB4K reloads
75+event:0x3f counters:0,1,2,3 um:zero minimum:500 name:IMMU_VSP_RELOADS : iMMU VSP reloads
76+event:0x40 counters:0,1,2,3 um:zero minimum:500 name:DMMU_TLB4K_RELOADS : dMMU TLB4K reloads
77+event:0x41 counters:0,1,2,3 um:zero minimum:500 name:DMMU_VSP_RELOADS : dMMU VSP reloads
78+event:0x42 counters:0,1,2,3 um:zero minimum:500 name:L2MMU_MISSES : Counts iTLB/dTLB error interrupt
79+event:0x43 counters:0,1,2,3 um:zero minimum:500 name:BIU_MASTER_REQUESTS : Number of master transactions. (Number of master TSs.)
80+event:0x44 counters:0,1,2,3 um:zero minimum:500 name:BIU_MASTER_I_REQUESTS : Number of master I-Side transactions. (Number of master I-Side TSs.)
81+event:0x45 counters:0,1,2,3 um:zero minimum:500 name:BIU_MASTER_D_REQUESTS : Number of master D-Side transactions. (Number of master D-Side TSs.)
82+event:0x46 counters:0,1,2,3 um:zero minimum:500 name:BIU_MASTER_D_CASTOUT_REQUESTS : Number of master D-Side non-program-demand castout transactions. This counts replacement pushes and snoop pushes. This does not count DCBF castouts. (Number of master D-side non-program-demand castout TSs.)
83+event:0x48 counters:0,1,2,3 um:zero minimum:500 name:SNOOP_REQUESTS : Number of externally generated snoop requests. (Counts snoop TSs.)
84+event:0x49 counters:0,1,2,3 um:zero minimum:500 name:SNOOP_HITS : Number of snoop hits on all D-side resources regardless of the cache state (modified, exclusive, or shared)
85+event:0x4a counters:0,1,2,3 um:zero minimum:500 name:SNOOP_PUSHES : Number of snoop pushes from all D-side resources. (Counts snoop ARTRY/WOPs.)
86+event:0x52 counters:0,1,2,3 um:zero minimum:500 name:PMC0_OVERFLOW : Counts the number of times PMC0[32] transitioned from 1 to 0.
87+event:0x53 counters:0,1,2,3 um:zero minimum:500 name:PMC1_OVERFLOW : Counts the number of times PMC1[32] transitioned from 1 to 0.
88+event:0x54 counters:0,1,2,3 um:zero minimum:500 name:PMC2_OVERFLOW : Counts the number of times PMC2[32] transitioned from 1 to 0.
89+event:0x55 counters:0,1,2,3 um:zero minimum:500 name:PMC3_OVERFLOW : Counts the number of times PMC3[32] transitioned from 1 to 0.
90+event:0x56 counters:0,1,2,3 um:zero minimum:500 name:INTERRUPTS : Number of interrupts taken
91+event:0x57 counters:0,1,2,3 um:zero minimum:500 name:EXTERNAL_INTERRUPTS : Number of external input interrupts taken
92+event:0x58 counters:0,1,2,3 um:zero minimum:500 name:CRITICAL_INTERRUPTS : Number of critical input interrupts taken
93+event:0x59 counters:0,1,2,3 um:zero minimum:500 name:SC_TRAP_INTERRUPTS : Number of system call and trap interrupts
94+event:0x5b counters:0,1,2,3 um:zero minimum:500 name:L2_LINEFILL_REQ : Number L2 Linefill requests
95+event:0x5c counters:0,1,2,3 um:zero minimum:500 name:L2_VICTIM_SELECT : Number L2 Victim selects
96+event:0x6e counters:0,1,2,3 um:zero minimum:500 name:L2_ACCESS : Number L2 cache accesses
97+event:0x6f counters:0,1,2,3 um:zero minimum:500 name:L2_HIT_ACCESS : Number L2 hit cache accesses
98+event:0x70 counters:0,1,2,3 um:zero minimum:500 name:L2_DATA_ACCESS : Number L2 data cache accesses
99+event:0x71 counters:0,1,2,3 um:zero minimum:500 name:L2_HIT_DATA_ACCESS : Number L2 hit data cache accesses
100+event:0x72 counters:0,1,2,3 um:zero minimum:500 name:L2_INST_ACCESS : Number L2 instruction cache accesses
101+event:0x73 counters:0,1,2,3 um:zero minimum:500 name:L2_HIT_INST_ACCESS : Number L2 hit instruction cache accesses
102+event:0x74 counters:0,1,2,3 um:zero minimum:500 name:L2_ALLOC : Number L2 cache allocations
103+event:0x75 counters:0,1,2,3 um:zero minimum:500 name:L2_DATA_ALLOC : Number L2 data cache allocations
104+event:0x76 counters:0,1,2,3 um:zero minimum:500 name:L2_DIRTY_DATA_ALLOC : Number L2 dirty data cache allocations
105+event:0x77 counters:0,1,2,3 um:zero minimum:500 name:L2_INST_ALLOC : Number L2 instruction cache allocations
106+event:0x78 counters:0,1,2,3 um:zero minimum:500 name:L2_UPDATE : Number L2 cache updates
107+event:0x79 counters:0,1,2,3 um:zero minimum:500 name:L2_CLEAN_UPDATE : Number L2 cache clean updates
108+event:0x7a counters:0,1,2,3 um:zero minimum:500 name:L2_DIRTY_UPDATE : Number L2 cache dirty updates
109+event:0x7b counters:0,1,2,3 um:zero minimum:500 name:L2_CLEAN_REDU_UPDATE : Number L2 cache clean redundant updates
110+event:0x7c counters:0,1,2,3 um:zero minimum:500 name:L2_DIRTY_REDU_UPDATE : Number L2 cache dirty redundant updates
111+event:0x7d counters:0,1,2,3 um:zero minimum:500 name:L2_LOCKS : Number L2 cache locks
112+event:0x7e counters:0,1,2,3 um:zero minimum:500 name:L2_CASTOUT : Number L2 cache castouts
113+event:0x7f counters:0,1,2,3 um:zero minimum:500 name:L2_HIT_DATA_DIRTY : Number L2 cache data dirty hits
114+event:0x82 counters:0,1,2,3 um:zero minimum:500 name:L2_INV_CLEAN : Number L2 cache invalidation of clean lines
115+event:0x83 counters:0,1,2,3 um:zero minimum:500 name:L2_INV_INCOHER : Number L2 cache invalidation of incoherent lines
116+event:0x84 counters:0,1,2,3 um:zero minimum:500 name:L2_INV_COHER : Number L2 cache invalidation of coherent lines
117+event:0x94 counters:0,1,2,3 um:zero minimum:500 name:DVT0 : Detection of write to DEVENT with DVT0 set
118+event:0x95 counters:0,1,2,3 um:zero minimum:500 name:DVT1 : Detection of write to DEVENT with DVT1 set
119+event:0x96 counters:0,1,2,3 um:zero minimum:500 name:DVT2 : Detection of write to DEVENT with DVT2 set
120+event:0x97 counters:0,1,2,3 um:zero minimum:500 name:DVT3 : Detection of write to DEVENT with DVT3 set
121+event:0x98 counters:0,1,2,3 um:zero minimum:500 name:DVT4 : Detection of write to DEVENT with DVT4 set
122+event:0x99 counters:0,1,2,3 um:zero minimum:500 name:DVT5 : Detection of write to DEVENT with DVT5 set
123+event:0x9a counters:0,1,2,3 um:zero minimum:500 name:DVT6 : Detection of write to DEVENT with DVT6 set
124+event:0x9b counters:0,1,2,3 um:zero minimum:500 name:DVT7 : Detection of write to DEVENT with DVT7 set
125+event:0x9c counters:0,1,2,3 um:zero minimum:500 name:CYCLES_NEXUS_STALLED : Number of completion cycles stalled due to Nexus FIFO full
126+event:0xb0 counters:0,1,2,3 um:zero minimum:500 name:DECORATED_LOAD : Number of decorated loads.
127+event:0xb1 counters:0,1,2,3 um:zero minimum:500 name:DECORATED_STORE : Number of decorated stores
128+event:0xb2 counters:0,1,2,3 um:zero minimum:500 name:LOAD_RETRY : Number of load retries
129+event:0xb3 counters:0,1,2,3 um:zero minimum:500 name:STWCX_SUCCESS : Number of successful stwcx. instructions
130+event:0xb4 counters:0,1,2,3 um:zero minimum:500 name:STWCX_UNSUCCESS : Number of unsuccessful stwcx. instructions
131diff -urN oprofile-0.9.6/events/ppc/e500mc/unit_masks oprofile-0.9.6-new/events/ppc/e500mc/unit_masks
132--- oprofile-0.9.6/events/ppc/e500mc/unit_masks 1970-01-01 08:00:00.000000000 +0800
133+++ oprofile-0.9.6-new/events/ppc/e500mc/unit_masks 2010-08-16 17:56:03.000000000 +0800
134@@ -0,0 +1,4 @@
135+# e500 possible unit masks
136+#
137+name:zero type:mandatory default:0x0
138+ 0x0 No unit mask
139diff -urN oprofile-0.9.6/libop/op_cpu_type.c oprofile-0.9.6-new/libop/op_cpu_type.c
140--- oprofile-0.9.6/libop/op_cpu_type.c 2009-11-24 23:25:17.000000000 +0800
141+++ oprofile-0.9.6-new/libop/op_cpu_type.c 2010-08-16 17:56:03.000000000 +0800
142@@ -82,6 +82,7 @@
143 { "ppc64 compat version 1", "ppc64/ibm-compat-v1", CPU_PPC64_IBM_COMPAT_V1, 4 },
144 { "Intel Core/i7", "i386/core_i7", CPU_CORE_I7, 4 },
145 { "Intel Atom", "i386/atom", CPU_ATOM, 2 },
146+ { "e500mc", "ppc/e500mc", CPU_PPC_E500MC, 4 },
147 };
148
149 static size_t const nr_cpu_descrs = sizeof(cpu_descrs) / sizeof(struct cpu_descr);
150diff -urN oprofile-0.9.6/libop/op_cpu_type.h oprofile-0.9.6-new/libop/op_cpu_type.h
151--- oprofile-0.9.6/libop/op_cpu_type.h 2009-11-24 23:25:17.000000000 +0800
152+++ oprofile-0.9.6-new/libop/op_cpu_type.h 2010-08-16 17:56:03.000000000 +0800
153@@ -79,6 +79,7 @@
154 CPU_PPC64_IBM_COMPAT_V1, /**< IBM PPC64 processor compat mode version 1 */
155 CPU_CORE_I7, /* Intel Core i7, Nehalem */
156 CPU_ATOM, /* First generation Intel Atom */
157+ CPU_PPC_E500MC, /**< e500mc */
158 MAX_CPU_TYPE
159 } op_cpu;
160
161diff -urN oprofile-0.9.6/utils/ophelp.c oprofile-0.9.6-new/utils/ophelp.c
162--- oprofile-0.9.6/utils/ophelp.c 2009-11-24 23:25:17.000000000 +0800
163+++ oprofile-0.9.6-new/utils/ophelp.c 2010-08-16 17:56:03.000000000 +0800
164@@ -619,6 +619,7 @@
165
166 case CPU_PPC_E500:
167 case CPU_PPC_E500_2:
168+ case CPU_PPC_E500MC:
169 event_doc =
170 "See PowerPC e500 Core Complex Reference Manual\n"
171 "Chapter 7: Performance Monitor\n"
diff --git a/recipes-kernel/oprofile/oprofile/oprofile-no-query-modules.patch b/recipes-kernel/oprofile/oprofile/oprofile-no-query-modules.patch
new file mode 100644
index 0000000..c9d7cd6
--- /dev/null
+++ b/recipes-kernel/oprofile/oprofile/oprofile-no-query-modules.patch
@@ -0,0 +1,29 @@
1disable portions which use query_module on 2.6 kernel this is not available
2in OE we dont support 2.4 anyway
3
4
5Upstream-Status: Pending
6Signed-off-by: Khem Raj <raj.khem@gmail.com>
7
8Index: oprofile-0.9.6/daemon/liblegacy/opd_kernel.c
9===================================================================
10--- oprofile-0.9.6.orig/daemon/liblegacy/opd_kernel.c 2009-11-24 07:25:17.000000000 -0800
11+++ oprofile-0.9.6/daemon/liblegacy/opd_kernel.c 2011-07-18 10:08:39.863798825 -0700
12@@ -270,6 +270,9 @@
13 */
14 static void opd_drop_module_sample(unsigned long eip)
15 {
16+ verbprintf(vmodule, "query_module not available on linux-2.6: %s\n", strerror(EPERM));
17+
18+#if 0
19 char * module_names;
20 char * name;
21 size_t size = 1024;
22@@ -307,6 +310,7 @@
23
24 if (module_names)
25 free(module_names);
26+#endif
27 }
28
29
diff --git a/recipes-kernel/oprofile/oprofile/opstart.patch b/recipes-kernel/oprofile/oprofile/opstart.patch
new file mode 100644
index 0000000..c588deb
--- /dev/null
+++ b/recipes-kernel/oprofile/oprofile/opstart.patch
@@ -0,0 +1,237 @@
1Upstream-Status: Pending
2
3Index: oprofile/utils/Makefile.am
4===================================================================
5--- oprofile.orig/utils/Makefile.am 2005-03-31 18:20:41.000000000 +0100
6+++ oprofile/utils/Makefile.am 2008-07-02 15:14:07.000000000 +0100
7@@ -3,8 +3,15 @@
8
9 LIBS=@POPT_LIBS@ @LIBERTY_LIBS@
10
11-bin_PROGRAMS = ophelp
12+bin_PROGRAMS = ophelp opstart
13 dist_bin_SCRIPTS = opcontrol
14
15 ophelp_SOURCES = ophelp.c
16 ophelp_LDADD = ../libop/libop.a ../libutil/libutil.a
17+
18+opstart_SOURCES = opstart.c
19+
20+install-exec-local:
21+ cd $(DESTDIR)/$(bindir) && \
22+ rm -f opstop && \
23+ $(LN_S) opstart opstop
24Index: oprofile/utils/opstart.c
25===================================================================
26--- /dev/null 1970-01-01 00:00:00.000000000 +0000
27+++ oprofile/utils/opstart.c 2008-07-02 15:14:07.000000000 +0100
28@@ -0,0 +1,110 @@
29+/**
30+ * @file opstart.c
31+ * Start/Stop oprofile
32+ *
33+ * @remark Copyright 2007 Openedhand Ltd.
34+ * @remark Read the file COPYING
35+ *
36+ * @author Richard Purdie
37+ */
38+
39+#include <signal.h>
40+#include <stdio.h>
41+#include <stdlib.h>
42+#include <string.h>
43+#include <unistd.h>
44+#include <sys/types.h>
45+#include <sys/stat.h>
46+
47+int main(const int argc, const char* argv[])
48+{
49+ const char *enable = "/dev/oprofile/enable";
50+ const char *lockfile;
51+ unsigned long dpid;
52+ struct stat sbuf;
53+ FILE *lfile, *efile;
54+ int sig, enb, err;
55+
56+ if (argc >= 2) {
57+ printf("Error: Invalid options.\n");
58+ return 1;
59+ }
60+
61+ lockfile = getenv("LOCK_FILE");
62+ if (!lockfile)
63+ lockfile = "/var/lib/oprofile/lock";
64+
65+ /* Add SESSION_DIR support? */
66+
67+ if (geteuid()) {
68+ printf("Error: This program must be run as root.\n");
69+ return 1;
70+ }
71+
72+ if (stat(enable, &sbuf)) {
73+ printf("Error: Could not find /dev/oprofile/enable, the"
74+ " kernel module probably isn't loaded.\n");
75+ printf("This binary only works with 2.6 kernels and oprofile"
76+ " must have been initialised with 'opcontrol --start-daemon'.\n");
77+ return 1;
78+ }
79+
80+ if (stat(lockfile, &sbuf)) {
81+ printf("Error: Could not find lockfile %s.\n", lockfile);
82+ printf("The oprofile daemon must be running (oprofile must"
83+ " have been initialised with 'opcontrol --start-daemon').\n");
84+ return 1;
85+ }
86+
87+ lfile = fopen(lockfile, "r");
88+ if (!lfile) {
89+ printf("Error opening lockfile %s.\n", lockfile);
90+ return 1;
91+ }
92+
93+ err = fscanf(lfile, "%lud", (unsigned long *) &dpid);
94+ if (err != 1) {
95+ printf("Error reading pid from lockfile %s.\n", lockfile);
96+ return 1;
97+ }
98+ fclose(lfile);
99+
100+ efile = fopen(enable, "r");
101+ if (!efile) {
102+ printf("Error opening %s.\n", enable);
103+ return 1;
104+ }
105+
106+ if (strstr(argv[0], "opstart")) {
107+ printf("Starting Profiler\n");
108+ sig = SIGUSR1;
109+ enb = 1;
110+ } else if (strstr(argv[0], "opstop")) {
111+ printf("Stopping Oprofile.\n");
112+ printf("You need to run 'opcontrol --dump' when the session"
113+ " is finished.\n");
114+ sig = SIGUSR2;
115+ enb = 0;
116+ } else {
117+ printf("Error: Please call as 'opstart' or 'opstop'\n");
118+ return 1;
119+ }
120+
121+ err = kill(dpid, 0);
122+ if (err) {
123+ printf("Error sending signal to oprofiled. Stale lockfile"
124+ " (%s) ?\n", lockfile);
125+ return 1;
126+ }
127+
128+ fprintf(efile, "%d\n", enb);
129+ err = kill(dpid, sig);
130+ if (err) {
131+ printf("Error sending signal to oprofiled. Stale lockfile"
132+ " (%s) ?\n", lockfile);
133+ return 1;
134+ }
135+
136+ return 0;
137+}
138+
139Index: oprofile/configure.in
140===================================================================
141--- oprofile.orig/configure.in 2008-07-02 15:13:58.000000000 +0100
142+++ oprofile/configure.in 2008-07-02 15:17:37.000000000 +0100
143@@ -16,6 +16,7 @@
144 AM_CONFIG_HEADER(config.h)
145
146 AC_PROG_RANLIB
147+AC_PROG_LN_S
148 AC_PROG_LIBTOOL
149
150 dnl for the man page
151@@ -241,6 +242,8 @@
152 doc/xsl/catalog-1.xml \
153 doc/oprofile.1 \
154 doc/opcontrol.1 \
155+ doc/opstart.1 \
156+ doc/opstop.1 \
157 doc/ophelp.1 \
158 doc/opreport.1 \
159 doc/opannotate.1 \
160Index: oprofile/doc/Makefile.am
161===================================================================
162--- oprofile.orig/doc/Makefile.am 2008-07-02 15:13:59.000000000 +0100
163+++ oprofile/doc/Makefile.am 2008-07-02 15:14:07.000000000 +0100
164@@ -11,6 +11,8 @@
165 man_MANS = \
166 oprofile.1 \
167 opcontrol.1 \
168+ opstart.1 \
169+ opstop.1 \
170 opreport.1 \
171 opannotate.1 \
172 opgprof.1 \
173Index: oprofile/doc/opstart.1.in
174===================================================================
175--- /dev/null 1970-01-01 00:00:00.000000000 +0000
176+++ oprofile/doc/opstart.1.in 2008-07-02 15:14:07.000000000 +0100
177@@ -0,0 +1,27 @@
178+.TH OPSTART 1 "@DATE@" "oprofile @VERSION@"
179+.UC 4
180+.SH NAME
181+opstart \- start OProfile profiling
182+.SH SYNOPSIS
183+.br
184+.B opstart
185+.SH DESCRIPTION
186+.B opstart
187+is a simple optimised command to start profiling with 2.6 Linux kernels.
188+OProfile should have already been initialised by calling "opcontrol --start-daemon".
189+
190+.SH ENVIRONMENT
191+No special environment variables are recognised by opstart.
192+
193+.SH FILES
194+.TP
195+.I /var/lib/oprofile/samples/
196+The location of the generated sample files.
197+
198+.SH VERSION
199+.TP
200+This man page is current for @PACKAGE@-@VERSION@.
201+
202+.SH SEE ALSO
203+.BR @OP_DOCDIR@,
204+.BR oprofile(1)
205Index: oprofile/doc/opstop.1.in
206===================================================================
207--- /dev/null 1970-01-01 00:00:00.000000000 +0000
208+++ oprofile/doc/opstop.1.in 2008-07-02 15:14:07.000000000 +0100
209@@ -0,0 +1,28 @@
210+.TH OPSTOP 1 "@DATE@" "oprofile @VERSION@"
211+.UC 4
212+.SH NAME
213+opstop \- stop OProfile profiling
214+.SH SYNOPSIS
215+.br
216+.B opstop
217+.SH DESCRIPTION
218+.B opstop
219+is a simple optimsed command to stop profiling with 2.6 Linux kernels.
220+You need to run "opcontrol --dump" before being able to view a profile
221+with opreport.
222+
223+.SH ENVIRONMENT
224+No special environment variables are recognised by opstop.
225+
226+.SH FILES
227+.TP
228+.I /var/lib/oprofile/samples/
229+The location of the generated sample files.
230+
231+.SH VERSION
232+.TP
233+This man page is current for @PACKAGE@-@VERSION@.
234+
235+.SH SEE ALSO
236+.BR @OP_DOCDIR@,
237+.BR oprofile(1)
diff --git a/recipes-kernel/oprofile/oprofile_0.9.6.bb b/recipes-kernel/oprofile/oprofile_0.9.6.bb
new file mode 100644
index 0000000..6664c89
--- /dev/null
+++ b/recipes-kernel/oprofile/oprofile_0.9.6.bb
@@ -0,0 +1,35 @@
1SUMMARY = "System-Wide Profiler"
2DESCRIPTION = "OProfile is a system-wide profiler for Linux systems, capable \
3of profiling all running code at low overhead."
4HOMEPAGE = "http://oprofile.sourceforge.net/news/"
5BUGTRACKER = "http://sourceforge.net/tracker/?group_id=16191&atid=116191"
6
7LICENSE = "LGPLv2.1+ & GPLv2"
8LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
9 file://libopagent/opagent.h;beginline=5;endline=26;md5=4f16f72c7a493d8a4704aa18d03d15c6 \
10 file://daemon/liblegacy/p_module.h;beginline=2;endline=20;md5=fc23a43455edf185307274a99730b6e4"
11
12SECTION = "devel"
13
14DEPENDS = "popt binutils"
15RDEPENDS_${PN} = "binutils-symlinks"
16RRECOMMENDS_${PN} = "kernel-vmlinux"
17
18FILES_${PN} = "${bindir} ${libdir}/${BPN}/lib*.so.* ${datadir}/${BPN}"
19FILES_${PN}-dev += "${libdir}/${BPN}/lib*.so ${libdir}/${BPN}/lib*.la"
20FILES_${PN}-staticdev += "${libdir}/${BPN}/lib*.a"
21
22SRC_URI = "${SOURCEFORGE_MIRROR}/oprofile/oprofile-${PV}.tar.gz \
23 file://opstart.patch \
24 file://oprofile-no-query-modules.patch \
25 file://oprofile-0.9.6-e500mc-support.patch \
26 file://oprofile-0.9.6-e500mc-support-2.patch \
27 file://oprofile-0.9.6-add-e500mc-support-in-op_events.patch"
28
29SRC_URI[md5sum] = "4e407093ac06200185d5a5e6437d7242"
30SRC_URI[sha256sum] = "3f0dd40a7749fc650d25d79d42ebbff8f3b6db310c36e7c3839696cc09077880"
31S = "${WORKDIR}/oprofile-${PV}"
32
33inherit autotools
34
35EXTRA_OECONF = "--with-kernel-support --without-x"