bool get_op(Op *op) { static UINT64 unique_count = 1; Trace_op trace_op; bool success = FALSE; // read trace // fill out op info // return FALSE if the end of trace int read_size; read_size = gzread(g_stream, &trace_op, sizeof(Trace_op)); success = read_size>0; if(read_size!=sizeof(Trace_op) && read_size>0) success = false; if (KNOB(KNOB_PRINT_INST)->getValue()) dprint_trace(&trace_op); /* copy trace structure to op */ if (success) { copy_trace_op(&trace_op, op); op->inst_id = unique_count++; op->valid = TRUE; } return success; }