Rebase to papi-5.7.0

This commit is contained in:
William Cohen 2019-02-18 14:48:42 -05:00
parent 1d7877a582
commit 1de8ab1497
5 changed files with 7 additions and 165 deletions

1
.gitignore vendored
View File

@ -22,3 +22,4 @@ papi-4.1.0.tar.gz
/papi-5.5.0.tar.gz
/papi-5.5.1.tar.gz
/papi-5.6.0.tar.gz
/papi-5.7.0.tar.gz

View File

@ -1,43 +0,0 @@
commit 7a6ae407b62615d3ffa9b0d2ac17771b7fc63056
Author: Vince Weaver <vince@deater.net>
Date: Thu Sep 27 23:47:58 2018 -0400
perf_event: avoid floating point exception if running is 0
The perf_event interface isn't supposed to return 0 for running, but
it happens occasionally. So be sure not to divide by zero if this
happens. This makes the rdpmc code match the generic perf code in this
case.
This is in response to bitbucket issue #52
diff --git a/src/components/perf_event/perf_event.c b/src/components/perf_event/perf_event.c
index 7fd753ed..82b7d398 100644
--- a/src/components/perf_event/perf_event.c
+++ b/src/components/perf_event/perf_event.c
@@ -1099,14 +1099,23 @@ _pe_rdpmc_read( hwd_context_t *ctx, hwd_control_state_t *ctl,
count = mmap_read_self(pe_ctl->events[i].mmap_buf,
&enabled,&running);
- /* TODO: error checking? */
+ /* TODO: more error checking? */
/* Handle multiplexing case */
- if (enabled!=running) {
+ if (enabled == running) {
+ /* no adjustment needed */
+ }
+ else if (enabled && running) {
adjusted = (enabled * 128LL) / running;
adjusted = adjusted * count;
adjusted = adjusted / 128LL;
count = adjusted;
+ } else {
+ /* This should not happen, but we have had it reported */
+ SUBDBG("perf_event kernel bug(?) count, enabled, "
+ "running: %lld, %lld, %lld\n",
+ papi_pe_buffer[0],enabled,running);
+
}
pe_ctl->counts[i] = count;

View File

@ -1,115 +0,0 @@
commit bde3da26f1f2755689e16fc9f5ab404367d1fdc8
Author: Vince Weaver <vincent.weaver@maine.edu>
Date: Wed Jan 24 14:13:28 2018 -0500
build: fix various LDFLAGS/CFLAGS issues
issues were reported by Andreas Beckmann <anbe@debian.org>
diff --git a/src/components/Makefile_comp_tests.target.in b/src/components/Makefile_comp_tests.target.in
index 9a369adb..a4412bea 100644
--- a/src/components/Makefile_comp_tests.target.in
+++ b/src/components/Makefile_comp_tests.target.in
@@ -9,7 +9,7 @@ INCLUDE = -I. -I@includedir@ -I$(datadir) -I$(testlibdir) -I$(validationlibdir)
LIBDIR = @libdir@
PAPILIB = $(datadir)/@LIBRARY@
TESTLIB = $(testlibdir)/libtestlib.a
-LDFLAGS = @LDL@
+LDFLAGS = @LDFLAGS@ @LDL@
CC = @CC@
F77 = @F77@
CC_R = @CC_R@
diff --git a/src/components/perf_event_uncore/tests/Makefile b/src/components/perf_event_uncore/tests/Makefile
index 3ee8fc2a..d70debe6 100644
--- a/src/components/perf_event_uncore/tests/Makefile
+++ b/src/components/perf_event_uncore/tests/Makefile
@@ -17,19 +17,19 @@ perf_event_uncore_lib.o: perf_event_uncore_lib.c perf_event_uncore_lib.h
perf_event_amd_northbridge: perf_event_amd_northbridge.o $(DOLOOPS) $(UTILOBJS) $(PAPILIB) $(DOLOOPS)
- $(CC) $(LFLAGS) -o perf_event_amd_northbridge perf_event_amd_northbridge.o $(UTILOBJS) $(DOLOOPS) $(PAPILIB) $(LDFLAGS)
+ $(CC) $(CFLAGS) -o perf_event_amd_northbridge perf_event_amd_northbridge.o $(UTILOBJS) $(DOLOOPS) $(PAPILIB) $(LDFLAGS)
perf_event_uncore: perf_event_uncore.o $(UTILOBJS) $(DOLOOPS) $(PAPILIB) perf_event_uncore_lib.o
- $(CC) $(LFLAGS) -o perf_event_uncore perf_event_uncore.o perf_event_uncore_lib.o $(UTILOBJS) $(DOLOOPS) $(PAPILIB) $(LDFLAGS)
+ $(CC) $(CFLAGS) -o perf_event_uncore perf_event_uncore.o perf_event_uncore_lib.o $(UTILOBJS) $(DOLOOPS) $(PAPILIB) $(LDFLAGS)
perf_event_uncore_attach: perf_event_uncore_attach.o $(UTILOBJS) $(DOLOOPS) $(PAPILIB) perf_event_uncore_lib.o
- $(CC) $(LFLAGS) -o perf_event_uncore_attach perf_event_uncore_attach.o perf_event_uncore_lib.o $(UTILOBJS) $(DOLOOPS) $(PAPILIB) $(LDFLAGS)
+ $(CC) $(CFLAGS) -o perf_event_uncore_attach perf_event_uncore_attach.o perf_event_uncore_lib.o $(UTILOBJS) $(DOLOOPS) $(PAPILIB) $(LDFLAGS)
perf_event_uncore_multiple: perf_event_uncore_multiple.o perf_event_uncore_lib.o $(UTILOBJS) $(DOLOOPS) $(PAPILIB)
- $(CC) $(LFLAGS) $(INCLUDE) -o perf_event_uncore_multiple perf_event_uncore_multiple.o perf_event_uncore_lib.o $(UTILOBJS) $(DOLOOPS) $(PAPILIB) $(LDFLAGS)
+ $(CC) $(CFLAGS) $(INCLUDE) -o perf_event_uncore_multiple perf_event_uncore_multiple.o perf_event_uncore_lib.o $(UTILOBJS) $(DOLOOPS) $(PAPILIB) $(LDFLAGS)
perf_event_uncore_cbox: perf_event_uncore_cbox.o perf_event_uncore_lib.o $(UTILOBJS) $(DOLOOPS) $(PAPILIB)
- $(CC) $(LFLAGS) $(INCLUDE) -o perf_event_uncore_cbox perf_event_uncore_cbox.o perf_event_uncore_lib.o $(UTILOBJS) $(DOLOOPS) $(PAPILIB) $(LDFLAGS)
+ $(CC) $(CFLAGS) $(INCLUDE) -o perf_event_uncore_cbox perf_event_uncore_cbox.o perf_event_uncore_lib.o $(UTILOBJS) $(DOLOOPS) $(PAPILIB) $(LDFLAGS)
diff --git a/src/ctests/Makefile.recipies b/src/ctests/Makefile.recipies
index 63c107c0..201f3c85 100644
--- a/src/ctests/Makefile.recipies
+++ b/src/ctests/Makefile.recipies
@@ -350,7 +350,7 @@ code2name: code2name.c $(TESTLIB) $(PAPILIB)
$(CC) $(INCLUDE) $(CFLAGS) $(TOPTFLAGS) code2name.c $(TESTLIB) $(PAPILIB) $(LDFLAGS) -o code2name
attach_target: attach_target.c $(DOLOOPS)
- -$(CC) $(INCLUDE) $(CFLAGS) $(TOPTFLAGS) attach_target.c -o attach_target $(DOLOOPS) $(TESTLIB)
+ -$(CC) $(INCLUDE) $(CFLAGS) $(TOPTFLAGS) attach_target.c -o attach_target $(DOLOOPS) $(TESTLIB) $(LDFLAGS)
zero_attach: zero_attach.c $(TESTLIB) $(DOLOOPS) $(PAPILIB)
-$(CC) $(INCLUDE) $(CFLAGS) $(TOPTFLAGS) zero_attach.c $(TESTLIB) $(DOLOOPS) $(PAPILIB) $(LDFLAGS) -o zero_attach
diff --git a/src/ctests/Makefile.target.in b/src/ctests/Makefile.target.in
index bb51c350..fcc3373b 100644
--- a/src/ctests/Makefile.target.in
+++ b/src/ctests/Makefile.target.in
@@ -12,7 +12,7 @@ LIBRARY=@LIBRARY@
SHLIB=@SHLIB@
PAPILIB = ../@LINKLIB@
TESTLIB = $(testlibdir)/libtestlib.a
-LDFLAGS = @LDL@ @STATIC@
+LDFLAGS = @LDFLAGS@ @LDL@ @STATIC@
CC = @CC@
MPICC = @MPICC@
F77 = @F77@
diff --git a/src/ftests/Makefile.target.in b/src/ftests/Makefile.target.in
index 718586e5..8006dd8d 100644
--- a/src/ftests/Makefile.target.in
+++ b/src/ftests/Makefile.target.in
@@ -11,7 +11,7 @@ LIBRARY = @LIBRARY@
SHLIB=@SHLIB@
PAPILIB = ../@LINKLIB@
TESTLIB = $(testlibdir)/libtestlib.a
-LDFLAGS = @LDL@
+LDFLAGS = @LDFLAGS@ @LDL@
CC = @CC@
F77 = @F77@
CC_R = @CC_R@
diff --git a/src/utils/Makefile.target.in b/src/utils/Makefile.target.in
index a5eab438..58d438a1 100644
--- a/src/utils/Makefile.target.in
+++ b/src/utils/Makefile.target.in
@@ -11,7 +11,7 @@ LIBRARY=@LIBRARY@
SHLIB=@SHLIB@
PAPILIB = ../@LINKLIB@
TESTLIB = $(testlibdir)/libtestlib.a
-LDFLAGS = @LDL@ @STATIC@
+LDFLAGS = @LDFLAGS@ @LDL@ @STATIC@
CC = @CC@
MPICC = @MPICC@
F77 = @F77@
diff --git a/src/validation_tests/Makefile.target.in b/src/validation_tests/Makefile.target.in
index a5eab438..58d438a1 100644
--- a/src/validation_tests/Makefile.target.in
+++ b/src/validation_tests/Makefile.target.in
@@ -11,7 +11,7 @@ LIBRARY=@LIBRARY@
SHLIB=@SHLIB@
PAPILIB = ../@LINKLIB@
TESTLIB = $(testlibdir)/libtestlib.a
-LDFLAGS = @LDL@ @STATIC@
+LDFLAGS = @LDFLAGS@ @LDL@ @STATIC@
CC = @CC@
MPICC = @MPICC@
F77 = @F77@

View File

@ -7,14 +7,12 @@
%endif
Summary: Performance Application Programming Interface
Name: papi
Version: 5.6.0
Release: 10%{?dist}
Version: 5.7.0
Release: 1%{?dist}
License: BSD
Requires: papi-libs = %{version}-%{release}
URL: http://icl.cs.utk.edu/papi/
Source0: http://icl.cs.utk.edu/projects/papi/downloads/%{name}-%{version}.tar.gz
Patch1: papi-ldflags.patch
Patch2: papi-divzero.patch
BuildRequires: autoconf
BuildRequires: doxygen
BuildRequires: ncurses-devel
@ -74,8 +72,6 @@ the PAPI user-space libraries and interfaces.
%prep
%setup -q
%patch1 -p1 -b .ldflags
%patch2 -p1 -b .divzero
%build
%if %{without bundled_libpfm}
@ -157,6 +153,9 @@ chrpath --delete $RPM_BUILD_ROOT%{_libdir}/*.so*
%{_libdir}/*.a
%changelog
* Mon Feb 18 2019 William Cohen <wcohen@redhat.com> - 5.7.0-1
- Rebase to papi-5.7.0.
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 5.6.0-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild

View File

@ -1 +1 @@
SHA512 (papi-5.6.0.tar.gz) = b2a1536f220081d08ee9bc94fddbf422e36c60c55b0536bc43dec074bdaf23afaedbdd755b7e6af25c4c0ce582cc7ad4c59e2adc1801e75c482d472b080439be
SHA512 (papi-5.7.0.tar.gz) = 3054fdde3658220cab5bd5545eaa3e31d8839cc4fb489665833b41031b7d79546ee2bf01e3d37aad7955496ae74bcb169d806eea141acb6a90ea383fb35dd633