core_stats
core_stats = MOD_STATS_TO_CORE(mod_stats);
dc = core_stats->dc;
struct core_stats *core_stats = NULL;
core_stats = kzalloc(sizeof(struct core_stats), GFP_KERNEL);
if (core_stats == NULL)
core_stats->dc = dc;
core_stats->enabled = DAL_STATS_ENABLE_REGKEY_DEFAULT;
core_stats->enabled = reg_data;
if (core_stats->enabled) {
core_stats->entries = DAL_STATS_ENTRIES_REGKEY_DEFAULT;
core_stats->entries = DAL_STATS_ENTRIES_REGKEY_MAX;
core_stats->entries = reg_data;
core_stats->time = kcalloc(core_stats->entries,
if (core_stats->time == NULL)
core_stats->event_entries = DAL_STATS_EVENT_ENTRIES_DEFAULT;
core_stats->events = kcalloc(core_stats->event_entries,
if (core_stats->events == NULL)
core_stats->entries = 0;
core_stats->index = 1;
core_stats->event_index = 0;
core_stats->entry_id = 0;
return &core_stats->public;
kfree(core_stats->time);
kfree(core_stats);
struct core_stats *core_stats = MOD_STATS_TO_CORE(mod_stats);
kfree(core_stats->time);
kfree(core_stats->events);
kfree(core_stats);
struct core_stats *core_stats = NULL;
core_stats = MOD_STATS_TO_CORE(mod_stats);
dc = core_stats->dc;
time = core_stats->time;
events = core_stats->events;
for (int i = 0; i < core_stats->entry_id; i++) {
if (event_index < core_stats->event_index &&
} else if (time_index < core_stats->index &&
struct core_stats *core_stats = NULL;
core_stats = MOD_STATS_TO_CORE(mod_stats);
memset(core_stats->time, 0,
sizeof(struct stats_time_cache) * core_stats->entries);
memset(core_stats->events, 0,
sizeof(struct stats_event_cache) * core_stats->event_entries);
core_stats->index = 1;
core_stats->event_index = 0;
core_stats->entry_id = 0;
struct core_stats *core_stats = NULL;
core_stats = MOD_STATS_TO_CORE(mod_stats);
if (core_stats->event_index >= core_stats->event_entries)
events = core_stats->events;
index = core_stats->event_index;
events[index].entry_id = core_stats->entry_id;
core_stats->event_index++;
core_stats->entry_id++;
struct core_stats *core_stats = NULL;
core_stats = MOD_STATS_TO_CORE(mod_stats);
if (core_stats->index >= core_stats->entries)
time = core_stats->time;
index = core_stats->index;
time[index].entry_id = core_stats->entry_id;
core_stats->index++;
core_stats->entry_id++;
struct core_stats *core_stats = NULL;
core_stats = MOD_STATS_TO_CORE(mod_stats);
if (core_stats->index >= core_stats->entries)
time = core_stats->time;
index = core_stats->index;
struct core_stats *core_stats = NULL;
core_stats = MOD_STATS_TO_CORE(mod_stats);
if (core_stats->index >= core_stats->entries)
time = core_stats->time;
index = core_stats->index;
container_of(mod_stats, struct core_stats, public)
struct core_stats *core_stats = NULL;