TSG-23378 TFE移除平台层的FieldStat2,为适配AArch64做准备
This commit is contained in:
@@ -391,11 +391,10 @@ static void doh_maat_scan(const struct tfe_stream *stream, const struct tfe_http
|
||||
|
||||
static void doh_gc_cb(evutil_socket_t fd, short what, void *arg)
|
||||
{
|
||||
int i = 0;
|
||||
|
||||
for (i = 0; i < DOH_STAT_MAX; i++)
|
||||
for (int i = 0; i < DOH_STAT_MAX; i++)
|
||||
{
|
||||
FS_operate(g_doh_conf->fs_handle, g_doh_conf->fs_id[i], 0, FS_OP_SET, ATOMIC_READ(&(g_doh_conf->stat_val[i])));
|
||||
long long delta = ATOMIC_EXCHANGE(&(g_doh_conf->stat_val[i]), 0);
|
||||
fieldstat_easy_counter_incrby(g_doh_conf->fs_handle, 0, g_doh_conf->fs_id[i], NULL, 0, delta);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -413,7 +412,7 @@ static int doh_field_init()
|
||||
{
|
||||
if (spec[i] != NULL)
|
||||
{
|
||||
g_doh_conf->fs_id[i] = FS_register(g_doh_conf->fs_handle, FS_STYLE_FIELD, FS_CALC_CURRENT, spec[i]);
|
||||
g_doh_conf->fs_id[i] = fieldstat_easy_register_counter(g_doh_conf->fs_handle, spec[i]);
|
||||
}
|
||||
}
|
||||
g_doh_conf->gcev = event_new(g_doh_conf->gc_evbase, -1, EV_PERSIST, doh_gc_cb, NULL);
|
||||
|
||||
@@ -56,7 +56,7 @@ struct doh_conf
|
||||
long long stat_val[DOH_STAT_MAX];
|
||||
struct event *gcev;
|
||||
struct event_base *gc_evbase;
|
||||
screen_stat_handle_t fs_handle;
|
||||
struct fieldstat_easy *fs_handle;
|
||||
|
||||
struct maat *maat;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user