diff --git a/.cvsignore b/.cvsignore index c157846..c5c3899 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -papi-4.0.0.tar.gz +papi-4.1.0.tar.gz diff --git a/papi-4.0.0-patch1.patch b/papi-4.0.0-patch1.patch deleted file mode 100644 index 0017596..0000000 --- a/papi-4.0.0-patch1.patch +++ /dev/null @@ -1,372 +0,0 @@ -diff -rupN papi400t/src/configure papi400b/src/configure ---- papi400t/src/configure 2010-01-13 11:20:35.000000000 -0500 -+++ papi400b/src/configure 2010-01-26 12:53:10.000000000 -0500 -@@ -2113,7 +2113,6 @@ case "$OS" in - made=GenuineIntel - family="`cat /proc/cpuinfo | grep family | cut -d: -f2 | cut -d' ' -f2 | sed '2,$d'`" - model="`cat /proc/cpuinfo | grep model | cut -d: -f2 | cut -d' ' -f2 | sed '2,$d'`" -- # family 15 is always P4; model 1 is vanilla pre-HT, model 2 is vanilla; model 3 is em64t, 4 is Pentium D, 6 is Xeon D - if test "$family" = "6"; then - # model 14 is an ancient Core - if test "$model" = "14"; then -@@ -2135,14 +2134,10 @@ case "$OS" in - CPU=atom - use_x86_cache_info=yes - fi -+ # family 15 is always P4 - elif test "$family" = "15"; then -- if (test "$model" = "3" || test "$model" = "4" || test "$model" = "6"); then -- CPU=em64t -- use_x86_cache_info=yes -- elif (test "$model" = "1" || test "$model" = "2"); then - CPU=p4 - use_x86_cache_info=yes -- fi - elif test "$family" = "32"; then - CPU=montecito - elif test "$family" = "31"; then -@@ -2157,7 +2152,8 @@ case "$OS" in - elif test "`cat /proc/cpuinfo | grep -i "Pentium III"`" != ""; then - CPU=p3 - use_x86_cache_info=yes -- else CPU=p3 -+ else -+ CPU=p3 - use_x86_cache_info=yes - fi - fi -@@ -9033,7 +9029,7 @@ $as_echo "$as_me: error: The bitmode you - else - MAKEVER="$OS"-pfm-"$CPU" - fi ;; -- opteron|core|core2|i7|atom|em64t|p3) -+ opteron|core|core2|i7|atom|p3) - if test "$arch" = "x86_64"; then - MAKEVER="$OS"-perfctr-p3 - else -@@ -9099,7 +9095,6 @@ case "$MAKEVER" in - linux-perfctr-athlon);; - linux-perfctr-p3);; - linux-perfctr-p4);; -- linux-perfctr-em64t);; - solaris-ultra);; - solaris-ultra-64bit);; - solaris-niagara2|solaris-niagara2-32bit);; -diff -rupN papi400t/src/configure.in papi400b/src/configure.in ---- papi400t/src/configure.in 2010-01-13 11:03:58.000000000 -0500 -+++ papi400b/src/configure.in 2010-01-26 12:53:10.000000000 -0500 -@@ -1,7 +1,7 @@ - # -*- Autoconf -*- - # Process this file with autoconf to produce a configure script. - # File: configure.in --# CVS: $Id: configure.in,v 1.166 2010/01/13 16:03:58 sbk Exp $ -+# CVS: $Id: configure.in,v 1.166.2.1 2010/01/26 17:53:10 bsheely Exp $ - - - AC_PREREQ(2.61) -@@ -199,7 +199,6 @@ case "$OS" in - made=GenuineIntel - family="`cat /proc/cpuinfo | grep family | cut -d: -f2 | cut -d' ' -f2 | sed '2,$d'`" - model="`cat /proc/cpuinfo | grep model | cut -d: -f2 | cut -d' ' -f2 | sed '2,$d'`" -- # family 15 is always P4; model 1 is vanilla pre-HT, model 2 is vanilla; model 3 is em64t, 4 is Pentium D, 6 is Xeon D - if test "$family" = "6"; then - # model 14 is an ancient Core - if test "$model" = "14"; then -@@ -221,14 +220,10 @@ case "$OS" in - CPU=atom - use_x86_cache_info=yes - fi -+ # family 15 is always P4 - elif test "$family" = "15"; then -- if (test "$model" = "3" || test "$model" = "4" || test "$model" = "6"); then -- CPU=em64t -- use_x86_cache_info=yes -- elif (test "$model" = "1" || test "$model" = "2"); then - CPU=p4 - use_x86_cache_info=yes -- fi - elif test "$family" = "32"; then - CPU=montecito - elif test "$family" = "31"; then -@@ -243,7 +238,8 @@ case "$OS" in - elif test "`cat /proc/cpuinfo | grep -i "Pentium III"`" != ""; then - CPU=p3 - use_x86_cache_info=yes -- else CPU=p3 -+ else -+ CPU=p3 - use_x86_cache_info=yes - fi - fi -@@ -1441,7 +1437,7 @@ case "$OS" in - else - MAKEVER="$OS"-pfm-"$CPU" - fi ;; -- opteron|core|core2|i7|atom|em64t|p3) -+ opteron|core|core2|i7|atom|p3) - if test "$arch" = "x86_64"; then - MAKEVER="$OS"-perfctr-p3 - else -@@ -1500,7 +1496,6 @@ case "$MAKEVER" in - linux-perfctr-athlon);; - linux-perfctr-p3);; - linux-perfctr-p4);; -- linux-perfctr-em64t);; - solaris-ultra);; - solaris-ultra-64bit);; - solaris-niagara2|solaris-niagara2-32bit);; -diff -rupN papi400t/src/ctests/shlib.c papi400b/src/ctests/shlib.c ---- papi400t/src/ctests/shlib.c 2009-09-10 16:19:49.000000000 -0400 -+++ papi400b/src/ctests/shlib.c 2010-01-26 19:27:26.000000000 -0500 -@@ -1,6 +1,6 @@ - /* - * File: profile.c --* CVS: $Id: shlib.c,v 1.18 2009/09/10 20:19:49 terpstra Exp $ -+* CVS: $Id: shlib.c,v 1.18.6.2 2010/01/27 00:27:26 jagode Exp $ - * Author: Philip Mucci - * mucci@cs.utk.edu - * Mods: -@@ -59,50 +59,26 @@ int main(int argc, char **argv) - - #ifndef NO_DLFCN - { -- char *libname = -- "libpapi.so"; -- char *libname2 = -- "libpapi64.so"; -- char *_libname; -+ char *_libname = -+ "libm.so"; - void *handle ; --/* -- void *handle = dlopen("libm.so", RTLD_LAZY); --*/ -- int (*num_hwctrs)(void); -+ double (*pow)(double,double); - int oldcount; -- int my_dlerror = 0; -- --RETRY: -- if ( !my_dlerror ){ -- printf("\nLoading %s with dlopen().\n",libname); -- _libname = libname; -- } -- else{ -- printf("\nLoading %s with dlopen().\n",libname2); -- _libname = libname2; -- } - - handle = dlopen (_libname, RTLD_NOW); - if (!handle) { - printf("dlopen: %s\n",dlerror()); -- if ( !my_dlerror ){ -- my_dlerror = 1; -- printf("Trying again."); -- goto RETRY; -- } - printf("Did you forget to set the environmental variable LIBPATH (in AIX) or LD_LIBRARY_PATH (in linux) ?\n"); - test_fail(__FILE__, __LINE__, "dlopen", 1); - } - -- printf("Looking up PAPI_num_counters() \n"); -- num_hwctrs = ( int (*) (void)) dlsym(handle, "PAPI_num_counters"); -- if (num_hwctrs == NULL) { -- printf("dlsym: %s \n", dlerror()); -- test_fail(__FILE__, __LINE__, "dlsym", 1); -- } -- -- printf ("There are %d hardware counters \n", (*num_hwctrs)()); -- -+ pow = (double(*)(double,double)) dlsym(handle, "pow"); -+ if (pow == NULL) { -+ printf("dlsym: %s\n", dlerror()); -+ test_fail(__FILE__,__LINE__,"dlsym",1); -+ } -+ printf("2^2 = %lf \n",(*pow)(2,2)); -+ - oldcount = shinfo->count; - - if ((shinfo = PAPI_get_shared_lib_info()) == NULL) { -diff -rupN papi400t/src/extras.c papi400b/src/extras.c ---- papi400t/src/extras.c 2009-12-18 15:24:24.000000000 -0500 -+++ papi400b/src/extras.c 2010-01-27 17:26:42.000000000 -0500 -@@ -4,7 +4,7 @@ - - /* - * File: extras.c --* CVS: $Id: extras.c,v 1.159 2009/12/18 20:24:24 terpstra Exp $ -+* CVS: $Id: extras.c,v 1.159.2.2 2010/01/27 22:26:42 jagode Exp $ - * Author: Philip Mucci - * mucci@cs.utk.edu - * Mods: dan terpstra -@@ -562,34 +562,50 @@ int _papi_hwi_native_name_to_code(char * - char name[PAPI_HUGE_STR_LEN]; /* make sure it's big enough */ - unsigned int i, j; - -- for (j=0,i = 0 | PAPI_NATIVE_MASK;jntv_name_to_code, NULL) == NULL) -- retval = _papi_hwd[j]->ntv_name_to_code(in, (unsigned *)out); -- else { -- _papi_hwd[j]->ntv_enum_events(&i, PAPI_ENUM_FIRST); -- _papi_hwi_lock(INTERNAL_LOCK); -- do { -+ if ( vector_find_dummy( ( void* ) _papi_hwd[j]->ntv_name_to_code, NULL ) == NULL ) -+ { -+ /* if ntv_name_to_code is set and != NULL */ -+ retval = _papi_hwd[j]->ntv_name_to_code( in, ( unsigned * ) out ); -+ } -+ else -+ { -+ _papi_hwd[j]->ntv_enum_events( &i, PAPI_ENUM_FIRST ); -+ _papi_hwi_lock( INTERNAL_LOCK ); -+ -+ do -+ { - retval = _papi_hwd[j]->ntv_code_to_name(i, name, sizeof(name)); - /* printf("name =|%s|\ninput=|%s|\n", name, in); */ -- if (retval == PAPI_OK) { -- if (strcasecmp(name, in) == 0) { -+ if (retval == PAPI_OK) -+ { -+ if (strcasecmp(name, in) == 0) -+ { - *out = i | PAPI_COMPONENT_MASK(j);; - break; -- } else { -+ } -+ else - retval = PAPI_ENOEVNT; -- } -- } else { -+ } -+ else -+ { - *out = 0; - retval = PAPI_ENOEVNT; - break; - } -- } while ((_papi_hwd[j]->ntv_enum_events(&i, PAPI_ENUM_EVENTS) == PAPI_OK)); -+ } -+ while ( ( _papi_hwd[j]->ntv_enum_events( &i, PAPI_ENUM_EVENTS ) == PAPI_OK ) ); -+ - _papi_hwi_unlock(INTERNAL_LOCK); -- if (retval == PAPI_OK) return(retval); - } -+ -+ if ( retval == PAPI_OK ) -+ return( retval ); - } -- return (retval); -+ return ( retval ); - } - - -diff -rupN papi400t/src/papi.c papi400b/src/papi.c ---- papi400t/src/papi.c 2009-12-18 15:24:24.000000000 -0500 -+++ papi400b/src/papi.c 2010-01-26 20:40:35.000000000 -0500 -@@ -4,7 +4,7 @@ - - /* - * File: papi.c --* CVS: $Id: papi.c,v 1.337 2009/12/18 20:24:24 terpstra Exp $ -+* CVS: $Id: papi.c,v 1.337.2.1 2010/01/27 01:40:35 terpstra Exp $ - * Author: Philip Mucci - * mucci@cs.utk.edu - * Mods: dan terpstra -@@ -1349,13 +1349,10 @@ int PAPI_set_multiplex(int EventSet) - if (ESI == NULL) - papi_return(PAPI_ENOEVST); - -- /* if the eventset has no index and no events, return OK -- otherwise return NOCMP */ -+ /* if the eventset has no index return NOCMP */ - cidx = valid_ESI_component(ESI); -- if (cidx < 0) { -- if (ESI->NumberOfEvents) papi_return(cidx); -- papi_return(PAPI_OK); -- } -+ if (cidx < 0) papi_return(cidx); -+ - if ((ret = mpx_check(EventSet)) != PAPI_OK) - papi_return(ret); - -diff -rupN papi400t/src/perf_events.c papi400b/src/perf_events.c ---- papi400t/src/perf_events.c 2010-01-14 10:48:00.000000000 -0500 -+++ papi400b/src/perf_events.c 2010-01-27 17:26:42.000000000 -0500 -@@ -1,6 +1,6 @@ - /* - * File: perf_events.c --* CVS: $Id: perf_events.c,v 1.18 2010/01/14 15:48:00 terpstra Exp $ -+* CVS: $Id: perf_events.c,v 1.18.2.1 2010/01/27 22:26:42 jagode Exp $ - * Author: Corey Ashford - * cjashfor@us.ibm.com - * - based upon perfmon.c written by - -@@ -76,6 +76,7 @@ extern papi_vector_t _papi_pe_vector; - - extern int _papi_pfm_setup_presets(char *name, int type); - extern int _papi_pfm_ntv_enum_events(unsigned int *EventCode, int modifier); -+extern int _papi_pfm_ntv_name_to_code(char *ntv_name, unsigned int *EventCode); - extern int _papi_pfm_ntv_code_to_name(unsigned int EventCode, char *ntv_name, int len); - extern int _papi_pfm_ntv_code_to_descr(unsigned int EventCode, char *ntv_descr, int len); - extern int _papi_pfm_ntv_code_to_bits(unsigned int EventCode, hwd_register_t *bits); -@@ -2014,8 +2015,8 @@ int _papi_pe_init_substrate (int cidx) - } - SUBDBG ("pfm_get_num_events: %d\n", ncnt); - MY_VECTOR.cmp_info.num_native_events = ncnt; -- strcpy (MY_VECTOR.cmp_info.name, "$Id: perf_events.c,v 1.18 2010/01/14 15:48:00 terpstra Exp $"); -- strcpy (MY_VECTOR.cmp_info.version, "$Revision: 1.18 $"); -+ strcpy (MY_VECTOR.cmp_info.name, "$Id: perf_events.c,v 1.18.2.1 2010/01/27 22:26:42 jagode Exp $"); -+ strcpy (MY_VECTOR.cmp_info.version, "$Revision: 1.18.2.1 $"); - sprintf (buf, "%08x", version); - - pfm_get_num_counters ((unsigned int *) &MY_VECTOR.cmp_info.num_cntrs); -@@ -3383,6 +3384,7 @@ papi_vector_t _papi_pe_vector = { - .allocate_registers = _papi_pe_allocate_registers, - .write = _papi_pe_write, - .ntv_enum_events = _papi_pfm_ntv_enum_events, -+ .ntv_name_to_code = _papi_pfm_ntv_name_to_code, - .ntv_code_to_name = _papi_pfm_ntv_code_to_name, - .ntv_code_to_descr = _papi_pfm_ntv_code_to_descr, - .ntv_code_to_bits = _papi_pfm_ntv_code_to_bits, -diff -rupN papi400t/src/perfmon.c papi400b/src/perfmon.c ---- papi400t/src/perfmon.c 2009-11-17 23:37:42.000000000 -0500 -+++ papi400b/src/perfmon.c 2010-01-27 17:26:42.000000000 -0500 -@@ -1,6 +1,6 @@ - /* - * File: perfmon.c --* CVS: $Id: perfmon.c,v 1.97 2009/11/18 04:37:42 mucci Exp $ -+* CVS: $Id: perfmon.c,v 1.97.4.1 2010/01/27 22:26:42 jagode Exp $ - * Author: Philip Mucci - * mucci@cs.utk.edu - * Mods: Brian Sheely -@@ -42,6 +42,7 @@ extern int get_cpu_info(PAPI_hw_info_t * - extern papi_vector_t _papi_pfm_vector; - extern int _papi_pfm_setup_presets(char *name, int type); - extern int _papi_pfm_ntv_enum_events(unsigned int *EventCode, int modifier); -+extern int _papi_pfm_ntv_name_to_code(char *ntv_name, unsigned int *EventCode); - extern int _papi_pfm_ntv_code_to_name(unsigned int EventCode, char *ntv_name, int len); - extern int _papi_pfm_ntv_code_to_descr(unsigned int EventCode, char *ntv_descr, int len); - extern int _papi_pfm_ntv_code_to_bits(unsigned int EventCode, hwd_register_t *bits); -@@ -2216,8 +2217,8 @@ int _papi_pfm_init_substrate(int cidx) - } - SUBDBG("pfm_get_num_events: %d\n", ncnt); - MY_VECTOR.cmp_info.num_native_events = ncnt; -- strcpy(MY_VECTOR.cmp_info.name, "$Id: perfmon.c,v 1.97 2009/11/18 04:37:42 mucci Exp $"); -- strcpy(MY_VECTOR.cmp_info.version, "$Revision: 1.97 $"); -+ strcpy(MY_VECTOR.cmp_info.name, "$Id: perfmon.c,v 1.97.4.1 2010/01/27 22:26:42 jagode Exp $"); -+ strcpy(MY_VECTOR.cmp_info.version, "$Revision: 1.97.4.1 $"); - sprintf(buf,"%08x",version); - - pfm_get_num_counters((unsigned int *)&MY_VECTOR.cmp_info.num_cntrs); -@@ -3764,6 +3765,7 @@ papi_vector_t _papi_pfm_vector = { - .allocate_registers = _papi_pfm_allocate_registers, - .write = _papi_pfm_write, - .ntv_enum_events = _papi_pfm_ntv_enum_events, -+ .ntv_name_to_code = _papi_pfm_ntv_name_to_code, - .ntv_code_to_name = _papi_pfm_ntv_code_to_name, - .ntv_code_to_descr = _papi_pfm_ntv_code_to_descr, - .ntv_code_to_bits = _papi_pfm_ntv_code_to_bits, diff --git a/papi.spec b/papi.spec index cfbe80f..3c0a975 100644 --- a/papi.spec +++ b/papi.spec @@ -1,19 +1,18 @@ Summary: Performance Application Programming Interface Name: papi -Version: 4.0.0 -Release: 2%{?dist} +Version: 4.1.0 +Release: 1%{?dist} License: BSD Group: Development/System URL: http://icl.cs.utk.edu/papi/ Source0: http://icl.cs.utk.edu/projects/papi/downloads/%{name}-%{version}.tar.gz -Patch1: papi-4.0.0-patch1.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: ncurses-devel BuildRequires: gcc-gfortran BuildRequires: kernel-headers >= 2.6.31 BuildRequires: chrpath #Right now libpfm does not know anything about s390 and will fail -ExcludeArch: s390, s390x +ExcludeArch: s390 s390x %description PAPI provides a programmer interface to monitor the performance of @@ -30,12 +29,12 @@ that uses PAPI. %prep %setup -q -%patch1 -p1 %build cd src -%configure --disable-static -make +%configure --with-static-lib=no --with-shared-lib=yes --with-shlib +#DBG workaround to make sure libpfm just uses the normal CFLAGS +DBG="" make #%check #cd src @@ -73,11 +72,24 @@ rm -rf $RPM_BUILD_ROOT %doc %{_mandir}/man1/* %changelog -* Mon Feb 08 2010 William Cohen - 4.0.0-2 +* Mon Jun 8 2010 William Cohen - 4.1.0-1 +- Rebase to papi-4.1.0 + +* Mon May 17 2010 William Cohen - 4.0.0-5 +- Test run with upstream cvs version. + +* Wed Feb 10 2010 William Cohen - 4.0.0-4 +- Resolves: rhbz562935 Rebase to papi-4.0.0 (correct ExcludeArch). + +* Wed Feb 10 2010 William Cohen - 4.0.0-3 +- Resolves: rhbz562935 Rebase to papi-4.0.0 (bump nvr). + +* Wed Feb 10 2010 William Cohen - 4.0.0-2 - correct the ctests/shlib test - have PAPI_set_multiplex() return proper value - properly handle event unit masks - correct PAPI_name_to_code() to match events +- Resolves: rhbz562935 Rebase to papi-4.0.0 * Wed Jan 13 2010 William Cohen - 4.0.0-1 - Generate papi.spec file for papi-4.0.0. diff --git a/sources b/sources index 194876d..cc5fc17 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -ed42e99a636283ceb55563d0259d83b9 papi-4.0.0.tar.gz +5f40160c9703c4aba5f958f76ca99310 papi-4.1.0.tar.gz