Pause one thread in mark API emu test.

The Paraver timeline should hide the value of the thread while it is
paused. This will require adding a tracking module with a mux.
This commit is contained in:
Rodrigo Arias 2024-06-19 13:13:18 +02:00
parent 610b1223d9
commit 9da7234684
2 changed files with 9 additions and 0 deletions

View File

@ -62,6 +62,8 @@ int64_t get_delta(void);
} }
INSTR_3ARG(instr_thread_execute, "OHx", int32_t, cpu, int32_t, creator_tid, uint64_t, tag) INSTR_3ARG(instr_thread_execute, "OHx", int32_t, cpu, int32_t, creator_tid, uint64_t, tag)
INSTR_0ARG(instr_thread_pause, "OHp")
INSTR_0ARG(instr_thread_resume, "OHr")
INSTR_1ARG(instr_thread_affinity_set, "OAs", int32_t, cpu) INSTR_1ARG(instr_thread_affinity_set, "OAs", int32_t, cpu)
static inline void static inline void

View File

@ -51,9 +51,16 @@ main(void)
int which = 1 + (rand() % 3); int which = 1 + (rand() % 3);
/* Simulate a thread goes to sleep */
if (rank == 0 && i == 25)
instr_thread_pause();
ovni_mark_push(MARK_COLORS, which); ovni_mark_push(MARK_COLORS, which);
rand_sleep(500); rand_sleep(500);
ovni_mark_pop(MARK_COLORS, which); ovni_mark_pop(MARK_COLORS, which);
if (rank == 0 && i == 75)
instr_thread_resume();
} }
ovni_mark_set(MARK_PROGRESS, 100); ovni_mark_set(MARK_PROGRESS, 100);