Add support for sponge subsystem state in Nanos6
This commit is contained in:
		
							parent
							
								
									171e439bd4
								
							
						
					
					
						commit
						6cafd347ce
					
				| @ -35,6 +35,8 @@ static const int ss_table[256][256][3] = { | ||||
| 		['S'] = { CHSS, POP,  ST_SUSPEND }, | ||||
| 		['r'] = { CHSS, PUSH, ST_RESUME }, | ||||
| 		['R'] = { CHSS, POP,  ST_RESUME }, | ||||
| 		['g'] = { CHSS, PUSH, ST_SPONGE }, | ||||
| 		['G'] = { CHSS, POP,  ST_SPONGE }, | ||||
| 		['*'] = { CHSS, IGN,  -1 }, | ||||
| 	}, | ||||
| 	['P'] = { | ||||
|  | ||||
| @ -49,6 +49,7 @@ enum nanos6_ss_state { | ||||
| 	ST_MIGRATE, | ||||
| 	ST_SUSPEND, | ||||
| 	ST_RESUME, | ||||
| 	ST_SPONGE, | ||||
| 
 | ||||
| 	/* Value 51 is broken in old Paraver */ | ||||
| 	EV_SCHED_RECV = 60, | ||||
|  | ||||
| @ -10,5 +10,6 @@ test_emu(ss-mismatch.c SHOULD_FAIL | ||||
|   REGEX "thread [0-9]\\+ ended with 1 stacked nanos6 subsystems") | ||||
| test_emu(delayed-connect-ss.c) | ||||
| test_emu(switch-same-type.c) | ||||
| test_emu(sponge.c) | ||||
| 
 | ||||
| test_emu(breakdown-no-black.c BREAKDOWN) | ||||
|  | ||||
| @ -62,6 +62,8 @@ INSTR_0ARG(instr_nanos6_suspend_enter, "6Ws") | ||||
| INSTR_0ARG(instr_nanos6_suspend_exit, "6WS") | ||||
| INSTR_0ARG(instr_nanos6_resume_enter, "6Wr") | ||||
| INSTR_0ARG(instr_nanos6_resume_exit, "6WR") | ||||
| INSTR_0ARG(instr_nanos6_sponge_enter, "6Wg") | ||||
| INSTR_0ARG(instr_nanos6_sponge_exit, "6WG") | ||||
| INSTR_0ARG(instr_nanos6_signal, "6W*") | ||||
| 
 | ||||
| INSTR_0ARG(instr_nanos6_submit_task_enter, "6U[") | ||||
|  | ||||
							
								
								
									
										42
									
								
								test/emu/nanos6/sponge.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										42
									
								
								test/emu/nanos6/sponge.c
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,42 @@ | ||||
| /* Copyright (c) 2023 Barcelona Supercomputing Center (BSC)
 | ||||
|  * SPDX-License-Identifier: GPL-3.0-or-later */ | ||||
| 
 | ||||
| #include <stdint.h> | ||||
| #include <stdio.h> | ||||
| #include "common.h" | ||||
| #include "emu_prv.h" | ||||
| #include "instr.h" | ||||
| #include "instr_nanos6.h" | ||||
| #include "nanos6/nanos6_priv.h" | ||||
| 
 | ||||
| int | ||||
| main(void) | ||||
| { | ||||
| 	instr_start(0, 1); | ||||
| 
 | ||||
| 	instr_nanos6_sponge_enter(); | ||||
| 
 | ||||
| 	/* Match the PRV line in the trace */ | ||||
| 	FILE *f = fopen("match.sh", "w"); | ||||
| 	if (f == NULL) | ||||
| 		die("fopen failed:"); | ||||
| 
 | ||||
| 	int type = PRV_NANOS6_SUBSYSTEM; | ||||
| 	int64_t t = get_delta(); | ||||
| 	int value = ST_SPONGE; | ||||
| 	fprintf(f, "grep ':%ld:%d:%d$' ovni/thread.prv\n", t, type, value); | ||||
| 	fprintf(f, "grep ':%ld:%d:%d$' ovni/cpu.prv\n", t, type, value); | ||||
| 
 | ||||
| 	instr_nanos6_sponge_exit(); | ||||
| 
 | ||||
| 	t = get_delta(); | ||||
| 	value = 0; | ||||
| 	fprintf(f, "grep ':%ld:%d:%d$' ovni/thread.prv\n", t, type, value); | ||||
| 	fprintf(f, "grep ':%ld:%d:%d$' ovni/cpu.prv\n", t, type, value); | ||||
| 
 | ||||
| 	fclose(f); | ||||
| 
 | ||||
| 	instr_end(); | ||||
| 
 | ||||
| 	return 0; | ||||
| } | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user