Two new events are added (Ppp and Pps) which define the Progressing and Stalled states respectively. A new pseudo-state Idle is shown in the view when no thread is running.
		
			
				
	
	
		
			35 lines
		
	
	
		
			640 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			35 lines
		
	
	
		
			640 B
		
	
	
	
		
			C
		
	
	
	
	
	
| /* Copyright (c) 2025 Barcelona Supercomputing Center (BSC)
 | |
|  * SPDX-License-Identifier: GPL-3.0-or-later */
 | |
| 
 | |
| #include <stdlib.h>
 | |
| #include "compat.h"
 | |
| #include "instr.h"
 | |
| #include "instr_openmp.h"
 | |
| 
 | |
| int
 | |
| main(void)
 | |
| {
 | |
| 	instr_start(0, 1);
 | |
| 	instr_openmp_init();
 | |
| 
 | |
| 	instr_openmp_type_create(1, "task");
 | |
| 	instr_openmp_task_create(1, 1);
 | |
| 
 | |
| 	instr_openmp_stalled();
 | |
| 	sleep_us(100);
 | |
| 	instr_openmp_progressing();
 | |
| 	sleep_us(100);
 | |
| 	/* Pause the thread to create Idle state */
 | |
| 	instr_thread_pause();
 | |
| 	sleep_us(100);
 | |
| 	instr_thread_resume();
 | |
| 	sleep_us(100);
 | |
| 	instr_openmp_task_execute(1);
 | |
| 	sleep_us(100);
 | |
| 	instr_openmp_task_end(1);
 | |
| 
 | |
| 	instr_end();
 | |
| 
 | |
| 	return 0;
 | |
| }
 |