Zheng Da | 20 May 2013 21:40
Picon

pfmon for libpfm-4.3.0

Hello,

I'm new to perform2. I want to use it to monitor Xeon E5 processors. It seems only libpfm-4.3.0 supports it. However, pfmon-3.9 can't be compiled with libpfm-4.3.0.
I have compiled and installed libpfm-4.3.0, but when I compiled pfmon-3.9, I got the following error:

make[1]: Entering directory `/home/zhengda/pfmon-3.9/pfmon'
cc  -g -ggdb -Wall -Werror -D_REENTRANT -I/usr/local/include -DCONFIG_PFMON_X86_64 -DPFMON_DEBUG -DDATADIR=\"/usr/local/share/pfmon\" -I. -I/usr/include/libelf -D_GNU_SOURCE -DPFMON_DEBUG -g -c pfmon.c
In file included from pfmon_support.h:28:0,
                 from pfmon.c:31:
pfmon.h:38:29: fatal error: perfmon/perfmon.h: No such file or directory
compilation terminated.
make[1]: *** [pfmon.o] Error 1
make[1]: Leaving directory `/home/zhengda/pfmon-3.9/pfmon'
make: *** [all] Error 2

I can't find perfmon/perfmon.h anywhere. It's not in libpfm-4.3.0 or any other Ubuntu packages. I use Ubuntu 12.04 by the way.
So what is the fix?

Thanks,
Da
------------------------------------------------------------------------------
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
_______________________________________________
perfmon2-devel mailing list
perfmon2-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perfmon2-devel
Vince Weaver | 3 May 2013 23:44
Picon

Re: Ivy Bridge Uncore support

On Fri, 3 May 2013, Dan Terpstra wrote:
> > My "hack" was only for the uncore, the regular Ivybridge events have been 
> > supported properly for some time.
>
> Yeah but the regular Ivy events don't include  FP_COMP_OPS_EXE 
> and SIMD_FP_256.

well, for the obvious reasons that Intel doesn't support them.

What I'm saying is that my hack only added a model ID for the uncore, 
which is a separate PMU for the regular events.  Hence I didn't switch
my machine to all SNB events.. it still has the default IVB enabled.
I just added the SNB uncore in addition.

> Why did you use x87 events? Seems like SSE_SCALAR would have been more 
> relevant. Although maybe less deterministic :-) 

When I first started gathering results there weren't any IVB or SNB 
machines, and I just kept collecting the same set of events.

With x87 there is often a "gather all x87 ops" event.  As we all know
there's no direct SSE equivelent, you end up needing to collect like 5 
different events and add them all up, and I don't think anyone has really 
tested that that gives you anything useful.

> Yeah, that's why I suggested the need for a libpfm4 hack, since you were 
> hacking anyway :-)

it's easy enough with perf to just use the raw event numbers.  Would it 
make sense to export that capability to PAPI somehow?

Then if you really wanted to force things you could just put something 
like "r50003c:u" or whatever as the event name in papi_events.csv

Vince

------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite
It's a free troubleshooting tool designed for production
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap2
Vince Weaver | 3 May 2013 17:42
Picon

Re: Ivy Bridge Uncore support

On Fri, 3 May 2013, Dan Terpstra wrote:

> Since you've already hacked libpfm4 to make IVB58 look like SNB42, could 
> you check to see if the IVB deprecated floating point events actually 
> work? That's FP_COMP_OPS_EXE and SIMD_FP_256, which were removed from 
> the tables, but (rumor has it) not from the hardware. If they work as 
> well (badly) as on SNB, which we're beginning to understand, it might be 
> useful to reinstate them on IVB... - d

My "hack" was only for the uncore, the regular Ivybridge events have been 
supported properly for some time.

You can look at the results in Table VI
of my recent ISPASS paper

  http://web.eece.maine.edu/~vweaver/projects/deterministic/ispass2013_deterministic.pdf

and see that x87 fp results using the undocumented events on IVB match 
pretty well with SNB.  The SSE results do not though.  And as for
SIMD_FP_256 I don't think I have any AVX test code handy.

It's not easy to re-add those events to PAPI though because libpfm4 
doesn't support them.

Vince

------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite
It's a free troubleshooting tool designed for production
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap2
Carl E. Love | 30 Apr 2013 17:31
Picon

[PATCH] Power 7, change the code for the PM_RUN_INST_CMPL and PM_RUN_CYC events

Stephane

I created the following patch for the IBM Power 7 and Power 7+ systems.
Please review and if acceptable commit it to the perfmon 2 source code
tree.  Thank you.

             Carl Love
-------------------------------------------------------------------------

Power 7, change the code for the PM_RUN_INST_CMPL and PM_RUN_CYC events

The Power 7 processor has four programmable counters and two fixed counters.
Currently, the codes returned for PM_RUN_INST_CMPL and PM_RUN_CYC are for
the programmable counters.  This patch changes the returned code to the
fixed counter code thus freeing up the programmable counters for other
events.

Signed-off-by: Carl Love <carll <at> us.ibm.com>
---
 lib/events/power7_events.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/events/power7_events.h b/lib/events/power7_events.h
index 7bfdf15..a9afffe 100644
--- a/lib/events/power7_events.h
+++ b/lib/events/power7_events.h
 <at>  <at>  -1299,7 +1299,7  <at>  <at>  static const pme_power_entry_t power7_pe[] = {
 	},
 	[ POWER7_PME_PM_RUN_INST_CMPL ] = {
 		.pme_name = "PM_RUN_INST_CMPL",
-		.pme_code = 0x400fa,
+		.pme_code = 0x500fa,
 		.pme_short_desc = "Run_Instructions",
 		.pme_long_desc = "Number of run instructions completed. ",
 	},
 <at>  <at>  -2613,7 +2613,7  <at>  <at>  static const pme_power_entry_t power7_pe[] = {
 	},
 	[ POWER7_PME_PM_RUN_CYC ] = {
 		.pme_name = "PM_RUN_CYC",
-		.pme_code = 0x200f4,
+		.pme_code = 0x600f4,
 		.pme_short_desc = "Run_cycles",
 		.pme_long_desc = "Processor Cycles gated by the run latch.  Operating systems use the run latch to
indicate when they are doing useful work.  The run latch is typically cleared in the OS idle loop.  Gating by
the run latch filters out the idle loop.",
 	},
--

-- 
1.7.12.rc1.22.gbfbf4d4

------------------------------------------------------------------------------
Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET
Get 100% visibility into your production application - at no cost.
Code-level diagnostics for performance bottlenecks with <2% overhead
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap1
Vince Weaver | 29 Apr 2013 21:30
Picon

Ivy Bridge Uncore support


Intel Vol 3b says that Ivy Bridge support is more or less the same as
Sandy Bridge.

The below patch just detects IvyBridge as a SandyBridge uncore.  It seems
to work.

Is this the kind of fix you want? Or would you prefer the SandyBridge 
table to be copied over as a specific IvyBridge file?

Signed-off-by: Vince Weaver <vincent.weaver <at> maine.edu>

diff --git a/lib/pfmlib_intel_snb_unc.c b/lib/pfmlib_intel_snb_unc.c
index f4bfaba..00d7b86 100644
--- a/lib/pfmlib_intel_snb_unc.c
+++ b/lib/pfmlib_intel_snb_unc.c
 <at>  <at>  -44,6 +44,7  <at>  <at>  pfm_snb_unc_detect(void *this)

 	switch (pfm_intel_x86_cfg.model) {
 		case 42: /* Sandy Bridge (Core i7 26xx, 25xx) */
+		case 58: /* Ivy Bridge */
 			break;
 		default:
 			return PFM_ERR_NOTSUPP;

------------------------------------------------------------------------------
Try New Relic Now & 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, & 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_apr
Stephane Eranian | 19 Apr 2013 23:09

Re: libpfm4 stats are too low

On Fri, Apr 19, 2013 at 10:16 PM, Hassan, Ahmad <ahmad.hassan <at> sap.com> wrote:
>>Ok, but the -i is only effective to follow thru the creation of the
>>threads and not when they are
>>already spawned. I see you attaching after program launch. At that
>>time, are all threads already
>>created?
>
> Thanks Stephane. That explains it. I am it giving another go as follows:
>
> (./task -e LLC-LOADS,cycles,instructions  -i START DB) 1>out &
>
> Please can you tell me what is the libpfm4 sampling rate for collecting the stats? My single test will run
for 2-4 hours with massive memory traffic and there would be huge number of cycles,instructions and
LLC_LOADS. Will that be fine to use libpfm4  with long running application and how representative the
statistics would be?
>
You are not sampling here. You are simply counting the events.
Overhead is minimal.
You should really use the perf tool for any serious measurement. The
libpfm4 example
and just demo programs.

> Thanks.
>
> Kind Regards, Ahmad
> SAP
>
>
>
>
>
>
>
>

------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
Stephane Eranian | 19 Apr 2013 21:47

Re: libpfm4 stats are too low

On Fri, Apr 19, 2013 at 9:40 PM, Hassan, Ahmad <ahmad.hassan <at> sap.com> wrote:
> Hi  Stephane,
>
>>Did you enable automatic inheritance across fork with the -i option of
>>the task.c example?
>
> Yes I am passing -i flag as:
>
> ./task -e LLC-LOADS,LLC-STORES,LLC_MISSES,cycles,instructions  –i  -t <pid>
>
Ok, but the -i is only effective to follow thru the creation of the
threads and not when they are
already spawned. I see you attaching after program launch. At that
time, are all threads already
created?

> I should see thousands of loads theoretically because the DB queries are loading huge data ~4G into DRAM
and then accessing it but libpfm4 numbers are very low. Am I missing some additional configuration?
>
> I tried using 'perf' with latest kernel 3.8.8 but kernel freezes with trace 'Watchdog detected hard
LOCKUP on cpu 0.......'
>
> Thanks
>
> Kind Regards, Ahmad
> SAP
>
>

------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
perfmon2-devel mailing list
perfmon2-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perfmon2-devel
Stephane Eranian | 23 Mar 2013 22:25

PMU and analysis tools workshop at ISCA 2013

Hi,

Just a quick message to let you know that there will be a PMU and
performance analysis workshop at the ISCA 2013 conference. Lots
of experts will be there. I will give an overview of the perf_event
subsystem.

The information page is at:

https://sites.google.com/site/analysismethods/isca2013/program

Registration is open now.

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
William Cohen | 19 Mar 2013 01:14
Picon
Favicon

Will Intel Haswell support be available for libpfm4 and papi?

Hi All,

I was looking around to see if anyone has been working on Intel Haswell support for libpfm4 and papi [1].  I
have seen some patch in oprofile and wondering if anyone is doing the same for libpfm4 and papi.

[1] http://oprofile.git.sourceforge.net/git/gitweb.cgi?p=oprofile/oprofile;a=commit;h=866abbdb1a306a93da52089361b76be179813361

-Will

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
Stephane Eranian | 6 Mar 2013 09:41

Re: I/O monitoring using pfmon.



On Sun, Mar 3, 2013 at 1:47 PM, Varun Bhardwaj <varunb.92 <at> gmail.com> wrote:
Hi,

Is it possible to monitor only the I/O usage of a process using pfmon
in terms of PMCs.
Or is there any other tool available which can tell the I/O
performance in terms of PMCs.

I don't quite undersand your question. What I/O are you talking about?
I assume you're trying to do this on Itanium. Is that right?

Thanks,
Varun Bhardwaj

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
perfmon2-libpfm4-commits mailing list
perfmon2-libpfm4-commits <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perfmon2-libpfm4-commits

------------------------------------------------------------------------------
Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester  
Wave(TM): Endpoint Security, Q1 2013 and "remains a good choice" in the  
endpoint security space. For insight on selecting the right partner to 
tackle endpoint security challenges, access the full report. 
http://p.sf.net/sfu/symantec-dev2dev
_______________________________________________
perfmon2-devel mailing list
perfmon2-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perfmon2-devel
Vince Weaver | 7 Feb 2013 22:10
Picon

[PATCH] Add support for ARM 1176 Processor


This patch adds support for the ARM 1176 armv6 processor found in the 
Raspberry Pi.

I've tested that libpfm4 with this patch works on a Raspberry Pi, but the 
kernel installed on the board has broken perf_event support so I haven't
actually measured any performance events yet.

---
 config.mk                    |    3 +
 include/perfmon/pfmlib.h     |    2 +
 lib/Makefile                 |    2 +-
 lib/events/arm_1176_events.h |  136 ++++++++++++++++++++++++++++++++++++++++++
 lib/pfmlib_arm_armv6.c       |   77 ++++++++++++++++++++++++
 lib/pfmlib_common.c          |    1 +
 lib/pfmlib_priv.h            |    1 +
 7 files changed, 221 insertions(+), 1 deletion(-)
 create mode 100644 lib/events/arm_1176_events.h
 create mode 100644 lib/pfmlib_arm_armv6.c

diff --git a/config.mk b/config.mk
index 5f6adf2..b5cefc3 100644
--- a/config.mk
+++ b/config.mk
 <at>  <at>  -57,6 +57,9  <at>  <at>  endif
 ifeq (sparc64,$(findstring sparc64,$(ARCH)))
 override ARCH=sparc
 endif
+ifeq (armv6,$(findstring armv6,$(ARCH)))
+override ARCH=arm
+endif
 ifeq (armv7,$(findstring armv7,$(ARCH)))
 override ARCH=arm
 endif
diff --git a/include/perfmon/pfmlib.h b/include/perfmon/pfmlib.h
index b122ca5..ac8f31e 100644
--- a/include/perfmon/pfmlib.h
+++ b/include/perfmon/pfmlib.h
 <at>  <at>  -180,6 +180,8  <at>  <at>  typedef enum {

 	PFM_PMU_S390X_CPUM_CF,		/* s390x: CPU-M counter facility */

+	PFM_PMU_ARM_1176,		/* ARM 1176 */
+
 	/* MUST ADD NEW PMU MODELS HERE */

 	PFM_PMU_MAX			/* end marker */
diff --git a/lib/Makefile b/lib/Makefile
index d2f00a9..0c288d3 100644
--- a/lib/Makefile
+++ b/lib/Makefile
 <at>  <at>  -127,7 +127,7  <at>  <at>  SRCS += pfmlib_arm_perf_event.c
 endif

 INCARCH = $(INC_ARM)
-SRCS   += pfmlib_arm.c pfmlib_arm_armv7_pmuv1.c
+SRCS   += pfmlib_arm.c pfmlib_arm_armv7_pmuv1.c pfmlib_arm_armv6.c
 CFLAGS += -DCONFIG_PFMLIB_ARCH_ARM
 endif

diff --git a/lib/events/arm_1176_events.h b/lib/events/arm_1176_events.h
new file mode 100644
index 0000000..35a43fa
--- /dev/null
+++ b/lib/events/arm_1176_events.h
 <at>  <at>  -0,0 +1,136  <at>  <at> 
+/*
+ * Copyright (c) 2013 by Vince Weaver <vincent.weaver <at> maine.edu>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+ * of the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
+ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * This file is part of libpfm, a performance monitoring support library for
+ * applications on Linux.
+ */
+
+/*
+ * the various event names are the same as those given in the
+ * file linux-2.6/arch/arm/kernel/perf_event_v6.c
+ */
+
+/*
+ * ARM1176 Event Table
+ */
+static const arm_entry_t arm_1176_pe []={
+	{.name = "ICACHE_MISS",
+	 .code = 0x00,
+	 .desc = "Instruction cache miss (includes speculative accesses)"
+	},
+	{.name = "IBUF_STALL",
+	 .code = 0x01,
+	 .desc = "Stall because instruction buffer cannot deliver an instruction"
+	},
+	{.name = "DDEP_STALL",
+	 .code = 0x02,
+	 .desc = "Stall because of data dependency"
+	},
+	{.name = "ITLB_MISS",
+	 .code = 0x03,
+	 .desc = "Instruction MicroTLB miss"
+	},
+	{.name = "DTLB_MISS",
+	 .code = 0x04,
+	 .desc = "Data MicroTLB miss"
+	},
+	{.name = "BR_EXEC",
+	 .code = 0x05,
+	 .desc = "Branch instruction executed"
+	},
+	{.name = "BR_MISPREDICT",
+	 .code = 0x06,
+	 .desc = "Branch mispredicted"
+	},
+	{.name = "INSTR_EXEC",
+	 .code = 0x07,
+	 .desc = "Instruction executed"
+	},
+	{.name = "DCACHE_HIT",
+	 .code = 0x09,
+	 .desc = "Data cache hit"
+	},
+	{.name = "DCACHE_ACCESS",
+	 .code = 0x0a,
+	 .desc = "Data cache access"
+	},
+	{.name = "DCACHE_MISS",
+	 .code = 0x0b,
+	 .desc = "Data cache miss"
+	},
+	{.name = "DCACHE_WBACK",
+	 .code = 0x0c,
+	 .desc = "Data cache writeback"
+	},
+	{.name = "SW_PC_CHANGE",
+	 .code = 0x0d,
+	 .desc = "Software changed the PC."
+	},
+	{.name = "MAIN_TLB_MISS",
+	 .code = 0x0f,
+	 .desc = "Main TLB miss"
+	},
+	{.name = "EXPL_D_ACCESS",
+	 .code = 0x10,
+	 .desc = "Explicit external data cache access "
+	},
+	{.name = "LSU_FULL_STALL",
+	 .code = 0x11,
+	 .desc = "Stall because of a full Load Store Unit request queue."
+	},
+	{.name = "WBUF_DRAINED",
+	 .code = 0x12,
+	 .desc = "Write buffer drained due to data synchronization barrier or strongly ordered operation"
+	},
+	{.name = "ETMEXTOUT_0",
+	 .code = 0x20,
+	 .desc = "ETMEXTOUT[0] was asserted"
+	},
+	{.name = "ETMEXTOUT_1",
+	 .code = 0x21,
+	 .desc = "ETMEXTOUT[1] was asserted"
+	},
+	{.name = "ETMEXTOUT",
+	 .code = 0x22,
+	 .desc = "Increment once for each of ETMEXTOUT[0] or ETMEXTOUT[1]"
+	},
+	{.name = "PROC_CALL_EXEC",
+	 .code = 0x23,
+	 .desc = "Procedure call instruction executed"
+	},
+	{.name = "PROC_RET_EXEC",
+	 .code = 0x24,
+	 .desc = "Procedure return instruction executed"
+	},
+	{.name = "PROC_RET_EXEC_PRED",
+	 .code = 0x25,
+	 .desc = "Proceudre return instruction executed and address predicted"
+	},
+	{.name = "PROC_RET_EXEC_PRED_INCORRECT",
+	 .code = 0x26,
+	 .desc = "Procedure return instruction executed and address predicted incorrectly"
+	},
+	{.name = "CPU_CYCLES",
+	 .code = 0xff,
+	 .desc = "CPU cycles"
+	},
+};
+
+#define ARM_1176_EVENT_COUNT	(sizeof(arm_1176_pe)/sizeof(arm_entry_t))
diff --git a/lib/pfmlib_arm_armv6.c b/lib/pfmlib_arm_armv6.c
new file mode 100644
index 0000000..d59b402
--- /dev/null
+++ b/lib/pfmlib_arm_armv6.c
 <at>  <at>  -0,0 +1,77  <at>  <at> 
+/*
+ * pfmlib_arm_armv6.c : 	support for ARMv6 chips
+ *
+ * Copyright (c) 2013 by Vince Weaver <vincent.weaver <at> maine.edu>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+ * of the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
+ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ */
+
+#include <sys/types.h>
+#include <string.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <stdarg.h>
+
+/* private headers */
+#include "pfmlib_priv.h"			/* library private */
+#include "pfmlib_arm_priv.h"
+
+#include "events/arm_1176_events.h"        /* event tables */
+
+static int
+pfm_arm_detect_1176(void *this)
+{
+
+	int ret;
+
+	ret = pfm_arm_detect(this);
+	if (ret != PFM_SUCCESS)
+		return PFM_ERR_NOTSUPP;
+
+	if ((pfm_arm_cfg.implementer == 0x41) && /* ARM */
+			(pfm_arm_cfg.part==0xb76)) { /* 1176 */
+		return PFM_SUCCESS;
+	}
+	return PFM_ERR_NOTSUPP;
+}
+
+/* ARM1176 support */
+pfmlib_pmu_t arm_1176_support={
+	.desc			= "ARM1176",
+	.name			= "arm_1176",
+	.pmu			= PFM_PMU_ARM_1176,
+	.pme_count		= LIBPFM_ARRAY_SIZE(arm_1176_pe),
+	.type			= PFM_PMU_TYPE_CORE,
+	.pe			= arm_1176_pe,
+
+	.pmu_detect		= pfm_arm_detect_1176,
+	.max_encoding		= 1,
+	.num_cntrs		= 2,
+
+	.get_event_encoding[PFM_OS_NONE] = pfm_arm_get_encoding,
+	 PFMLIB_ENCODE_PERF(pfm_arm_get_perf_encoding),
+	.get_event_first	= pfm_arm_get_event_first,
+	.get_event_next		= pfm_arm_get_event_next,
+	.event_is_valid		= pfm_arm_event_is_valid,
+	.validate_table		= pfm_arm_validate_table,
+	.get_event_info		= pfm_arm_get_event_info,
+	.get_event_attr_info	= pfm_arm_get_event_attr_info,
+	 PFMLIB_VALID_PERF_PATTRS(pfm_arm_perf_validate_pattrs),
+	.get_event_nattrs	= pfm_arm_get_event_nattrs,
+};
diff --git a/lib/pfmlib_common.c b/lib/pfmlib_common.c
index c29a325..87f6a01 100644
--- a/lib/pfmlib_common.c
+++ b/lib/pfmlib_common.c
 <at>  <at>  -152,6 +152,7  <at>  <at>  static pfmlib_pmu_t *pfmlib_pmus[]=
 	&arm_cortex_a8_support,
 	&arm_cortex_a9_support,
 	&arm_cortex_a15_support,
+	&arm_1176_support,
 #endif
 #ifdef CONFIG_PFMLIB_ARCH_S390X
 	&s390x_cpum_cf_support,
diff --git a/lib/pfmlib_priv.h b/lib/pfmlib_priv.h
index 8d3353d..b57aa10 100644
--- a/lib/pfmlib_priv.h
+++ b/lib/pfmlib_priv.h
 <at>  <at>  -274,6 +274,7  <at>  <at>  extern pfmlib_pmu_t intel_wsm_unc_support;
 extern pfmlib_pmu_t arm_cortex_a8_support;
 extern pfmlib_pmu_t arm_cortex_a9_support;
 extern pfmlib_pmu_t arm_cortex_a15_support;
+extern pfmlib_pmu_t arm_1176_support;
 extern pfmlib_pmu_t mips_74k_support;
 extern pfmlib_pmu_t s390x_cpum_cf_support;

--

-- 
1.7.10.4

------------------------------------------------------------------------------
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb

Gmane