Commit bcc8e9c1 authored by Geoff Simmons's avatar Geoff Simmons

remove the reqend_t (struct timeval) field from the data entry struct

parent 2e583c94
......@@ -311,6 +311,7 @@ dispatch(struct VSL_data *vsl, struct VSL_transaction * const pt[], void *priv)
dataentry *de = NULL;
char reqend_str[REQEND_T_LEN];
int32_t vxid;
struct timeval latest_t = { 0 };
(void) priv;
if (all_wrk_abandoned())
......@@ -323,8 +324,6 @@ dispatch(struct VSL_data *vsl, struct VSL_transaction * const pt[], void *priv)
}
CHECK_OBJ(de, DATA_MAGIC);
assert(!OCCUPIED(de));
AZ(de->reqend_t.tv_sec);
AZ(de->reqend_t.tv_usec);
de->hasdata = 0;
seen++;
......@@ -399,9 +398,9 @@ dispatch(struct VSL_data *vsl, struct VSL_transaction * const pt[], void *priv)
VSL_tags[tag], xid, (unsigned) reqend_t.tv_sec,
reqend_t.tv_usec);
if (reqend_t.tv_sec > de->reqend_t.tv_sec
|| reqend_t.tv_usec > de->reqend_t.tv_usec)
memcpy(&de->reqend_t, &reqend_t, sizeof(struct timeval));
if (reqend_t.tv_sec > latest_t.tv_sec
|| reqend_t.tv_usec > latest_t.tv_usec)
memcpy(&latest_t, &reqend_t, sizeof(struct timeval));
break;
case SLT_VSL:
......@@ -423,7 +422,7 @@ dispatch(struct VSL_data *vsl, struct VSL_transaction * const pt[], void *priv)
}
snprintf(reqend_str, REQEND_T_LEN, "%s=%u.%06lu", REQEND_T_VAR,
(unsigned) de->reqend_t.tv_sec, de->reqend_t.tv_usec);
(unsigned) latest_t.tv_sec, latest_t.tv_usec);
append(de, SLT_Timestamp, vxid, reqend_str, REQEND_T_LEN - 1);
de->occupied = 1;
MON_StatsUpdate(STATS_OCCUPANCY, 0);
......
......@@ -112,8 +112,6 @@ DATA_Reset(dataentry *entry)
entry->keylen = 0;
*entry->key = '\0';
entry->hasdata = 0;
entry->reqend_t.tv_sec = 0;
entry->reqend_t.tv_usec = 0;
}
/*
......@@ -157,8 +155,7 @@ DATA_Dump(void)
if (!OCCUPIED(entry))
continue;
LOG_Log(LOG_INFO,
"Data entry %d: data=[%.*s] key=[%.*s] reqend_t=%u.%06u",
i, entry->end, entry->data, entry->keylen, entry->key,
entry->reqend_t.tv_sec, entry->reqend_t.tv_usec);
"Data entry %d: data=[%.*s] key=[%.*s]",
i, entry->end, entry->data, entry->keylen, entry->key);
}
}
......@@ -65,8 +65,6 @@ static char
MAN(entrytbl[i].key);
MAZ(entrytbl[i].end);
MAZ(entrytbl[i].keylen);
MAZ(entrytbl[i].reqend_t.tv_sec);
MAZ(entrytbl[i].reqend_t.tv_usec);
}
return NULL;
......
......@@ -167,8 +167,6 @@ static const char
MAZ(entry->keylen);
MAZ(*entry->key);
MAZ(entry->hasdata);
MAZ(entry->reqend_t.tv_sec);
MAZ(entry->reqend_t.tv_usec);
}
return NULL;
......
......@@ -121,7 +121,6 @@ struct dataentry_s {
VSTAILQ_ENTRY(dataentry_s) freelist;
VSTAILQ_ENTRY(dataentry_s) spmcq;
struct timeval reqend_t;
unsigned end; /* End of string index in data */
unsigned keylen;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment