<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/">
  <channel rdf:about="http://blog.gmane.org/gmane.linux.oprofile">
    <title>gmane.linux.oprofile</title>
    <link>http://blog.gmane.org/gmane.linux.oprofile</link>
    <description/>
    <syn:updatePeriod>hourly</syn:updatePeriod>
    <syn:updateFrequency>1</syn:updateFrequency>
    <syn:updateBase>1901-01-01T00:00+00:00</syn:updateBase>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.oprofile/11532"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.oprofile/11531"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.oprofile/11530"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.oprofile/11529"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.oprofile/11528"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.oprofile/11527"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.oprofile/11526"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.oprofile/11525"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.oprofile/11524"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.oprofile/11523"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.oprofile/11522"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.oprofile/11521"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.oprofile/11520"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.oprofile/11519"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.oprofile/11518"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.oprofile/11517"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.oprofile/11516"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.oprofile/11515"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.oprofile/11514"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.oprofile/11513"/>
      </rdf:Seq>
    </items>
    <image rdf:resource="http://gmane.org/img/gmane-25t.png"/>
    <textinput rdf:resource=""/>
  </channel>
  <image rdf:about="http://gmane.org/img/gmane-25t.png">
    <title>Gmane</title>
    <url>http://gmane.org/img/gmane-25t.png</url>
    <link>http://gmane.org</link>
  </image>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.oprofile/11532">
    <title>Re: [PATCH] Add support for IBM POWER8 processor</title>
    <link>http://permalink.gmane.org/gmane.linux.oprofile/11532</link>
    <description>&lt;pre&gt;
Carl, please review this patch.  Also, if you have time, please make the
necessary updates to oprofile-tests to enable the testsuite to run
successfully on the POWER8 processor.

Thanks!
-Maynard


------------------------------------------------------------------------------
Try New Relic Now &amp;amp; We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service 
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, &amp;amp; servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may
&lt;/pre&gt;</description>
    <dc:creator>Maynard Johnson</dc:creator>
    <dc:date>2013-05-24T15:54:18</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.oprofile/11531">
    <title>[PATCH] Add support for IBM POWER8 processor</title>
    <link>http://permalink.gmane.org/gmane.linux.oprofile/11531</link>
    <description>&lt;pre&gt;Add support for IBM POWER8 processor

The Power ISA 2.07 was recently published at http://power.org/documentation.
The IBM POWER8 processor currently under development is an implementation
of the ISA 2.07.  This patch provides the initial support for POWER8
to oprofile.  NOTE: Only operf support is included with this patch. The
legacy opcontrol-based profiler and the oprofile kernel module have
not been (and may never be) updated to support this new processor.

Signed-off-by: Maynard Johnson &amp;lt;maynardj&amp;lt; at &amp;gt;us.ibm.com&amp;gt;
---
 events/Makefile.am             |    1 +
 events/ppc64/power8/events     |   97 ++++++++++++++++++++++++++++++++++++++++
 events/ppc64/power8/unit_masks |    9 ++++
 libop/op_cpu_type.c            |    1 +
 libop/op_cpu_type.h            |    1 +
 libop/op_events.c              |    1 +
 utils/opcontrol                |    5 ++
 utils/ophelp.c                 |    4 +-
 8 files changed, 118 insertions(+), 1 deletions(-)
 create mode 100644 events/ppc64/power8/events
 create mode 100644 events/ppc64/power8/unit_masks

diff --git a/events/Makefile.am b/events/Makefile.am
index 583212e..be87781 100644
--- a/events/Makefile.am
+++ b/events/Makefile.am
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -31,6 +31,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; event_files = \
 ppc64/power5++/events ppc64/power5++/event_mappings ppc64/power5++/unit_masks \
 ppc64/power6/events ppc64/power6/event_mappings ppc64/power6/unit_masks \
 ppc64/power7/events ppc64/power7/event_mappings ppc64/power7/unit_masks \
+ppc64/power8/events ppc64/power8/unit_masks \
 ppc64/970/events ppc64/970/event_mappings ppc64/970/unit_masks \
 ppc64/970MP/events ppc64/970MP/event_mappings ppc64/970MP/unit_masks \
 ppc64/ibm-compat-v1/events ppc64/ibm-compat-v1/event_mappings ppc64/ibm-compat-v1/unit_masks \
diff --git a/events/ppc64/power8/events b/events/ppc64/power8/events
new file mode 100644
index 0000000..994dc27
--- /dev/null
+++ b/events/ppc64/power8/events
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1,97 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+#
+#  Copyright OProfile authors
+#  Copyright (c) International Business Machines, 2013.
+#  Contributed by Maynard Johnson &amp;lt;maynardj&amp;lt; at &amp;gt;us.ibm.com&amp;gt;.
+#
+#  IBM POWER8 Events
+
+include:ppc64/architected_events_v1
+
+event:0x40036 counters:3 um:zero minimum:10000 name:PM_BR_2PATH : two path branch.
+event:0x40060 counters:3 um:zero minimum:10000 name:PM_BR_CMPL : Branch Instruction completed.
+event:0x40138 counters:3 um:zero minimum:10000 name:PM_BR_MRK_2PATH : marked two path branch.
+event:0x1e054 counters:0 um:zero minimum:10000 name:PM_CMPLU_STALL : Completion stall.
+event:0x4d018 counters:3 um:zero minimum:10000 name:PM_CMPLU_STALL_BRU : Completion stall due to a Branch Unit.
+event:0x2d018 counters:1 um:zero minimum:10000 name:PM_CMPLU_STALL_BRU_CRU : Completion stall due to IFU.
+event:0x30026 counters:2 um:zero minimum:10000 name:PM_CMPLU_STALL_COQ_FULL : Completion stall due to CO q full.
+event:0x2c012 counters:1 um:zero minimum:10000 name:PM_CMPLU_STALL_DCACHE_MISS : Completion stall by Dcache miss.
+event:0x2c018 counters:1 um:zero minimum:10000 name:PM_CMPLU_STALL_DMISS_L21_L31 : Completion stall by Dcache miss which resolved on chip ( excluding local L2/L3).
+event:0x2c016 counters:1 um:zero minimum:10000 name:PM_CMPLU_STALL_DMISS_L2L3 : Completion stall by Dcache miss which resolved in L2/L3.
+event:0x4c016 counters:3 um:zero minimum:10000 name:PM_CMPLU_STALL_DMISS_L2L3_CONFLICT : Completion stall due to cache miss resolving in core's L2/L3 with a conflict.
+event:0x4c01a counters:3 um:zero minimum:10000 name:PM_CMPLU_STALL_DMISS_L3MISS : Completion stall due to cache miss resolving missed the L3.
+event:0x4c018 counters:3 um:zero minimum:10000 name:PM_CMPLU_STALL_DMISS_LMEM : Completion stall due to cache miss resolving in core's Local Memory.
+event:0x2c01c counters:1 um:zero minimum:10000 name:PM_CMPLU_STALL_DMISS_REMOTE : Completion stall by Dcache miss which resolved on chip ( excluding local L2/L3).
+event:0x4c012 counters:3 um:zero minimum:10000 name:PM_CMPLU_STALL_ERAT_MISS : Completion stall due to LSU reject ERAT miss.
+event:0x30038 counters:2 um:zero minimum:10000 name:PM_CMPLU_STALL_FLUSH : completion stall due to flush by own thread.
+event:0x4d016 counters:3 um:zero minimum:10000 name:PM_CMPLU_STALL_FXLONG : Completion stall due to a long latency fixed point instruction.
+event:0x2d016 counters:1 um:zero minimum:10000 name:PM_CMPLU_STALL_FXU : Completion stall due to FXU.
+event:0x30036 counters:2 um:zero minimum:10000 name:PM_CMPLU_STALL_HWSYNC : completion stall due to hwsync.
+event:0x4d014 counters:3 um:zero minimum:10000 name:PM_CMPLU_STALL_LOAD_FINISH : Completion stall due to a Load finish.
+event:0x2c010 counters:1 um:zero minimum:10000 name:PM_CMPLU_STALL_LSU : Completion stall by LSU instruction.
+event:0x10036 counters:0 um:zero minimum:10000 name:PM_CMPLU_STALL_LWSYNC : completion stall due to isync/lwsync.
+event:0x30028 counters:2 um:zero minimum:10000 name:PM_CMPLU_STALL_MEM_ECC_DELAY : Completion stall due to mem ECC delay.
+event:0x2e01e counters:1 um:zero minimum:10000 name:PM_CMPLU_STALL_NTCG_FLUSH : Completion stall due to reject (load hit store).
+event:0x30006 counters:2 um:zero minimum:10000 name:PM_CMPLU_STALL_OTHER_CMPL : Instructions core completed while this thread was stalled.
+event:0x4c010 counters:3 um:zero minimum:10000 name:PM_CMPLU_STALL_REJECT : Completion stall due to LSU reject.
+event:0x2c01a counters:1 um:zero minimum:10000 name:PM_CMPLU_STALL_REJECT_LHS : Completion stall due to reject (load hit store).
+event:0x4c014 counters:3 um:zero minimum:10000 name:PM_CMPLU_STALL_REJ_LMQ_FULL : Completion stall due to LSU reject LMQ full.
+event:0x4d010 counters:3 um:zero minimum:10000 name:PM_CMPLU_STALL_SCALAR : Completion stall due to VSU scalar instruction.
+event:0x2d010 counters:1 um:zero minimum:10000 name:PM_CMPLU_STALL_SCALAR_LONG : Completion stall due to VSU scalar long latency instruction.
+event:0x2c014 counters:1 um:zero minimum:10000 name:PM_CMPLU_STALL_STORE : Completion stall by stores.
+event:0x4c01c counters:3 um:zero minimum:10000 name:PM_CMPLU_STALL_ST_FWD : Completion stall due to store forward.
+event:0x1001c counters:0 um:zero minimum:10000 name:PM_CMPLU_STALL_THRD : Completion stall due to thread conflict.
+event:0x2d014 counters:1 um:zero minimum:10000 name:PM_CMPLU_STALL_VECTOR : Completion stall due to VSU vector  instruction.
+event:0x4d012 counters:3 um:zero minimum:10000 name:PM_CMPLU_STALL_VECTOR_LONG : Completion stall due to VSU vector long instruction.
+event:0x2d012 counters:1 um:zero minimum:10000 name:PM_CMPLU_STALL_VSU : Completion stall due to VSU instruction.
+event:0x1c042 counters:0 um:zero minimum:10000 name:PM_DATA_FROM_L2 : The processor's data cache was reloaded from local core's L2 due to a demand load or demand load plus prefetch controlled by MMCR1[20].
+event:0x1c040 counters:0 um:zero minimum:10000 name:PM_DATA_FROM_L2_NO_CONFLICT : The processor's data cache was reloaded from local core's L2 without conflict due to a demand load or demand load plus prefetch controlled by MMCR1[20] .
+event:0x4c042 counters:3 um:zero minimum:10000 name:PM_DATA_FROM_L3 : The processor's data cache was reloaded from local core's L3 due to a demand load.
+event:0x4c04e counters:3 um:zero minimum:10000 name:PM_DATA_FROM_L3MISS_MOD : The processor's data cache was reloaded from a localtion other than the local core's L3  due to a demand load.
+event:0x1c044 counters:0 um:zero minimum:10000 name:PM_DATA_FROM_L3_NO_CONFLICT : The processor's data cache was reloaded from local core's L3 without conflict due to a demand load or demand load plus prefetch controlled by MMCR1[20].
+event:0x2c048 counters:1 um:zero minimum:10000 name:PM_DATA_FROM_LMEM : The processor's data cache was reloaded  from the local chip's Memory due to a demand load.
+event:0x2c04c counters:1 um:zero minimum:10000 name:PM_DATA_FROM_MEMORY : The processor's data cache was reloaded from a memory location including L4 from local remote or distant due to a demand load.
+event:0x3e050 counters:2 um:zero minimum:10000 name:PM_DC_PREF_STREAM_STRIDED_CONF : A demand load referenced a line in an active strided prefetch stream.  The stream could have been allocated through the hardware prefetch mechanism or through software..
+event:0x4d01e counters:3 um:zero minimum:10000 name:PM_GCT_NOSLOT_BR_MPRED : Gct empty fo this thread due to  branch mispred.
+event:0x4d01a counters:3 um:zero minimum:10000 name:PM_GCT_NOSLOT_BR_MPRED_ICMISS : Gct empty fo this thread due to Icache Miss and branch mispred.
+event:0x2d01e counters:1 um:zero minimum:10000 name:PM_GCT_NOSLOT_DISP_HELD_ISSQ : Gct empty fo this thread due to dispatch hold on this thread due to Issue q full.
+event:0x2e010 counters:1 um:zero minimum:10000 name:PM_GCT_NOSLOT_DISP_HELD_OTHER : Gct empty fo this thread due to dispatch hold on this thread due to sync.
+event:0x2d01c counters:1 um:zero minimum:10000 name:PM_GCT_NOSLOT_DISP_HELD_SRQ : Gct empty fo this thread due to dispatch hold on this thread due to SRQ full.
+event:0x4e010 counters:3 um:zero minimum:10000 name:PM_GCT_NOSLOT_IC_L3MISS : Gct empty fo this thread due to  icach l3 miss.
+event:0x2d01a counters:1 um:zero minimum:10000 name:PM_GCT_NOSLOT_IC_MISS : Gct empty fo this thread due to Icache Miss.
+event:0x3000a counters:2 um:zero minimum:100000 name:PM_GRP_DISP : dispatch_success (Group Dispatched).
+event:0x10130 counters:0 um:zero minimum:10000 name:PM_GRP_MRK : Instruction marked in idu.
+event:0x2000a counters:1 um:zero minimum:10000 name:PM_HV_CYC : cycles in hypervisor mode .
+event:0x10002 counters:0 um:zero minimum:100000 name:PM_INST_CMPL :   PPC Instructions Finished (completed).
+event:0x10014 counters:0 um:zero minimum:100000 name:PM_IOPS_CMPL : IOPS Completed.
+event:0x1002e counters:0 um:zero minimum:10000 name:PM_LD_CMPL : count of Loads completed.
+event:0x10062 counters:0 um:zero minimum:10000 name:PM_LD_L3MISS_PEND_CYC : Cycles L3 miss was pending for this thread.
+event:0x1d142 counters:0 um:zero minimum:1000 name:PM_MRK_DATA_FROM_L2 : The processor's data cache was reloaded from local core's L2 due to a marked load.
+event:0x4c12e counters:3 um:zero minimum:1000 name:PM_MRK_DATA_FROM_L2MISS_CYC : Duration in cycles to reload  from a localtion other than the local core's L2   due to a marked load.
+event:0x4c122 counters:3 um:zero minimum:1000 name:PM_MRK_DATA_FROM_L2_CYC : Duration in cycles to reload  from local core's L2  due to a marked load.
+event:0x1d140 counters:0 um:zero minimum:1000 name:PM_MRK_DATA_FROM_L2_NO_CONFLICT : The processor's data cache was reloaded from local core's L2 without conflict due to a marked load.
+event:0x4c120 counters:3 um:zero minimum:1000 name:PM_MRK_DATA_FROM_L2_NO_CONFLICT_CYC : Duration in cycles to reload  from local core's L2 without conflict  due to a marked load.
+event:0x4d142 counters:3 um:zero minimum:1000 name:PM_MRK_DATA_FROM_L3 : The processor's data cache was reloaded from local core's L3 due to a marked load.
+event:0x2d12e counters:1 um:zero minimum:1000 name:PM_MRK_DATA_FROM_L3MISS_CYC : Duration in cycles to reload  from a localtion other than the local core's L3   due to a marked load.
+event:0x2d122 counters:1 um:zero minimum:1000 name:PM_MRK_DATA_FROM_L3_CYC : Duration in cycles to reload  from local core's L3  due to a marked load.
+event:0x1d144 counters:0 um:zero minimum:1000 name:PM_MRK_DATA_FROM_L3_NO_CONFLICT : The processor's data cache was reloaded from local core's L3 without conflict due to a marked load.
+event:0x4c124 counters:3 um:zero minimum:1000 name:PM_MRK_DATA_FROM_L3_NO_CONFLICT_CYC : Duration in cycles to reload  from local core's L3 without conflict  due to a marked load.
+event:0x1d14c counters:0 um:zero minimum:1000 name:PM_MRK_DATA_FROM_LL4 : The processor's data cache was reloaded  from the local chip's L4 cache due to a marked load.
+event:0x4c12c counters:3 um:zero minimum:1000 name:PM_MRK_DATA_FROM_LL4_CYC : Duration in cycles to reload   from the local chip's L4 cache  due to a marked load.
+event:0x2d148 counters:1 um:zero minimum:1000 name:PM_MRK_DATA_FROM_LMEM : The processor's data cache was reloaded  from the local chip's Memory due to a marked load.
+event:0x4d128 counters:3 um:zero minimum:1000 name:PM_MRK_DATA_FROM_LMEM_CYC : Duration in cycles to reload   from the local chip's Memory  due to a marked load.
+event:0x2d14c counters:1 um:zero minimum:1000 name:PM_MRK_DATA_FROM_MEMORY : The processor's data cache was reloaded from a memory location including L4 from local remote or distant due to a marked load.
+event:0x4d12c counters:3 um:zero minimum:1000 name:PM_MRK_DATA_FROM_MEMORY_CYC : Duration in cycles to reload  from a memory location including L4 from local remote or distant  due to a marked load.
+event:0x40130 counters:3 um:zero minimum:1000 name:PM_MRK_GRP_CMPL : marked instruction finished (completed).
+event:0x20130 counters:1 um:zero minimum:1000 name:PM_MRK_INST_DECODED : marked instruction decoded. Name from ISU?
+event:0x20114 counters:1 um:zero minimum:1000 name:PM_MRK_L2_RC_DISP : Marked Instruction RC dispatched in L2.
+event:0x4013e counters:3 um:zero minimum:1000 name:PM_MRK_LD_MISS_L1_CYC : Marked ld latency.
+event:0x3013e counters:2 um:zero minimum:1000 name:PM_MRK_STALL_CMPLU_CYC : Marked Group Completion Stall cycles (use edge detect to count  ).
+event:0x3006e counters:2 um:zero minimum:10000 name:PM_NEST_REF_CLK : Nest reference clocks.
+event:0x20010 counters:1 um:zero minimum:10000 name:PM_PMC1_OVERFLOW : Overflow from counter 1.
+event:0x30010 counters:2 um:zero minimum:10000 name:PM_PMC2_OVERFLOW : Overflow from counter 2.
+event:0x40010 counters:3 um:zero minimum:10000 name:PM_PMC3_OVERFLOW : Overflow from counter 3.
+event:0x10010 counters:0 um:zero minimum:10000 name:PM_PMC4_OVERFLOW : Overflow from counter 4.
+event:0x30024 counters:2 um:zero minimum:10000 name:PM_PMC6_OVERFLOW : Overflow from counter 6.
+event:0x40002 counters:3 um:zero minimum:10000 name:PM_PPC_CMPL :   PPC Instructions Finished (completed).
+event:0x2000c counters:1 um:zero minimum:100000 name:PM_THRD_ALL_RUN_CYC : All Threads in Run_cycles (was both threads in run_cycles).
+event:0x4016e counters:3 um:zero minimum:10000 name:PM_THRESH_NOT_MET : Threshold counter did not meet threshold.
diff --git a/events/ppc64/power8/unit_masks b/events/ppc64/power8/unit_masks
new file mode 100644
index 0000000..988dd41
--- /dev/null
+++ b/events/ppc64/power8/unit_masks
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1,9 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+#
+# Copyright OProfile authors
+# Copyright (c) International Business Machines, 2013.
+# Contributed by Maynard Johnson &amp;lt;maynardj&amp;lt; at &amp;gt;us.ibm.com&amp;gt;.
+#
+# ppc64 POWER8 possible unit masks
+#
+name:zero type:mandatory default:0x0
+0x0 No unit mask
diff --git a/libop/op_cpu_type.c b/libop/op_cpu_type.c
index 8962e97..afb015b 100644
--- a/libop/op_cpu_type.c
+++ b/libop/op_cpu_type.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -117,6 +117,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static struct cpu_descr const cpu_descrs[MAX_CPU_TYPE] = {
 { "IBM zEnterprise EC12", "s390/zEC12", CPU_S390_ZEC12, 1 },
 { "AMD64 generic", "x86-64/generic", CPU_AMD64_GENERIC, 4 },
 { "IBM Power Architected Events V1", "ppc64/architected_events_v1", CPU_PPC64_ARCH_V1, 6 },
+{ "ppc64 POWER8", "ppc64/power8", CPU_PPC64_POWER8, 6 },
 };
  
 static size_t const nr_cpu_descrs = sizeof(cpu_descrs) / sizeof(struct cpu_descr);
diff --git a/libop/op_cpu_type.h b/libop/op_cpu_type.h
index 889fc76..aeb6bb2 100644
--- a/libop/op_cpu_type.h
+++ b/libop/op_cpu_type.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -104,6 +104,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; typedef enum {
 CPU_S390_ZEC12, /**&amp;lt; IBM zEnterprise EC12 */
 CPU_AMD64_GENERIC, /**&amp;lt; AMD64 Generic */
 CPU_PPC64_ARCH_V1, /** &amp;lt; IBM Power architected events version 1 */
+CPU_PPC64_POWER8, /**&amp;lt; ppc64 POWER8 family */
 MAX_CPU_TYPE
 } op_cpu;
 
diff --git a/libop/op_events.c b/libop/op_events.c
index e5ecbcc..158c669 100644
--- a/libop/op_events.c
+++ b/libop/op_events.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1226,6 +1226,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; void op_default_event(op_cpu cpu_type, struct op_default_event_descr * descr)
 case CPU_PPC64_POWER7:
 case CPU_PPC64_IBM_COMPAT_V1:
 case CPU_PPC64_ARCH_V1:
+case CPU_PPC64_POWER8:
 descr-&amp;gt;name = "CYCLES";
 break;
 
diff --git a/utils/opcontrol b/utils/opcontrol
index 373e993..038e0db 100644
--- a/utils/opcontrol
+++ b/utils/opcontrol
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -398,6 +398,11 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; do_init()
 ia64/*)
 IS_PERFMON=$KERNEL_SUPPORT
 ;;
+ppc64/power8)
+echo "*** IBM POWER 8 processor is not supported with opcontrol.  Please use operf instead. ***"
+do_deinit
+exit 1
+;;
 esac
 fi
 
diff --git a/utils/ophelp.c b/utils/ophelp.c
index f4242cb..0ea31ca 100644
--- a/utils/ophelp.c
+++ b/utils/ophelp.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -671,8 +671,10 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; int main(int argc, char const * argv[])
 break;
 
 case CPU_PPC64_ARCH_V1:
+case CPU_PPC64_POWER8:
 event_doc =
-"See Power ISA 2.07 at https://www.power.org/\n";
+"This processor type is fully supported with operf, but is not supported with opcontrol.\n"
+"See Power ISA 2.07 at https://www.power.org/\n\n";
 break;
 
 case CPU_PPC64_CELL:
&lt;/pre&gt;</description>
    <dc:creator>Maynard Johnson</dc:creator>
    <dc:date>2013-05-24T15:35:20</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.oprofile/11530">
    <title>Re: Oprofile support for PowerPC MPC8xx</title>
    <link>http://permalink.gmane.org/gmane.linux.oprofile/11530</link>
    <description>&lt;pre&gt;You'd have to use an version of oprofile older than 0.9.8 to get the 2.4 kernel support.
I guess this is a Freescale processor.  *Matthew*, can you offer any tips to Joao?  Thanks.

-Maynard


------------------------------------------------------------------------------
Try New Relic Now &amp;amp; We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service 
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, &amp;amp; servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may
&lt;/pre&gt;</description>
    <dc:creator>Maynard Johnson</dc:creator>
    <dc:date>2013-05-24T13:34:03</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.oprofile/11529">
    <title>Oprofile support for PowerPC MPC8xx</title>
    <link>http://permalink.gmane.org/gmane.linux.oprofile/11529</link>
    <description>&lt;pre&gt;Hello,

I'm interested in using OProfile for PowerPC processors, in particular the MPC853T running on Linux Kernel 2.4.  Is OProfile compatible with this configuration?
The MPC853T  belongs to the MPC8xx series that use the PowerQuicc I architecture. The documentation says that there's limited support for the 32 bit PowerPCs in particular for the 2.4 kernel, so I'd like to know if this includes that processor and if possible I'd also like to know a bit more about those limitations.

Can someone help me?

Thanks in advance
João Cabeleira

------------------------------------------------------------------------------
Try New Relic Now &amp;amp; We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service 
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, &amp;amp; servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may_______________________________________________
oprofile-list mailing list
oprofile-list&amp;lt; at &amp;gt;lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oprofile-list
&lt;/pre&gt;</description>
    <dc:creator>Cabeleira, Joao (EXT-RandstadTechnologies - PT/Amadora</dc:creator>
    <dc:date>2013-05-24T12:18:20</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.oprofile/11528">
    <title>Re: [PATCH] Fix bug if .oprofile/dameonrc doesn't exists</title>
    <link>http://permalink.gmane.org/gmane.linux.oprofile/11528</link>
    <description>&lt;pre&gt;
Patch committed.  Thanks.

-Maynard



------------------------------------------------------------------------------
Try New Relic Now &amp;amp; We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service 
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, &amp;amp; servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may
&lt;/pre&gt;</description>
    <dc:creator>Maynard Johnson</dc:creator>
    <dc:date>2013-05-24T12:18:00</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.oprofile/11527">
    <title>Re: [PATCH] Fix Qt4 error messages at oprof_start startup</title>
    <link>http://permalink.gmane.org/gmane.linux.oprofile/11527</link>
    <description>&lt;pre&gt;Richard, could you please review this patch?  Thanks!

-Maynard

On 05/23/2013 10:14 AM, Gilles Allard wrote:


------------------------------------------------------------------------------
Try New Relic Now &amp;amp; We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service 
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, &amp;amp; servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may
&lt;/pre&gt;</description>
    <dc:creator>Maynard Johnson</dc:creator>
    <dc:date>2013-05-24T11:49:26</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.oprofile/11526">
    <title>[PATCH] Fix bug if .oprofile/dameonrc doesn't exists</title>
    <link>http://permalink.gmane.org/gmane.linux.oprofile/11526</link>
    <description>&lt;pre&gt;This patch fixes a bug if daemonrc file doesn't exist or doesn't contain a 
'BUF_SIZE=' line : initalizes 'buffer_size' to the default value to prevent 
unpredictable value

Signed-off-by: Gilles Allard &amp;lt;gilles.allard21&amp;lt; at &amp;gt;orange.fr&amp;gt;
---
 gui/oprof_start_config.cpp |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/gui/oprof_start_config.cpp b/gui/oprof_start_config.cpp
index 02bfe64..40c6e3d 100644
--- a/gui/oprof_start_config.cpp
+++ b/gui/oprof_start_config.cpp
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -34,6 +34,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; event_setting::event_setting()
 
 config_setting::config_setting()
 :
+buffer_size(OP_DEFAULT_BUF_SIZE),
 no_kernel(false),
 verbose(false),
 separate_lib(false),
&lt;/pre&gt;</description>
    <dc:creator>Gilles Allard</dc:creator>
    <dc:date>2013-05-23T15:19:39</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.oprofile/11525">
    <title>[PATCH] Fix Qt4 error messages at oprof_start startup</title>
    <link>http://permalink.gmane.org/gmane.linux.oprofile/11525</link>
    <description>&lt;pre&gt;This patch fixes error messages send by Qt4 ( Qt4-4.8.2 ) during oprof_start 
startup.
This is a minor bug: errors detected by Qt don't seem to prevent oprof_start 
from working

Signed-off-by: Gilles Allard &amp;lt;gilles.allard21&amp;lt; at &amp;gt;orange.fr&amp;gt;
---
 gui/oprof_start.cpp        |   12 ++++++------
 gui/oprof_start.h          |   10 +++++-----
 gui/ui/oprof_start.base.ui |   28 ++++++++++++++--------------
 3 files changed, 25 insertions(+), 25 deletions(-)

diff --git a/gui/oprof_start.cpp b/gui/oprof_start.cpp
index 7f46a18..daa513d 100644
--- a/gui/oprof_start.cpp
+++ b/gui/oprof_start.cpp
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -843,7 +843,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; uint oprof_start::max_perf_count() const
 }
 
 
-void oprof_start::on_flush_profiler_data()
+void oprof_start::on_flush_profiler_data_btn_clicked(bool /* checked */)
 {
 vector&amp;lt;string&amp;gt; args;
 args.push_back("--dump");
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -856,7 +856,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; void oprof_start::on_flush_profiler_data()
 
 
 // user is happy of its setting.
-void oprof_start::on_start_profiler()
+void oprof_start::on_start_profiler_btn_clicked(bool /* checked */)
 {
 // save the current settings
 record_selected_event_config();
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -928,7 +928,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; void oprof_start::on_start_profiler()
 return;
 
 // this flush profiler data also.
-on_stop_profiler();
+on_stop_profiler_btn_clicked();
 }
 
 vector&amp;lt;string&amp;gt; args;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1030,7 +1030,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; bool oprof_start::save_config()
 
 
 // flush and stop the profiler if it was started.
-void oprof_start::on_stop_profiler()
+void oprof_start::on_stop_profiler_btn_clicked(bool /* checked */)
 {
 vector&amp;lt;string&amp;gt; args;
 args.push_back("--shutdown");
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1044,13 +1044,13 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; void oprof_start::on_stop_profiler()
 }
 
 
-void oprof_start::on_separate_kernel_cb_changed(int state)
+void oprof_start::on_separate_kernel_cb_stateChanged(int state)
 {
 if (state == 2)
 separate_lib_cb-&amp;gt;setChecked(true);
 }
 
-void oprof_start::on_reset_sample_files()
+void oprof_start::on_reset_sample_files_btn_clicked(bool /* checked */)
 {
 int ret = QMessageBox::warning(this, 0, "Are you sure you want to "
        "reset your last profile session ?", "Yes", "No", 0, 0, 1);
diff --git a/gui/oprof_start.h b/gui/oprof_start.h
index 477e3f4..5172c68 100644
--- a/gui/oprof_start.h
+++ b/gui/oprof_start.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -60,19 +60,19 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; protected slots:
 /// select the kernel image filename
 void choose_kernel_filename();
 /// flush profiler
-void on_flush_profiler_data();
+void on_flush_profiler_data_btn_clicked(bool);
 /// start profiler
-void on_start_profiler();
+void on_start_profiler_btn_clicked(bool);
 /// stop profiler
-void on_stop_profiler();
+void on_stop_profiler_btn_clicked(bool checked = false);
 /// events selection change
 void event_selected();
 /// the mouse is over an event
 void event_over(Q3ListViewItem *);
 /// state of separate_kernel_cb changed
-void on_separate_kernel_cb_changed(int);
+void on_separate_kernel_cb_stateChanged(int);
 /// reset sample files
-void on_reset_sample_files();
+void on_reset_sample_files_btn_clicked(bool);
 
 /// close the dialog
 void accept();
diff --git a/gui/ui/oprof_start.base.ui b/gui/ui/oprof_start.base.ui
index 4fcc43f..863abfa 100644
--- a/gui/ui/oprof_start.base.ui
+++ b/gui/ui/oprof_start.base.ui
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1063,21 +1063,21 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 &amp;lt;connections&amp;gt;
     &amp;lt;connection&amp;gt;
         &amp;lt;sender&amp;gt;start_profiler_btn&amp;lt;/sender&amp;gt;
-        &amp;lt;signal&amp;gt;clicked()&amp;lt;/signal&amp;gt;
+        &amp;lt;signal&amp;gt;clicked(bool)&amp;lt;/signal&amp;gt;
         &amp;lt;receiver&amp;gt;oprof_start_base&amp;lt;/receiver&amp;gt;
-        &amp;lt;slot&amp;gt;on_start_profiler()&amp;lt;/slot&amp;gt;
+        &amp;lt;slot&amp;gt;on_start_profiler_btn_clicked(bool)&amp;lt;/slot&amp;gt;
     &amp;lt;/connection&amp;gt;
     &amp;lt;connection&amp;gt;
         &amp;lt;sender&amp;gt;stop_profiler_btn&amp;lt;/sender&amp;gt;
-        &amp;lt;signal&amp;gt;clicked()&amp;lt;/signal&amp;gt;
+        &amp;lt;signal&amp;gt;clicked(bool)&amp;lt;/signal&amp;gt;
         &amp;lt;receiver&amp;gt;oprof_start_base&amp;lt;/receiver&amp;gt;
-        &amp;lt;slot&amp;gt;on_stop_profiler()&amp;lt;/slot&amp;gt;
+        &amp;lt;slot&amp;gt;on_stop_profiler_btn_clicked(bool)&amp;lt;/slot&amp;gt;
     &amp;lt;/connection&amp;gt;
     &amp;lt;connection&amp;gt;
         &amp;lt;sender&amp;gt;flush_profiler_data_btn&amp;lt;/sender&amp;gt;
-        &amp;lt;signal&amp;gt;clicked()&amp;lt;/signal&amp;gt;
+        &amp;lt;signal&amp;gt;clicked(bool)&amp;lt;/signal&amp;gt;
         &amp;lt;receiver&amp;gt;oprof_start_base&amp;lt;/receiver&amp;gt;
-        &amp;lt;slot&amp;gt;on_flush_profiler_data()&amp;lt;/slot&amp;gt;
+        &amp;lt;slot&amp;gt;on_flush_profiler_data_btn_clicked(bool)&amp;lt;/slot&amp;gt;
     &amp;lt;/connection&amp;gt;
     &amp;lt;connection&amp;gt;
         &amp;lt;sender&amp;gt;quit_and_save_btn&amp;lt;/sender&amp;gt;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1113,13 +1113,13 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
         &amp;lt;sender&amp;gt;separate_kernel_cb&amp;lt;/sender&amp;gt;
         &amp;lt;signal&amp;gt;stateChanged(int)&amp;lt;/signal&amp;gt;
         &amp;lt;receiver&amp;gt;oprof_start_base&amp;lt;/receiver&amp;gt;
-        &amp;lt;slot&amp;gt;on_separate_kernel_cb_changed(int)&amp;lt;/slot&amp;gt;
+        &amp;lt;slot&amp;gt;on_separate_kernel_cb_stateChanged(int)&amp;lt;/slot&amp;gt;
     &amp;lt;/connection&amp;gt;
     &amp;lt;connection&amp;gt;
         &amp;lt;sender&amp;gt;reset_sample_files_btn&amp;lt;/sender&amp;gt;
-        &amp;lt;signal&amp;gt;clicked()&amp;lt;/signal&amp;gt;
+        &amp;lt;signal&amp;gt;clicked(bool)&amp;lt;/signal&amp;gt;
         &amp;lt;receiver&amp;gt;oprof_start_base&amp;lt;/receiver&amp;gt;
-        &amp;lt;slot&amp;gt;on_reset_sample_files()&amp;lt;/slot&amp;gt;
+        &amp;lt;slot&amp;gt;on_reset_sample_files_btn_clicked(bool)&amp;lt;/slot&amp;gt;
     &amp;lt;/connection&amp;gt;
     &amp;lt;connection&amp;gt;
         &amp;lt;sender&amp;gt;events_list&amp;lt;/sender&amp;gt;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1142,11 +1142,11 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
     &amp;lt;slot access="protected"&amp;gt;choose_kernel_filename()&amp;lt;/slot&amp;gt;
     &amp;lt;slot access="protected"&amp;gt;event_over(QListViewItem *)&amp;lt;/slot&amp;gt;
     &amp;lt;slot access="protected"&amp;gt;event_selected()&amp;lt;/slot&amp;gt;
-    &amp;lt;slot access="protected"&amp;gt;on_reset_sample_files()&amp;lt;/slot&amp;gt;
-    &amp;lt;slot access="protected"&amp;gt;on_flush_profiler_data()&amp;lt;/slot&amp;gt;
-    &amp;lt;slot access="protected"&amp;gt;on_separate_kernel_cb_changed(int)&amp;lt;/slot&amp;gt;
-    &amp;lt;slot access="protected"&amp;gt;on_start_profiler()&amp;lt;/slot&amp;gt;
-    &amp;lt;slot access="protected"&amp;gt;on_stop_profiler()&amp;lt;/slot&amp;gt;
+    &amp;lt;slot access="protected"&amp;gt;on_reset_sample_files_btn_clicked(bool)&amp;lt;/slot&amp;gt;
+    &amp;lt;slot access="protected"&amp;gt;on_flush_profiler_data_btn_clicked(bool)&amp;lt;/slot&amp;gt;
+    &amp;lt;slot access="protected"&amp;gt;on_separate_kernel_cb_stateChanged(int)&amp;lt;/slot&amp;gt;
+    &amp;lt;slot access="protected"&amp;gt;on_start_profiler_btn_clicked(bool)&amp;lt;/slot&amp;gt;
+    &amp;lt;slot access="protected"&amp;gt;on_stop_profiler_btn_clicked(bool)&amp;lt;/slot&amp;gt;
 &amp;lt;/connections&amp;gt;
 &amp;lt;tabstops&amp;gt;
     &amp;lt;tabstop&amp;gt;setup_config_tab&amp;lt;/tabstop&amp;gt;
&lt;/pre&gt;</description>
    <dc:creator>Gilles Allard</dc:creator>
    <dc:date>2013-05-23T15:14:14</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.oprofile/11524">
    <title>oprofile on blackfin uClinux system</title>
    <link>http://permalink.gmane.org/gmane.linux.oprofile/11524</link>
    <description>&lt;pre&gt;Hello,

This is my first post here. Sorry if the issue is to basic for this list.

I am tiring to run oprofile on a Blackfin uClinux based system. 
I have compiled the oprofile as it is described in the link http://docs.blackfin.uclinux.org/doku.php?id=linux-kernel:oprofile&amp;amp;s[]=oprofile
I am compiling some external (from uClinux) software components like the telephony components Asterisk DAHDI etc. 

When I try to run oprofile I get 

root&amp;lt; at &amp;gt;pr1:~&amp;gt; /usr/bin/bfin_opcontrol --init
mkdir: can't create directory '/var/lib/': File exists
root&amp;lt; at &amp;gt;pr1:~&amp;gt; /usr/bin/bfin_opcontrol --start-daemon &amp;amp;
[1] 469 /usr/bin/bfin_opcontrol --start-daemon
root&amp;lt; at &amp;gt;pr1:~&amp;gt; Using 2.6+ OProfile kernel interface.
Reading module info.
Using log file /var/lib/oprofile/oprofiled.log

[1] Done                   /usr/bin/bfin_opcontrol --start-daemon
root&amp;lt; at &amp;gt;pr1:~&amp;gt; /usr/bin/bfin_opcontrol --start
root&amp;lt; at &amp;gt;pr1:~&amp;gt; /usr/bin/bfin_opcontrol --dump
root&amp;lt; at &amp;gt;pr1:~&amp;gt; /usr/bin/opreport -l
/usr/bin/opreport error: /var/lib/oprofile/samples/current/{kern}/dahdi/{dep}/{kern}/dahdi/TIMER.0.0.all.all.all: No such device


in the log I see:
root&amp;lt; at &amp;gt;pr1:~&amp;gt; cat /var/lib/oprofile/oprofiled.log 
oprofiled started Thu May 23 01:37:26 2013
kernel pointer size: 4
oprofiled: open of /var/lib/oprofile/samples/current/{root}/./vmlinux/{dep}/{root}/./vmlinux/TIMER.0.0.all.all.all failed: No such device
oprofiled: open of /var/lib/oprofile/samples/current/{root}/./vmlinux/{dep}/{root}/./vmlinux/TIMER.0.0.all.all.all failed: No such device
oprofiled: open of /var/lib/oprofile/samples/current/{root}/./vmlinux/{dep}/{root}/./vmlinux/TIMER.0.0.all.all.all failed: No such device
oprofiled: open of /var/lib/oprofile/samples/current/{root}/./vmlinux/{dep}/{root}/./vmlinux/TIMER.0.0.all.all.all failed: No such device
oprofiled: open of /var/lib/oprofile/samples/current/{root}/./vmlinux/{dep}/{root}/./vmlinux/TIMER.0.0.all.all.all failed: No such device
oprofiled: open of /var/lib/oprofile/samples/current/{root}/./vmlinux/{dep}/{root}/./vmlinux/TIMER.0.0.all.all.all failed: No such device
oprofiled: open of /var/lib/oprofile/samples/current/{root}/./vmlinux/{dep}/{root}/./vmlinux/TIMER.0.0.all.all.all failed: No such device
oprofiled: open of /var/lib/oprofile/samples/current/{root}/./vmlinux/{dep}/{root}/./vmlinux/TIMER.0.0.all.all.all failed: No such device
oprofiled: open of /var/lib/oprofile/samples/current/{root}/./vmlinux/{dep}/{root}/./vmlinux/TIMER.0.0.all.all.all failed: No such device
oprofiled: open of /var/lib/oprofile/samples/current/{root}/./vmlinux/{dep}/{root}/./vmlinux/TIMER.0.0.all.all.all failed: No such device
oprofiled: open of /var/lib/oprofile/samples/current/{root}//usr/lib/asterisk/modules/chan_iax2.so/{dep}/{root}//usr/lib/asterisk/modules/chan_iax2.so/TIMER.0.0.all.all.all failed: No such device
oprofiled: open of /var/lib/oprofile/samples/current/{root}//lib/libpthread.so.0/{dep}/{root}//lib/libpthread.so.0/TIMER.0.0.all.all.all failed: No such device
oprofiled: open of /var/lib/oprofile/samples/current/{root}//lib/libpthread.so.0/{dep}/{root}//lib/libpthread.so.0/TIMER.0.0.all.all.all failed: No such device
oprofiled: open of /var/lib/oprofile/samples/current/{root}//lib/libpthread.so.0/{dep}/{root}//lib/libpthread.so.0/TIMER.0.0.all.all.all failed: No such device
oprofiled: open of /var/lib/oprofile/samples/current/{kern}/dahdi/{dep}/{kern}/dahdi/TIMER.0.0.all.all.all failed: No such device
oprofiled: open of /var/lib/oprofile/samples/current/{root}//lib/libpthread.so.0/{dep}/{root}//lib/libpthread.so.0/TIMER.0.0.all.all.all failed: No such device
oprofiled: open of /var/lib/oprofile/samples/current/{kern}/dahdi/{dep}/{kern}/dahdi/TIMER.0.0.all.all.all failed: No such device
oprofiled: open of /var/lib/oprofile/samples/current/{root}/./vmlinux/{dep}/{root}/./vmlinux/TIMER.0.0.all.all.all failed: No such device
oprofiled: open of /var/lib/oprofile/samples/current/{root}/./vmlinux/{dep}/{root}/./vmlinux/TIMER.0.0.all.all.all failed: No such device
oprofiled: open of /var/lib/oprofile/samples/current/{root}/./vmlinux/{dep}/{root}/./vmlinux/TIMER.0.0.all.all.all failed: No such device
oprofiled: open of /var/lib/oprofile/samples/current/{root}//usr/lib/asterisk/modules/chan_iax2.so/{dep}/{root}//usr/lib/asterisk/modules/chan_iax2.so/TIMER.0.0.all.all.all failed: No such device
oprofiled: open of /var/lib/oprofile/samples/current/{root}//lib/libc.so.0/{dep}/{root}//lib/libc.so.0/TIMER.0.0.all.all.all failed: No such device
oprofiled: open of /var/lib/oprofile/samples/current/{root}/./vmlinux/{dep}/{root}/./vmlinux/TIMER.0.0.all.all.all failed: No such device
oprofiled: open of /var/lib/oprofile/samples/current/{kern}/dahdi/{dep}/{kern}/dahdi/TIMER.0.0.all.all.all failed: No such device
oprofiled: open of /var/lib/oprofile/samples/current/{root}/./vmlinux/{dep}/{root}/./vmlinux/TIMER.0.0.all.all.all failed: No such device
oprofiled: open of /var/lib/oprofile/samples/current/{root}/./vmlinux/{dep}/{root}/./vmlinux/TIMER.0.0.all.all.all failed: No such device
oprofiled: open of /var/lib/oprofile/samples/current/{root}/./vmlinux/{dep}/{root}/./vmlinux/TIMER.0.0.all.all.all failed: No such device
oprofiled: open of /var/lib/oprofile/samples/current/{root}/./vmlinux/{dep}/{root}/./vmlinux/TIMER.0.0.all.all.all failed: No such device
oprofiled: open of /var/lib/oprofile/samples/current/{root}/./vmlinux/{dep}/{root}/./vmlinux/TIMER.0.0.all.all.all failed: No such device
oprofiled: open of /var/lib/oprofile/samples/current/{root}/./vmlinux/{dep}/{root}/./vmlinux/TIMER.0.0.all.all.all failed: No such device
oprofiled: open of /var/lib/oprofile/samples/current/{root}/./vmlinux/{dep}/{root}/./vmlinux/TIMER.0.0.all.all.all failed: No such device
oprofiled: open of /var/lib/oprofile/samples/current/{root}/./vmlinux/{dep}/{root}/./vmlinux/TIMER.0.0.all.all.all failed: No such device


What may be wrong?

Thank you!
Dimitar------------------------------------------------------------------------------
Try New Relic Now &amp;amp; We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service 
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, &amp;amp; servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may_______________________________________________
oprofile-list mailing list
oprofile-list&amp;lt; at &amp;gt;lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oprofile-list
&lt;/pre&gt;</description>
    <dc:creator>Dimitar Penev</dc:creator>
    <dc:date>2013-05-23T07:00:24</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.oprofile/11523">
    <title>RE: Revive this old patch</title>
    <link>http://permalink.gmane.org/gmane.linux.oprofile/11523</link>
    <description>&lt;pre&gt;
Sorry, I must have missed that, and I havn't used OProfile since then. Good to see the patch used. :-)

Regards,
Patrik Hägglund

-----Original Message-----
From: Maynard Johnson [mailto:maynardj&amp;lt; at &amp;gt;us.ibm.com]
Sent: den 22 maj 2013 15:35
To: Mark Pearson
Cc: oprofile-list&amp;lt; at &amp;gt;lists.sf.net; Patrik Hägglund H
Subject: Re: Revive this old patch

On 05/21/2013 02:54 PM, Mark Pearson wrote:
Hi, Mark,
Yeah, this patch seemed on the verge of being accepted back in November 2008.  I reviewed the patch and made some comments to the submitter (Patrik), but he never replied, and it just got forgotten in the backlog.  Since we have the original patch from Patrik with his Signed-off-by line -- and the patch has been fully reviewed/vetted already -- I went ahead and committed it to our upstream git repo.  Enjoy!

-Maynard


------------------------------------------------------------------------------
Try New Relic Now &amp;amp; We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service 
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, &amp;amp; servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may
&lt;/pre&gt;</description>
    <dc:creator>Patrik Hägglund H</dc:creator>
    <dc:date>2013-05-22T16:32:41</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.oprofile/11522">
    <title>Re: Revive this old patch</title>
    <link>http://permalink.gmane.org/gmane.linux.oprofile/11522</link>
    <description>&lt;pre&gt;Awesome - many thanks :)
Mark

On 13-05-22 09:34 AM, Maynard Johnson wrote:


------------------------------------------------------------------------------
Try New Relic Now &amp;amp; We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service 
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, &amp;amp; servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may
&lt;/pre&gt;</description>
    <dc:creator>Mark Pearson</dc:creator>
    <dc:date>2013-05-22T14:40:07</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.oprofile/11521">
    <title>[PATCH] Fix recent regression involving unit mask values of '0'</title>
    <link>http://permalink.gmane.org/gmane.linux.oprofile/11521</link>
    <description>&lt;pre&gt;Fix recent regression involving unit mask values of '0'

A patch that I wrote and committed on Jan 23, 2013 broke
unit mask handling for mask values of '0'.  As far as I
can tell, i386/core_2 is the only cpu type that has unit
masks with values of '0'.  So, for example, the following
command will fail as shown below:

   operf -e L2_M_LINES_OUT:100000:0 ls
   Invalid unit mask 0x0 for event L2_M_LINES_OUT
   Error retrieving info for event L2_M_LINES_OUT:100000:0

This patch fixes that problem.

Signed-off-by: Maynard Johnson &amp;lt;maynardj&amp;lt; at &amp;gt;us.ibm.com&amp;gt;
---
 libop/op_events.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/libop/op_events.c b/libop/op_events.c
index e5ecbcc..b82128e 100644
--- a/libop/op_events.c
+++ b/libop/op_events.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1064,6 +1064,14 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int _is_um_valid_bitmask(struct op_event * event, u32 passed_um)
 }
 evt.unit = tmp_um_no_dups;
 
+// Now check if passed um==0 and if the defined event has a UM with value '0'.
+if (!passed_um) {
+for (i = 0; i &amp;lt; evt.unit-&amp;gt;num; i++) {
+if (!evt.unit-&amp;gt;um[i].value)
+return 1;
+}
+}
+
 /* Finally, we'll see if the passed unit mask value can be matched with a
  * mask of available unit mask values. We check for this by determining
  * whether the exact bits set in the current um are also set in the
&lt;/pre&gt;</description>
    <dc:creator>Maynard Johnson</dc:creator>
    <dc:date>2013-05-22T14:11:45</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.oprofile/11520">
    <title>Re: [PATCH] Add support for Intel Netburst (e.g., Pentium P4) to operf</title>
    <link>http://permalink.gmane.org/gmane.linux.oprofile/11520</link>
    <description>&lt;pre&gt;[snip]

Patch committed.

-Maynard


------------------------------------------------------------------------------
Try New Relic Now &amp;amp; We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service 
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, &amp;amp; servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may
&lt;/pre&gt;</description>
    <dc:creator>Maynard Johnson</dc:creator>
    <dc:date>2013-05-22T13:44:26</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.oprofile/11519">
    <title>Re: Revive this old patch</title>
    <link>http://permalink.gmane.org/gmane.linux.oprofile/11519</link>
    <description>&lt;pre&gt;Hi, Mark,
Yeah, this patch seemed on the verge of being accepted back in November 2008.  I reviewed the patch and made some comments to the submitter (Patrik), but he never replied, and it just got forgotten in the backlog.  Since we have the original patch from Patrik with his Signed-off-by line -- and the patch has been fully reviewed/vetted already -- I went ahead and committed it to our upstream git repo.  Enjoy!

-Maynard


------------------------------------------------------------------------------
Try New Relic Now &amp;amp; We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service 
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, &amp;amp; servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may
&lt;/pre&gt;</description>
    <dc:creator>Maynard Johnson</dc:creator>
    <dc:date>2013-05-22T13:34:33</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.oprofile/11518">
    <title>Revive this old patch</title>
    <link>http://permalink.gmane.org/gmane.linux.oprofile/11518</link>
    <description>&lt;pre&gt;I'd like to revive this old patch from 2008:

    diff -u a/utils/opcontrol b/utils/opcontrol
    --- a/utils/opcontrol    2008-11-11 14:31:25.000000000 +0100
    +++ b/utils/opcontrol        2008-11-11 12:30:42.000000000 +0100
    &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -187,7 +187,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
                     fi
             fi
             mkdir /dev/oprofile &amp;gt;/dev/null 2&amp;gt;&amp;amp;1
    -       grep oprofilefs /etc/mtab &amp;gt;/dev/null
    +       grep oprofilefs /proc/mounts &amp;gt;/dev/null
             if test "$?" -ne 0; then
                     mount -t oprofilefs nodev /dev/oprofile &amp;gt;/dev/null
             fi
    &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1607,7 +1607,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
      do_deinit()
      {
             # unmount /dev/oprofile if it is mounted
    -       OPROF_FS=`grep /dev/oprofile /etc/mtab`
    +       OPROF_FS=`grep /dev/oprofile /proc/mounts`
             if test -n "$OPROF_FS"; then
                     umount /dev/oprofile
             fi
    &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1705,7 +1705,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
      check_version()
      {
             OPROFILE_AVAILABLE=no
    -       grep oprofilefs /etc/mtab &amp;gt;/dev/null
    +       grep oprofilefs /proc/mounts &amp;gt;/dev/null
             if test "$?" -eq 0; then
                     # need to have oprofilefs mounted for this to work
    on 2.6
                     KERNEL_SUPPORT=yes

    Regards,
    Patrik Hägglund

Let me know if there is anything I can do to help with this. Turns out 
this fix is important for our busybox system as well.

Thanks
Mark Pearson
------------------------------------------------------------------------------
Try New Relic Now &amp;amp; We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service 
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, &amp;amp; servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may_______________________________________________
oprofile-list mailing list
oprofile-list&amp;lt; at &amp;gt;lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oprofile-list
&lt;/pre&gt;</description>
    <dc:creator>Mark Pearson</dc:creator>
    <dc:date>2013-05-21T19:54:33</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.oprofile/11517">
    <title>Re: [PATCH] Add support for Intel Netburst (e.g., Pentium P4) to operf</title>
    <link>http://permalink.gmane.org/gmane.linux.oprofile/11517</link>
    <description>&lt;pre&gt;See http://oprofile.git.sourceforge.net/git/gitweb-index.cgi for a list of all 4 sub-projects of oprofile.  The testsuite can be obtained using the following command:

    git clone git://oprofile.git.sourceforge.net/gitroot/oprofile/oprofile-tests

This looks very similar to what I see on my Intel Core 2 Duo when comparing opcontrol results to operf results -- 1) the number of operf samples in memcpyt.c:main is about triple what I get from opcontrol; 2) about 30% more vmlinux samples with operf; 3) number of samples in libc:memcpy is roughly equivalent between operf and opcontrol.  So I think the P4 patch looks to be good, so far.  I will commit soon unless I get some review comments from others in the community.  Thanks again for testing it.

-Maynard


------------------------------------------------------------------------------
Try New Relic Now &amp;amp; We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service 
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, &amp;amp; servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may
&lt;/pre&gt;</description>
    <dc:creator>Maynard Johnson</dc:creator>
    <dc:date>2013-05-21T17:36:39</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.oprofile/11516">
    <title>Re: [PATCH] Add support for Intel Netburst (e.g., Pentium P4) to operf</title>
    <link>http://permalink.gmane.org/gmane.linux.oprofile/11516</link>
    <description>&lt;pre&gt;

Is this testsuite included in the master branch of official repository ? I 
didn't find it in the copy I got using "git clone" ( I just found a few test 
programs in some lib* sub-directories )


Using the "memcpyt" test program, the results printed by "opreport --symbols" 
are as follows

First "opcontrol based" profiler:

CPU: P4 / Xeon, speed 2e+06 MHz (estimated)
Counted GLOBAL_POWER_EVENTS events (time during which processor is not 
stopped) with a unit mask of 0x01 (mandatory) count 100000
samples  %        image name               symbol name
813263   97.3844  libc-2.11.1.so           memcpy
12138     1.4535  no-vmlinux               /no-vmlinux
9699      1.1614  memcpyt                  main
2        2.4e-04  ld-2.11.1.so             do_lookup_x
1        1.2e-04  ld-2.11.1.so             _dl_catch_error
1        1.2e-04  ld-2.11.1.so             _dl_relocate_object
1        1.2e-04  ld-2.11.1.so             malloc
1        1.2e-04  libc-2.11.1.so           __rpc_thread_destroy

Then "operf based" one:

CPU: P4 / Xeon, speed 2e+06 MHz (estimated)
Counted GLOBAL_POWER_EVENTS events (time during which processor is not 
stopped) with a unit mask of 0x01 (mandatory) count 100000
samples  %        image name               symbol name
859583   93.1878  libc-2.11.1.so           memcpy
45686     4.9528  memcpyt                  main
17140     1.8582  no-vmlinux               /no-vmlinux
3        3.3e-04  ld-2.11.1.so             _dl_relocate_object
1        1.1e-04  ld-2.11.1.so             _dl_debug_initialize
1        1.1e-04  ld-2.11.1.so             _dl_receive_error
1        1.1e-04  ld-2.11.1.so             check_match.8201
1        1.1e-04  ld-2.11.1.so             free_mem
1        1.1e-04  ld-2.11.1.so             mempcpy
1        1.1e-04  ld-2.11.1.so             process_envvars
1        1.1e-04  libc-2.11.1.so           _IO_check_libio
1        1.1e-04  libc-2.11.1.so           _init

Gilles Allard


------------------------------------------------------------------------------
Try New Relic Now &amp;amp; We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service 
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, &amp;amp; servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may
&lt;/pre&gt;</description>
    <dc:creator>Gilles Allard</dc:creator>
    <dc:date>2013-05-21T17:22:53</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.oprofile/11515">
    <title>Re: [PATCH] Add support for Intel Netburst (e.g., Pentium P4) to operf</title>
    <link>http://permalink.gmane.org/gmane.linux.oprofile/11515</link>
    <description>&lt;pre&gt;Gilles,
The oprofile-tests have some simple workloads used in the oprofile testsuite.  Attached is the "memcpyt.c" workload, slightly modified to run a bit longer than normal.  This little testcase should give you better repeatable results.  If you can find time to run opcontrol and operf against it, I would appreciate it.
I'm not quite sure I understand exactly what problem you're having, but a simple test I did of adding a SIGUSR1 handler to the memcpyt.c program seemed to work OK (when I sent the USR1 signal to memcpyt while operf was profiling it).  Please work up a minimal testcase that exhibits the problem and post it as a new thread to this list, with all details we'll need to reproducee.

Thanks.

-Maynard


/* memcpyt.c
 *  Copyright (C) 2012 IBM

 * This file is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 */

#include &amp;lt;string.h&amp;gt;

main()
{
  int j;
  long a4k, b4k;
  char a[8192], b[8192];
  int source_offset, dest_offset;
  char *source_address, *dest_address;
  int iterations, copy_length;

  iterations = 500000000;
  copy_length = 65;
  source_offset = 3;
  dest_offset = 7;

  a4k = (long)(a+4095) &amp;amp; 0xfff;
  b4k = (long)(b+4095) &amp;amp; 0xfff;
  a4k = (4095 - a4k) &amp;amp; 0xfff;
  b4k = (4095 - b4k) &amp;amp; 0xfff;

  source_address=a+a4k+source_offset;
  dest_address=b+b4k+dest_offset;

  for(j=0;j&amp;lt;iterations;j++)
      memcpy(dest_address, source_address, copy_length);
}
------------------------------------------------------------------------------
Try New Relic Now &amp;amp; We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service 
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, &amp;amp; servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may_______________________________________________
oprofile-list mailing list
oprofile-list&amp;lt; at &amp;gt;lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oprofile-list
&lt;/pre&gt;</description>
    <dc:creator>Maynard Johnson</dc:creator>
    <dc:date>2013-05-21T12:31:41</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.oprofile/11514">
    <title>Re: [PATCH] Add support for Intel Netburst (e.g., Pentium P4) to operf</title>
    <link>http://permalink.gmane.org/gmane.linux.oprofile/11514</link>
    <description>&lt;pre&gt;
I cannot say that the results in both cases ( "operf-based" &amp;amp; "opcontrol-
based" profiler ) are pretty close : overall number of samples &amp;amp; number of 
samples for each binary file are different for each test ( at least for the 
lines showing a great number of samples ) but the percentages for each binary 
file are rather similar.
I think that this can be partly explained by the fact that stopping the 
application is done by a mouse click on a button ( this application is a small 
Qt widget )

I can send a copy of the results printed by opreport if needed ( about 210 
lines each )

But another problem occurs during the test with operf. In the first release, 
the application processes its argument when it receives "SIGUSR1"; its 
behaviour was as expected with "opcontrol" but the test program doesn't 
receive the signal when under control of "operf" ( so I had to slightly modify 
the code to get some results ). The Oprofile manual doesn't say anything about 
this point and I may have missed something.

Let me know if you wish to get a copy of the results of these tests.

Gilles Allard

------------------------------------------------------------------------------
Try New Relic Now &amp;amp; We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service 
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, &amp;amp; servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may
&lt;/pre&gt;</description>
    <dc:creator>Gilles Allard</dc:creator>
    <dc:date>2013-05-21T12:12:33</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.oprofile/11513">
    <title>[PATCH] Fix Coverity errors found on May 20, 2013 git snapshot</title>
    <link>http://permalink.gmane.org/gmane.linux.oprofile/11513</link>
    <description>&lt;pre&gt;Fix Coverity errors found on May 20, 2013 git snapshot

Coverity identified the following errors on scans run from May 7 through
May 20, 2013:

Type,Category,File,Function
Wrapper object use after free,Memory - illegal accesses,/agents/jvmpi/jvmpi_oprofile.cpp,compiled_method_load(JVMPI_Event *)
Unchecked return value,Error handling issues,/daemon/opd_mangling.c,opd_open_sample_file
Dereference after null check,Null pointer dereferences,/daemon/opd_sfile.c,sfile_hash
Uninitialized scalar field,Uninitialized members,/gui/oprof_start_config.cpp,config_setting::config_setting()
Division or modulo by zero,Integer handling issues,/libdb/db_stat.c,odb_hash_stat
Resource leak,Resource leaks,/libop/op_cpu_type.c,_auxv_fetch
Resource leak,Resource leaks,/libop/op_cpu_type.c,fetch_at_hw_platform
Negative array index read,Memory - illegal accesses,/libop/op_events.c,_is_um_valid_bitmask
Write to pointer after free,Memory - corruptions,/libop/op_events.c,read_events
Read from pointer after free,Memory - illegal accesses,/libop/op_events.c,_is_um_valid_bitmask
Dereference after null check,Null pointer dereferences,/libop/op_mangle.c,op_mangle_filename
Dereference after null check,Null pointer dereferences,/libop/op_mangle.c,op_mangle_filename
Time of check time of use,Security best practices violations,/libopagent/opagent.c,op_open_agent
Improper use of negative value,Integer handling issues,/libperf_events/operf_counter.cpp,operf_record::setup()
Double free,Memory - corruptions,/libperf_events/operf_counter.cpp,operf_record::setup()
Uninitialized pointer read,Memory - illegal accesses,/libperf_events/operf_counter.cpp,&amp;lt;unnamed&amp;gt;::_get_perf_event_from_file(mmap_info &amp;amp;)
Unchecked return value,Error handling issues,/libperf_events/operf_mangling.cpp,"operf_open_sample_file(odb_t *, operf_sfile *, operf_sfile *, int, int)"
Using invalid iterator,API usage errors,/libperf_events/operf_process_info.cpp,operf_process_info::try_disassociate_from_parent(char *)
Non-array delete for scalars,Memory - illegal accesses,/libregex/op_regex.cpp,"&amp;lt;unnamed&amp;gt;::op_regerror(int, const re_pattern_buffer &amp;amp;)"
Resource leak,Resource leaks,/libutil++/op_bfd.cpp,"op_bfd::op_bfd(const std::basic_string&amp;lt;char, std::char_traits&amp;lt;char&amp;gt;, std::allocator&amp;lt;char&amp;gt;&amp;gt;&amp;amp;, const string_filter &amp;amp;, const extra_images &amp;amp;, bool &amp;amp;)"
Explicit null dereferenced,Null pointer dereferences,/opjitconv/create_bfd.c,fill_symtab
Resource leak,Resource leaks,/opjitconv/opjitconv.c,_cleanup_jitdumps
Use of untrusted string value,Insecure data handling,/opjitconv/opjitconv.c,main
Resource leak,Resource leaks,/pe_profiling/operf.cpp,_get_cpu_for_perf_events_cap()
Dereference null return value,Null pointer dereferences,/pe_profiling/operf.cpp,_process_session_dir()
Incorrect deallocator used,API usage errors,/pe_profiling/operf.cpp,_process_events_list()

===============================

This patch fixes those errors.

Signed-off-by: Maynard Johnson &amp;lt;maynardj&amp;lt; at &amp;gt;us.ibm.com&amp;gt;
---
 agents/jvmpi/jvmpi_oprofile.cpp       |    4 +-
 daemon/opd_mangling.c                 |    7 +++++-
 gui/oprof_start_config.cpp            |    2 +
 libdb/db_stat.c                       |    3 +-
 libop/op_cpu_type.c                   |   12 ++++++++++
 libop/op_events.c                     |   10 ++++----
 libop/op_mangle.c                     |    2 +-
 libopagent/opagent.c                  |   40 +++++++++++++++++++++++++++-----
 libperf_events/operf_counter.cpp      |   13 ++++++----
 libperf_events/operf_mangling.cpp     |    6 ++++-
 libperf_events/operf_process_info.cpp |    4 +-
 opjitconv/opjitconv.c                 |   13 ++++++++--
 pe_profiling/operf.cpp                |    7 +++++-
 pp/opreport.cpp                       |    7 +++--
 14 files changed, 98 insertions(+), 32 deletions(-)

diff --git a/agents/jvmpi/jvmpi_oprofile.cpp b/agents/jvmpi/jvmpi_oprofile.cpp
index 800667f..9ae5cda 100644
--- a/agents/jvmpi/jvmpi_oprofile.cpp
+++ b/agents/jvmpi/jvmpi_oprofile.cpp
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -106,13 +106,13 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; void compiled_method_load(JVMPI_Event * event)
 throw runtime_error("Error: Cannot find method name for "
     "compiled method\n");
 }
-char const * method_name = ((string)method_it-&amp;gt;second).c_str();
+char const * method_name = method_it-&amp;gt;second.c_str();
 method_it = cls_info.method_signatures.find(method);
 if (method_it == cls_info.method_signatures.end()) {
 throw runtime_error("Error: Cannot find method signature "
     "for compiled method\n");
 }
-char const * method_signature = ((string)method_it-&amp;gt;second).c_str();
+char const * method_signature = method_it-&amp;gt;second.c_str();
 
 string const class_signature = "L" + cls_info.name + ";";
 pthread_mutex_unlock(&amp;amp;class_map_mutex);
diff --git a/daemon/opd_mangling.c b/daemon/opd_mangling.c
index 201eabf..9d14dc4 100644
--- a/daemon/opd_mangling.c
+++ b/daemon/opd_mangling.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -157,7 +157,12 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; int opd_open_sample_file(odb_t *file, struct sfile *last,
 
 verbprintf(vsfile, "Opening \"%s\"\n", mangled);
 
-create_path(mangled);
+err = create_path(mangled);
+if (err) {
+fprintf(stderr, "oprofiled: create path for %s failed: %s\n",
+        mangled, strerror(err));
+goto out;
+}
 
 /* locking sf will lock associated cg files too */
 sfile_get(sf);
diff --git a/gui/oprof_start_config.cpp b/gui/oprof_start_config.cpp
index 02bfe64..3165b85 100644
--- a/gui/oprof_start_config.cpp
+++ b/gui/oprof_start_config.cpp
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -34,6 +34,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; event_setting::event_setting()
 
 config_setting::config_setting()
 :
+buffer_size(0),
+note_table_size(0),
 no_kernel(false),
 verbose(false),
 separate_lib(false),
diff --git a/libdb/db_stat.c b/libdb/db_stat.c
index 6d29e9a..c85d93a 100644
--- a/libdb/db_stat.c
+++ b/libdb/db_stat.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -65,7 +65,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; odb_hash_stat_t * odb_hash_stat(odb_t const * odb)
 }
 
 result-&amp;gt;max_list_length = max_length;
-result-&amp;gt;average_list_length = total_length / nr_non_empty_list;
+result-&amp;gt;average_list_length = (!nr_non_empty_list) ? 0
+                                                   : total_length / nr_non_empty_list;
 
 return result;
 }
diff --git a/libop/op_cpu_type.c b/libop/op_cpu_type.c
index 8962e97..ba81fca 100644
--- a/libop/op_cpu_type.c
+++ b/libop/op_cpu_type.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -198,6 +198,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static ElfW(auxv_t) * _auxv_fetch()
 auxv_temp = (ElfW(auxv_t) *)malloc(page_size);
 if (!auxv_temp) {
 perror("Allocation of space for auxv failed.");
+close(auxv_f);
 return NULL;
 }
 bytes = read(auxv_f, (void *)auxv_temp, page_size);
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -214,6 +215,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static ElfW(auxv_t) * _auxv_fetch()
 fprintf(stderr, "Recoverable error. Continuing.\n");
 }
 }
+auxv_buf = auxv_temp;
 }
 return (ElfW(auxv_t) *)auxv_temp;
 }
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -239,6 +241,14 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static const char * fetch_at_hw_platform(ElfW(Addr) type)
 return platform;
 }
 
+static void release_at_hw_platform(void)
+{
+ElfW(auxv_t) * my_auxv = NULL;
+
+if ((my_auxv = (ElfW(auxv_t)*) _auxv_fetch()))
+free(my_auxv);
+}
+
 static op_cpu _try_ppc64_arch_generic_cpu(void)
 {
 const char * platform, * base_platform;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -249,6 +259,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static op_cpu _try_ppc64_arch_generic_cpu(void)
 if (!platform || !base_platform) {
 fprintf(stderr, "NULL returned for one or both of AT_PLATFORM/AT_BASE_PLATFORM\n");
 fprintf(stderr, "AT_PLATFORM: %s; \tAT_BASE_PLATFORM: %s\n", platform, base_platform);
+release_at_hw_platform();
 return cpu_type;
 }
 // FIXME whenever a new IBM Power processor is added -- need to ensure
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -271,6 +282,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static op_cpu _try_ppc64_arch_generic_cpu(void)
 cpu_type = CPU_PPC64_ARCH_V1;
 }
 }
+release_at_hw_platform();
 return cpu_type;
 }
 
diff --git a/libop/op_events.c b/libop/op_events.c
index e5ecbcc..5b86ca3 100644
--- a/libop/op_events.c
+++ b/libop/op_events.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -256,6 +256,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void free_unit_mask(struct op_unit_mask * um)
 {
 list_del(&amp;amp;um-&amp;gt;um_next);
 free(um);
+um = NULL;
 }
 
 /*
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -289,8 +290,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void read_unit_masks(char const * file)
 } else {
 if (!um)
 parse_error("no unit mask name line");
-if (um-&amp;gt;num &amp;gt;= MAX_UNIT_MASK)
-parse_error("oprofile: maximum unit mask entries exceeded");
 
 parse_um_entry(&amp;amp;um-&amp;gt;um[um-&amp;gt;num], line);
 ++(um-&amp;gt;num);
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -561,6 +560,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void read_events(char const * file)
 c = skip_ws(c);
 if (*c != '\0' &amp;amp;&amp;amp; *c != '#')
 parse_error("non whitespace after include:");
+break;
 } else {
 parse_error("unknown tag");
 }
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1037,7 +1037,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int _is_um_valid_bitmask(struct op_event * event, u32 passed_um)
 for (i = 1; i &amp;lt; evt.unit-&amp;gt;num; i++) {
 int j = i - 1;
 u32 tmp = evt.unit-&amp;gt;um[i].value;
-while (tmp &amp;lt; evt.unit-&amp;gt;um[j].value &amp;amp;&amp;amp; j &amp;gt;= 0) {
+while (j &amp;gt;= 0 &amp;amp;&amp;amp; tmp &amp;lt; evt.unit-&amp;gt;um[j].value) {
 evt.unit-&amp;gt;um[j + 1].value = evt.unit-&amp;gt;um[j].value;
 j -= 1;
 }
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1081,8 +1081,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int _is_um_valid_bitmask(struct op_event * event, u32 passed_um)
 }
 }
 
-free(tmp_um);
-free(tmp_um_no_dups);
 if (dup_value_used) {
 fprintf(stderr, "Ambiguous bitmask: Unit mask values"
         " cannot include non-unique numerical values (i.e., 0x%x).\n",
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1092,6 +1090,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int _is_um_valid_bitmask(struct op_event * event, u32 passed_um)
 } else if (masked_val == passed_um &amp;amp;&amp;amp; passed_um != 0) {
 retval = 1;
 }
+free(tmp_um);
+free(tmp_um_no_dups);
 return retval;
 }
 
diff --git a/libop/op_mangle.c b/libop/op_mangle.c
index 791e387..17a0ab7 100644
--- a/libop/op_mangle.c
+++ b/libop/op_mangle.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -73,7 +73,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; char * op_mangle_filename(struct mangle_values const * values)
 strcat(mangled, "{dep}" "/");
 append_image(mangled, values-&amp;gt;flags, anon, dep_name, anon_name);
 
-if (values-&amp;gt;flags &amp;amp; MANGLE_CALLGRAPH) {
+if (cg_image_name &amp;amp;&amp;amp; (values-&amp;gt;flags &amp;amp; MANGLE_CALLGRAPH)) {
 strcat(mangled, "{cg}" "/");
 append_image(mangled, values-&amp;gt;flags, cg_anon,
              cg_image_name, anon_name);
diff --git a/libopagent/opagent.c b/libopagent/opagent.c
index 9e31e4e..1e236a7 100644
--- a/libopagent/opagent.c
+++ b/libopagent/opagent.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -57,6 +57,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #include &amp;lt;stdint.h&amp;gt;
 #include &amp;lt;limits.h&amp;gt;
 #include &amp;lt;sys/types.h&amp;gt;
+#include &amp;lt;dirent.h&amp;gt;
 #include &amp;lt;sys/stat.h&amp;gt;
 #include &amp;lt;fcntl.h&amp;gt;
 #include &amp;lt;unistd.h&amp;gt;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -136,21 +137,46 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; op_agent_t op_open_agent(void)
 struct timeval tv;
 FILE * dumpfile = NULL;
 
-if (0 == stat(TMP_OPROFILE_DIR, &amp;amp;dirstat) &amp;amp;&amp;amp; !S_ISDIR(dirstat.st_mode)) {
-fprintf(stderr, "Error: Creation of directory %s failed.\n", TMP_OPROFILE_DIR);
-errno = EEXIST;
-return NULL;
+/* Coverity complains about 'time-of-check-time-of-use' race if we do stat() on
+ * a file (or directory) and then open or create it afterwards.  So instead,
+ * we'll try to open it and see what happens.
+ */
+int create_dir = 0;
+DIR * dir1 = opendir(TMP_OPROFILE_DIR);
+if (!dir1) {
+if (errno == ENOENT) {
+create_dir = 1;
+} else if (errno == ENOTDIR) {
+fprintf(stderr, "Error: Creation of directory %s failed. File exists where directory is expected.\n",
+        TMP_OPROFILE_DIR);
+return NULL;
+}
 } else {
+closedir(dir1);
+}
+if (create_dir) {
+create_dir = 0;
 rc = mkdir(TMP_OPROFILE_DIR, S_IRWXU | S_IRWXG | S_IRWXO);
 if (rc &amp;amp;&amp;amp; (errno != EEXIST)) {
 fprintf(stderr, "Error trying to create %s dir.\n", TMP_OPROFILE_DIR);
 return NULL;
 }
 }
-if (0 == stat(JITDUMP_DIR, &amp;amp;dirstat) &amp;amp;&amp;amp; !S_ISDIR(dirstat.st_mode)) {
-fprintf(stderr, "Error: Creation of directory %s failed.\n", JITDUMP_DIR);
-return NULL;
+
+dir1 = opendir(JITDUMP_DIR);
+if (!dir1) {
+if (errno == ENOENT) {
+create_dir = 1;
+} else if (errno == ENOTDIR) {
+fprintf(stderr, "Error: Creation of directory %s failed. File exists where directory is expected.\n",
+        JITDUMP_DIR);
+return NULL;
+}
 } else {
+closedir(dir1);
+}
+
+if (create_dir) {
 rc = mkdir(JITDUMP_DIR, S_IRWXU | S_IRWXG | S_IRWXO);
 if (rc &amp;amp;&amp;amp; (errno != EEXIST)) {
 fprintf(stderr, "Error trying to create %s dir.\n", JITDUMP_DIR);
diff --git a/libperf_events/operf_counter.cpp b/libperf_events/operf_counter.cpp
index a7279f1..4f20e4a 100644
--- a/libperf_events/operf_counter.cpp
+++ b/libperf_events/operf_counter.cpp
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -147,7 +147,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; out:
 
 static event_t * _get_perf_event_from_file(struct mmap_info &amp;amp; info)
 {
-uint32_t size;
+uint32_t size = 0;
 static int num_remaps = 0;
 event_t * event;
 size_t pe_header_size = sizeof(struct perf_event_header);
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -600,8 +600,11 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; void operf_record::setup()
  */
 use_cpu_minus_one = use_cpu_minus_one ? true : profile_process_group;
 num_cpus = use_cpu_minus_one ? 1 : sysconf(_SC_NPROCESSORS_ONLN);
-if (!num_cpus)
-throw runtime_error("Number of online CPUs is zero; cannot continue");;
+if (num_cpus &amp;lt; 1) {
+char int_str[256];
+sprintf(int_str, "Number of online CPUs is %d; cannot continue", num_cpus);
+throw runtime_error(int_str);
+}
 
 cverb &amp;lt;&amp;lt; vrecord &amp;lt;&amp;lt; "calling perf_event_open for pid " &amp;lt;&amp;lt; pid_to_profile &amp;lt;&amp;lt; " on "
       &amp;lt;&amp;lt; num_cpus &amp;lt;&amp;lt; " cpus" &amp;lt;&amp;lt; endl;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -675,8 +678,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; void operf_record::setup()
 }
 }
 }
-if (dir)
-closedir(dir);
 int num_mmaps;
 if (pid_started &amp;amp;&amp;amp; (procs.size() &amp;gt; 1))
 num_mmaps = procs.size();
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -691,6 +692,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; void operf_record::setup()
 
 // Set bit to indicate we're set to go.
 valid = true;
+if (dir)
+closedir(dir);
 return;
 
 error:
diff --git a/libperf_events/operf_mangling.cpp b/libperf_events/operf_mangling.cpp
index 7ded563..384b05d 100644
--- a/libperf_events/operf_mangling.cpp
+++ b/libperf_events/operf_mangling.cpp
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -145,7 +145,11 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; int operf_open_sample_file(odb_t *file, struct operf_sfile *last,
 
 cverb &amp;lt;&amp;lt; vsfile &amp;lt;&amp;lt; "Opening \"" &amp;lt;&amp;lt; mangled &amp;lt;&amp;lt; "\"" &amp;lt;&amp;lt; endl;
 
-create_path(mangled);
+err = create_path(mangled);
+if (err) {
+cerr &amp;lt;&amp;lt; "operf: create path for " &amp;lt;&amp;lt; mangled &amp;lt;&amp;lt; " failed: " &amp;lt;&amp;lt; strerror(err) &amp;lt;&amp;lt; endl;
+goto out;
+}
 
 /* locking sf will lock associated cg files too */
 operf_sfile_get(sf);
diff --git a/libperf_events/operf_process_info.cpp b/libperf_events/operf_process_info.cpp
index 66804fc..5f9351a 100644
--- a/libperf_events/operf_process_info.cpp
+++ b/libperf_events/operf_process_info.cpp
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -362,11 +362,11 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; void operf_process_info::try_disassociate_from_parent(char * app_shortname)
  */
 if (mmappings_from_parent[cur-&amp;gt;start_addr]) {
 mmappings_from_parent[cur-&amp;gt;start_addr] = false;
-mmappings.erase(it);
+mmappings.erase(it++);
 } else {
 process_mapping(cur, false);
+it++;
 }
-it++;
 }
 if (parent_of_fork) {
 parent_of_fork-&amp;gt;remove_forked_process(this-&amp;gt;pid);
diff --git a/opjitconv/opjitconv.c b/opjitconv/opjitconv.c
index 7d81629..a9dfa91 100644
--- a/opjitconv/opjitconv.c
+++ b/opjitconv/opjitconv.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -24,6 +24,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #include &amp;lt;errno.h&amp;gt;
 #include &amp;lt;fcntl.h&amp;gt;
 #include &amp;lt;limits.h&amp;gt;
+#include &amp;lt;assert.h&amp;gt;
 #include &amp;lt;pwd.h&amp;gt;
 #include &amp;lt;stdint.h&amp;gt;
 #include &amp;lt;stdio.h&amp;gt;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -739,6 +740,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void _cleanup_jitdumps(void)
 char fname[1024];
 memset(buf, '\0', 1024);
 memset(fname, '\0', 1024);
+memset(buf, '\0', 1024);
 strcpy(fname, proc_fd_dir);
 strncat(fname, dirent-&amp;gt;d_name, 1023 - proc_fd_dir_len);
 if (readlink(fname, buf, 1023) &amp;gt; 0) {
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -751,6 +753,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void _cleanup_jitdumps(void)
 }
 }
 }
+closedir(dir);
 }
 if (!do_not_delete) {
 if (remove(dmpfile_pathname))
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -772,8 +775,9 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void _cleanup_jitdumps(void)
 int main(int argc, char ** argv)
 {
 unsigned long long start_time, end_time;
-char const * session_dir;
+char session_dir[PATH_MAX];
 int rc = 0;
+size_t sessdir_len = 0;
 char * path_end;
 
 debug = 0;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -811,12 +815,15 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; int main(int argc, char ** argv)
  * are not possible anymore.
  */
 path_end = memchr(argv[1], '\0', PATH_MAX);
-if (!path_end || ((path_end - argv[1]) &amp;gt; PATH_MAX - 16)) {
+if (!path_end || ((sessdir_len = (path_end - argv[1])) &amp;gt;= PATH_MAX - 16)) {
 printf("opjitconv: Path name length limit exceeded for session directory\n");
 rc = EXIT_FAILURE;
 goto out;
 }
-session_dir = argv[1];
+memset(session_dir, '\0', PATH_MAX);
+assert(sessdir_len &amp;lt; (PATH_MAX - 16 - 1));
+strncpy(session_dir, argv[1], sessdir_len);
+session_dir[PATH_MAX -1] = '\0';
 
 start_time = atol(argv[2]);
 end_time = atol(argv[3]);
diff --git a/pe_profiling/operf.cpp b/pe_profiling/operf.cpp
index 11b9ed0..4543c78 100644
--- a/pe_profiling/operf.cpp
+++ b/pe_profiling/operf.cpp
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1324,7 +1324,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void _process_events_list(void)
      &amp;lt;&amp;lt; endl &amp;lt;&amp;lt; "15 times the minimum count value for the event."  &amp;lt;&amp;lt; endl;
 exit(EXIT_FAILURE);
 }
-fclose(fp);
+pclose(fp);
 char * event_str = op_xstrndup(event_spec.c_str(), event_spec.length());
 operf_event_t event;
 strncpy(event.name, strtok(event_str, ":"), OP_MAX_EVT_NAME_LEN - 1);
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1445,6 +1445,10 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void _process_session_dir(void)
 cwd = (char *) xmalloc(PATH_MAX);
 // set default session dir
 cwd = getcwd(cwd, PATH_MAX);
+if (cwd == NULL) {
+perror("Error calling getcwd");
+exit(EXIT_FAILURE);
+}
 operf_options::session_dir = cwd;
 operf_options::session_dir +="/oprofile_data";
 samples_dir = operf_options::session_dir + "/samples";
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1798,6 +1802,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int _get_cpu_for_perf_events_cap(void)
 memset(cpus_online, 0, sizeof(cpus_online));
 
 if ( fgets(cpus_online, sizeof(cpus_online), online_cpus) == NULL) {
+fclose(online_cpus);
 err_msg = "Internal Error (3): Number of online cpus cannot be determined.";
 retval = -1;
 goto error;
diff --git a/pp/opreport.cpp b/pp/opreport.cpp
index 327043c..7ad6190 100644
--- a/pp/opreport.cpp
+++ b/pp/opreport.cpp
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -323,9 +323,10 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; void output_summaries(summary_container const &amp;amp; summaries)
 
 for (size_t i = 0; i &amp;lt; summaries.apps.size(); ++i) {
 app_summary const &amp;amp; app = summaries.apps[i];
-
-if ((app.counts[0] * 100.0) / summaries.total_counts[0]
-    &amp;lt; options::threshold) {
+double ratio = (!summaries.total_counts[0]) ? 0
+                                            : (app.counts[0] * 100.0)/
+                                              summaries.total_counts[0];
+if (ratio &amp;lt; options::threshold) {
 continue;
 }
 
&lt;/pre&gt;</description>
    <dc:creator>Maynard Johnson</dc:creator>
    <dc:date>2013-05-20T22:41:54</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.oprofile/11512">
    <title>Re: [PATCH] Add support for Intel Netburst (e.g., Pentium P4) to operf</title>
    <link>http://permalink.gmane.org/gmane.linux.oprofile/11512</link>
    <description>&lt;pre&gt;Great!
You should be able to compare opcontrol and operf results pretty easily by doing something like the following:

1. rm /root/.oprofile/daemonrc (delete opcontrol cache file so we're starting from scratch)
2. rm -rf oprofile_data (to make sure opreport doesn't "see" profile data collected by previous runs of operf)
3. opcontrol --reset
4. opcontrol --start --no-vmlinux --separate=lib,kernel -e GLOBAL_POWER_EVENTS:100000
5. Run a specific benchmark or application that you can trust will yield repeatable results.
6. opcontrol --deinit
7. opreport --symbols &amp;gt; op1.out

8. operf -e GLOBAL_POWER_EVENTS:100000 &amp;lt;your benchmark or app&amp;gt;
9. opreport --symbols &amp;gt; op2.out
10. Compare op1.out and op2.out -- the number of samples per binary file should be pretty close.

Thanks!
-Maynard


------------------------------------------------------------------------------
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d
&lt;/pre&gt;</description>
    <dc:creator>Maynard Johnson</dc:creator>
    <dc:date>2013-05-20T13:36:42</dc:date>
  </item>
  <textinput rdf:about="http://search.gmane.org/?group=$group=gmane.linux.oprofile">
    <title>Search Engine</title>
    <description>Search the mailing list at Gmane</description>
    <name>query</name>
    <link>http://search.gmane.org/?group=$group=gmane.linux.oprofile</link>
  </textinput>
</rdf:RDF>
