函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\memcontrol.c Create Date:2022-07-27 17:46:15
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:memcg_stat_show

函数原型:static int memcg_stat_show(struct seq_file *m, void *v)

返回类型:int

参数:

类型参数名称
struct seq_file *m
void *v
3729  memcg等于mem_cgroup_from_seq(m)
3734  BUILD_BUG_ON - break compile if a condition is true(ARRAY_SIZE - get the number of elements in array @arr*@arr: array to be sized(memcg1_stat_names) != ARRAY_SIZE - get the number of elements in array @arr*@arr: array to be sized(memcg1_stats))
3736 i小于ARRAY_SIZE - get the number of elements in array @arr*@arr: array to be sized(memcg1_stats)循环
3737  如果memcg1_stats[i]恒等于MEMCG_SWAP且非Whether legacy memory+swap accounting is active 则继续下一循环
3739  seq_printf(m, "%s %lu\n", memcg1_stat_names[i], dx can be of type enum memcg_stat_item or node_stat_item.* Keep in sync with memcg_exact_page_state(). * PAGE_SIZE)
3744 i小于ARRAY_SIZE - get the number of elements in array @arr*@arr: array to be sized(Universal VM events cgroup1 shows, original sort order )循环seq_printf(m, "%s %lu\n", vm_event_name(Universal VM events cgroup1 shows, original sort order [i]), memcg_events_local(memcg, Universal VM events cgroup1 shows, original sort order [i]))
3748 i小于NR_LRU_LISTS循环seq_printf(m, "%s %lu\n", lru_list_name(i), dx can be of type enum memcg_stat_item or node_stat_item.* Keep in sync with memcg_exact_page_state(). * PAGE_SIZE)
3754  memory等于memsw等于PAGE_COUNTER_MAX
3755 mi循环
3756  memory等于两数取小(memory, max)
3757  memsw等于两数取小(memsw, max)
3759  seq_printf(m, "hierarchical_memory_limit %llu\n", (u64)memory * PAGE_SIZE)
3761  如果Whether legacy memory+swap accounting is active seq_printf(m, "hierarchical_memsw_limit %llu\n", (u64)memsw * PAGE_SIZE)
3765 i小于ARRAY_SIZE - get the number of elements in array @arr*@arr: array to be sized(memcg1_stats)循环
3766  如果memcg1_stats[i]恒等于MEMCG_SWAP且非Whether legacy memory+swap accounting is active 则继续下一循环
3768  seq_printf(m, "total_%s %llu\n", memcg1_stat_names[i], (u64)dx can be of type enum memcg_stat_item or node_stat_item.* Keep in sync with memcg_exact_page_state(). * PAGE_SIZE)
3773 i小于ARRAY_SIZE - get the number of elements in array @arr*@arr: array to be sized(Universal VM events cgroup1 shows, original sort order )循环seq_printf(m, "total_%s %llu\n", vm_event_name(Universal VM events cgroup1 shows, original sort order [i]), (u64)memcg_events(memcg, Universal VM events cgroup1 shows, original sort order [i]))
3778 i小于NR_LRU_LISTS循环seq_printf(m, "total_%s %llu\n", lru_list_name(i), (u64)dx can be of type enum memcg_stat_item or node_stat_item.* Keep in sync with memcg_exact_page_state(). * PAGE_SIZE)
3807  返回:0