Compare commits
10 Commits
b7a7ac3bfa
...
4d95e4acdd
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4d95e4acdd | ||
|
|
84eb6f6d5b | ||
|
|
9bf7fefa13 | ||
|
|
066167856b | ||
|
|
acf13c113a | ||
|
|
bda4058e7c | ||
|
|
b64ba0eec1 | ||
|
|
c889e24346 | ||
|
|
88583bcdc1 | ||
|
|
82f4531c12 |
Binary file not shown.
BIN
papi-7.1.0.tar.gz
Normal file
BIN
papi-7.1.0.tar.gz
Normal file
Binary file not shown.
@ -1,31 +1,16 @@
|
||||
diff --git a/src/configure b/src/configure
|
||||
index 3d05182..357b874 100644
|
||||
--- a/src/configure
|
||||
+++ b/src/configure
|
||||
@@ -4628,7 +4628,7 @@ _ACEOF
|
||||
|
||||
# First set pthread-mutexes based on arch
|
||||
case $arch in
|
||||
- aarch64|arm*)
|
||||
+ aarch64|arm*|riscv*)
|
||||
pthread_mutexes=yes
|
||||
CFLAGS="$CFLAGS -DUSE_PTHREAD_MUTEXES"
|
||||
echo "forcing use of pthread mutexes... " >&6
|
||||
diff --git a/src/configure.in b/src/configure.in
|
||||
index cff36bc..697c317 100644
|
||||
--- a/src/configure.in
|
||||
+++ b/src/configure.in
|
||||
@@ -378,7 +378,7 @@ AC_DEFINE_UNQUOTED(CPU,$CPU,[cpu type])
|
||||
|
||||
# First set pthread-mutexes based on arch
|
||||
case $arch in
|
||||
- aarch64|arm*)
|
||||
+ aarch64|arm*|riscv*)
|
||||
pthread_mutexes=yes
|
||||
CFLAGS="$CFLAGS -DUSE_PTHREAD_MUTEXES"
|
||||
echo "forcing use of pthread mutexes... " >&6
|
||||
From 78b4e79c4f51a4cb9244ba1d59840ef8a76518cb Mon Sep 17 00:00:00 2001
|
||||
Date: Tue, 20 Jun 2023 15:15:04 +0800
|
||||
Subject: [PATCH] papi add support riscv64
|
||||
|
||||
---
|
||||
src/libpfm4/config.mk | 3 +++
|
||||
src/linux-context.h | 2 ++
|
||||
src/linux-timer.c | 20 ++++++++++++++++++++
|
||||
src/mb.h | 3 +++
|
||||
4 files changed, 28 insertions(+)
|
||||
|
||||
diff --git a/src/libpfm4/config.mk b/src/libpfm4/config.mk
|
||||
index 51d4f25..18f5838 100644
|
||||
index 2b26947..c12fa45 100644
|
||||
--- a/src/libpfm4/config.mk
|
||||
+++ b/src/libpfm4/config.mk
|
||||
@@ -177,6 +177,9 @@ ifeq ($(ARCH),cell)
|
||||
@ -39,24 +24,24 @@ index 51d4f25..18f5838 100644
|
||||
#
|
||||
# you shouldn't have to touch anything beyond this point
|
||||
diff --git a/src/linux-context.h b/src/linux-context.h
|
||||
index 524490b..7d51495 100644
|
||||
index f46e557..394a480 100644
|
||||
--- a/src/linux-context.h
|
||||
+++ b/src/linux-context.h
|
||||
@@ -35,6 +35,8 @@ typedef ucontext_t hwd_ucontext_t;
|
||||
#define OVERFLOW_ADDRESS(ctx) ctx.ucontext->uc_mcontext.pc
|
||||
#elif defined(__mips__)
|
||||
@@ -39,6 +39,8 @@ typedef ucontext_t hwd_ucontext_t;
|
||||
#define OVERFLOW_ADDRESS(ctx) ctx.ucontext->uc_mcontext.pc
|
||||
#elif defined(__hppa__)
|
||||
#define OVERFLOW_ADDRESS(ctx) ctx.ucontext->uc_mcontext.sc_iaoq[0]
|
||||
+#elif defined(__riscv)
|
||||
+#define OVERFLOW_ADDRESS(ctx) ctx.ucontext->uc_mcontext.__gregs[REG_PC]
|
||||
#else
|
||||
#error "OVERFLOW_ADDRESS() undefined!"
|
||||
#endif
|
||||
diff --git a/src/linux-timer.c b/src/linux-timer.c
|
||||
index 853e676..8222acb 100644
|
||||
index 0eaa79c..46bfe75 100644
|
||||
--- a/src/linux-timer.c
|
||||
+++ b/src/linux-timer.c
|
||||
@@ -288,6 +288,27 @@ get_cycles( void )
|
||||
return 0;
|
||||
@@ -300,7 +300,27 @@ get_cycles( void )
|
||||
return ret;
|
||||
}
|
||||
|
||||
+/************************/
|
||||
@ -65,17 +50,17 @@ index 853e676..8222acb 100644
|
||||
+
|
||||
+#elif defined(__riscv) && defined(__riscv_xlen) && __riscv_xlen == 64
|
||||
+static inline long long
|
||||
+get_cycles( void )
|
||||
+{
|
||||
+get_cycles( void )
|
||||
+{
|
||||
+ register unsigned long ret;
|
||||
+
|
||||
+ __asm__ __volatile__ ("rdcycle %0" : "=r" (ret));
|
||||
|
||||
+ __asm__ __volatile__ ("rdtime %0" : "=r" (ret));
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
+}
|
||||
+
|
||||
+/*
|
||||
+ * TODO: riscv32 implementation can be done following example in:
|
||||
+/*
|
||||
+ * TODO: riscv32 implementation can be done following example in:
|
||||
+ * Volume I: RISC-V User-Level ISA V2.2
|
||||
+ * 2.8 Control and Status Register Instructions
|
||||
+ * Timers and Counters
|
||||
@ -84,7 +69,7 @@ index 853e676..8222acb 100644
|
||||
#elif !defined(HAVE_GETTIMEOFDAY) && !defined(HAVE_CLOCK_GETTIME)
|
||||
#error "No get_cycles support for this architecture. "
|
||||
diff --git a/src/mb.h b/src/mb.h
|
||||
index 1019691..0b82a9d 100644
|
||||
index 81797c5..347436b 100644
|
||||
--- a/src/mb.h
|
||||
+++ b/src/mb.h
|
||||
@@ -39,6 +39,9 @@
|
||||
@ -97,3 +82,6 @@ index 1019691..0b82a9d 100644
|
||||
#elif defined(__mips__)
|
||||
#define rmb() asm volatile( \
|
||||
".set mips2\n\t" \
|
||||
--
|
||||
2.33.0
|
||||
|
||||
|
||||
@ -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@
|
||||
36
papi.spec
36
papi.spec
@ -1,18 +1,18 @@
|
||||
Name: papi
|
||||
Version: 5.6.0
|
||||
Release: 10
|
||||
Version: 7.1.0
|
||||
Release: 2
|
||||
Summary: Performance Application Programming Interface
|
||||
License: BSD
|
||||
License: BSD-3-clause
|
||||
URL: http://icl.cs.utk.edu/papi/
|
||||
Source0: http://icl.cs.utk.edu/projects/papi/downloads/%{name}-%{version}.tar.gz
|
||||
BuildRequires: autoconf doxygen ncurses-devel gcc-gfortran kernel-headers >= 2.6.32
|
||||
BuildRequires: chrpath lm_sensors-devel libpfm-devel >= 4.6.0-1 libpfm-static >= 4.6.0-1
|
||||
BuildRequires: net-tools rdma-core-devel perl-generators
|
||||
Requires: python3-unversioned-command
|
||||
Provides: papi-libs = %{version}-%{release}
|
||||
Obsoletes: papi-libs < %{version}-%{release}
|
||||
|
||||
Patch0001: papi-ldflags.patch
|
||||
Patch0002: papi-add-support-riscv64.patch
|
||||
Patch0001: papi-add-support-riscv64.patch
|
||||
|
||||
%description
|
||||
PAPI provides a programmer interface to monitor the performance of
|
||||
@ -45,10 +45,6 @@ autoconf
|
||||
--with-static-lib=yes --with-shared-lib=yes --with-shlib --with-shlib-tools \
|
||||
--with-components="appio coretemp example infiniband lmsensors lustre micpower mx net rapl stealtime"
|
||||
|
||||
cd components
|
||||
cd infiniband_umad; %configure
|
||||
cd ../lmsensors; %configure --with-sensors_incdir=/usr/include/sensors --with-sensors_libdir=%{_libdir};
|
||||
cd ../../
|
||||
|
||||
DBG="" make %{?_smp_mflags}
|
||||
cd ../doc
|
||||
@ -60,6 +56,10 @@ cd src
|
||||
make DESTDIR=$RPM_BUILD_ROOT LDCONFIG=/bin/true install-all
|
||||
|
||||
chrpath --delete $RPM_BUILD_ROOT%{_libdir}/*.so*
|
||||
file `find $RPM_BUILD_ROOT%{_bindir} -type f` |grep -w ELF |awk -F":" '{print $1}'|for file in `xargs`
|
||||
do
|
||||
chrpath --delete $file
|
||||
done
|
||||
|
||||
%post
|
||||
/sbin/ldconfig
|
||||
@ -76,6 +76,7 @@ chrpath --delete $RPM_BUILD_ROOT%{_libdir}/*.so*
|
||||
|
||||
%files devel
|
||||
%{_includedir}/*.h
|
||||
%{_includedir}/*.hpp
|
||||
%{_libdir}/*.so
|
||||
%{_libdir}/pkgconfig/papi*.pc
|
||||
%{_libdir}/*.a
|
||||
@ -83,11 +84,26 @@ chrpath --delete $RPM_BUILD_ROOT%{_libdir}/*.so*
|
||||
%exclude /usr/share/papi/papi_events.csv
|
||||
|
||||
%files help
|
||||
%doc INSTALL.txt README RELEASENOTES.txt
|
||||
%doc INSTALL.txt README.md RELEASENOTES.txt
|
||||
%{_mandir}/man1/*
|
||||
%{_mandir}/man3/*
|
||||
|
||||
%changelog
|
||||
* Fri Oct 25 2024 laokz <zhangkai@iscas.ac.cn> - 7.1.0-2
|
||||
- Riscv64: fix 'rdcycle' instruction to 'rdtime'
|
||||
|
||||
* Tue Jan 2 2024 liyanan <liyanan61@h-partners.com> - 7.1.0-1
|
||||
- Upgrade to version 7.1.0
|
||||
|
||||
* Mon Aug 28 2023 chenchen <chen_aka_jan@163.com> - 7.0.1-2
|
||||
- remove binaries runpath & rpath
|
||||
|
||||
* Tue Jun 20 2023 Ge Wang <wang__ge@126.com> - 7.0.1-1
|
||||
- Upgrade to version 7.0.1
|
||||
|
||||
* Wed Oct 26 2022 hua <dchang@zhixundn.com> - 6.0.0-1
|
||||
- upgrade version to 6.0.0
|
||||
|
||||
* Mon Jan 24 2022 wujie <wujie@nj.iscas.ac.cn> - 5.6.0-10
|
||||
- add support for riscv64 from http://fedora.riscv.rocks/koji/buildinfo?buildID=31200
|
||||
Author is David Abdurachmanov <david.abdurachmanov@gmail.com>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user