include/ccKVS/inline_util.h
static inline void debug_stalling_LIN(uint16_t stalled_ops_i, uint32_t *stalled_counter, uint8_t *stalled,
									  uint16_t local_client_id)
{
	uint16_t i;
	if (stalled_ops_i == CACHE_BATCH_SIZE && (*stalled) == 0) {
		(*stalled) = 1; //printf("Things are stalled\n");
		(*stalled_counter) = 1;
		// for (i = 0; i < CACHE_BATCH_SIZE; i++)
		// 	printf("Op %d : %s Waiting on key %d that is on state %d\n", i, code_to_str(ops[i].opcode), ops[i].key.tag, ops[i].key.meta.state );
		//printf("Ack size: %d, inv size %d, credits %d\n", ack_size , inv_size, credits[(machine_id + 1) % MACHINE_NUM]);
	}
	if (stalled_ops_i < (CACHE_BATCH_SIZE / 2) && (*stalled) == 1) {
		(*stalled_counter) = 0;
		(*stalled) = 0;//printf("Things are not stalled anymore\n");
	}
	if ((*stalled_counter) > 0) (*stalled_counter)++;
	if ((*stalled_counter) % 1000000 == 0 && (*stalled_counter) > 0) {
		// for (i = 0; i < CACHE_BATCH_SIZE; i++)
		// 	printf("Op %d : %s Waiting on key %d that is on state %d\n", i, code_to_str(ops[i].opcode), ops[i].key.tag, ops[i].key.meta.state );
		// printf("Ack size: %d, inv size %d, credits %d\n", ack_size , inv_size, credits[(machine_id + 1) % MACHINE_NUM]);
		red_printf("Client %d is stalled", local_client_id);
	}
}
// Track stalling and print information on stalled Ops for LIN
Track stalling and print information on stalled Ops for LIN
Track stalling and print information on stalled Ops for LIN
static inline void debug_stalling_LIN(uint16_t stalled_ops_i, uint32_t *stalled_counter, uint8_t *stalled,
									  uint16_t local_client_id)
{
	uint16_t i;
	if (stalled_ops_i == CACHE_BATCH_SIZE && (*stalled) == 0) {
		(*stalled) = 1; 
		(*stalled_counter) = 1;
	}
	if (stalled_ops_i < (CACHE_BATCH_SIZE / 2) && (*stalled) == 1) {
		(*stalled_counter) = 0;
		(*stalled) = 0;
	}
	if ((*stalled_counter) > 0) (*stalled_counter)++;
	if ((*stalled_counter) % 1000000 == 0 && (*stalled_counter) > 0) {
		red_printf("Client %d is stalled", local_client_id);
	}
}
static inline void debug_stalling_LIN ( uint16_t stalled_ops_i , uint32_t * stalled_counter , uint8_t * stalled , uint16_t local_client_id ) { uint16_t i ; if ( stalled_ops_i == CACHE_BATCH_SIZE && ( * stalled ) == 0 ) { ( * stalled ) = 1 ; ( * stalled_counter ) = 1 ; } if ( stalled_ops_i < ( CACHE_BATCH_SIZE / 2 ) && ( * stalled ) == 1 ) { ( * stalled_counter ) = 0 ; ( * stalled ) = 0 ; } if ( ( * stalled_counter ) > 0 ) ( * stalled_counter ) ++ ; if ( ( * stalled_counter ) % 1000000 == 0 && ( * stalled_counter ) > 0 ) { red_printf ( " " , local_client_id ) ; } }
Track stalling and print information on stalled Ops for LIN
Track stalling and print information on stalled Ops for LIN
//printf("Things are stalled\n"); // for (i = 0; i < CACHE_BATCH_SIZE; i++) // 	printf("Op %d : %s Waiting on key %d that is on state %d\n", i, code_to_str(ops[i].opcode), ops[i].key.tag, ops[i].key.meta.state ); //printf("Ack size: %d, inv size %d, credits %d\n", ack_size , inv_size, credits[(machine_id + 1) % MACHINE_NUM]); //printf("Things are not stalled anymore\n"); // for (i = 0; i < CACHE_BATCH_SIZE; i++) // 	printf("Op %d : %s Waiting on key %d that is on state %d\n", i, code_to_str(ops[i].opcode), ops[i].key.tag, ops[i].key.meta.state ); // printf("Ack size: %d, inv size %d, credits %d\n", ack_size , inv_size, credits[(machine_id + 1) % MACHINE_NUM]);