Lines Matching defs:stat

31 #include <sys/stat.h>
38 lt_stat_collection_t *stat, void *user);
42 /* cause_id -> stat entry */
180 check_process(gpointer key, lt_stat_collection_t *stat, void *user)
184 (void) snprintf(name, PATH_MAX, "/proc/%u", stat->lt_sc_id);
193 check_thread(gpointer key, lt_stat_collection_t *stat, void *user)
197 g_assert(stat->lt_sc_parent != NULL);
198 g_assert(stat->lt_sc_parent->lt_sc_level == LT_LEVEL_PROCESS);
201 stat->lt_sc_parent->lt_sc_id, stat->lt_sc_id);
206 * Helper function to free a stat node.
209 free_stat(lt_stat_collection_t *stat)
213 if (stat == NULL) {
218 if (stat->lt_sc_groups[i].lt_grp_cidlist != NULL) {
219 g_hash_table_destroy(stat->lt_sc_groups[i].
224 if (stat->lt_sc_children != NULL) {
225 g_hash_table_destroy(stat->lt_sc_children);
228 if (stat->lt_sc_name != NULL) {
229 free(stat->lt_sc_name);
232 free(stat);
236 * Helper function to initialize a stat node.
240 clear_stat(gpointer key, lt_stat_collection_t *stat, void *user)
244 g_assert(stat != NULL);
247 if (stat->lt_sc_groups[i].lt_grp_cidlist != NULL) {
248 g_hash_table_destroy(stat->lt_sc_groups[i].
250 stat->lt_sc_groups[i].lt_grp_cidlist = NULL;
253 stat->lt_sc_groups[i].lt_grp_summary.lt_se_data.lt_s_count = 0;
254 stat->lt_sc_groups[i].lt_grp_summary.lt_se_data.lt_s_total = 0;
255 stat->lt_sc_groups[i].lt_grp_summary.lt_se_data.lt_s_max = 0;
258 if (stat->lt_sc_children != NULL) {
259 g_hash_table_foreach_remove(stat->lt_sc_children,
260 (GHRFunc)stat->lt_sc_check_child_func, NULL);
261 g_hash_table_foreach(stat->lt_sc_children,
271 update_stat_entry(lt_stat_collection_t *stat, int cause_id,
282 group = &(stat->lt_sc_groups[group_to_use]);
331 if (stat->lt_sc_parent != NULL) {
332 update_stat_entry(stat->lt_sc_parent, cause_id, type, value,