From 78656ce83a140b91df6677435f182de3f389fab8 Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Date: Thu, 14 Oct 2021 06:53:52 +0200 Subject: [PATCH] Remove unused nosv ss --- Makefile | 2 +- emu.h | 5 -- emu_nosv_ss.c | 142 -------------------------------------------------- 3 files changed, 1 insertion(+), 148 deletions(-) delete mode 100644 emu_nosv_ss.c diff --git a/Makefile b/Makefile index dbd122d..6943396 100644 --- a/Makefile +++ b/Makefile @@ -24,7 +24,7 @@ dump: ovni.o dump.o parson.o test_speed: test_speed.c ovni.o parson.o -emu: emu.o emu_ovni.o emu_nosv.o emu_nosv_ss.o emu_tampi.o emu_openmp.o ovni.o prv.o pcf.o parson.o chan.o +emu: emu.o emu_ovni.o emu_nosv.o emu_tampi.o emu_openmp.o ovni.o prv.o pcf.o parson.o chan.o libovni.so: ovni.o parson.o $(LINK.c) -shared $^ -o $@ diff --git a/emu.h b/emu.h index f0089c5..bbc8145 100644 --- a/emu.h +++ b/emu.h @@ -405,11 +405,6 @@ void hook_pre_nosv(struct ovni_emu *emu); void hook_emit_nosv(struct ovni_emu *emu); void hook_post_nosv(struct ovni_emu *emu); -void hook_init_nosv_ss(struct ovni_emu *emu); -void hook_pre_nosv_ss(struct ovni_emu *emu); -void hook_emit_nosv_ss(struct ovni_emu *emu); -void hook_post_nosv_ss(struct ovni_emu *emu); - void hook_init_tampi(struct ovni_emu *emu); void hook_pre_tampi(struct ovni_emu *emu); diff --git a/emu_nosv_ss.c b/emu_nosv_ss.c deleted file mode 100644 index 05d8935..0000000 --- a/emu_nosv_ss.c +++ /dev/null @@ -1,142 +0,0 @@ -#include -#include "uthash.h" - -#include "ovni.h" -#include "ovni_trace.h" -#include "emu.h" -#include "prv.h" -#include "chan.h" - -/* This module manages the nos-v subsystem (ss) events, to track which - * actions are being performed by each thread at a given time. A stack - * of states is stored in each thread, so we remember the path of - * execution. Events such as task received by a thread are emitted as - * fake events with very short period. */ - -/* --------------------------- init ------------------------------- */ - -void -hook_init_nosv_ss(struct ovni_emu *emu) -{ - struct ovni_ethread *th; - int i, row, type, track; - FILE *prv; - int64_t *clock; - - clock = &emu->delta_time; - prv = emu->prv_thread; - track = CHAN_TRACK_TH_RUNNING; - - /* Init the channels in all threads */ - for(i=0; itotal_nthreads; i++) - { - th = emu->global_thread[i]; - row = th->gindex + 1; - - chan_th_init(th, CHAN_NOSV_SUBSYSTEM, track, row, prv, clock); - } -} - -/* --------------------------- pre ------------------------------- */ - -static void -pre_sched(struct ovni_emu *emu) -{ - struct ovni_ethread *th; - struct ovni_chan *chan; - - th = emu->cur_thread; - chan = &th->chan[CHAN_NOSV_SUBSYSTEM]; - - switch(emu->cur_ev->header.value) - { - case 'h': - chan_push(chan, ST_SCHED_HUNGRY); - break; - case 'f': /* Fill: no longer hungry */ - chan_pop(chan, ST_SCHED_HUNGRY); - break; - case '[': /* Server enter */ - chan_push(chan, ST_SCHED_SERVING); - break; - case ']': /* Server exit */ - chan_pop(chan, ST_SCHED_SERVING); - break; - case '@': chan_ev(chan, EV_SCHED_SELF); break; - case 'r': chan_ev(chan, EV_SCHED_RECV); break; - case 's': chan_ev(chan, EV_SCHED_SEND); break; - default: - break; - } -} - -static void -pre_submit(struct ovni_emu *emu) -{ - struct ovni_ethread *th; - struct ovni_chan *chan; - - th = emu->cur_thread; - chan = &th->chan[CHAN_NOSV_SUBSYSTEM]; - - switch(emu->cur_ev->header.value) - { - case '[': chan_push(chan, ST_SCHED_SUBMITTING); break; - case ']': chan_pop(chan, ST_SCHED_SUBMITTING); break; - default: - break; - } -} - -static void -pre_memory(struct ovni_emu *emu) -{ - struct ovni_ethread *th; - struct ovni_chan *chan; - - th = emu->cur_thread; - chan = &th->chan[CHAN_NOSV_SUBSYSTEM]; - - switch(emu->cur_ev->header.value) - { - case '[': chan_push(chan, ST_MEM_ALLOCATING); break; - case ']': chan_pop(chan, ST_MEM_ALLOCATING); break; - default: - break; - } -} - -void -hook_pre_nosv_ss(struct ovni_emu *emu) -{ - assert(emu->cur_ev->header.model == 'V'); - - switch(emu->cur_ev->header.category) - { - case 'S': pre_sched(emu); break; - case 'U': pre_submit(emu); break; - case 'M': pre_memory(emu); break; - default: - break; - } -} - -/* --------------------------- emit ------------------------------- */ - -void -hook_emit_nosv_ss(struct ovni_emu *emu) -{ - struct ovni_ethread *th; - struct ovni_chan *chan; - - th = emu->cur_thread; - - chan_emit(&th->chan[CHAN_NOSV_SUBSYSTEM]); -} - -/* --------------------------- post ------------------------------- */ - -void -hook_post_nosv_ss(struct ovni_emu *emu) -{ -}