Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions Makefile.am
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
if HAVE_PYTHON
TESTS_ENVIRONMENT = python
if LRT_ULNX
TESTS = scripts/regression
TESTS = scripts/bindtst.py scripts/msgtst.py scripts/primalloctst.py \
scripts/helloworld.py scripts/helloworldcpp.py
endif
endif

AM_CFLAGS = -Wall -Werror -fno-strict-aliasing -g3
Expand Down Expand Up @@ -59,7 +63,7 @@ endif

if x86_64
BAREFLAGS += -mno-red-zone -mno-mmx -mno-sse -mno-sse2 -mno-sse3
AM_LDFLAGS += -melf_x86_64 -static -n -z max-page-size=0x1000 \
AM_LDFLAGS += -Wl,-melf_x86_64 -static -n -z max-page-size=0x1000 \
-Wl,--build-id=none \
-T $(top_srcdir)/l0/lrt/bare/arch/amd64/link.ld

Expand Down
2 changes: 1 addition & 1 deletion apps/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ include apps/eventtst/Makefile.am
include apps/helloworld/Makefile.am
include apps/helloworld_parallel/Makefile.am
include apps/helloworldcpp/Makefile.am
include apps/intercept/Makefile.am
#include apps/intercept/Makefile.am
include apps/msgtst/Makefile.am
include apps/primalloctst/Makefile.am

Expand Down
3 changes: 2 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ AC_CONFIG_SRCDIR([l0/EBBMgrPrim.c])
AC_CONFIG_HEADER([config.h])
#AC_CONFIG_MACRO_DIR([m4])
m4_include([m4/check_gnu_make.m4])

AM_PATH_PYTHON([2.6],, [:])
AM_CONDITIONAL([HAVE_PYTHON], [test "$PYTHON" != ":"])
AC_CANONICAL_HOST
AS_CASE([$host_cpu], [x86_64],
[AC_DEFINE([ARCH_AMD64], [1], [x86_64 architecture])],
Expand Down
12 changes: 6 additions & 6 deletions intercept/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
include intercept/arch/Makefile.am

intercept_sources = \
intercept/Interceptor.c \
intercept/Interceptor.h \
intercept/TestInterceptor.c \
intercept/TestInterceptor.h \
$(intercept_arch_sources)
# intercept_sources = \
# intercept/Interceptor.c \
# intercept/Interceptor.h \
# intercept/TestInterceptor.c \
# intercept/TestInterceptor.h \
# $(intercept_arch_sources)
4 changes: 2 additions & 2 deletions l0/lrt/defFT.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ void *lrt_trans_default_func(lrt_trans_rep_ref *_self, lrt_trans_func_num fnum)
//word to get the LTrans
lrt_trans_ltrans *self = (lrt_trans_ltrans *)(*_self-1);
lrt_trans_gtrans *gt = lrt_trans_lt2gt(self);
rwlock_rdlock(&gt->rwlock);
rwlock_rdlock(&gt->rwlock_instance);
lrt_trans_rc ret = gt->mf(_self, self, fnum, gt->arg);
rwlock_rdunlock(&gt->rwlock);
rwlock_rdunlock(&gt->rwlock_instance);
if(LRT_TRANS_RC_SUCCESS(ret)) {
//return the function we wanted to call originally
return (*_self)->ft[fnum];
Expand Down
8 changes: 4 additions & 4 deletions l0/lrt/trans.c
Original file line number Diff line number Diff line change
Expand Up @@ -197,28 +197,28 @@ void
lrt_trans_wrlock(lrt_trans_id id)
{
lrt_trans_gtrans *gt = lrt_trans_id2gt(id);
rwlock_wrlock(&gt->rwlock);
rwlock_wrlock(&gt->rwlock_instance);
}

void
lrt_trans_wrunlock(lrt_trans_id id)
{
lrt_trans_gtrans *gt = lrt_trans_id2gt(id);
rwlock_wrunlock(&gt->rwlock);
rwlock_wrunlock(&gt->rwlock_instance);
}

void
lrt_trans_rdlock(lrt_trans_id id)
{
lrt_trans_gtrans *gt = lrt_trans_id2gt(id);
rwlock_rdlock(&gt->rwlock);
rwlock_rdlock(&gt->rwlock_instance);
}

void
lrt_trans_rdunlock(lrt_trans_id id)
{
lrt_trans_gtrans *gt = lrt_trans_id2gt(id);
rwlock_rdunlock(&gt->rwlock);
rwlock_rdunlock(&gt->rwlock_instance);
}

uintptr_t
Expand Down
2 changes: 1 addition & 1 deletion l0/lrt/trans.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ struct lrt_trans_s {
};
union {
uintptr_t v6;
rwlock rwlock;
rwlock rwlock_instance;
};
union {
uintptr_t v7;
Expand Down
17 changes: 17 additions & 0 deletions scripts/bindtst-bare.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import pexpect
import multiprocessing
import sys

cores = multiprocessing.cpu_count()
for z in range(1, cores+1):
sys.stdout.write( "bindtst on " + str(z) + " cores [")
sys.stdout.flush()
child = pexpect.spawn ('qemu-system-x86_64 -nographic -smp ' + str(z) + ' apps/bindtst/bindtst.iso')
#child.logfile = sys.stdout
for j in range(z):
child.expect('bindtst: PASSED', timeout=100)
# child.kill(9)
child.sendcontrol('a')
child.send('x')
child.wait()
print "]"
11 changes: 11 additions & 0 deletions scripts/bindtst.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import pexpect
import multiprocessing
import sys

cores = multiprocessing.cpu_count()
sys.stdout.write( "bindtst on " + str(cores) + " cores [")
for i in range(cores):
child = pexpect.spawn ('apps/bindtst/bindtst -ebbos_cores ' + str(i+1))
for j in range(i+1):
child.expect('bindtst: PASSED', timeout=10)
print "]"
10 changes: 10 additions & 0 deletions scripts/helloworld.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import pexpect
import multiprocessing
import sys

cores = multiprocessing.cpu_count()
sys.stdout.write( "helloworld on " + str(cores) + " cores [")
for i in range(cores):
child = pexpect.spawn ('apps/helloworld/helloworld -ebbos_cores ' + str(i+1))
child.expect('Hello world!', timeout=10)
print "]"
10 changes: 10 additions & 0 deletions scripts/helloworldcpp.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import pexpect
import multiprocessing
import sys

cores = multiprocessing.cpu_count()
sys.stdout.write( "helloworldcpp on " + str(cores) + " cores [")
for i in range(cores):
child = pexpect.spawn ('apps/helloworldcpp/helloworldcpp -ebbos_cores ' + str(i+1))
child.expect('Hello world!', timeout=10)
print "]"
11 changes: 11 additions & 0 deletions scripts/msgtst.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import pexpect
import multiprocessing
import sys

cores = multiprocessing.cpu_count()
sys.stdout.write( "msgtst on " + str(cores) + " cores [")
for i in range(cores):
child = pexpect.spawn ('apps/msgtst/msgtst -ebbos_cores ' + str(i+1))
for j in range(99):
child.expect('msgtst ' + str(j%(i+1)) + ' -> ' + str((j+1)%(i+1)), timeout=10)
print "]"
23 changes: 23 additions & 0 deletions scripts/primalloctst.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import os
import pexpect
import multiprocessing
import sys

alloc = 0
free = 0
cores = multiprocessing.cpu_count()
sys.stdout.write( "primalloctst on " + str(cores) + " cores [")
for i in range(cores):
child = pexpect.spawn ('apps/primalloctst/primalloctst -ebbos_cores ' + str(i+1))
# for now, just expect this number of allocates
for j in range(1270):
i = child.expect(['allocated pointer', 'freed pointer'], timeout=10)
if i==0:
alloc +=1
else:
free +=1

print "alloc is "+str(alloc) + " free is "+ str(free)
if alloc != free:
os._exit(-1)