mirror of
https://github.com/hermitcore/libhermit.git
synced 2025-03-09 00:00:03 +01:00
disable temporary unsupported features on aarch64 (#96)
* remove OpenMP Runtime, move runtime to an own package * remove uneeded dependencies to rdtsc, disable rdtsc based benchmarks on aarch64 * disable temporary go and xray applications on aarch64
This commit is contained in:
parent
f8f43cc82b
commit
215b16884d
5 changed files with 9 additions and 50 deletions
|
@ -173,7 +173,9 @@ endif()
|
|||
## Tests and benchmarks
|
||||
build_external(tests ${HERMIT_ROOT}/usr/tests hermit)
|
||||
build_external(benchmarks ${HERMIT_ROOT}/usr/benchmarks hermit)
|
||||
if("${TARGET_ARCH}" STREQUAL "x86_64-hermit")
|
||||
build_external(openmpbench ${HERMIT_ROOT}/usr/openmpbench hermit)
|
||||
endif()
|
||||
|
||||
## relocate the local prefix to our install destination
|
||||
install(DIRECTORY ${LOCAL_PREFIX_DIR}/
|
||||
|
|
|
@ -3,6 +3,7 @@ include(../../cmake/HermitCore-Application.cmake)
|
|||
|
||||
project(hermit_benchmarks C)
|
||||
|
||||
if("${TARGET_ARCH}" STREQUAL "x86_64-hermit")
|
||||
add_executable(basic basic.c)
|
||||
target_link_libraries(basic pthread)
|
||||
|
||||
|
@ -12,6 +13,7 @@ add_executable(netio netio.c)
|
|||
|
||||
add_executable(RCCE_pingpong RCCE_pingpong.c)
|
||||
target_link_libraries(RCCE_pingpong ircce)
|
||||
endif()
|
||||
|
||||
add_executable(stream stream.c)
|
||||
target_compile_options(stream PRIVATE -fopenmp)
|
||||
|
|
|
@ -416,40 +416,14 @@ checktick()
|
|||
#include <time.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
#ifdef __hermit__
|
||||
extern unsigned int get_cpufreq();
|
||||
static unsigned long long start_tsc;
|
||||
|
||||
inline static unsigned long long rdtsc(void)
|
||||
{
|
||||
unsigned long lo, hi;
|
||||
asm volatile ("rdtsc" : "=a"(lo), "=d"(hi) :: "memory");
|
||||
return ((unsigned long long) hi << 32ULL | (unsigned long long) lo);
|
||||
}
|
||||
|
||||
__attribute__((constructor)) static void timer_init()
|
||||
{
|
||||
start_tsc = rdtsc();
|
||||
}
|
||||
#endif
|
||||
|
||||
double mysecond()
|
||||
{
|
||||
#ifndef __hermit__
|
||||
struct timeval tp;
|
||||
struct timezone tzp;
|
||||
int i;
|
||||
|
||||
i = gettimeofday(&tp,&tzp);
|
||||
return ( (double) tp.tv_sec + (double) tp.tv_usec * 1.e-6 );
|
||||
#else
|
||||
double ret;
|
||||
|
||||
ret = ((double) (rdtsc() - start_tsc)) / ((double) get_cpufreq() * 1000000.0);
|
||||
//printf("CPU frequency: %d MHz\n", get_cpufreq());
|
||||
|
||||
return ret;
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifndef abs
|
||||
|
|
|
@ -9,7 +9,9 @@ add_executable(jacobi jacobi.c)
|
|||
add_executable(argv_envp argv_envp.c)
|
||||
add_executable(hello++ hello++.cpp)
|
||||
add_executable(hellof hellof.f90)
|
||||
if("${TARGET_ARCH}" STREQUAL "x86_64-hermit")
|
||||
add_executable(pi pi.go)
|
||||
endif()
|
||||
add_executable(allocator allocator.c)
|
||||
|
||||
add_executable(endless endless.c)
|
||||
|
@ -21,11 +23,13 @@ add_executable(test-malloc-mt test-malloc-mt.c)
|
|||
target_compile_options(test-malloc-mt PRIVATE -pthread)
|
||||
target_link_libraries(test-malloc-mt pthread)
|
||||
|
||||
if("${TARGET_ARCH}" STREQUAL "x86_64-hermit")
|
||||
add_executable(server server.go)
|
||||
target_link_libraries(server netgo)
|
||||
|
||||
add_executable(RCCE_minimum RCCE_minimum.c)
|
||||
target_link_libraries(RCCE_minimum ircce)
|
||||
endif()
|
||||
|
||||
add_executable(thr_hello thr_hello.c)
|
||||
target_compile_options(thr_hello PRIVATE -pthread)
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
#include <string.h>
|
||||
#include <math.h>
|
||||
#include <time.h>
|
||||
#include <sys/time.h>
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
|
||||
|
@ -39,38 +40,14 @@
|
|||
#define CACHE_SIZE (256*1024)
|
||||
#define ALIGN(x,a) (((x)+(a)-1)&~((a)-1))
|
||||
|
||||
extern unsigned int get_cpufreq();
|
||||
static unsigned long long start_tsc;
|
||||
|
||||
inline static unsigned long long rdtsc(void)
|
||||
{
|
||||
unsigned long lo, hi;
|
||||
asm volatile ("rdtsc" : "=a"(lo), "=d"(hi) :: "memory");
|
||||
return ((unsigned long long) hi << 32ULL | (unsigned long long) lo);
|
||||
}
|
||||
|
||||
__attribute__((constructor)) static void timer_init()
|
||||
{
|
||||
start_tsc = rdtsc();
|
||||
}
|
||||
|
||||
double mysecond()
|
||||
{
|
||||
#if 0
|
||||
struct timeval tp;
|
||||
struct timezone tzp;
|
||||
int i;
|
||||
|
||||
i = gettimeofday(&tp,&tzp);
|
||||
return ( (double) tp.tv_sec + (double) tp.tv_usec * 1.e-6 );
|
||||
#else
|
||||
double ret;
|
||||
|
||||
ret = (double) (rdtsc() - start_tsc) / ((double) get_cpufreq() * 1000000.0);
|
||||
//printf("CPU frequency: %d MHz\n", get_cpufreq());
|
||||
|
||||
return ret;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue