Add the bare-bones framework to get libpfm to compile on a PowerPC machine.

Signed-off-by: Kevin Corry <[EMAIL PROTECTED]>

diff -Naur libpfm-3.2-070206/examples/self_view.c 
libpfm-3.2-070206-powerpc/examples/self_view.c
--- libpfm-3.2-070206/examples/self_view.c      2007-02-06 14:50:03.000000000 
-0600
+++ libpfm-3.2-070206-powerpc/examples/self_view.c      2007-04-02 
11:25:04.000000000 -0500
@@ -93,7 +93,7 @@
        tmp = (uint64_t)high <<32 | low;
        return tmp;
 }
-#elif defined(__mips__)
+#elif defined(__mips__) || defined(__powerpc__)
 /*
  * XXX: MIPS does not have an instruction to read a counter at the user level
  */
diff -Naur libpfm-3.2-070206/include/Makefile 
libpfm-3.2-070206-powerpc/include/Makefile
--- libpfm-3.2-070206/include/Makefile  2007-02-06 14:50:03.000000000 -0600
+++ libpfm-3.2-070206-powerpc/include/Makefile  2007-04-02 11:23:01.000000000 
-0500
@@ -51,6 +51,12 @@
           perfmon/perfmon_pebs_smpl.h
 endif
 
+ifeq ($(CONFIG_PFMLIB_ARCH_POWERPC),y)
+HEADERS += perfmon/pfmlib_os_powerpc.h   \
+          perfmon/pfmlib_comp_powerpc.h \
+          perfmon/pfmlib_powerpc.h
+endif
+
 ifeq ($(CONFIG_PFMLIB_GENERIC_IA64),y)
 HEADERS += perfmon/pfmlib_gen_ia64.h
 endif
diff -Naur libpfm-3.2-070206/include/perfmon/perfmon.h 
libpfm-3.2-070206-powerpc/include/perfmon/perfmon.h
--- libpfm-3.2-070206/include/perfmon/perfmon.h 2007-02-06 14:50:03.000000000 
-0600
+++ libpfm-3.2-070206-powerpc/include/perfmon/perfmon.h 2007-04-02 
11:21:26.000000000 -0500
@@ -249,6 +249,10 @@
 #endif
 #endif
 
+#ifdef __powerpc__
+#define __NR_pfm_create_context                302
+#endif
+
 #define __NR_pfm_write_pmcs            (__NR_pfm_create_context+1)
 #define __NR_pfm_write_pmds            (__NR_pfm_create_context+2)
 #define __NR_pfm_read_pmds             (__NR_pfm_create_context+3)
diff -Naur libpfm-3.2-070206/include/perfmon/pfmlib_comp.h 
libpfm-3.2-070206-powerpc/include/perfmon/pfmlib_comp.h
--- libpfm-3.2-070206/include/perfmon/pfmlib_comp.h     2007-02-06 
14:50:03.000000000 -0600
+++ libpfm-3.2-070206-powerpc/include/perfmon/pfmlib_comp.h     2007-04-02 
10:55:34.000000000 -0500
@@ -38,4 +38,8 @@
 #include <perfmon/pfmlib_comp_mips64.h>
 #endif
 
+#ifdef __powerpc__
+#include <perfmon/pfmlib_comp_powerpc.h>
+#endif
+
 #endif /* __PFMLIB_COMP_H__ */
diff -Naur libpfm-3.2-070206/include/perfmon/pfmlib_comp_powerpc.h 
libpfm-3.2-070206-powerpc/include/perfmon/pfmlib_comp_powerpc.h
--- libpfm-3.2-070206/include/perfmon/pfmlib_comp_powerpc.h     1969-12-31 
18:00:00.000000000 -0600
+++ libpfm-3.2-070206-powerpc/include/perfmon/pfmlib_comp_powerpc.h     
2007-04-02 10:55:01.000000000 -0500
@@ -0,0 +1,54 @@
+/*
+ * PowerPC compiler specific macros
+ *
+ * Copyright (c) 2005-2006 Hewlett-Packard Development Company, L.P.
+ * Contributed by Stephane Eranian <[EMAIL PROTECTED]>
+ *
+ * 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.
+ */
+#ifndef __PFMLIB_COMP_POWERPC_H__
+#define __PFMLIB_COMP_POWERPC_H__
+
+#ifndef __PFMLIB_COMP_H__
+#error "you should never include this file directly, use pfmlib_comp.h"
+#endif
+
+#ifndef __powerpc__
+#error "you should not be including this file"
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+static inline unsigned long
+pfmlib_popcnt(unsigned long v)
+{
+       unsigned long sum = 0;
+
+       for(; v ; v >>=1) {
+               if (v & 0x1) sum++;
+       }
+       return sum;
+}
+
+#ifdef __cplusplus /* extern C */
+}
+#endif
+
+#endif /* __PFMLIB_COMP_POWERPC_H__ */
diff -Naur libpfm-3.2-070206/include/perfmon/pfmlib.h 
libpfm-3.2-070206-powerpc/include/perfmon/pfmlib.h
--- libpfm-3.2-070206/include/perfmon/pfmlib.h  2007-02-06 14:50:03.000000000 
-0600
+++ libpfm-3.2-070206-powerpc/include/perfmon/pfmlib.h  2007-04-02 
10:53:32.000000000 -0500
@@ -216,6 +216,8 @@
 #define PFMLIB_MIPS_VR5432_PMU         75      /* MIPS VR5432 */
 #define PFMLIB_MIPS_VR5500_PMU         76      /* MIPS VR5500 */
 
+#define PFMLIB_POWERPC_PMU             80      /* POWERPC */
+
 /*
  * pfmlib error codes
  */
diff -Naur libpfm-3.2-070206/include/perfmon/pfmlib_os.h 
libpfm-3.2-070206-powerpc/include/perfmon/pfmlib_os.h
--- libpfm-3.2-070206/include/perfmon/pfmlib_os.h       2007-02-06 
14:50:03.000000000 -0600
+++ libpfm-3.2-070206-powerpc/include/perfmon/pfmlib_os.h       2007-04-02 
10:55:57.000000000 -0500
@@ -38,4 +38,8 @@
 #include <perfmon/pfmlib_os_mips64.h>
 #endif
 
+#ifdef __powerpc__
+#include <perfmon/pfmlib_os_powerpc.h>
+#endif
+
 #endif /* __PFMLIB_OS_H__ */
diff -Naur libpfm-3.2-070206/include/perfmon/pfmlib_os_powerpc.h 
libpfm-3.2-070206-powerpc/include/perfmon/pfmlib_os_powerpc.h
--- libpfm-3.2-070206/include/perfmon/pfmlib_os_powerpc.h       1969-12-31 
18:00:00.000000000 -0600
+++ libpfm-3.2-070206-powerpc/include/perfmon/pfmlib_os_powerpc.h       
2007-04-02 10:52:08.000000000 -0500
@@ -0,0 +1,57 @@
+/*
+ * Copyright (c) 2005-2006 Hewlett-Packard Development Company, L.P.
+ * Contributed by Stephane Eranian <[EMAIL PROTECTED]>
+ *
+ * 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.
+ */
+#ifndef __PFMLIB_OS_POWERPC_H__
+#define __PFMLIB_OS_POWERPC_H__
+
+#ifndef __PFMLIB_OS_H__
+#error "you should never include this file directly, use pfmlib_os.h"
+#endif
+
+#include <perfmon/pfmlib_comp.h>
+
+#ifndef __powerpc__
+#error "you should not be including this file"
+#endif
+
+#ifndef __PFMLIB_OS_COMPILE
+#include <perfmon/perfmon.h>
+/*
+ * macros version of pfm_self_start/pfm_self_stop to be used in per-process 
self-monitoring sessions.
+ * they are also defined as real functions.
+ *
+ * DO NOT USE on system-wide sessions.
+ */
+static inline int
+pfm_self_start(int fd)
+{
+       return pfm_start(fd, NULL);
+}
+
+static inline int
+pfm_self_stop(int fd)
+{
+       return pfm_stop(fd);
+}
+#endif /* __PFMLIB_OS_COMPILE */
+
+
+#endif /* __PFMLIB_OS_POWERPC_H__ */
diff -Naur libpfm-3.2-070206/include/perfmon/pfmlib_powerpc.h 
libpfm-3.2-070206-powerpc/include/perfmon/pfmlib_powerpc.h
--- libpfm-3.2-070206/include/perfmon/pfmlib_powerpc.h  1969-12-31 
18:00:00.000000000 -0600
+++ libpfm-3.2-070206-powerpc/include/perfmon/pfmlib_powerpc.h  2007-04-23 
15:23:52.000000000 -0500
@@ -0,0 +1,29 @@
+/*
+ * PowerPC PMU specific types and definitions.
+ *
+ * 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.
+ */
+
+#ifndef __PFMLIB_POWERPC_H_
+#define __PFMLIB_POWERPC_H__
+
+#include <perfmon/pfmlib.h>
+
+/* Nothing to see here ... move along. */
+
+#endif /* __PFMLIB_POWERPC_H__ */
diff -Naur libpfm-3.2-070206/lib/Makefile libpfm-3.2-070206-powerpc/lib/Makefile
--- libpfm-3.2-070206/lib/Makefile      2007-02-06 14:50:04.000000000 -0600
+++ libpfm-3.2-070206-powerpc/lib/Makefile      2007-04-02 11:05:22.000000000 
-0500
@@ -59,6 +59,10 @@
 INCDEP := $(INCDEP) $(INC_MIPS64)
 endif
 
+ifeq ($(ARCH),powerpc)
+INCDEP := $(INCDEP) $(INC_POWERPC)
+endif
+
 ifeq ($(CONFIG_PFMLIB_GEN_IA64),y)
 SRCS   += pfmlib_gen_ia64.c
 CFLAGS += -DCONFIG_PFMLIB_GEN_IA64
@@ -109,6 +113,11 @@
 CFLAGS += -DCONFIG_PFMLIB_GEN_MIPS64
 endif
 
+ifeq ($(CONFIG_PFMLIB_POWERPC),y)
+SRCS   += pfmlib_powerpc.c
+CFLAGS += -DCONFIG_PFMLIB_POWERPC
+endif
+
 CFLAGS+=-I.
 ALIBPFM=libpfm.a
 SLIBPFM=libpfm.so.$(VERSION).$(REVISION).$(AGE)
@@ -186,3 +195,8 @@
   $(PFMINCDIR)/perfmon/pfmlib_comp_mips64.h \
   $(PFMINCDIR)/perfmon/pfmlib_os_mips64.h \
   gen_mips64_events.h
+
+INC_POWERPC= $(PFMINCDIR)/perfmon/pfmlib_powerpc.h \
+  $(PFMINCDIR)/perfmon/pfmlib_comp_powerpc.h \
+  $(PFMINCDIR)/perfmon/pfmlib_os_powerpc.h \
+  power_events.h
diff -Naur libpfm-3.2-070206/lib/pfmlib_powerpc.c 
libpfm-3.2-070206-powerpc/lib/pfmlib_powerpc.c
--- libpfm-3.2-070206/lib/pfmlib_powerpc.c      1969-12-31 18:00:00.000000000 
-0600
+++ libpfm-3.2-070206-powerpc/lib/pfmlib_powerpc.c      2007-04-23 
15:24:51.000000000 -0500
@@ -0,0 +1,242 @@
+/*
+ * Copyright (c) 2005-2006 Hewlett-Packard Development Company, L.P.
+ *
+ * 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.
+ *
+ * pfmlib_powerpc.c
+ *
+ * Support for libpfm for the POWERPC processor family.
+ */
+
+#define _GNU_SOURCE
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <limits.h>
+#include <perfmon/pfmlib_powerpc.h>
+
+/* private headers */
+#include "pfmlib_priv.h"
+#include "pfmlib_powerpc_priv.h"
+#include "powerpc_events.h"
+
+/* Add structures here to define the PMD and PMC mappings. */
+
+/**
+ * powerpc_get_event_code
+ *
+ * Return the event-select value for the specified event as
+ * needed for the specified PMD counter.
+ **/
+static int powerpc_get_event_code(unsigned int event,
+                                  unsigned int pmd,
+                                  int *code)
+{
+       return 0;
+}
+
+/**
+ * powerpc_get_event_name
+ *
+ * Return the name of the specified event.
+ **/
+static char *powerpc_get_event_name(unsigned int event)
+{
+       return "";
+}
+
+/**
+ * powerpc_get_event_mask_name
+ *
+ * Return the name of the specified event-mask.
+ **/
+static char *powerpc_get_event_mask_name(unsigned int event, unsigned int mask)
+{
+       return "";
+}
+
+/**
+ * powerpc_get_event_counters
+ *
+ * Fill in the 'counters' bitmask with all possible PMDs that could be
+ * used to count the specified event.
+ **/
+static void powerpc_get_event_counters(unsigned int event,
+                                       pfmlib_regmask_t *counters)
+{
+       memset(counters, 0, sizeof(*counters));
+}
+
+/**
+ * powerpc_get_num_event_masks
+ *
+ * Count the number of available event-masks for the specified event.
+ **/
+static unsigned int powerpc_get_num_event_masks(unsigned int event)
+{
+       return 0;
+}
+
+/**
+ * powerpc_dispatch_events
+ *
+ * Examine each desired event specified in "input" and find an appropriate
+ * set of PMCs and PMDs to count them.
+ **/
+static int powerpc_dispatch_events(pfmlib_input_param_t *input,
+                                  void *model_input,
+                                  pfmlib_output_param_t *output,
+                                  void *model_output)
+{
+       return 0;
+}
+
+/**
+ * powerpc_pmu_detect
+ *
+ * Determine whether the system we're running on is a PowerPC.
+ * (or other CPU that uses the same PMU).
+ **/
+static int powerpc_pmu_detect(void)
+{
+       return 0;
+}
+
+/**
+ * powerpc_get_impl_pmcs
+ *
+ * Set the appropriate bit in the impl_pmcs bitmask for each PMC that's
+ * available on PowerPC.
+ **/
+static void powerpc_get_impl_pmcs(pfmlib_regmask_t *impl_pmcs)
+{
+       return;
+}
+
+/**
+ * powerpc_get_impl_pmds
+ *
+ * Set the appropriate bit in the impl_pmcs bitmask for each PMD that's
+ * available on PowerPC.
+ **/
+static void powerpc_get_impl_pmds(pfmlib_regmask_t *impl_pmds)
+{
+       return;
+}
+
+/**
+ * powerpc_get_impl_counters
+ *
+ * Set the appropriate bit in the impl_counters bitmask for each counter
+ * that's available on PowerPC.
+ *
+ * For now, all PMDs are counters, so just call get_impl_pmds().
+ **/
+static void powerpc_get_impl_counters(pfmlib_regmask_t *impl_counters)
+{
+       powerpc_get_impl_pmds(impl_counters);
+}
+
+/**
+ * powerpc_get_hw_counter_width
+ *
+ * Return the number of usable bits in the PMD counters.
+ **/
+static void powerpc_get_hw_counter_width(unsigned int *width)
+{
+       *width = 0;
+}
+
+/**
+ * powerpc_get_event_desc
+ *
+ * Return the description for the specified event (if it has one).
+ **/
+static int powerpc_get_event_desc(unsigned int event, char **desc)
+{
+       *desc = NULL;
+       return 0;
+}
+
+/**
+ * powerpc_get_event_mask_desc
+ *
+ * Return the description for the specified event-mask (if it has one).
+ **/
+static int powerpc_get_event_mask_desc(unsigned int event,
+                                       unsigned int mask, char **desc)
+{
+       *desc = strdup("");
+       return 0;
+}
+
+static int powerpc_get_event_mask_code(unsigned int event,
+                                       unsigned int mask, unsigned int *code)
+{
+       *code = 0;
+       return 0;
+}
+
+static int
+powerpc_get_cycle_event(pfmlib_event_t *e)
+{
+       e->event = 0
+       e->num_masks = 0;
+       e->unit_masks[0] = 0;
+       return 0;
+
+}
+
+static int
+powerpc_get_inst_retired(pfmlib_event_t *e)
+{
+       e->event = 0;
+       e->num_masks = 0;
+       e->unit_masks[0] = 0;
+       return 0;
+}
+
+/**
+ * powerpc_support
+ **/
+pfm_pmu_support_t powerpc_support = {
+       .pmu_name               = "PowerPC",
+       .pmu_type               = PFMLIB_POWERPC_PMU,
+       .pme_count              = 1
+       .pmd_count              = 1
+       .pmc_count              = 1
+       .num_cnt                = 1
+       .get_event_code         = powerpc_get_event_code,
+       .get_event_name         = powerpc_get_event_name,
+       .get_event_mask_name    = powerpc_get_event_mask_name,
+       .get_event_counters     = powerpc_get_event_counters,
+       .get_num_event_masks    = powerpc_get_num_event_masks,
+       .dispatch_events        = powerpc_dispatch_events,
+       .pmu_detect             = powerpc_pmu_detect,
+       .get_impl_pmcs          = powerpc_get_impl_pmcs,
+       .get_impl_pmds          = powerpc_get_impl_pmds,
+       .get_impl_counters      = powerpc_get_impl_counters,
+       .get_hw_counter_width   = powerpc_get_hw_counter_width,
+       .get_event_desc         = powerpc_get_event_desc,
+       .get_event_mask_desc    = powerpc_get_event_mask_desc,
+       .get_event_mask_code    = powerpc_get_event_mask_code,
+       .get_cycle_event        = powerpc_get_cycle_event,
+       .get_inst_retired_event = powerpc_get_inst_retired
+};
+
diff -Naur libpfm-3.2-070206/lib/pfmlib_powerpc_priv.h 
libpfm-3.2-070206-powerpc/lib/pfmlib_powerpc_priv.h
--- libpfm-3.2-070206/lib/pfmlib_powerpc_priv.h 1969-12-31 18:00:00.000000000 
-0600
+++ libpfm-3.2-070206-powerpc/lib/pfmlib_powerpc_priv.h 2007-04-23 
15:24:22.000000000 -0500
@@ -0,0 +1,29 @@
+/*
+ * 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.
+ *
+ * pfmlib_pentium4_priv.h
+ *
+ * Structures and definitions for use in the Pentium4/Xeon/EM64T libpfm code.
+ */
+
+#ifndef _PFMLIB_POWERPC_PRIV_H_
+#define _PFMLIB_POWERPC_PRIV_H_
+
+#endif
+
diff -Naur libpfm-3.2-070206/lib/powerpc_events.h 
libpfm-3.2-070206-powerpc/lib/powerpc_events.h
--- libpfm-3.2-070206/lib/powerpc_events.h      1969-12-31 18:00:00.000000000 
-0600
+++ libpfm-3.2-070206-powerpc/lib/powerpc_events.h      2007-04-23 
15:24:07.000000000 -0500
@@ -0,0 +1,29 @@
+/*
+ * 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.
+ *
+ * powerpc_events.h
+ */
+
+#ifndef _POWERPC_EVENTS_H_
+#define _POWERPC_EVENTS_H_
+
+#define PME_INSTR_COMPLETED 1
+
+#endif
+
_______________________________________________
perfmon mailing list
[email protected]
http://www.hpl.hp.com/hosted/linux/mail-archives/perfmon/

Reply via email to