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) ...@@ -311,6 +311,7 @@ dispatch(struct VSL_data *vsl, struct VSL_transaction * const pt[], void *priv)
dataentry *de = NULL; dataentry *de = NULL;
char reqend_str[REQEND_T_LEN]; char reqend_str[REQEND_T_LEN];
int32_t vxid; int32_t vxid;
struct timeval latest_t = { 0 };
(void) priv; (void) priv;
if (all_wrk_abandoned()) if (all_wrk_abandoned())
...@@ -323,8 +324,6 @@ dispatch(struct VSL_data *vsl, struct VSL_transaction * const pt[], void *priv) ...@@ -323,8 +324,6 @@ dispatch(struct VSL_data *vsl, struct VSL_transaction * const pt[], void *priv)
} }
CHECK_OBJ(de, DATA_MAGIC); CHECK_OBJ(de, DATA_MAGIC);
assert(!OCCUPIED(de)); assert(!OCCUPIED(de));
AZ(de->reqend_t.tv_sec);
AZ(de->reqend_t.tv_usec);
de->hasdata = 0; de->hasdata = 0;
seen++; seen++;
...@@ -399,9 +398,9 @@ dispatch(struct VSL_data *vsl, struct VSL_transaction * const pt[], void *priv) ...@@ -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, VSL_tags[tag], xid, (unsigned) reqend_t.tv_sec,
reqend_t.tv_usec); reqend_t.tv_usec);
if (reqend_t.tv_sec > de->reqend_t.tv_sec if (reqend_t.tv_sec > latest_t.tv_sec
|| reqend_t.tv_usec > de->reqend_t.tv_usec) || reqend_t.tv_usec > latest_t.tv_usec)
memcpy(&de->reqend_t, &reqend_t, sizeof(struct timeval)); memcpy(&latest_t, &reqend_t, sizeof(struct timeval));
break; break;
case SLT_VSL: case SLT_VSL:
...@@ -423,7 +422,7 @@ dispatch(struct VSL_data *vsl, struct VSL_transaction * const pt[], void *priv) ...@@ -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, 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); append(de, SLT_Timestamp, vxid, reqend_str, REQEND_T_LEN - 1);
de->occupied = 1; de->occupied = 1;
MON_StatsUpdate(STATS_OCCUPANCY, 0); MON_StatsUpdate(STATS_OCCUPANCY, 0);
......
...@@ -112,8 +112,6 @@ DATA_Reset(dataentry *entry) ...@@ -112,8 +112,6 @@ DATA_Reset(dataentry *entry)
entry->keylen = 0; entry->keylen = 0;
*entry->key = '\0'; *entry->key = '\0';
entry->hasdata = 0; entry->hasdata = 0;
entry->reqend_t.tv_sec = 0;
entry->reqend_t.tv_usec = 0;
} }
/* /*
...@@ -157,8 +155,7 @@ DATA_Dump(void) ...@@ -157,8 +155,7 @@ DATA_Dump(void)
if (!OCCUPIED(entry)) if (!OCCUPIED(entry))
continue; continue;
LOG_Log(LOG_INFO, LOG_Log(LOG_INFO,
"Data entry %d: data=[%.*s] key=[%.*s] reqend_t=%u.%06u", "Data entry %d: data=[%.*s] key=[%.*s]",
i, entry->end, entry->data, entry->keylen, entry->key, i, entry->end, entry->data, entry->keylen, entry->key);
entry->reqend_t.tv_sec, entry->reqend_t.tv_usec);
} }
} }
...@@ -65,8 +65,6 @@ static char ...@@ -65,8 +65,6 @@ static char
MAN(entrytbl[i].key); MAN(entrytbl[i].key);
MAZ(entrytbl[i].end); MAZ(entrytbl[i].end);
MAZ(entrytbl[i].keylen); MAZ(entrytbl[i].keylen);
MAZ(entrytbl[i].reqend_t.tv_sec);
MAZ(entrytbl[i].reqend_t.tv_usec);
} }
return NULL; return NULL;
......
...@@ -167,8 +167,6 @@ static const char ...@@ -167,8 +167,6 @@ static const char
MAZ(entry->keylen); MAZ(entry->keylen);
MAZ(*entry->key); MAZ(*entry->key);
MAZ(entry->hasdata); MAZ(entry->hasdata);
MAZ(entry->reqend_t.tv_sec);
MAZ(entry->reqend_t.tv_usec);
} }
return NULL; return NULL;
......
...@@ -121,7 +121,6 @@ struct dataentry_s { ...@@ -121,7 +121,6 @@ struct dataentry_s {
VSTAILQ_ENTRY(dataentry_s) freelist; VSTAILQ_ENTRY(dataentry_s) freelist;
VSTAILQ_ENTRY(dataentry_s) spmcq; VSTAILQ_ENTRY(dataentry_s) spmcq;
struct timeval reqend_t;
unsigned end; /* End of string index in data */ unsigned end; /* End of string index in data */
unsigned keylen; 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