Skip to content

Commit

Permalink
test: add ARM at travis-ci
Browse files Browse the repository at this point in the history
Added ARM architecture for testing release and
debug Tarantool builds on Travis-ci.

Close #4270
  • Loading branch information
avtikhon committed Dec 20, 2019
1 parent 06aeb76 commit aaa52bc
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 1 deletion.
8 changes: 8 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,14 @@ release_asan_clang8:
script:
- ${GITLAB_MAKE} test_asan_debian_no_deps

release_arm:
<<: *deploy_definition
variables:
DOCKER_IMAGE: "${CI_REGISTRY}/${CI_PROJECT_PATH}/testing/arm64v8-debian-buster:latest"
CMAKE_EXTRA_PARAMS: -DENABLE_BACKTRACE=OFF
script:
- ${GITLAB_MAKE} test_arm_debian_no_deps

osx_13_release:
<<: *release_only_definition
<<: *vbox_definition
Expand Down
11 changes: 11 additions & 0 deletions .travis.mk
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,17 @@ test_asan_debian_no_deps: build_asan_debian

test_asan_debian: deps_debian deps_buster_clang_8 test_asan_debian_no_deps

#######
# ARM #
#######

qemu_arm_debian:
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes

build_arm_debian: qemu_arm_debian docker_build_debian

test_arm_debian_no_deps: qemu_arm_debian docker_test_debian_no_deps

#######
# OSX #
#######
Expand Down
17 changes: 16 additions & 1 deletion src/lib/core/fiber.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,22 @@
#include "trigger.h"

#if ENABLE_FIBER_TOP
#if !defined(__arm__) && !defined(__aarch64__) && !defined(__powerpc64__) && !defined(__PPC64__) && \
!defined(__powerpc__)
#include <x86intrin.h> /* __rdtscp() */
#elif defined(__aarch64__)
static __inline__ unsigned long long __rdtscp(uint32_t *cpu_id)
{
// System timer of ARMv8 runs at a different frequency than the CPU's.
// The frequency is fixed, typically in the range 1-50MHz. It can be
// read at CNTFRQ special register. We assume the OS has set up
// the virtual timer properly.
if (!cpu_id) { cpu_id = 0; }
int64_t virtual_timer_value;
__asm__ volatile("mrs %0, cntvct_el0" : "=r"(virtual_timer_value));
return virtual_timer_value;
}
#endif

static inline void
clock_stat_add_delta(struct clock_stat *stat, uint64_t clock_delta)
Expand Down Expand Up @@ -109,7 +124,7 @@ cpu_stat_reset(struct cpu_stat *stat)
static uint64_t
cpu_stat_on_csw(struct cpu_stat *stat)
{
uint32_t cpu_id;
uint32_t cpu_id = 0;
uint64_t delta, clock = __rdtscp(&cpu_id);

if (cpu_id == stat->prev_cpu_id) {
Expand Down

0 comments on commit aaa52bc

Please sign in to comment.